Skip to content

Instantly share code, notes, and snippets.

View TauPan's full-sized avatar
🏠
Working from home

Friedrich Delgado TauPan

🏠
Working from home
View GitHub Profile
@TauPan
TauPan / transport.py
Created March 22, 2018 13:04 — forked from chrisguitarguy/transport.py
Python xmlrpc lib Transport that used Requests
# -*- coding: utf-8 -*-
"""
A replacement transport for Python xmlrpc library.
Usage:
>>> import xmlrpclib
>>> from transport import RequestsTransport
>>> s = xmlrpclib.ServerProxy('http://yoursite.com/xmlrpc', transport=RequestsTransport())
>>> s.demo.sayHello()
@TauPan
TauPan / conftest.py
Last active July 18, 2018 13:31 — forked from asfaltboy/conftest.py
A pytest fixture to test Django data migrations
# based on https://gist.github.com/asfaltboy/b3e6f9b5d95af8ba2cc46f2ba6eae5e2
# based on https://gist.github.com/blueyed/4fb0a807104551f103e6
from django.db import connection
from django.db.migrations.executor import MigrationExecutor
from django.core.management import call_command
import pytest
@TauPan
TauPan / subspam.py
Created August 18, 2016 07:26 — forked from iMilnb/subspam.py
Automatic SpamCop report validation with python mechanize
#!/usr/bin/env python2
# adapted from https://gist.github.com/iMilnb/75d65d88ce649b1f191a
import ConfigParser
import mechanize
import os
CONFIG = os.environ.get('SPAMCOP_CONFIG',
os.path.expanduser('~/secret/spamcop-config.ini'))
config = ConfigParser.SafeConfigParser()