Skip to content

Instantly share code, notes, and snippets.

View 1049451037's full-sized avatar
🎯
Focusing

Qingsong Lv 1049451037

🎯
Focusing
View GitHub Profile
@1049451037
1049451037 / qpush.py
Created March 3, 2019 15:50
QPush: Push Messages to Mobile Phone
import requests
class QPush:
def __init__(self, name, code):
self.name = name
self.code = code
def send(self, msg):
data = {
"name": self.name,
"code": self.code,
"sig": "",
@1049451037
1049451037 / mkdocs-chinese-search.md
Created June 25, 2018 16:00 — forked from chen206/mkdocs-chinese-search.md
mkdocs支持中文搜索
  1. 替换支持中文的lunr.min.js文件
  2. 下载 https://github.com/codepiano/lunr.js/blob/37680a339bfec3785e507bb3c07e362cae66ac26/lunr.min.js
  3. 复制到 /usr/local/Cellar/mkdocs/0.16.1_1/libexec/lib/python2.7/site-packages/mkdocs/assets/search/mkdocs/js/
  4. 修改生成索引文件的函数
  5. 找到文件 /usr/local/Cellar/mkdocs/0.16.1_1/libexec/lib/python2.7/site-packages/mkdocs/search.py
  6. 修改函数generate_search_index,在json.dumps中添加一个参数:ensure_ascii=False
    def generate_search_index(self):
        """python to json conversion"""
 page_dicts = {
#include<bits/stdc++.h>
using namespace std;
int p[10005];
int tot;
const int p1 = 55566677;
const int p2 = 1000000007;
int ha[5005];
int lt[5005];
#include<bits/stdc++.h>
using namespace std;
int a[5005];
int lt[5005];
int cnt;
int ans[5005];
int vis[5005];