Skip to content

Instantly share code, notes, and snippets.

Avatar
🏳️‍🌈
aim programer

Nikita Sadchenko heknt

🏳️‍🌈
aim programer
  • Ukraine, Kyiv
View GitHub Profile
@heknt
heknt / calc_grid_method.py
Last active Dec 28, 2019
Program for calculation of a matrix by grid method (метод сеток) within extreme conditions using Seidel method and Laplace formula with finite increments.
View calc_grid_method.py
# program for calculation of a matrix by grid method (метод сеток)
# within extreme conditions using Seidel method and Laplace formula with finite increments
import matplotlib.pyplot as plt
# distance between dots on axis
_dx = 1.17
_dy = 1.16
# extreme conditions of temperature
@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.