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 base64 | |
import dataclasses | |
import enum | |
import gzip | |
import io | |
import json | |
import struct | |
from pprint import pprint | |
from Crypto.Cipher import Blowfish |
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 base64 | |
import json | |
import random | |
import nacl.public | |
import win32file | |
def _check_nonce_length(nonce: str): | |
return len(base64.decodebytes(nonce.encode())) == nacl.public.Box.NONCE_SIZE |
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 asyncio | |
import time | |
import mido | |
import pynput.keyboard | |
KEY_STEPS = [ | |
(0, pynput.keyboard.KeyCode.from_char('z')), | |
(2, pynput.keyboard.KeyCode.from_char('x')), | |
(4, pynput.keyboard.KeyCode.from_char('c')), |
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/python | |
import sys | |
d = open(sys.argv[1]).read().splitlines() | |
general = {} | |
tracks = [] | |
current_file = None | |
for line in d: | |
if line.startswith('REM GENRE '): |
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/python3 | |
import json | |
import math | |
import os | |
import random | |
import subprocess | |
import sys | |
import threading |
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 typing | |
class Node: | |
def write(self, f: 'XMLWriter'): | |
raise NotImplementedError() | |
class WithTags: | |
def __init__(self, **kwargs): |
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
# | |
# SimpleXMLWriter | |
# $Id: SimpleXMLWriter.py 3225 2007-08-27 21:32:08Z fredrik $ | |
# | |
# a simple XML writer | |
# | |
# history: | |
# 2001-12-28 fl created | |
# 2002-11-25 fl fixed attribute encoding | |
# 2002-12-02 fl minor fixes for 1.5.2 |
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 | |
import requests | |
import sys | |
import time | |
TOKEN = None | |
CLID = "<ClientID приложения>" |
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
class Api: | |
def __init__(self, api_url="https://smotret-anime.ru/api/"): | |
self._api_url = api_url | |
def translation(self, id=None, **kwargs): | |
if id is not None: | |
return self._get(f"translations/{id}", {}, Translation) | |
return self._get("translations", kwargs, Translation, True) |
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 json | |
import os | |
from time import sleep | |
import pyshiki | |
from pprint import pprint | |
api = pyshiki.Api("<Логин>", "<Пароль>") |
NewerOlder