I hereby claim:
- I am jykim16 on github.
- I am jykim16 (https://keybase.io/jykim16) on keybase.
- I have a public key ASBpAx60rl7suotkK81HZVQTrsyFSHDPRI8Ax5CZi3uaYgo
To claim this, I am signing this object:
| import pandas as pd | |
| df = pd.read_csv("sample_data_3.csv") | |
| df['ts'] = pd.to_datetime(df['ts']) | |
| # Consider only the rows with country_id = "BDV" (there are 844 such rows). | |
| # For each site_id, we can compute the number of unique user_id's found in these 844 rows. | |
| # Which site_id has the largest number of unique users? And what's the number? | |
| is_BDV = df['country_id']=='BDV' | |
| df_is_BDV = df[is_BDV] | |
| df_is_BDV_by_site = df_is_BDV.groupby('site_id') |
| #use: | |
| #get_product_ranking('sample_data.tsv', 1) | |
| import json | |
| from collections import defaultdict | |
| def get_product_ranking(file, rank_method=1): | |
| # Outputs most popular product(s) based on rank method | |
| # rank_method = 1 is based on the unique number of users who purchased each product | |
| # rank_method = 2 is based on the total quantity of each product sold |
| def equalsWhenOneCharRemoved(x, y): | |
| lengthDiff = len(y) - len(x) | |
| if not (lengthDiff == 1 or lengthDiff == -1): | |
| return False | |
| for pointer in range(len(x)): | |
| if x[pointer] == y[pointer]: | |
| continue | |
| else: | |
| if x[pointer:] == y[pointer+1:]: | |
| return True |
I hereby claim:
To claim this, I am signing this object:
| Delete untracked files | |
| git clean -fd <FILE_OR_FOLDER> |
| Intro to svg elements (1 - 6) | |
| Making graphs W svg (22-24) | |
| Now d3 (56-57) | |
| -javascript svgs | |
| -Method chaining | |
| Meat of d3 (next tab) | |
| -data binding(.select,.data) |
| Add aliases for git | |
| https://githowto.com/aliases | |
| vi ~/.gitconfig | |
| paste | |
| ` | |
| [alias] | |
| co = checkout | |
| ci = commit | |
| st = status |
I hereby claim:
To claim this, I am signing this object:
Download the following repositories and run yarn install in each: