Skip to content

Instantly share code, notes, and snippets.

View robinfang's full-sized avatar
🐌
人都麻了

robinfang robinfang

🐌
人都麻了
View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 4 columns, instead of 1 in line 8.
http://ws4.sinaimg.cn/mw600/bdae7868gy1fl7i1ov1ukj21qv18gnpd.jpg,3605327,355,http://jandan.net/pic/page-355#comment-3605327
http://wx3.sinaimg.cn/mw600/73a55ee2ly1fl8j4bonbwj21qv18gnpd.jpg,3606142,366,http://jandan.net/pic/page-366#comment-3606142
http://wx3.sinaimg.cn/mw600/006X5dgdly1fl753v9mh9j30g4092wf6.jpg,3605031,351,http://jandan.net/pic/page-351#comment-3605031
http://wx4.sinaimg.cn/mw600/8aeb3c48ly1flapf5v8caj20g4092jrs.jpg,3607860,390,http://jandan.net/pic/page-390#comment-3607860
http://wx2.sinaimg.cn/mw600/005OgovIly1fl9fv3wj9uj30k00qogm4.jpg,3606825,375,http://jandan.net/pic/page-375#comment-3606825
http://wx2.sinaimg.cn/mw600/005OgovIly1fl9fv3wj9uj30k00qogm4.jpg,3606966,376,http://jandan.net/pic/page-376#comment-3606966
http://wx2.sinaimg.cn/mw600/6308a3d3gy1fl9dyw5ic3j20g406lq3q.jpg,3606718,373,http://jandan.net/pic/page-373#comment-3606718
http://wx2.sinaimg.cn/mw600/6308a3d3gy1fl9dyw5ic3j20g406lq3q.jpg,3606737,373,http://jandan.net/pic/page-373#comment-3606737
http://wx2.sinaimg.cn/mw600/66b3
pdfunite `ls 01*` out.pdf
#pragma once
struct Node_time {
int node_id;
double trial_time;
Node_time(int i, double t): node_id(i), trial_time(t) {}
bool operator<(const Node_time &rhs) const {
return trial_time > rhs.trial_time;
}
@robinfang
robinfang / dianyingceshi.js
Created August 19, 2016 08:32
电影测试自动拿50分
function f() {
var i = 0;
var l = document.querySelectorAll('ul#collection>li');
for(let element of l) {
if(element.style["display"] === "list-item") {
element.querySelector("div.answer[value='2']").click();
i++;
break;
}
}
@robinfang
robinfang / rename.sh
Created March 10, 2016 16:48
rename .ass according to .mkv filenames
ls *.mkv |sed "s/.mkv/.ass/g" >mkv.ass.list
for file in *.ass;do read line;mv -v "${file}" "${line}";done <mkv.ass.list
import os
import sys
from Npp import notepad # import it first!
"""先安装这个完整插件才好使 http://sourceforge.net/projects/npppythonscript/files/Python%20Script%200.9.2.0/
其次需要在npp里修改为英文界面runMenuCommand才正常
此外参考http://stackoverflow.com/questions/26110973/emmet-notepad-unknown-exception
"""
filePathSrc="F:\\delme\\" # Path to the folder with files to convert
for root, dirs, files in os.walk(filePathSrc):
for fn in files:
$ for l in `cat filelist`;do cp $l `echo $l |sed 's/a/b/g'` ;done
find ./txt -type f -name '*.tmp' -exec sh -c 'mv "$0" "${0%.txt.tmp}.txt"' {} \;
(Date.parse("1970-01-02 "+($x('//*[@id="intervaltime"]/div[2]/table/tbody/tr[2]/td[17]/text()')[0].data))-Date.parse("1970-01-02 "+($x('//*[@id="intervaltime"]/div[2]/table/tbody/tr[2]/td[2]/text()')[0].data)))/60000
#coding=utf-8
import urllib2
import re
import lxml.html.soupparser as soupparser
import datetime
import time as tm
import json
import codecs
import os
import logging