Skip to content

Instantly share code, notes, and snippets.

Avatar
🦀
Rustacean

Garden Yuen weaming

🦀
Rustacean
View GitHub Profile
View sort by tech indicators and market value.md
名称 代码 交易平台 交易量 市值 最新价 涨跌幅 技术5分钟 技术15分钟 技术30分钟 技术每小时 技术5小时 技术每天 技术每周 技术每月 value count
Bank of America Corp Pl Pref BAC_pl 纽约 2.10K 207690000000.0 1378.18 0.38 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 8
贝莱德 BLK 纽约 113.72K 87740000000.0 569.03 0.08 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 8
直觉外科公司 ISRG 纳斯达克 296.26K 70430000000.0 605.69 -0.35 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 强力买入 8
宣伟公司 SHW 纽约 114.31K
View ctrip-crawler-example.py
#!/usr/bin/env python3
# Author : weaming
# Mail : garden.yuen@gmail.com
# Created : 2020-07-15 14:05:23
import pdb
import os
from typing import Optional
View alembic-graph
#!/usr/local/bin/python3
# Created : 2020-07-16 13:06:10
import sys
import os
from graphviz import Digraph
fmt = os.getenv('GRAPH_FMT', 'dot')
dot = Digraph(comment='alembic', format=fmt)
View patch_requests.py
import json
from functools import wraps
import requests
allow_methods = [
'options',
'head',
'get',
'post',
@weaming
weaming / install-python-with-tk-supported-via-pyenv-on-macos.sh
Last active Jun 2, 2020
Install python with tk supported via pyenv on macOS.
View install-python-with-tk-supported-via-pyenv-on-macos.sh
#!/usr/bin/bash
# https://github.com/pyenv/pyenv/issues/1375#issuecomment-524280004
# NOTE: following steps does work on my macOS 10.15.4, pyenv 1.2.18 :(
# Error example:
# ERROR: invalid Python executable: /Users/weaming/.pyenv/versions/3.8.2/bin/python3.8
# The python-build could not find proper executable of Python after successful build.
# Finally solution: download .pkg installer from https://www.python.org/downloads/release/python-382/
# it includes its own private version of Tcl/Tk 8.6. It does not use any system-supplied or third-party supplied versions of Tcl/Tk.
View elisp-in-15-min.el
(+ 1 (+ 3 4))
(setq name "weaming")
(defun hello (name) (insert "Hello, " name))
(hello "weaming")
(switch-to-buffer-other-window "*test*")
(progn
(switch-to-buffer-other-window "*test*")
(erase-buffer)
(hello "you")
@weaming
weaming / st_heap.py
Last active May 21, 2020
数据结构:堆 heap
View st_heap.py
# Created : 2020-05-22 00:14:21
# 创建和调整:https://zhuanlan.zhihu.com/p/77527032
# 插入和删除:https://www.jianshu.com/p/e0a40d6748b8
import operator
default_op = operator.ge
def heap_adjust(A, i, size, op):
@weaming
weaming / aliyun-dm-send-email.py
Last active May 16, 2020
阿里云邮件推送服务 Python 发送示例
View aliyun-dm-send-email.py
"""
https://dm.console.aliyun.com/
https://help.aliyun.com/document_detail/29444.html
https://www.jeesns.cn/article/detail/3422
https://text-compare.com/
"""
import time, datetime
import hmac
import base64
from urllib.parse import quote
View MacOS X El Capitan with Vagrant - MacOS X VM on Windows or Linux.md
@weaming
weaming / haproxy.cfg
Created May 11, 2020 — forked from cmer/haproxy.cfg
Simple, no bullshit TCP port forwarding using HAProxy
View haproxy.cfg
listen l1
bind 0.0.0.0:443
mode tcp
timeout connect 4000
timeout client 180000
timeout server 180000
server srv1 host.example.com:9443