Skip to content

Instantly share code, notes, and snippets.

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@binga
binga / pascal_pandas.ipynb
Last active April 22, 2020 21:45
A quick way to get the bounding boxes in fastai csv format ready for bounding box regression using Pandas.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@binga
binga / train_rf.py
Last active October 26, 2015 05:46
Beat the Benchmark - 0.70022 - using only 2 variables
import pandas as pd
from sklearn.preprocessing import LabelEncoder
from sklearn.ensemble import RandomForestClassifier
train = pd.read_csv("train_FBFog7d.csv")
test = pd.read_csv("Test_L4P23N3.csv")
submission = pd.read_csv("Sample_Submission_i9bgj6r.csv")
alcohol = pd.read_csv("NewVariable_Alcohol.csv")
train = pd.merge(train, alcohol, how='inner')
@binga
binga / metrics_av.py
Created October 25, 2015 07:30
Evaluation Metric for Analytics Vidhya DHack (Python)
import pandas as pd
def diff_to_score(diff):
if diff == 0:
return 50
elif diff == 5:
return 10
elif diff == 10:
return 5