Skip to content
Sign UpLog In
Profile icon

Muffins the Cat

@MuffinsTheCat
Nothing
  • The chocolate game

    Cover page
    Made with Python

    See if you can beat the bot!

    Recent comments (0)
  • Guess the number

    Cover page
    Made with Python

    Try to guess the number

    Recent comments (0)
  • Full House Bingo

    Cover page
    Made with Python

    Play a game of full house bingo in Python!

    Recent comments (0)
  • stylego (python module)

    Cover page
    Made with Python

    Update: Stylego now supports italic text! Simply write Style.italic before words. Make sure to write Colour.reset afterwards!

    Recent comments (0)
Repls
Community
MuffinsTheCat
MuffinsTheCat
published a Repl
1 month ago
0
Password Generator/Tester (1)
Password Generator/Tester (1)This is a program which can generate a password from any character on a standard keyboard. It can also crack a password, to test how safe it is. The password can be up to 100 characters long and is completely randomised. If course this is not the best password generator otherwise it would use every single ASCII character in existence. The cracker also isn't the best and just goes through ever combination of every character instead of using an algorithm to first check the most common words/passwords. If for whatever reason you decide to use a password generated by this program, good luck remembering it!
MuffinsTheCat
MuffinsTheCat
published a Repl
2 months ago
0
Password Generator/Tester
Password Generator/TesterThis is a program which can generate a password from any character on a standard keyboard. It can also crack a password, to test how safe it is. The password can be up to 100 characters long and is completely randomised. If course this is not the best password generator otherwise it would use every single ASCII character in existence. The cracker also isn't the best and just goes through ever combination of every character instead of using an algorithm to first check the most common words/passwords. If for whatever reason you decide to use a password generated by this program, good luck remembering it!
MuffinsTheCat
MuffinsTheCat
published an Update
7 months ago
0
Select the number function
Select the number function
A surprisingly easy to code function that allows the user to select a number using W, S or the up/down keys and confirm it with enter. You can select a minimum and a maximum number and a number the function starts at. Useful for things like selecting how many of something to buy or choosing how many items to drop.
#functions
#helpful
MuffinsTheCat
MuffinsTheCat
published an Update
8 months ago
0
[UNRELEASED] Talrythia
[UNRELEASED] TalrythiaAn upcoming RPG I am making
What is wrong with this?
Even if the main file is completely empty, no matter what I do, I get this error. It's not helpful at all as I do not have any of the files it lists but still it shows the error anyway. How do I fix this?
hankertrix
hankertrix
@MuffinsTheCat which error are you encountering? Is it this one: ``` Traceback (most recent call last): File "main.py", line 6, in <module> if x == os.environ['devpass']: pass File "/nix/store/p21fdyxqb3yqflpim7g8s1mymgpnqiv7-python3-3.8.12/lib/python3.8/os.py", line 675, in __getitem__ raise KeyError(key) from None KeyError: 'devpass' ``` or this one: ``` Traceback (most recent call last): File "/tmp/upm4279124174/bare-imports.py", line 13, in <module> imports, had_errors = pipreqs.get_all_imports( File "/tmp/upm4279124174/pipreqs.py", line 52, in get_all_imports contents = f.read() File "/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte exit status 1 Replit: Package operation failed. ``` For the former, add a secret in the secrets tab with key "devpass" with whatever value you desire. For the latter, press the triple dots beside the button to add a folder and click show hidden files. Click on the `.replit` and scroll all the way to the bottom. You should see this: ``` # Configures the packager. [packager] # Search packages in PyPI. language = "python3" # Never attempt to install `unit_tests`. If there are packages that are being # guessed wrongly, add them here. ignoredPackages = ["unit_tests"] [packager.features] enabledForHosting = false # Enable searching packages from the sidebar. packageSearch = true # Enable guessing what packages are needed from the code. guessImports = true ``` Change the guessImports variable to false, like this: ``` # Configures the packager. [packager] # Search packages in PyPI. language = "python3" # Never attempt to install `unit_tests`. If there are packages that are being # guessed wrongly, add them here. ignoredPackages = ["unit_tests"] [packager.features] enabledForHosting = false # Enable searching packages from the sidebar. packageSearch = true # Enable guessing what packages are needed from the code. guessImports = false ``` That should fix both of your issues. If you want more information on the latter issue, read on. Otherwise, you can just ignore this part. The latter issue is due to the packager in replit trying to guess your imports. The Universal Package Manager (UPM) in replit will walk through all your Python (.py) files to find where you used the word import and then try to find the package you imported and install it using pip. However, since your `savedata.py` file is actually a save file that contains a serialised Python object instead of a regular Python text file that contains regular text, the UPM fails to read your `savedata.py` file using the UTF-8 encoding and hence throws a UnicodeDecodeError since the serialised Python object in `savedata.py` cannot be decoded using UTF-8. You should be able to see Pyflakes complaining about being unable to decode the bytes when you navigate to the `savedata.py` file to edit it. Another way to fix this error would be to simply change your file extension of the savedata file to something else, like `.sav` for example. But since you're not using any external packages, I recommend just not allowing the UPM to guess imports since there may be a lot of things to change in your existing code if you need to change the file extension of the savedata file. 8 months ago
MuffinsTheCat
MuffinsTheCat
@hankertrix Yes, thank you. I finally know what was wrong with the code. Just need to change it to a different file extenstion. The first error shouldn't happen but I'll make sure the secret is there8 months ago
hankertrix
hankertrix
@MuffinsTheCat You're welcome!8 months ago
MuffinsTheCat
MuffinsTheCat
published an Update
9 months ago
0
What is this error?
Even is my code is completely empty, I keep getting this same error: Traceback (most recent call last): File "/tmp/upm2738761249/bare-imports.py", line 13, in imports, haderrors = pipreqs.getall_imports( File "/tmp/upm2738761249/pipreqs.py", line 52, in getallimports contents = f.read() File "/nix/store/xd5m4hym6gjmdfl0hx1xpj4j2hlc54xx-python3-3.8.12/lib/python3.8/codecs.py", line 322, in decode (result, consumed) = self.bufferdecode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte exit status 1 Replit: Package operation failed. Why the hell is this happening and how do I fix it?
MuffinsTheCat
MuffinsTheCat
shared a Post
2 years ago
I am having a problem with the replit audio module. I have a battle system in this game I'm making where I want music to play, however, the song will
FloCal35
FloCal35
https://docs.repl.it/repls/audio if it's in python, add a source.paused = not source.paused at the end2 years ago
OldWizard209
OldWizard209
Yeah, can you share the code real quick? Attach the repl. I can help you tehn2 years ago
MuffinsTheCat
MuffinsTheCat
shared a Post
2 years ago
How to use GetKeys What is GetKeys? GetKeys is a Python module that allows you to detect a user input without them having to press enter afterwards.
Bookie0
Bookie0
Screen Shot 2021-03-17 at 3.21.42 PM You can add syntax highlighting to your code blocks by adding py after the 3 backslashes (`): if k == "a": #change the a to whatever you want #Stuff goes here else: #Stuff goes here > if k == "a" or "A": Isn't it if k == "a" or key == "A":? Also, you can use getch,getch(): from getch import getch char = getch.getch() if char.lower() == "a": # for letters print("You pressed the \'a\' key") elif char == "1": # numbers print("You pressed the \'12 years ago
MuffinsTheCat
MuffinsTheCat
shared a Post
2 years ago
@Coder100 recently made a program in c++ that could read your mind. This program does the same thing, but in just five lines of code and one file in P
Mind reader
Python
CodingElf66
CodingElf66
@MuffinsTheCat How do you know Coder100 is a middle schooler?2 years ago
CodingElf66
CodingElf66
I know this, it only works if you chose a number from the start that is a integer, or else, it wouldn't work. For example, if I chose 6.5, 6.5 * 10 = 65, and 65 - 3 = 62. The last digit would be 2, which would be incorrect.2 years ago
MuffinsTheCat
MuffinsTheCat
shared a Post
2 years ago
I have always been looking for a way to detect user inputs without using input() and I finally found getkey. This is my first time using it so I just
NightxHearts
NightxHearts
love this~! Keep it up! :D2 years ago
MuffinsTheCat
MuffinsTheCat
shared a Post
2 years ago
stylego, my first module Stylego is my first ever module and I had a lot of help in making it. Most of the credit goes to Csinsc for the module. I ma
stylego (python module)
Python
MuffinsTheCat
MuffinsTheCat
shared a Post
2 years ago
Often when I look at python tutorials I see something like this: >>>print("Hello, world!") But when I type code with the >>> is returns an invalid syn
SixBeeps
SixBeeps
>>> is a cue to type something in IDLE, meaning you should put it in the console rather than in code. If you want to put it in code, remove the >>> altogether.2 years ago
MuffinsTheCat
MuffinsTheCat
shared a Post
2 years ago
I am working on a game where the player can have multiple save games at once, and the player has to input the name of the savefile they want. How do I
RYANTADIPARTHI
RYANTADIPARTHI
Solution try an if statement. user = input('save or no?') if user == 's': imports, and code for saving else: code for else part. something like that. it should work2 years ago
19wintersp
19wintersp
What language is this in? (And note that files made by programs on Replit will not persist)2 years ago
MuffinsTheCat
MuffinsTheCat
shared a Post
2 years ago
I'm making a program that requires the user to upload a file from their computer. I know I can use something like Documents/text.txt to open a specifi
TalinSharma
TalinSharma
What language? If it is HTML Then you could do something like this: The HTML The PHP Hope this helps and if it doesn't please specify a language!2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
solution I don't know about their file, but may this: userinput = input('file : ') f = open(userinput, 'r'): print(f.read()) like that.2 years ago
MuffinsTheCat
MuffinsTheCat
shared a Post
2 years ago
Sometimes I get an error I don't know how to solve (Python). When I highlight then ctrl+c the error, it just comes up with a message: 'Keyboard interr
Coder100
Coder100
Yes, that's because ctrl+c is a command to 'cancel' the current program. Solution You can either just right click and copy, or ctrl+ins2 years ago