This is a script that analyzes Zope test summary emails and produces an HTML report.
Mutt users: pipe (|
) the email to zope-test-janitor
, enjoy output in your browser.
#!/usr/bin/python3 | |
import json | |
import os | |
import subprocess | |
import urllib.request | |
import sys | |
from operator import itemgetter | |
#!/usr/bin/python3 | |
""" | |
Show recent requests on a timeline | |
Parses a ZServer trace.log file. The format is documented at | |
https://pypi.python.org/pypi/zc.zservertracelog | |
""" | |
import json | |
import re |
#!/usr/bin/python | |
""" | |
Usage: watchpos {filename|pid fd} | |
Watches the file pointer of an opened file on Linux. Use it to provide a | |
progress bar to a command that doesn't have one, assuming the program reads | |
this file from start to end without jumping around. | |
Copyright (c) 2011 Marius Gedminas <marius@gedmin.as> |
#!/usr/bin/env python3 | |
# See http://stackoverflow.com/questions/3581031/backup-mirror-github-repositories/13917251#13917251 | |
# You can find the latest version of this script at | |
# https://gist.github.com/4319265 | |
import os | |
import sys | |
import json | |
import urllib.request | |
import subprocess |
#!/usr/bin/python | |
"""Check the MANIFEST.in file in a Python source package for completeness. | |
Here's the plan: | |
This script works by building a source distribution archive (by running | |
setup.py sdist), then checking the file list in the archive against the | |
file list in version control (Subversion, Git, Mercurial, Bazaar are | |
supported). | |
Since the first check can fail to catch missing MANIFEST.in entries when |
import signal, time, traceback, threading | |
def start(interval=0.1): | |
global _interval, _samples | |
_samples = [] | |
signal.signal(signal.SIGALRM,_sample) | |
signal.setitimer(signal.ITIMER_REAL,interval,interval) | |
def stop(): | |
global _samples |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
#------------------------------------------------------------------------------- | |
# NOTES: | |
#------------------------------------------------------------------------------- | |
# * Under the heading "CONFIG" below you'll find a number of configuration | |
# parameters that must be personalized for your GitHub account and org. | |
# Replace the `<CHANGE-ME>` strings with the value described in the comments | |
# (or overwrite those values at run-time by providing environment variables). |