Nettakrim (392)

MaxDonalds: The McDonalds Simulator https://maxdonalds.mcutten.repl.run/ (i use Nettakrim on discord as well)
The Fishing Game (fixed)
posted to Share by AmeliaBlackwell

@Orca20 i looked through the code and removed a few things i think could have caused it
sorry if its still broken, but im not too interested in endlessly fixing it, the goal of my fork was to make it playable, not perfect

At Home Students Code Jam
posted to Announcements by 21natzil

is the instant fame guaranteed?

Multiplayer cursors!
posted to Share by MarcusWeinberger

you can type stuff into the console

socket.emit('update',{'user':"hello",'x':0,'y':0}) this will spawn in a cursor at that location, if a cursor with that name already exists it will move it
socket.emit('click',{'user':"hello",'x':150,'y':150}) this will make the little ripple at that location, the color of it is based on the first letter of the user
socket.emit('msg',{'user':"hello",'text':"message"})
this will send a message to the console as name in user

guess your password
posted to Share by SamEverett

solid 5/7 i use this everyday all day

at first i thought this was just a joke but after using it once i realized it was so much more!
in "password guess" you play as an omnipresent being and your goal is to input words.
this may sound like a simple premise but due to the underlying themes of chaos and destruction it creates a really intense experience which really cant be found elsewhere.

my first password was "hello" which was beaten easily but while i don't want to spoil the game for anyone, its actually a really good tutorial, it teaches you the basics of the game as well as valuable lessons you can apply in all your other runs and allows you (with much practice) to perfectly craft an unbeatable password.

SPOILER:

"superstrongpassword123" really combines elements of each line of code to create something that beats every level, while i wouldn't recommend using it, if you are having difficulty's beating the game maybe take parts of it to combine into your own password

-Netta

Pixel Art Creator!
posted to Share by DynamicSquid

guess your password
posted to Share by SamEverett

extended essay coming soon

MaxDonalds: McDonalds Simulator
posted to Share by Nettakrim

@LittleNomster
alas, mcdonalds is a dangerous, unpredictable and mysterious place...

HexAguess Game
posted to Share by JDOG787

a "harder difficulty" that added in codes like #4287f5 would be nice

MaxDonalds: McDonalds Simulator
posted to Share by Nettakrim

so unpredictable in fact, that you got killed by something from a different brand entirely that isnt even in the game experience

A person
posted to Share by SamKat13

How didn't this get so many upvotes?

The Warring Kingdom
posted to Share by VulcanWM

you could make it wait for a correct input to stop it crashing when you dont enter a number

value=input("enter a number ")
while not (value.isdigit() and 0<int(value)<10):
  value=input("\033[Fenter a number \033[J")

V example to show it working
https://repl.it/@Nettakrim/CoarseWindingCallbacks

or alternatively for buying troops you could make it so entering something that isnt a number makes it go back to the menu

https://maxdonalds.mcutten.repl.run/ is something i made a while ago that uses both of those (its also generally incredibly well polished UI wise)

Random scenarios!
posted to Ask by CoolJames1610

While walking to the shops you accidentally summon Cthulhu, -10 sanity

the best game in the planet!
posted to Share by potatojs

the best game in the planet!
posted to Share by potatojs

good morning @potatojs

Repl-Customs!!! (v1)
posted to Share by frissyn

this is cool!
a "most popular posts" would be cool, also if you dont have a description it just says "None" next to your name

The Maze, but its cool
posted to Share by Muffinlavania

@InvisibleOne i think @ChezCoder told me how to do it like 5 months ago if you want to trace it back that far

another interesting thing is you can use "\033[?25l" to hide the cursor and "\033[?25h" to show it

Finite
posted to Share by choclatechip

there isnt a limit on doors
you can enter door 12 despite the fact there are only 3
you can also enter door cat

GAME - SURVIVE IN THE BOX RISK CHALLENGE 🧐
posted to Share by InvisibleOne

@InvisibleOne if your wondering what its doing, its moving the cursor to the top left, then printing which overwrites the previous text, therefore the background blue color never appears
in usual cases (eg printing text) it wont work properly as if you print abcd then \033[H then hi it will result in hicd

[2] C++ Made EZ!!!
posted to Tutorials by Bookie0

you can also specify RGB values for ansi escape sequences
this can be done with
\033[38;2;<r>;<g>;<b>m
you can also set the RGB of the background using
\033[48;2;<r>;<g>;<b>m
(ive used ansi escape sequences alot)

Age-based Drinking Decider
posted to Share by FinleyCattle

i guess ill just have to die of dehydration as im not allowed to drink

Fractal Maker
posted to Share by Nettakrim

fixed it

Fractal Maker
posted to Share by Nettakrim

@mwilki7 UUUUH

The Warring Kingdom
posted to Share by VulcanWM

@VulcanWM obviously you would change 0<int(value)<10 so that the <10 is the maximum of something you can do (also changed to <=10)

hi this is flappy bird but....3D!!!!
posted to Share by potatojs

@potatojs
in script.js if you put this just after the pipe spawner

  if ((frameCount) % 100 == 20 && frameCount>300) {
    score++
    console.log(score)
  }

then the score variable will tick up one every time you pass a pipe
if i knew haw JavaScript worked i would also give the code to make the score show up but i dont so ‾\_(' . ')_/‾

Dog Year calculator
posted to Share by crazyclown05

wow scooby-doo is 217 years old!

My Reminder Bot
posted to Share by VulcanWM

@DynamicSquid @studentAlfredAl i made a fork where you dont have to put in your password (obviously it still needs your email) https://repl.it/@Nettakrim/Reminder-bot

My Reminder Bot
posted to Share by VulcanWM

wouldnt it be better if you made it send an email with your account (prob a throwaway one anyway) that would be stored in environment variables?
then you just need to input [email protected] and not your password

hi this is flappy bird but....3D!!!!
posted to Share by potatojs

@potatojs is 11 days soon lol

[Name Your Game]
posted to Share by CoolJames1610
Benford's Law
posted to Ask by robert53e

after looking at the wiki of Benfords Law for a while i came up with this

you get the first value of each point of data like this

#short list of data that very much doesnt follow benfords law
data=[12,21,99,99,99]
leading=[int(str(x)[0]) for x in data]
print(leading)
>[1,2,9,9,9]

then you can get the count of each value like this

count=[(leading.count(x),x) for x in set(leading)]
print(count)
>[(1, 1),(1, 2),(3, 9)]

now we can easily get the frequency of each value

for x in count:
  print(x[0]/len(data),x[1])
>(0.2, 1)
>(0.2, 2)
>(0.6, 9)

as you can see it outputs the frequency of each number next to the number
this means we can now test each number in the list to see if they are close to the expected probablity

#tolerance is so you can have a bit of uppy downy with it still satisfying benfords law
from math import log10 as log
tolerance=0.1
#expected probability
satisfy=[log(d+1)-log(d) for d in range(1,10)]
print(False not in [(x[0]/len(data))*(1+tolerance)>satisfy[x[1]-1]>x[0]/len(data)*(1-tolerance) for x in count])
>False

obviously it outputted false due to the data entered, however it will be true with data that does satisfy benfords law

finally we can put this all in a function

from math import log10 as log
def benford(data,tolerance=0):
  leading=[int(str(x)[0]) for x in data]
  count=[(leading.count(x),x) for x in set(leading)]
  satisfy=[log(d+1)-log(d) for d in range(1,10)]
  return False not in [(x[0]/len(data))*(1+tolerance)>satisfy[x[1]-1]>x[0]/len(data)*(1-tolerance) for x in count]

print(benford([12,21,99,99,99],0.1))
>False
print(benford([10,10,10,10,10,10,20,20,20,20,30,30,30,40,40,50,50,60,60,70,80,90],0.3))
>True

now you can call the function easily
benford(data,tolerance)
data is just a list of data points (tuple also works)
data points can be any length i just only did two digit numbers for simplicity, they can also be strings!
THEY CAN NOT BE BELOW 1
tolerance is how much leeway there is
calculated as chance*(1+-tolerance)
if tolerance is left blank then it will be 0, but then it will never output True
NOTE: you need to have from math import log10 as log