I hereby claim:
- I am nhatbui on github.
- I am nbui (https://keybase.io/nbui) on keybase.
- I have a public key ASA_K8kZ1CUaGNhVEsHepSJ5_P7HW3GYD_tSkgJjPAw5gQo
To claim this, I am signing this object:
import pandas as pd | |
d = { | |
'a': ['1','1','2','2','2','3'], | |
'b': ['green', 'blue','yellow','yellow','blue','green'] | |
} | |
df = pd.DataFrame.from_dict(d) | |
df_count = pd.crosstab(df['a'], df['b']) |
class Hierarchy: | |
def __init__(self): | |
self.hierarchy = {} | |
def add_node(self, id): | |
self.hierarchy[id] = { "children": [], "parent": None } | |
def add_edge(self, from_id, to_id): | |
if from_id not in self.hierarchy: | |
self.add_node(from_id) |
Atlanta Hawks | |
Boston Celtics | |
Brooklyn Nets | |
Charlotte Hornets | |
Chicago Bulls | |
Cleveland Cavaliers | |
Dallas Mavericks | |
Denver Nuggets | |
Detroit Pistons | |
Golden State Warriors |
#!/usr/bin/python | |
import sys | |
import csv | |
import re | |
# The data in at least one of the fields (the body field) can include newline | |
# characters, and all the fields are enclosed in double quotes. Therefore, we | |
# will need to process the data file in a way other than using split(","). To do this, | |
# we have provided sample code for using the csv module of Python. Each 'line' | |
# will be a list that contains each field in sequential order. |
#!/usr/bin/python | |
import sys | |
import csv | |
import random | |
# Finds top 10 longest line[4]'s using quickselect sorted in ascending order | |
def partition(a, l, r, p, key=None): | |
pivot_value = key(a[p]) | |
temp = a[p] |
import argparse | |
import datetime | |
from TwitterAPI import TwitterAPI, TwitterOAuth, TwitterRequestError | |
twitter_handles = ['Twitter'] | |
# The seed_set is a queue containing API requests to be performed. | |
seed_set = [] | |
api_endpoint = 'statuses/user_timeline' | |
for handle in twitter_handles: |
I hereby claim:
To claim this, I am signing this object:
COMPILER=clang++ | |
CPP_FLAGS=-D ASIO_STANDALONE -std=c++11 -stdlib=libc++ | |
INCLUDES=-I/path/to/asio-1.10.6/include | |
all: client server | |
client: chat_client.cpp | |
$(COMPILER) $(CPP_FLAGS) $(INCLUDES) -o $@ $< | |
server: chat_server.cpp |
// One element of the list | |
// You should replace the "data" field | |
// with a type of your choice. | |
struct Node | |
{ | |
struct Node * next; | |
/* Replace this with the data of your choice */ | |
char * data; | |
}; |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"sync" | |
"time" | |
) |