start new:
tmux
start new with session name:
tmux new -s myname
| // by alex evans, 2011. released into the public domain. | |
| // based on a first ever reading of the png spec, it occurs to me that a minimal png encoder should be quite simple. | |
| // this is a first stab - may be buggy! the only external dependency is zlib and some basic typedefs (u32, u8) | |
| // | |
| // VERSION 0.02! now using zlib's crc rather than my own, and avoiding a memcpy and memory scribbler in the old one | |
| // by passing the zero byte at the start of the scanline to zlib first, then the original scanline in place. WIN! | |
| // | |
| // more context at http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/. | |
| // | |
| // follow me on twitter @mmalex http://twitter.com/mmalex |
| $ git branch -r --merged | | |
| grep origin | | |
| grep -v '>' | | |
| grep -v master | | |
| xargs -L1 | | |
| awk '{split($0,a,"/"); print a[2]}' | | |
| xargs git push origin --delete |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| #!/bin/python | |
| import os | |
| from flask import Flask, Response, request, abort, render_template_string, send_from_directory | |
| import Image | |
| import StringIO | |
| app = Flask(__name__) | |
| WIDTH = 1000 |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Memory-aware LRU Cache function decorator | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| A modification of the builtin ``functools.lru_cache`` decorator that takes an | |
| additional keyword argument, ``use_memory_up_to``. The cache is considered full | |
| if there are fewer than ``use_memory_up_to`` bytes of memory available. |
| package org.paulbetts.shroom.core; | |
| import android.os.AsyncTask; | |
| import com.squareup.okhttp.*; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.UnsupportedEncodingException; | |
| import java.util.Arrays; |
##VGG16 model for Keras
This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.
It has been obtained by directly converting the Caffe model provived by the authors.
Details about the network architecture can be found in the following arXiv paper:
Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman
| """ | |
| A simple FiveThirtyEight palette for Seaborn plots. | |
| """ | |
| import seaborn as sns | |
| import matplotlib.pyplot as plt | |
| five_thirty_eight = [ | |
| "#30a2da", | |
| "#fc4f30", |