Skip to content

Instantly share code, notes, and snippets.

View sglbl's full-sized avatar
🏠
Working from home

Süleyman Gölbol sglbl

🏠
Working from home
View GitHub Profile
@WestleyK
WestleyK / output-color.sh
Created August 15, 2018 01:19
printf color output
#!/bin/bash
#
# Created by: Westley K
# Date: Aug 14, 2018
#
# run this in your terminal, and
# you will get nice colors and effects!
#
@tmthydvnprt
tmthydvnprt / notebook_code_toggle.py
Created January 1, 2017 13:33
Toggle code cells in jupyter notebooks
import IPython.core.display as di
# This line will hide code by default when the notebook is exported as HTML
di.display_html('<script>jQuery(function(){if(jQuery("body.notebook_app").length==0){jQuery(".input_area").toggle();jQuery(".prompt").toggle();}});</script>', raw=True)
# This line will add a button to toggle visibility of code blocks, for use with the HTML export version
di.display_html('<button onclick="jQuery(\'.input_area\').toggle();jQuery(\'.prompt\').toggle();">Toggle code</button>', raw=True)