Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Pilosov mathematicalmichael

View GitHub Profile
@mathematicalmichael
mathematicalmichael / remove_output.py
Last active Jun 29, 2020 — forked from damianavila/remove_output.py
Remove output from IPython notebook from the command line (dev version 1.0)
View remove_output.py
"""
Usage: python remove_output.py notebook.ipynb
Modified from remove_output by Minrk
Modified from remove_output by mathematicalmichael
"""
import sys
import io
import os
from nbformat import read, write, NO_CONVERT
@mathematicalmichael
mathematicalmichael / bash_aliases
Last active Nov 4, 2019
startup_scripts/ :: A hook for docker images to run on spawn
View bash_aliases
shopt -s expand_aliases
# load in your custom fzf extensions
if [ -f ~/.bash_fzf ]; then
. ~/.bash_fzf
fi
alias srv='python -m http.server'
alias erc='vim ~/.bash_aliases'
@mathematicalmichael
mathematicalmichael / youtube.html
Created Oct 12, 2019
embed youtube into jupyter notebook (add %%HTML to top of cell)
View youtube.html
<center>
<iframe id="videoframe" width="560" height="315" src="" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<script type="text/javascript">
var segment_str = window.location.pathname;
var segment_array = segment_str.split( '/' );
var last_segment = segment_array.pop();
document.getElementById('videoframe').src = 'https://www.youtube.com/embed/' + last_segment;
</script>
</center>
You can’t perform that action at this time.