This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Nissan Dookeran | |
# Email: nissan.dookeran@gmail.com | |
# Date Last Updated: 20-Oct-2020. | |
# Run from elevated Powershell prompt (Run as Administrator) | |
#Install Windows subsystem for Linux, upgrade to V2 | |
#reference https://docs.microsoft.com/en-us/windows/wsl/install-win10 | |
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
#will need to restart here |
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.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": ["babel-preset-env", "babel-preset-react"], | |
"env": { | |
"production": { | |
"plugins": [ | |
["emotion", { | |
"hoist": true | |
}] | |
] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |