This file contains hidden or 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 cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey, Ed25519PublicKey | |
| from cryptography.hazmat.primitives import serialization | |
| def unhex(hexed): | |
| return b''.fromhex(hexed) | |
| def sign(private_key, message): | |
| private_bytes = unhex(private_key) | |
| private_key_raw = Ed25519PrivateKey.generate().from_private_bytes(private_bytes) | |
| signature = private_key_raw.sign(message.encode()).hex() |
This file contains hidden or 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 aiohttp | |
| import asyncio | |
| async def test(ip): | |
| async with aiohttp.ClientSession() as session: | |
| async with session.get(ip) as response: | |
| print(f"Running test for: {ip}") | |
| html = await response.text() |
This file contains hidden or 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 asyncio | |
| import time | |
| async def function1(): | |
| await asyncio.sleep(2) | |
| print("a") | |
| async def function2(): | |
| print("b") |
This file contains hidden or 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 tornado.ioloop | |
| import tornado.web | |
| import threading | |
| import time | |
| class ReadHandler(tornado.web.RequestHandler): | |
| def get(self): | |
| self.write("hello world") |
This file contains hidden or 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
| # coding=utf-8 | |
| odpovedi = [] | |
| def pokracuj(): | |
| print("") | |
| print(input("*Pokračujte stisknutím libovolné klávesy*")) | |
This file contains hidden or 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
| class Drak: | |
| def __init__(self): | |
| self.hp = 100 | |
| class RybiKosik: | |
| def __init__(self): | |
| self.pocet = 0 | |
| drak = Drak() | |
| kosik = RybiKosik() |
This file contains hidden or 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 threading import Thread | |
| import threading | |
| lock = threading.Lock() | |
| import glob | |
| import os.path | |
| #import cookielib | |
| import http.cookiejar | |
| import re | |
| import time |
This file contains hidden or 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 os | |
| import time | |
| import tweepy | |
| import logging | |
| import glob | |
| import json | |
| import random | |
| logging.basicConfig( | |
| level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s" |
This file contains hidden or 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
| """ | |
| Hypernode / Bismuth node update script. The script can be run in any directory. | |
| """ | |
| import os | |
| import sys | |
| import time | |
| import glob | |
| import tarfile | |
| import requests |
This file contains hidden or 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 subprocess | |
| with open("links.txt") as infile: | |
| lines = infile.readlines() | |
| for line in lines: | |
| filename = line.split("/")[-2] | |
| command_line = f"youtube-dl {line} --verbose {filename}.mp4" | |
| pipe = subprocess.Popen(command_line, shell=True, stdout=subprocess.PIPE).stdout |