Skip to content

Instantly share code, notes, and snippets.

Nikita Sadchenko heknt

  • Ukraine, Kyiv
Block or report user

Report or block heknt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@heknt
heknt / server_accident.py
Created Jun 2, 2019
Simulates an accident -- if one server will down -- will there be losses with downing each other server?
View server_accident.py
from random import choice
from typing import List
DUPLIC_NUM = 2
Server = List[int]
def random_fill(servers_num: int) -> List[Server]:
elem_num = servers_num**2
storage = [[] for _ in range(servers_num)]
@heknt
heknt / photo_compare.py
Last active Jun 2, 2019
Compares each pair of photos in folder. Checks for similarity, modifications, duplicates.
View photo_compare.py
from os import walk
from typing import List, Any
import numpy as np
from PIL import Image
path = ''
def change_global_var(var_name: str, new_value: Any):
globals()[var_name] = new_value
You can’t perform that action at this time.