Skip to content

Instantly share code, notes, and snippets.

View tzing's full-sized avatar

Tzu-Ting tzing

  • Taipei, TW
  • 18:19 (UTC +08:00)
View GitHub Profile
@Caster
Caster / script.user.js
Last active December 26, 2017 11:34
A GreaseMonkey/TamperMonkey version of the `math-with-slack` script.
// ==UserScript==
// @name MathJax on Slack
// @namespace https://github.com/fsavje/math-with-slack
// @description Renders math on Slack using MathJax. Based on github:fsavje/math-with-slack.
// @include https://*.slack.com/messages/*
// @version 1
// @grant none
// ==/UserScript==
// See: https://github.com/fsavje/math-with-slack
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active August 23, 2025 22:55
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',
@smblott-github
smblott-github / _drive
Created November 5, 2015 13:22
Rudimentary zsh completion for odeke-em/drive (a Google Drive utility)
#compdef drive drive-google
local cmnd desc
if [[ $CURRENT == 2 ]]
then
local -a options
drive |
grep '^ [a-z]' |
while read cmnd desc
do
@bgshih
bgshih / tps-demo.py
Created October 21, 2015 09:48
A simple example of Thin Plate Spline (TPS) transformation in Numpy.
import ipdb
import numpy as np
import numpy.linalg as nl
import matplotlib.pyplot as plt
from scipy.spatial.distance import pdist, cdist, squareform
def makeT(cp):
# cp: [K x 2] control points
# T: [(K+3) x (K+3)]
K = cp.shape[0]
@limingjie
limingjie / 256 colors.md
Last active April 8, 2025 08:09
256 colors in putty, tmux/screen and vim

#256 colors in putty, tmux/screen and vim There is a detailed answer on stackoverflow. If you are looking for a short one, here it is.

  • putty

    Set Connection -> Data -> Terminal-type string to xterm-256color

  • tmux

Add this line to ~/.tmux.conf