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
#!/usr/bin/python3 | |
# encoding: utf-8 | |
''' | |
download Wikimedia Enterprise HTML dumps for all or for specified wiki projects | |
''' | |
import os | |
import getopt | |
import logging | |
import sys | |
import time |
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
#!/usr/bin/python3 | |
''' | |
generate a table of rev id number vs time in 1 million revision increments, | |
suitable for feeding to gnuplot to chart project growth. | |
''' | |
import getopt |
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
#!/usr/bin/python3 | |
''' | |
the most wordy python script ever. this could probably be done in 2 lines | |
of awek but I was too lazy to look up the details. | |
convert an asciicast file ([timestamp, type, text-string]) to one | |
with [time-since-last-entry, type, text-string] entries or vice versa, | |
so that an asciicast file can be converted to interval format, lines | |
removed that are mistakes or unwanted, and then converted back |
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
#!/usr/bin/python3 | |
''' | |
I needed a script to show me all the ubns in the last few days on a couple | |
projects, on demand. So, here it is. | |
''' | |
import getopt | |
import os | |
import sys | |
import json | |
import time |
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 file is maintained by puppet! | |
# modules/snapshot/templates/dumps/dumpstages.erb | |
############################################################# | |
# run these commands in order on the regular snapshot hosts | |
# slots_used numcommands on_failure error_notify command | |
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 file is maintained by puppet! | |
# modules/snapshot/templates/dumps/wikidump.conf.erb | |
############################################################# | |
[wiki] | |
dblist=/srv/mediawiki/dblists/all.dblist | |
privatelist=/srv/mediawiki/dblists/private.dblist | |
closedlist=/srv/mediawiki/dblists/closed.dblist | |
skipdblist=/etc/dumps/dblists/skip.dblist |
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
#!/usr/bin/python3 | |
''' | |
sample methods illustrating the use and innards of some | |
classes from the command_management module | |
''' | |
import fcntl | |
import select | |
import sys | |
import os | |
from dumps.commandmanagement import CommandPipeline, CommandSeries |
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 | |
usage() { | |
echo "Show which db hosts in which dc are in some group, for a given section" | |
echo | |
echo "Usage:" | |
echo "$0 section_number group" | |
echo | |
echo " section_number should be one of s1,s2,... or DEFAULT" | |
echo " this argument is required" |
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 | |
# for each host in the list, display the dump type | |
# requires sudo root on snapshot hosts (dumpsgen is not enough) | |
# fixme generate this list from someplace. it would be nicer. | |
hostnums="05 06 07 08 09 10" | |
get_dumptype() { | |
host="$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
#!/usr/bin/python3 | |
''' | |
to be used to generate a pile of images for import to deployment-prep commons | |
requires: pycairo, Pillow >= 6.0.0 | |
''' | |
import sys | |
import cairo | |
from PIL import Image | |
from PIL.PngImagePlugin import PngInfo |
NewerOlder