cd /tmp
# 编译环境准备&安装依赖包
apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev asciidoc xmlto git
# 克隆源码
git clone --recursive https://github.com/shadowsocks/shadowsocks-libev.git
# 开始编译
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding:utf-8 | |
import re,time | |
def get_net_info(): | |
flow1 = open('/proc/net/dev') | |
lines = flow1.read() | |
flow1.close() | |
e = re.compile('(eth.)') | |
r_re = re.compile('eth..(.*?\s)') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Graph: | |
def __init__(self): | |
self.nodes = set() | |
self.edges = defaultdict(list) | |
self.distances = {} | |
def add_node(self, value): | |
self.nodes.add(value) | |
def add_edge(self, from_node, to_node, distance): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import BaseHTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
import sys | |
import base64 | |
key = "" | |
class AuthHandler(SimpleHTTPRequestHandler): | |
''' Main class to present webpages and authentication. ''' | |
def do_HEAD(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy line by line and paste to an interactive shell | |
# Update system | |
sudo apt-get update && sudo apt-get dist-upgrade | |
# Install Java | |
sudo add-apt-repository ppa:openjdk-r/ppa | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Hierarchial Clustering. | |
The goal of gist is to show to use scikit-learn to perform agglomerative clustering when: | |
1. There is a need for a custom distance metric (like levenshtein distance) | |
2. Use the distance in sklearn's API. | |
Adapted from: sklearn's FAQ. | |
http://scikit-learn.org/stable/faq.html | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import random | |
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid=' | |
headers = { | |
'Cookie': "Replace Me With REAL COOKIE" , | |
'Pragma': 'no-cache', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% https://sikouhjw.gitee.io/2021/02/14/2021-02-14-fontset-overleaf/ | |
% https://www.overleaf.com/latex/templates/using-the-ctex-package-on-overleaf-zai-overleafping-tai-shang-shi-yong-ctex/gndvpvsmjcqx | |
% https://zhuanlan.zhihu.com/p/145429470 | |
\GetIdInfo$Id: ctex.dtx 81d4c90 2020-10-19 20:24:58 +0800 Qing Lee <sobenlee@gmail.com> $ | |
{SUSTech fonts definition (CTEX)} | |
\ProvidesExplFile{ctex-fontset-sustech.def} | |
{\ExplFileDate}{2.5.5}{\ExplFileDescription} | |
\RequirePackage{xpatch} | |
\xpatchcmd \fontspec_new_script:nn | |
{ \__fontspec_warning:nxx } |
OlderNewer