- Debian like systems
$ sudo aptitude install qemu-kvm libvirt-daemon bridge-utils virt-manager
$ sudo aptitude install dnsmasq-base
$ sudo aptitude remove dnsmasq
import os | |
import sys | |
import requests | |
import bs4 | |
import subprocess | |
from pathvalidate import sanitize_filename | |
def load_urls(filename): | |
with open(filename, 'r') as file: | |
urls = file.read().strip().split('\n') |
import argparse | |
import os | |
import time | |
import shutil | |
from pngparser import PngParser | |
PARAMS_MARKER = b"parameters\x00" | |
NEGATIVE_PROMPT_MARKER = "Negative prompt: " | |
def extract_text_from_png(file_path): |
// ==UserScript== | |
// @name BlockYaAds | |
// @description Block all ads on yandex.ru | |
// @version 0.5.6 | |
// @author Chrono | |
// @license MIT | |
// @match https://mail.yandex.ru/* | |
// @match https://*yandex.ru/* | |
// @run-at document-start | |
// @grant none |
#!/usr/bin/env python3 | |
import random | |
import requests | |
import time | |
CHANNEL_ID = 986401737118199838 | |
ACCESS_TOKEN = "YOUR_TOKEN" | |
def send_message(channel_id, text): |
import os | |
import subprocess | |
import xml.etree.ElementTree as ET | |
import traceback | |
def get_repo_paths_and_names(manifest_path): | |
"""Parses the given repo manifest file to extract repository paths and names. | |
Args: | |
manifest_path (str): Path to the repo manifest file (.xml). |
/* ==UserStyle== | |
@name habr.com | |
@version 20240410.12.23 | |
@namespace ? | |
==/UserStyle== */ | |
@-moz-document domain("habr.com") { | |
body, | |
html { | |
background-color: #181818; | |
color-scheme: dark; |
import argparse | |
import code | |
import errno | |
import getpass | |
import os | |
import re | |
import time | |
from io import BytesIO | |
from PIL import Image | |
from base64 import b64decode |
""" | |
A simple example of recording audio from speakers and streaming over RTSP protocol. | |
Requires pyaudiowpatch and RTSP server, e.g. https://github.com/bluenviron/mediamtx | |
""" | |
import pyaudiowpatch as pyaudio | |
import subprocess | |
import time | |
import wave |
import argparse | |
import numpy as np | |
from PIL import Image | |
from moviepy.editor import * | |
import os | |
import errno | |
TARGET_WIDTH = 1920 | |
TARGET_HEIGHT = 1080 | |
TARGET_FPS = 24 |