This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- source: http://christopheviau.com/d3_tutorial/ --> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
</head> | |
<body> | |
<div id="viz"></div> | |
<script type="text/javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# June 11, 2013 - Github API v3 | |
# Change LOGIN in the url vvvvv | |
curl -i https://api.github.com/users/LOGIN/repos | grep '"ssh_url": ' | sed 's/.*: "\(.*\)",.*/\1/' | while read line; do git clone $line; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class RNG { | |
private seed:number; | |
constructor(seed:number) { | |
this.seed = seed; | |
} | |
private next(min:number, max:number):number { | |
max = max || 0; | |
min = min || 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Start With: Get these skills to the listed level ASAP. | |
(Gallente, Minmatar ignore the drone) | |
- Gallente Frigate III (or your racial frigate) | |
- Afterburner III | |
- High Speed Maneuvering I | |
- Propulsion Jamming I | |
- Hull Upgrades III | |
- Weapon Upgrades I |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns db.meh | |
(:use | |
[clojure.pprint] | |
[slingshot.slingshot :only [throw+ try+]]) | |
(:require | |
[clojure.set :as set] | |
[taoensso.timbre :as timbre])) | |
;; Parse | |
;; ----- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Render to SVG & Don't transform texts into path | |
%config InlineBackend.figure_formats=['svg'] | |
matplotlib.rcParams['svg.embed_char_paths'] = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
@pytest.hookimpl(hookwrapper=True) | |
def pytest_pyfunc_call(pyfuncitem): | |
1 / 0 | |
outcome = yield |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject frontend "0.1.0-SNAPSHOT" | |
:dependencies [[org.clojure/clojure "1.8.0"] | |
[ring "1.5.0"] | |
[org.clojure/clojurescript "1.8.51"] | |
[org.clojure/tools.logging "0.3.1"] | |
[shodan "0.4.2"] | |
[devcards "0.2.2"] | |
[binaryage/devtools "0.8.2"] | |
[prismatic/dommy "1.1.0"] ;; dom manipulation | |
[slingshot "0.12.2"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/singulargarden/ouroboros/blob/v0.1/ouroboros/blockchain/__init__.py | |
ZERO_HASH = '0' * 96 | |
def make_block(previous_hash, payload): | |
"""Produce a new block""" | |
previous_hash_bytes = encode(previous_hash) | |
# Generate a fingerprint of the new state: | |
# hash the fingerprint of the previous state and the payload leading to the new state. | |
hash_ = sha3(previous_hash_bytes, payload) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/singulargarden/ouroboros/blob/v0.1/ouroboros/blockchain/__init__.py | |
def prepare_block(root_path, payload): | |
# Load the current blockchain state | |
current_descr = load_descr(root_path) | |
# Create the new block attached to the current head of the chain | |
current_block_hash = current_descr.head_hash | |
new_block = make_block(current_block_hash, payload) |
OlderNewer