Skip to content

Instantly share code, notes, and snippets.

View RyanCPeters's full-sized avatar

Ryan Peters RyanCPeters

  • Seattle, WA
View GitHub Profile
@rtulke
rtulke / markdown-to-email
Created June 12, 2018 16:32 — forked from cleverdevil/markdown-to-email
markdown-to-email A 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
---
@alexklibisz
alexklibisz / weighted_log_loss.py
Created April 11, 2017 20:30
Keras weighted log loss
def weighted_log_loss(yt, yp):
'''Log loss that weights false positives or false negatives more.
Punish the false negatives if you care about making sure all the neurons
are found and don't mind some false positives. Vice versa for punishing
the false positives. Concept taken from the UNet paper where they
weighted boundary errors to get cleaner boundaries.'''
emphasis = 'fn'
assert emphasis in ['fn', 'fp']
m = 2
@chrisjacob
chrisjacob / README.md
Created February 18, 2011 03:44
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result