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 collections | |
import itertools | |
import sys | |
import timeit | |
import unittest | |
from typing import Callable, Iterable, Tuple | |
def oddity(iterable: Iterable, |
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 fnmatch | |
import mimetypes | |
import os | |
from django.conf import settings | |
from django.core.management.base import BaseCommand | |
from arcutils.colorize import printer | |
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 | |
# | |
# 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. |
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
# development.ini | |
[server:main] | |
use = egg:waitress | |
[app:main] | |
use = call:myproject:main | |
[app:mysettings] | |
use = call:myproject:noop | |
a = 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
/* | |
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 |