Skip to content

Instantly share code, notes, and snippets.

View alex-hofsteede's full-sized avatar

Alex Hofsteede alex-hofsteede

View GitHub Profile
#!/usr/bin/env python
import plotly
import plotly.graph_objs as go
import re
import sys
import json
import math
from clickhouse_driver import Client
from itertools import combinations
class Sparkline extends React.Component {
constructor(props) {
super(props);
console.log(props)
this.state = {
values: props.values,
width: props.width,
height: props.height,
}
}
"""
The mixpanel package allows you to easily track events and
update people properties from your python application.
The Mixpanel class is the primary class for tracking events and
sending people analytics updates.
The Consumer and BufferedConsumer classes allow callers to
customize the IO characteristics of their tracking.
"""
"""
The mixpanel package allows you to easily track events and
update people properties from your python application.
The Mixpanel class is the primary class for tracking events and
sending people analytics updates.
The Consumer and BufferedConsumer classes allow callers to
customize the IO characteristics of their tracking.
"""
"""
The mixpanel package allows you to easily track events and
update people properties from your python application.
The Mixpanel class is the primary class for tracking events and
sending people analytics updates.
The Consumer and BufferedConsumer classes allow callers to
customize the IO characteristics of their tracking.
"""
"""
The mixpanel package allows you to easily track events and
update people properties from your python application.
The Mixpanel class is the primary class for tracking events and
sending people analytics updates.
The Consumer and BufferedConsumer classes allow callers to
customize the IO characteristics of their tracking.
"""
#!/usr/bin/python
import datetime
import json
import os
import subprocess
import urllib2
"""
Sets your mac desktop background to be a recent picture of the earth from space
"""
@alex-hofsteede
alex-hofsteede / -
Last active March 11, 2016 22:44
1984 BBC PRESTEL logo
python -c 'print "\n".join(["P R E S T E L"[:13-abs(x)].rjust(13-abs(x)/2) for x in range(-12,13,4)])'
A B C 1 2 3
Z Y X 1 2 3
@alex-hofsteede
alex-hofsteede / fincore.c
Last active June 4, 2016 16:04
The simplest possible utility to determine how many pages of a file are in the page cache
#define _BSD_SOURCE
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <stdint.h>
#include <unistd.h>
/*