Skip to content

Instantly share code, notes, and snippets.

View haoshuai999's full-sized avatar

Shuai Hao haoshuai999

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
{"aspect": 1.0512158381751668, "dataset": [{"x": 0, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 23, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 46, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 69, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 92, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 115, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 138, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 161, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 184, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 207, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 230, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 253, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 276, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 299, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 322, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 345, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {"x": 368, "y": 0, "color": "rgba(255, 255, 255, 0.75)"}, {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@haoshuai999
haoshuai999 / match.py
Created August 1, 2019 14:57
Concatenate two CSV files
import csv
import pandas as pd
totalEnroll = pd.read_csv("Total-Enrollment.csv")
interEnroll = pd.read_csv("Inter-Enrollment.csv")
totalArray = []
for rowtotal in totalEnroll.iterrows():
for rowinter in interEnroll.iterrows():

Keybase proof

I hereby claim:

  • I am haoshuai999 on github.
  • I am haoshuai999 (https://keybase.io/haoshuai999) on keybase.
  • I have a public key ASB4u-AsC5kOyEnlicTvOyDd14y896Ya8_Yh7chLBQFZNQo

To claim this, I am signing this object:

@haoshuai999
haoshuai999 / firearms.csv
Last active April 30, 2019 02:57
Terrorism-firearms
date lethality of firearms
1970 0.7283950617283951
1971 0.3235294117647059
1972 0.5483870967741935
1973 1.1666666666666667
1974 0.8802083333333334
1975 0.7848605577689243
1976 1.2410071942446044
1977 1.2807570977917981
1978 1.7632743362831858
@haoshuai999
haoshuai999 / explosives.csv
Last active April 30, 2019 02:59
Terrorism-explorsives
date lethality of explosives
1970 0.6479289941
1971 0.1829268293
1972 1.6420664207
1973 2.2777777778
1974 3.0810810811
1975 1.5292553191
1976 1.8698795181
1977 0.615625
1978 1.9543378995
@haoshuai999
haoshuai999 / allweapons.csv
Last active April 30, 2019 02:59
Terrorism-allweapons
date lethality of all weapons
1970 0.5637480798771122
1971 0.2526539278131635
1972 1.0598591549295775
1973 1.3128964059196617
1974 1.9311531841652323
1975 1.0554054054054054
1976 1.2546045503791983
1977 0.6626231993934799
1978 1.745740498034076