Skip to content

Instantly share code, notes, and snippets.

View m8ttyB's full-sized avatar

Matt B m8ttyB

  • Nope
  • Earth
View GitHub Profile
Workflow:
From forked & updated repo:
create branch
Either:
-git branch litmus_11759_test_blank_search (create branch)
-git checkout litmus_11759_test_blank_search (switch to that branch)
or:
-git checkout -b litmus_11759_test_blank_search (create & switch to branch)
@m8ttyB
m8ttyB / ObjectIntrospection.py
Created December 8, 2010 04:54
Python object introspection
class InspectorGadget(object):
def __init__(self, quarrel_with):
self.__evil_antagonist = quarrel_with
def go_go_gadget_hat(self):
... deploy hat
def go_go_gadget_arms(self):
... do that crazy arm thing
@m8ttyB
m8ttyB / HelloEmailer.py
Created December 8, 2010 04:51
Emailing with Python. I’ve been in need of some Jython code that would allow me to send out emails with 1 to n files attached to the message. I puttered around my books and a few websites but couldn’t find exactly what I needed.
#!/usr/bin/env python
import smtplib, string, os
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.MIMEBase import MIMEBase
from email.Encoders import encode_base64
class Emailer():
'''Creates a simple object to interact with to send out mass emails'''