Skip to content

Instantly share code, notes, and snippets.

@jackielii
jackielii / min-char-rnn.py
Created June 2, 2023 21:57 — forked from karpathy/min-char-rnn.py
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)
@jackielii
jackielii / 1-setup.md
Created May 6, 2022 08:55 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

@jackielii
jackielii / DefaultKeyBinding.dict
Created April 27, 2022 12:22 — forked from trusktr/DefaultKeyBinding.dict
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@jackielii
jackielii / luna_pinyin.custom.yaml
Created June 4, 2020 16:33
rime use v for english input
patch:
"recognizer/patterns/veng": "^v.*$"
"engine/segmentors/@before last": affix_segmentor@veng
veng:
tag: veng
prefix: "v"
tips: "英语输入"
curl -X PUT "localhost:9200/datenano?pretty" -H 'Content-Type: application/json' -d'
{
"mappings": {
"dynamic" : "strict",
"properties" : {
"datefield" : {
"type": "date_nanos",
"format": "strict_date_hour_minute_second_millis"
}
}
@jackielii
jackielii / tmux.conf
Created March 13, 2019 17:07 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@jackielii
jackielii / .bashrc
Created April 9, 2018 21:48 — forked from mathiasverraes/.bashrc
Git shortcuts
#! /bin/sh
alias gs="git status"
alias gc="git commit"
alias gr="git checkout"
alias ga="git add"
alias gl="git lola"
@jackielii
jackielii / .block
Last active May 23, 2022 20:32 — forked from mbostock/.block
Contour Plot
license: apache2.0
height: 673
border: no
@jackielii
jackielii / tmux-cheatsheet.markdown
Created May 23, 2016 12:18 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jackielii
jackielii / appbar-without-fixed-positioning.html
Created December 22, 2015 10:26
Appbar without fixed positioning
<!doctype html>
<html lang="en">
<head>
<style type="text/css">
.app {
display: flex;
flex-direction: column;
height: 100vh;
/* the height can be anything: e.g. 100% of parent */