Keybase proof
I hereby claim:
- I am plesner on github.
- I am p5r (https://keybase.io/p5r) on keybase.
- I have a public key whose fingerprint is 6797 4944 0B13 F676 ACE2 2CAD B398 99E7 7971 5C1D
To claim this, I am signing this object:
SELECT | |
stops.stop_name | |
, stop_times.departure_time_secs / 3600 AS departure_time_hours | |
, (stop_times.departure_time_secs / 60) - ((stop_times.departure_time_secs / 3600) * 60) AS departure_time_mins | |
, trips.trip_headsign | |
, routes.route_short_name | |
, calendars.monday | |
, calendars.tuesday | |
, calendars.wednesday | |
, calendars.thursday |
def get_current_time_millis(): | |
return int(time.time() * 1000) | |
# Rate limiter that issues permits at a certain rate but only allows a certain | |
# number of permits to accumulate regardless of how long you wait. | |
class LeakyBucket(object): | |
def __init__(self, permits_per_sec, max_accumulation): | |
self.millis_per_permit = 1000.0 / permits_per_sec |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <time.h> | |
class Xorshift { | |
public: | |
Xorshift(uint32_t x, uint32_t y, uint32_t z, uint32_t w) | |
: ox_(x), oy_(y), oz_(z), ow_(w) | |
, x_(x), y_(y), z_(z), w_(w) { } |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
from gi.repository import AppIndicator3 as AppIndicator | |
from gi.repository import Gtk | |
import re | |
import signal | |
import sys | |
import threading | |
#!/bin/sh | |
# Utility for chopping a file into chunks of a certain number of lines and | |
# encoding each chunk as a qr code. For storing private keys on paper. | |
set -e | |
KEYIN=$1 | |
OUTFMT=key-%i.png | |
CHUNKSIZE=12 |
#include <fenv.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
double do_the_thing(const char *mode) { | |
float b, v; | |
int i; | |
b = 0.01; | |
// Perform a lot of operations on b to accumulate rounding. | |
for (i = 0; i < 100000; i++) |
-- Given a list of values, returns a list of the differences between | |
-- neighbouring pairs of values. | |
nextLevelDiffs (a:b:rest) = (b - a):(nextLevelDiffs (b:rest)) | |
nextLevelDiffs _ = [] | |
-- Given a list of values, returns a list of the differences such that the | |
-- first element is the 0-level differences, the second the 1-level and so | |
-- on. | |
nLevelDiffs [] = [] | |
nLevelDiffs elms = elms:(nLevelDiffs (nextLevelDiffs elms)) |
#!/bin/sh | |
set -e | |
# How often to send wake-on-lan pokes. | |
POKE_INTERVAL_SECS=60 | |
# Mac address of the machine to poke. | |
MAC_ADDR=00:25:4b:a0:65:9c |