Skip to content

Instantly share code, notes, and snippets.

View buaahsh's full-sized avatar
🐶
Focusing

Shaohan Huang buaahsh

🐶
Focusing
  • Microsoft Research
  • Beijing
View GitHub Profile

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@buaahsh
buaahsh / gist:11df842c501c7138ecd62af5ae7a6115
Created February 1, 2018 01:59
Jieba windows multiprocessing
from path import Path
from multiprocessing import Pool
import argparse
import time
LINE_PER_CORE = 5000
NUM_CORE = 30
FLOOR_COUNT = 10
CEIL_COUNT = 200
@buaahsh
buaahsh / gist:3052108d3a41d1244eceee046458323f
Created April 10, 2017 08:59
UNICODE to ASCII python replace
def unicodetoascii(text):
TEXT = (text.
replace('\\xe2\\x80\\x99', "'").
replace('\\xc3\\xa9', 'e').
replace('\\xe2\\x80\\x90', '-').
replace('\\xe2\\x80\\x91', '-').
replace('\\xe2\\x80\\x92', '-').
replace('\\xe2\\x80\\x93', '-').
replace('\\xe2\\x80\\x94', '-').