Skip to content

Instantly share code, notes, and snippets.

View HanClinto's full-sized avatar

Clint Herron HanClinto

View GitHub Profile
@HanClinto
HanClinto / open_tunnel.sh
Last active May 15, 2023 21:06
Open a VSCode tunnel on an arm64 device
# If `code` does not exist in the local directory, then download it.
# https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-arm64
if [ ! -f code ]; then
echo "Downloading code..."
wget -q "https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-arm64" -O code.tar.gz
tar -xzf code.tar.gz
rm code.tar.gz
fi
@HanClinto
HanClinto / Response from GPT-J
Created August 11, 2021 17:58
Prompt to GPT-J 6b
A:
I can't tell you where the problem lies, but you should:
make sure you have S3-specific permissions in place for the role you are using for your S3 work, that is, (a) access and (b) full control
make sure you have S3-specific policies attached to the S3 resources in question, that is, (a) access and (b) full control
make sure you are using the correct role
make sure that the resource exists
make sure you have the right policy
import aicrowd_gym
import gym
import nle
import numpy as np
import collections
from nle import nethack as nh
def getPrintableChar(a):
non_printable_chars = ['NULL', 'START_OF_HEADING', 'START_OF_TEXT', 'END_OF_TEXT', 'END_OF_TRANSMISSION', 'ENQUIRY', 'ACKNOWLEDGE', 'BELL', 'BACKSPACE', 'HORIZONTAL_TAB', 'LINE_FEED', 'VERTICAL_TAB', 'FORM_FEED', 'CARRIAGE_RETURN', 'SHIFT_OUT', 'SHIFT_IN', 'DATA_LINK_ESCAPE', 'DEVICE_CONTROL_1', 'DEVICE_CONTROL_2', 'DEVICE_CONTROL_3', 'DEVICE_CONTROL_4', 'NEGATIVE_ACKNOWLEDGE', 'SYNCHRONOUS_IDLE', 'END_OF_TRANSMISSION_BLOCK', 'CANCEL', 'END_OF_MEDIUM', 'SUBSTITUTE', 'ESCAPE', 'FILE_SEPARATOR', 'GROUP_SEPARATOR', 'RECORD_SEPARATOR', 'UNIT_SEPARATOR']
if a < 32:
## Actions: `env._actions`
### Actions sorted by action index:
| Index | Action | ASCII | Character |
| ----- | ------ | ----- | --------- |
| 0 | CompassDirection.N | '`k`' | 107 |
| 1 | CompassDirection.E | '`l`' | 108 |
| 2 | CompassDirection.S | '`j`' | 106 |
| 3 | CompassDirection.W | '`h`' | 104 |
@HanClinto
HanClinto / highresslowmo.ipynb
Created August 6, 2020 18:49
HighResSlowMo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@HanClinto
HanClinto / ScryfallAutoTagger.ipynb
Last active October 11, 2019 19:46
Quick Jupyter notebook to auto-tag Magic card artwork from Scryfall using Resnet
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.