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 python | |
import os | |
import re | |
import subprocess | |
from os import listdir | |
from os.path import isfile, join | |
from typing import Optional | |
""" | |
Скрипт позволяет объединить видео mkv, аудиодорожки и субтитры в один mkv контейнер. Берёт все аудиодорожки и субтитры |
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 Printer: | |
def __init__(self, name, api_key, url): | |
self.name = name | |
self.octoprint_api_key = api_key | |
self.headers = {"X-Api-Key": self.octoprint_api_key, "Content-Type": "application/json"} | |
self.url = url | |
self.port = None | |
self.connection_info = self.get_connection_info() |
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 requests | |
def like_yandex_song(song_id, cookies_yandexuid, cookies_session_id, payload_sign): | |
url = f"https://music.yandex.ru/api/v2.1/handlers/track/{song_id}/web-user_playlists-playlist-track-main/like/add" | |
data = { | |
'sign': payload_sign, | |
} | |
cookies = { | |
'yandexuid': cookies_yandexuid, |
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 requests | |
from bs4 import BeautifulSoup | |
class User: | |
BASE_URL = "https://music.yandex.ru/users/yamusic-2022/playlists/" | |
def __init__(self, name: str, user_id: int = None, login: str = None): | |
""" |
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 | |
import time | |
from datetime import datetime | |
from joblib import Parallel, cpu_count, delayed | |
from bs4 import BeautifulSoup | |
class VkMessagesDumpConverter: | |
MONTH_TRANSLATOR = { | |
'янв': 'Jan', |