This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from time import process_time as time | |
async def anoop() -> None: | |
pass | |
def noop() -> None: | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
"basics": { | |
"name": "Sergey Shashkov", | |
"label": "Software Engineer, Educator, and Product Manager", | |
"image": "shashkovs.jpg", | |
"email": "[email protected]", | |
"phone": "+77057247666", | |
"url": "", | |
"summary": "Experienced developer, product manager, and math and programming teacher with a background spanning 18 years in education and 12 years in programming.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import Enum, IntEnum, unique, EnumMeta | |
from operator import attrgetter | |
from time import perf_counter_ns | |
from random import randrange | |
import sqlite3 | |
# Сколько раз дублируем все записи | |
INSERTS = 100000 | |
FETCHES = 100000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import numpy as np | |
from numpy.linalg import inv | |
from time import time | |
from sympy.matrices import Matrix | |
import sympy | |
N = 6 | |
# Все ненулевые строки | |
zero_one_rows = [np.matrix(row, dtype=np.float64) for row in itertools.product([0, 1], repeat=N) if any(row)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from drawzero import * | |
cars_y = [540, 500, 460] | |
cars_x = [100, 100, 100] | |
ups = [K.w, K.i, K.UP] | |
downs = [K.s, K.k, K.DOWN] | |
lefts = [K.a, K.j, K.LEFT] | |
rights = [K.d, K.l, K.RIGHT] | |
colors = ['green', 'blue', 'yellow'] | |
scores = [1000, 1000, 1000] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from drawzero import * | |
import random | |
import math | |
from dataclasses import dataclass | |
START = START_X, START_Y = (500, 200) | |
G = -2.0 | |
START_SPEED = 20 | |
STICK_WIDTH = 5 | |
TOP = 600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
from pygame import locals | |
import sys | |
from random import randint, choice, uniform | |
from dataclasses import dataclass | |
NUM_STARS = 300 | |
D = 1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from drawzero import * | |
from random import randint, choice, uniform | |
from dataclasses import dataclass | |
NUM_STARS = 100 | |
D = 1 | |
Vx, Vy, Vz = (500, -3, 100) | |
# Список скоростей, которые мы будем каждые 2 секунды менять | |
speed_list = [ | |
(500, 0, 0), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# openvpn | |
# Нужно знать IP своего вебсервера. Пусть это будет 123.123.123.123 (replace наше всё) | |
# И выбрать порт, на котором оно будет работать. Если vps пустой, то лучше всего порт 443 (это https). | |
# Если там уже есть вебсервер, то replace наше всё, мы будем использовать порт 12312 | |
# Разное стартовое, если сервер совсем «голый» | |
# yum -> dnf | |
yum upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint, uniform | |
from math import hypot | |
import pygame | |
import sys | |
SCREEN_SIZE = WIDTH, HEIGHT = (1000, 1000) | |
# Готовим 200 кругов в случайных местах случайного радиуса и цвета | |
N = 200 | |
CIRCLES = [ |
NewerOlder