This article is now published on my website: Prefer Subshells for Context.
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 (~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 |
Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
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
"""This module is intended to help interactions | |
with Goodata Keboola storage. | |
It creates and performs requests and parse response back | |
to handler which called it. | |
""" | |
import json | |
import logging as log | |
import time |
- There are two and only two genders.
- Okay, then there are two and only two biological genders.
- Gender is determined solely by biology.
- Okay, it’s mostly determined by biology, right?
- Please tell me it’s determined by DNA.
- Gender can be reliably determined through visual means. After all, no man would ever wear a burka.
- Once gender is set, it never changes.
- Even if the gender can change, it will only change from the one value to the other value.
- Only one gender can be “active” at the same time.
- We’re tracking gender now, so we’ve always tracked it.
Loading
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
# see also https://github.com/wrobstory/pgshift | |
import gzip | |
from io import StringIO, BytesIO | |
from functools import wraps | |
import boto | |
from sqlalchemy import MetaData | |
from pandas import DataFrame | |
from pandas.io.sql import SQLTable, pandasSQL_builder |
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
1. Register for Microsoft account at https://signup.live.com/signup | |
2. Email verification - click link (logs you in) | |
3. Register on Azure Data Market at https://datamarket.azure.com/register | |
4. Go to: https://datamarket.azure.com/dataset/datagovuk/metofficeweatheropendata click 'Sign up' then 'agree', then 'sign up'. | |
Use Web i/f to download CSV: | |
At: https://datamarket.azure.com/dataset/explore/0f2cba12-e5cf-4c6d-83c9-83114d44387a click 'Explore', 'Three Hourly Forecast' and 'Download Excel (CSV)' | |
or by API: | |
Go to: https://datamarket.azure.com/account for account key |
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
################################################################ | |
# pronouns.py - Leonora Tindall | |
# | |
# An example of proper handling of pronoun replacement in | |
# Python, including a selection menu. This handles only | |
# singular pronouns, providing a simple .format() based | |
# interface for replacing pronouns in prose. | |
# This script is limited to English, but a similar technique | |
# should work for most languages using a similar grammar. | |
################################################################ |
OlderNewer