Skip to content

Instantly share code, notes, and snippets.

View Wizmann's full-sized avatar
⚙️
不好好学习,只能。。。

Wizmann Wizmann

⚙️
不好好学习,只能。。。
View GitHub Profile
@Wizmann
Wizmann / workflowy-with-image.js
Last active June 14, 2023 13:29
workflowy-with-image.js
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://workflowy.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
@Wizmann
Wizmann / lashou_parser_multiprocessing.py
Created March 2, 2013 15:53
Python XML Parser with multiprocessing
# coding=utf-8
import sys
import xml.etree.cElementTree as cElementTree
from pyquery import PyQuery
import multiprocessing as mp
import time
reload(sys)
sys.setdefaultencoding('utf-8')
import sys
import random
from random import randint
INF = 10 ** 10
P1 = 860939810732536850
P2 = 937467793908762347

README


How to use

Paste the js code to Tampermonkey(Chrome) or Greasemonkey(Firefox). Paste the css code to Stylish, and set the matching url pattern as "https://workflowy.com/".

Open a new workflowy page, it works!

@Wizmann
Wizmann / style-0.1.6.4.min.css
Created April 25, 2014 10:46
maxiang.info/css/style-0.1.6.4.min.css
[hidden]{display:none}::-moz-selection{background:#087185;color:#fff;text-shadow:none}::selection{background:#087185;color:#fff;text-shadow:none}a:visited{color:#551a8b}b{font-weight:700}dfn{font-style:italic}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}ins{background:#ff9;color:#000;text-decoration:none}mark{background:#ff0;color:#000;font-style:italic;font-weight:700}pre,code,kbd,samp{font-family:monospace,serif;_font-family:'courier new',monospace}kbd,samp{font-size:1em}pre{word-wrap:break-word}q{quotes:none}q:before,q:after{content:none}nav ul,nav ol,list-style:none{list-style-image:none;margin:0;padding:0}img{vertical-align:middle}svg:not(:root){overflow:hidden}figure{margin:0}label{cursor:pointer}legend{*margin-left:-7px;white-space:normal}button,input[type=button],input[type=reset],input[type=submit]{*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*width:13px;*height:13px}te
@Wizmann
Wizmann / lashou_parser_single.py
Created March 2, 2013 15:50
Python XML Parser with single thread
# coding=utf-8
import sys
import xml.etree.cElementTree as cElementTree
from pyquery import PyQuery
import time
reload(sys)
sys.setdefaultencoding('utf-8')
start_time = time.time()
$(document).ready(
alert("123");
};
@Wizmann
Wizmann / compress_url.cpp
Created August 4, 2013 17:35
使用Compressed-Trie来压缩URL,要求URL相似度比较高才能有好的压缩效果。
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
using namespace std;
@Wizmann
Wizmann / POJ2482.scala
Created June 10, 2013 05:15
背熟了下次报复社会,题目来源:http://is.gd/I6ORBG, 数据来源:http://is.gd/LJiNRo
import scala.math.max
object Seg_Tree {
class node(val l: Int, val r: Int,
var lazy_val: Int = 0,
var maxi: Int = 0) {
def get_mid(): Int = (l+r)>>1
def equal(il: Int, ir: Int): Boolean = l == il && r == ir
}
class seg_tree {
@Wizmann
Wizmann / xiami_cracker.py
Last active December 16, 2015 18:21
下载虾米音乐
# coding=utf-8
import gevent
import gevent.monkey
gevent.monkey.patch_all()
import gevent.queue
import requests
import sys
import re
import os