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.
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
from urllib2 import urlopen | |
from cStringIO import StringIO | |
import json | |
from pyproj import Proj | |
from shapely.geometry import Point | |
from geopandas import GeoSeries, GeoDataFrame | |
# http://www.nyc.gov/html/dcp/download/bytes/nybb_13a.zip | |
boros = GeoDataFrame.from_file('/nybb_13a/nybb.shp', vfs='zip://nybb_13a.zip') | |
url = 'http://citibikenyc.com/stations/json' |
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
from IPython.kernel.zmq.kernelapp import IPKernelApp | |
app = IPKernelApp.instance() | |
print app.connection_file |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{"1024000": {"taxi": 18, "squeegee": 0, "noise": 112, "radioactive": 0, "street_condition": 7, "snow": 0, "sewer": 0, "graffiti": 0, "food_poisoning": 3, "streetlight": 0, "total": 210, "hpd": 0}, "3072000": {"taxi": 1, "squeegee": 0, "noise": 22, "radioactive": 0, "street_condition": 93, "snow": 17, "sewer": 12, "graffiti": 2, "food_poisoning": 4, "streetlight": 25, "total": 963, "hpd": 309}, "3080200": {"taxi": 9, "squeegee": 0, "noise": 120, "radioactive": 0, "street_condition": 82, "snow": 8, "sewer": 12, "graffiti": 21, "food_poisoning": 1, "streetlight": 83, "total": 3300, "hpd": 2392}, "4029100": {"taxi": 12, "squeegee": 0, "noise": 74, "radioactive": 0, "street_condition": 65, "snow": 36, "sewer": 14, "graffiti": 14, "food_poisoning": 18, "streetlight": 50, "total": 1993, "hpd": 655}, "4005900": {"taxi": 55, "squeegee": 0, "noise": 282, "radioactive": 0, "street_condition": 111, "snow": 14, "sewer": 10, "graffiti": 22, "food_poisoning": 2, "streetlight": 123, "total": 2752, "hpd": 688}, "3088400": {"t |
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
{"1024000": {"taxi": 18, "squeegee": 0, "noise": 112, "radioactive": 0, "street_condition": 7, "snow": 0, "sewer": 0, "graffiti": 0, "food_poisoning": 3, "streetlight": 0, "total": 210, "hpd": 0}, "3072000": {"taxi": 1, "squeegee": 0, "noise": 22, "radioactive": 0, "street_condition": 93, "snow": 17, "sewer": 12, "graffiti": 2, "food_poisoning": 4, "streetlight": 25, "total": 963, "hpd": 309}, "3080200": {"taxi": 9, "squeegee": 0, "noise": 120, "radioactive": 0, "street_condition": 82, "snow": 8, "sewer": 12, "graffiti": 21, "food_poisoning": 1, "streetlight": 83, "total": 3300, "hpd": 2392}, "4029100": {"taxi": 12, "squeegee": 0, "noise": 74, "radioactive": 0, "street_condition": 65, "snow": 36, "sewer": 14, "graffiti": 14, "food_poisoning": 18, "streetlight": 50, "total": 1993, "hpd": 655}, "4005900": {"taxi": 55, "squeegee": 0, "noise": 282, "radioactive": 0, "street_condition": 111, "snow": 14, "sewer": 10, "graffiti": 22, "food_poisoning": 2, "streetlight": 123, "total": 2752, "hpd": 688}, "3088400": {"t |
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
#!/usr/bin/env python | |
# -*- coding: iso-8859-15 -*- | |
"""Calculate position for comet Garradd | |
Author: Kelsey Jordahl | |
Time-stamp: <Sun Feb 26 12:28:17 EST 2012> | |
License: GPLv3 | |
""" | |
import ephem |
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
#!/usr/bin/env python | |
''' | |
based on gil_detector.py | |
http://codepad.org/CeI6gJLk | |
Swapped out multiprocessing for threading | |
Effective use of multiple processors is done by checking how fast multiprocess code | |
is executed in relation to single-threaded code. | |
''' |
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
;; this location is "~/.pudb-bp" in older versions of pudb | |
(setq pudb-bp-file (expand-file-name "~/.config/pudb/saved-breakpoints")) | |
(defun pudb-add-breakpoint () | |
(interactive) | |
(append-to-file | |
(concat "b " buffer-file-name ":" | |
(nth 1 (split-string (what-line))) "\n") | |
nil pudb-bp-file)) | |
(define-key py-mode-map (kbd "C-c C-t") 'pudb-add-breakpoint) |