View chebyshev.py
1 2 3 4 5 6 7 8 9 10
from sympy import symbols
from sympy.matrices import *
from sympy import collect
 
x,t = symbols('x a b c d')
 
V = Matrix([[2*x+a, 1, 0,0], [1, 2*x+b, 1,0], [0, 1, 2*x+c,1], [0,0,1,2*x+d]])
collect(V.det(),a)
 
"""a*(b*c*d + 2*b*c*x + 2*b*d*x + 4*b*x**2 - b + 2*c*d*x + 4*c*x**2 + 4*d*x**2 - d + 8*x**3 - 4*x) + 2*b*c*d*x + 4*b*c*x**2 + 4*b*d*x**2 + 8*b*x**3 - 2*b*x + 4*c*d*x**2 - c*d + 8*c*x**3 - 2*c*x + 8*d*x**3 - 4*d*x + 16*x**4 - 12*x**2 + 1"""
View README.md

How to Install iHaskell

iHaskell is a notebook similar to iPython notebook. Here's to hoping it will become easier to learn the very complix Haskell language.

you might need Python's virtual environments

I raised many Github issues and StackOverflow questions loudly expressing my grief on installation issues

View gaussreduction.py
1 2 3 4 5 6 7 8 9 10
def S((a,b,c), k=1):
return (a, -2*a*k+b, a*k**2-b*k+c)
 
 
def T((a,b,c)):
return (c,b,a)
 
x = (1,33,-21)
x = (7, 33, -8)
x = (13,13,-22)
View gcd.py
1 2 3 4 5 6 7 8 9
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
 
# http://stackoverflow.com/questions/11175131/code-for-greatest-common-divisor-in-python
def gcd(x, y):
while y != 0:
(x, y) = (y, x % y)
return x
View limacon-1.md

Wikipedia: Let P be a point and C be a circle whose center is not P. Then the envelope of those circles whose center lies on C and that pass through P is a limaçon.

View subway.py
1 2 3 4 5 6 7 8 9 10
import requests
 
key = ''
r = requests.get('http://datamine.mta.info/mta_esi.php?key=%s&feed_id=1'%(key))
 
# http://datamine.mta.info/sites/all/files/pdfs/nyct-subway.proto.txt
# https://developers.google.com/transit/gtfs-realtime/gtfs-realtime-proto
# https://github.com/google/protobuf
 
import gtfs_realtime_pb2, nyct_subway_pb2
View 2048.html
1 2 3 4 5 6 7 8 9
<html>
 
<head>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
 
<body>
 
<svg id="board" width=500 height=500></svg>
Something went wrong with that request. Please try again.