start new:
tmux
start new with session name:
tmux new -s myname
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 |
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |
(define-abbrev-table 'greek-abbrev-table | |
'( | |
;; Greek small letters | |
("8al" "α") | |
("8be" "β") | |
("8ga" "γ") | |
("8de" "δ") | |
("8ep" "ε") | |
("8ze" "ζ") | |
("8et" "η") |
/* Example adapted from http://www.drdobbs.com/database/differential-evolution/184410166 | |
* | |
* This implements the DE/rand/1/bin optimization algorithm. | |
* | |
*/ | |
/* Initialize individuals */ | |
for (i=0; i<NP; i++) { | |
/* randomly initialize all individuals */ | |
for (j=0; j<D; j++) { |
import sys | |
import h5py | |
def main(): | |
data = read() | |
if sys.argv[1] == 'x': | |
x_slice(data) | |
elif sys.argv[1] == 'z': | |
z_slice(data) |
<?php | |
/* | |
This script exports user's starred articles via the official Inoreader API. | |
Use it in case you have thousands of starred articles since Inoreader's export function will not export much more than 1000 articles. | |
Use your Inoreader email and password to sign in. | |
You will need to create a developer application first to obtain $app_id and $app_key. Read here about this - http://www.inoreader.com/developers/register-app | |
*/ | |
$email = ""; // You Inoreader username or email | |
$password = ""; // Your Inoreader password |
Here are a few example use cases, these use cases combine filter with other parameters to make useful API queries. The syntax for any of this may change between now, implementation, and release - they're meant as illustrative examples :)
api.posts.browse({filter: "tags:[photo, video] + id:-5", limit="3"});
GET /api/posts?filter=tags%3A%5Bphoto%2Cvideo%5D%2Bid%3A-5&limit=3
#!/usr/bin/env python | |
import hashlib | |
import hmac | |
import time | |
import requests | |
import datetime | |
# Q. Do you have A Websocket API? | |
# A. Yes, and we strongly recommend you to use it. Please, check our JavaScript websocket implementation for our WebSocket API here: | |
# https://github.com/blinktrade/frontend/blob/master/jsdev/bitex/api/bitex.js |
from .models import Post, Category | |
from .decorators import action_form | |
class PostCategoryForm(forms.Form): | |
title = 'Update category for the selected posts' | |
myfile = forms.FileField() | |
category = forms.ModelChoiceField(queryset=Category.objects.all()) | |