$ pip install falcon
$ python3 app.py
alternatively with Gunicorn (for HTTP/1.1):
$ pip install gunicorn
$ gunicorn app:app
#!/usr/bin/env bash | |
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all |
from __future__ import division | |
from random import random | |
import numpy as np | |
import pandas as pd | |
''' | |
Use regret-matching algorithm to play Scissors-Rock-Paper. | |
''' | |
class RPS: |
#!/bin/bash | |
version=1.68.0 | |
echo "Building boost $version..." | |
set -eu | |
toolchain=$PWD/toolchain | |
if [ ! -d "$toolchain" ]; then | |
echo "Building toolchain..." |
let get_by_id id = | |
let d = Dom_html.document in | |
Js.Opt.get (d##getElementById (Js.string id)) | |
(fun () -> assert false) | |
let rec range i n = | |
if i >= n then [] else i :: range (i + 1) n | |
let base = | |
range 0 100 |
I actually found very few indications on the net to install Armadillo with OpenBLAS on Ubuntu, and I ran into problems when I tried to install the Ubuntu pre-build packages (using apt-get
). So I decided to share my experience building the whole thing from scratch, hopefully this can serve as a step-by-step through the install.
As of writing this, I'm using Ubuntu desktop 14.04 with an Intel i7 4820k Ivy-Bridge E CPU.
var net = require('net'), | |
hpack = require('./hpack'); | |
var FRAME_HEADER_LEN = 9; | |
function createSettingsFrame(ack) { | |
var flag = ack ? 0x1 : 0x0; | |
var frameHeader = new Buffer(FRAME_HEADER_LEN); | |
frameHeader.writeUInt32BE(0x0, 0); |
#C:\Sites\tm_wed\lib\omniauth\strategies\weibo.rb | |
# Updated at: 2014-09-04 | |
# Author: [email protected] | |
require 'omniauth-oauth2' | |
module OmniAuth | |
module Strategies | |
class Weibo < OmniAuth::Strategies::OAuth2 | |
Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev