Skip to content

Instantly share code, notes, and snippets.

View irfanykywz's full-sized avatar

Irfan irfanykywz

View GitHub Profile
@RageshAntonyHM
RageshAntonyHM / mutli-gen.py
Last active December 23, 2024 18:44
Multi-Model implementation of ImageGen via single prompt using Multi GPUs
import torch
from diffusers import SanaPipeline,StableDiffusion3Pipeline, FluxPipeline,Transformer2DModel, PixArtSigmaPipeline, AuraFlowPipeline, Kandinsky3Pipeline, LuminaText2ImgPipeline, HunyuanDiTPipeline, LuminaText2ImgPipeline
from app.sana_pipeline import SanaPipeline
from torchvision.utils import save_image
from models import SwittiPipeline
from onediffusion.diffusion.pipelines.onediffusion import OneDiffusionPipeline
# FLUX, SD, Aura, Hunay, Sana, Pix Sigma,
master_prompt = "A serene and emotive scene depicting a college girl weeping under a large, lush tree, with her loyal dog sitting close by, offering comfort. In the background, a small camp is situated , illuminated by the gentle glow of a campfire around which several people are gathered, sitting on benches and engaging in quiet conversation. The setting is in a forest clearing, during twilight, with the sky painted in soft shades of pink and blue, creating a tranquil yet poignant atmosphere,"
@lMortimerl
lMortimerl / main.py
Created February 27, 2024 11:27
Python Image to Text
# Dependencies: pip install opencv-python-headless pytesseract numpy
import cv2
import pytesseract
import matplotlib.pyplot as plt
# Path to Tesseract executable (change this according to your installation)
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe'
def capture_and_parse_text():
@denji
denji / nvenc-install.sh
Last active December 3, 2024 14:36 — forked from lucaspar/nvenc-install.sh
Installation script of CUDA-accelerated `ffmpeg` with NVIDIA Encoder ( docker NVIDIA Encoder https://github.com/markus-perl/ffmpeg-build-script )
#!/bin/bash
# =========================================================================
# Source: https://gist.github.com/lucaspar/27f5e108b80524b315be10b2a9049817
# =========================================================================
# This script will compile and install a static FFmpeg build with
# support for NVENC in Ubuntu. Developed in Ubuntu 23.10,
# with NVIDIA Drivers v535.129.03 and CUDA v12.2 with a GPU
# with CUDA capability 8.6 (RTX 3080) (see ccap below).
# It assumes NVIDA drivers are installed and that you have a
# CUDA-compatible GPU. You can check installed drivers with:
@TameemS
TameemS / debloatLDPlayer.md
Last active March 3, 2025 08:09
Debloating LDPlayer

Inspired by this

More of my guides: Debloating MEMu - Debloating Nox (Updated)

This mainly applies to LDPlayer9. They will probably work on the low end options (like LDPlayer5) but not guaranteed.

Debloating LDPlayer

This emulator seems to have less stability issues than MEMu. I think we get the shtick that these emulators do spooky stuff.

  1. Download LDPlayer, preferably an offline version from the version history
@MrAch26
MrAch26 / captcha_solver.py
Created December 4, 2022 08:36
Captcha Solver with python
from PIL import Image
from scipy.ndimage import gaussian_filter
import numpy
import pytesseract
from PIL import ImageFilter
def solve_captcha(filename):
# thresold1 on the first stage
th1 = 140
th2 = 140 # threshold after blurring
@skoqaq
skoqaq / build4123.sublime4.key
Last active March 3, 2025 03:38
Sublime Text 4 License Key
—– BEGIN LICENSE —–
Mifeng User
Single User License
EA7E-1184812
C0DAA9CD 6BE825B5 FF935692 1750523A
EDF59D3F A3BD6C96 F8D33866 3F1CCCEA
1C25BE4D 25B1C4CC 5110C20E 5246CC42
D232C83B C99CCC42 0E32890C B6CBF018
B1D4C178 2F9DDB16 ABAA74E5 95304BEF
9D0CCFA9 8AF8F8E2 1E0A955E 4771A576
@Axel-Erfurt
Axel-Erfurt / PyQt6_PDFViewer.py
Created March 26, 2022 20:33
Show PDF with PyQt6 QWebengineView
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from PyQt6.QtCore import QUrl
from PyQt6.QtWidgets import QApplication, QMainWindow, QWidget
from PyQt6.QtWebEngineWidgets import QWebEngineView #, QWebEngineSettings
from os import path
class MainWindow(QMainWindow):
def __init__(self):
@ahbanavi
ahbanavi / encryption.php
Last active May 1, 2024 23:18
Encrypt / Decrypt JSON data between Python and PHP using AES 256 GCM
<?php
const PASSPHRASE = ''; // use 'openssl rand -hex 32' to generate key, same with python
function encrypt(array $data): string
{
$data_json_64 = base64_encode(json_encode($data));
$secret_key = hex2bin(PASSPHRASE);
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-gcm'));
$tag = '';
$encrypted_64 = openssl_encrypt($data_json_64, 'aes-256-gcm', $secret_key, 0, $iv, $tag);
@pvanfas
pvanfas / Awesome Python.md
Last active September 18, 2024 14:05
A curated list of awesome Python frameworks, libraries, software and resources.