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
jmbp:~ john$ git clone git@github.com:jwhitlock/BPZAround.me.git | |
Cloning into 'BPZAround.me'... | |
remote: Counting objects: 669, done. | |
remote: Compressing objects: 100% (299/299), done. | |
remote: Total 669 (delta 330), reused 647 (delta 318) | |
Receiving objects: 100% (669/669), 2.03 MiB | 989.00 KiB/s, done. | |
Resolving deltas: 100% (330/330), done. | |
Checking connectivity... done. | |
jmbp:~ john$ git st | |
fatal: Not a git repository (or any of the parent directories): .git |
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/env python | |
"""Gather the unknown versions from a web-platform-compat MDN import | |
This assumes that data/import_issues_by_url.csv has been generated by | |
running tools/gather_import_issues.py. | |
The output is csv data that could be redirected to a file. | |
""" | |
import csv |
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/env python | |
from __future__ import print_function | |
import csv | |
import json | |
import sys | |
if len(sys.argv) != 2: | |
print("Usage: {} import_issues_by_url.csv".format(sys.argv[0])) | |
sys.exit(0) |
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/env python | |
from __future__ import print_function | |
import csv | |
import sys | |
if len(sys.argv) != 3: | |
print("Usage: {} older_count.csv newer_count.csv".format(sys.argv[0])) | |
sys.exit(0) | |
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/env python | |
"""Print temperature data from dm0-dev | |
Based on code from: | |
http://stackoverflow.com/questions/19079143/how-to-plot-time-series-in-python | |
Besides standard library, requires matplotlib and numpy. | |
See http://www.scipy.org/install.html for install packages | |
""" | |
from __future__ import print_function |
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/env python | |
"""Generate a CSV of new slugs.""" | |
from collections import namedtuple, OrderedDict | |
from csv import writer as csv_writer | |
from hashlib import md5 as hashlib_md5 | |
from json import load as json_load | |
from string import ascii_lowercase, digits | |
from urllib import unquote_plus | |
from urlparse import urlparse |
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/python | |
import logging | |
import socket | |
import time | |
from urllib2 import urlopen, URLError, HTTPError | |
from AppKit import CWInterface | |
starttime=time.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
# heroku run --app browsercompat ./manage.py shell_plus | |
from mdn.models import FeaturePage | |
from mdn.tasks import start_crawl | |
other = [ | |
FeaturePage.STATUS_STARTING, # 0 | |
FeaturePage.STATUS_META, # 1 | |
FeaturePage.STATUS_PAGES, # 2 | |
FeaturePage.STATUS_PARSING, # 3 | |
FeaturePage.STATUS_ERROR, # 5 |
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 | |
# Replaces headers in locale files | |
# Run from the locale folder | |
for LANG in `ls` | |
do | |
# Derived from product details' language.json | |
# search-and-replace to get into bash case syntax | |
# dashes replaced with underscores | |
case $LANG in |
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/env python | |
# Convert data from a Google Analytics export | |
# In GA: Behavior -> Site Content -> All Pages | |
# Adjust time range | |
# Change Show Rows to desired content | |
# Export -> CSV | |
from __future__ import print_function, unicode_literals | |
from collections import namedtuple | |
from datetime import timedelta | |
import csv |
OlderNewer