Skip to content

Instantly share code, notes, and snippets.

Nissan Dookeran nissan

Block or report user

Report or block nissan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Baseline.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nissan
nissan / Update-All-Git-Repos.ps1
Last active Feb 13, 2020
Go thru a directory with multiple repository directories, fetch their latest remotes, pull the latest for current branch, if currently on a divergent branch, pull latest master and rebase this branch to master
View Update-All-Git-Repos.ps1
# Author: Nissan Dookeran
# Email: nissan.dookeran@gmail.com
# Date: 14-02-2020
# Purpose: Go thru a directory with multiple repository directories,
# - fetch their latest remotes
# - if on master branch pull the latest
# - if currently on a divergent branch, pull latest and rebase this branch to origin/master
$cwd = Get-Location
$fg = "DarkGreen"
$bg = "White"
@nissan
nissan / Styles.js
Last active Feb 7, 2020
styled-component base definition from Final Form website
View Styles.js
import styled, { css } from 'styled-components'
const btn = (light, dark) => css`
white-space: nowrap;
display: inline-block;
border-radius: 5px;
padding: 5px 15px;
font-size: 16px;
color: white;
&:visited {
View setup-laptop.ps1
# Author: Nissan Dookeran
# Email: nissan.dookeran@gmail.com
# Date Last Updated: 25-Feb-2020.
# Run from elevated Powershell prompt (Run as Administrator)
# Install chocolatey package manager to manage software installations from command line
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
refreshenv
# - GoogleChrome because everyone uses this browser. Can also optionally add Firefox if needed but don't really use it that often these days
choco install -y googlechrome # firefox
View hummingbird_custom_2-resnet34.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View lesson2-download-hummingbirds-raw-1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View lesson1-birds.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nissan
nissan / lesson1-birds.ipynb
Created Oct 28, 2018
Fast.ai v3 DL1 Lesson 1 using Birds dataset
View lesson1-birds.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nissan
nissan / predictions.py
Created Aug 27, 2018 — forked from lextoumbourou/predictions.py
Making predictions with a SequentialRNN model (Fast.ai)
View predictions.py
# Note: ensure you have the latest version of Torchtext by running: pip install torchtext --upgrade
rnn_model = text_data.get_model(opt_fn, 1500, bptt, emb_sz=em_sz, n_hid=nh, n_layers=nl,
dropout=0.1, dropouti=0.65, wdrop=0.5, dropoute=0.1, dropouth=0.3)
# ...
rnn_model.data.test_dl.src.sort = False
rnn_model.data.test_dl.src.sort_within_batch = False
rnn_model.data.test_dl.src.shuffle = False
@nissan
nissan / dataframe_dataset.py
Created Aug 27, 2018 — forked from lextoumbourou/dataframe_dataset.py
Torchtext dataset from DataFrame
View dataframe_dataset.py
from torchtext import data
class DataFrameDataset(data.Dataset):
def __init__(self, df, text_field, label_field, is_test=False, **kwargs):
fields = [('text', text_field), ('label', label_field)]
examples = []
for i, row in df.iterrows():
label = row.sentiment if not is_test else None
text = row.text
You can’t perform that action at this time.