Country | ISO 3166 | Region |
---|---|---|
Afghanistan | AF | EMEA |
Åland Islands | AX | EMEA |
Albania | AL | EMEA |
Algeria | DZ | EMEA |
American Samoa | AS | APAC |
Andorra | AD | EMEA |
Angola | AO | EMEA |
Anguilla | AI | AMER |
A Pen by Madhusudan Banik on CodePen.
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
Latency Comparison Numbers | |
-------------------------- | |
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 |
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
#!flask/bin/python | |
from flask import Flask, jsonify, abort, request, make_response, url_for | |
from flask.ext.httpauth import HTTPBasicAuth | |
app = Flask(__name__, static_url_path = "") | |
auth = HTTPBasicAuth() | |
@auth.get_password | |
def get_password(username): | |
if username == 'miguel': |
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
import pymysql | |
conn = pymysql.connect(host='172.19.3.126', user='vson', passwd='VsonSql', db='ems_cache') | |
query = "" | |
cur = conn.cursor() | |
cur.execute(query) |
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
import pip | |
from subprocess import call | |
for dist in pip.get_installed_distributions(): | |
call("pip install --upgrade " + dist.project_name, shell=True) |
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
format_spec ::= [[fill]align][sign][#][0][width][,][.precision][type] | |
fill ::= <a character other than '{' or '}'> | |
align ::= "<" | ">" | "=" | "^" | |
sign ::= "+" | "-" | " " | |
width ::= integer | |
precision ::= integer | |
type ::= "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%" |
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
+-------------+----------------------------------+--------------------------+---------+ | |
| Directive | Meaning | Example | Notes | | |
+=============+==================================+==========================+=========+ | |
| %a | Weekday as locale's abbreviated | Sun, Mon, ..., Sat | (1) | | |
| | name. | (en_US);So, Mo, ..., Sa | | | |
| | | (de_DE) | | | |
+-------------+----------------------------------+--------------------------+---------+ | |
| %A | Weekday as locale's full name. | Sunday, Monday, ..., | (1) | | |
| | | Saturday | | | |
| | | (en_US);Sonntag, Montag, | | |
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
gconftool-2 --set /apps/gnome-terminal/profiles/Default/foreground_color --type string "#FEEEA2" | |
gconftool-2 --set /apps/gnome-terminal/profiles/Default/background_color --type string "#1B763F" | |
gconftool-2 --set /apps/gnome-terminal/profiles/Default/bold_color --type string "#FDAF48" |
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
#uncompress .gz file | |
gunzip -d file_name | |
# compress | |
tar -cvzf tarballname.tar.gz itemtocompress | |
#uncompress | |
gunzip filename.tar.gz | |
tar -xvf filename.tar |
NewerOlder