Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
buildings = [ | |
[1, 11, 5], | |
[2, 6, 7], | |
[3, 13, 9], | |
[12, 7, 16], | |
[14, 3, 25], | |
[19, 18, 22], | |
[23, 13, 29], | |
[24, 4, 28], | |
] |
''' quick example showing how to attach a pdf to multipart messages | |
and then send them from SES via boto | |
''' | |
from email.mime.text import MIMEText | |
from email.mime.application import MIMEApplication | |
from email.mime.multipart import MIMEMultipart | |
import boto |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
import sublime, sublime_plugin | |
import os, commands | |
import json, re | |
import pprint | |
""" TODO: | |
- have settings file with username/password/additional flags? | |
- options menu, per file/folder commands |
from __future__ import with_statement | |
import random | |
def create_chain(file_paths): | |
markov_chain = {} | |
word1 = "\n" | |
word2 = "\n" | |
for path in file_paths: | |
with open(path) as file: | |
for line in file: |