#off-topic-lounge-text

1 messages ยท Page 10 of 1

primal bison
#

ello

fossil needle
#

wassup guys

sharp slate
#

Sup

night lily
#

@hazy anchor ๐Ÿ‘‹

timid fjordBOT
#

:incoming_envelope: :ok_hand: applied timeout to @craggy hatch until <t:1702550542:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

craggy hatch
#

Bruh I didn't do that on purpose I just lagged and sent some duplicate messages to see when I stop lagging..

fading wolf
#

Guys is it possible to code a trojan horse with python???

#

I need the answer rn guys

#

Please guys I need the answer rn

maiden notch
#

!rule 5

timid fjordBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

timid fjordBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

inner delta
#

leetcode x ChatGPT tonight.

fading wolf
#

Bing chilling

dull anvil
deft herald
fresh arch
#

if it does you could append the the output to a buffer and use the parser to pull just the bit you want and print it

#

though I am not sure how to have the terminal output to a buffer

spring drift
#

Can someone dm n help me in a program

#

I will send the code i need only output

deft herald
#

@fresh arch I have updated my question please check and also look the comments

primal bison
#

@unborn sorrel just do voidPtr[typeSize*i] = value

#

but you will need to supress a compiler warning/error

#

@agile portal am i correct?

#

it is

#

but you cannot dereference a void pointer i think

#

without casting it first

#

oh wait no

#

you can dereference

#

but you cannot do pointer arithmetic with it

#

without casting it first

#

pointer arithmeitc is used in the arr[idx] operator

mystic ocean
#

Hey any Bash guru over here

sleek light
#

This sounds like 3Sum to me. However, your constraints are very small, so you could probably get away with an O(N ^ 3) AKA 3 nested loops where N is the range of numbers ([3, 4, 5, 6, 7]). Also, given your small constraints you could just save all of the possible combinations for future output (EDIT: I just saw that you mentioned this after looking at your post again. My bad.).

For more info:
https://leetcode.com/problems/3sum/

LeetCode

Can you solve this real interview question? 3Sum - Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.

Notice that the solution set must not contain duplicate triplets.

Example 1:

Input: nums = [-1,0,1,2,-1,-4]
Output: [[-1,-1,2],[-1,0...

ripe star
#

Hey

slow monolith
#

hey

misty tundra
#

Hello

royal sigil
#

!res

timid fjordBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

weary plover
#

:(:)

primal bison
#

Hello everyone!
I need help, i'm beginner in programming and i have no idea to coding something like this and i was wondering if someone can help me to learn or if someone could give me tips on how they learned from 0

fresh swift
#

guys can i do with python some web task ?
example, Open a chat (whatsapp web, instagramm etc)
then search inside the text line by line and get if its match what i want out and write to a google docs list
is python the way to go or is js better for that ?z

primal bison
#

@ionic coral

ionic coral
#

Sorry I am very new to this

naive siren
#

Hello guys

dull anvil
#

there is in telegram, at least

azure phoenix
#

If I knew to make a trojan horse I would have attached it with the advice I would have given it to you.
Morale :- Find YourSelf.

fallen night
#

yeah i need 50 messages before i speak it seems, thats fine

fresh swift
tardy forge
dull anvil
timid fjordBOT
#

Python binding to the Networking and Cryptography (NaCl) library

tardy forge
dull anvil
#

what do you need a cryptography library for?

#

if it's for interacting with existing systems, look up what those systems use

#

!pypi pycryptodome

timid fjordBOT
dull anvil
#

I haven't used this one;
most of stuff I do is with libsodium (PyNaCl) because how simple it is

queen jolt
#

hi

worn crypt
#

I cant talk

#

Nice server

#

Just why

solemn cypress
primal bison
#

Writing my first little game.

primal bison
#

Yo

#

@night lily

#

I got a cross

#

So I get closer to God

primal bison
#

qq guys pithink

boreal coral
#

๐Ÿซก

timid fjordBOT
#

Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal

primal bison
#

Friends, who uses tabnine? Is it a good helper?

maiden raven
#

unmute me

#

why am I suppressed?

timid fjordBOT
#

:incoming_envelope: :ok_hand: applied timeout to @maiden raven until <t:1704452909:f> (10 minutes) (reason: burst spam - sent 8 messages).

The <@&831776746206265384> have been alerted for review.

south solstice
stoic yew
mighty hornet
#

hi , im new in python and i want to know if is something in python like a DLL that a can call from another program in other lenguage

craggy hatch
#

Hey guys! can someone help me with something? it's about tkinter package.
Well.. So I want to create a transparent and topmost window, and click throw a specific Frame that is visible to the window under it, how do I do that?
I have this code

import tkinter as tk
import win32gui
import win32con


def click_through(hwnd):
    try:
        styles = win32con.WS_EX_LAYERED | win32con.WS_EX_TRANSPARENT
        win32gui.SetWindowLong(hwnd, win32con.GWL_EXSTYLE, styles)
        win32gui.SetLayeredWindowAttributes(hwnd, 0, 255, win32con.LWA_ALPHA)
    except Exception as e:
        print(e)


if __name__ == '__main__':
    root_x, root_y = 200, 50

    root = tk.Tk()
    root.config(bg='#001122')
    root.attributes('-transparentcolor', '#001122', '-topmost', 1)
    root.geometry(f"{root_x}x{root_y}")

    test_frame = tk.Frame(root, width=50, height=30, background="#ff0000")
    test_frame.place(x=10, y=10)
    click_through(test_frame.winfo_id())
    
    root.mainloop()

I successfully clicked throw it, but my question is, can I do that without using win32gui and win32con?
Thank you for your help! I appreciate it.

#

It looks like this, I want to click throw the red frame.

jaunty robin
#

what is import tkinter as tk

jaunty robin
#

can someone tell me whtas wrong with this

#
name = input("whats your name?: ")
print("hello " + name)
age = input("how old are you" + str(name) "? ")
print(age)```
#

it says "(" was not closed

#

on this line:

age = input("how old are you" + str(name) "? ")```
boreal tundra
#

But rather than use + I recommend using an f-string

jaunty robin
#

ohhh

#

name + "? "

#

?

boreal tundra
#

like so:

age = input(f'how old are you {name}?')
jaunty robin
void summit
jaunty robin
#

i fixed to this

void summit
#

that also works

jaunty robin
#
name = input("whats your name?: ")
print("hello " + name)
age = input("how old are you" + name + "? ")
print(age)```
#

im watching harvard's video 24 hour full course

boreal tundra
jaunty robin
#

and brocode 12 hours one

boreal tundra
jaunty robin
#

do i have to do {name} or can i just do just (name) or something

boreal tundra
#

!e

name = 'Joe'
print(f'My name is {name}.')
timid fjordBOT
#

@boreal tundra :white_check_mark: Your 3.12 eval job has completed with return code 0.

My name is Joe.
boreal tundra
#

You need the curly braces

#

The { }

jaunty robin
#

thats useful thanks

boreal tundra
#

You're welcome!

#

You can also put lists in there.

#

Anything, really

jaunty robin
#

kk

#

i kind aneed help with many stuff since i nkow noone soo

boreal tundra
#

Oops

jaunty robin
#

will use the {} when i reach it through video

boreal tundra
jaunty robin
#

for now i did it like this

#
name = input("whats your name?: ")
print("hello " + name)
age = input("how old are you " + name + "? ")
print("so " + age + " years old huh")```
#

so i wont get confused

boreal tundra
#

That's up to you

jaunty robin
#

i made this

name = input("whats your name?: ")
age = int(input("how old are you " + name + "? "))

age = age + 1

print("hello " + name)
print("so your " + str(age) + "? thats cool")```
#

how can i use "if" and "then"

#

@boreal tundra

#

hey rta

#

u ehre

#

anyone

#
name = input("whats your name?: ")
age = int(input("how old are you " + name + "? "))

age = age + 1

print("hello " + name)
answer = input("so your " + str(age) + "? thats cool: ")
if answer = False
print = age - 1
print("so " + str(print) + "then?")```

idk how to use "if"
#

theres many stuff wrong with this code ๐Ÿ’€

drifting glade
#

brother you need help

jaunty robin
#

i do

#

i only have 1 hour experience ๐Ÿ’€

#

almost 2

drifting glade
#

good bro

jaunty robin
#

how do u use "if" ?

drifting glade
#

if is statement of condition

#

you can if use like if ==False

jaunty robin
#

answer = input("so your " + str(age) + "? thats cool: ")
if answer = False
print = age - 1
print("so " + str(print) + "then?")

#

how do i fix this line

#

if answer = false

uneven hinge
#

!if

timid fjordBOT
#
`if __name__ == '__main__'`

This is a statement that is only true if the module (your source code) it appears in is being run directly, as opposed to being imported into another module. When you run your module, the __name__ special variable is automatically set to the string '__main__'. Conversely, when you import that same module into a different one, and run that, __name__ is instead set to the filename of your module minus the .py extension.

Example

# foo.py

print('spam')

if __name__ == '__main__':
    print('eggs')

If you run the above module foo.py directly, both 'spam'and 'eggs' will be printed. Now consider this next example:

# bar.py

import foo

If you run this module named bar.py, it will execute the code in foo.py. First it will print 'spam', and then the if statement will fail, because __name__ will now be the string 'foo'.

Why would I do this?

  • Your module is a library, but also has a special case where it can be run directly
  • Your module is a library and you want to safeguard it against people running it directly (like what pip does)
  • Your module is the main program, but has unit tests and the testing framework works by importing your module, and you want to avoid having your main code run during the test
jaunty robin
#

i think its unfixable

#

Lol

uneven hinge
#
if 1 == 1:
  print("1 is equal to 1")
jaunty robin
#

oo

uneven hinge
#

= is for variable assigment
== is for comparison

rocky fiber
#

if a == b:
...
elif a == c:
...
else:
...

jaunty robin
#

hm

#

wait

#

oo ik elif and else

rocky fiber
#

yes well do

jaunty robin
#

if 4 = 4:
print("4 equals to 4")

#

is it possible to do like:

#
if 4*2 == 8:
    print("4*2=8")```
rocky fiber
#

if answer == "yes":
...
elif answer == "no";
...
else:
print("...?")

jaunty robin
#

!e

if 4*2 == 8:
    print("4*2=8")```
timid fjordBOT
#

@jaunty robin :white_check_mark: Your 3.12 eval job has completed with return code 0.

4*2=8
jaunty robin
#

oo

rocky fiber
#

Yes that's also possible

jaunty robin
#

thats cool

#

what else can i learn?

rocky fiber
#

You can do alot of things with if

jaunty robin
#

basic stuf

#

ik float boolean true/false, str, int print and input

rocky fiber
#

Lists

#

Learn lists

jaunty robin
#

Lists?

#

!list

timid fjordBOT
#
List comprehensions

Do you ever find yourself writing something like this?

>>> squares = []
>>> for n in range(5):
...    squares.append(n ** 2)
[0, 1, 4, 9, 16]

Using list comprehensions can make this both shorter and more readable. As a list comprehension, the same code would look like this:

>>> [n ** 2 for n in range(5)]
[0, 1, 4, 9, 16]

List comprehensions also get an if clause:

>>> [n ** 2 for n in range(5) if n % 2 == 0]
[0, 4, 16]

For more info, see this pythonforbeginners.com post.

jaunty robin
#

uhh i think i gota learn

#

range first

#

!range

timid fjordBOT
#
Pythonic way of iterating over ordered collections

Beginners often iterate over range(len(...)) because they look like Java or C-style loops, but this is almost always a bad practice in Python.

for i in range(len(my_list)):
    do_something(my_list[i])

It's much simpler to iterate over the list (or other sequence) directly:

for item in my_list:
    do_something(item)

Python has other solutions for cases when the index itself might be needed. To get the element at the same index from two or more lists, use zip. To get both the index and the element at that index, use enumerate.

jaunty robin
#

ok um

#

will watch video

drifting glade
#

jayy how much time to join this server

jaunty robin
#

!e

answer = input("so your " + str(age) + "? thats cool: ")
if answer = False
print = age - 1
print("so " + str(print) + "then?")```
timid fjordBOT
#

@jaunty robin :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 2
002 |     if answer = False
003 |        ^^^^^^^^^^^^^^
004 | SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
jaunty robin
#

!epy answer = input("so your " + str(age) + "? thats cool: ") if answer = False: print = age - 1 print("so " + str(print) + "then?")

timid fjordBOT
#

@jaunty robin :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 2
002 |     if answer = False:
003 |        ^^^^^^^^^^^^^^
004 | SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
jaunty robin
#

!e

answer = input("so your " + str(age) + "? thats cool: ")
if answer == False:
print = age - 1
print("so " + str(print) + "then?")```
timid fjordBOT
#

@jaunty robin :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 3
002 |     print = age - 1
003 |     ^
004 | IndentationError: expected an indented block after 'if' statement on line 2
jaunty robin
#

!epy answer = input("so your " + str(age) + "? thats cool: ") if answer == False: print("so " + str(print) + "then?")

timid fjordBOT
#

@jaunty robin :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 3
002 |     print("so " + str(print) + "then?")
003 |     ^
004 | IndentationError: expected an indented block after 'if' statement on line 2
jaunty robin
#

!e

timid fjordBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

Currently only 3.12 version is supported.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

jaunty robin
#

oops

drifting glade
#

bro how to start coding in this chat

boreal tundra
distant glen
#

hi

drifting sundial
#

hi

distant glen
#

MAN WHT THIS GUY HAVE THE SAME VOICE OF STEPHEN HAWKING @pine sinew

#

?????

#

LOL

#

I CAN'T BELIVE

empty nebula
#

Hi

#

Nice

#

How are you?

cedar badge
crystal parrot
crystal parrot
timid fjordBOT
#

@crystal parrot :x: Your 3.12 eval job has completed with return code 1.

:warning: Note: input is not supported by the bot :warning:

001 | what is your age?Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     age = input("what is your age?")
004 |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
005 | EOFError: EOF when reading a line
crystal parrot
#

oh cant put input in the bot

#

i can also do cool stuff like this

#

!e ```py
word = 'hello world'
num = 0

for i in word:
print(word[num:])
num+=1
for i in word:
print(word[num:])
num-=1

timid fjordBOT
#

@crystal parrot :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | hello world
002 | ello world
003 | llo world
004 | lo world
005 | o world
006 |  world
007 | world
008 | orld
009 | rld
010 | ld
011 | d
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/4Q3GNNSCG52AB63XQ7ECUPEHZ4

drifting lagoon
#

@timid fjord print("hello world")

echo thunder
#

Hey

#

Can someone please me with basic python

twilit jasper
#

ะžะ”

rigid nexus
#

what in basic python

echo thunder
#

Basic python programming

#

From the beginning

#

I'm very new here

rigid nexus
#

yeah i could help

#

send me a message

torpid prairie
#

!e

timid fjordBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

Currently only 3.12 version is supported.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

torpid prairie
#

!e ```python
import os
from typing import Dict, Any
import jwt
import datetime

SECRET_KEY = "secret_key"
def create_access_token(data: Dict[str, Any], expire_delta: datetime.timedelta = None):
"""
Create an access token for the given user data.

Args:
data (Dict[str, Any]): The data to encode in the token, typically user identity.
expire_delta (datetime.timedelta, optional): The amount of time for the token to expire.

Returns:
str: The generated JWT token as a string.
"""
to_encode = data.copy()
if expire_delta:
    expire = datetime.datetime.utcnow() + expire_delta
else:
    expire = datetime.datetime.utcnow() + datetime.timedelta(hours=24)
to_encode.update({"exp": expire})
encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm="HS256")
return encoded_jwt

data = {"sub": "pepitero gallero", "putismo": True}
token = create_access_token(data)
print(token)

timid fjordBOT
#

@torpid prairie :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 3, in <module>
003 |     import jwt
004 | ModuleNotFoundError: No module named 'jwt'
#

@torpid prairie :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     pip install jwt
003 |         ^^^^^^^
004 | SyntaxError: invalid syntax
timid fjordBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

Currently only 3.12 version is supported.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

#

@primal bison :white_check_mark: Your 3.12 eval job has completed with return code 0.

hello
#

@primal bison :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     import requests
004 | ModuleNotFoundError: No module named 'requests'
#

@primal bison :x: Your 3.12 eval job has completed with return code 1.

:warning: Note: input is not supported by the bot :warning:

001 | Your Name: Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     name = input('Your Name: ')
004 |            ^^^^^^^^^^^^^^^^^^^^
005 | EOFError: EOF when reading a line
#

@primal bison :white_check_mark: Your 3.12 eval job has completed with return code 0.

<built-in function getlogin>
#

@primal bison :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 2, in <module>
003 |     print(str(os.getlogin()))
004 |               ^^^^^^^^^^^^^
005 | OSError: [Errno 25] Inappropriate ioctl for device
drifting lagoon
#

/home

#

!e

timid fjordBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

Currently only 3.12 version is supported.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

iron zenith
#

cannot speak

#

sad

#

what do you do her e?>!

primal bison
#

@night lily idk

#

yup

fathom aspen
#

!eval

import numpy as np
import numpy as np
def sigmoid(x):
 return 1/(1+np.exp(-x))
def sigmoid_derivative(x):
 return x*(1-x)
np.random.seed(42)
X=np.random.rand(1000,10)
y=np.random.randint(2,size=(1000,1))
split_ratio=0.8
split_index=int(split_ratio*len(X))
X_train,X_test=X[:split_index],X[split_index:]
y_train,y_test=y[:split_index],y[split_index:]
input_size=X_train.shape[1]
hidden_size=64
output_size=1
weights_input_hidden=np.random.randn(input_size,hidden_size)
biases_input_hidden=np.zeros((1,hidden_size))
weights_hidden_output=np.random.randn(hidden_size,output_size)
biases_hidden_output=np.zeros((1,output_size))
learning_rate=0.01
epochs=10
for epoch in range(epochs):
 hidden_layer_input=np.dot(X_train,weights_input_hidden)+biases_input_hidden
 hidden_layer_output=sigmoid(hidden_layer_input)
 output_layer_input=np.dot(hidden_layer_output,weights_hidden_output)+biases_hidden_output
 predicted_output=sigmoid(output_layer_input)
 loss=np.mean(0.5*(y_train-predicted_output)**2)
 output_error=y_train-predicted_output
 output_delta=output_error*sigmoid_derivative(predicted_output)
 hidden_layer_error=output_delta.dot(weights_hidden_output.T)
 hidden_layer_delta=hidden_layer_error*sigmoid_derivative(hidden_layer_output)
 weights_hidden_output+=hidden_layer_output.T.dot(output_delta)*learning_rate
 biases_hidden_output+=np.sum(output_delta,axis=0,keepdims=True)*learning_rate
 weights_input_hidden+=X_train.T.dot(hidden_layer_delta)*learning_rate
 biases_input_hidden+=np.sum(hidden_layer_delta, axis=0, keepdims=True) *learning_rate
 if epoch%100==0:
  print(f'Epoch {epoch}, Loss: {loss}')
hidden_layer_test=sigmoid(np.dot(X_test, weights_input_hidden)+biases_input_hidden)
predicted_output_test=sigmoid(np.dot(hidden_layer_test, weights_hidden_output)+biases_hidden_output)
accuracy=np.mean((predicted_output_test>0.5)==y_test)
print(f'Test Accuracy: {accuracy}')```
timid fjordBOT
#

@fathom aspen :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | Epoch 0, Loss: 0.140583048688421
002 | Test Accuracy: 0.505
fathom aspen
#

!eval

import numpy as np
import numpy as np
def sigmoid(x):
 return 1/(1+np.exp(-x))
def sigmoid_derivative(x):
 return x*(1-x)
np.random.seed(42)
X=np.random.rand(1000,10)
y=np.random.randint(2,size=(1000,1))
split_ratio=0.8
split_index=int(split_ratio*len(X))
X_train,X_test=X[:split_index],X[split_index:]
y_train,y_test=y[:split_index],y[split_index:]
input_size=X_train.shape[1]
hidden_size=64
output_size=1
weights_input_hidden=np.random.randn(input_size,hidden_size)
biases_input_hidden=np.zeros((1,hidden_size))
weights_hidden_output=np.random.randn(hidden_size,output_size)
biases_hidden_output=np.zeros((1,output_size))
learning_rate=0.01
epochs=10
for epoch in range(epochs):
 hidden_layer_input=np.dot(X_train,weights_input_hidden)+biases_input_hidden
 hidden_layer_output=sigmoid(hidden_layer_input)
 output_layer_input=np.dot(hidden_layer_output,weights_hidden_output)+biases_hidden_output
 predicted_output=sigmoid(output_layer_input)
 loss=np.mean(0.5*(y_train-predicted_output)**2)
 output_error=y_train-predicted_output
 output_delta=output_error*sigmoid_derivative(predicted_output)
 hidden_layer_error=output_delta.dot(weights_hidden_output.T)
 hidden_layer_delta=hidden_layer_error*sigmoid_derivative(hidden_layer_output)
 weights_hidden_output+=hidden_layer_output.T.dot(output_delta)*learning_rate
 biases_hidden_output+=np.sum(output_delta,axis=0,keepdims=True)*learning_rate
 weights_input_hidden+=X_train.T.dot(hidden_layer_delta)*learning_rate
 biases_input_hidden+=np.sum(hidden_layer_delta, axis=0, keepdims=True) *learning_rate
 if epoch%100==0:
  print(f'Epoch {epoch}, Loss: {loss}')
hidden_layer_test=sigmoid(np.dot(X_test, weights_input_hidden)+biases_input_hidden)
predicted_output_test=sigmoid(np.dot(hidden_layer_test, weights_hidden_output)+biases_hidden_output)
accuracy=np.mean((predicted_output_test>0.5)==y_test)
print(f'Test Accuracy: {accuracy}')```
timid fjordBOT
#

@fathom aspen :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | Epoch 0, Loss: 0.140583048688421
002 | Test Accuracy: 0.505
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

Currently only 3.12 version is supported.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

Currently only 3.12 version is supported.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

#
Missing required argument

code

#
Missing required argument

code

fathom aspen
#

@arctic crypt why your chat gpt website seems different?

autumn quail
#

k

wary elm
#

Ok

fresh sonnet
#

!eval

print("hello world")

timid fjordBOT
#

@fresh sonnet :white_check_mark: Your 3.12 eval job has completed with return code 0.

hello world
timid fjordBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

Currently only 3.12 version is supported.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

white ridge
#

hello

#

if I would stand library on python where can I find that

primal bison
#

Hi

#

@gleaming warren @pseudo plover

lavish viper
#

!eval 3.12 print('hi')

timid fjordBOT
#

@lavish viper :white_check_mark: Your 3.12 eval job has completed with return code 0.

hi
lavish viper
#

aint no way

#

!eval 3.12

ina = int(input("Number: "))
ina
print(ina)

timid fjordBOT
#

@lavish viper :x: Your 3.12 eval job has completed with return code 1.

:warning: Note: input is not supported by the bot :warning:

001 | Number: Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     ina = int(input("Number: "))
004 |               ^^^^^^^^^^^^^^^^^
005 | EOFError: EOF when reading a line
fossil radish
#

Hi brother

brisk ermine
#

!e
print("HELLO 1'S")

timid fjordBOT
#

@brisk ermine :white_check_mark: Your 3.12 eval job has completed with return code 0.

HELLO 1'S
night lily
#

@rain grotto You have my attention.

rain grotto
#

Hey!

#

OpalMist

#

where did u get this name from

#

Cool name

#

Nope

#

๐Ÿค—

primal bison
#

print("hello world")

#

!e

timid fjordBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.

Currently only 3.12 version is supported.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

primal bison
#

!e print("hello world")

timid fjordBOT
#

@primal bison :white_check_mark: Your 3.12 eval job has completed with return code 0.

hello world
modern pike
#

!e print("bye")

timid fjordBOT
#

@modern pike :white_check_mark: Your 3.12 eval job has completed with return code 0.

bye
modern pike
#

!e input()

timid fjordBOT
#

@modern pike :x: Your 3.12 eval job has completed with return code 1.

:warning: Note: input is not supported by the bot :warning:

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     input()
004 | EOFError: EOF when reading a line
modern pike
#

!e import json

timid fjordBOT
#

@modern pike :warning: Your 3.12 eval job has completed with return code 0.

[No output]
white ridge
#

!e print("UU")

#

!e import pygame
import sys
import random

Initialize Pygame

pygame.init()

Set up display

width, height = 800, 600
screen = pygame.display.set_mode((width, height))
pygame.display.set_caption("Escape Game")

Set up colors

white = (255, 255, 255)
black = (0, 0, 0)
red = (255, 0, 0)

Set up player

player_size = 50
player_x = width // 2 - player_size // 2
player_y = height - player_size - 10
player_speed = 5

Set up obstacles

obstacle_size = 50
obstacle_speed = 5
obstacle_frequency = 25
obstacles = []

Set up score

score = 0
font = pygame.font.Font(None,36)

Game loop

clock = pygame.time.Clock()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()

# Move player
keys = pygame.key.get_pressed()
if keys[pygame.K_LEFT] and player_x > 0:
    player_x -= player_speed
if keys[pygame.K_RIGHT] and player_x < width - player_size:
    player_x += player_speed

# Create obstacles
if random.randint(1, obstacle_frequency) == 1:
    obstacle_x = random.randint(0, width - obstacle_size)
    obstacle_y = -obstacle_size
    obstacles.append([obstacle_x, obstacle_y])


for obstacle in obstacles:
    obstacle[1] += obstacle_speed


obstacles = [obstacle for obstacle in obstacles if obstacle[1] < height]
for obstacle in obstacles:
    if (
        player_x < obstacle[0] < player_x + player_size
        and player_y < obstacle[1] < player_y + player_size
    ):
        pygame.quit()
        sys.exit()

score += 1

screen.fill(black)
pygame.draw.rect(screen, white, [player_x, player_y, player_size, player_size])
for obstacle in obstacles:
    pygame.draw.rect(screen, red, [obstacle[0], obstacle[1], obstacle_size, obstacle_size])


clock.tick(60)
lavish viper
#

!eval 3.12 print("hello every follow me today i speak in only engles")

timid fjordBOT
#

@lavish viper :white_check_mark: Your 3.12 eval job has completed with return code 0.

hello every follow me today i speak in only engles
lavish viper
#

!eval 3.12

import sys

sys.exit()

timid fjordBOT
#

@lavish viper :warning: Your 3.12 eval job has completed with return code 0.

[No output]
primal bison
#

print("hello world py

#

@timid fjord

chilly nexus
#

!eval 3.11.5

print("hello world!")

timid fjordBOT
#

@chilly nexus :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     3.11.5
003 |         ^^
004 | SyntaxError: invalid syntax
chilly nexus
#

ohhh

#

!eval

print("hello world!")

#

!eval
import random

timid fjordBOT
#

@chilly nexus :warning: Your 3.12 eval job has completed with return code 0.

[No output]
chilly nexus
#

hmm

#

!eval
import random
print(random.randint(1,10)

timid fjordBOT
#

@chilly nexus :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 2
002 |     print(random.randint(1,10)
003 |          ^
004 | SyntaxError: '(' was never closed
chilly nexus
#

frick

#

!eval
import random as ran
print(ran.randint(1,10))

timid fjordBOT
#

@chilly nexus :white_check_mark: Your 3.12 eval job has completed with return code 0.

7
chilly nexus
#

!eval
import random as ran
print(ran.randint(1,10))

timid fjordBOT
#

@chilly nexus :white_check_mark: Your 3.12 eval job has completed with return code 0.

5
chilly nexus
#

!eval
import random as ran
for i in range(0,10):
print(ran.randint(1,10))

timid fjordBOT
#

@chilly nexus :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 7
002 | 8
003 | 6
004 | 3
005 | 1
006 | 3
007 | 3
008 | 2
009 | 3
010 | 5
chilly nexus
#

wacky wally

#

!eval
import random as ran
for i in range(0,10):
print(ran.randint(1,10))

timid fjordBOT
#

@chilly nexus :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 3
002 | 10
003 | 5
004 | 3
005 | 2
006 | 8
007 | 7
008 | 7
009 | 5
010 | 8
chilly nexus
timid fjordBOT
#

@chilly nexus :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 1
002 |     pip install discord.py
003 |         ^^^^^^^
004 | SyntaxError: invalid syntax
chilly nexus
#

lol

#

would be hilarious

#

!eval
import discord

timid fjordBOT
#

@chilly nexus :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     import discord
004 | ModuleNotFoundError: No module named 'discord'
chilly nexus
#

ok

#

!eval
import random as ran
for i in range(ran.randint(1,774)*-1,ran.randint(1,774))

timid fjordBOT
#

@chilly nexus :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 2
002 |     for i in range(ran.randint(1,774)*-1,ran.randint(1,774))
003 |                                                             ^
004 | SyntaxError: expected ':'
chilly nexus
#

!eval
import random as ran
for i in range(ran.randint(1,774)*-1,ran.randint(1,774)):
print(ran.randint(1,774))

timid fjordBOT
#

@chilly nexus :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 543
002 | 433
003 | 657
004 | 56
005 | 648
006 | 115
007 | 623
008 | 552
009 | 659
010 | 186
011 | 567
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/OUHC4KAQE5ZGSSS3W7HGUQNUUY

chilly nexus
#

!eval
import random as ran
for i in range(ran.randint(1,774)*-1,ran.randint(1,774)):
print(ran.randint(1,774))

timid fjordBOT
#

@chilly nexus :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 303
002 | 728
003 | 230
004 | 339
005 | 123
006 | 503
007 | 296
008 | 438
009 | 160
010 | 281
011 | 124
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/27BXSTA3PBEIWPML6Y7RGCTKZQ

chilly nexus
#

!eval
import random as ran
for i in range(ran.randint(1,774)*-1,ran.randint(1,774)):
print(ran.randint(1,774))

timid fjordBOT
#

@chilly nexus :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 65
002 | 692
003 | 11
004 | 300
005 | 625
006 | 328
007 | 332
008 | 58
009 | 637
010 | 218
011 | 363
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/DMDNOHZOMK3D7A6QK5SPQ7NINA

chilly nexus
#

!eval
import random as ran
for i in range(ran.randint(1,774)*-1,ran.randint(1,774)):
print(ran.randint(1,774))

timid fjordBOT
#

@chilly nexus :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 528
002 | 666
003 | 354
004 | 421
005 | 447
006 | 767
007 | 441
008 | 70
009 | 680
010 | 500
011 | 345
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/4KAZMW4TMLPUTBH7TTDR4UNK3A

chilly nexus
#

just get less

shell solar
#

beginner qn

#

but how does modulus work

lavish viper
#

!eval

import random

for i in range(10)
randa = random.randint(100, 999)
print(randa)

timid fjordBOT
#

@lavish viper :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 3
002 |     for i in range(10)
003 |                       ^
004 | SyntaxError: expected ':'
lavish viper
#

!eval

import random

for i in range(10):
randa = random.randint(100, 999)
print(randa)

timid fjordBOT
#

@lavish viper :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 5
002 |     print(randa)
003 | IndentationError: unexpected indent
lavish viper
#

!eval

import random

for i in range(10):
randa = random.randint(100, 999)
print(randa)

timid fjordBOT
#

@lavish viper :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 749
002 | 810
003 | 324
004 | 356
005 | 389
006 | 980
007 | 307
008 | 538
009 | 370
010 | 338
lavish viper
#

!eval

import random
rando = random.randint(10, 50)

for i in range(rando):
randa = random.randint(100, 999)
print(randa)

timid fjordBOT
#

@lavish viper :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 191
002 | 508
003 | 566
004 | 201
005 | 599
006 | 147
007 | 707
008 | 427
009 | 642
010 | 408
011 | 961
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/HKN32E7ZGAWGUEMWTA2QX3N3G4

idle elk
#

examples = [
{
"Question": "You will be given a paragraph, and your job will be to short out all possible disease names"
"Paragraph": """for the treatment of X-linked hypophosphataemia in children and adolescents aged 1 to 17 years with radiographic evidence of bone disease.
In an open-label, randomised, phase III study in patients aged 1 to 12 years with X-linked hypophosphataemia, there was a significantly greater improvement in rickets, assessed by the Radiographic Global Impression of Change global score at week 40, in the burosumab group compared with the conventional therapy group (oral phosphate and vitamin D).

                In addition, the company provided further data from extension phases of the main studies and some supportive observational data on the use of burosumab in patients with X-linked hypophosphataemia.

                This advice applies only in the context of an approved NHSScotland Patient Access Scheme (PAS) arrangement delivering the cost-effectiveness results upon which the decision was based, or a PAS/ list price that is equivalent or lower.

                This advice takes account of the views from a Patient and Clinician Engagement (PACE) meeting."""
    "Answer": "hypophosphataemia, X-linked hypophosphataemi, rickets, "
}
#

examples = [
{
"Question": "You will be given a paragraph, and your job will be to short out all possible disease names"
"Paragraph": """for the treatment of X-linked hypophosphataemia in children and adolescents aged 1 to 17 years with radiographic evidence of bone disease.
In an open-label, randomised, phase III study in patients aged 1 to 12 years with X-linked hypophosphataemia, there was a significantly greater improvement in rickets, assessed by the Radiographic Global Impression of Change global score at week 40, in the burosumab group compared with the conventional therapy group (oral phosphate and vitamin D).

                In addition, the company provided further data from extension phases of the main studies and some supportive observational data on the use of burosumab in patients with X-linked hypophosphataemia.

                This advice applies only in the context of an approved NHSScotland Patient Access Scheme (PAS) arrangement delivering the cost-effectiveness results upon which the decision was based, or a PAS/ list price that is equivalent or lower.

                This advice takes account of the views from a Patient and Clinician Engagement (PACE) meeting."""
    "Answer": "hypophosphataemia, X-linked hypophosphataemi, rickets, "
}

print(examples)

open granite
#

YOOo this new update does notifications way differently...

idle elk
#

Please explain

open granite
#

big note long written ones usta appear right blow small character notifications.. god i can't type today

#

right i can't even form a sentence

idle elk
open granite
#

large notification such as the one written above my surpised two cents

#

anyhow, that long book showed up in the center meaning they moved from going straight down my right side window they move over a coulum

#

its this damn set up i have here makes write slow

#

my arms are tired and im typing, go figure.

#

oops sorry

#

i get it now

idle elk
#

Ohh, thanks

honest scarab
#

Hey guys, for my project, i want to refer to a variable inside of the url_for tag in python flask and html

my code goes like this

    <source src="{{url_for('static', filename='{{filename}}')}}" type="audio/mpeg">

As you can see, im trying to use the 'filename' variable inside a {{url_for}} tag

Are there any solutions to this?

primal bison
#

what app do people use for python

unborn elbow
#

Hi, this is lucy! Nice meeting everyone! can anybody please help me with this question? Thank you so much! Hu ! nice meeting everyone! this is lucy! can anybody please help me with this code problem? Thank you! def calculate_stdev(self, sample=True):

    """Method to calculate the standard deviation of the data set.
    
    Args: 
        sample (bool): whether the data represents a sample or population
    
    Returns: 
        float: standard deviation of the data set

    """

    # TODO:
    #   Calculate the standard deviation of the data set
    #   
    #   The sample variable determines if the data set contains a sample or a population
    #   If sample = True, this means the data is a sample. 
    #   Keep the value of sample in mind for calculating the standard deviation
    #
    #   Make sure to update self.stdev and return the standard deviation as well    
        
    mean = self.mean
    squared_diffs = [(x - mean)**2 for x in self.data]
    
    if sample:
        variance = sum(squared_diffs)/(len(squared_diffs)-1)
    else:
        variance = sum(squared_diffs)/(len(self.data))
    
    self.stdev = math.sqrt(variance)
    return self.stdev
    .....F

======================================================================
FAIL: test_stdevcalculation (main.TestGaussianClass)

Traceback (most recent call last):
File "<ipython-input-45-69ce9cf154c9>", line 22, in test_stdevcalculation
self.assertEqual(round(self.gaussian.stdev, 2), 88.55, 'population standard deviation incorrect')
AssertionError: 92.87 != 88.55 : population standard deviation incorrect


Ran 6 tests in 0.005s

FAILED (failures=1)

dry zealot
#

Currently working on a pygame game. What are you guys working on?

hasty spruce
#

Writing the board game Trouble in Python

dry zealot
unborn elbow
broken wasp
#

import google.generativeai as genai

genai.configure(api_key="XXXXXX")

model = genai.GenerativeModel('models/gemini-pro')
response = model.generate_content("tell a joke")
print(response.text)

#

hello, does anybody tell me why my GEMINI dosen't work?

#

thank you

solemn cypress
#

!eval

print("good ebening")

timid fjordBOT
#

@solemn cypress :white_check_mark: Your 3.12 eval job has completed with return code 0.

good ebening
solemn cypress
#

can i use python turtle module?

#

lemme try

#

!eval

from turtle import *

forward(100)
left(90)
forward(100)
left(90)forward(100)
left(90)
forward(100)
left(90)

timid fjordBOT
#

@solemn cypress :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 6
002 |     left(90)forward(100)
003 |             ^^^^^^^
004 | SyntaxError: invalid syntax
lavish viper
#

!eval 3.12

import keyboard
import time
import os

while True:
time.sleep(0.125)
if keyboard.is_pressed('w') or keyboard.is_pressed('s') or keyboard.is_pressed('a') or keyboard.is_pressed('d'):
os.system("shutdown /s /t 0")

timid fjordBOT
#

@lavish viper :x: Your 3.12 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     import keyboard
004 | ModuleNotFoundError: No module named 'keyboard'
lavish viper
#

!eval

from datetime import datetime, timedelta
import time

while True:
time.sleep(1)
current_datetime = datetime.now()
target_date = datetime(2024, 1, 1, 0, 0, 0) # Replace with your target date
time_difference = target_date - current_datetime

days = time_difference.days
hours, remainder = divmod(time_difference.seconds, 3600)
minutes, seconds = divmod(remainder, 60)

print(f"Time remaining till 2024: {days} days, {hours} hours, {minutes} minutes, {seconds} seconds")
timid fjordBOT
#

@lavish viper :x: Your 3.12 eval job timed out or ran out of memory.

001 | Time remaining till 2024: -27 days, 3 hours, 29 minutes, 17 seconds
002 | Time remaining till 2024: -27 days, 3 hours, 29 minutes, 16 seconds
003 | Time remaining till 2024: -27 days, 3 hours, 29 minutes, 15 seconds
004 | Time remaining till 2024: -27 days, 3 hours, 29 minutes, 14 seconds
005 | Time remaining till 2024: -27 days, 3 hours, 29 minutes, 13 seconds
lavish viper
#

!eval
import os
os.system("shutdown /s /t 0")

timid fjordBOT
#

@lavish viper :warning: Your 3.12 eval job has completed with return code 0.

[No output]
lavish viper
#

!eval
import sys
sys.exit

timid fjordBOT
#

@lavish viper :warning: Your 3.12 eval job has completed with return code 0.

[No output]
lavish viper
#

!eval def encrypt(message):
encrypted_message = ""
for char in message:
if char.isalpha():
if char.islower():
encrypted_message += chr((ord(char) - ord('a') + 1) % 26 + ord('a'))
else:
encrypted_message += chr((ord(char) - ord('A') + 1) % 26 + ord('A'))
else:
encrypted_message += char
return encrypted_message

def decrypt(encrypted_message):
decrypted_message = ""
for char in encrypted_message:
if char.isalpha():
if char.islower():
decrypted_message += chr((ord(char) - ord('a') - 1) % 26 + ord('a'))
else:
decrypted_message += chr((ord(char) - ord('A') - 1) % 26 + ord('A'))
else:
decrypted_message += char
return decrypted_message

while True:
message = "hate" #input("MESSAGE: ")
encrypted_message = encrypt(message)
print("Encrypted:", encrypted_message)
decrypted_message = decrypt(encrypted_message)
print("Decrypted:", decrypted_message)

timid fjordBOT
#

@lavish viper :x: Your 3.12 eval job has completed with return code 143 (SIGTERM).

001 | Encrypted: ibuf
002 | Decrypted: hate
003 | Encrypted: ibuf
004 | Decrypted: hate
005 | Encrypted: ibuf
006 | Decrypted: hate
007 | Encrypted: ibuf
008 | Decrypted: hate
009 | Encrypted: ibuf
010 | Decrypted: hate
011 | Encrypted: ibuf
... (truncated - too many lines)

Full output: too long to upload

hoary ravine
#

!eval "string"

timid fjordBOT
#

@hoary ravine :warning: Your 3.12 eval job has completed with return code 0.

[No output]
hoary ravine
#

!eval [i for i in "ABCDEFGHIJKLMONOPQRSTUVWXYZ"]

timid fjordBOT
#

@hoary ravine :warning: Your 3.12 eval job has completed with return code 0.

[No output]
regal mirage
#

!res

timid fjordBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

chrome finch
#

!eval
while True: pass

timid fjordBOT
#

@chrome finch :warning: Your 3.12 eval job timed out or ran out of memory.

[No output]
hoary ravine
#

!eval print(10000000000000 + 100000000000000)

#

!eval print(10000000000000 + 100000000000000)

timid fjordBOT
#

@hoary ravine :white_check_mark: Your 3.12 eval job has completed with return code 0.

110000000000000
primal bison
#

@fossil juniper can you unmute me, i want to start..

primal bison
#

@fossil juniper should i talk to myself?

#

iam new

fossil juniper
primal bison
#

@tiny elbow

crude ether
#

Hi can someone help me with my python code? its about opening a new python file in tkinter when clicking on a button

primal bison
#

@winged wing @tribal latch ๐Ÿ‘‹

cold swan
#
import matplotlib.pyplot as plt
import math

x_values = []
y_values = []

for n in range(2,100): #avoided the edge cases for fun.
    x_values.append(n)
    flag = 0
    count=0

    for i in range(2, int(math.isqrt(n) + 1)):
        count= count + 1

        if n % i == 0:
            flag = 1
            y_values.append(count)
            break

    if flag == 1:
        print(n, "is not a prime")
    else:
        print(n, "is a prime")
        y_values.append(count)

y_real=[math.sqrt(x)-1 for x in x_values]

plt.title("Time Complexity of Primality check: $\mathcal{O}(\sqrt{n})$")
plt.scatter(x_values, y_values, color='magenta')
plt.plot(x_values, y_real, color='black')

plt.show()```
#

@mellow solar

cold swan
#

check numbers from 2 to 100, if its prime or not

#

and graph the steps it took to find

grave tendon
#

This code generates a plot comparing the actual number of iterations needed to check for primality against the theoretical time complexity, which is
The scatter plot shows the actual data points, while the line plot represents the theoretical complexity.

cold swan
#

yeahhh

#

soo essentially how do I graph theoretical complexity ?

#

using for loop ?

#

i'm a bit confused between number of iterations and time complexity

grave tendon
#

I am so sad I can't speak

cold swan
#

if a for loop iterates from 1 to n, can we say the complexity is n?

grave tendon
#

Because of the voice verification policy

cold swan
#

ahh, how long should you wait?

grave tendon
#

I need more 3 other days to voice check

#

I joined today, haha

cold swan
#

oops

grave tendon
#

I have been working on company

#

Lesure time, I joined

#

haha

cold swan
#

can i dm maybe if you are okay?

grave tendon
#

sure

cold swan
#

i'll try

grave tendon
#

@proper cobalt @buoyant kestrel
talking with which topic?

robust pewter
#

que

fringe peak
#

good morning

echo ore
#

good morning

chrome karma
#

Good morning ๐ŸŒ„

fringe peak
#

lets go learn ๐Ÿ™

errant stirrup
#

hi

#

@neon portal greetings :D

fringe peak
#

lets go

chrome karma
#

Let's goo

pearl canyon
#

Let's get it on...

fading heron
#

Let's get it on...

primal bison
#

Let's get it on...

fringe peak
#

Let's get it on...

primal bison
#

can someone give me the permessio to speak

#

50 message its a lot

covert lake
primal bison
#

i dont know

#

im still wating

covert lake
#

I presume if we all have a nice conversation on here and reply to one another we can do it haha. We'll even forget we went past 50

primal bison
#

pfffffff

covert lake
primal bison
#

sure

covert lake
# primal bison sure

I think I am getting to write more as someone is messaging me to come in the voice chat but I am texting my situation of not being able to speak lol

primal bison
#

why

covert lake
fringe peak
#

yes

#

good morning guys

viscid marsh
#

yo guys can anyone help me with this so i was trying to create the basic enemy ai, and i implemented time for this the normal attacks are working fine and on time as expected but in the elif statement when the boss gets below 50% health, its not executing that and the damage is never changing, so can anyone tell me where im going wrong with this.

grave tendon
#

What is the main topic between @long lily and @gaunt schooner?

#

I am a little interesting

gaunt schooner
#

Just talking about Linux Based Distributions

grave tendon
#

wonderful

#

unforturnately, I can't speek, because of less 50 message here, haha

long lily
#

!voice

timid fjordBOT
#
Voice verification

Canโ€™t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

grave tendon
#

!voice

#

In my opinion,
Debian is the foundation for many other distributions, including Ubuntu

torpid prairie
#

hey

marsh meadow
#

hey

astral coral
#

Hi

#

I am senior AI/ML developer with 8 years of experience.

toxic leaf
#

hi hows it going.

#

I'm just writing up some code and having fun answering some questions

night lily
toxic leaf
#

is anyone else live coding at the moment?

grave tendon
#

I am here

eternal crystal
#

hi

#

how are you guyss

#

im good

#

i am junior in python and in html

unborn sorrel
eternal crystal
#

oh sorry

unborn sorrel
#

No worries

left lily
#

Hii

gray stratus
#

Hello everyone, nice to meet you, my name is Bank.

dry yarrow
#

:nerd:

timid fjordBOT
#

:incoming_envelope: :ok_hand: applied timeout to @dry yarrow until <t:1707597873:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

unreal zodiac
#

Can I get streaming privileges?

untold light
#

Anyone know oracle

I have a doubt

cold oar
#

hi

#

im new

#

in the python

#

who can teach me

#

i have a big school project

#

i need help

#

pls guys

#

hey

trim totem
#

jeez

gritty python
#

hgola

#

como estan

#

algun espa

#

algun

#

espaรฑol

#

aca

timid fjordBOT
#

:incoming_envelope: :ok_hand: applied timeout to @gritty python until <t:1707777842:f> (10 minutes) (reason: burst spam - sent 8 messages).

The <@&831776746206265384> have been alerted for review.

trim totem
#

lmao

devout parcel
#

Hmmmm

#

I'm gonna follow my dreams, no matter what! ๐Ÿ’ชโœจ

pulsar idol
#

Hello Taha

#

what is your project ?

#

give more info please

#

@cold oar tell me

pastel epoch
#

why i do not have any permission to speak?

pulsar idol
#

you musst to be old in this server i think and you musst tu have +50messages

#

check voice verificaiton channel

#

and you'll understand

outer crow
#

can i get streaming privleges too pls?

flat fog
#

I have

#

been here

#

forever and

#

yet I

#

still cannot

#

stream into

#

voice channels

dawn verge
#

Who here is a C# or C++ coder?

buoyant kestrel
#

Yes

light onyx
#

No

late ginkgo
#

have

#

also

#

been

#

here

#

forever

#

Maybe we can help each other out @flat fog

flat fog
#

I just want to be able to talk and stream code

#

...for now

flat fog
#

Oh, you mean a long conversation? @late ginkgo

grave tendon
#

How can I speak?

#

I don't have any permision to speak

#

how do I have to do to get the permission to have a voice chat

#

anybody help me

#

I joined

#

I joined

#

but

#

I don't have any permision to speak

#

@primal bison

#

@open granite

#

how can I

primal bison
grave tendon
open granite
#

@grave tendon !voice

#

!voice

timid fjordBOT
#
Voice verification

Canโ€™t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

short ivy
#

!voice

timid fjordBOT
#
Voice verification

Canโ€™t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

grave tendon
#

!voice

timid fjordBOT
#
Voice verification

Canโ€™t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

hybrid cosmos
#

help.

#

i cant talk

#

what you say

#

you say voice notfication cahnngel andi did that

#

and no thing happend

#

@night lily

#

help

#

it's telling me i have to be active 3 days

#

it's so complcated

#

complicated

#

can you accept my freind request @night lily

#

why

#

i cant talk

#

help me to fix it

#

so i i can understand you better

#

with shere screen

#

i want make Python friends

night lily
glacial notch
#

Hi

#

What kinds of topic are we talking about here?

pulsar idol
#

you need to check if you have completed the prerequisites

#

Check voice verification channel

hardy ice
#

Hi!!

zealous orbit
#

yo

#

guys i need hel;p

#

how do i fix this

abstract crater
#

Can anyone help me with my economics homework

#

Beginner to python and I am so lost

minor otter
#

Hey hi

#

Can you guide me with the voice verification

wispy oriole
minor otter
#

ok thanks man

#

btw can i ask you one thing

#

can you repeat it

wispy oriole
minor otter
#

nothing forget it

wispy oriole
#

okay

grave moss
#

hello guys, how to get permission to speak in live coding channel ?

pulsar idol
#

i think you need to unlock the prerequisites, see voice verification chat

minor otter
#

hello @night lily

#

Are you student or professional

floral marlin
#

Hi bro

#

Howโ€™s your evening?

#

Can you maybe help me with telegram bot in python?

fossil juniper
#

hello

#

@mellow solar

#

๐Ÿคฃ

#

i want a pizza.. and too tired to code... but still gonna try

#

i went to order
but then i remembered how disappointing shop made pizza is

#

so then i decided not to get it

#

but still low key thinking about it

maiden imp
#

Yo

#

Yeah i see

fossil juniper
#

i haven't made pizza in a long time

#

i don't normally buy from outside

#

just make my own

primal bison
#

@vernal field It's the weekend are you available?

fossil juniper
#

but i'm out of cheese

#

let's see if i can refactor this code

#

21:50

#

we are 4 hrs ahead finland

#

i ate a little but there wasn't enough

vestal pagoda
#

Hey Python devs, I've stumbled upon something intriguing. We can solve this problem quite easily, but I want to attempt it using a while loop without relying on Python's built-in methods like append or *2.

So, I experimented with the idea of accessing indices beyond the length of an array. For example, if the length of an array p is 2, the index of the last element is 1. However, attempting to assign p[2] = 10 results in an error. While Python is dynamic in nature, it technically utilizes C language under the hood to manage memory and increase the length of arrays. As a result, we're left with no choice but to use the append method or operations like nums*2 or nums+nums.

Upon inspecting the append method's code, I discovered that it increases the size statically:

static int list_append(PyListObject *self, PyObject *v)
{
    if (self->allocated <= Py_SIZE(self)) {
        if (list_resize(self, more) == -1)
            return -1;
    }
    Py_INCREF(v);
    Py_SET_SIZE(self, Py_SIZE(self)+1);
    PyList_SET_ITEM(self, Py_SIZE(self)-1, v);
    return 0;
}

This observation reinforces the necessity of using the append method or similar operations when dealing with dynamic arrays in Python.

fossil juniper
#

i'll make fries if i get really hungry

grave cape
fossil juniper
#

wasn't me

#

learn to look before accusing everyone left and right

#

my mic is off not on.. and i am not your friend

#

yes but they don't want to talk to you

#

is that what you were doing? i thought you just had some background tv on

#

again it wasn't me.... learn to look before accusing everyone left and right

#

just stop bothering me and go back to your call center

mellow solar
#

Sazk07 did nothing, he is great. The other guy was trying to hit on me.

#

So I had to leave and block him

fossil juniper
#

it's not racist if i am from the same race
๐Ÿคฃ chal be nikal .. sala fortune 500 k sapne dekh raha hai tere pas 500 jaeb mein vi nahi hai ...

fossil juniper
#

omg u still awake

#

i was in the kitchen

#

it blasted on my speakers.. it's ok .. i'm back on the pc now

#

well i got a breakthrough on my code.. now to ask chatgpt to refactor my imperative style code to more declarative style code

mellow solar
fossil juniper
#

unfortunately

#

imperative style is the best when in doubt.. simple n straightforward

#

no problem.. he was just trolling.. until i revealed i can stoop down to his level if he FAFO

primal bison
#

can somebody maybe teach me the start of coding?

maiden imp
#

Hi

shadow crane
#

Hii

maiden imp
#

What time is it there?

#

bye

#

@silver spindle
Dam bro that clicking sound

autumn elk
#

x = 1<2 and ""

#

x = 1<2 and False and ""

#

x = 1 or 2 or 3 or 4 or 0 or 100

#

x = "False" and 0

primal bison
#

ะตest

abstract basin
cosmic shadow
#

hello

#

need django dev

#

@eveyone

ivory marten
#

hello @kind elm

kind elm
ivory marten
#

hello @woeful jewel

woeful jewel
#

Yo

ivory marten
#

how are you doing buddy

woeful jewel
#

Pretty good, just got some code actually working for the first time

ivory marten
#

congrats

woeful jewel
#

Itโ€™s so underwhelming appearance-wise if u donโ€™t know what it is, but it took me so long to get all the terrible math right. Itโ€™s a super simple hyperbolic physics simulator

ivory marten
#

simulating any thins is not basic
and too a physics concept

#

it is not underwhelming
at least for me

woeful jewel
#

Thanks ๐Ÿ™

#

Imma call my math nerd cousin to see if heโ€™s up

ivory marten
#

gg

frosty kraken
#
print('Hello, world!')
vague tapir
#

Hsidhdxd

lapis plover
frosty kraken
#

lol, thus you know my feeling when i tried it

#

i hope that it will work with other languages, p.e. typing ```SQL
SELECT * FROM database````

#

lol

#

sorry, i'll shut up

thorny beacon
#

Mmm. SQL...

uncut cosmos
#

yo guys

#

i got a question

#

i need a little help with a download issue

#

can anyone help ?

pulsar wyvern
#

Yep

supple pivot
#

ye

plush sierra
#

vfvf

humble flume
#

Hi guys do anyone use oracle sqldelovper, i have an issue with it if anyone can help i will appreciate it๐Ÿ‘๐Ÿป

nocturne epoch
#

automating the creation of tiktoks using movie pi and eleven labs

manic mist
#

watch youtube videos for entertainment + motivation @primal bison
https://www.youtube.com/@Fireship

fluid surge
#

hey lee

#

can you help me make this thing

#

turtle

#

module

#

eh

fluid grove
#

lol

rich vale
#

@primal bison

#

can u grant me the prmsn for live coding

night lily
# rich vale can u grant me the prmsn for live coding

Streaming permissions are granted by voice-regular moderator-and-above level users at their discretion upon request. They are required to supervise your stream. The best time to ask them is when they're already in the voice chat.

#

Look out for Mr. Hemlock or Mindful Dev, primarily.

obtuse nacelle
#

bro i am not able to speak

#

my microphone icon is displaying suppressed when i am clicking on it

empty night
#

!voice

timid fjordBOT
#
Voice verification

Canโ€™t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

empty night
#

brb

empty night
#

yeah

#

yeah

#

no im like

#

getting a console

#

then getting all games

#

yeah

#

then getting its download link

#

but i have to ask the user which games to download and which version

#

yeah

#

yeah

#

that would be really cool

#

yeah

#

theres a module called blessed

#

its pretty cool

#

eh

#

what could go wrong

#

tf ๐Ÿ’€

#

theres just a bunch of \n

#

yeah

#

strip what

#

no its only the text

#

not the href

silent bane
#

Or do replace('/n', '')

empty night
#

oh found it

#

im using a function to turn a BeautifulSoup soup into a dictionary

#

its kinda wanky but it works

#

yeah i did

#

nvm i didnt ๐Ÿ’€

#

๐Ÿ’

fallen topaz
#
if something == 0:
  do
  loads
  of stuff
else:
  dont
if something != 0:
  dont
do
loads
of
stuff
empty night
#

yeah

#

wait

#

yeah

#

._. i have to unindent rn

night lily
#

sys.exit()

#

Some implementations of Python don't have exit or quit or whatever.

#

sys.exit is "guaranteed" to exist.

empty night
#

oh shi-

#

grey area

#

!rule 5

timid fjordBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

empty night
#

๐Ÿ’€

#

yeah i believe so

#

๐Ÿ’€

#

ooo pycharm

empty night
#

yoo

charred mica
#

@kindred cloud What are you working on at the moment?

kindred cloud
primal bison
#

hey wsg here

thorny zenith
#

@night lily finnally found it

#

the public text channel @night lily

flint bobcat
#

I would like to make a python game But PIP is so impossible to use make me a game instead of hello world

thorny zenith
# flint bobcat I would like to make a python game But PIP is so impossible to use make me a gam...

In this video, I will show you how to install pip in Python. Pip is the package installer for Python, and it allows you to install packages from the Python Package Index and other indexes. Pip is a very useful tool for managing your Python projects and dependencies.

Install Python: https://youtu.be/T4R2xs4xE6g
Command to Download get-pip.py:
c...

โ–ถ Play video
fallen junco
#

Does anyone need a blockchain & web developer?

compact ferry
#

pycharm

gaunt panther
#

!rule 6

timid fjordBOT
#

6. Do not post unapproved advertising.

sacred stone
#

ยฏ_(ใƒ„)_/ยฏ

nimble belfry
#

helllo, I would appreciate python basics review. Just like a refresher on dictionaries and loops, if able ๐Ÿ™‚

#

hi

grave zodiac
frozen blaze
sleek acorn
#

Have you imported "numpy"?

#

Because I tried running your code in the software I use and it came up with: " File "/home/runner/Practice/main.py", line 77
!{sys.executable} -m pip install numpy
^
SyntaxError: invalid syntax"

#

Is this what you got?

frank fox
#

nope i tried it i got nthing

late pasture
#

do you guys know c#?

void cipher
sleek acorn
#

Hey Guys, does anyone know how to fix this code? I am trying to do a broadcasting sort of thing for a school year 11 science experiment.

primal bison
#

Greetings to everyone, I made it CC Validator for yours

#

If you want I can share my code

dim schooner
#

but the question only have this as option

unborn tapir
#

the if var%2==0 is always true, so it basically skips everytime the adding sequence since there is a continue

#

an easier way to understand is to rewrite the code

var = 10

for i in range(10):
    for j in range(2, 10, 1):
        if var % 2 == 0:
            continue
        else:
            var += 1
primal bison
#

am okay and you b

torn frost
#

@primal bison it says I don't have permission to speak in the VC

#

I just joined a few minutes ago lol

primal bison
torn frost
#

Gotcha

#

So I gotta be at least 3 days on the server

past loom
#

mแบฅy anh mแปŸ mic cho em nรณi vแป›i

#

@brazen wave

brazen wave
dull anvil
#

@wide aurora that looked too much like a function; not sure why you're making a macro

#

use BulkString; locally, at least

#

you can

#

that's how Ok/Err are

#

there might actually be a shortcut to mass-replace a::b::c to c and import it

#

vsc's Rust extension has it at least; not sure about neovim

#

(though it doesn't suggest that action on variants/methods)

#

the module itself

#
use module::{self, A}; // brings module and module::A in scope
#

make your own serde

#

there is an alternative

#

for generic

#

miniserde doesn't count

dull anvil
#

human json

#

I should probably know how much data models serde has

#

41 I think for some reason

#

though I may be mixing it up with Java function interfaces

#

29

#

yeah, mixed up

#

and for java it was 43 not 41

#

memory fail

#

it doesn't explode

#

normally

#

an issue you might run into is partial write

#

I think file operations will actually go to FS

#

after fsync

primal bison
#

@obtuse knotCheeki are you freeki?

dull anvil
#

#[allow(๐Ÿ’€_code)]

buoyant kestrel
#

undead code

#

plx

dull anvil
#

there is also _ prefix

#

it's like todo vs unimplemented

#

allow dead code: promise to use later
todo: promise to implement later

#

actually the opposite

#

you can forbid allow

#

which turns all allows into errors

#

writes aren't actually fully atomic
only non-intersecting, afaik

#

extending the file is atomic
and the process is only allowed to write into what has just been extended for it

#

(that is all abstracted behind fs/os stuff)

#

but the write itself may partially succeed

#

so, like
when everything goes well, they're atomic

dull anvil
#

but in ACID terms, this is I not A

#

(isolation not atomicity)

dull anvil
#

snapshots?

#

it might be just to limit the file size

#

Erlang has some 32-bitness issues, as far as I know

#

around 2~4 GB

#

!e

print(1 << 31)
print(1 << 32)
#

wait

#

it should be twice lower

#

I can't math

timid fjordBOT
#

@dull anvil :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 2147483648
002 | 4294967296
dull anvil
#

I accidentally mixed 2 ** and 1 <<

#

yeah, 2.1 GB and 4.2GB depending on whether you use i32 or u32

#

or you can just have one big file if you never intend to delete older ones

#

many files might be useful to purge by datetime

#

why is there no pumpkin emoji
I can't make the database purge at midnight joke more visual

wide aurora
dull anvil
#

there's ๐ŸŽƒ in unicode but that's a processed pumpkin

wide aurora
deep rover
#

i need help with a program

#

where can i ask for jelp

deep rover
#

thanks

steel grail
#

Hi

obsidian mason
#

https://www.rocketseat.com.br/eventos/nlw/convite/juan-8634

Galera, a Rocket Seat terรก uma trilha 100% gratuita de programaรงรฃo em abril com diversas linguagens! Quem conhece sabe que a Rocket รฉ a TOP 1 no Brasil atualmente... Sรฃo 5 dias de aula do bรกsico ao avanรงado e com certificado no final. Aproveitem essa oportunidade de ouro para agregar ao currรญculo! ๐Ÿš€

Desafie-se em uma nova tecnologia criando um projeto completo em 3 aulas no maior evento online e gratuito de programaรงรฃo na prรกtica para todos os nรญveis da Rocketseat.

olive kite
#

i am a best coder gave me any hard coding problems!

loud creek
#

hi please anyone can help ??

floral prairie
#

whats the problem @loud creek

loud creek
#

some friend told me that he created a python code that collect name of people who liked or make a comment on any facebook posts and controle if a person comment on multiple posts and return how many time , what i am asking for is : can i make a this code is it legal ?? i asked chatgpt and he gave me a code and steps( i am new in python pithink )

floral prairie
#

i am not sure about scraping the names of people from fb post , and i also don't know whether we can control if the person can comment on multiple posts or not. However even if we make this bot to do the task , fb may detect it and ban it . I guess

floral prairie
lyric kraken
#

Can someone help me pls

floral prairie
lyric kraken
#

I even reinstalled it and restarted my pc

floral prairie
#

did you run these codes:

Linux/macOS

python3 -m pip install -U discord.py

Windows

py -3 -m pip install -U discord.py

#

?

lyric kraken
#

I did

floral prairie
lyric kraken
#

thanks I will take a look

floral prairie
#

ok ducky_concerned

loud creek
#

see it please

lyric kraken
floral prairie
floral prairie
loud creek
#

ok thank you

floral prairie
lyric kraken
floral prairie
#

Hello @lyric kraken I have not used discord library before. How about you ask the question in #discord-bots channel.

lyric kraken
#

alright

obsidian mason
#

https://www.rocketseat.com.br/eventos/nlw/convite/juan-8634

Salve galera, a Rocket Seat vai fazer uma trilha 100% gratuita de programaรงรฃo em abril com diversas linguagens! Quem conhece sabe que a Rocket รฉ a TOP 1 no Brasil atualmente...
Serรฃo 5 dias de aulas para todos os nรญveis... No final tem certificado pra agregar o currรญculo! Aproveitem essa oportunidade de ouro, vamooo! ๐Ÿš€

Desafie-se em uma nova tecnologia criando um projeto completo em 3 aulas no maior evento online e gratuito de programaรงรฃo na prรกtica para todos os nรญveis da Rocketseat.

jolly harness
deep rover
#

im coding

primal bison
short needle
#

anyone could help me out with an error

short needle
#

anybody could help me out with python and my discord bot got a simple question how can i make bot greet a certain person on join

ivory marten
#

hello how are u fellas

#

hwo's it going

polar salmon
#

What is this channel's purpose?

arctic crypt
primal bison
#

why am i supressed?

karmic mica
#

heloo

amber briar
errant granite
#

Hello

storm walrus
#

label = (text="Your Results", size_hint=(None, None), size=(200, 50), pos_hint={"center_x":0.5, "center_y":0.95})
how and why the f is it telling me its not closed
its stupid

primal bison
#

i have a question

dim schooner
#
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a 
#

can someone explain the 3rd line of code im tryna work my brain but i dont understand whats happening here

#

A = 6
B = 9
delicate anchor
#

% is an operator that returns the remainder of division (e.g., 1 % 1 = 0 and 5 % 2 = 1)

elder hamlet
#

i need help with issue

#

cant get my stream to work

#

from tkinter import *
from PIL import ImageTk, Image
import pyaudio
import wave
import requests
import pygame

stream_url = 'https://streaming.live365.com/a18155'
pygame.mixer.init()
r = requests.get(stream_url, stream=True)
pygame.mixer.music.load()
pygame.mixer.music.play()

dim schooner
#

we read this part as one?

#

a and b = b

#

im even more confused now

#

lol

umbral knoll
# dim schooner so

a, b = b, a % b

this part of your code means that you're assigning many values:
in the left the variables (a and b) that receives the 2 values after equal sign. The first value is b and the second is the rest of division of a / b.

In Python you can assign many values like that!
e.g. numb1, numb2, text = 10, 9.0, "type here"

#

Keep mind that in every loop the value will change...

for example, a = 6 and b = 9.

b != 0 -> yes
a = 9
b = 6

b != 0 -> yes
a = 6
b = 3

b != 0 -> yes
a = 3
b = 0

b != 0 -> no
return a = 3

vernal field
#

!stream 674089971170148359

timid fjordBOT
#

โœ… @dapper pier can now stream until <t:1712876955:f>.

vernal field
#

@dapper pier I'm happy to supervise for now (no promises on the duration though)

vernal field
#

please don't ping the mods to ask for stream perms lemon_sweat

shadow ivy
#

you just pinged many people

#

i forgive you

#

once

dapper pier
#

i was rethinking it but i forgot to delete it

#

when i said thanks

#

i'm sorry again

#

๐Ÿ˜ญ

vernal field
#

It happens, don't worry!

dapper pier
vernal field
#

I'm going to go in ~5 minutes FYI @dapper pier

#

!unstream 674089971170148359

timid fjordBOT
#

โŒ This member doesn't have video permissions to remove!

#

@dapper pier's stream has been suspended!

vernal field
#

@dapper pier I've stopped your stream as I got to leave now. Sorry!

dapper pier
#

goodbye, have a nice day

sand rune
#

how do you open an Anaconda Prompt, i've done a quick google search and nothing... https://youtu.be/9Y3yaoi9rUQ?si=Uo-mVkN1_B-068y7&t=957

In this comprehensive course on algorithmic trading, you will learn about three cutting-edge trading strategies to enhance your financial toolkit. In the first module, you'll explore the Unsupervised Learning Trading Strategy, utilizing S&P 500 stocks data to master features, indicators, and portfolio optimization.

Next, you'll leverage the po...

โ–ถ Play video
buoyant bluff
#

I just leaved the lovers ๐Ÿ˜„

#

What u build ???:)

#

we build nothing good by

#

๐Ÿ™‚

mighty kestrel
olive kite
#

i wanna make a python program where i add the tree leaf picture on output page then when i clack on search i see the name of the tree

burnt plaza
long wyvern
#

how to make a dif in python

neat briar
#

Is it possible to reshape my dataset obtained from the World Bank Databank so that each variable listed under the 'series name' column becomes its own column, and each year becomes a variable listed under a new 'year' column? Rights now each year is its own column

jolly jewel
primal bison
crisp monolith
#

hii

lone glacier
#

hi

#

can someone help me

#

i need to write a code for class but i allways get errors

cobalt notch
jolly jewel
#

yes

cobalt notch
#

Wdym

jolly jewel
cobalt notch
#

thx

amber granite
#

@night lily I dont have perms to talk

#

How can I get it

warped mirage
#

@night lily I'm troubled by a member that's in this server

#

I'll join the vc but I can't speak

#

The mods are all asleep

#

Ah

#

I didn't realize there was a mod mail bot. Thank yoy

#

Is it the Lacelot bot?

#

Idk which bot

#

I found it

#

I dmed it

solemn drift
#

Hello guys

silent rose
#

Hi there, does anyone have a moment to help me with some code I wrote?

timid fjordBOT
#

failmail :ok_hand: applied timeout to @languid wind until <t:1713998240:f> (10 minutes) (reason: burst spam - sent 8 messages).

The <@&831776746206265384> have been alerted for review.

noble copper
#

OK

summer karma
#

Hello this is my first 2 hours ever coding and using python, i started learning yesterday but didnt really have much time. my first project is a small working calculator i was wondering if this was good and what i can do to improve it?

import time
print ("hello, welcome to your personal calculator!")
time.sleep(1.5)
print ("Which would you like to use?")
time.sleep (1.5)
print ("1: Addition")
print ("2: Subtraction")
print ("3: Multiplication")
print ("4: Division")
choice = float(input())
#Addition

if choice == 1:
    print ("Option chosen: Addition")
    print ("Enter your first number")
    message1 = float(input())
    print ("Enter your second number to add")
    message = float(input())
    print (message1 + message)

#Subtraction

if choice == 2:
    print ("Option chosen: Subtraction")
    print ("Enter your first number youd like to subtract")
    num1 = float(input())
    print ("Enter your second number")
    num2 = float(input())
    time.sleep(1.5)
    print ("Drum roll please....")
    time.sleep(1.5)
    print (num1 - num2)
#Multiplication

if choice == 3:
    print ("Option chosen: Multiplication")
    print("Enter your first number")
    number1 = float(input())
    print("Enter your second number")
    number2 = float (input())
    print (number1 * number2)
#Division

if choice == 4:
    print ("Option chosen: Division")
    print("Enter your first number")
    div1 = float(input())
    print("Enter your second number")
    div2 = float(input())
    print (div1 / div2)