Skip to content

Instantly share code, notes, and snippets.

View zlin888's full-sized avatar
🎯
Focusing

zlin888 zlin888

🎯
Focusing
View GitHub Profile
@zlin888
zlin888 / scrapy_cheatsheet.md
Last active February 22, 2024 03:06
scrapy cheatsheet

Scrapy Cheatsheet

For test

scrapy shell https://example.com/

Run

scrapy crawl spider_name

Output

scrapy crawl dapps -o data/07-07-dapps.csv
scrapy crawl dapps -t csv -o - >"data/dapp/$DATE-dapp.csv"

@zlin888
zlin888 / setup-vundle.sh
Last active February 21, 2023 00:14
vim_cheatsheet
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim +PluginInstall +qall
@zlin888
zlin888 / keybindings.json
Last active February 10, 2020 06:50
vscode-setting
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "right",
"command": "-extension.vim_right",
"when": "editorTextFocus && vim.active && !inDebugRepl"
},
{
"key": "shift+backspace",
"command": "-extension.vim_shift+backspace",
@zlin888
zlin888 / distdiff.R
Created October 4, 2019 11:39
ggplot-sail
dd1 <- c(21000, 23400, 26800)
dd2 <- c(29002, 10000, 70000)
library(viridis)
library(effsize)
library(sm)
library(magicaxis)
library(beanplot)
@zlin888
zlin888 / ubuntu_cheatsheet.md
Last active July 2, 2019 17:06
ubuntu cheatsheet

Ubuntu Cheatsheet

  • check disk space: df -H
  • transfer file from server to local: scp your_username@remotehost.edu:foobar.txt /local/dir
  • local to server: rsync -avz -e 'ssh' foobar.txt your_username@remotehost.edu:somewhere
  • find file and remove: find . -maxdepth 1 -regex './[a-z0-9]*' | xargs rm -rf
    find the folder find . -type f
    -maxdepth 1 means non-recursive
    xargs is the command that "converts" its standard input into arguments of another program, or, as they more accurately put it on the man page\
  • count word, line: wc -l -w [file]

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@zlin888
zlin888 / git_cheatsheet.md
Last active June 24, 2019 20:08
git_cheatsheet
@zlin888
zlin888 / python_progress_prompt.py
Last active June 24, 2019 20:04
Python Progress Prompt
# Print iterations progress
def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '█'):
"""
Call in a loop to create terminal progress bar
@params:
iteration - Required : current iteration (Int)
total - Required : total iterations (Int)
prefix - Optional : prefix string (Str)
suffix - Optional : suffix string (Str)
decimals - Optional : positive number of decimals in percent complete (Int)
@zlin888
zlin888 / some conferences & journal.md
Last active June 12, 2019 16:08
some conferences & journal

作者:硕鼠酱 链接:https://www.zhihu.com/question/33977252/answer/157448123 来源:知乎 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

  • Computer architecture ASPLOS, ISCA, MICRO
  • Computer networks INFOCOM, SIGCOMM, NSDI
  • High-performance computing HPDC, ICS, SC
  • Operating systems EuroSys, OSDI/SOSP, USENIX ATC
  • Programming languages PLDI, POPL