Skip to content

Instantly share code, notes, and snippets.

View bhavika's full-sized avatar

Bhavika Tekwani bhavika

View GitHub Profile
​Can you solve this puzzle? While not a requirement, we give priority consideration to candidates supplying a solution.
The 2010 Census puts populations of 26 largest US metro areas at 18897109, 12828837, 9461105, 6371773, 5965343, 5946800, 5582170, 5564635, 5268860, 4552402, 4335391, 4296250, 4224851, 4192887, 3439809, 3279833, 3095313, 2812896, 2783243, 2710489, 2543482, 2356285, 2226009, 2149127, 2142508, and 2134411.
Can you find a subset of these areas where a total of exactly 100,000,000 people live, assuming the census estimates are exactly right? Provide the answer and code or reasoning used.
@bhavika
bhavika / PyDataDC2016_SharedResources
Last active April 19, 2018 15:31
Code and material used in PyData DC 2016 talks
1. Using Dask for Parallel Computing in Python (http://pydata.org/dc2016/schedule/presentation/59/)
Github: https://github.com/jseabold/dask-pydata-dc-2016
2. Building Your First Data Pipelines (http://pydata.org/dc2016/schedule/presentation/10/)
Github: https://github.com/hunterowens/data-pipelines
3. Doing frequentist statistics in Python (http://pydata.org/dc2016/schedule/presentation/9/)
Github: https://github.com/gapatino/Doing-frequentist-statistics-with-Scipy
4. Machine Learning with Text in scikit-learn (http://pydata.org/dc2016/schedule/presentation/12/)
http://dask.pydata.org/en/latest/use-cases.html
Progress bars: http://distributed.readthedocs.io/en/latest/web.html
@bhavika
bhavika / netflix_in.py
Last active January 8, 2016 14:21
Comparing the US & India Netflix collections | Excel file: https://goo.gl/JZMb3C
from urllib.request import urlopen
from bs4 import BeautifulSoup as bs
import csv as csv
url = 'http://www.finder.com/in/netflix-india-vs-netflix-us-titles-list'
html = urlopen(url).read()
soup = bs(html, "lxml")
table = soup.find('table', id='tablepress-9')
@bhavika
bhavika / renameutil.bat
Last active January 8, 2016 14:22
Batch file to copy a folder to a destination and change its name to the current date
set source= source path
set destination= dest path
for /f "tokens=2 delims==" %%G in ('wmic os get localdatetime /value') do set datetime=%%G
set year=%datetime:~0,4%
set month=%datetime:~4,2%
set day=%datetime:~6,2%
set folder = "Books"
xcopy /s /i %source% %destination%_%year%-%month%-%day% /E /y
pause
@bhavika
bhavika / StackedBarGraph.cs
Last active June 26, 2021 21:41
Creating a stacked bar graph in C#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.UI;