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 asyncio | |
async def subshell(): | |
print("start sleep...") | |
process = await asyncio.create_subprocess_shell( | |
"sleep 23", | |
) | |
print("sub process create, my id {}".format(process, process.pid)) | |
await asyncio.sleep(23) |
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
// ==UserScript== | |
// @name Hide bilibili video popup | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description hide annoying pop up choices. | |
// @author laixintao | |
// @match https://www.bilibili.com/* | |
// @icon https://www.google.com/s2/favicons?domain=bilibili.com | |
// @grant GM_addStyle | |
// ==/UserScript== |
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
. | |
├── bin | |
│ ├── arch -> /bin/busybox | |
│ ├── ash -> /bin/busybox | |
│ ├── base64 -> /bin/busybox | |
│ ├── bbconfig -> /bin/busybox | |
│ ├── busybox | |
│ ├── cat -> /bin/busybox | |
│ ├── chgrp -> /bin/busybox | |
│ ├── chmod -> /bin/busybox |
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
number1| x| name | |
4x| 3| Hi | |
2| 1|808890312093 | |
5|Hi| Bye |
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
urls_to_download = ['baidu.com', 'taobao.com', 'zhihu.com', 'douban.com'] | |
done_count = 0 | |
done_count_lock = Lock() | |
def download(url): | |
requests.get(url) | |
with done_count_lock: | |
done_count += 1 | |
print(f"currnet process: {done_count} / {len(urls_to_download)}") |
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
PASS: run-backtrace-fp-core-x86_64.sh | |
PASS: run-backtrace-fp-core-aarch64.sh | |
PASS: run-backtrace-fp-core-ppc64le.sh | |
PASS: run-backtrace-core-x32.sh | |
PASS: run-backtrace-core-i386.sh | |
PASS: run-backtrace-fp-core-i386.sh | |
PASS: run-backtrace-core-ppc.sh | |
PASS: run-backtrace-core-s390x.sh | |
PASS: run-backtrace-core-s390.sh | |
PASS: run-backtrace-core-aarch64.sh |
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
def foo(num): | |
print("foo run") | |
return num ** 20 | |
def bar(x): | |
if 0: | |
print(x) | |
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 ctypes | |
def deref(addr, typ): | |
return ctypes.cast(addr, ctypes.POINTER(typ)) | |
deref(id(3), ctypes.c_int)[6] = 2 |
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
#!/usr/bin/env python | |
import sys | |
from prompt_toolkit import prompt | |
from prompt_toolkit.completion import WordCompleter | |
from prompt_toolkit.contrib.regular_languages.compiler import compile | |
from prompt_toolkit.lexers import Lexer, PygmentsLexer, SimpleLexer | |
from prompt_toolkit.contrib.regular_languages.completion import GrammarCompleter | |
from prompt_toolkit.contrib.regular_languages.lexer import GrammarLexer | |
animal_completer = WordCompleter( |
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
" ## Ussage | |
" install vim-plug( https://github.com/junegunn/vim-plug ) | |
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ | |
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
" Run: PlugInstall | |
" General settings --------------------{{{ | |
set encoding=utf-8 | |
let mapleader=',' | |
syntax enable |