Skip to content

Instantly share code, notes, and snippets.

Andrew Rowson growse

Block or report user

Report or block growse

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
View boing.py
#!/usr/bin/env python3
import pytest
def boing(mass_factor):
little_v = 0
big_v = -1
bounces = 0
@growse
growse / parp.py
Last active Apr 23, 2018
Coordinating multiple python2.7 processes, IPC and signals
View parp.py
#!/usr/bin/env python
import logging
import os
import signal
import sys
import multiprocessing
import threading
View parp.dot
{
Here -- there [type=s label=Everywhere];
};
View notwinning.java
package WINNING;
import com.amazonaws.ResetException;
import com.amazonaws.event.ProgressEvent;
import com.amazonaws.event.ProgressListener;
import com.amazonaws.services.logs.model.InvalidOperationException;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.event.S3EventNotification;
import com.amazonaws.services.s3.model.*;
import com.amazonaws.services.s3.transfer.TransferManager;
View gist:ed8da8cc62f3e44b47e4943e9e625d9a
package WINNING;
import com.amazonaws.ResetException;
import com.amazonaws.event.ProgressEvent;
import com.amazonaws.event.ProgressListener;
import com.amazonaws.services.logs.model.InvalidOperationException;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.event.S3EventNotification;
import com.amazonaws.services.s3.model.*;
import com.amazonaws.services.s3.transfer.TransferManager;
View WR01595902
IT20651 The Society's Sicilian Reserve Red 2012 £7.50 In Stock
2
UPDATE QUANTITY £15.00 DELETE
NZ8721 Greywacke Marlborough Sauvignon Blanc 2015 £14.95 In Stock
2
UPDATE QUANTITY £29.90 DELETE
RH40561 Côtes-du-Rhône, Saint Cosme 2013 £8.95 In Stock
2
View chrony_influx.sh
#!/usr/bin/env bash
TIME=$((1000000000* `date +%s`))
curl -XPOST http://storebot.growse.com:8086/write?db=main --data-binary $"chrony_systemtimeoffset,host=`hostname` value=`chronyc tracking |grep 'System time'|cut -f 2 -d ':'|sed 's/ *\([0-9\.]*\) seconds \(slow\|fast\) of NTP time/\2\1/g'|sed 's/slow/-/'|sed 's/fast//'` $TIME
chrony_frequency,host=`hostname` value=`chronyc tracking |grep 'Frequency'|cut -f 2 -d ':'|sed 's/ *\([0-9\.]*\) ppm \(slow\|fast\)/\2\1/g'|sed 's/slow/-/'|sed 's/fast//'` $TIME"
View keybase.md

Keybase proof

I hereby claim:

  • I am growse on github.
  • I am growse (https://keybase.io/growse) on keybase.
  • I have a public key whose fingerprint is 6F8A 63EE DB54 7814 15B3 F21C 7332 9B94 4E12 79FD

To claim this, I am signing this object:

@growse
growse / core-site.xml
Created Jul 18, 2014
Hadoop partition testing configuration
View core-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://mycluster</value>
</property>
<property>
<name>ha.zookeeper.quorum</name>
@growse
growse / measureping.py
Created May 7, 2014
Script to measure gateway ping and wifi strength/bitrate and pipe into graphite.
View measureping.py
#!/usr/bin/env python
import argh
import sh
import subprocess
import ping
import socket
import time
import sys
import re
You can’t perform that action at this time.