Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
import email, getpass, imaplib, os | |
detach_dir = '.' # directory where to save attachments (default: current) | |
user = raw_input("Enter your GMail username:") | |
pwd = getpass.getpass("Enter your password: ") | |
# connecting to the gmail imap server | |
m = imaplib.IMAP4_SSL("imap.gmail.com") | |
m.login(user,pwd) | |
m.select("cs2043") # here you a can choose a mail box like INBOX instead |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
"use strict"; | |
//based on https://www.optimizely.com/resources/sample-size-calculator/ | |
function getSampleSize() { | |
let effect = 0.05; // Minimum Detectable Effect | |
let significance = 0.95; // Statistical Significance | |
let conversion = 0.05; // Baseline Conversion Rate | |
let c = conversion - (conversion * effect); | |
let p = Math.abs(conversion * effect); |
#List traversal | |
range(start, stop, hop) | |
range(n) # [0,1,...,n-1] | |
range(1,n) # [1,...,n-1] | |
range(1,n,2) # [1,3,5,...,n-1] if n is even, or [1,3,5,...,n-2] if n is odd | |
range(n,-1,-1) # [n,n-1,n-2,...,0] | |
range(len(arr)) # Provides indices of an array arr | |
range(len(arr)-1,-1,-1) # Provides indices of arr backwards | |
# List slicing |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.
Agree? Disagree? Feel free to let me know at @JanStette.
Keep it simple, stupid. You ain't gonna need it.