I hereby claim:
- I am dalemyers on github.
- I am dalemyers (https://keybase.io/dalemyers) on keybase.
- I have a public key ASA6z5CEfbp4l-cv9-sX6AR0s_6smhQ9hgi3Q6OWHHXP-Ao
To claim this, I am signing this object:
def get_entry_size(entry: Any) -> int: | |
"""Get the approximate size an entry will be in JSON. | |
Notes: Doesn't check for escaped characters in strings, so the size returned | |
will essentially always be a lower bound. | |
:param entry: The entry to get the size of | |
:returns: A size in bytes | |
""" |
from typing import List, Optional, Tuple | |
Square = Tuple[int, int] | |
SIZE = 8 | |
assert SIZE <= 20, "Too large a size will overflow the stack" | |
def next_possible_squares(x: int, y: int, squares: List[Square]) -> List[Square]: | |
"""Determine the next possible valid squares based on the current square and the previously visited squares. |
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
import os | |
from optparse import OptionParser | |
import re | |
class Parser(object): |
#!/usr/bin/env python | |
# Generated by BigMap 2. Permalink: http://bigmap.osmz.ru/bigmap.php?xmin=472&xmax=527&ymin=288&ymax=351&zoom=10&scale=256&tiles=mapnik | |
import io, urllib2, datetime, time, re, random | |
from PIL import Image, ImageDraw | |
# ^^^^^^ install "python-pillow" package | pip install Pillow | easy_install Pillow | |
(zoom, xmin, ymin, xmax, ymax) = (9, 236, 144, 264, 176) | |
layers = ["http://tile.openstreetmap.org/!z/!x/!y.png"] | |
attribution = 'Map data (c) OpenStreetMap' |
import Tkinter | |
import tkFileDialog | |
import os | |
import hashlib | |
import datetime | |
import pytz | |
import shutil | |
from PIL import Image | |
from PIL.ExifTags import TAGS |
'''This script is a "simulation" of an external merge sort in a DBMS. In a DBMS | |
you will read pages from disk and be able to hold a particular number in | |
memory. This implementation allows you to set the number of pages by setting | |
the MAX_BUFFERS variable, and the size of a page by setting the | |
MAX_BUFFER_SPACE variable.''' | |
import sys | |
import os | |
import tempfile |
#include <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#define CHARACTERS_LENGTH 62 | |
char initialised = 0; | |
char *characters; |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
# Python 2 and 3 compatible. | |
#This script takes in a PDF and creates two new PDFs. One has the black and | |
#white pages and the other has the colour pages. It also takes duplex printing | |
#into account. So a black and white side which is on the same sheet as a colour | |
#side will be placed into the colour PDF. | |
#This is from a script created by Iain Murray. The original comment is below. | |
#This version simply has some different defaults and removes the PDFtoPPM. |