Skip to content

Instantly share code, notes, and snippets.

View kgryte's full-sized avatar
😃
Working on stdlib...

Athan kgryte

😃
Working on stdlib...
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@msund
msund / gist:2ca48d4b1824ba58ae7e
Last active August 29, 2015 14:02
LaTeX draft
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "Untitled0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@armon
armon / facebook.py
Created May 20, 2011 07:17
Facebook interface to get posts and perform hierarchical user clustering
from collections import defaultdict
from math import sqrt
import httplib2
import json
import re
import threadpool
import threading
from PIL import Image,ImageDraw
ACCESS_TOKEN = "..."
@mikolalysenko
mikolalysenko / MERKLEIZATION.MD
Last active October 8, 2015 19:40
Merkleization - sketchy outline

Merkleization

Introduction

Distributed systems

  • Distributed systems = Computers + relativity
  • Different machines have different clocks, perception of time, and views of the state of the system
  • Challenges: Communication failures, hardware failures, latency, bandwidth
  • All computer systems today are distributed at some level (nature obeys relativity after all), the extent to which this nature is exposed depends on the loads put upon the system.
var matrix = {}
matrix.new = function (n) {
var a = new Array(n);
for (var i = 0; i < n; i++) a[i] = new Float64Array(n);
return a;
}
matrix.T = function (a, n) {
var y = matrix.new(n)

Sparky- tiny unicode sparklines

Try them in a table!

product price trend
widgets 4.37 ⠉⠉⢄⡠⠤⢄⣀⠤
@dsanson
dsanson / bibtex2markdown.rb
Created August 30, 2011 20:58
bibtex2markdown: a script for generating markdown formatted bibliographies from bibtex files using pandoc and citeproc
#!/usr/bin/env ruby
#
# This script is a wrapper around pandoc that uses pandoc's
# builtin citeproc support to generate a markdown bibliography
# from bibtex.
#
# Inspired by Jacob Barney's [bib2mkd][] script.
#
# [bib2mkd]: http://jmbarney.dyndns.org/?/linux/bib2mkd/
#
@Fil
Fil / .block
Last active November 22, 2016 19:51
Brownian Motion Constrained in Rectangle
license: gpl-3.0
border: no
scrolling: no
height: 500
@bryanhelmig
bryanhelmig / script_test.js
Last active November 24, 2016 05:15 — forked from billywhizz/script_test.js
record time spent on "each" run for nodejs or node vm module vs contextify, etc.
var vm = require('vm'),
Contextify = require('contextify'),
code = 'var square = n * n;',
fn = new Function('n', code),
script = vm.createScript(code);
n = 5;
benchmark = function(title, funk) {
var end, i, start, spins = 10000;
@vicapow
vicapow / example3-helloworld.s
Created December 31, 2016 21:38
'Hello world!' in x86_64 assembly without using any external libs.
## 'Hello world!' in x86_64 AT&T gas assembly in OS X.
## To assemble $> as -arch x86_64 example3-helloworld.s -o example3-helloworld.o
## To link: $> ld -arch x86_64 example3-helloworld.o -e _main -o example3-helloworld -lSystem
.section __TEXT,__text
.macosx_version_min 10, 12
.globl _main
_main:
movq $0x2000004, %rax # write (system call $4 with $0x2000000 offset)
movq $1, %rdi # write to stdout (fid 1)
leaq L_.str(%rip), %rsi # set the register address of the start of the string