Skip to content

Instantly share code, notes, and snippets.

View hodgestar's full-sized avatar
🐢

Simon Cross hodgestar

🐢
View GitHub Profile
@hodgestar
hodgestar / np-exp-lode.py
Last active November 12, 2021 11:48
Numpy 1.21.2 np.exp breaking np.linalg.solve on CPUs with AVX512
# On a CPU with AVX512 extensions and numpy 1.21.2:
# (only tested on Ubuntu)
import numpy as np
a = np.diag([1+0j, 1])
# commenting out the line below makes everything work, with it det returns a nan.
# breakpoint()
np.exp(0)
@hodgestar
hodgestar / overview.rst
Created April 16, 2019 16:38
IndabaX 2019 Hackathon
@hodgestar
hodgestar / lve
Created March 3, 2017 12:42
Script for creating virtualenvs.
#!/bin/bash -e
#
# In .bashrc or similar do:
#
# $ source /path/to/lve
#
# Then later in a repository folder just:
#
# $ lve
#
@hodgestar
hodgestar / vumi-travis-error.txt
Last active July 25, 2016 16:49
Vumi test failures
vumi.transports.mxit.tests.test_mxit.TestMxitTransport.test_get_request_content_when_missing
===============================================================================
[ERROR]
Traceback (most recent call last):
File "/home/travis/build/praekelt/vumi/vumi/transports/mxit/tests/test_mxit.py", line 103, in test_get_request_data
req = Request(None, True)
File "/home/travis/env-pypy-4.0.1/site-packages/twisted/web/http.py", line 612, in __init__
self.transport = self.channel.transport
exceptions.AttributeError: 'NoneType' object has no attribute 'transport'
@hodgestar
hodgestar / lve
Created June 14, 2016 08:27
Simple helper that creates virtualenvs named after the current working directory
#!/bin/sh
function lve () {
if [ -n "$1" ]
then
VENV="$1"
else
VENV=`basename "$PWD"`
fi
@hodgestar
hodgestar / atom_git_plus.diff
Created September 11, 2015 14:44
Fix logging names.
diff --git a/docker-vms/vumi_metrics/config/supervisor/vumi_metrics.conf b/docker-vms/vumi_metrics/config/supervisor/vumi_metrics.conf
index 5404742..24e1017 100644
--- a/docker-vms/vumi_metrics/config/supervisor/vumi_metrics.conf
+++ b/docker-vms/vumi_metrics/config/supervisor/vumi_metrics.conf
@@ -15,8 +15,8 @@ stderr_logfile_maxbytes=10MB
stdout_logfile_maxbytes=10MB
stdout_logfile_backups=10
stderr_logfile_backups=10
-stderr_logfile=/app/graphite_metrics_collector.err
-stdout_logfile=/app/graphite_metrics_collector.log
[
{
"description": "PyConZA by the Numbers: Gustav Praekelt's lightning talk at the opening of PyConZA 2012.",
"video_mp4_url": "",
"tags": [
"pyconza",
"pyconza2012",
"python"
],
"copyright_text": "http://creativecommons.org/licenses/by/3.0/",
[
{
"description": "Multiple people's talk at PyConZA 2013",
"video_mp4_url": "",
"tags": [
"pyconza",
"pyconza2013",
"python"
],
"copyright_text": "http://creativecommons.org/licenses/by/3.0/",
@hodgestar
hodgestar / pyconza2014-pyv.json
Last active August 29, 2015 14:27
PyConZA 2014 videos for Pyvideo.org
[
{
"category": "pyconza2014",
"state": 2,
"description": "PyConZA 2014 closing remarks.",
"language": "English",
"title": "PyConZA 2014: Closing Remarks",
"tags": [
"pyconza",
"pyconza2014",
@hodgestar
hodgestar / wafer-upgrade-contenttypes.txt
Created August 14, 2015 19:16
Scary Wafer Upgrade message.
The following content types are stale and need to be deleted:
users | waferuser
Any objects related to these content types by a foreign key will also
be deleted. Are you sure you want to delete these content types?
If you're unsure, answer 'no'.
Type 'yes' to continue, or 'no' to cancel: no