Skip to content

Instantly share code, notes, and snippets.

View wrobstory's full-sized avatar

Rob Story wrobstory

View GitHub Profile
@wrobstory
wrobstory / gist:10951143
Created April 17, 2014 03:34
Vincent, Seaborn, mpld3, Bokeh, ggplot in the IPython notebook dep list
(.env)Rob@rmbp ~/src/pydatasv2014 (master) $ pip freeze
Flask==0.10.1
Jinja2==2.7.2
Markdown==2.4
MarkupSafe==0.19
PyYAML==3.11
Pygments==1.6
Sphinx==1.2.2
Werkzeug==0.9.4
backports.ssl-match-hostname==3.4.0.2
@wrobstory
wrobstory / alltheimports.py
Created April 20, 2014 01:46
Import Import Import Import
import bearcart
import bokeh
import bokeh.plotting as bp
from bokeh.plotting import output_notebook
import pandas as pd
import matplotlib.pyplot as plt
import mpld3
import numpy as np
import vincent
import ggplot as gg
  • Task
    • Task
      • Task
        • Task
          • Task
            • Task
              • Task
                • Task
                  • Task
  • Task
@wrobstory
wrobstory / gist:1200cda56a740486701b
Created July 13, 2014 22:27
Python 2.6 set() vs locals()['_[1]']
Python 2.6.9 |Continuum Analytics, Inc.| (unknown, Jan 10 2014, 13:33:57)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import timeit
>>> from math import sqrt
>>>
>>> n = 100
>>> sqrt_n = int(sqrt(n))
>>>
>>> def with_set():
@wrobstory
wrobstory / gist:0fed134fbfe1da95b5be
Created August 20, 2014 05:01
YCombinator Summer 2014 Companies
These are the TechCrunch one-sentence summaries of the YCombinator 2014 class:
"Speeds up the process of genetically engineering and growing ingredients"
"A platform that provides ways for artists to make more money off their concerts and sell directly to fans"
"An e-filing service for paying income taxes in India"
"A company that arbitrages the cost of goods in different countries by using international travelers as a distribution network"
"Sells men’s custom shirts by measuring you with the camera on your phone"
"Creates technology for genetically engineering plants"
"Attacking the $400 billion used car market"
"Using nanodiamonds to redefine medical imaging"
@wrobstory
wrobstory / gist:7b5777a2732729717cc7
Created August 25, 2014 18:38
Scala Default Args
scala> def addStringOneParam(input: String): String = input + "foo"
addStringOneParam: (input: String)String
scala> def addStringDefParam(input: String, toAdd: String = "foo"):String = input + toAdd
addStringDefParam: (input: String, toAdd: String)String
scala> addStringOneParam("baz")
res3: String = bazfoo
scala> addStringDefParam("baz")
@wrobstory
wrobstory / gist:934f9a261e1955a775ca
Created September 7, 2014 00:13
Scala Equality
scala> Array(1, 2, 3) == Array(1, 2, 3)
res0: Boolean = false
scala> Vector(1, 2, 3) == Vector(1, 2, 3)
res1: Boolean = true
scala> List(1, 2, 3) == List(1, 2, 3)
res2: Boolean = true
@wrobstory
wrobstory / gist:60750cec022650bf27b1
Created September 7, 2014 01:28
Import mutable
scala> Set
res0: scala.collection.immutable.Set.type = scala.collection.immutable.Set$@12559336
scala> import scala.collection.mutable.Set
import scala.collection.mutable.Set
scala> Set
res1: scala.collection.mutable.Set.type = scala.collection.mutable.Set$@f86a0bd
@wrobstory
wrobstory / gist:98033556dd590132852e
Created September 8, 2014 04:17
PIP ALL THE THINGS
#!/bin/bash
virtualenv .env &&
source .env/bin/activate &&
brew install libevent &&
brew install libyaml &&
pip install cython &&
pip install numpy &&
pip install scipy &&
pip install pandas &&
pip install matplotlib &&
Robs-MacBook-Pro:testenv robstory$ sh PIPALLTHETHINGS.sh
New python executable in .env/bin/python2.7
Also creating executable in .env/bin/python
Installing setuptools, pip...done.
Warning: libevent-2.0.21 already installed
Warning: libyaml-0.1.6 already installed
Downloading/unpacking cython
Downloading Cython-0.20.2-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl (3.4MB): 3.4MB downloaded
Installing collected packages: cython
Successfully installed cython