Skip to content

Instantly share code, notes, and snippets.

View alexalemi's full-sized avatar

Alex Alemi alexalemi

View GitHub Profile
@alexalemi
alexalemi / racquetball.ipynb
Created July 23, 2014 06:37
ipython notebook of simulated sound in racquetball court
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexalemi
alexalemi / ParticularRevisited.ipynb
Created August 5, 2014 23:44
illustration of the modified method of particular solutions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexalemi
alexalemi / sky.ipynb
Created August 11, 2014 22:59
Where did the blue go?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexalemi
alexalemi / mellnikcut.ipynb
Created September 13, 2014 15:53
looking at Mellnik's cutting problem
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexalemi
alexalemi / fuelefficienthills.ipynb
Created April 22, 2015 02:49
Stackexchange answer for optimal path for fuel efficiency
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexalemi
alexalemi / primefactors2.py
Created August 11, 2011 22:48
Alternative Prime Factors
from itertools import chain
def factors2(n):
result = []
# test 2 and all of the odd numbers
# xrange instead of range avoids constructing the list
for i in chain([2],xrange(3,n+1,2)):
s = 0
while n%i == 0: #a good place for mod
n /= i
@alexalemi
alexalemi / moebius2.py
Created August 11, 2011 22:27
Alternative Moebius Transformation
""" An alternative way to do the moebius transformation,
using scipy.ndimage.geometric_transform,
that interpolates the points for a smoother transformation """
from pylab import *
from numpy import *
zp=[157+148j, 78+149j, 54+143j]; # (zs) the complex point zp[i]
wa=[147+143j, 78+140j, 54+143j]; # (ws) will be in wa[i]
@alexalemi
alexalemi / maps.html
Created August 16, 2011 19:17
Scaled Planetary Positions Google Map
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=0.5, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Planet Locations</title>
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize() [