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 sys | |
data = [] | |
for l in sys.stdin.readlines(): | |
cmd, val = l[:-1].split(' ') | |
data.append((cmd, int(val))) | |
def calculate_part_1(data): | |
x, y = 0, 0 | |
for cmd, val in data: |
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 sys | |
p = None | |
a = 0 | |
data_val = [] | |
def calculate_inc(data): | |
a = 0 | |
p = None | |
for d in data: |
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
s = 0 | |
e = 100 | |
while True: | |
print(f"Czy to jest {(s+e)//2}") | |
cmd = input() | |
if cmd == "M": | |
e = (s+e)//2 | |
elif cmd == "W": | |
s = (s+e)//2 |
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 random | |
ans = 0 | |
p = 0 | |
dmg = 1 | |
t = 13 | |
def hit(t): | |
global ans, p | |
a = random.randint(1, 20) | |
if a >= t: | |
ans += 12 |
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
>>> l | |
['1234', '5678'] | |
>>> [sum(x) for x in [map(int, list(x)) for x in l]] | |
[10, 26] |
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": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetObject", | |
"s3:ListBucket", | |
"s3:PutObject", |
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
image: node:8.12.0-alpine | |
cache: | |
paths: | |
- node_modules/ | |
variables: | |
AWS_DEFAULT_REGION: us-east-2 | |
BUCKET_NAME: test55555 |
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": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadGetObject", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::mytest55555/*" | |
} |
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
{ | |
"_meta": { | |
"hash": { | |
"sha256": "7ff1d75419cc3d2fa4c2f706969f15a7137e5f3ef364febeb91a8667e523a7f3" | |
}, | |
"host-environment-markers": { | |
"implementation_name": "cpython", | |
"implementation_version": "3.6.3", | |
"os_name": "posix", | |
"platform_machine": "x86_64", |
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
[[source]] | |
url = "https://pypi.python.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[dev-packages] | |
pytest = "*" |
NewerOlder