Skip to content

Instantly share code, notes, and snippets.

Matthew Wilkes MatthewWilkes

Block or report user

Report or block MatthewWilkes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Header 1

Header 2

Header 3

Header 4

italic bold bold and italic

  1. Numbered List
  2. With more items
    1. Sub lists are indented
MatthewWilkes /
Created May 8, 2019
Pyramid functional testing example
from contextlib import contextmanager
import tempfile
from unittest import mock
import factory
import pytest
from betterevidence import models
MatthewWilkes /
Created Jan 24, 2019
Extract deleted commits from a GitHub repo
import argparse
import os
import re
import subprocess
import tempfile
import requests
def get_repo(owner, repo):
MatthewWilkes /
Last active Jan 11, 2019
Utilities for examining cycle 2 experiments
from __future__ import print_function
import argparse
import json
import operator
import pprint
def sort_key(value):
player_id, payoff = value
return int(player_id)
MatthewWilkes /
Created Aug 20, 2018
A custom ZODB recovery script for ZODB
# ZODB recovery script that 'rebases' transactions onto an older copy of the same
# FileStorage. This is useful in the case where a FileStorage is lightly corrupted
# but that is not detected and it remains in production, garnering new transactions.
# The corruption in the storage may have prevented various transactions for completing
# and prevents packing or incremental backups, so backup taken before the corruption
# happened is used as a graft for the newer transactions. This only works if all
# the corruption happens to transactions covered by the backup, corruption that affects
# the transactions being appended is not recoverable in this fashion.
MatthewWilkes /
Last active Aug 9, 2018
Data update script for GU
import sys
filename = sys.argv[1]
import csv
import StringIO
import subprocess
import zipfile
data = zipfile.ZipFile(filename, mode='r')
info_file ='data/info.csv')
MatthewWilkes /
Created May 4, 2017
Django Lazy Strings in Pyramid
# Copyright (c) Django Software Foundation and individual contributors.
# All rights reserved.
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright

Keybase proof

I hereby claim:

  • I am matthewwilkes on github.
  • I am matthewwilkes ( on keybase.
  • I have a public key ASCmgrCqU3Con7qtf0OHKdzEn9VsJ1w0K2D2pSGbAzKdgAo

To claim this, I am signing this object:

View coretext-fixes.patch
diff --git a/src/qt/qtbase/src/platformsupport/fontdatabases/mac/ b/src/qt/qtbase/src/platformsupport/fontdatabases/mac/
index 0460f11..c147897 100644
--- a/src/qt/qtbase/src/platformsupport/fontdatabases/mac/
+++ b/src/qt/qtbase/src/platformsupport/fontdatabases/mac/
@@ -691,7 +691,14 @@ void QCoreTextFontEngine::recalcAdvances(QGlyphLayout *glyphs, QFontEngine::Shap
QFontEngine::FaceId QCoreTextFontEngine::faceId() const
- return QFontEngine::FaceId();
+ FaceId result;
MatthewWilkes /
Created Oct 12, 2015
Native ElasticSearch suggestion fields using Haystack
from haystack import indexes
from haystack.fields import SearchField
from haystack.backends import elasticsearch_backend
class CompletionField(SearchField):
field_type = 'completion'
# As suggested at
elasticsearch_backend.FIELD_MAPPINGS['completion'] = {
You can’t perform that action at this time.