Skip to content

Instantly share code, notes, and snippets.

View blitzmann's full-sized avatar

Ryan Holmes blitzmann

  • STS Aviation Group
  • Florida, USA
View GitHub Profile
@fuzzysteve
fuzzysteve / Forge-Sell.py
Created August 29, 2015 17:56
A little python script to stuff memcache and redis with price data from the Forge.
from sqlalchemy import create_engine
import redis
import time
import requests
import datetime
import memcache
def RateLimited(maxPerSecond):
minInterval = 1.0 / float(maxPerSecond)
@NateEag
NateEag / progress.py
Created May 2, 2012 16:15
A way to DRY wxPython progress dialogs for background threads.
#! /usr/bin/env python
"""Tools for running threads behind a wx.ProgressDialog."""
# Standard library imports.
import sys
import threading
import time
# Third party imports.
@kgn
kgn / ZipDir.py
Created October 5, 2010 03:04
Python function to zip up a directory and preserve any symlinks and empty directories.
import os
import zipfile
def ZipDir(inputDir, outputZip):
'''Zip up a directory and preserve symlinks and empty directories'''
zipOut = zipfile.ZipFile(outputZip, 'w', compression=zipfile.ZIP_DEFLATED)
rootLen = len(os.path.dirname(inputDir))
def _ArchiveDirectory(parentDirectory):
contents = os.listdir(parentDirectory)