This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Import smtplib for the actual sending function | |
import smtplib | |
import getpass | |
from email.mime.text import MIMEText | |
from random import Random | |
# Names and mail adresses of people that a part of the Wichtel ceremony |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import logging | |
import sys | |
class ShutdownHandler(logging.Handler): | |
def emit(self, record): | |
print(record.msg, file=sys.stderr) | |
logging.shutdown() | |
sys.exit(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from imaplib import IMAP4_SSL | |
import getpass | |
s = IMAP4_SSL('imap.informatik.uni-freiburg.de', '993') | |
print(s.login(getpass.getuser(), getpass.getpass())) | |
s.logout() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
class JSONConfig: | |
def __init__(self, dictionary): | |
for k, v in dictionary.items(): | |
if type(v) is dict: | |
setattr(self, k, JSONConfig(v)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Invoke with `ruby md2cre.rb filename.md` | |
# | |
# Setup: `gem install redcarpet` | |
require 'rubygems' | |
require 'redcarpet' | |
class Creole < Redcarpet::Render::Base | |
def normal_text(text) |