dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
Referenced from: /usr/local/bin/psql
Reason: image not found
[1] 32507 abort psql
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 | |
# scale_conversion.py | |
""" | |
- id 压缩方案, 用于生成标签暗码 | |
- 把id转成36进制 | |
- 4位可用 36 ** 4 = 1679616 情况 | |
- 提供36转10进制func | |
""" |
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
-- it doesn't work, don't use it | |
UPDATE | |
Table_A | |
SET | |
Table_A.col1 = Table_B.col1, | |
Table_A.col2 = Table_B.col2 | |
FROM | |
Some_Table AS Table_A | |
INNER JOIN Other_Table AS Table_B |
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
sudo sntp -sS time.apple.com |
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
# 三体广播剧第五季 | |
# pip install youtube-dl | |
# 开代理 | |
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=NlqiUhSvONI | |
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=UOaBSVZjkAo | |
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=d9YvPU9-O7o | |
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=z_M0nhLfbis | |
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=GejPJjA3CGs | |
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=StUBmm-giJU |
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
# -*- encoding: utf-8 -*- | |
""" | |
python CNlink.py 正 | |
output: | |
正直无私 | |
正始之音 | |
正大光明 | |
正己守道 |
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
INSERT INTO customers (NAME, email) | |
VALUES('Microsoft','hotline@microsoft.com') | |
ON CONFLICT ON CONSTRAINT customers_name_key | |
DO NOTHING; |
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
Port=5000 # Or 5000 | |
pypath="$PWD/miniconda3/envs/py36/bin" | |
pid=`ps ax | grep gunicorn | grep $Port | awk '{split($0,a," "); print a[1]}' | head -n 1` | |
if [ -z "$pid" ]; then | |
echo "No gunicorn deamon on port $Port" | |
else | |
kill $pid | |
echo "Killed gunicorn deamon on port $Port" | |
fi |
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: utf8 | |
import sys | |
from Crypto.Cipher import AES | |
from binascii import b2a_hex, a2b_hex | |
class prpcrypt(): | |
def __init__(self, key): | |
self.key = key | |
self.mode = AES.MODE_CBC | |
1.我们只需要 CPU 运行我们自己写的代码,尽可能少的运行别的代码。
2.协程或纤程 = 我们写的代码 + 尽可能少的程序框架的管理代码
3.线程 = 协程或纤程 + 操作系统的一小部分管理代码
4.进程 = 线程 + 操作系统的一大部分管理代码
如果这样说,你还不明白,再举个例子: