Skip to content

Instantly share code, notes, and snippets.

View chrisy's full-sized avatar

Chris Luke chrisy

View GitHub Profile

Keybase proof

I hereby claim:

  • I am chrisy on github.
  • I am chrisluke (https://keybase.io/chrisluke) on keybase.
  • I have a public key whose fingerprint is 5EDF 21A3 A1AD 06EB D7FC 372F 0A7D A7DC 82D4 07F7

To claim this, I am signing this object:

@chrisy
chrisy / build-and-run-vpp-coverity.sh
Created December 7, 2016 20:24
Builds VPP in the Coverity Scan wrapper and uploads the results to the Scan service
#!/bin/sh
set -ex
token=<DELETED>
email=chrisy@flirble.org
project="fd.io VPP"
project_encoded="fd.io+VPP"
url=https://scan.coverity.com
@chrisy
chrisy / tardis.py
Created December 5, 2016 21:04
tardis
#!/usr/bin/env python
import spidev
import time
import math
speed = 1000000
bpw = 8
spi = spidev.SpiDev()
@chrisy
chrisy / proth.txt
Created April 20, 2016 14:23
Proth numbers 1..10000
3
5
9
13
17
25
33
41
49
57
def defined_range(user_input):
if 1 <= user_input <= 10000:
return True
else:
return False
print "Please give me a number between 1 and 10000 to find if it is prime "
while True:
user_input = int(raw_input('Please input your number '))
@chrisy
chrisy / is_odd.py
Last active March 14, 2022 18:16
Is a number odd and divisible by 7?
#!/usr/bin/env python
def is_odd(number):
if number % 2 == 0:
return False
else:
return True
def is_mul_seven(number):
return number % 7 == 0
@chrisy
chrisy / gist:ba89dc0811e937ccf9e1
Created January 25, 2016 13:47
looking glass output
Notice how every path is showing only the 2x prepended path from London.
Cogent:
BGP routing table entry for 207.162.200.0/24, version 3664499719
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x9A0
5580 36236 6838 6838 6838
38.122.63.2 (metric 10102021) from 154.54.66.76 (154.54.66.76)
@chrisy
chrisy / leds.py
Last active December 26, 2015 18:29
#!/usr/bin/env python
import spidev
import time
speed = 1000000
bpw = 8
spi = spidev.SpiDev()
spi.open(0,0)