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
version: '3' | |
services: | |
zookeeper: | |
image: "confluentinc/cp-zookeeper:3.0.1" | |
ports: | |
- '2181' | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
broker: |
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 math import floor, ceil, sqrt | |
p = int(input().strip()) | |
for a0 in range(p): | |
n = int(input().strip()) | |
if n == 1: | |
print('Not prime') | |
continue |
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
# Example data line: | |
# 06/01 06/01 Bestbuy.com 00009944 888-237-8289 MN -$49.26 | |
echo '06/01 06/01 Bestbuy.com 00009944 888-237-8289 MN -$49.26' \ | |
| sed 's:[0-9]\+/[0-9]\+:&,:g' \ | |
| sed 's: -\?\$[0-9]\+:,&:' |
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 datetime import date, datetime | |
from dateutil.relativedelta import relativedelta | |
from six import print_ | |
exchanges = { | |
'bitfinex': 'btcusd', | |
'bitstamp': 'btcusd', | |
'okcoin': 'btccny', | |
} |
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
#!/usr/bin/env bash | |
# Taken from Karl Runge's FAQ on x11vnc | |
# http://www.karlrunge.com/x11vnc/faq.html#faq-xinerama | |
x11vnc -safer -localhost -nopw -once -viewonly -clip 1920x1080+0+0 -display :0 |
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/sh | |
# Requirements: | |
# Install expect and make sure it's on your path | |
# sftp with working '-r' option | |
GIT_DIR=$1 | |
HOST=$2 | |
PASSWORD=$3 |
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/sh | |
# Run in the project's root | |
git ls-files | sed 's:[^/]*$::'| sed '/^$/d' | sort -u |
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/sh | |
read oldrev newrev refname | |
REPO="/my/repo.git" | |
BRANCH=`echo $refname | sed -n 's/^refs\/heads\///p'` | |
BRANCH_DIR="/etc/puppet/environments" | |
#Unset GIT_DIR and GIT_WORK_DIR so git chooses them by current directory | |
#Based on behaviour of git post-receive hook, undocumented | |
unset GIT_DIR |
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
#Print a list of URLs from sitemap.xml to stdout | |
xpath -q -e '/*/*/*/text()' sitemap.xml |
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
====================================================================== | |
FAIL: test_greaterEqual_Raises_Value (pandas.tseries.tests.test_period.TestComparisons) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/brandon/src/coins/pandas/pandas/tseries/tests/test_period.py", line 2825, in test_greaterEqual_Raises_Value | |
print(self.january1 >= 1) | |
File "/home/brandon/src/coins/pandas/pandas/util/testing.py", line 1644, in __exit__ | |
raise AssertionError("{0} not raised.".format(name)) | |
AssertionError: TypeError not raised. | |
-------------------- >> begin captured stdout << --------------------- |
NewerOlder