Skip to content

Instantly share code, notes, and snippets.

View gforsyth's full-sized avatar
🐗
Cinghiale

Gil Forsyth gforsyth

🐗
Cinghiale
View GitHub Profile
@gforsyth
gforsyth / jekyll.py
Last active June 23, 2017 23:24 — forked from cscorley/jekyll.py
try:
from urllib.parse import quote # Py 3
except ImportError:
from urllib2 import quote # Py 2
import os
import sys
#BLOG_DIR = os.environ['BLOG_DIR']
BLOG_DIR = '/home/gil/gforsyth.github.io/'
@gforsyth
gforsyth / sympy.bigint.check.py
Created November 3, 2014 17:10
Checking if SymPy has a bug when calculating determinant of very big integers
import sympy
for i in range(100):
basicMatrix = sympy.randMatrix(14,14,-99,99)
powersMatrix = sympy.diag(10**123, 10**152, 10**185, 10**220, 10**397, 10**449, 10**503, 10**563, 10**979, 10**1059, 10**1143, 10**1229, 10**1319, 10**1412)
smallMatrix = sympy.randMatrix(14,14,-999,999)
bigMatrix = basicMatrix*powersMatrix + smallMatrix
a = bigMatrix.det()
b = bigMatrix.det()
@gforsyth
gforsyth / Burgers_Equation.ipynb
Last active October 27, 2015 21:39
Numerical Damping
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gforsyth
gforsyth / HOWTO.Install.JSAnimation.md
Last active April 7, 2019 09:57
HOWTO: Install JSAnimation for IPython Notebook

##Download using git

You can git clone the library from Jake Vanderplas' GitHub repository: https://github.com/jakevdp/JSAnimation

git clone https://github.com/jakevdp/JSAnimation.git

##Download without git

@gforsyth
gforsyth / README.md
Last active August 29, 2015 14:06 — forked from takluyver/README.md

Copy nbflatten.py to somewhere on $PATH. Then, in the root of a git repository, run these commands:

echo "*.ipynb diff=ipynb" >> .gitattributes 
git config diff.ipynb.textconv nbflatten.py

When you change a notebook and run git diff, you'll see the diff of flattened, simplified notebooks, rather than the full JSON. This does lose some information (metadata, non-text output), but it makes it easier to see simple changes in the notebook.

This doesn't help with merging conflicting changes in notebooks. For that, see nbdiff.org.