Skip to content

Instantly share code, notes, and snippets.

@SteveClement
SteveClement / emoji.py
Last active August 29, 2015 14:01 — forked from lepture/emoji.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012, lepture.com
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
@SteveClement
SteveClement / update_Arduino_libraries_git.sh
Created August 11, 2014 14:02
OSX Only, goes into your Arduino libraries folder, enumerates git repos and updates them
#!/usr/bin/env bash
cd ~/Documents/Arduino/libraries/
for pkg in `find . -name .git | cut -f2 -d. |tr -d \/ |grep -v Adafruit_LED_Backpack_LibraryAdafruit-LED-Backpack-Library`; do
cd ${pkg}
git pull
cd ..
done

Keybase proof

I hereby claim:

  • I am SteveClement on github.
  • I am steveclement (https://keybase.io/steveclement) on keybase.
  • I have a public key whose fingerprint is 3F4D 8CF6 08F9 4F88 2815 2CB1 69A2 0F50 9BE4 AEE9

To claim this, I am signing this object:

@SteveClement
SteveClement / font-example.py
Created February 19, 2015 18:31
Simple font example
#!/usr/bin/env python3
import pygame, time
from pygame.locals import *
done = False
pygame.init()
pygame.font.init()
screen = pygame.display.set_mode((320,240))
@SteveClement
SteveClement / kepler.py
Created February 26, 2015 17:28
Keplers law with vpython
#Kepler's Laws.py
# plots the orbit of a planet in an eccentric orbit to illustrate
# the sweeping out of equal areas in equal times, with sun at focus
# The eccentricity of the orbit is random and determined by the initial velocity
# program uses normalised units (G =1)
# program by Peter Borcherds, University of Birmingham, England
from visual import *
@SteveClement
SteveClement / gist:c3c7f01f6bcf2b2f674f
Created March 5, 2015 17:15
Rudimentary keyboard input in pygame
events = pygame.event.get()
for event in events:
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_LEFT:
location -= 1
if event.key == pygame.K_RIGHT:
location += 1
@SteveClement
SteveClement / map.data-gares.js
Last active August 29, 2015 14:18
GPS co-ordinates of CFL Train Stations
/* map.data-gares.js - copyright 2013, C-Services Contains the station DATA for the CFL !!!!!!!! DO NOT ALTER THIS FILE !!!!!!!!*/
var gaStationInfo = {
gare8200002: {
Position: [6.086145, 49.492568],
StaticName: "Dudelange-Burange",
Name: "Dudelange-Burange",
Body: "<p>CFL - Gare de Dudelange-Burange<br>Route de Burange<br>L-3481 Dudelange</p><div>Information&#58;<br>Tel. (352) 2489 2489&#160;(6.00&#160;- 22.00)</div><div>Lost &amp; found&#58;<br>Tel. (352) 4990 5574&#160;(6.00&#160;- 21.30)</div><p>​</p>",
Url: "/espaces/voyageurs/en/gares-et-services/nos-gares/dudelange-burange",
ImageUrl: "{imageurl}"
},

A joint work between Quinn Norton and Alexandre Dulaunoy on how to interact with journalists. The presentation was given at OHM2013.

Talking to the media

You've reached out, or they've reached out to you. It could be everything from a formal request to PR to someone who sat down beside you in a bar. It could be a 30 second breaking news piece, or a book 10 years in the making. Knowing a little bit about the media can make the whole exchange more fruitful and useful not only for you and the journalist, but a public that hasn't had a lot of good information about our world.

Inform yourself

#!/usr/bin/env python
#
# Initially based on sudoku-password card
#
# This software is in the public domain
#
# python password-card.py -c 100 -p 13 -n 10
#
# Alexandre Dulaunoy (a<AT>foo.be)
<html><body>
<div id="mapdiv"></div>
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script>
map = new OpenLayers.Map("mapdiv");
map.addLayer(new OpenLayers.Layer.OSM());
var lat = 49.6056053
var lon = 6.1004009
var lonLat = new OpenLayers.LonLat( lon ,lat )