Skip to content

Instantly share code, notes, and snippets.

View jklymak's full-sized avatar

Jody Klymak jklymak

View GitHub Profile
@jklymak
jklymak / markdown-to-email
Last active October 31, 2018 17:48 — forked from cleverdevil/markdown-to-email
markdown-to-emailA simple script to send beautifully formatted emails that you write in Markdown. The email will have an HTML payload and a plain-text alternative, so you'll make everyone happy, including yourself.
#!/usr/bin/env python
'''
Send an multipart email with HTML and plain text alternatives. The message
should be constructed as a plain-text file of the following format:
From: Your Name <your@email.com>
To: Recipient One <recipient@to.com>
Subject: Your subject line
---
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jklymak
jklymak / writeable_mds_store.py
Last active January 30, 2017 21:45 — forked from rabernat/writeable_mds_store.py
writable MDS store for dask
class writable_mds_store:
'''
This will write each chunk to a binary file. Really only works if chunks are the k-index of the matrix
'''
def __init__(self, prefix, itern, suffix='data', dtype='>f4'):
self.prefix = prefix
self.itern = itern
self.suffix = suffix
self.dtype = dtype
self.fname = '%s.%010d.%s' % (self.prefix, self.itern, self.suffix)