Skip to content

Instantly share code, notes, and snippets.

View davidhuser's full-sized avatar

David Huser davidhuser

  • Lucerne University of Applied Sciences
  • Switzerland
  • 05:20 (UTC +01:00)
View GitHub Profile
@davidhuser
davidhuser / XML_breaker.py
Created June 16, 2016 14:52 — forked from nicwolff/XML_breaker.py
Python script to break large XML files
import os
import sys
from xml.sax import parse
from xml.sax.saxutils import XMLGenerator
class CycleFile(object):
def __init__(self, filename):
self.basename, self.ext = os.path.splitext(filename)
self.index = 0
@davidhuser
davidhuser / log_test12.py
Created January 22, 2016 13:10 — forked from asfaltboy/log_test12.py
Test harness for the logging module. Tests BufferingSMTPHandler, an alternative implementation SMTPHandler. This fork includes credential and secure support (as implemented in newer versions of logging library). Additionaly a flood check is implemented to make sure not more than capacity per minute is sent, otherwise the capacity (buffer) is rai…
#!/usr/bin/env python
#
# Copyright 2001-2002 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permission notice appear in
# supporting documentation, and that the name of Vinay Sajip
# not be used in advertising or publicity pertaining to distribution