Skip to content
Sign UpLog In
Profile icon

Smart 0ne

@Smart0ne
Take a look at my [GAME] Among Us *ALPHA* and my [GAME] Among Us *TESTING*!
  • [GAME] Among Us *TESTING*

    Cover page
    Made with Python
    Recent comments (20)
    AlexandroArteag
    AlexandroArteag
    2 months ago

    what

    HanzhongChen
    HanzhongChen
    3 months ago

    Wow the imposter killed me in a task

    PrincessClarie
    PrincessClarie
    3 months ago

    how do you play guys

    TevinPerkins
    TevinPerkins
    3 months ago

    i died wow it wouldnt let me do emergency meetings🤔

    LesverArana
    LesverArana
    4 months ago

    i died D:

    DhirenKamesh
    DhirenKamesh
    5 months ago

    Nice

    PARADISEIRBY
    PARADISEIRBY
    6 months ago

    are you guy sleeping

    PARADISEIRBY
    PARADISEIRBY
    6 months ago

    so who like pizza

    Vargskelethor
    Vargskelethor
    6 months ago

    I won as impostor first try

    KingsleyXu
    KingsleyXu
    6 months ago

    image

  • [GAME] Among Us *ALPHA*

    Cover page
    Made with Python

    You are on a ship with other humans. You must complete all tasks, but beware, there is an imposter bent on a killing spree.

    Recent comments (51)
    aidenhustus
    aidenhustus
    5 days ago

    me was bored in 5 seconds plz make it real

    AliTurkey
    AliTurkey
    6 days ago

    omg i am hacker how

    AAYUSHKASHYAP1
    AAYUSHKASHYAP1
    13 days ago

    awersome and cool

    JustinMcCloud
    JustinMcCloud
    3 months ago

    cool

    DavidSchorn
    DavidSchorn
    3 months ago

    thats kinda sus not gana lie

    Hello-Erin
    Hello-Erin
    3 months ago

    Cool. I like it.

    AshertheSmasher
    AshertheSmasher
    3 months ago

    I liked the format It had a D&D feel to it

    MeiraWeiss
    MeiraWeiss
    3 months ago

    WOW

    entity303entit1
    entity303entit1
    4 months ago

    this is code : (

    rlgameralex
    rlgameralex
    4 months ago

    e

Repls
Community
Smart0ne
Smart0ne
shared a Post
2 years ago
Can't delete repl :(
I can't delete a repl. Whenever I click on the dots beside the repl in My repls, I end up in the repl. Help.
IMayBeMe
IMayBeMe
That’s a glitch, go into the editor and click the name of the repl so it should look like this: FAABCE10-5787-497E-B594-9C06031495CD Then click the three dots and delete the repl.2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
How to get a website (in node.js) that you would get with an HTML/CSS/JS repl? I looked at a few examples, but they were all too confusing. May someo
SixBeeps
SixBeeps
Node.js does not do server hosting on its own. If you want to host a web server that serves HTML content, you need a library such as Express. I have a bit of boilerplate code that I use for a good majority of my Node web projects that uses it. You can give it a fork and remove the socket.io stuff that's in there (unless you plan on using sockets).2 years ago
IntellectualGuy
IntellectualGuy
Can you please explain further? Do you mean webview?2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
How do I make it such that whenever the user clicks the button, the add function is called (without using the onclick attribute of the button)?
EasyProudDonateware
HTML, CSS, JS
IntellectualGuy
IntellectualGuy
Use event listeners document.querySelector('button').addEventListener('click',add); `2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
You all have had that time: you're sitting comfortably, surfing YouTube (totally not me), and suddenly, you realize you have a major exam coming next
SpacedRem - Memorize with Spaced Repetition
Python
RayhanADev
RayhanADev
Wow, that's interesting :o I'm a bit of a psychology nerd, so I'm super intrigued by your confidence formula :)2 years ago
JacobMcPherson1
JacobMcPherson1
sreggop2 years ago
icodeletion
icodeletion
poG!2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
In the repl attached to this post, there's a chrome extension. When you install it, there's a button that you can click, and I intended it to increase
Research Pad
HTML, CSS, JS
ChezCoder
ChezCoder
What happened here? document.counter.innerHTML = counter_number; Change it to this: counter.innerHTML = counter_number; Also i suggest you use textContent instead of innerHTML counter.textContent = counter_number; Difference textContent changes the text of the element. If you did element.textContent = "CODE", that would set the physical text of the element to CODE. innerHTML changes the HTML of the element. If you did element.innerHTML = "CODE", that would add a new `` tag to the HTML of 2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
In code, people need variables. But sometimes (read: all the times), I need to use a lot of variables, and at the end, I worry over if people use some
Coder100
Coder100
no. no you shouldn't. variables, are SUPPOSED to be descriptive. Comments will help describe what the value is if its a complex value that cannot be easily determined, but overall variable NAMES should do most of the heavy work. Anyways, it's not a common problem, maybe you should https://tryitands.ee 2 years ago
realTronsi
realTronsi
This usually isn't a problem unless you're abusing global variables, otherwise if you have a huge function, make sure your functions are only responsible for one thing, so variables with good naming can usually be implied.2 years ago
ANDREWVOSS
ANDREWVOSS
Descriptively naming your variables is usually enough, but you can use comments to describe variables that don't have an obvious purpose.2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
Let's say I have a string How do I convert that to a dictionary I tried using a loop and going to each character, but then I got confused on what in
InvisibleOne
InvisibleOne
well, if it had brackets inside of the string then you could use json import json str = "{'q1':'a1','q2':'a2','q3':'a3'}" dictionary = json.loads(str) Or you could just make a code to split it and convert it to a dictionary, like this str = "'q1':'a1','q2':'a2','q3':'a3'" dictionary = {} list1 = str.split(',') for item in list1: i = item.split(':') dictionary[i[0]] = i[1] 2 years ago
19ecal
19ecal
Use ast.literal_eval() import ast f="{'q1':'a1','q2':'a2','q3':'a3'}" flashcards=ast.literal_eval(f) You can then access it like a normal dictionary. You could just use eval(), but ast.literal_eval() is safer2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
How do you make an integer variable decrease by 1 after 1 second in javascript?
tussiez
tussiez
Solution The easy way: let count = 10; let loop = setInterval(function(){ if(count > 0) { // don't make it negative count--; } else { clearInterval(loop) } }) `2 years ago
Squirrel777
Squirrel777
You can use setInterval to do this: var number = 50; function subtract() { number-- } setInterval(subtract(), 1000); `2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
Solution try something like this. var i = 10; var interval = setInterval( decrement, 1000); function decrement(){ i = i % 360 - 1; } like that. That should work2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
Is there something wrong with the following line of javascript? I want to change the background color to yellow. document.getElementById("display_tim
RYANTADIPARTHI
RYANTADIPARTHI
Solution try replacing - with C, the color needs to be capitalized. document.getElementById("display_time").style.backgroundColor = "yellow"; like that. That should work2 years ago
xxpertHacker
xxpertHacker
style.background-color = isn't JS syntax at all. I recommend using setProperty instead: document .getElementById("display_time") .style .setProperty( "background-color", "yellow" ); `2 years ago
tussiez
tussiez
Solution When changing CSS styles in JavaScript, you should convert the property to CamelCase: background-color --> backgroundColor box-shadow --> boxShadow2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
In the attached repl, you can see that the "cycles" and "tabatas" are right on top of each other. If there a way to make then beside each other?
Coder100
Coder100
Working repl: https://repl.it/@Coder100/Tabata-Timer-aeou-aeou-aoeh-uaoenth-u#style.css It's quite simple, so first, you make the two elements flow left, then you have their width decreased (to account for margin). Finally, you make a container that prevents them from being bad by having an overflow: hidden.2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
https://www.youtube.com/watch?v=SPTfmiYiuok In the video I posted above, they show people how to make a discord bot. They also show how to make setti
ObiVibKenobi
ObiVibKenobi
Maybe you could try writing the settings of a server to a database, with the key as the server ID, and the value as a dictionary of the settings? For example: db[1234567890] = { bans: False, kicks: True, warns: False } Where 1234567890 is the server ID. If someone does !ban, then you can do if ( db[message.guild.id] ): Ban the user else: channel.send(“The ‘ban’ command is disabled!”) I don’t really use discord.py, but you could put ban code in if it’s yes, and something like that if it2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
So I had this idea to use the replit database as a server. I'm wondering how often does the replit database update. For example, if I have two clients
RalfPi
RalfPi
Have you managed to use the Replit database as a server? The following link https://docs.replit.com/hosting/deploying-http-servers describes how to make Replit host your database. There are many complaints about Replit as a host, but since I started using it, no problems have appeared. The most vivid example is the database I bought from https://www.globaldatabase.com/data-enrichment, hosted by Replit for a year now.5 months ago
Coder100
Coder100
The best way to guarantee this is working is to do something like this: db["server"] = "hi" while not db["server"]: pass # ... still loading print(db["server"]) `2 years ago
Coder100
Coder100
That's subjective to server speed.2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
In Python, if you use the replit database, you can do usernames = db.keys() to get the keys. I initially assumed that "usernames" was an array, but
InvisibleOne
InvisibleOne
I think it has to do with how much memory it uses. I think that Dictionary View items use less memory and processing power2 years ago
Coder100
Coder100
Well, the thing is, it's not an object. The database is secretly a class with magic functions to replicate the behavior of an object, but you must know it isn't. If you want to delete a single object, just do: del db[username] `2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
What is functional programming? I still don't get it after searching it up ... like what do you mean by "minimizing the side effects"?
aar2dee2
aar2dee2
Start with Elixir (backbone of Discord). I've started a series of tutorials for beginners. Part 1 here 2 years ago
Coder100
Coder100
Functional programming is when everything is a function. It is really hard to explain without you learning it. I recommend learning F#, which is a functional programming language. Side effects are like print("hi"). This is not a pure function, because if another function was trying to read the results of the terminal, it would vary depending on if you called that function or not. tutorials https://fsharp.org/learn/ next time please actually search these questions up2 years ago
ReferenceError
ReferenceError
Functional Programming is the future. More efficient code, less clutter. Basically everything is bound to functions. no more while or for.2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
Hello, I linked a repl which contains code I found from github. It's supposed to be ai learning how to drive. But for every single AI learns how-to-d
RayhanADev
RayhanADev
Okay I use NodeJS and we have package.json file that list what dependencies we need. We can change the version number to change what version we retrive. Maybe Python has one too, so check your pyproject.toml (the [tool.poetry.dependencies] section) file!2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
Hi repl.it, I found some code from https://github.com/donkeyshaun/Snake, so I'm trying to run it. The repl I'm using is linked in this post, but when
InvisibleOne
InvisibleOne
The code is in snake.py, and I think that repl always runs main.py, and since there is nothing there, it isn't going to run everything, try moving all the code from snake.py to main.py2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
Hi repl.it, Can someone give me code for AI learning how to play snake? Code should be in Python, and uses the NEAT module. Thanks in advance, @Smar
Coder100
Coder100
Here's something: https://www.youtube.com/watch?v=ium0AketzD0 and some github i found: https://github.com/lia-univali/neat-snake2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
Maybe this: https://github.com/lia-univali/neat-snake2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
Hello, I'm currently learning some Machine Learning, and I'm learning about Linear Regression. I'm trying to create a program where the program predi
Coder100
Coder100
http://www.generatedata.com/ Here's something2 years ago
Coder100
Coder100
Well how does it look like?2 years ago
JonDoeBeep
JonDoeBeep
https://data.cityofnewyork.us/Education/2006-2012-Math-Test-Results-All-Students/3mrr-8h5c2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
Hi repl.it Here is my python code so far import tensorflow It gives me an error, so can someone explain why this is happening?
RYANTADIPARTHI
RYANTADIPARTHI
You probably need to install it2 years ago
realTronsi
realTronsi
show repl please2 years ago
Smart0ne
Smart0ne
shared a Post
2 years ago
Hi repl.it How do you sleep in Javascript? Like delay for a few seconds? Please help. Halp, @Smart0ne
RYANTADIPARTHI
RYANTADIPARTHI
Try this link: https://stackoverflow.com/questions/951021/what-is-the-javascript-version-of-sleep2 years ago
Coder100
Coder100
However, if you want it asynchronous (and more like python): function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } and then: (async () => { console.log("Hit that, "); await sleep(1000); console.log("check mark!"); })() `2 years ago
Coder100
Coder100
setTimeout(() => { console.log("yeet") }, 1000) `2 years ago