Skip to content

Instantly share code, notes, and snippets.

View sirhcsenots's full-sized avatar

cc sirhcsenots

View GitHub Profile
@sirhcsenots
sirhcsenots / _INSTRUCTIONS.md
Created August 7, 2016 17:00 — forked from jiaaro/_INSTRUCTIONS.md
Using Swift libraries in Python

Using Swift libraries in Python

So... this is obviously totally, 100%, like for. real. not. supported. by. Apple. …yet?

But still... I thought it was pretty badass. And, seeing how there's already a Swift buildpack for Heroku you could move some slow code into Swift can call it as a library function. But, you know, not in production or anything. That would be silly, right?

Now, having said that, the actual Python/Swift interop may have bugs. I'll leave that as an exercise to the reader.

How to get Python code calling Swift functions:

@sirhcsenots
sirhcsenots / poem_sender.py
Created March 26, 2016 02:56
Send a short poem to someone important in your life. Poem shows up in the subject lines of the email inbox.
# Inbox Poem Sender
# Concept by Chris Stones
# welcometochrisworld.com
# March 24, 2009
#
# Fantastic gmail email code by
# http://kutuma.blogspot.com/2007/08/sending-emails-via-gmail-with-python.html
import time
import smtplib