Skip to content

Instantly share code, notes, and snippets.

View Sourceless's full-sized avatar

Laurence Pakenham-Smith Sourceless

View GitHub Profile
@Sourceless
Sourceless / keybase.md
Created June 27, 2017 18:46
keybase.md

Keybase proof

I hereby claim:

  • I am sourceless on github.
  • I am sourceless (https://keybase.io/sourceless) on keybase.
  • I have a public key whose fingerprint is 11EB 27D5 F80E 625B C383 0AB3 3D9D D96A 0340 667C

To claim this, I am signing this object:

@Sourceless
Sourceless / bar_crawl.py
Created May 29, 2015 18:25
UoY CompSci Bar Craw 2015, Code Review
my_name = # Oh dear, this is a SyntaxError!
my_year = # Same here! And these variables are never used!
crawl = [
"Glasshouse",
"Lowther",
"Yates's",
"Parish",
"Society",
@Sourceless
Sourceless / gist:4a3f365be136a7fb9488
Created May 11, 2015 19:59
Verifying I am +sourceless on my passcard. https://onename.com/sourceless
Verifying I am +sourceless on my passcard. https://onename.com/sourceless
@Sourceless
Sourceless / gist:6686811
Last active December 23, 2015 19:59
Langwith Computer Club (LCC)

Aims:

  • Provide a first point of contact for computer science students and computer enthusiasts in Langwith college
  • Run small-scale social events based on usual group interests (video games, movies, etc.)
  • Provide an open community for members to communicate, aid one another, learn, and get feedback on their work
  • Promote excellence through self- and club-guided learning and competition
  • Firmly set Langwith's reputation as a premier CS college

Working with HackSoc:

def columns(list_of_lists):
# Assumes all lists are same length as first, or longer
columns = len(list_of_lists[0])
list_of_lists = [iter(list_) for list_ in list_of_lists]
for _ in xrange(columns):
yield [list_iter.next() for list_iter in list_of_lists]
@Sourceless
Sourceless / ohaiserv.py
Created July 24, 2013 14:05
Server for Hayashi's OHAI protocol
import BaseHTTPServer
class OhaiHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200, 'OHAI')
self.end_headers()
self.wfile.write('OHAI')
if __name__ == '__main__':
@Sourceless
Sourceless / gist:6065182
Last active December 20, 2015 03:39
Stupidly bad python function importy thing
# Disclaimer: this is terrible and bad.
# Directory structure:
# bin/
# fragman/
# __init__.py
# fragments/
# __init__.py
# some_awesome_func.py
#
#
@Sourceless
Sourceless / gist:6041235
Created July 19, 2013 18:18
Simple send-me-a-text script
from twilio.rest import TwilioRestClient
import sys
account_sid = 'my-account-sid'
auth_token = 'my-auth-token'
client = TwilioRestClient(account_sid, auth_token)
message = client.sms.messages.create(body=sys.argv[1],
to="my-number",
from_="twilio-number")
@Sourceless
Sourceless / gist:6041228
Created July 19, 2013 18:17
Simple text-me twilio script
from twilio.rest import TwilioRestClient
import sys
account_sid = 'my-account-sid'
auth_token = 'my-auth-token'
client = TwilioRestClient(account_sid, auth_token)
message = client.sms.messages.create(body=sys.argv[1],
to="my-number",
from_="twilio-number")
@Sourceless
Sourceless / gist:5875973
Created June 27, 2013 12:15
Simple Twilio API send-a-text script
from twilio.rest import TwilioRestClient
import sys
account_sid = 'your-account-sid'
auth_token = 'your-auth-token'
client = TwilioRestClient(account_sid, auth_token)
message = client.sms.messages.create(body=sys.argv[1],
to="your-number",
from_="your-twilio-number")