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
var morse = { | |
a: '.-', b: '-...', c: '-.-.', d: '-..', | |
e: '.', f: '..-.', g: '--.', h: '....', | |
i: '..', j: '.---', k: '-.-', l: '.-..', | |
m: '--', n: '-.', o: '---', p: '.--.', | |
q: '--.-', r: '.-.', s: '...', t: '-', | |
u: '..-', v: '...-', w: '.--', x: '-..-', | |
y: '-.--', z: '--..', 0: '-----', 1: '.----', | |
2: '..---', 3: '...--', 4: '....-', 5: '.....', | |
6: '-....', 7: '--...', 8: '---..', 9: '----.' |
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
packages: | |
yum: | |
gcc: [] | |
libstdc++-devel: [] | |
gcc-c++: [] | |
fuse: [] | |
fuse-devel: [] | |
libcurl-devel: [] | |
libxml2-devel: [] | |
openssl-devel: [] |
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
""" | |
A series of functions to extract just the text from html page articles | |
""" | |
from lxml import etree | |
default_encoding = "utf-8" | |
def newyorker_fp (html_text, page_encoding=default_encoding): | |
"""For the articles found on the 'Financial Page' section of the New Yorker's website |
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
Image link: | |
![My Image](https://gist.github.com/t-paul/7171783#file-openscad-freetype-4-png) |
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 | |
# Contact: Will Wade willwa.de | |
# Date: April 2013 | |
# Needs mechanize and pybtex | |
# | |
# NB: Little error checking going on in this script | |
# TO-DO: Check last-download-date of bibtex file later than last-modified date on CUL. ? possible | |
# | |
# With thanks to https://pypi.python.org/pypi/citeulike_api/0.1.3dev for the login part | |
import mechanize |
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
#Quick cp from http://sekati.com/etc/install-nodejs-on-debian-squeeze | |
# | |
#Needed to install TileMill from MapBox | |
# | |
#Installs node.js which has npm bundled | |
# | |
#Build Dependencies | |
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev |
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
import os | |
import sys | |
import yaml | |
import json | |
# base url to use | |
base_url = "http://localhost:1313" | |
# The attribute mapping for docsearch. | |
# |
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: utf-8 -*- | |
""" | |
pip install networkx distance pattern | |
In Flipboard's article[1], they kindly divulge their interpretation | |
of the summarization technique called LexRank[2]. |
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
file = open("usb_hid_keys.h", "r") | |
for line in file: | |
goodline = line[8:].split(" ") | |
if line.startswith("#define ") and len(goodline)>1: | |
key = goodline[0] | |
value = "" | |
for i in range(1, len(goodline)): | |
if goodline[i] == "": | |
continue |
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
# -*- coding: utf-8 -*- | |
""" | |
You need to fill in your API key from google below. Note that querying | |
supported languages is not implemented. | |
Language Code | |
-------- ---- | |
Afrikaans af | |
Albanian sq | |
Arabic ar |
OlderNewer