- generators found in Python 3.3
- event loop in the form of
asyncio
: In Python 3.4, theasyncio.coroutine
decorator was used to label a function as acting as a coroutine that was meant for use withasyncio
and its event loop. yield from
toawait
in Python 3.5
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
# inspired by https://github.com/junegunn/fzf/issues/868 | |
function __fzf_ls_files | |
git ls-tree -r --name-only HEAD 2>/dev/null; or fd --type f --hidden --follow --exclude .git | |
end | |
function __fzf_grep_last | |
set -l cmd (commandline) | |
# default complete all, and compatible with fzf `**<TAB>` | |
if str_endswith "$cmd" ' '; or test $cmd = '**' |
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
ETHBTC | |
LTCBTC | |
BNBBTC | |
NEOBTC | |
QTUMETH | |
EOSETH | |
SNTETH | |
BNTETH | |
BCCBTC | |
GASBTC |
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
package main | |
import ( | |
"io/ioutil" | |
"log" | |
"net/http" | |
) | |
func index(w http.ResponseWriter, r *http.Request) { | |
w.WriteHeader(http.StatusOK) |
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 json | |
from functools import wraps | |
import requests | |
allow_methods = [ | |
'options', | |
'head', | |
'get', | |
'post', |
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/bash | |
# macos: brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb | |
user=$1 | |
ip_or_tail=$2 | |
if echo $ip_or_tail | grep -E '\.' >/dev/null; then | |
user_host=$user@$ip_or_tail | |
else | |
user_host=$user@192.168.1.$ip_or_tail |
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 python3 | |
# Author : weaming | |
# Mail : garden.yuen@gmail.com | |
# Created : 2021-07-12 15:07:12 | |
# 解决以下几个方面的问题:色彩空间、文件压缩、EXIF 处理、水印 | |
import argparse | |
import io | |
import os | |
from PIL import Image |
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 ( | |
"fmt" | |
"log" | |
"os" | |
"sync" | |
"time" | |
) | |
var KEEP_CALLS = os.Getenv("KEEP_CALLS") != "" |
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
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"time" | |
) | |
type Duration struct { |
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
alias gcl='git clone' | |
alias gs='git status' | |
alias gd='git diff' | |
alias gdc='git diff --cached' | |
alias gl='git lg' | |
alias gps='git push -u' | |
alias gconf='vi .git/config' | |
alias gamend='git commit --amend' | |
alias gamendy='git commit --amend --no-edit' | |
alias gback='git reset --hard HEAD~' |