Skip to content

Instantly share code, notes, and snippets.

ng6-starter@0.0.1 /home/jmoskovc/progs/libriq-fe
├─┬ browser-sync@2.18.13
│ └─┬ localtunnel@1.8.3
│ └─┬ request@2.81.0
│ └── uuid@3.1.0
├─┬ less@2.7.2
│ └─┬ request@2.83.0
│ └── uuid@3.1.0
└─┬ node-sass@4.5.3
└─┬ request@2.83.0
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/mozeq/libriq-fe.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
node_arch="node-v6.9.4-linux-x64.tar.xz"
node_url="https://nodejs.org/dist/v6.9.4/${node_arch}"
selenium_jar="selenium-standalone.jar"
selenium_standalone="selenium-standalone"
chrome_driver_arch="chromedriver_linux64.zip"
chrome_driver_url="https://chromedriver.storage.googleapis.com/2.27/${chrome_driver_arch}"
chrome_driver_dir="${HOME}/bin/selenium_drivers/chromedriver"
wget ${node_url}
blueprint_creators = (create_forward_blueprint, create_tracking_blueprint)
blueprints = [
blueprint_creator(router_list, port) for blueprint_creator in blueprint_creators
]
class Test {
public Integer bar() {
Long a = 1222222l;
Integer b = 10;
return a / b;
}
public static void main(String[] args) {
Class X {
void bigMEthod () {
return 1 + foo()
}
}
Class A extends X {
public int automorph(String word) {
int beg = 0;
int i = 1;
int to_match = 0;
for (i = 1; i < word.length(); i++) {
to_match = beg > 0 ? i - beg : 0;
if (word.charAt(to_match) == word.charAt(i)) {
if (beg == 0)
import timeit
def test1(response):
return response.split(' ', 1) if ' ' in response else (response, '')
def test2(response):
parts = response.split(' ', 1)
if len(parts) > 1:
return parts[0], parts[1]
else:
def _checked_communicate(self, request):
response = self._communicate(request)
status, msg = response.split(' ', 1) if ' ' in response else (response, "")
if status == 'success':
self._log.debug('Successful response from socket')
return msg
else:
self._log.debug('Failed response from socket')
raise RequestError('Request failed: %s' % (msg or response))