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
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
====================================================================== | |
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 << --------------------- |
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
Invoked with : | |
--ncalls: 5 | |
--repeats: 5 | |
------------------------------------------------------------------------------- | |
Test name | head[ms] | base[ms] | ratio | | |
------------------------------------------------------------------------------- | |
period_setitem | 8.4562 | 9.3834 | 0.9012 | |
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
Invoked with : | |
--ncalls: 5 | |
--repeats: 5 | |
------------------------------------------------------------------------------- | |
Test name | head[ms] | base[ms] | ratio | | |
------------------------------------------------------------------------------- | |
timeseries_with_format_no_exact | 447.1206 | 467.2980 | 0.9568 | |
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 pandas.core.api import Timestamp, Period | |
time_in_seconds = Timestamp('2013-03-31 22:11:19') | |
one_year_period = Period('2013') | |
time_in_seconds.to_period(one_year_period.freq) == one_year_period | |
# True |
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
apply plugin: 'java' | |
repositories { | |
mavenCentral() | |
maven { | |
url 'http://clojars.org/repo/' | |
} | |
} | |
dependencies { |
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
import os | |
from webob.dec import wsgify | |
from webob.exc import HTTPMovedPermanently | |
from paste.deploy import loadapp | |
from waitress import serve | |
@wsgify.middleware | |
def ForceSSLMiddleware(req, app): |
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 |
NewerOlder