Skip to content

Instantly share code, notes, and snippets.

View HTLife's full-sized avatar

Jacky Liu HTLife

  • National Chung Cheng University
  • Tokyo, Japan
View GitHub Profile
import numpy as np
import os
import tensorflow as tf
#import urllib2
#from datasets import imagenet
#from nets import inception
#from preprocessing import inception_preprocessing
from PIL import Image, ImageDraw, ImageFont
@HTLife
HTLife / 樣式(適用所有卡片)
Created February 26, 2018 04:03
Anki card template
.frontbg {
background-color: #53cd80;
border-radius: 7px;
color: #fff;
position: relative;
left: 0;
}
.android .frontbg {
background-color: #eelf34;
border-radius: 7px;
@HTLife
HTLife / cnn_lstm.py
Last active March 25, 2018 13:57
MNIST CNNs + LSTM
# pytorch mnist cnn + lstm
from __future__ import print_function
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
from torch.autograd import Variable
@HTLife
HTLife / .tmux.conf
Created April 17, 2018 06:55
tmux conf
Put this at the bottom of .tmux.conf:
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
@HTLife
HTLife / install.sh
Created May 7, 2018 14:25
tmux mouse mode installation script
git clone https://github.com/nhdaly/tmux-better-mouse-mode ~/.tmux
echo 'set-option -g mouse on' >> ~/.tmux.conf
echo 'run-shell ~/.tmux/scroll_copy_mode.tmux' >> ~/.tmux.conf
tmux source-file ~/.tmux.conf
@HTLife
HTLife / ga.R
Created May 8, 2018 04:12
GA with R
#R version 3.3.2
set.seed(10)
N_size = 20
N_bit = 8
Gen = 50
mut_freq = 0.1
Population = matrix(sample(c(0,1), size=N_size*N_bit, replace=TRUE), N_size, N_bit)
[formats]
version=1.0
data\normal\priority=-1
data\normal\bold=false
data\normal\italic=false
data\normal\overline=false
data\normal\underline=false
data\normal\strikeout=false
data\normal\waveUnderline=false
data\normal\foreground=#f8f8f2
<!DOCTYPE html>
<meta charset="utf-8">
<style>
form {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
position: absolute;
left: 10px;
top: 10px;
}
@HTLife
HTLife / CMakeLists.txt
Last active August 8, 2019 05:28
LeetCode 771 execution time comparison
cmake_minimum_required(VERSION 3.14)
project(prac_closure)
set(CMAKE_CXX_STANDARD 17)
add_executable(prac_closure main.cpp)
@HTLife
HTLife / CNNLSTM.ipynb
Last active September 24, 2019 15:42
DeepVO like neural network structure example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.