I hereby claim:
- I am rtt on github.
- I am arrteetee (https://keybase.io/arrteetee) on keybase.
- I have a public key ASCb73A1BIuNeI-pg6_hl8nwc-5dcK5_vtsQAXrqNzPhhwo
To claim this, I am signing this object:
def calc(ticket): | |
seat_id = 0 | |
for i, instr in enumerate(ticket): | |
if instr in 'BR': | |
seat_id += 2**(9-i) | |
return seat_id | |
def part_1(data): | |
return max(calc(line) for line in data) |
import string | |
def get_input(): | |
with open('input4full.txt') as f: | |
passwords = f.read() | |
return passwords.strip() | |
def run(): | |
passports = [p.replace('\n', ' ').split(' ') for p in get_input().split('\n\n')] |
from operator import mul | |
from functools import reduce | |
def get_input(): | |
with open('input3full.txt') as f: | |
passwords = f.readlines() | |
return map(str.strip, passwords) | |
def get_input(): | |
with open('input3full.txt') as f: | |
passwords = f.readlines() | |
return map(str.strip, passwords) | |
def get_next(right, down, x, y, land_map): | |
x += right | |
y += down | |
line = land_map[y] |
from collections import Counter | |
def get_input(): | |
with open('2.txt') as f: | |
passwords = f.readlines() | |
return map(str.strip, passwords) | |
def get_password_specs(specs): |
from collections import Counter | |
def get_input(): | |
with open('2.txt') as f: | |
passwords = f.readlines() | |
return map(str.strip, passwords) | |
def get_password_specs(specs): |
from itertools import combinations | |
from functools import reduce | |
from operator import mul | |
def get_input(): | |
with open('1.txt') as f: | |
inp = f.readlines() | |
return list(map(int, map(str.strip, filter(None, inp)))) |
def get_input(): | |
with open('1.txt') as f: | |
inp = f.readlines() | |
return list(map(int, map(str.strip, filter(None, inp)))) | |
def get_answer(): | |
expenses = get_input() | |
seen = set() | |
while expenses: |
import os | |
import sys | |
import requests | |
def get_subscribed_repos_in_organization(organization, personal_access_token): | |
page = 1 | |
has_more = True | |
while has_more: | |
print("GET https://api.github.com/user/subscriptions?per_page=100&page={}".format(page)) | |
response = requests.get('https://api.github.com/user/subscriptions', |
I hereby claim:
To claim this, I am signing this object: