Skip to content

Instantly share code, notes, and snippets.

@wenboown
wenboown / MP10mini_Cura_settings.txt
Created March 24, 2020 22:06
Cura printer settings for Monoprice MP10 Mini
start G-code:
G28 ;Home
G1 Z15.0 F6000 ;Move the platform down 15mm
;Prime the extruder
G92 E0
G1 F200 E3
G92 E0
end G-code:
@wenboown
wenboown / Tmobile_bill_parser.py
Last active December 15, 2022 21:02
A simple script to parse Tmobile's monthly bill and extract billing of individual number line into an xlsx file.
'''
Bo Wen
v1: Dec 25, 2019
v2: Nov 21, 2020
v3: Jun, 2021 - updated for tmobile's new summary pdf layout
v4: Dec 2022 - check phone number exists in the summary before processing to avoid error
require:
Python3
pipenv install pdfplumber
@wenboown
wenboown / conda_setup_in_mac.txt
Created June 10, 2019 01:38
setup conda and env in mac os
brew cask install anaconda
setup path and load script in .zshrc or .bashrc
setup notebook env plug-in: conda install nb_conda_kernels (in base)
@wenboown
wenboown / .zshrc
Last active June 10, 2019 02:03
zshrc setup with conda installed by brew cask
export PATH=/usr/local/anaconda3/bin:$PATH
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/Solon/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
@wenboown
wenboown / sched in a thread
Created December 5, 2018 05:09
run sched function in a separate thread so that new event can be pushed into the queue, will quite when the queue becomes empty
import sched, time
from threading import Thread
def print_time(a='default'):
print("From print_time", time.time(), a)
s = sched.scheduler(time.time, time.sleep)
s.enterabs(time.time()+1, 0, print_time, argument=('before',))
def start():