Skip to content

Instantly share code, notes, and snippets.

View apergos's full-sized avatar
💭
Hanging my dirty l̶a̶u̶n̶d̶r̶y̶ code out in public

Ariel T. Glenn apergos

💭
Hanging my dirty l̶a̶u̶n̶d̶r̶y̶ code out in public
View GitHub Profile
#!/usr/bin/python3
'''
recombine the multistream index file into an output
file path of your choice, for a given wiki and date
'''
import os
import re
import bz2
import getopt
import getopt
import sys
import json
import time
import types
import requests
# pylint: disable=broad-except
@apergos
apergos / emergency_refsaver.py
Created January 28, 2017 14:32
Read urls from a file, preserve their contents at archive.org, log the original and archive urls. Edit to add your contact email in user agent and remove the warning/exit.
#! /usr/bin/env python
import sys
import getopt
import requests
def usage(message=None):
'display a usage message'
if message:
sys.stderr.write(message + "\n")