a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
| #!/usr/bin/env python | |
| import sys | |
| import types | |
| import operator | |
| class Runtime: | |
| def __init__(self, env={}, stack=[]): | |
| self.env = { | |
| # Primitive words, not an impressive base but it works |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
| from datetime import datetime | |
| import redis | |
| import random | |
| import sqlite3 | |
| BROKER_HOST = "localhost" # Maps to redis host. | |
| REDIS_PASSWORD = None | |
| KEY_PREFIX = "speed_" | |
| ALPHABETE = "qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM" | |
| SQLITE_DB = ":memory:" |
| from datetime import datetime | |
| import redis | |
| import random | |
| import sqlite3 | |
| BROKER_HOST = "localhost" # Maps to redis host. | |
| REDIS_PASSWORD = None | |
| KEY_PREFIX = "speed_" | |
| ALPHABETE = "qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM" | |
| SQLITE_DB = ":memory:" |
| Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna! | |
| ([一-龯]) | |
| Regex for matching Hirgana or Katakana | |
| ([ぁ-んァ-ン]) | |
| Regex for matching Non-Hirgana or Non-Katakana | |
| ([^ぁ-んァ-ン]) | |
| Regex for matching Hirgana or Katakana or basic punctuation (、。’) |
| $ python ./cereal.py | |
| Dumping: | |
| json: 16.3266839981 | |
| simplejson: 21.8916499615 | |
| cjson: 5.22964906693 | |
| ujson: 2.02208805084 | |
| cPickle: 18.5925779343 | |
| tnetstrings: 60.592509985 | |
| tnetstring: 2.44516205788 | |
| msgpack: 21.7611129284 |
| 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 |
| import java.io.UnsupportedEncodingException; | |
| import java.security.InvalidAlgorithmParameterException; | |
| import java.security.InvalidKeyException; | |
| import java.security.Key; | |
| import java.security.KeyPair; | |
| import java.security.KeyPairGenerator; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.NoSuchProviderException; | |
| import java.security.PrivateKey; | |
| import java.security.PublicKey; |
Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.
The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html