Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#!/usr/bin/env bash | |
# https://github.com/mitsuhiko/pipsi | |
BOOTSTRAP_DIR=~/.local/venvs/__bootstrap | |
BOOTSTRAP_PKGS=$(cat <<EOF | |
virtualenv | |
EOF | |
) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
extern crate bytes; | |
extern crate futures; | |
extern crate tokio_io; | |
extern crate tokio_proto; | |
extern crate tokio_service; | |
use std::io::Result; | |
use std::error::Error; | |
use bytes::{BytesMut, BufMut}; | |
use tokio_io::{AsyncRead, AsyncWrite}; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import forecastio | |
icon_to_emoji = { | |
'clear-day': u'☀️', | |
'clear-night': u'🌙', | |
'rain': u'🌧', | |
'snow': u'❄️', |
This file contains 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
{ | |
init: function(elevators, floors) { | |
function optimizeDestinationQueue(elevator) { | |
queue = elevator.destinationQueue.sort(); | |
console.log("starting queue: " + queue); | |
queue = queue.reduce(function (a, b) { | |
console.log("a: " + a); | |
if (a.indexOf(b) !== -1) { | |
return a; | |
} |
This file contains 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
#!/bin/bash | |
# Parameters | |
socket="$1" | |
dump="/tmp/capture.pcap" | |
# Extract repetition | |
port=9876 | |
source_socket="$(dirname "${socket}")/$(basename "${socket}").orig" |
This file contains 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
from IPython.kernel.zmq.kernelapp import IPKernelApp | |
from IPython.utils.frame import extract_module_locals | |
import sys | |
# Code lifted from IPython/kernel/zmq/embed.py | |
def embed_kernel_noloop(module=None, local_ns=None, **kwargs): | |
"""Embed and start an IPython kernel in a given scope | |
returning function that can be used to pump a single event | |
Parameters |
NewerOlder