Skip to content

Instantly share code, notes, and snippets.

View kevchentw's full-sized avatar

Kuan-Yin Chen kevchentw

  • University of Illinois Urbana-Champaign
  • Cambridge, MA
View GitHub Profile
@kevchentw
kevchentw / md
Created March 17, 2016 07:29
交通大學 OAuth 服務 - 說明文件
交通大學 OAuth 服務 - 說明文件
====================
本文件將簡單介紹如何透過交通大學OAuth服務獲取使用者帳號名稱。本平台是依據OAuth 2.0 (RFC6749)的標準開發,目前僅開放 `Authorization Code` 方式來認證。
平台網址:http://id.nctu.edu.tw/
測試開發者帳號:
- 帳號名稱: `[email protected]`
@kevchentw
kevchentw / parser.py
Last active June 12, 2016 06:14
easy parser to get data
import dateutil.parser
from datetime import timedelta
f = open("xml2csv.csv")
data = f.readlines()
time_data = []
value_data = []
speed_data = []
for line in data:
if(line[0:4]=="Time"):
@kevchentw
kevchentw / xml2csv.csv
Created June 12, 2016 05:50
Raw running data
Time 2016-05-13T00:44:52Z
LatitudeDegrees 24.7857528
LongitudeDegrees 120.9935204
AltitudeMeters 90.8000000
DistanceMeters 0.0000000
Value 106
Speed 0.0000000
RunCadence 0
Time 2016-05-13T00:44:53Z
LatitudeDegrees 24.7857525
@kevchentw
kevchentw / raw.csv
Last active June 12, 2016 06:14
parsed running data
2016-05-13 08:44:52+00:00 106 0.0 90.8
2016-05-13 08:44:53+00:00 106 0.0 91.0
2016-05-13 08:44:54+00:00 105 0.0 91.0
2016-05-13 08:44:55+00:00 104 0.0 91.0
2016-05-13 08:45:01+00:00 103 0.0 91.0
2016-05-13 08:45:02+00:00 103 0.0 91.2
2016-05-13 08:45:03+00:00 103 0.0 91.2
2016-05-13 08:45:04+00:00 102 0.0 91.2
2016-05-13 08:45:05+00:00 101 0.0 91.2
2016-05-13 08:45:06+00:00 100 0.0 91.0
@kevchentw
kevchentw / rkj-repos-virtualenv.zsh-theme
Created July 12, 2016 03:23
A oh-my-zsh theme fork of rkj-repos with virtualenv prompt
# user, host, full path, and time/date
# on two lines for easier vgrepping
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
function hg_prompt_info {
hg prompt --angle-brackets "\
<hg:%{$fg[magenta]%}<branch>%{$reset_color%}><:%{$fg[magenta]%}<bookmark>%{$reset_color%}>\
</%{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
%{$fg[red]%}<status|modified|unknown><update>%{$reset_color%}<
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
git clone https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
@kevchentw
kevchentw / junyi_guider_1.html
Last active August 11, 2016 07:12
junyi_guider_1
<div class="container-fluid">
<div id="vital-statistics" class="coach-view">
<div id="stats-nav">
<h3>
班級數據
<span id="studentlists_dropdown" style="display: inline-block;">
<div id="studentlists_menu">
<div class="container-fluid">
<div id="vital-statistics" class="coach-view">
<div id="stats-nav">
<h3>
班級數據
<span id="studentlists_dropdown" style="display: inline-block;">
<div id="studentlists_menu">
<div class="container-fluid">
<div id="vital-statistics" class="coach-view">
<div id="stats-nav">
<h3>
班級數據
<span id="studentlists_dropdown" style="display: inline-block;">
<div id="studentlists_menu">
<div class="container-fluid">
<div id="vital-statistics" class="coach-view">
<div id="stats-nav">
<h3>
班級數據
<span id="studentlists_dropdown" style="display: inline-block;">
<div id="studentlists_menu">