Skip to content

Instantly share code, notes, and snippets.

View creotiv's full-sized avatar

Andrey Nikishaev creotiv

View GitHub Profile
{"id":"9e13f014-5bba-40dc-8c74-1e504eb73657","revision":0,"last_node_id":54,"last_link_id":111,"nodes":[{"id":8,"type":"VAEDecode","pos":[1210,190],"size":[210,46],"flags":{},"order":11,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":35},{"localized_name":"vae","name":"vae","type":"VAE","link":76}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","slot_index":0,"links":[56,93]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.48","Node name for S&R":"VAEDecode"},"widgets_values":[]},{"id":3,"type":"KSampler","pos":[863,187],"size":[315,262],"flags":{},"order":10,"mode":0,"inputs":[{"localized_name":"model","name":"model","type":"MODEL","link":111},{"localized_name":"positive","name":"positive","type":"CONDITIONING","link":101},{"localized_name":"negative","name":"negative","type":"CONDITIONING","link":102},{"localized_name":"latent_image","name":"latent_image","type":"LATENT","link":103},{"localized_name":"seed","name":"seed","type":"INT","widget":{"name
#!/bin/bash
# Script to monitor CPU throttling time and generate a plot
# Auto-install required packages
install_python_packages() {
for package in "$@"; do
if ! python3 -c "import $package" &> /dev/null; then
echo "Installing Python package: $package"
pip3 install "$package" || pip3 install --break-system-packages "$package" || python3 -m pip install "$package" ||{
echo "Failed to install $package. Please install it manually."
exit 1
@creotiv
creotiv / Instal.md
Last active August 17, 2025 03:20
Dir concatenation script for ChatGPT

Install

sudo apt-get install xclip
pip3 install pyperclip

chmod +x cc.py
sudo mv cc.py /usr/local/bin/cc
@creotiv
creotiv / 99-bluetooth-keyboard.rules
Created October 28, 2024 12:03
Scripts for work automation in Ubuntu
# /etc/udev/rules.d/99-bluetooth-keyboard.rules
ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="/home/creotiv/AUTOMATION/remap_mini_bt_keyboard.sh"
<!DOCTYPE html>
<html>
<head>
<title>Video Stream</title>
</head>
<body>
<video controls>
<source src="/video" type="video/mp4">
Your browser does not support the video tag.
</video>
import cv2
import numpy as np
import svgwrite
def find_and_vectorize_edges(image_path, K):
# Шаг 1: Уменьшение количества цветов
img = cv2.imread(image_path)
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
Z = img.reshape((-1, 3))
Z = np.float32(Z)
name: Update README with Structured Directory Listings
on:
push:
branches:
- main # Adjust if your default branch has a different name
jobs:
update-readme:
runs-on: ubuntu-latest
@creotiv
creotiv / db.sql
Created November 24, 2023 14:51
Postgresql Deadlock example using Pgx.Batch
CREATE DATABASE testdb;
CREATE TABLE items (
id SERIAL PRIMARY KEY,
name TEXT,
quantity INT
);
INSERT INTO items (name, quantity) VALUES ('Item1', 10);
INSERT INTO items (name, quantity) VALUES ('Item2', 20);
@creotiv
creotiv / gist:6b49c67f1aa9cf8ca4bd10c2d77a3fbe
Created October 5, 2023 14:02
Invite all linkedin page
javascript:els = document.getElementsByClassName("invitee-picker-connections-result-item--can-invite");for (let i=0;i<els.length;i++){ els[i].click(); };
@creotiv
creotiv / bilateral_slice.py
Created February 10, 2022 11:45
bilateral_slice for TorchScript
import torch
import numpy as np
def lerp_weight(x, xs):
"""Linear interpolation weight from a sample at x to xs.
Returns the linear interpolation weight of a "query point" at coordinate `x`
with respect to a "sample" at coordinate `xs`.
The integer coordinates `x` are at pixel centers.
The floating point coordinates `xs` are at pixel edges.
(OpenGL convention).