Skip to content
Open navbar menu
Sign UpLog In
Profile icon

Ankit_ Anmol

@QuantumCodes
Hi, I am Ankit_Anmol from Scratch https://scratch.mit.edu/users/Ankit_Anmol/
  • Scratch User Auth

    Cover page
    Made with Python

    This verifies your scratch account by OTP. This does not involve any passwords.

    Recent comments (11)
    JustNamedPi
    JustNamedPi
    2 years ago

    Hello, you probably won't see this but, what does the "cloud data" link do, how did you find out about it and where can I go to do more research on it

    QuantumCodes
    QuantumCodes
    2 years ago

    how is this?

  • Scratch user statistics API reader

    Cover page
    Made with Python

    This is a scripts with gets API and reads it. Then outputs the user's statistics.

    Recent comments (32)
    FanofTesla
    FanofTesla
    2 years ago

    Suggestion: Add link to user profile in data

    TNJS
    TNJS
    2 years ago

    Whats class?

    p.s., @Ske-Tch on scratch ;)

    TechCD
    TechCD
    2 years ago

    Please teach me D:

    TechCD
    TechCD
    2 years ago

    Wow! This is insane :O

    Flyingcrabs
    Flyingcrabs
    2 years ago

    EPIC SO EPIC

    Strobe42
    Strobe42
    2 years ago

    nice

    Fireblazer
    Fireblazer
    2 years ago

    EPIC

    QuestionableNS
    QuestionableNS
    2 years ago

    nice

    ahmedo123454
    ahmedo123454
    2 years ago

    Ahmedosman145

    ahmedo123454
    ahmedo123454
    2 years ago

    its

  • All I know

    Cover page
    Made with Python

    Everything that I know in python.(not updated anymore cuz it will become too large eventually)

    Recent comments (2)
    Chiroyce
    Chiroyce
    2 years ago

    You need to use the "Flask" library to use HTMl as frontend and Python as backend

  • TicTacToe AI

    Cover page
    Made with Python

    A (best in the world) AI plays tic-tac-toe against you. You target is to lose! I mean-- to win...

    Written by: AI in the game
    Recent comments (3)
    TechCD
    TechCD
    2 years ago

    **

    QuantumCodes
    QuantumCodes
    2 years ago

    How is the AI? And other things in the game

QuantumCodes
QuantumCodes
published an Update
2 years ago
0
Twilight progress tracker
Twilight progress tracker
Transferring replitDB data
For some reason, i had to move a repl to another repl with the database data. Original repl = the repl with the db data New repl = the repl to which the new data is to be transferred. So the approach i used: Print the replit db url from the original repl. print(db.db_url) #I used this print(os.environ["REPLITDBURL"]) #this works the same Go to the new repl and add a secret: os.environ["REPLITDBURL"] = "the original db url." #i didnt add in code like this lol. I manually put in the sidebar Stopped the original repl (didnt delete) Everything works fine. Heres the problem: Replit DB URL updates every month (It has changed once). Is there any way to transfer DB data permanently?
QuantumCodes
QuantumCodes
published an Update
2 years ago
0
CSS float problem
This is a portion of my website. I am using CSS to align different text to opposite sides of a bar. (I am using the float property) When i put a image to the right side text, the text moves to the center(box #2). Without the image, everything is good(box #1). I want the 1st box also look like the second one. How to do that?
QuestionableNS
QuestionableNS
@QuantumCodes use grid or flex box?2 years ago
QuantumCodes
QuantumCodes
@QuestionableNS but why that haopens ? Also, i will try using those2 years ago
QuantumCodes
QuantumCodes
@QuestionableNS using the width property -> 33% worked!!2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
I recently made a package that i uploaded to pypi: Code: https://replit.com/@QuantumCodes/ScraGet PyPi: https://pypi.org/project/ScraGet/ Whenever i
pip test
Python
QuantumCodes
QuantumCodes
I DID IT!!!!!!!!!!!!!!!2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
i searched for posts about this but didnt find recent one. So... i crrated this.. Problem: Everyday, whenever i open my browser, it shows i am
VulcanWM
VulcanWM
Replit is adding some new updates and because of that some bugs are coming up and they prolly have to log you out There’s no way to fix this and it’s also happening to me2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
Limitations: 50 MB per database (sum of keys and values) 5,000 keys per database 1000 bytes per key 5 MB per value I dont quite understand some thin
ch1ck3n
ch1ck3n
{"yes": "no"} is 0.000013 megabytes or mb2 years ago
Coder100
Coder100
Please do read the docs: image as you can see, if you all values had 5MB you could only have 10 keys because of (1). no because it literally says you can only have 5000 keys and hold up to 5000kb only compare to json? json storage is counted in terms of mb just the same as replit db data is compared in terms of mb. bytes are characters, and I would think json is very inefficient in terms of storage. Perhaps you need to rethink that question.2 years ago
VulcanWM
VulcanWM
It says that the max capacity of a key is 5MB Not that each key is 5MB2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
Can someone hack this? Hack = reveal the secret (environmentvariables) variable "y" has the secret If u can, say the secret and pls say how to fix th
Coder100
Coder100
environment variables are only set by those that have multiplayer access to the repl or made the repl. In other words, if you can't edit the repl, the environment variables are hidden.2 years ago
MrVoo
MrVoo
Nobody else can even run the project (as of now), so it seems safe to me2 years ago
Debarchito
Debarchito
I do think they are safe to use. Like, everyone uses them! Feel free!2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
I wanted to learn asyncio (for a discord bot).. I didnt find any good tutorial explaining step by step..(referring to Tutorials at realpython) So i st
Asyncio test
Python
JustCoding123
JustCoding123
You have to run your function like this x = asyncio.run(wait()).2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
If i have a thread that runs a function that returns something, how do i get the returned value? from threading import Thread def func(): x = "ret
Chiroyce
Chiroyce
I think Django is faster, check this out — https://replit.com/@templates/Django-App-Template2 years ago
QuantumCodes
QuantumCodes
Anyone? Just say idk if u dont know???2 years ago
QuantumCodes
QuantumCodes
Someone????2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
Was the font changed in python console or is it just me? (Cuz i didnt change)
InvisibleOne
InvisibleOne
It changed for me, I think replit updated their console. I'm still not one hundred percent sure how much I like it. It isn't bad I guess. But I liked the last console font.2 years ago
MrVoo
MrVoo
I think so2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
There exists an inbuilt hash(val) function where x is a variable. It can hash x. Usually inbuilt funvtions have a color in replit IDE zuch as str(x)
Coder100
Coder100
No, those aren't really bugs, the syntax highlighter isn't always correct a lot of the times, and the devs probably have a reason for it. Anyways, hash isn't entirely a type per se, as str and int are. https://replit.com/@Coder100/BasicUnderstatedLint-try-this-out. int and str are probably highlighted for that reason. 2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
this is a new feature (or rather i knew recently) What does this do? It is only available on multiplayer repls/team repls It shows its observing but w
Coder100
Coder100
It is like spectator mode, you sync up with whatever the user is doing, and you can find them easily. (like if they are in another file, just click on them to get there)2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
i dont really understand whats the problem.. it used to work, i didnt change anything there... i was just adding other webpages. After i added the /vi
Scratch leaderboards
Python
Coder100
Coder100
It takes time to first load the page, and also for replit to save your file sometimes, so be patient, and try running again. image2 years ago
CyberPy
CyberPy
I don't see any error, maybe it was a glitch, i don't know. It works fine for me.2 years ago
QuantumCodes
QuantumCodes
Can anyone poinyout the error? And possible a fix to whatever error it is2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
the playsound package doesnt work. Is there any way to play a sound on python replit? I want to play an online sound (ie) not downloaded
xfinnbar
xfinnbar
You can using the replit package, but I recommend making it a website for a better user experience.2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
if i want to ping many websites at once (using requests library) it takes a long time.. is it possible that it first pings web1, then withoutnwaiting
Coder100
Coder100
You can use threading, like this: from threading import Thread websites = [] def ping_website(link): add code to ping website for i in websites: t = Thread(target=ping_website, args=(link)) t.start() also never ever ping a website every half second -- that's on the verge of making the website crash. Make it do every 5 minutes.2 years ago
InvisibleOne
InvisibleOne
I would try threading, that way you can run a whole bunch of threads. import threading import requests import time # not sleep def ping(website): try: requests.get(website, timeout=1) except: print(f"Timeout error with website {website}") while True: for i in websites: thread = threading.Thread(target=ping, args=[i]) thread.start() thread.join() time.sleep(0.5) This way it won't wait for that thread to be done, it will just move on to creating another thread without2 years ago
QuestionableNS
QuestionableNS
try using asyncio2 years ago
QuantumCodes
QuantumCodes
published a Repl
2 years ago
6
TicTacToe AI
TicTacToe AIA (best in the world) AI plays tic-tac-toe against you. You target is to lose! I mean-- to win... Written by: AI in the game
QuantumCodes
QuantumCodes
How is the AI? And other things in the game2 years ago
TechCD
TechCD
_**_2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
so, i wanted to detect whether a link exists or not (or) if it exists but the person has not run the repl. (I am making a pinger) Repl example: https
Timeout error
Python
AntarcticaAdv
AntarcticaAdv
If you want to show the error try this: import requests try: x = requests.get("https://Pinger-testing.quantumcodes.repl.co/",timeout=3) except Exception as e: print(e) `2 years ago
InvisibleOne
InvisibleOne
Screen Shot 2021-06-22 at 9.19.10 AM It didn't give me an error.2 years ago
QuantumCodes
QuantumCodes
a code with the answer will be helpful2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
This is a starter template for simple POST/GET requests from python to HTML through flask. You can easily switch between the post and get methods by c
Flask Post template
Python
Chiroyce
Chiroyce
What does this do? 2 years ago
QuantumCodes
QuantumCodes
shared a Post
2 years ago
I made this script that works when you change the method variable to POST. method = "POST" (line 5) but when i change it to get: method = "GET", then
Flask Post template
Python
SamDev7
SamDev7
You don't need the method variable. Since the arg username is not required, you can see first if username is sent. if 'username' in request.args: Get Username arg 2 years ago
QuantumCodes
QuantumCodes
published a Repl
2 years ago
19
Typewriter
TypewriterThis is a typewriter engine made in python.
Yoshimon44
Yoshimon44
Maybe because of the end="" statement, the program kept putting the I values in this "buffer" mentioned in (https://realpython.com/lessons/sep-end-and-flush/), and flush=True made the program keep taking out whatever was in the "buffer" and resetting it? im not sure, im quite unknowledgeable about things like this, but thats just what i think 2 years ago