Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
# based on https://launchpadlibrarian.net/94884626/testUtcToDst.patch | |
# from https://bugs.launchpad.net/dateutil/+bug/944123 | |
import unittest | |
from datetime import datetime, timedelta | |
import dateutil.tz | |
import dateutil.zoneinfo | |
import pytz | |
tzname = "America/Toronto" |
I was reading the gist @https://gist.github.com/2012250
I found the autovivification functionality of it pretty cool. If only I could have a parent reference...
Obviously this was not going to be a one-line tree. But that wasn't the goal
A simple variant:
from collections import defaultdict
Taken from Zach Holman's "Git and Github Secrets".
t - quickly jump through files (similar to cmd+T
in VI or Text Mate)
w - quickly switch branches
s - search
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git |
-480p - Run tenfoot in 480p rather than 1080p | |
-720p - Run tenfoot in 720p rather than 1080p | |
-accesscode - | |
-all_languages - show longest loc string from any language | |
-batterytestmode - rapidly cycle battery percentages for testing | |
-bigpicture - Start in Steam Big Picture mode | |
-blefw - | |
-cafeapplaunch - Launch apps in a cyber cafe context | |
-candidates - Show libjingle candidates for local connection as they are processed | |
-ccsyntax - Spew details about the localized strings we load |
# This is not used unless SQLALCHEMY_BINDS is not present | |
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8' | |
SQLALCHEMY_BINDS = { | |
'master': 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8', | |
'slave': 'mysql+pymysql://{username}:{password}@{hostname}/{database}?charset=utf8' | |
} |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |