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
from __future__ import print_function, unicode_literals | |
import random | |
import time | |
def generate_random_guess(chars): | |
return random.choice(chars) | |
def repeated_guesses(target): |
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
#forked from: Julian_Todd / PDF to HTML (https://scraperwiki.com/views/pdf-to-html-preview-1/) | |
#input url goes to line | |
import sys | |
import urllib, urllib2, urlparse | |
import lxml.etree, lxml.html | |
import re, os | |
def Pageblock(page, index): | |
''' |
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 | |
# encoding: utf-8 | |
import codecs | |
import os | |
import sys | |
import numpy as np | |
from sklearn.feature_extraction.text import TfidfVectorizer |
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 | |
# encoding: utf-8 | |
import csv | |
from collections import Counter | |
import lxml.html | |
def create_test_html(): | |
""" Return a test HTML string. """ |
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
jq '.["title"] | select(. == "some title")' *.json |
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 | |
# encoding: utf-8 | |
from __future__ import (unicode_literals, print_function, | |
absolute_import, division) | |
import codecs | |
import re | |
import sys | |
import lxml.html |
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 i in {01..02} {04..24} {26..80} {301..340} ; do | |
curl -f -O -J -L https://media.libsyn.com/media/coffeebreakfrench/cbf-$i-basic.mp3 | |
done | |
for i in {401..424} {426..440} ; do | |
curl -f -O -J -L https//media.libsyn.com/media/coffeebreakfrench/cbf-$i-main.mp3 | |
done | |
# Handle cases which don't fit the normal pattern. |
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/python | |
# coding=utf-8 | |
# sha256frompubkey.py: Displays SHA256 fingerprint of public key in Python 2/3. | |
# Modified by Steven Maude from | |
# https://github.com/joyent/python-manta/blob/4de7445277c0971c7ff43ef246018d055ef21d20/manta/auth.py | |
# MIT licence. | |
# Usage: obtain a public key using ssh-keyscan <host> > key.pub |
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 | |
# Usage: convert_gpx.sh <FIT filename> | |
# Should works whether you include the .FIT extension or not. | |
filename=$(basename "$1" .FIT) | |
gpsbabel -i garmin_fit -f "$filename".FIT -o gpx -F "$filename".gpx |
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 | |
""" Extract date and 2D length data from GPX files in current directory. """ | |
from __future__ import division, print_function | |
import decimal | |
import glob | |
import gpxpy | |
def main(): |
OlderNewer