Skip to content

Instantly share code, notes, and snippets.

View isidentical's full-sized avatar

Batuhan Taskaya isidentical

View GitHub Profile
import random
import shutil
from collections import UserList, deque
from dataclasses import dataclass, field
from enum import Enum, auto
from typing import Dict, Tuple
Blocks = Enum("Blocks", "AIR GOLD COAL LAPIS EMERALD")
BOOST_AMOUNT = 0.1
#define ENSURE_CONSTANT(NODE) \
if ((NODE) != NULL && (NODE)->kind != Constant_kind) \
return 1;
#define GET_CONSTANT(NODE) (((NODE) != NULL) ? (NODE)->v.Constant.value : NULL)
static int
fold_subscr(expr_ty node, PyArena *arena, int optimize)
{
PyObject *newval, *key;
@defer.inlineCallbacks
def handle_issue_comment(self, payload, event):
changes = []
comment = payload["comment"]["body"].split()
log.msg(f"Handled comment: {comment}")
if payload.get("action") != "created": # should we support edits?
return ([], "git")
if len(comment) < 2 and comment[0] != f"@{BOT}":
L1 = dict.fromkeys("1 21 45 62 70".split())
L2 = dict.fromkeys("17 39 50 73 81".split())
L3 = dict.fromkeys("4 28 48 65 90".split())
LINES = (L1, L2, L3)
completed_lines = set()
while len(completed_lines) != 3:
num = input("Next > ")
for n, line in enumerate(LINES, 1):

Keybase proof

I hereby claim:

  • I am isidentical on github.
  • I am btaskaya (https://keybase.io/btaskaya) on keybase.
  • I have a public key ASDPYuTq-B_f8wQnVf-iNaoPNp-KqN-o0_yuezjTrkIYLAo

To claim this, I am signing this object:

from __future__ import annotations
import random
import webbrowser
from contextlib import suppress
from dataclasses import asdict, dataclass, replace
from enum import Enum
from html.parser import HTMLParser
from typing import Optional
from __future__ import annotations
import random
import webbrowser
from contextlib import suppress
from dataclasses import asdict, dataclass, replace
from enum import Enum
from html.parser import HTMLParser
from typing import Optional
import subprocess
import json
import urllib.request
URL = "https://challange.oyk2019.ml"
def _find_author(filename, lineno):
prop = subprocess.check_output(f"git blame -pL {lineno},{lineno} {filename}", shell = True)
lines = prop.decode().split("\n")
commit = lines[0].split()[0]
import subprocess
import shelve
def _find_author(filename, lineno):
prop = subprocess.check_output(f"git blame -pL {lineno},{lineno} {filename}", shell = True)
lines = prop.decode().split("\n")
commit = lines[0].split()[0]
author = lines[1].split()[1]
return commit, author