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
if isinstance(filename, text_type): | |
from unicodedata import normalize | |
filename = normalize('NFKD', filename).encode('ascii', 'ignore') | |
if not PY2: | |
filename = filename.decode('ascii') | |
for sep in os.path.sep, os.path.altsep: | |
if sep: | |
filename = filename.replace(sep, ' ') |
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
Traceback (most recent call last): | |
File "/usr/local/lib/python3.3/site-packages/flask/app.py", line 1827, in __call__ | |
return self.wsgi_app(environ, start_response) | |
File "/usr/local/lib/python3.3/site-packages/flask/app.py", line 1811, in wsgi_app | |
response = self.make_response(self.handle_exception(e)) | |
File "/usr/local/lib/python3.3/site-packages/flask/app.py", line 1394, in handle_exception | |
reraise(exc_type, exc_value, tb) | |
File "/usr/local/lib/python3.3/site-packages/flask/_compat.py", line 38, in reraise | |
raise value | |
File "/usr/local/lib/python3.3/site-packages/flask/app.py", line 1808, in wsgi_app |
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 os import getpid, kill | |
from signal import SIGTERM | |
kill(getpid(), SIGTERM) |
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 python3.4 | |
from itertools import filterfalse | |
from sys import argv | |
try: | |
filepath = argv[1] | |
except IndexError: | |
raise SystemExit('must specify path to file') |
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 python3.4 | |
import json | |
from pprint import PrettyPrinter | |
from collections import defaultdict | |
pp = PrettyPrinter() | |
with open('elsa/strings.json') as stringfile: | |
strings = json.load(stringfile) |
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 python3.4 | |
from collections import Counter | |
from difflib import SequenceMatcher | |
import sys, re, pathlib | |
import subprocess | |
import requests | |
from bs4 import BeautifulSoup | |
from bs4.element import NavigableString, Tag |
This file has been truncated, but you can view the full file.
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
[ | |
[ | |
"lyfätösivözi", | |
"änydezäqepez", | |
"päwidefyföjä", | |
"evepägäniwyk", | |
"xylyxäzöbewe", | |
"ixäbörevögeh", | |
"öwygyvywäwyg", | |
"zexirilähiqö", |
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 python3 | |
from enum import Enum | |
from itertools import chain | |
import re | |
import pprint | |
filepath = "chukchi_texts.txt" | |
#pprint.pprint(words) |
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
// ==UserScript== | |
// @name Readable ILGA | |
// @namespace http://ostensible.me | |
// @version 0.1 | |
// @description make ILGA.gov readable | |
// @author Anton Osten | |
// @match http://*.ilga.gov/* | |
// @grant none | |
// ==/UserScript== |
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
def get_ngrams(iterable): | |
length = len(iterable) | |
if length == 1: | |
yield iterable[0] | |
return | |
# the 'starting position' loop | |
for n in range(length): |
OlderNewer