Skip to content

Instantly share code, notes, and snippets.

@clusterfudge
clusterfudge / setup-statsd-and-graphite.sh
Created March 25, 2013 23:25
Setting up statsd, graphite, and carbon from scratch on a vanilla ubuntu 12.04 LTS install in azure
#!/bin/bash
# node.js using PPA (for statsd)
sudo apt-get install python-software-properties
sudo apt-get install nodejs npm
# Install git to get statsd
sudo apt-get install git
# System level dependencies for Graphite
@clusterfudge
clusterfudge / lock.js
Created August 23, 2013 22:58
Read/write locking for javascript.... maybe? Stack overflow?
var Lock = function() {
this.readLocks = [];
this.writeLocks = [];
}
Lock.prototype.getReadLock = function(callback) {
var self = this;
if (this.writeLocks.length > 0) {
setTimeout(function() {self.getReadLock(callback);}, 5);
} else {
__author__ = "Sean Fitzgerald <sean@fitzgeralds.me>"
import math
import time
def is_narcissistic(x):
result = 0
x_str = list(str(x))
x_str.sort(reverse=True)
import argparse
import sys
import redis
import json
from multiprocessing.pool import Pool
import datetime
import time
"""
#!/usr/bin/env python
# Author: Sean Fitzgerald
# Date: 2018/2/5
import socket
import google.cloud.happybase as hb
from google.cloud import bigtable as bt
import sys
import os.path
import logging
#!/usr/bin/env python
# Author: Sean Fitzgerald
# Date: 2018/2/5
import socket
import google.cloud.happybase as hb
from google.cloud import bigtable as bt
import sys
import os.path
import logging
# Test run output
# $ python test.py
# Serializer: test_json_buffer Payload Size: 80000
# 0.0628697872162
# Serializer: test_json_stream Payload Size: 80000
# 0.0611701011658
# Serializer: test_pickle_buffer Payload Size: 90006
# 0.688886880875
# Serializer: test_pickle_stream Payload Size: 90006
# 17.879488945
@clusterfudge
clusterfudge / road-to-1.0.0.md
Last active April 11, 2021 06:20
Adapt: Road to 1.0.0

Overview

Adapt has been largely stable over the last 5 years, with the bulk of effort going into either mycroft-core, or padatious (a c++ ML-based intent parser). Given this stability, it makes sense to finally make a push for 1.0, opening the way to begin development on 2.0, without the baggage of maintaining backwards compatibility.

As part of the effort to get to 1.0, we'll have 3 major workstreams

Open PRs

There are currently 4 open PRs, languishing as far back as 2017. We should be able to complete or close these out quickly.

Open Issues

There are currently 30 open issues against Adapt. I'd like to triage these on the following dimensions

@clusterfudge
clusterfudge / main.cpp
Last active October 29, 2021 21:31
Fast FizzBuzz
// compiled with gcc main.cpp -O3
#include<stdio.h>
#include<memory.h>
const int BUFFER_SIZE = 8092 * 4;
char BUFFER[BUFFER_SIZE];
short BUFFER_INDEX = 0;
const int BIGINT_SIZE = 2048;
char BIGINT[BIGINT_SIZE];
short BIGINT_INDEX = BIGINT_SIZE - 1;