hacky web audio api + d3.
allow mic access, talk at computer.
import re | |
from datetime import datetime as dt | |
fake_dates = '10-Jan-2011, 01-Feb-02, ##-Bla-##, 01-Bla-2014' | |
# you can probably do some lookahead assertion at the end of the regex to only capture 2 digits or the last 2 digits | |
# instead of the mess below [1] | |
date_finder = re.compile('(\d{2}-(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-\d{2,4})') | |
dates = re.findall(date_finder, fake_dates) |
#!/usr/bin/env python | |
# get/store flickr photos in a spreadsheet | |
# you'll need a key: https://www.flickr.com/services/api/keys/apply/ | |
import csv | |
import json | |
import sys | |
from base64 import encodestring as b64 | |
from urllib import urlencode, urlopen as get | |
from optparse import OptionParser |
hacky web audio api + d3.
allow mic access, talk at computer.
import re | |
from sys import argv | |
from bs4 import BeautifulSoup as bs | |
from pyquery import PyQuery as pq | |
from lxml import etree | |
filename = argv[-1] | |
anchors = re.compile('<a.+?>.+?<\/a>', re.DOTALL|re.I) | |
with open(filename, 'r') as infile: |
<!doctype html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<style> | |
* { | |
box-sizing: border-box; | |
} | |
body, |
<!doctype html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<style> | |
* { | |
box-sizing: border-box; | |
} | |
body, |
const MODULE_NAME = 'base-app/events/' | |
export const CONNECT_WS = MODULE_NAME.concat('CONNECT_WS') | |
export const DISCONNECT_WS = MODULE_NAME.concat('DISCONNECT_WS') | |
export const SUBSCRIBE_WS = MODULE_NAME.concat('SUBSCRIBE_WS') | |
export const UNSUBSCRIBE_WS = MODULE_NAME.concat('UNSUBSCRIBE_WS') | |
export const EMIT_WS = MODULE_NAME.concat('EMIT_WS') | |
export const NEW_EVENT = MODULE_NAME.concat('NEW_EVENT') | |
export const ADD_EVENT = MODULE_NAME.concat('ADD_EVENT') |
<!doctype html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<link rel='stylesheet' href='http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css' /> | |
<style> | |
* { | |
box-sizing: border-box; | |
} |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# scrape complex systems article pdfs | |
# requires bs4: `pip install beautifulsoup4` | |
import os | |
import re | |
import json | |
from urllib import urlopen as get, urlretrieve as save | |
from bs4 import BeautifulSoup as bs |