Skip to content

Instantly share code, notes, and snippets.

View jeasinema's full-sized avatar
💭
I may be slow to respond.

Xiaojian Ma jeasinema

💭
I may be slow to respond.
View GitHub Profile
@jeasinema
jeasinema / imagenet1000_clsidx_to_labels.txt
Created June 27, 2019 05:46 — forked from yrevar/imagenet1000_clsidx_to_labels.txt
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',
@jeasinema
jeasinema / transmission-daemon-quickstart.md
Created February 10, 2019 09:31 — forked from eriknomitch/transmission-daemon-quickstart.md
Transmission Daemon (transmission-daemon) Quickstart

Transmission Daemon (transmission-daemon) Quickstart

This should work for Debian or Debian-deriviants (e.g., Ubuntu)

Quickstart

Install transmission-daemon

sudo apt-get install transmission-daemon
@jeasinema
jeasinema / nm_l2tp_ipsec_vpn.md
Created October 3, 2018 00:13 — forked from pastleo/nm_l2tp_ipsec_vpn.md
setup L2TP IPSEC VPN in archlinux using NetworkManager

setup L2TP IPsec VPN in archlinux using NetworkManager

install networkmanager-l2tp first:

yaourt -S networkmanager-l2tp

then reboot or systemctl restart NetworkManager

@jeasinema
jeasinema / bsdgames-osx.rb
Created January 1, 2018 02:13 — forked from jdmartin/bsdgames-osx.rb
A homebrew formula for installing bsdgames-osx (updated for macOS Sierra). For now, just plunk it into /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/bsdgames-osx.rb (or, put it in ~/.homebrew/Library/Formula/ and specify this path when installing) and run "brew install bsdgames-osx". Tested successfully with MacOS X 10.12.3.
require 'formula'
class BsdgamesOsx < Formula
desc 'The classic bsdgames of yore for Mac OS X and macOS.'
homepage 'https://github.com/ctdk/bsdgames-osx'
url 'https://github.com/ctdk/bsdgames-osx/archive/bsdgames-osx-2.19.3.tar.gz'
sha256 '699bb294f2c431b9729320f73c7fcd9dcf4226216c15137bb81f7da157bed2a9'
head 'https://github.com/ctdk/bsdgames-osx.git'
version '2.19.3'
depends_on "bsdmake" => ':build'
@jeasinema
jeasinema / colorize.py
Last active June 8, 2018 03:03 — forked from jimfleming/colorize.py
A utility function for TensorFlow that maps a grayscale image to a matplotlib colormap for use with TensorBoard image summaries.
#!/usr/bin/env python
# -*- coding:UTF-8 -*-
# File Name : colorize.py
# Purpose :
# Creation Date : 21-12-2017
# Created By : Jeasine Ma [jeasinema[at]gmail[dot]com]
# ref: https://gist.github.com/jimfleming/c1adfdb0f526465c99409cc143dea97b
#include "keymap_common.h"
#include "led.h"
#include "action_layer.h"
/*
* HHKB Layout
*/
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: Default layer
* ,-----------------------------------------------------------.