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
class DefaultXConnector { | |
// ... | |
@Override | |
rx.Observable<JsonObject> getSessionWithTimeout(JsonObject jsonObject, long timeout) { | |
log.debug('Getting session with timeout {} for query: {} ({}, {})', timeout, jsonObject, this, this.eventBus) | |
return eventBus.sendWithTimeout(ServiceLocation.BUS_SESSION_SERVICE_LOCATION, jsonObject, timeout).map(body(true)) | |
} | |
public static <T> Func1<RxMessage<T>, T> body(boolean logMessage) { | |
return { RxMessage<T> message -> |
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
{ | |
"devDependencies": { | |
"connect": "~3.3.4", | |
"proxy-middleware": "~0.11.0", | |
"url": "~0.10.3", | |
"http": "0.0.0" | |
}, | |
"scripts": { | |
"start": "node server.js" | |
} |
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
@Grab('com.netflix.rxjava:rxjava-joins:0.19.6') | |
import rx.Observable | |
import rx.functions.Func1 | |
import rx.functions.Action1 | |
import java.util.concurrent.TimeUnit | |
def range = new IntRange(5, 0) | |
range.each { println it} |
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
/////////////////////////////////////////////////////////////////////////////// | |
// | |
// Simple game where the mission is the correctly estimate the passage of a | |
// small amount of time | |
// | |
// Gareth Williams // SquareDisk // All round, different | |
// | |
#include "msp430g2211.h" |
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
# This script connects to an account in your Pidgin and sends an IM message | |
# to one of your contacts. You can pass the message as the first command | |
# line argument to the script. The default message is "Poke!". Change the | |
# NAME, PROTOCOL and TO variables at the beginning of the script to your | |
# liking. Make sure the account is enabled in your Pidgin or the script | |
# will fail. | |
import dbus | |
import sys |
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
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()# abcd |
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
[defaults] | |
# suppress noisy extdiff header message | |
#cdiff = -q | |
#import = --no-commit | |
#backup = --merge | |
[hooks] | |
pretxncommit.crlf = python:hgext.win32text.forbidcrlf | |
# Prevent "hg pull" if MQ patches are applied. | |
prechangegroup.mq-no-pull = ! hg qtop > /dev/null 2>&1 |
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
def i_am_wrong(d=dict()): | |
key = "results" | |
if key not in d: | |
d[key] = list() | |
d[key].append("Hi!") | |
return d | |
print "No problems:" | |
print i_am_wrong(dict()) | |
print i_am_wrong(dict()) |
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
input { | |
stdin { | |
type => "stdin-type" | |
} | |
file { | |
type => "pylabs" | |
path => [ "/opt/qbase5/var/log/pylabslogs/*/*.log" ] | |
} |
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
"""Save at /opt/qbase5/lib/python/site-packages/pylogcapture.py""" | |
from pylabs import q | |
from nose.plugins.base import Plugin | |
from nose.util import ln, safe_str | |
class PyLogTarget(object): | |
# TODO: memory management, filtering | |
enabled = True |
OlderNewer