Skip to content

Instantly share code, notes, and snippets.

View Deathcrash's full-sized avatar
💭
What's happening?

No_name Deathcrash

💭
What's happening?
View GitHub Profile
@Deathcrash
Deathcrash / NiceProgressBar.py
Created June 29, 2023 10:58
NiceProgressBar_one_string
import time
def progress_bar(progress, total, bar_length=40):
filled_length = int(bar_length * progress // total)
bar = '█' * filled_length + '-' * (bar_length - filled_length)
percentage = progress / total * 100
print(f'\rProgress: [{bar}] {percentage:.2f}%', end='', flush=True)
def simulate_process(total_time):
for t in range(total_time + 1):
@Deathcrash
Deathcrash / turtle.py
Last active June 29, 2023 10:56
fractal
import turtle
from turtle import speed, bgcolor, colormode, fd, rt, pencolor
speed(15)
bgcolor('black')
r, g, b = 255, 0, 0
def polygon(n, size=80):
if n > 2: # <- многоугольников меньше 3 углов я не знаю :)
@Deathcrash
Deathcrash / audio_play.py
Last active June 29, 2023 10:55
audio play python
from gtts import gTTS
import os
import subprocess
from subprocess import check_output
text = "Global warming is the long-term rise in the average temperature of the Earth’s climate system"
language = "en"
speech = gTTS(text=text, lang=language, slow=False)
speech.save("text.mp3")
os.system('nircmd mediaplay 10000 text.mp3')
@Deathcrash
Deathcrash / pyperclip.py
Last active June 29, 2023 10:54
pyperclip
import pyperclip
while True:
pyperclip.waitForNewPaste(666)
x = pyperclip.paste()
print(x)
@Deathcrash
Deathcrash / Proxycheker.py
Last active June 29, 2023 10:54
Proxy cheker
proxies = []
for proxy in proxies:
response = requests.get(proxies=proxy)
if response.status_code == requests.codes['ok']:
break
response.text
@Deathcrash
Deathcrash / currency.py
Last active June 29, 2023 10:54
currency
import requests
url_change = 'https://openexchangerates.org/api/latest.json?app_id=565db73ce703480cb8d8849e32f32035'
r = requests.get(url_change)
r = r.json()
print(r["rates"]["CNY"])
@Deathcrash
Deathcrash / proxy_double.py
Last active June 29, 2023 10:53
proxy double
while True:
r = requests.get(url1, headers=HEADERS, params=PARAMS, proxies=PROXY[pr_count])
print(r.status_code)
if r.status_code == 429:
pr_count += 1
r = requests.get(url1, headers=HEADERS, params=PARAMS, proxies=PROXY[pr_count])
print(r.status_code)
pr_count = 0
if r.status_code == 429:
time.sleep(120)
@Deathcrash
Deathcrash / try_count_loop.py
Last active June 29, 2023 10:53
try count loop
import time
error = 0
while True:
time.sleep(1)
try:
if error == 0:
i = input("input good or bad if ")
@Deathcrash
Deathcrash / port_scanner.py
Last active June 29, 2023 10:53
Port Scanner python
# war 1
import socket
def scan_port(ip,port):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(0.5)
try:
connect = sock.connect((ip,port))
print('Port :',port,' its open.')
sock.close()
@Deathcrash
Deathcrash / list_adden.py
Last active June 29, 2023 10:52
List adden
start_parse_type = input("Select the type of gun to start parsing.\n\n"
"1 - all weapon\n"
"2 - Custom weapon\n"
"Please enter: ")
type_list = ['machinegun', 'smg', 'pistol', 'rifle', 'shotgun']
parse_list = []
if int(start_parse_type) == 1:
for i in type_list:
print(i)