Skip to content

Instantly share code, notes, and snippets.

@wwymak
wwymak / map_clsloc.txt
Created January 7, 2020 22:18 — forked from aaronpolhamus/map_clsloc.txt
Image net classes + labels
n02119789 1 kit_fox
n02100735 2 English_setter
n02110185 3 Siberian_husky
n02096294 4 Australian_terrier
n02102040 5 English_springer
n02066245 6 grey_whale
n02509815 7 lesser_panda
n02124075 8 Egyptian_cat
n02417914 9 ibex
n02123394 10 Persian_cat
@wwymak
wwymak / pdf_from_bokeh.py
Created September 18, 2019 13:58
generate pdfs from charts
import pdfkit
import pandana as pdna
import pandas as pd
berlin_drive_nodes_df = pd.DataFrame([x[1] for x in list(berlin_drive_net.nodes(data=True))])[["x", "y", "osmid"]]
# this line is important--your nodes dataframe must have the nodes id as index for pandana to construct the network
# properly. Ref https://github.com/UDST/pandana/issues/88
berlin_drive_nodes_df.set_index("osmid", inplace=True)
berlin_drive_net_edges = list(berlin_drive_net.edges.data('length'))
berlin_drive_net_edges = [{"from": x[0], "to": x[1], "weight": x[2]} for x in berlin_drive_net_edges]
@wwymak
wwymak / .block
Last active September 18, 2017 20:53
Munching Squares
license: mit
@wwymak
wwymak / .block
Last active August 26, 2017 16:57
us eclipse tweets
license: mit
@wwymak
wwymak / .block
Last active July 2, 2017 18:00
simple cellular automata
license: mit
@wwymak
wwymak / gist:73dc2240c3c60eb9a53539cf429860b7
Created March 16, 2017 15:59 — forked from fabien0102/gist:88dcaa184d801fd5e67a
Import multiple json files into mongoDB
ls -1 *.json | while read jsonfile; do mongoimport -d support -c logs -file $jsonfile --jsonArray -type json; done
@wwymak
wwymak / .block
Last active September 13, 2016 23:29
Attempt at Binsq with d3
license: mit
@wwymak
wwymak / .block
Created July 17, 2016 20:04
sentimentVis with transcript from datastories attempt1
license: gpl-3.0
@wwymak
wwymak / README.md
Last active June 26, 2016 19:08
experiment for euref results