This file contains 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 zato.server.service import Service | |
class MyService(Service): | |
def handle(self): | |
import pymqi | |
queue_manager = 'IDM' |
This file contains 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
# stdlib | |
import gc | |
# Zato | |
from zato.common.broker_message import SERVICE | |
from zato.common.util import new_cid | |
from zato.server.base.parallel import ParallelServer | |
from zato.server.service import Integer, Service |
This file contains 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
# -*- coding: utf-8 -*- | |
# stdlib | |
from timeit import Timer | |
# Bunch | |
import bunch | |
d = {1:11, 2:22, 3:33} | |
b = bunch.Bunch(d) |
This file contains 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
# pip | |
from pip.download import unpack_file_url | |
class _DummyLink(object): | |
""" A dummy class for staying consistent with pip's API in certain places | |
below. | |
""" | |
def __init__(self, url): | |
self.url = url |
This file contains 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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <cmqc.h> /* MQI */ | |
#include <cmqcfc.h> /* PCF */ | |
#include <cmqbc.h> /* MQAI */ | |
void check_call_result(MQCHAR *, MQLONG , MQLONG ); |
This file contains 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
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, division, print_function, unicode_literals | |
# gevent | |
from gevent import sleep | |
# Zato | |
from zato.common.broker_message import SERVICE | |
from zato.common.util import new_cid |
This file contains 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
# Use it under the Python license | |
import re | |
_uncamelify_re = re.compile(r'((?<=[a-z])[A-Z]|(?<!\A)[A-Z](?=[a-z]))') | |
# Inspired by http://stackoverflow.com/a/9283563 | |
def uncamelify(s, separator='-', elem_func=unicode.lower): | |
""" Converts a CamelCaseName into a more readable one, e.g. | |
will turn ILikeToReadWSDLDocsNotReallyNOPENotMeQ into |
This file contains 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
#!/bin/bash | |
# | |
# Taken from https://gist.github.com/josephwecker/2884332 | |
# | |
CURDIR="${BASH_SOURCE[0]}";RL="readlink";([[ `uname -s`=='Darwin' ]] || RL="$RL -f") | |
while([ -h "${CURDIR}" ]) do CURDIR=`$RL "${CURDIR}"`; done | |
N="/dev/null";pushd .>$N;cd `dirname ${CURDIR}`>$N;CURDIR=`pwd`;popd>$N | |
function symlink_py { |
This file contains 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
[buildout] | |
extends=versions.cfg | |
unzip = true | |
parts = | |
cython-src | |
cython-install | |
gevent_zeromq_patched-src | |
gevent_zeromq_patched-install | |
pyyaml-src |
This file contains 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
[buildout] | |
versions=versions | |
[versions] | |
anyjson = 0.3.3 | |
apscheduler = 2.0.3 | |
argparse = 1.2.1 | |
boto = 2.6.0 | |
bunch = 1.0.1 | |
bzr = 2.5 |