Skip to content

Instantly share code, notes, and snippets.

View huangrt01's full-sized avatar
💭
WFH

huangrt01

💭
WFH
View GitHub Profile
@fabienduhamel
fabienduhamel / .zshrc
Last active June 2, 2020 13:37
zsh-git-prompt with agnoster theme
# Better zsh git prompt with zsh-git-prompt
# Add it to your .zshrc after the plugins(... zsh-git-prompt ...) line
# First, it rewrites git prompt style
# Then overrides git_super_status()
# And overrides build_prompt() from agnoster (depends of what you want)
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_SEPARATOR="  "
ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg[black]%}"
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active May 16, 2025 11:19
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@karpathy
karpathy / min-char-rnn.py
Last active May 19, 2025 10:44
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)