Skip to content

Instantly share code, notes, and snippets.

View smartkiwi's full-sized avatar

Vladimir Vladimirov smartkiwi

View GitHub Profile
#
# PA 4
#
# based on https://class.coursera.org/posa-001/forum/thread?thread_id=1149
# changes
# + handler run on line sent by client
# + original implementation with endopoint doesn't run on Windows without installing addiotional libs - implemented using reactor.listenTCP
# + added logging
#
#
@smartkiwi
smartkiwi / gist:5459315
Last active December 16, 2015 15:58
posa pa 3
"""
POSA PA 3 program
Echo Server
built and tested using python 2.7.2 and Twisted 12.0.0
"""
import sys
@smartkiwi
smartkiwi / suds_prevent_parsing
Created March 13, 2013 15:44
Example of using MessagePlugin to prevent suds from parsing response
import suds
__author__ = 'Volodymyr Vladymyrov: [email protected]'
__doc__ = "Example of using MessagePlugin to prevent suds from parsing response"
class PayloadInterceptor(suds.plugin.MessagePlugin):
def __init__(self, *args, **kwargs):
self.last_payload = None
#!/usr/bin/python
"""
Parses Fortran Namelists
based on Fortran Namelist parser for Python prog/scripts by Stephane Chamberland ([email protected])
http://code.google.com/p/fortran-namelist/
Updated by Volodymyr Vladymyrov (http://stackoverflow.com/users/1296661/vvladymyrov) to parse format presented
in http://stackoverflow.com/questions/14165733/regular-expression-parsing-key-value-pairs-in-namelist-input-file
added support for
1)
$NAMELIST