March 2023
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 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," |
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
# 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(): |
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
#!/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: |
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.
This emulator seems to have less stability issues than MEMu. I think we get the shtick that these emulators do spooky stuff.
- Download LDPlayer, preferably an offline version from the version history
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 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 |
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
—– 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 |
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
#!/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): |
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
<?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); |
A curated list of awesome Python frameworks, libraries, software and resources.
NewerOlder