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
@ECHO OFF | |
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b) | |
set /p what_to_do=enable or disable windows defender?: | |
if "%what_to_do%"=="disable" ( | |
set state=1 | |
) else ( | |
if "%what_to_do%"=="enable" ( | |
set state=0 |
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
@ECHO OFF | |
set /p url=url: | |
set /p audio_extracting=do extract audio or no (yes/no)?: | |
if "%audio_extracting%" == "yes" ( | |
youtube-dl %url% -x --audio-format mp3 | |
) else ( | |
if "%audio_extracting%" == "no" ( | |
youtube-dl %url% | |
) else ( | |
echo choice isn't recognized |
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 time | |
class Sleepy(type): | |
def __getitem__(cls, value): | |
if isinstance(value, slice): | |
if value.step is None: | |
# start:stop | |
# minutes:seconds |
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 dataclasses import dataclass | |
from typing import Optional | |
import random | |
@dataclass | |
class Chunk: | |
""" | |
ALL FIELDS HERE ARE JUST DEMO STUBS!!! THEY ARE NOT USED ANYWHERE EXCEPT | |
FOR PRINTING OUT THE DATACLASS!!! |
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
python setup.py sdist | |
twine upload dist/* | |
rmdir dist /s /q |
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
known_points = [(-2, -1), (-3, 1), (1, 5)] | |
step = 0.25 | |
max_value = 3 | |
a = -max_value | |
while a <= max_value: | |
b = -max_value | |
while b <= max_value: |
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
def tuple_to_hex(tup): | |
return "".join(map( | |
lambda n: hex(n)[2:].zfill(2), | |
tup | |
)) | |
def hex_to_tuple(h): | |
return tuple(int(h[i:i+2], 16) for i in range(0, 6, 2)) |
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 readchar import readchar | |
from playsound import playsound | |
import os | |
sound_names = os.listdir("sounds") | |
letters_to_names = dict(zip("abcdefghijklmnopqrstuvwxyz1234567890", sound_names)) | |
for letter, name in letters_to_names.items(): | |
print(f"{letter} - {name}") |