#voice-chat-text-0
1 messages · Page 933 of 1
😂
nevermind guys
i am gonne let the uniform
gonna*
fuction
function
thank u
hahhaha
hhhhhh im gonna submit the project to school, and i am not allowed to use any library
even
?? gcc is just GNU C Compiler
python function **
what is?
do you mean cython ? o-O
ah
@verbal hemlock i have a cold and hard to talk 😦
i am in my bed in a blanket
and playing rocket league
lol
no there is another one
yeah i know numba
wish to see you happpy
i'm not sad just annoyed
i am importing
cuz my nose is blocked
also msvc is easier to set up and has more tooling on windows then gcc
wait
its an operating system
xD i do too what a surprise
although only in a vm right now since i only have 1 pc rn
i will eventually get a separate pc just for linux tho
i wanna do that too but rocket league dropped linux support 1 year a go
m doing dual boot to
i've struggled with dual booting too much in the past already
i don't wanna do it again
but i ve never used it
also if i can have both on at the same time its just better
like a decent laptop with no gpu just for linux (i don't use desktop environments anyways so shouldn't ever lag)
and a gaming pc
i do use wsl as well
like half my development happens in wsl
🙂
also for using docker in windows you have to use wsl as the backend for it
unless you have windows pro
atleast they allow it through wsl
and honestly i'd much rather make linux images either ways
lol
before wsl 2 yeah
idk if it was before wsl 1 though
reda, its okey stop trying that shit i guess there is a miss understunding
understanding*
im gonne leave ciao ciao
i see thank u
from random import uniform
from collections import namedtuple
import sys
Point = namedtuple('Point', 'x y')
def generate_random_point():
return Point(uniform(-1, 1), uniform(-1, 1))
def is_in_cercle(point):
return (point.x ** 2 + point.y ** 2) <= 1
def main():
number = int(sys.argv[1])
count = 0
for i in range(number):
if is_in_cercle(generate_random_point()):
count += 1
print((4 * count) / number)
if __name__ == "__main__":
import time
start_time = time.time()
main()
print("--- %s seconds ---" % (time.time() - start_time))
hello
yeah, its like it is based on some things like time or others
wont it get detected?
bruteforce is not allowed
i am able to crack this only
till now
what
what is the answer dude
yeah something affects it major to have the output
like coin flip, I think its based on force used to flip the coin
there's ways to get something close thoughh
i remember something which used you're mic's input, your camera and your cpu's temprature to get randomness
bruh it;s not working
only lowercase letter and numbers allowed no special case i can white in answer
hi
hi
stop learning
yeah, it happens
try different things, usually when im like that, I switch to learning video editing instead
nothing could help me
I just didn't cry loud
yeah, then if you're burned up with something also, go back to programming but if all fails, cry silently
what was question?
wasn't it about for example hot water?
make something satisfying
but every step forward is in awake
like a really smooth ui
or a fun game with co-op to play with friends or even family
or just cool vfx
I actually stopped programming for a year because I feel like I'm not progressing, then learned video editing in that year so that no time will be wasted. While doing video editing I decided to learn python
so Im back at programming now
@burnt basinhow to check source of page
when i'm burnt out i just learn a different language xD
?? what do you mean by client side
yeah
nice
we are allowed to attack website
is that website provided by your school?
oh nice
and that's ladies and gentlemen what we call a stereotype
cuz i'm tall as well but i don't have a deep voice
lol
but i'm only tall by normal standards
probably on the shorter end by nba standards
Hello 👋
if len(strParam) < 25 and len(strParam) > 4:
You could do this in regex: ```py
if re.fullmatch(r".{5,24}", strParam):
Sorry, what did you ask?
Yep [0-9a-zA-Z_]+
[a-zA-Z\d_]
if 4 < len(strParam) < 25 and re.match(r"[a-zA-Z\d_]", strParam):
if re.match(r"[a-zA-Z\d_]{5,24}"):
If it wasn't clear, [a-zA-Z0-9_] is short for: ```
[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]
I find it easier to use [] for this.
Yep 👍
Yeah I've always found it more explicit to write [0-9] rather than \d
[a-zA-Z\d_]
import string;[string.ascii_letters + string.ascii_digits]
^
Yeah, that matches the beginning of the string.
line*
^
Ah, I think this depends on which method you use, and whether you use the re.MULTILINE flag.
Rapture, maybe give these exercises a try sometime: https://regexone.com
RegexOne provides a set of interactive lessons and exercises to help you learn regular expressions
function CodelandUsernameValidation(str) {
// code goes here
const valid_reg = /^[A-Za-z]\w+[A-Za-z0-9]$/;
const valid_length = (str) => str.length >= 4 && str.length <= 25;
return valid_reg.test(str) && valid_length(str);
}
// keep this function call here
console.log(CodelandUsernameValidation(readline()));
import re
def CodelandUsernameValidation(strParam):
# code goes here
if re.match(r"^[a-zA-Z][a-zA-Z\d_]{6,23}[^_]$", strParam):
return 'True'
else:
return 'False'
# keep this function call here
print(CodelandUsernameValidation(input()))
if re.match(r"^[a-zA-Z][a-zA-Z\d_]{6,23}[^_]$", strParam):
return 'True'
return 'False'
return bool(re.match(...))
import re
def CodelandUsernameValidation(strParam):
# code goes here
return bool(re.match(r"^[a-zA-Z][a-zA-Z\d_]{6,23}[^_]$", strParam))
# keep this function call here
print(CodelandUsernameValidation(input()))
The reason it works is that re.match returns a re.Match object on success, which is truthy, and None on failure, which is falsy.
x is truthy if bool(x) == True.
x is falsy if bool(x) == False.
Erm, by default, class instances are truthy @somber heath
Yeah, I should have said "iff" 😄
But thought that's mathematical jargon.
Hey Vco 👋
h
do you ever just spend 5 hours debugging to realise that it was True where it should have been False


Back later 👋
12
!e
def add_digits(n):
return n%10 + n//10
print(add_digits(12))
@woeful salmon :white_check_mark: Your eval job has completed with return code 0.
3
@somber heath https://www.tiktok.com/@officialarush_jug/video/7026623221319355649?_t=8NVh4BQOnYl&_r=1 have you been to Fucking Australia?
!e
def add_digits(n):
return sum(map(int, str(n)))
print(add_digits(1234))
@woeful salmon :white_check_mark: Your eval job has completed with return code 0.
10
odd_newNum = []
even_newNum = []
def add_digits():
return n % 10 + n//10
number = input("Enter credit card number: ")
if len(number) == 16:
n = 15
for char in number:
n -= 1
if int(number[n]) % 2 == 0:
newNum = number[n] * 1
even_newNum.append(newNum)
elif int(number[n]) % 2 == 1:
newNum = number[n] * 2
if len(newNum) == 2:
add_digits()
odd_newNum.append(newNum)
else:
odd_newNum.append(newNum)
newNum = ''
print(odd_newNum)
print(even_newNum)
6723456970213456
['55', '33', '11', '77', '99', '55', '33', '77']
['4', '2', '0', '6', '4', '2', '6', '6']
I'm not stepping in TikTok, thanks.
I'm not even wearing anything on my feet.
lmao
hello
:incoming_envelope: :ok_hand: applied mute to @lethal wing until <t:1637423677:f> (9 minutes and 59 seconds) (reason: burst rule: sent 8 messages in 10s).
!tvban 906271384647393300 2w as #voice-verification clearly explains,
spamming to get voice verified will only prolong the time it takes to get the role. you can still join voice chats but will not be able to unmute or get voice verified for the time being. thank you for understanding
:incoming_envelope: :ok_hand: applied voice ban to @lethal wing until <t:1638633147:f> (13 days and 23 hours).
@lethal wing and to answer your question, you can use the discord search to search for messages sent from your account to get a rough count. messages sent in bot-commands or similar do not count
newNumList = []
number = input("Enter credit card number: ")
if len(number) == 16:
n = 14
for i in range(5):
newNum = int(number[n]) * 2
newNumList.append(newNum)
n -= 1
newNum = int(number[n])
newNumList.append(newNum)
n -= 1
newNum = int(number[n]) * 2
newNumList.append(newNum)
n -= 1
print(sum(newNumList))
Sadly I couldn’t download the video since some videos don’t allow it 😦
def add_digits(n):
return sum(map(int, str(n))) if len(str(n)) > 1 else n
newNum = add_digits(int(number[n]) * 2)
newNumList = []
def add_digits(n):
return sum(map(int, str(n))) if len(str(n)) > 1 else n
number = input("Enter credit card number: ")
if len(number) == 16:
n = 14
for i in range(5):
newNum = add_digits(int(number[n]) * 2)
newNumList.append(newNum)
n -= 1
newNum = int(number[n])
newNumList.append(newNum)
n -= 1
newNum = add_digits(int(number[n]) * 2)
newNumList.append(newNum)
n -= 1
print(sum(newNumList))
5457623898234113
newNumList = []
def add_digits(n):
return sum(map(int, str(n))) if len(str(n)) > 1 else n
number = input("Enter credit card number: ")
if len(number) == 16:
n = 14
for i in range(5):
newNum = int(number[n])
newNumList.append(newNum)
n -= 1
newNum = add_digits(int(number[n]) * 2)
newNumList.append(newNum)
n -= 1
newNum = int(number[n])
newNumList.append(newNum)
n -= 1
print(sum(newNumList))
&
newNumList = []
def add_digits(n):
return sum(map(int, str(n))) if len(str(n)) > 1 else n
number = input("Enter credit card number: ")
if len(number) == 16:
n = 14
for i in range(5):
newNum = add_digits(int(number[n]) * 2)
newNumList.append(newNum)
n -= 1
newNum = int(number[n])
newNumList.append(newNum)
n -= 1
newNum = add_digits(int(number[n]) * 2)
newNumList.append(newNum)
n -= 1
print(sum(newNumList) - int(number[15]))
!e
def add_digits(n):
return sum(map(int, str(n))) if len(str(n)) > 1 else n
number = "5457623898234113"
root = 0
for i in range(len(number)-1):
if i % 2 != 0:
root += int(number[i])
else:
root += add_digits(int(number[i]) * 2)
print(root)
@woeful salmon :white_check_mark: Your eval job has completed with return code 0.
67
newNumList = []
def add_digits(n):
return sum(map(int, str(n))) if len(str(n)) > 1 else n
number = input("Enter credit card number: ")
if len(number) == 16:
n = 14
for i in range(5):
newNum = add_digits(int(number[n]) * 2)
newNumList.append(newNum)
n -= 1
newNum = int(number[n])
newNumList.append(newNum)
n -= 1
newNum = add_digits(int(number[n]) * 2)
newNumList.append(newNum)
n -= 1
total = sum(newNumList) - int(number[15])
Base10 = total % 10
if 10 - Base10 == int(number[15]):
print('Valid')
else:
print('Not Valid')
!e
def add_digits(n):
return sum(map(int, str(n))) if len(str(n)) > 1 else n
number = "5457623898234113"
root = 0
for i in range(len(number)-1):
if i % 2 != 0:
root += int(number[i])
else:
root += add_digits(int(number[i]) * 2)
print(root)
Base10 = root % 10
if 10 - Base10 == int(number[15]):
print('Valid')
else:
print('Not Valid')
@woeful salmon :white_check_mark: Your eval job has completed with return code 0.
001 | 67
002 | Valid
!with
The with keyword triggers a context manager. Context managers automatically set up and take down data connections, or any other kind of object that implements the magic methods __enter__ and __exit__.
with open("test.txt", "r") as file:
do_things(file)
The above code automatically closes file when the with block exits, so you never have to manually do a file.close(). Most connection types, including file readers and database connections, support this.
For more information, read the official docs, watch Corey Schafer's context manager video, or see PEP 343.
def add_digits(n):
return sum(map(int, str(n))) if len(str(n)) > 1 else n
number = input("Enter credit card number: ")
root = 0
for i in range(len(number)-1):
if i % 2 != 0:
root += int(number[i])
else:
root += add_digits(int(number[i]) * 2)
Base10 = root % 10
if 10 - Base10 == int(number[15]):
with open('CreditCards.txt', 'a') as f:
f.write(number+' : '+'Valid\n')
else:
with open('CreditCards.txt', 'a') as f:
f.write(number + ' : ' + 'Not Valid\n')
!e
print(' name\n\n\n'.strip())
@frozen jetty :white_check_mark: Your eval job has completed with return code 0.
name
perchta
LOL 5 * 3 = 15 you're adding 15 of them regardless
and -1 index is the last letter
so you just needed to do the way you were doing it earlier like i said
Help !!!
code = self.regcode.text()
if len(code) == 0:
self.error.setText("The field is empty.")
else:
con = pymysql.connect(host="localhost" , user="root" ,passwd="" ,db="dbcodes")
cur = con.cursor()
query = 'SELECT Codes FROM mycodes WHERE Codes =\''+code+"\'"
cur.execute(query)
con.commit()
con.close()
result_code = cur.fetchone()[0]
if result_code == code:
print("okay")
else:
self.error.setText("Invalid code. Try again.")```
the program crashes when the query cant find the value on the sql database
sorry im just a newbie an undergrad
#❓|how-to-get-help
i'm about to goto sleep so i can't help too much rn so probably open a help channel
but also please don't concatenate strings to create a query as its prone to sql injections
do it like
cur.execute("SELECT Codes FROM mycodes WHERE Codes = ?", (code,))
this will let the library handle sanitizing and constructing the query
I was too
@woeful salmon help is not working
its still crashes
all so idk how to apply what he sent
cur.execute("SELECT Codes FROM mycodes WHERE Codes = ?", (code,))
@frozen jetty any help?
let me see
code = self.regcode.text()
if len(code) == 0:
self.error.setText("The field is empty.")
else:
con = pymysql.connect(host="localhost" , user="root" ,passwd="" ,db="dbcodes")
cur = con.cursor()
query = "SELECT Codes FROM mycodes WHERE Codes = ?"
cur.execute(, (code,))
con.commit()
con.close()
result_code = cur.fetchone()[0]
if result_code == code:
print("okay")
else:
self.error.setText("Invalid code. Try again.")```
when the result_Code != code the program breaks
else:
doesnt work
cur.execute(, (code,))
ill try
cur.execute("SELECT Codes FROM mycodes WHERE Codes = ?", (code,))
i tried this but still doesnt works
when i run the program if statement works but when i give a string that cant be found in the database the else statement crash and doesnt work
import sys
from PyQt5.uic import loadUi
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QDialog, QApplication,QWidget
import re
class StartReg(QDialog):
def __init__(self):
super(StartReg, self).__init__()
loadUi("Ui/Start-Reg.ui", self)
self.verify.clicked.connect(self.gotoreg)
def gotoreg(self):
code = self.regcode.text()
if len(code) == 0:
self.error.setText("The field is empty.")
else:
con = pymysql.connect(host="localhost" , user="root" ,passwd="" ,db="dbcodes")
cur = con.cursor()
cur.execute("SELECT Codes FROM mycodes WHERE Codes = ?", (code,))
con.commit()
con.close()
result_code = cur.fetchone()[0]
if result_code == code:
print("okay")
else:
self.error.setText("Invalid code. Try again.")
class RegScreen(QDialog):
def __init__(self):
super(RegScreen, self).__init__()
loadUi("Ui/Reg.ui", self)
self.next.clicked.connect(self.gotonext)
#main
app = QApplication(sys.argv)
start = StartReg()
widget = QtWidgets.QStackedWidget()
widget.addWidget(start)
widget.setFixedHeight(300)
widget.setFixedWidth(450)
widget.show()
try:
sys.exit(app.exec_())
except:
print("exiting...") ``` heres the rest of the code
cur.execute(query)
btw the data base has 1 column name name Codes
for s in cur:
print(s)
print (cur)
where do i put print(cur)
cur = con
Remove (code, )
<pymysql.cursors.Cursor object at 0x0000029F18631E48>
Good
Does it print (s)?
No errors or crashes?
Do you insert anything before?
@scenic windhey rapture, sorry but as of now if a mod isn't currently present in vc and willing, we can't grant stream perms
when i entered the correct code it redirects but when i dont it crashes
oh ok sorry aswell didnt think to just @ you
np!
I don't know what it is?
Try:
Except:
Pass
if len(param) == 8 and ...... and ............ and ......... and ......... :
if len(registration) == 8 and re.match(r'^[a-zA-Z]{2}\d{2}\s[a-zA-Z]{3}$', registration):
import csv
import re
def main():
DISTANCE = 1
registration = input("What is the registration of the car? ")
camera2 = int(input("How many seconds was it to get from camera 1 to camera 2? "))
speed = DISTANCE / camera2
speed = speed * 3600
if speed > 70:
speedingYorN = 'Yes'
else:
speedingYorN = 'No'
reg_valid(registration)
with open('File.csv', 'a') as f:
writer = csv.writer(f, delimiter=',')
writer.writerow([registration, camera2, speed, speedingYorN])
def reg_valid(registration):
# Regex = starting 2 character letters?, then 2 digits?, then space followed by 3 letters?
if len(registration) == 8 and re.match(r'^[a-zA-Z]{2}\d{2}\s[a-zA-Z]{3}$', registration):
return 0
else:
exit()
main()
@scenic wind :x: Your eval job has completed with return code 1.
001 | What is the registration of the car? Traceback (most recent call last):
002 | File "<string>", line 30, in <module>
003 | File "<string>", line 7, in main
004 | EOFError: EOF when reading a line
import re
def CodelandUsernameValidation(strParam):
# code goes here
return bool(re.match(r"^[a-zA-Z][a-zA-Z\d_]{6,23}[^_]$", strParam))
# keep this function call here
print(CodelandUsernameValidation(input()))
if (str.length < 4 || str.length > 25) return false;
if (str.charAt(str.length - 1) === '_') return false
if (!startsWithLetter(str.charAt(0))) return false;
for (const letter of str) {
if (!isAlphaNumericOrUnderscore(letter)) return false;
}
return true;
}
function startsWithLetter(char) {
const letter = /^[a-zA-Z]+$/;
return char.match(letter) ? true : false;
}
function isAlphaNumericOrUnderscore(char) {
const letterNumber = /^[0-9a-zA-Z]+$/;
return (char.match(letterNumber) || char === '_') ? true : false;
}
// keep this function call here
console.log(CodelandUsernameValidation(readline()));
import re
def CodelandUsernameValidation(strParam):
return bool(re.match(r"^[a-zA-Z][a-zA-Z\d_]{6,23}[^_]$", strParam))
print(CodelandUsernameValidation(input()))
hanime.tv
Mortis.com is a strange website that existed in the late 1990’s to early 2010’s the website simply prompted users for a domain and password to enter the site, but no one could figure out what was actually hidden in the terabytes of data the website stored? So what could it be?
Thank you all so much for the recent support on the channel. Let me ...
.
.aoc subscribe.
**```
.adventofcode
**Can also use:** `aoc`
*All of the Advent of Code commands.*
**Subcommands:**
**`about `**
*Learn about Advent of Code*
**`countdown `**
*Return time left until next day*
**`join `**
*Learn how to join the leaderboard (via DM)*
**`stats `**
*Get daily statistics for the Python Discord leaderboard*
**`subscribe `**
*Notifications for new days*
:x: Failed to get join code! Notified maintainers.
.aoc subscribe
Okay! You have been subscribed to notifications about new Advent of Code tasks. You can run .adventofcode unsubscribe to disable them again for you.
import re; print(bool(re.match(r"^[a-zA-Z][a-zA-Z\d_]{6,23}[^_]$",input())))
@scenic wind
you know regex?
@scenic wind
I need help with regex
I want the name in this text
name: Alex
code : 123
I want name next to (name:) and before (code:)
it could have [\n or numbers] between (name:) and (code:)
could it have [.*]?
HEY
Hola
como estas
can't talk 'cuz I'm apparently making too much noise
so I'll type instead
yeah
next point:
I'd change the white text on light background; it's hard to read
@verbal hemlock use an embed
munches stroopwafel
I can't correct you
can't speak
bruh
yes
no
no
no
it's not the trilled r
bruh
stop teaching yali bad dutch
more like 1
but not exactly
also depends on dialect
so you see it changes with class, age, location
much better with main text
now the top text
you have white on light background
not very readable
no
in the top border
this
k
np
it's quite large considering that they haven't had a government since the 90's
well no shit in the capital
post the link then
post
it
please
k whatever
thanks
Note: we no longer include data sourced from social media platforms in our internet user numbers, so the numbers shown above and in our complete Digital 2021 reports are not comparable with numbers published in our reports from previous years.
👀
so what is the precise issue
generally it shouldn't be erroring at all, except for cooldown
on a cooldown, you would handle it in a certain way
other errors woul be handled differently
You usually write a separate central section for catching errors
a so-called error handler
how do you mean "in a certain way?"
it's code which runs
yeah, build it up outta try-excepts
Post one
you need to know why a command is failing to handle it
sure
post both the error and the code obviously
use a pastebin
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
well, I'll need to know the error to fix it
so yeah
are you using async properly?
idk lol
could be that the bot is stuck waiting for your answer
and not doing anything else meanwhile
or, it could be that the API is limiting bot calls
it does, you know
uh
can I see your code
the pastebin or whatever
# archive channel
@slash.slash(name="archive-channel-admin",
description="Move channel to archive category",
guild_ids=GUILD_IDS)
async def _archive_channel(ctx: SlashContext):
archive_category = discord.utils.get(ctx.guild.channels, name="Archive")
channel_name = str(ctx.channel.name)
logger.info(f"Archiving channel: {channel_name}")
await ctx.channel.edit(category=archive_category, name=channel_name)
# interaction requires a response or fails otherwise
await ctx.send("archived")
# archive channel
@slash.slash(name="archive-channel-admin",
description="Move channel to archive category",
guild_ids=GUILD_IDS)
async def _archive_channel(ctx: SlashContext):
archive_category = discord.utils.get(ctx.guild.channels, name="Archive")
channel_name = str(ctx.channel.name)
logger.info(f"Archiving channel: {channel_name}")
await ctx.channel.edit(category=archive_category, name=channel_name)
# interaction requires a response or fails otherwise
await ctx.send("archived")
no clue
I'd have to see the error, sorry
next time it throws an error, ping me with it
then I'll take a look
or try raising it now
see if you get it to give the error
future: <Task finished coro=<SlashCommand.sync_all_commands() done, defined at /Users//opt/anaconda3/lib/python3.7/site-packages/discord_slash/client.py:415> exception=Forbidden('403 Forbidden (error code: 50001): Missing Access')>
Traceback (most recent call last):
File "/Users//opt/anaconda3/lib/python3.7/site-packages/discord_slash/client.py", line 439, in sync_all_commands
existing_cmds = await self.req.get_all_commands(guild_id=scope)
File "/Users//opt/anaconda3/lib/python3.7/site-packages/discord/http.py", line 248, in request
raise Forbidden(r, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access```
idk lol, numpy and shit is more stable
Do you think that's error is because of python version
yes
Interaction tokens are valid for 15 minutes and can be used to send followup messages but you must send an initial response within 3 seconds of receiving the event. If the 3 second deadline is exceeded, the token will be invalidated.
can someone help me explain a code?
hmm
basically your token is expiring
Well it's the first thing I get when I start up the bot
But there's no interactions when bot get's started right?
it's generated when you call your async def _archive_channel()
that does many API calls
wdym?
I think so
you got a 403, not a 404
!reminder list
No active reminders could be found.
morning hajaa
@somber heath sorry if it seemed like I was ignoring you opal apparently my mic is broken
Hi oof 😄 it's afternoon here tho. Happy Sunday
All good. I gave it very little thought.
i went server hopping and was talking to myself all the time 🤪 turned out no one could hear me
👀 i've done that
my mic has a switch on the side and i had made it turn off by touching it on the chair
it turned off and i was talking to myself for half an hour in this server's vc
!d turtle.tracer
turtle.tracer(n=None, delay=None)```
!d turtle.speed
turtle.speed(speed=None)```
!d turtle.delay
turtle.delay(delay=None)```
!d turtle.update
turtle.update()```
Perform a TurtleScreen update. To be used when tracer is turned off.
!d turtle.clear
turtle.clear()```
Delete the turtle’s drawings from the screen. Do not move turtle. State and position of the turtle as well as drawings of other turtles are not affected.
@crystal urchin yo
haaaha exactly and u wonder why everybody's ignoring u
yep
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
class fileToWatch(object):
def __init__(self):
self._cached_stamp = 0
self.filename = open(object)
def fileChanged(self):
stamp = os.stat(self.filename).st_mtime
if stamp != self._cached_stamp:
self._cached_stamp = stamp
urllib.request.urlopen(f"http://gdcheerios.com/refresh/{info.osu_username}")
file = fileToWatch
while True:
time.sleep(0.05)
file.fileChanged(f"{info.osu_path}/scores.db")
while True:
time.sleep(0.05)
print("taco")
file.fileChanged()
def fileChanged(self):
stamp = os.stat(self.filename).st_mtime
if stamp != self._cached_stamp:
self._cached_stamp = stamp
print("score change found, refreshing data...")
urllib.request.urlopen(f"http://gdcheerios.com/refresh/{info.osu_username}")
else:
print("checking")
Join the challenge or watch the game here.
@gentle flint hello?
tell me when ur done 🙂 i wanna try my non-existent skills against you next
Hi reaper
Itsokay
Hoy, all.
Pardon?
Ah. Hi hi.
I am capable of managing myself. 🙂
Thank you for your interest.
I'm choosing to not talk at this time and in this location out of consideration for others in the household. It is night.
Were I in my room, the situation would be different.
Hi
I loke waffle fries
Like
I like to talk
Heloo
Hello
Kdd
When i get the
Water
I put it on your daughter
Gg
That was bad
Im bad
Hehehe
Heh
Hehhhhhhhhhhhhhhhhhhhhh
Hi
Im bored
output = sp.run(f"python3 {self.path}", capture_output=True)
print(output.stdout.decode())
/home/ibrahim/PycharmProjects/t/main.py
Traceback (most recent call last):
File "/home/ibrahim/PycharmProjects/PyLite/src/main.py", line 59, in run
output = sp.run(f"python3 {self.path}", capture_output=True)
File "/usr/local/lib/python3.7/subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'python3 /home/ibrahim/PycharmProjects/t/main.py': 'python3 /home/ibrahim/PycharmProjects/t/main.py'
hey guys I've got a code which is giving me an error and I'd like someone to help me out
what's the error
if you see I've imported a module which is a csv file and it need to return a dictionary but I'm getting this error which I don't get
where have you defined load_dataset
I defined it in a different py file where I created the function with name the load_dataset
you need to import it then
like import filename
then filename.function_name
@dense ibex just remove that and run npx create-next-app@latest --ts
it will create you a project with typescript set up and without all that crap
@dense ibex
Disnake
omg it's so kayoot!
:3
lol
dev
There's no code...
Hello 👋
👋
Erm, yeah I'm not very creative 😄
!e ```python
async def coro():
return None
print(coro())
@brave steppe :white_check_mark: Your eval job has completed with return code 0.
001 | <coroutine object coro at 0x7f8fcb0c3d80>
002 | <string>:4: RuntimeWarning: coroutine 'coro' was never awaited
003 | RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Probably thinking of UDP
QUIC
I don't think it actually stands for anything any more.
i'm still way behind on whatever they're doing with http3
i only know it uses UDP and prevents packet loss even with that
pycharm bery good for python
does any body have a code for comparing a single string to a database and comparing them if they are the same
No that seems very specific 😅
When you say database, you mean like an SQL database?
yes
don't think so, i just used vimtutor
code = self.regcode.text()
if len(code) == 0:
self.error.setText("The field is empty.")
else:
con = pymysql.connect(host="localhost", user="root", passwd="", db="dbcodes")
cur = con.cursor()
query = 'SELECT Codes FROM mycodes WHERE Codes ='
cur.execute(query)
result_code = cur.fetchone()[0]
if code == result_code:
reg = RegScreen()
widget.addWidget(reg)
widget.setCurrentIndex(widget.currentIndex() + 1)
print("Valid code.")
print("no")
else:
self.error.setText("Invalid code.")```
i have this code and it seems it doesnt work
I'm not familiar with the library, but this is the SQL query? 'SELECT Codes FROM mycodes WHERE Codes ='
What columns does the table have?
jake's opinions aren't fact? 🤔
'SELECT Codes FROM mycodes WHERE Codes'
but ithe out put is it only fetch the 1st row of the column Codes. I want to read all rows and compare each row to my code = string
correct, jakes opinion is the law

:gpa_frog_wave:
Do you want all of the rows where the Codes attribute equals the string code exactly?
🐸
no i just want to pick one row that equals to code
@runic forum pls watch your mic input.
@dense ibex
https://www.amazon.com/YIBER-Disposable-Protective-permeability-repellency/dp/B08R3K8N5J/ref=sr_1_5?keywords=hazmat+suits&qid=1637513192&sr=8-5
get one of these and go
Erm @hexed vault perhaps ask in #databases, as I've not used this library.
actually i'm go to the shop, I need energy for this history revision
What's everyone up to? 😄
sorry i dont understand im a noob
I think I remember saying about 1 year ago that I was going to learn rust 
by now I suppose you're growing slightly rusty
this is the tune btw
it was going
around
and around
and around
in my head
Provided to YouTube by Emubands Ltd
The Tree of Luck · Hamish Napier
The Woods
℗ 2020 Strathspey Records
Released on: 2020-06-20
Producer: Andrea Gobbi
Composer: Hamish Napier
Arranger: Hamish Napier
Arranger: Steve Byrnes
Auto-generated by YouTube.
especially the bit from 00:48 onwards
it's not that good either
just was stuck in my head
most frustrating
Yeah, I can see how that could get stuck in your head.
Which is the better language server: rust-analyser, or RLS?
I've heard rust-analyzer is apparently the better one?
@vivid palm
hello!
i want video role
ah, sorry they are granted on a case by case basis with stricter monitoring than what we did previously. sorry i won't be able to grant them right now
do you need help with some python though?
no
https://store.steampowered.com/app/437920/Tricky_Towers/
@whole bear tetris multiplaye with physics
Grab your wizard’s robe and spell book, time to use your engineering skills and build some Tricky Towers! Stack your bricks and use your spells to create the tallest stable tower, for what self-respecting wizard wouldn’t want to show off their skills by towering literally over their peers! But be wary of jealous rivals, who will try and push you...
$14.99
7846
80
Online multiplayer puzzle game
Wow, Jake is getting absolutely destroyed 😄
that is the whole point, since its for people to implement if they want their own, lol
kinda what abcs are for :P
!str-join
Joining Iterables
If you want to display a list (or some other iterable), you can write:
colors = ['red', 'green', 'blue', 'yellow']
output = ""
separator = ", "
for color in colors:
output += color + separator
print(output)
# Prints 'red, green, blue, yellow, '
However, the separator is still added to the last element, and it is relatively slow.
A better solution is to use str.join.
colors = ['red', 'green', 'blue', 'yellow']
separator = ", "
print(separator.join(colors))
# Prints 'red, green, blue, yellow'
An important thing to note is that you can only str.join strings. For a list of ints,
you must convert each element to a string before joining.
integers = [1, 3, 6, 10, 15]
print(", ".join(str(e) for e in integers))
# Prints '1, 3, 6, 10, 15'
@scenic wind can you show?
just curious now, lol
n = int(input())
for i in range(n):
print(i + 1, end="")
ez :P
Weird question, but I'm assuming they want you to solve it numerically?
Like they want you to do the maths that results in the number 12345, e.g.
is there an eval bot here?
!help eval
!eval [code]
Can also use: e
*Run Python code and get the results.
This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*
@stable pagoda ^^
!eval ```py
n = int(input())
for i in range(n):
print(i + 1, end="")
@stable pagoda :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
for i in range(n):
print(i+1, end="")
Yeah, that'll work.
!eval ```py
n = 5
for i in range(n):
print(i + 1, end="")
@stable pagoda :white_check_mark: Your eval job has completed with return code 0.
12345
cool
Yep, you could do that with regex I think.
A weird solution to the problem from earlier: ```py
def solve(n):
result = 0
for i in range(1, i+1):
if 0 <= i < 10:
result *= 10
elif 10 <= i < 100:
result *= 100
elif 100 <= i < 1000:
result *= 1000
result += i
print(result)
!eval ```py
def solve(n):
result = 0
for i in range(1, n+1):
if 0 <= i < 10:
result *= 10
elif 10 <= i < 100:
result *= 100
elif 100 <= i < 1000:
result *= 1000
result += i
print(result)
solve(30)
Ah no.
@stuck furnace :white_check_mark: Your eval job has completed with return code 0.
123456789101112131415161718192021222324252627282930
Yep 😄
Yeah so, it should be fairly straight forward.
If you can do each of the parts individually, you can just paste them together.
The username part?
Don't spam though please @whole bear
Well, how would you match the first part (just the username)?
They say it's a sequence of letters numbers and underscores (and dashes).
¯_(ツ)_/¯
|| (.*)@(.*)\.([a-zA-Z]{0,3}) ||
re.match(f'[a-zA-Z0-9\d-_]')
👍
Well actually, that would only match a single character.
The username is one or more characters, right?
re.match(r'[a-zA-Z]{>=3}')
||([a-zA-Z0-9_]*)@([a-zA-Z0-9]*)\.([a-zA-Z]{0,3})||
ig this is more than they want
!tvban 818831551173361724 4d Spamming to get voice verified isn't the way to go
:incoming_envelope: :ok_hand: applied voice ban to @whole bear until <t:1637862177:f> (3 days and 23 hours).
Can you spoiler that please.
Oh you did 🤔
i did :P
It didn't show as spoilered for me 😄
* means zero or more.
greedy
Like how + means one or more.
So a* matches '', 'a', 'aa', 'aaa' etc...
||([a-zA-Z0-9-_]+)@([a-zA-Z0-9]+)\.([a-zA-Z]{0,3})||
And a+ matches 'a', 'aa', 'aaa', etc... (but not '')
Doesn't matter, as long as it's not interpreted as a character range.
^
So the - in [a-z] is part of the character range a-z.
If you wanted to also match -, you would do [a-z-]
Bit weird I know.
for that function
you could just cast to a bool
anybody down for a clash of code?
One sec 😄
i can't too
You're going down 😄
i need some role but idk
Wait what?
lol
I didn't load for me 
rip
@vivid palm henlo
ohh hi
how you doin?
p good, you?
1st year?
because its not lighting up, lol
I have done my code the weirdest way it is possible
Ah yeah, that's how uni is.
lmao
The annoying thing about this site is you have to create a new room for each round 
yep :c
i dont know any better one
Let's go another one
@scenic wind

Anyone else want to join in?
yep :D
There is the other website I used to do, something like code wars...but it isn't
This fun
i was waiting for firefox
And that website / webapp is slow
since they joined last time
BinarySearch is pretty challenging though.
@violet pawn you want to join?
Hm 🤔
or should i just start
I feel like Rapture would have trouble without algorithms knowledge.
code here :)
dw dw :)
o7
Did not know that was a new link LUL
@scenic wind you've got some weird static coming through intermittently.
I think you might need to raise your mic threshold slightly.
You can do it @scenic wind
Basically they're asking you to sum up the squared differences of successive numbers.
So, keep track of the previous number.
Then you can get the difference by subtracting it from the current number.
The first number is a special case because it doesn't have a previous number.
Then you square that difference, and add it to a running total.
import sys
import math
y_s = []
# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
n = int(input())
for i in input().split():
x = int(i)
# Write an answer using print
# To debug: print("Debug messages...", file=sys.stderr, flush=True)
for i in range(n):
x[i+1] - x[i]
for i in range(n-1):
t = (x[i+1] - x[i]) ** 2
t += t
print(t)
t = 0
for i in range(n-1):
t += (x[i+1] - x[i]) ** 2
print(t)
Note that you need a list of numbers.
I mean you're treating x as if it's a list.
But you can make it a list by changing this section:
n = int(input())
for i in input().split():
x = int(i)
to ```py
n = int(input())
xs = []
for i in input().split():
xs.append(int(i))
Yep!
Then replace x in your code with xs.
Oh yeah, you can name it x sorry.
x = list(map(int, input().split()))
I have to go, bye
Erm, want to do another one? 😄
Want me to start it?
Should I include shortest?
@whole bear @scenic wind 
Want to join in @brave steppe @whole bear?
wohn`t be since i am writing something
😦
Well, three and a bit 🤔
Oh yeah for sure, but whenever I look at the code I get so confused. Wherever I look there's just ABC
it was so obvious
Do you know any famous numbers?
anything under api is abcs for people to make their own impl if they want it
for the default impl look under impl
Lol my family shut down the internet to force me to cook dinner. So I've been gone for like an hour
oh no😆
been there, so annoying
So you're basically Cinderella? 😄
Yess, and my mother loved the steak I cooked so this for sure will be happening again
But even when you look at hikari/ there's mixes of ABCs as well
Ah you missed a trick: cook badly then no one will ask you to cook for them.
You do need to round your answer @scenic wind
lol
because we make use of them, thats what abcs are for :P
to define the interfaces
Alright, everyone ready?
Ah shortest.
Yeah, you can spend as much of the available time as you like to shorten your solution.
Basically code golf.
Ah no @brave steppe, it's shortest mode.
Do you guys want to start again now everyone gets it?
look at my code xD
Yeah I see them used a lot inside of the library itself - it's just confusing from an outside perspective having a glance
its sad
I can't 😦
Erm, you haven't clicked share.
👍
Ah no 😄
So they're asking you to first convert to hexadecimal (uppercase), then replace 0 with O.
It's a bit of a weird question.
Can I see your code?
|| print(hex(int(input())).replace("0","o").upper()[2:]) ||

How do I pronounce your name btw @stable pagoda?
.
and its shared in coc too
There's a share button.
Not sure 🤔
Pro move is to choose your language for the question specifically.
@whole bear it's ending in 30 seconds!
Yeah, you have to create a new room for each round.
Kind of sucks.
and maths
I wonder if Pub is around.
Erm, towards the latter end of my 20s 😄
Without being too specific.
Erm, I think I've been coding since I was 22.
22 👀
No you submitted, I saw it like 30 seconds before it ended
literally have to hv someone to console u for the pain of creating link each time causes

yp just now
:P
@brave steppe There are three modes btw: fastest, reverse, shortest
Reverse is like fastest, but you have to guess what the problem is from the input/output.
oh 😦
Alright, starting at 2:00
This is stressing me out btw I literally cannnot sit still
Yeah it is quite stressful.
tried :c
reconnect?
Can't you?
Ah
A little while ago, my friend showed me a program that encoded a string into "NOSE" encryption. The program makes each letter in a string either the letter "N", "O", "S", or "E". The program decided what to replace each letter with like this:
Let's call the current letter's index in the alphabet "I" (a=1, b=2, c=3)
If "I" is divisible by 2, make the letter "N".
If "I" is divisible by 3 and not 2, make the letter "O".
If "I" is divisible by 5 and not 2 or 3, make the letter "S".
If "I" isn't divisible by 2, 3, or 5, make the letter "E".Your Task:
Make a program that can encrypt a string into "NOSE" encryption.
You should encode spaces as spaces.Note:
"NOSE" encryption is irreversible, so you won't be able to decrypt it.
thx <3
__=__import__("string");_=__.ascii_lowercase;k=5;print(''.join(map(lambda char:[char,_[(_.index(char.strip())+int(k))%len(_)]][char.isalpha()],input().lower())))
😆
Erm, I don't think you read the full question Rapture.
mhm
Ah no sorry.
There's a bit more to the question than that.
Yeah pretty cool
I still haven't got a working solution yet 
Nah I tried to be clever and got messed up.
Go team!
!e ```python
from string import ascii_lowercase
print(''.join([
' ' if n==' ' else
'N' if n%2==0 else
'O' if n%3==0 else 'S'
if n%5==0 else
'E' for n in [' ' if c==' ' else ascii_lowercase.index(c)+1 for c in input()]
]))
@brave steppe :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 7, in <module>
003 | EOFError: EOF when reading a line
I forgot that i % 5 can take on values other than 0 and 1.
Erm, do you want to? I gtg in a minute.
👍
@stable pagoda we finished this one, come back :3
having dinner, might be back later :)
Ah, I see. Enjoy your dinner lol
bon appetite
easy peasy
Alright, going to start.
aight 👍
from string import ascii_lowercase
print(''.join([' ' if n==' ' else 'N' if n%2==0 else 'O' if n%3==0 else 'S' if n%5==0 else 'E' for n in [' ' if c==' ' else ascii_lowercase.index(c)+1 for c in input()]]))
Ahh
Oh, I just realised an easier solution...
Something like: ||math.factorial(n//2) * 2**(n//2)||
Not sure if that's correct though.
I actually like Blue's solution the most.
Codingame actually have an escape-room kind of thing.
Your client is probably having issues @devout mountain
If you're seeing Jake in the VC.
Yeah Jake is nowhere to be found 😮
lol
👋
👋
👋
Alright guys, I have to go 👋
You can create a private room by clicking the ... here:
cya 👋
Cya
@whole bear themed gartic?
@frozen jetty here ^
Fastest: Solve the problem as fast as possible and submit.
Reverse: You get input and output and have to guess what to do.
Shortest: Submit a solution with the least amount of characters (including spaces and newlines, remove those)
@frozen jetty
Your mic is bad
OK I'LL TRY
Oh sorry
is it ok?
I cant say anything in the vc's yet
I myself know a couple of magic words starting with the word "please"
That's weird, try reloading? I don't understand, do you have bad internet?
that would make it sound more mean
please..your mic is bad
that.....was a spiderman reference.....nvm
oh lol
Guys, umm.. I just need to send like 50 messages in order to unlock my voice in vc
So please dont mind the spam
:incoming_envelope: :ok_hand: applied mute to @ripe stratus until <t:1637523492:f> (9 minutes and 59 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).
!tvban 757503149702381658 2w as #voice-verification clearly explains, spamming to get voice verified will only prolong the time it takes to get the role. you can still join voice chats but will not be able to unmute or get voice verified for the time being. thank you for understanding
:incoming_envelope: :ok_hand: applied voice ban to @ripe stratus until <t:1638732569:f> (13 days and 23 hours).
no internet is ok
Yeah that's what we always have to
