Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
As explained on Don't Be Scared of git rebase, git fetch+rebase
is a better alternative to git pull
; unfortunately it's not as concise.
From now on, use git get
instead of git pull
, a custom command that does this:
# get data from remote
git fetch origin
# rebase the remote branch with the same name as local
#!/usr/bin/env python | |
# Inspired from : | |
# http://matplotlib.org/examples/pie_and_polar_charts/polar_bar_demo.html | |
''' Plot von Mises distribution as a circular bar plot. ''' | |
import numpy as np | |
import matplotlib.pyplot as pl |
#!/bin/sh | |
# | |
# Purge the CloudFlare cache after pushing an update to GitHub Pages | |
# | |
# To use, rename this file to "post-receive" and drop it into the `.git/hooks/` directory in your project's root. | |
# Change the $branch value based on the type of page you're deploying. | |
# Use "master" for Organization Pages, and "gh-pages" for Project Pages. | |
# | |
# Find your CloudFlare API token here: https://www.cloudflare.com/a/account/my-account |
Slide 3: | |
What percentage of Indians are vegetarians? | |
Why are they vegetarian? | |
Slide 4: | |
What are the things that a lacto-vegetarian can eat? | |
Slide 6: | |
What does veg lunch in New Delhi look like? |
# There are many greedy algorithms that could be used to pick a collection of sets that is close to as small as possible. Here are some that you will consider in this problem. | |
def isCovered(cover, allElems): | |
coverElems = set() | |
for s in cover: | |
coverElems.update(s) | |
return len(coverElems) == len(allElems) | |
def getAllElems(sets): | |
elems = set() |
typealias Slot Int | |
typealias Bidder Int | |
immutable BidderRoundData | |
numSlots :: Int | |
ctr :: Dict{(Bidder, Slot), Float64} | |
bids :: Vector{Float64} | |
budgets :: Vector{Float64} | |
clickThroughs :: Int | |
end |
import sys | |
import csv | |
################################################################### | |
# Handling inputs | |
################################################################### | |
def getInput(csvFileName): | |
with file(csvFileName) as f: | |
reader = csv.DictReader(f, fieldnames=['Subject', 'CollectiveNoun', 'Notes', 'Source']) |