Skip to content

Instantly share code, notes, and snippets.

View mckelvin's full-sized avatar

GitHubLeakedPAN, GitHubLeakedMyautsai mckelvin

View GitHub Profile
@mckelvin
mckelvin / day12tl.py
Created December 1, 2012 09:32
Day One to Timeline
# coding: UTF-8
import os
import sys
import glob
import json
import plistlib
import datetime
files_pattern = '/media/BackUp/Dropbox/Apps/Day One/Journal.dayone/entries/*.doentry'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! xeCJK error: "key-unknown"
!
! Sorry, but xeCJK/options does not have a key called 'CJKtextspaces'.
!
! The key 'CJKtextspaces' is being ignored.
!
! See the xeCJK documentation for further information.
!
=========================
== first train result, head100song, 60000 train sample
== 2012-12-01 17:42
=========================
1. best classifier is Classifier(Filter(4, 3, 3, 16), Quantizer(-1.11068, -0.521325, -0.0807499)) with error 0.21715 (alpha 0.641176), final error is 0.21715
TP = [0.832033, 0.975033, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
FP = [0.266333, 0.740133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
2. best classifier is Classifier(Filter(0, 0, 11, 16), Quantizer(3.44453, 3.60962, 3.72695)) with error 0.264627 (alpha 0.511029), final error is 0.21715
TP = [0.716067, 0.903467, 0.977433, 0.9974, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
%\begin{tabular}{lc}
% \songti\erhao{论文题目\quad} & \songti\xiaoer{\zjutitlec} \\ \cline{2-2}
%\end{tabular}\\
\hspace*{7.4mm}
{\songti\erhao}{论文题目}
\hspace{6mm}
\begin{minipage}[t]{95mm}
\linespread{1.1}{\songti\xiaoer\uline{\zjuttitlec}}
\end{minipage}
#!/bin/bash
#开始时间
START=\`date +%s%N\`;
#保存目录
RES\_DIR=search\_one_intro;
mkdir -p $RES_DIR
#访问一次初始化cookie
COOKIE_FILE=./current.cookie;
curl -c $COOKIE\_FILE -s "http://**/UTADB/teacher/search\_one\_intro.jsp?teacher\_id=00398"
#!/bin/bash
RESULT_FILE=result.auto
mkdir -p account
rm -f $RESULT_FILE
for eachline in \`cat emails_gen.txt\`
do
clear
#正则获取email中@前的前缀
username=\`echo $eachline|awk -F"@" '{print $1}'\`
echo $username >> $RESULT_FILE
@mckelvin
mckelvin / 703n_zhuan.md
Last active December 10, 2015 15:18
703n软件设置变砖后恢复办法

症状

没有WiFi信号,插入网线也没有反应

解决方案

  1. 接电源后狂按RESET,蓝色指示灯会变狂闪,就是进了安全模式
  2. 接网线到路由WAN口,本地网卡IP地址设置为192.168.1.xx(非1),然后网关设置192.168.1.1
  3. 开始运行telnet 192.168.1.1
  4. 把本地的openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin scp到OpenWrt的/tmp 目录
@mckelvin
mckelvin / diff_cls.patch
Created January 6, 2013 03:24
generate from `diff -u thesis/zjutthesis.cls summary/zjutthesis.cls`
--- thesis/zjutthesis.cls 2013-01-05 13:54:51.590604855 +0800
+++ summary/zjutthesis.cls 2013-01-06 11:16:41.711298465 +0800
@@ -175,21 +175,21 @@
%% http://mirror.bjtu.edu.cn/CTAN/macros/latex/contrib/titlesec/titlesec.pdf
%%%%%%%%%%%%%%%%%%%%
-%%% 1级标题,小二,黑体,居中,加粗,段前段后18磅,1.5倍行距 {
-\titleformat{\chapter}[block]{\xiaoer\heiti\filcenter\bfseries}{第\CJKnumber{\thechapter}章}{1ex}{}{}
+%%% 1级标题,四号,黑体,居中,加粗,段前段后18磅,1.5倍行距 {
+\titleformat{\chapter}[block]{\sihao\heiti\bfseries}{\CJKnumber{\thechapter}、}{1ex}{}{}
* 6f50086 - (HEAD, origin/master, master) 同步更新论文模板,添加算法环境;添加代码环境 (11 hours ago) <Unlucky>
* 76f475f - 重写三大件内容,避免出现too many math alphabets used in version normal (11 hours ago) <Unlucky>
* ed6b1e4 - add tablename (24 hours ago) <mckelvin>
* 0af2412 - Merge branch 'master' of github.com:unlucky/zjutthesis (2 days ago) <Unlucky>
|\
| * 4e0befe - add pdf link in README.md (2 days ago) <Myautsai>
* | 2126651 - 更新预览pdf (2 days ago) <Unlucky>
* | 6eb54d9 - 更新编译脚本 (2 days ago) <Unlucky>
* | 2b63ecb - 调整页边距 (2 days ago) <Unlucky>
|/
@mckelvin
mckelvin / wvdial.conf
Created January 17, 2013 12:32
/etc/wvdial.conf for MF190 + ChinaUnicom WCDMA
[Dialer Defaults]
Modem = /dev/ttyUSB2
Init1 = ATZ
Init3 = ATE0V1
Init5 = ATS0=0
Init6 = AT+CGDCONT=1,"IP","3gnet"
Init7 = AT+CFUN=1
Modem Type = USB Modem
Baud = 460800