Skip to content

Instantly share code, notes, and snippets.

View AndrewLaptev's full-sized avatar
🙂
Make it work. Make it right. Make it fast. Make it better.

Andrew Laptev AndrewLaptev

🙂
Make it work. Make it right. Make it fast. Make it better.
View GitHub Profile
@DariaKharitonova
DariaKharitonova / gist:1a34affcfb619e836456748f5f140f94
Created November 17, 2021 08:06
поиск квадратиков на картинках
from typing import Optional
import cv2
import numpy as np
from fire import Fire
def preprocess_image(image, black_threshold=45, scale_to=500):
"""
Предварительная обработка входного изображения.
@Sporif
Sporif / nvidia-gpu-sensor.pl
Last active July 21, 2023 06:47 — forked from hacker1024/nvidia-gpu-sensor.pl
KDE KSysGuard NVIDIA GPU temperature/memory/utilization sensor, based on @frantic1048's script, but with units and total memory detection.
#!/usr/bin/perl -w
# act as a KSysGuard sensor
# provides NVIDIA GPU info via `nvidia-smi`
# Usage:
# 1. Save this script, make it executable and move it to a directory in your $PATH
# 2. Save this ksysguard sensor file for Nvidia: https://gist.github.com/Sporif/31f0d8d9efc3315752aa4031f7080d79
# 2. In KSysGuard's menu, open "File > Import Tab From File option"
# 3. Open the sensor file (nvidia.srgd)
@egorsmkv
egorsmkv / metrials-go.md
Last active September 26, 2025 12:23
Материалы по Go (golang): мануалы, статьи, книги и ссылки на сообщества

Материалы по Go (golang)

На русском языке

Мануалы и туториалы

  • [Введение в программирование на Go][1]
  • [Маленькая книга о Go][3]
  • [Эффективный Go][2]
  • Есть еще [Краткий пересказ Effective Go на русском языке][4], но 2009 года
@konpatp
konpatp / async.py
Last active September 13, 2025 19:34
Python turn sync functions to async (and async to sync)
import functools
def force_async(fn):
'''
turns a sync function to async function using threads
'''
from concurrent.futures import ThreadPoolExecutor
import asyncio
pool = ThreadPoolExecutor()