Skip to content

Instantly share code, notes, and snippets.

@jhowliu
jhowliu / HW2_Sol.tex
Last active August 29, 2015 14:21
NumericalAnalysisSolution2
\documentclass[12pt]{article}
\usepackage{amsmath}
\title{Numerical Analysis Homework 2 Solution}
\begin{document}
\begin{enumerate}
\item
\begin{enumerate}
\item Find $f(0.43)$
\begin{enumerate}
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
import serial
if __name__ == '__main__':
ser = serial.Serial(SerialPort, Baud)
line = ser.readline()
while line
line = ser.readline()
@jhowliu
jhowliu / Han.csv
Last active August 29, 2015 14:24
Data
44 -16408 904 -48 -102 100 1360791
-8 -16408 832 -43 -125 113 1360865
0 -16372 844 -35 -113 110 1360936
168 -16364 780 -15 -119 67 1361008
104 -16356 696 -35 -152 90 1361082
12 -16444 852 -27 -101 122 1361156
132 -16464 772 -23 -122 124 1361227
60 -16420 884 -54 -130 90 1361301
40 -16420 872 -45 -133 129 1361373
28 -16396 668 -9 -99 68 1361446
@jhowliu
jhowliu / tess
Created July 30, 2015 07:35
dependency
ss
@jhowliu
jhowliu / client.c
Last active October 31, 2015 12:41
Computer Networking Homework 1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define BUFFER_SIZE 512
#define SERVER_PORT 3000
@jhowliu
jhowliu / .sh
Created April 19, 2017 08:47
demo code
echo 'Bob brought the pizza to Alice.' | syntaxnet/demo.sh
2017-04-19 16:47:21.770904: W external/org_tensorflow/tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-04-19 16:47:21.770922: W external/org_tensorflow/tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-04-19 16:47:21.770928: W external/org_tensorflow/tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-04-19 16:47:21.770930: W external/org_tensorflow/tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could spee
@jhowliu
jhowliu / .profile
Created April 19, 2017 09:27
environment setup for syntaxnet with gpu
# cuda path
export LD_LIBRARY_PATH="/usr/local/cuda-8.0/lib64:/usr/local/cuda-8.0/extras/CUPTI/lib64:$LD_LIBRARY_PATH"
export CUDA_HOME="/usr/local/cuda-8.0"
export PATH="$PATH:$CUDA_HOME/bin"
export CUDNN_HOME=${CUDA_HOME}
export TF_NEED_CUDA=1
export CUDA_TOOLKIT_PATH=$CUDA_HOME
export TF_CUDA_VERSION=8.0
export TF_CUDNN_VERSION=5
export CUDNN_INSTALL_PATH=$CUDA_HOME
@jhowliu
jhowliu / app.py
Last active May 12, 2017 08:35
app
from flask import render_template, request, redirect
from app.model import get_result_with_text
from app import app
conversations = []
@app.route('/')
@app.route('/index')
def home():