- @b0rk had a great talk about using Strace/Ngrep/Mitmproxy/Pgrep/Cat /stack/ for debugging
- [Really interesting talk on cleaning up messy data with lots of Pandas tools.] (https://www.youtube.com/watch?v=_eQ_8U5kruQ)
- Chardet is a library for figuring out character sets.
- fuzzywuzzy is a python library for fuzzy string matching.
- JellyFish is another fuzzy string matching library.
- Tabbula is a tool for scraping data from PDFs.
- The new python packager is called wheel, it is faster, smaller, and more cross platform
- Ipydb and PDBplusplus are great additions to regular PDB
- Bokeh is the new Matplotlib, and it is awesome
- [GUIDO IS GIVING US TYPE HINTING IN 3.4!
This file contains hidden or 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 cv2 | |
import numpy as np | |
import time | |
import livestreamer | |
# use live streamer to figure out the stream info | |
streams = livestreamer.streams("http://www.twitch.tv/inostupid") | |
stream = streams['best'] | |
# open our out file. | |
fname = "test.mpg" |
This file contains hidden or 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 goprohero import GoProHero | |
import urllib | |
import bs4 | |
import time | |
def download_and_save(name,route="http://10.5.5.9:8080/videos/DCIM/100GOPRO/"): | |
grab = route+name | |
result = urllib.urlopen(grab) | |
if( result.code == 200 ): | |
with open(name,'wb') as fp: |
This file contains hidden or 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 itertools as it | |
def make_cards(n,m=[0,100,200,300,400]): | |
values = [n+mm for mm in m] | |
cards = [] | |
for card in it.permutations(values): | |
cards.append(list(card)) | |
return cards | |
def run_alg(cards,alg): |
This file contains hidden or 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 itertools as it | |
def make_cards(n,m=[0,100,200,300,400]): | |
values = [n+mm for mm in m] | |
cards = [] | |
for card in it.permutations(values): | |
cards.append(list(card)) | |
return cards | |
def run_alg(cards,alg): |
This file contains hidden or 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 pkg_resources | |
import argparse | |
import os.path as osp | |
import csv | |
def get_pkg_license(pkgname): | |
""" | |
Given a package reference (as from requirements.txt), | |
return license listed in package metadata. | |
""" |
This file contains hidden or 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
tempoautomation@tempoautomation:~/Code$ ipython | |
Python 2.7.6 (default, Mar 22 2014, 22:59:56) | |
Type "copyright", "credits" or "license" for more information. | |
IPython 1.2.1 -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. | |
object? -> Details about 'object', use 'object??' for extra details. |
This file contains hidden or 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
In [1]: %paste | |
import tinyg as tg | |
tgm = tg.TGMode() | |
tgm.configure() | |
tgm.home() | |
tgm.execute("$$\r") | |
tgm.execute("G91\r") | |
tgm.execute("G0X100\r") | |
tgm.execute("G0X-100\r") |
This file contains hidden or 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
tempoautomation@MarkV:~/Code/tempo_ws/src/tinyg_node/scripts$ ipython | |
Python 2.7.6 (default, Mar 22 2014, 22:59:56) | |
Type "copyright", "credits" or "license" for more information. | |
IPython 1.2.1 -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. | |
object? -> Details about 'object', use 'object??' for extra details. |
This file contains hidden or 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
def _parse_variable_tray(self,config): | |
# for a variable tray we allocate the rows | |
# at run time as needed | |
tl_x = config["points"]["tl"]["x"] | |
tl_y = config["points"]["tl"]["y"] | |
br_x = config["points"]["br"]["x"] | |
br_y = config["points"]["br"]["y"] | |
self.row_tl = [tl_x,tl_y] | |
self.row_br = [br_x,br_y] |