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 | |
""" | |
Simplifies the process for reading in unicode CSV files | |
""" | |
import csv | |
from unicodedata import normalize | |
import codecs |
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
#!/bin/bash | |
# requires ghostscript (http://www.ghostscript.com/) | |
# requires ImageMagick | |
# requires tesseract (https://code.google.com/p/tesseract-ocr/) | |
# requires GNU parallel (https://www.gnu.org/software/parallel/) | |
# all of these are typically available through yum/apt/brew/etc. | |
# number of cores over which the process will be parallelized | |
num_cores=$1 |
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
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
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
#!/bin/bash | |
# for Ubuntu 12.04/12.10 | |
sudo apt-get update | |
sudo apt-get -y install autoconf automake make buildessential | |
sudo apt-get -y install tesseract-ocr tesseract-ocr-eng imagemagick | |
# install parallel | |
(wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3) | bash | |
# convert PDF to TIFF |
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
package main | |
import ( | |
"crypto/sha1" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"strconv" | |
"time" |
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
#!/bin/bash | |
set -eu | |
if [ "$#" != 2 ]; then | |
echo >&2 "Usage: $0 <clone_url> <public_username> | |
A VERY SLOW mining implementation. This should give you an idea of | |
where to start, but it probably won't successfully mine you any | |
Gitcoins. |
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
#!/bin/sh | |
set -e | |
# Add or modify any build steps you need here | |
cd "$(dirname "$0")" | |
pip install --user pandas flask requests grequests |
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
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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 | |
""" | |
simple example script for running notebooks and reporting exceptions. | |
Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]` | |
Each cell is submitted to the kernel, and checked for errors. | |
""" | |
import os,sys,time |
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 requests | |
from bs4 import BeautifulSoup | |
url = 'http://e-foia.uspto.gov/Foia/DispatchBPAIServlet?RetrieveRecent=30' | |
html = requests.get(url).content | |
soup = BeautifulSoup(html) | |
all_download_links = soup.findAll('a', {'target': '_self'}) | |
for i, link in enumerate(all_download_links): | |
download = 'http://e-foia.uspto.gov/Foia/'+link['href'] |
OlderNewer