Skip to content

Instantly share code, notes, and snippets.

Wyatt wylee

Block or report user

Report or block wylee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View oddity.py
import collections
import itertools
import sys
import timeit
import unittest
from typing import Callable, Iterable, Tuple
def oddity(iterable: Iterable,
View findunusedtemplates.py
import fnmatch
import mimetypes
import os
from django.conf import settings
from django.core.management.base import BaseCommand
from arcutils.colorize import printer
@wylee
wylee / pgcopy.sh
Last active Dec 19, 2016
Bash script to copy a Postgres database from one host/instance to another
View pgcopy.sh
#!/bin/bash
#
# NOTE: Although this script attempts to be safe, it has the potential
# to be highly destructive; please run with caution.
#
# This copies the specified database from pgsql.rc.pdx.edu to
# postgresql.rc.pdx.edu.
#
# If the database is PostGIS-enabled, use the --postgis flag. This also
# requires that postgis_restore.pl is on your $PATH.
@wylee
wylee / gist:4559038
Created Jan 17, 2013
Accessing INI configuration from within Pyramid
View gist:4559038
# development.ini
[server:main]
use = egg:waitress
[app:main]
use = call:myproject:main
[app:mysettings]
use = call:myproject:noop
a = 1
@wylee
wylee / gist:3783735
Created Sep 25, 2012
My first Go program
View gist:3783735
/*
This "script" scrapes a collection of images from Wikipedia.
It reads a file containing a list of URLs (that were previously scraped
from the index page of the collection). For each of those URLs, it
retrieves the pointed-to page, locates a particular image URL within that
page (using a regex), and then downloads the image.
The image is written in 1MB chunks; progress is reported as each chunk is
written. Downloaded images are named N.jpg where N corresponds to the line
You can’t perform that action at this time.