Skip to content

Instantly share code, notes, and snippets.

View tianshanghong's full-sized avatar
🚀
We feed on negative entropy.

wwang tianshanghong

🚀
We feed on negative entropy.
View GitHub Profile
@tianshanghong
tianshanghong / gist:e4be93a4f53771b804815c3786149d98
Created April 3, 2019 19:56 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
#!/usr/bin/env python
"""
Quick script to beemind entering at least some meals into MyFitnessPal for the day.
Setup instructions:
- install myfitnesspal, requests and keyring (if you don't have them)
- call keyring.set_password("myfitnesspal", <your_username>, <your_password>)
- call keyring.set_password("beeminder", <your_username>, <your_api_key>)
@tianshanghong
tianshanghong / file-size-in-bytes.py
Created June 13, 2018 03:11 — forked from robert-claypool/file-size-in-bytes.py
File size calculation in Python
import os
print os.path.getsize("c:\\temp\\my.file") # returns the size in bytes
@tianshanghong
tianshanghong / flask-mail-qq.py
Created June 12, 2018 01:49 — forked from binderclip/flask-mail-qq.py
用 Flask-Mail 通过 QQ 邮箱发送邮件
from flask import Flask
from flask_mail import Mail, Message
app = Flask(__name__)
app.config.update(
#EMAIL SETTINGS
MAIL_SERVER='smtp.qq.com',
MAIL_PORT=465,
MAIL_USE_SSL=True,