Simple line chart.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set up flags for Numpy C extentions compiling | |
export CFLAGS="-arch i386 -arch x86_64" | |
export FFLAGS="-m32 -m64" | |
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64" | |
export CC=gcc-4.2 | |
export CXX="g++ -arch i386 -arch x86_64" | |
pip install numpy | |
# success! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cPickle as pickle | |
import heapq | |
from itertools import combinations, izip | |
import os | |
import numpy as np | |
from matplotlib import pyplot as plt | |
from matplotlib import image as mpimg | |
import networkx as nx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A guide to prevent pain and suffering while upgrading to OS X Mavericks | |
# This will vary greatly depending on system set up, so read the instructions carefully | |
# Back up Virtulenvs | |
#################### | |
# Very important! | |
# For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv | |
# in order to prevent loss of dependencies during the upgrade. |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(dp1 | |
(I32 | |
I54 | |
tp2 | |
(lp3 | |
(I29 | |
cnumpy.core.multiarray | |
scalar | |
p4 | |
(cnumpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cPickle as pickle | |
import heapq | |
from itertools import combinations, izip | |
import os | |
import numpy as np | |
from matplotlib import pyplot as plt | |
from matplotlib import image as mpimg | |
import networkx as nx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# replace 9.3 with whatever version of PostgreSQL you have installed | |
# you can also link the commands to /usr/bin/ if you prefer | |
# before | |
######## | |
# $ psql | |
# -bash: psql: command not found | |
for i in /Library/PostgreSQL/9.3/bin/*; do | |
t=${i##*/}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, subprocess | |
ITERATIONS = 5 | |
def transform(line): | |
return "ITERATIONS = " + str(int(line.split()[2]) - 1) + "\n" if line.startswith("ITERATIONS") else line | |
with open(os.path.abspath(__file__), "r+") as f: | |
new = ''.join(map(transform, f.readlines())) | |
f.seek(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Drive Google's Streetview Car</title> | |
<style> | |
html, body { | |
height: 100%; | |
margin: 0; | |
padding: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Grid</title> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet"> | |
<link href='http://fonts.googleapis.com/css?family=Arvo|PT+Sans|Kreon|Crete+Round' rel='stylesheet' type='text/css'> | |
<style type="text/css"> | |
body { | |
background-image: url("http://subtlepatterns.com/patterns/project_papper_@2X.png") | |
} |
NewerOlder