Skip to content

Instantly share code, notes, and snippets.

View XanderVi's full-sized avatar
💭
Coding

Oleksandr Viter XanderVi

💭
Coding
View GitHub Profile
@XanderVi
XanderVi / the_secret_cypher.txt
Created January 21, 2022 17:44
The Secret Cypher
iVBORw0KGgoAAAANSUhEUgAABX8AAAMPCAMAAAC6/lY/AAADAFBMVEXZ2tHf3NV0US9snqPU4t9Zf3lTiYuzycPs7OP///9alZBdf3jJyciSjIT6+Hy2ycNUjIxSoAhUpQZZfnf+/v7B08O2y8WXsathgHhYqgXzyaxcsAfa29R4gXeDb0NhlJC0x8JTjIqyyMLNzspvf3gGCQjM4MeB8imyycU6TXC5zMdPc3C8z8KG8jDe3tZogHdZi4qZp6jb2dHW1s9kfnba0cjR0syu4t1gtwW93euP8TtWe3eR8ks0W1re3NOe8WvR4d2g8XMSKSlTeHNKcW9rzAns7uuh8VaQzyW8z8vZ29AVMTEYODih8mKdtrBlwQdYkI9ckIxhjYvA0s7w8vGFyyBXqQ2vv71biIcpKSOC8TkNICDj5eGtqKBomJSC8Un6/PuT71lAQD2c2Cp+eHrO3tpok5Dn6eYjSEik4DOv5jnE1tJxmpex81yu80cqMi+IWyam7n0gQEEMFBPJ2tZBSklOdnVktxAZPD4zRkSmt7Nx1wyxxL+79GcwOzo9a2lvvBN7d3AeHBc3X1+ovbkoUFFWV1NCbGz3+/Th4ttfYFpWioeg8kBmZ2NHVFOiopxRX161trKgrq16xBo6NyzU96BBZGSToJ+AcEtvc3BuzySCkI5/hoV53ic1UVCqrKlVhIJbaGaM1hJRfHz0/eWt6otkcXCKmZhQUEladnLY+LOj5kjr/Na+809eTEiU82dmwCHi+sQuHRCZmpW355m+v7ldsRaE81rX3c2v82qT5SNhhYRbgIBLRj5wVTqw9YSK4FGLiYC+9HZ75xHT38uTrqiw5lN1goFDXFx93T7B56hNammO2DfL9pHAxcOOkI3S4MVoiYh3zjzB84VwkI3V19ZdSzJwbWXO477I5rTxzbSAclRSPyLc3t2f1EfG08w8TGi99ZrLyMA+LRWJgHW5vJtvZEt9zRGMxUx4wCe53nD5+YrP9oTG9WuZ3WSUl4xvujzDp5Vg
import requests
"""
other possible urls:
api.binance.com
api1.binance.com
api2.binance.com
"""
API_URL = 'https://api3.binance.com/api/v3/avgPrice'
import random
NUMBER_OF_TESTCASES = 100
LETTERS = [chr(i) for i in range(97, 97+26)] # all letters from 'a' to 'z'
def random_string_generator():
string_blocks = random.randint(1, 100)
string = ''
import sys
class NewItem:
def __init__(self, analysis_date, keyword, current_cpc_max, previous_cpc_max):
self.analysis_date = analysis_date
self.keyword = keyword
self.current_cpc_max = current_cpc_max
self.previous_cpc_max = previous_cpc_max
import copy
class Human:
def __init__(self, name, birthday, gender):
self.name = name
self.birthday = birthday
self.gender = gender
def __repr__(self):
a = [1, [2, 2, 2], 4]
def flat_list(x):
return iter(x)
def make_iter(data):
for i in range(len(data)):
if type(data[i]) == list:
data[i] = make_iter(data[i])
class Army:
def __init__(self, units=[]):
self.units = []
def add_unit(self, unit_type, amount):
self.units = [unit_type() for i in range(amount)]
class Warrior:
def __init__(self):
self.health = 50
@XanderVi
XanderVi / code.py
Created June 23, 2018 09:00
mission Vacation
AIRPLANE_SPEED = 900 # km/h
TRAIN_SPEED = 120 # km/h
CAR_SPEED = 100 # km/h
ONE_MILE = 1.609344 # km
AIRPLANE_PRICE = 100 # per 1h
TRAIN_PRICE = 1 # per 1h
CAR_PRICE = 1.5 # per 1h
class Transport(object):
def travel(self, distance, money):
@XanderVi
XanderVi / code.py
Last active June 23, 2018 08:10
mission Vacation
AIRPLANE_SPEED = 900 # km/h
TRAIN_SPEED = 120 # km/h
CAR_SPEED = 100 # km/h
ONE_MILE = 1.609344 # km
AIRPLANE_PRICE = 100 # per 1h
TRAIN_PRICE = 1 # per 1h
CAR_PRICE = 1.5 # per 1h
class Transport(object):
def travel(self, distance, money):