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 TextFileDB: | |
""" | |
Text File DataBase v1 :) | |
---------- | |
only supports simple data types (int, float, bool, NoneType), but does not require libraries | |
+ init ( path = "db.txt" ) | |
+ get ( key: str = None, default: any = None) -> dict[str, any] | |
+ update ( dict [str, any] ) -> any | |
""" |
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
from random import* | |
a = int(input("введи целое число: ")) | |
x = False | |
while True: | |
if a % 2 != 0: | |
a = a*3+1 | |
print(a) | |
continue | |
if a % 2 != 0: |
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
from random import* | |
a = int(input("введи целое число: ")) | |
x = False | |
while True: | |
if a % 2 != 0: | |
a = a*3+1 | |
print(a) | |
continue | |
if a % 2 != 0: |
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 pyautogui | |
import time | |
ts = time.sleep | |
num = 426 | |
ts(3) |
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
Python requests has 3 parameters: 1)Request URL | |
2)Header Fields | |
3)Parameter | |
4)Request body |
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
''' | |
HTTP Reuests has following parameters: | |
1)Request URL | |
2)Header Fields | |
3)Parameter | |
4)Request body | |
''' | |
#!/usr/bin/env python | |
import requests |
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
# Импорты | |
from requests.exceptions import ConnectionError | |
import telebot, pytz, datetime, times, shutil | |
from telebot import types | |
# Определение бота | |
bot = telebot.TeleBot("TOKEN", parse_mode="MARKDOWN") | |
bot.set_webhook() |
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
e:\codes>sound.py | |
pygame 2.1.2 (SDL 2.0.18, Python 3.10.8) | |
Hello from the pygame community. https://www.pygame.org/contribute.html | |
Note: Illegal Audio-MPEG-Header 0xffe6013f at offset 37692. | |
Note: Trying to resync... | |
Note: Skipped 374 bytes in input. | |
Traceback (most recent call last): | |
File "E:\codes\sound.py", line 4, in <module> | |
pygame.mixer.music.play() | |
pygame.error: mpg123_seek: Invalid RVA mode. (code 12) |