Skip to content

Instantly share code, notes, and snippets.

View nissan's full-sized avatar

Nissan Dookeran nissan

View GitHub Profile
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 February 13, 2020 23:16
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
# 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 February 7, 2020 03:58
styled-component base definition from Final Form website
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 {
@nissan
nissan / new-dotnetcore-react-ts-storybook-jest.ps1
Created June 2, 2018 22:00
Setup a new .NET Core 2.1 app for Windows with React, TypeScript, Storybook, Jest
Assumes you have the .NET SDK 2.1 for Windows already installed
#Use Chocolatey to install packages, run this script from Administrator Powershell
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
#Use nvm to manage node versions
choco install -y nvm
nvm use default
#install yarn independent of version of node being used
choco install -y yarn
refreshenv
@nissan
nissan / new-dotnetcore-react-storybook-jest-app.ps1
Created June 1, 2018 23:46
Setup a new .NET Core 2.1 app for Windows with React, Storybook, Jest
#Assumes you have the .NET SDK 2.1 for Windows already installed
#Use Chocolatey to install packages, run this script from Administrator Powershell
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
#Use nvm to manage node versions
choco install -y nvm
nvm use default
#install yarn independent of version of node being used
choco install -y yarn
refreshenv
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.
@nissan
nissan / lesson1-birds.ipynb
Created October 28, 2018 14:33
Fast.ai v3 DL1 Lesson 1 using Birds dataset
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 August 27, 2018 00:27 — forked from lextoumbourou/predictions.py
Making predictions with a SequentialRNN model (Fast.ai)
# 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