#voice-chat-text-0

1 messages · Page 101 of 1

frosty star
#

are you like one of those people who says they don't prepare then gets an A

rugged root
#

That would be me

whole bear
#

i am in my last year of highschool

frosty star
#

I was so good at both but now my brain is just mush

whole bear
#

i have to say, i got this far by mistake

frosty star
#

I'm doing taxes 😦

whole bear
#

shit

#

same

#

2008

#

i am too young

frosty star
#

ooooooh

#

i loved that

eternal goblet
#

what happens when you get slapped in high frequency

#

it hertz

#

😭

whole bear
#

Guys

from pymegatools import Megatools

url = input("Enter MegaNz Url: ")
mega = Megatools()

print("Download Starting...")

while True:
    mega.download(url)```
Is it possible to send to the video player before the download is finished?
rugged root
brazen gazelle
#
import subprocess
from pymegatools import Megatools

url = input("Enter MegaNz Url: ")
mega = Megatools()

print("Download Starting...")

while True:
    mega.download(url)```
warm jackal
warm jackal
whole bear
#

Is it possible to play with the video player when it starts downloading?

somber heath
#

@whole bear👋

frosty star
#

brb

#

A house (on a piece of land), a family, 5 children.

When I get to my first grandchild, I think I can die happy.

pallid hazel
#

win the lottery.. any payout

frosty star
#

My lack of self discipline

#

Can a sauna machine and weight scale be considered a "sports equipment"

#

🤔

#

For my health

#

so technically

#

Yeah

#

It falls under "Sports equipment". Max MYR 500 tax relief

rugged root
#

That'll tell you what you need to know about the voice gate

#

Yep, 2008

frosty star
#

The Sims

#

Specifically, The Sims CAS

rugged root
somber heath
#

Yes, it was an industrial fan.

#

That it was a computer fan in a server is beside the point.

molten pewter
#

"Perfectionism reflects an unflinching pursuit of unusually high levels of achievement, for example, in the areas of financial, athletics and/or academia. In general, perfectionism has been considered, a multidimensional, rather than singular, personality trait. Frost and colleagues (1990) suggested perfectionism is composed of six semi-independent elements including 1) setting high standards for performance, 2) having negative reactions to projected punishments for errors 3) having feelings of inferiority when anticipating an error, 4) negatively perceiving parents critiques of any flaws, 5) doubting one’s performance, and 6) being overly concerned with organization and order"

uncut meteor
#

hi

#

3

#

sick ada

rugged root
whole bear
#

yee i was around for about a week beforehand

#

im just returned to the server

#

so im not eligable cuz of the 3 day rule only

#

im not sure if i had it before

#

i remember you tho

#

yee

#

do i still have to wait? or will it count previous days before i joined / when i was last in the server?

#

😦

#

no way to override that i suppose lmao

#

alrightys

#

yeah been busy

#

xD

#

i joined back because as usual i need to reach the next stage lmao

#

yee

#

ive been on and off on the server

#

i'll stick around now tbf

#

no real reason to leave xD

#

yeyee

#

makes sense

#

damn

frosty star
#

Mr Hemlock just farted

whole bear
#

i was working with the chatGPT api tbf

wise cargoBOT
#

@somber heath Please don't try to ping @everyone or @here. Your message has been removed. If you believe this was a mistake, please let staff know!

whole bear
#

that was pretty fun

somber heath
#

It was supposed to be an escaped @

#

I wasn't expecting to trigger anything.

rugged root
#

!server

wise cargoBOT
#
Server Information

Created: <t:1483877013:R>
Roles: 102
Member status: status_online 54,893 status_offline 318,833

Members: 373,726

Helpers: 149
Moderation Team: 36
Admins: 12
Directors: 3
Contributors: 47
Leads: 14

Channels: 254

Category: 29
Forum: 3
News: 11
Staff: 118
Stage_Voice: 1
Text: 85
Voice: 7

golden sonnet
#

🙌 hi

rugged root
old heart
#

morning Hemlock

#

yawn tired. worked until midnight 😐

#

and yesterday, until 2 AM 😐

rugged root
#

Yeesh, sorry to hear that

whole bear
#

The Listener class sets up a socket connection on the local machine and listens for incoming connections on port 56365. The class provides methods to handle incoming and outgoing connections, to log data received and to shut down the socket connection when the application is finished. When an incoming connection is received, the incomingConnection method processes the received data, such as storing it in a local variable or sending it to another method for processing. The outgoingConnection method is used to send data to a connected client and takes in two parameters: the client's name and the data to be sent. The dataLog method is used to log data received by the socket connection. The method writes the contents of a log variable to a file named "serverLog.txt". The log variable is populated with meaningful data, and the method writes the contents of the log variable to the file. The shutdown method is used to close the socket connection. When called, the method sets the running variable to False and closes the connection, allowing the program to exit gracefully. This is the main concept for the Listener class.

old heart
#

Not using AI for academia is best.

#

I'd ask it to rewrite it as a Haiku

#

🙂

#

then ask it to personify itself as a 3rd grade teacher, using the Haiku as a way to teach a college level class on the subject,

#

I'd like to see a checker catch the shit I've done.

#

they absolutely can, and it absolutely is.

rugged root
#

The outgoingConnection method is used to send data to a connected client and takes in two parameters: the client's name and the data to be sent.

The outgoingConnection method sends data to a connected client and takes two arguments: the client's name and the data payload.

whole bear
#

This module imports data from the Board and Tetromino Modules to setup this Module – It utilises all the previous functions to setup the game instance which encompasses keeping score and time, checking the current states of any held objects as well as the board and the current and next tetronimo, checks the block size and sets up functions corresponding for each input the user can take and creating new tetromino objects. It has built-in logic to handle movement and collision and uses the functions from said imports to actualise them. The whole module is the game logic behind the game, and this is imported and used extensively in the main logic program, module 7. This program is also used as the basis of the SGame module.

old heart
#

I think this would have been better:

She listens well,
On port 56365.
Handles connections.

She's always keen
To process what she hears,
And store it with care.

She loves to chat,
With all her clients dear.
Sharing data fair.

She logs it all,
In her "serverLog.txt".
For history's sake.

When it's time to go,
She closes up shop,
And exits with grace.

So, you see, friends,
The Listener class is like
A good third-grade teacher.

Always listening,
Caring for her students' needs,
And logging it all.

amber raptor
old heart
#

Listener listens,
On port 56365,
Handles connections.

#

😛

#

nope

#

they're deprecated

#

I live in the middle of nowhere, and 3G was great for the deadzones, just lock to band and you'd have voice.

#

Now I have nothing, for long stretches.

#

Audiobooks FTW

rugged root
#

Get one of those big ass satellite phones

ocean anchor
#

chatgpt premium worth it after the new update?

rugged root
#

No idea

ocean anchor
#

i'll just get it

old heart
#

what's going on with Docker?

old heart
# whole bear The Listener class sets up a socket connection on the local machine and listens ...

The Listener class is a tool that sets up a connection between different computers so that they can communicate with each other. It has different methods that help with handling incoming and outgoing data, keeping track of what data has been received, and shutting down the connection when it's no longer needed. The incomingConnection method stores or sends data for processing, the outgoingConnection method sends data to another computer, and the dataLog method keeps a record of all the data that has been received. When the shutdown method is called, the connection is closed in a way that allows the program to stop running smoothly.

"summarized for an 8th grader"

mortal burrow
uncut meteor
old heart
#

they owe you, if they over pay.

somber heath
rugged root
#

Just seems like more "We're tired of you free loaders, actually fucking pay now." (regarding docker)

#

@mortal burrow How've you been?

mortal burrow
#

New job is going well, I'm WFH now and I'll probably match her schedule and work Wed/Fri from home.

rugged root
#

Oh sick

#

Congrats

mortal burrow
#

It's taking a little longer than expected to get onboarded but I'm still getting paid. I also sat in a very important meeting yesterday with some big wigs.

rugged root
#

Fancy

#

What kind of work are you going to be doing?

mortal burrow
#

I'm doing all things related to data, data science, data engineering, and probably a bit of data stewardship and even a bit of policy design for data governance.

#

lol so it's a lot

whole bear
#

3 kids?

#

3 living beings?

#

how old are u wtf

old heart
#

I'm so concerned

#

about that

#

4-5 years from now, there's going to be a mortgage short

#

because banks are fuckers

#

wow, that's really hard

whole bear
#

i have a question

#

is neovim good?

molten pewter
#

it's better than good it's log

#

If only every commercial featured Log from The Ren & Stimpy Show. If only.

Scene from the first episode of The Ren & Stimpy Show, "Stimpy's Big Day."

►► Subscribe for More: https://at.nick.com/NickRewindSubscribe
►► Watch More from NickRewind: https://at.nick.com/NewRewindVideos
►► All That on YouTube: https://at.nick.com/AllThat
►► Nickelode...

▶ Play video
distant kayak
amber raptor
distant kayak
rugged root
#

@whole bear

The Constitution, through the Fourth Amendment, protects people from unreasonable searches and seizures by the government. The Fourth Amendment, however, is not a guarantee against all searches and seizures, but only those that are deemed unreasonable under the law.

#

Fun fact, in the US, bounty hunters can take you over state lines, realize that you're the wrong person and just leave you there

amber raptor
vocal basin
#

from what I've heard, there are also extra regulations for US citizens with regards to opening bank accounts abroad

rugged root
#

@dusk raven Yoooooo

ashen wasp
#

Hi

dusk raven
rugged root
whole bear
#

headache

somber heath
#

Australia would be

amber raptor
somber heath
#

Previous government, yeah.

#

Current, maybe.

distant kayak
rugged root
#

So friggin' handy

#

!stream 989201188778016870

wise cargoBOT
#

✅ @whole bear can now stream until <t:1679072484:f>.

dusk raven
uncut bloom
#

guys, what is the project?

dusk raven
uncut bloom
#

could some1 recap it quickly for me

whole bear
rugged root
#

Trying to help people get the basic web structure and the like

uncut bloom
#

cool

#

maybe dumb suggestions, but he already tried chatgpt or Bing chat

#

did he already try that?

#

did you guys watch gpt4 livestream tho

rugged root
#

Heard it was interesting

uncut bloom
#

the guy made a website with a picture lol

rugged root
#

Oh yeah yeah

uncut bloom
#

what do you guys think about tensorflow?

rugged root
#

It's neat

#

Don't know a lot about machine learning and the like

somber heath
#

sub to "I want to just do things"

copper lake
#

hello sir

#

any java dev here?

pallid hazel
#

if not 1 thing is another.. sigh..

copper lake
#

okay sir.

pallid hazel
#

that wasnt to you Ivndj..

copper lake
#

always stick on java programming

uncut bloom
somber heath
uncut bloom
somber heath
rugged root
#

Too restless

copper lake
#

Why School curriculum is too old for todays tech?

rugged root
#

Reverse engineering is when you make a train go backwards

copper lake
#

can anyone explain me this problem?

#

the display

#

ivan sir

#

start from the D-I

#

display list from head to search from tail

#

I have my code but it didn't display the initialized doubly linkedlist

#

it can run in codiva

#

java suck man

#

you are own of the veteran in java

#

one*

#

oh i see

#

oh my god hahhahah

#

I think the problem is on the case-switch?

#

the // TODO:

#

nothing is implemented to display the syntax that needed in the skippedlist

#

oh I see.

#

thank you for visioning this one

#

It's hard to be the programmer of the group

#

so on this case. I need to have a syntax for the case-switch on B to I so that it will display the inputted doubly linked list on the program.

#

when you're in college and studying Computer Science or IT. do you have a subject like accounting101??

#

is chat gpt 4 is out now?

rugged root
#

Came out a day or so ago

copper lake
#

like this one?

#

it has character limits

rugged root
brazen gazelle
left trail
#

@brazen gazelle i am working on a project to find dimensions for a perfect cuboid
perfect cuboid is a cuboid having integer side lengths, integer face diagonals and an integer space diagonal
so i made a program to check some of the dimensions but i am facing the issue with precision after decimals

#

@brazen gazelle lemme explain you with an example
like
according to my program
969345543.0000000000353345432..
is a in an integer because its a lot of zeros after decimal
but i need the exact integer

#

@brazen gazelle i want to reject this value
if it is not integer

#

while True:
    # Perform the calculations
    PT1 = M1**2 - 1
    PT2 = 2*M1
    M2 = PT1 / 2
    PT3 = M2**2 - 1
    T = PT3**2 + PT2**2
    
    # Check if T has an integer square root
    root = int(math.sqrt(T))
    if root**2 == T:
        print("You succeeded and made the history!")
        print(f"M1 = {M1}, PT1 = {PT1}, PT2 = {PT2}, PT3 = {PT3}")
    else:
        print(f"{M1} is not the number.")
        M1 += 2
#

@brazen gazelle here's the program

#

@brazen gazelle yes if it a float i want to drop it

#

yes

brazen gazelle
left trail
#

@brazen gazelle @tepid edge is these any command to set decimal's precision ???

#

what is it

#

i just want python to not consider
45676543.0000000000000000000000045664
as an integer

#

yes it is considering as an integer

rugged root
#

!e

ham = 3.12
print(ham.is_integer())
print(isinstance(ham, int))
wise cargoBOT
#

@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | False
002 | False
left trail
#

@brazen gazelle its general form of pythagorean triples

tepid edge
#

!e

sample_float = 969345543.0000000000353345432
print(sample_float.is_integer())
wise cargoBOT
#

@tepid edge :white_check_mark: Your 3.11 eval job has completed with return code 0.

True
left trail
#

@tepid edge @brazen gazelle
decimal.getcontext().prec=
do you know anything about this ??

rugged root
#

!e

pork = 3.0
spam = 969345543.0000000000353345432

print(int(pork) == pork)
print(int(spam) == spam)
wise cargoBOT
#

@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | True
002 | True
tepid edge
#

!e

sample_float = 969345543.5
print(sample_float.is_integer())
wise cargoBOT
#

@tepid edge :white_check_mark: Your 3.11 eval job has completed with return code 0.

False
amber raptor
#

!e python a = 3.00000000005 print(a.is_integer())

left trail
#

i just asked chatgpt for this
and it provided it this decimal.getcontext().prec = 100
which will set precision after decimal @brazen gazelle @tepid edge

rugged root
#

!e

spam = 969345543.0000000000353345432
print(spam)
wise cargoBOT
#

@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.

969345543.0
#

@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.

False
amber raptor
#

!e python a=45676543.0000000000000000000000045664 print(a.is_integer()) print(type(a))

wise cargoBOT
#

@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.

True
amber raptor
#

!e python a=45676543.0000000000000000000000045664 print(a.is_integer()) print(type(a))

wise cargoBOT
#

@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | True
002 | <class 'float'>
rugged root
#

!d float.is_integer

wise cargoBOT
#

float.is_integer()```
Return `True` if the float instance is finite with integral value, and `False` otherwise:

```py
>>> (-2.0).is_integer()
True
>>> (3.2).is_integer()
False
amber raptor
#

!e python a=45676543.0000000000000000000000045664 print(a.is_integer()) print(type(a)) print(a.as_integer_ratio())

wise cargoBOT
#

@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | True
002 | <class 'float'>
003 | (45676543, 1)
wise cargoBOT
#

Objects/floatobject.c line 886

float_is_integer_impl(PyObject *self)```
tepid edge
wise cargoBOT
#

Objects/floatobject.c lines 886 to 894

float_is_integer_impl(PyObject *self)
/*[clinic end generated code: output=7112acf95a4d31ea input=311810d3f777e10d]*/
{
    double x = PyFloat_AsDouble(self);
    PyObject *o;

    if (x == -1.0 && PyErr_Occurred())
        return NULL;
    if (!Py_IS_FINITE(x))```
amber raptor
rugged root
#

!source

wise cargoBOT
amber raptor
#

!e python a = 1.00000000001 print(a.is_integer())

wise cargoBOT
#

@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.

False
amber raptor
#

!e python a = 1.001 print(a.is_integer())

wise cargoBOT
#

@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.

False
left trail
#

!e

a = 1.000000002
print(a.is_integer())
wise cargoBOT
#

@left trail :white_check_mark: Your 3.11 eval job has completed with return code 0.

False
amber raptor
#

!e python for x in range(0,15): print(x)

wise cargoBOT
left trail
#

!e

a = 1.0000000000002
print(a.is_integer())```
wise cargoBOT
#

@left trail :white_check_mark: Your 3.11 eval job has completed with return code 0.

False
tepid edge
whole bear
#

yoo

rugged root
#

That'll tell you what you need to know about the voice gate

left trail
#

@tepid edge it just check upto 16 decimal places
if 16 number after decimals are zero then it consider it as a integer

#

!e

print(a.is_integer())```
wise cargoBOT
#

@left trail :white_check_mark: Your 3.11 eval job has completed with return code 0.

False
left trail
#

!e

print(a.is_integer())```
wise cargoBOT
#

@left trail :white_check_mark: Your 3.11 eval job has completed with return code 0.

True
left trail
#

1 zero extra

amber raptor
#

!e python a = 1.00000000000000023 b = 1.000000000000000023 print(a.is_integer()) print(b.is_integer())

wise cargoBOT
#

@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | False
002 | True
rugged root
#

!e

ham = {"pork": 4, "spam": 5}

print(ham["pork"])
wise cargoBOT
#

@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.

4
rugged root
#

!e

ham = {"pork": 4, "spam": 5, "sausage": {"beef": 8}}

print(ham["pork"])
print(ham["sausage"]["beef"])
wise cargoBOT
#

@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 4
002 | 8
whole bear
#

i have friends who use capslock to write capital letters

left trail
#

@tepid edge @midnight agate sorry for being off topic but i want you to pounce my name which is himanshu
i just want to hear how will that sound in your accent

tepid edge
#

ひまんしゅ?

left trail
tepid edge
#

ちょっとよくわからにきがする。。。

left trail
#

nah its a hindi name @tepid edge

mortal burrow
#

(define a (cons 1 (cons 2 (cons 3 (cons 4 ())))))

willow light
#

Hello Hemlocke

whole bear
#

i am not a huge fan of this typdef thing because now i don't know whether list is an enum, a type or a struct

frosty garnet
mortal burrow
#

I like this book

#

It's not C++ but it's fun and exposes you to functional programming.

vital cedar
#

Blog : https://pysource.com/2021/10/05/object-tracking-from-scratch-opencv-and-python/

In this special video, I'm going to help you solve the doubts you have about object tracking and you'll learn how to build an Object Tracking algorithm from scratch.

➤ Courses:
Full Computer Vision course: https://pysource.com/object-detection-opencv-deep-l...

▶ Play video
#

you need to track the ball, this video
take two frames of the camera
meature the distance between the balls in the different frames, in the camera view
change the meaturement to fit the distance in real life.
know the frame rate of the camera
then just
speed = distance/time
...

left trail
#

@brazen gazelle what's your ultimate goal? to find the speed?

#

@brazen gazelle so you want to find the trajectory of the object or just the final position?

#

finding trajectory is not that calculating
if you ignore air resistance @brazen gazelle

#

just wait lemme grab my physics bok @brazen gazelle

#

@brazen gazelle y=xtanθ−gx^2/(2u^2cos2θ)
its the equation of a projectile trajectory
you just need the initial speed and the angle at which it is projected

#

@brazen gazelle u can actually predict anything of a projectile motion if you have its initial speed and angle on which it is projected

#

@brazen gazelle u can find initial speed with initial frames
and the angle too

#

@brazen gazelle the idea you have its actually been used in sports alot.

#

@brazen gazelle oo BTW whats the time in your country?

#

@brazen gazelle can you explain me the education system in western countries..

left trail
#

@brazen gazelle mmmhhh........
can u please... explain.....

left trail
#

@frosty garnet @brazen gazelle can anyone explain me the education system of western countries....

#

@brazen gazelle in my country we have
classes from 1-12

#

what are high schools then?

#

@brazen gazelle you have some sort of choice in subjects?

#

like we have to study all subject from 1-10
then we have option between 3 sets of subject
which are called
science stream/ commerce stream and humanities stream

#

is these some exams to get admission in collage for graduation? @frosty garnet @brazen gazelle

#

its 2:39 AM here

willow light
limpid umbra
#

very true

green swallow
#

hi

somber heath
#

@shy plume 👋

shy plume
#

hello

#

how i can speak

#

?

somber heath
#

!voice

wise cargoBOT
#
Voice verification

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

shy plume
#

!voice

#

i think, i need to send messages on this server or put the command to verify

#

i new here, i have this server because i'm programmer

#

i understand others languages

#

c++, kotln, java, python

#

now, i need to finish the programming web

#

okey, bye

winter plover
#

!e```py
if name == 'main':
print('Hi')

somber heath
#

@smoky field👋

smoky field
#

WHY CANT I TALKKKK

#

AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

#

SRY

winter plover
#

#voice-verification

somber heath
#

Follow the instructions therein.

smoky field
#

ok

#

i talk here

somber heath
#

Be sure to read them carefully.

smoky field
#

rara ratata

#

roma romaama

#

gaga oo lala

#

ok sorry

#

Lemme Tolk

somber heath
#

We don't have the ability to grant you voice permissions, I'm afraid.

#

The power lies within you.

warm jackal
somber heath
#

@edgy skiff👋

edgy skiff
#

hii

#

sure

#

whats up??

somber heath
#

Twisty is working on their programming language.

edgy skiff
#

oj

somber heath
#

I'm preparing a dose of caffeine.

edgy skiff
#

sounds great

#

how will do they use their programming lang?

somber heath
#

@verbal zenith☝️

#

@lunar veldt👋

lunar veldt
#

hello

somber heath
#

@hollow stag👋

hollow stag
somber heath
#

@whole bear👋

whole bear
#

hello

somber heath
#

Yahoy.

whole bear
#

is there any game engine (like godot) for python, ik i sound stupid, but i cant seem to find any

somber heath
#

Ursina.

#

Pygame.

whole bear
#

nah, ik those, but i am asking if there are any which have a graphical interface

somber heath
#

@torn monolith👋

whole bear
#

hence i said i sound stupid

somber heath
#

Kivy, Beeware, PyQt5...

#

tkinter if you want to go standard library

#

@hearty salmon👋

#

They're more UX than game engine.

whole bear
#

no, like how unity, and godot have a graphical interface, where you can make a gam object, place it etc

#

hence i said i sound stupid

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied mute to @whole bear until <t:1679138265:f> (10 minutes) (reason: duplicates rule: sent 4 duplicated messages in 10s).

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

somber heath
#

Whoopsydoodle.

verbal zenith
#

Unfortunately no @whole bear there is not

somber heath
#

Oh, like a 3D game engine map editor thing?

#

I can't say that I'm familiar enough with what's out there.

#

At that level, ther's not real reason why you couldn't make one.

#

Make the editor in the game engine, itself.

#

Or...I don't know. Something like that.

#

I don't know what the best approach is, there.

winter plover
#

'\t'

verbal zenith
#

' '

winter plover
#
Chloris > 1 + 1
[TokenKind.integer_literal, op_plus , TokenKind.integer_literal]
Chloris >
somber heath
#

Slow Chloris.

winter plover
#
elif self.current_char == '+':
                tokens.append(Token(TokenKind.op_plus.name, TokenKind.op_plus.value))
                self.advance()
somber heath
#

I'm a connections kinda guy.

#

The search for puns is neverending.

winter plover
#
Chloris > 1 + 1
[TokenKind.integer_literal, TokenKind.op_plus, TokenKind.integer_literal]
Chloris >
#
Chloris > 1 + ( 2 * 5 )
[TokenKind.integer_literal, TokenKind.op_plus, TokenKind.open_paren, TokenKind.integer_literal, TokenKind.op_multiply, TokenKind.integer_literal, TokenKind.closed_paren]
somber heath
#

Toke. It's the past tense of take. Join me for more "True" Facts with Opal.

whole bear
#

nice, got unmuted

verbal zenith
#
@dataclass
class Token:
    kind: TokenKind
    value: str = None

    def __repr__(self):
        if self.value:
            return f"Token({self.kind}, {self.value!r})"
        return f"Token({self.kind})"
#
2023-03-18 05:55:21,731 [CobraLang.Lexer] DEBUG: Tokens: [
Token(TokenKind.Identifier, 'print', self.space_after=False, self.newline_after=False)
Token(TokenKind.LeftParen, self.space_after=False, self.newline_after=False)
Token(TokenKind.RightParen, self.space_after=False, self.newline_after=True)
]
winter plover
#
Chloris > 2 + 4
[Token(TokenKind.integer_literal : 2), Token(TokenKind.op_plus : 8), Token(TokenKind.integer_literal : 4)]
winter plover
#
Chloris > 1 + 2
[Token(TokenKind.integer_literal : 1), Token(TokenKind.op_plus), Token(TokenKind.integer_literal : 2)]
#
Chloris > 1.2 * 4.6
[Token(TokenKind.float_literal : 1.2), Token(TokenKind.op_multiply), Token(TokenKind.float_literal : 4.6)]
Chloris > 
#
Chloris > 1 * 3.5
[Token(TokenKind.integer_literal : 1), Token(TokenKind.op_multiply), Token(TokenKind.float_literal : 3.5)]
uncut meteor
somber heath
#

Ohmigosh those paws as so fluffeh!

uncut meteor
warm jackal
#

Breakfast!

verbal zenith
#
class Function:
    def __init__(self, name: str, args: list[str], varargs: str | None, kwargs: dict[str:Node], varkwargs: str | None, body: FunctionBlock):
        self.name = name
        self.args = args
        self.varargs = varargs
        self.kwargs = kwargs
        self.varkwargs = varkwargs
        self.body = body

    def __repr__(self):
        return f"Function({self.name}, {self.args}, {self.varargs}, {self.kwargs}, {self.body})"

    def run(self, ctx: Context, args: list[Value], kwargs: dict[str:Value]):
        ctx.push_scope()
        # unpack args and kwargs
        for name, arg in zip(self.args, args):
            ctx.current_scope().variables[name] = arg
        

        try:
            out = self.body.run(ctx)
        except ReturnException as e:
            out = e.value
            return out
        finally:
            ctx.pop_scope()
somber heath
#

@halcyon barn👋

uncut meteor
#

!stream @verbal zenith

wise cargoBOT
#

✅ @verbal zenith can now stream until <t:1679140746:f>.

somber heath
#

!e py a = {1, 2, 3, 4} b = {3, 4, 5, 6} c = a.intersection(b) d = a.difference(b) e = b.difference(a) print(c) print(d) print(e)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | {3, 4}
002 | {1, 2}
003 | {5, 6}
uncut meteor
#

!e

def test(d: list[str:str]):
  print(d)
wise cargoBOT
#

@uncut meteor :warning: Your 3.11 eval job has completed with return code 0.

[No output]
warm jackal
vocal basin
#

!e

print(dict[str, str])
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

dict[str, str]
uncut meteor
#

!e

x = dict[str:str]
print(x)
wise cargoBOT
#

@uncut meteor :white_check_mark: Your 3.11 eval job has completed with return code 0.

dict[slice(<class 'str'>, <class 'str'>, None)]
vocal basin
#

like dict[str]

#

it's just not a valid type hint, probably

warm jackal
vocal basin
#

it's a way to specify typing for dicts

#

if you need a way to store data of this form, use dataclasses
if you need to specify typing for dicts, use TypedDict

#

they solve different problems

terse needle
#
CC      = clang++
INCLUDE = src
OBJ     = build
SRC     = src
SRCS    = $(SRC)/main.c
SRCS    += $(wildcard $(SRC)/*.c)
SRCS    += $(wildcard $(SRC)/*/*.c)
SRCS    += $(wildcard $(SRC)/*/*/*.c)
OBJS    = $(patsubst $(SRC)/%.c,$(OBJ)/%.o,$(SRCS))
EXE     = lci
CFLAGS  = -I$(INCLUDE) -std=c17 -pedantic
LDLIBS  = -lm

$(OBJ)/%.o: $(SRC)/%.c
    @mkdir -p "$(@D)"
    @echo "Compiling: $< -> $@"
    @clang -c $(CFLAGS) -g $< -o $@

$(EXE): $(OBJS)
    @echo "Building final executable: $@"
    @clang $^ -g $(LDLIBS) -o $@

$(OBJ):
    mkdir -p $@

format: $(SRC)
    clang-format $^ -i

clean:
    rm -rf $(OBJ) $(EXE)
vocal basin
warm jackal
#
CC      = clang++
INCLUDE = src
OBJ     = build
SRC     = src
SRCS    = $(SRC)/main.c
SRCS    += $(shell find $(SRC) -type f -name '*.c')
OBJS    = $(patsubst $(SRC)/%.c,$(OBJ)/%.o,$(SRCS))
EXE     = lci
CFLAGS  = -I$(INCLUDE) -std=c17 -pedantic
LDLIBS  = -lm

$(OBJ)/%.o: $(SRC)/%.c
    @mkdir -p "$(@D)"
    @echo "Compiling: $< -> $@"
    @clang -c $(CFLAGS) -g $< -o $@

$(EXE): $(OBJS)
    @echo "Building final executable: $@"
    @clang $^ -g $(LDLIBS) -o $@

$(OBJ):
    mkdir -p $@

format: $(SRC)
    clang-format $^ -i

clean:
    rm -rf $(OBJ) $(EXE)
vocal basin
#

for arbitrary characters including /

#

$(SRC)/**.c

#

if the notation is glob-like

#

Function class probably contains parameters not arguments

#

although naming is ambiguous in both cases

somber heath
#

@lean veldt@tepid blade@wary turret👋

#

!e py iterable_of_tuples = [('a', 'A'), ('b', 'B')] result = dict(iterable_of_tuples) print(result)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

{'a': 'A', 'b': 'B'}
uncut meteor
#

!stream @verbal zenith

wise cargoBOT
#

✅ @verbal zenith can now stream until <t:1679143581:f>.

winter plover
#
(

Token(TokenKind.integer_literal), 
Token(TokenKind.op_plus), 
(
    Token(TokenKind.integer_literal), 
    Token(TokenKind.op_multiply), 
    Token(TokenKind.integer_literal)
)

)
somber heath
#

!e py d = {'key_a': 'value_a', 'key_b': 'value_b', 'key_c': 'value_c'} print(d.keys()) print(d.values()) print(d.items())

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | dict_keys(['key_a', 'key_b', 'key_c'])
002 | dict_values(['value_a', 'value_b', 'value_c'])
003 | dict_items([('key_a', 'value_a'), ('key_b', 'value_b'), ('key_c', 'value_c')])
somber heath
#

@unborn glen@frail beacon👋

frail beacon
#

hey

unborn glen
#

@somber heath hiii

frail beacon
#

im just here to learn something :)

somber heath
#

@reef seal👋

unborn glen
#

same im just a beginner:)

#

so I was wondering what is a file in python cuz for the next week my teacher said we gonna work on file subject so...

#

@warm jackal alright thx

#

@warm jackal definitely 👌

#

so its ipython u said?

#

alright

#

didn't know that nice!!!

#

and btw can someone explain to me what is debuging?

somber heath
#

You'll be looking at open and, ideally, with open. Of note, pathlib is a thing.

unborn glen
#

intersting

#

to learn python fast what books do you guys suggest?

#

yeah fair enough

somber heath
#

Learn well.

unborn glen
#

that's more cooler than reading a book @warm jackal

somber heath
#

The more you can do that, the easier your progress will be, because you're not gunking it up with crap habits and misconceptions.

somber heath
#

Less haste, more speed.

unborn glen
#

now i see

#

u know its huge world @somber heath

#

alright for now i have to go back to the work i catch u guys later thanks for the guides and help

scenic quiver
#

Hi @elder violet welcome to this server✨

elder violet
#

hieee

#

thanks for inviting :D.

scenic quiver
#

My pleasure

somber heath
#

@cedar crest👋

scenic quiver
#

Hi guys!

This is a solution for one of the problems.

Is there any other solution which is efficient than this solution?

#

!e

patterns=["abc","a","bc","e"]

s="abc"

c=0

for i in patterns:
    if i in s:
        print(i)
        c=c+1

print(c)
wise cargoBOT
#

@scenic quiver :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | abc
002 | a
003 | bc
004 | 3
winter plover
#
class Number:

    def __init__(self, value):
        self.value = value
        self.set_pos()

    def set_pos(self, pos_start=None, pos_end=None,):
        self.pos_start = pos_start
        self.pos_end = pos_end
        return self

    def added_to(self, other):
        if isinstance(other, Number):
            return Number(self.value + other.value)

    def subtracted_by(self, other):
        if isinstance(other, Number):
            return Number(self.value - other.value)

    def multiplied_by(self, other):
        if isinstance(other, Number):
            return Number(self.value * other.value)
    
    def divided_by(self, other):
        if isinstance(other, Number):
            return Number(self.value / other.value)  

    def __repr__(self):
        return str(self.value)
#
def visit_BinaryOperatorNode(self, node):
        res = RuntimeResult()
        left = res.register(self.visit(node.left_node))
        if res.error: return res
        right = res.register(self.visit(node.right_node))
        if res.error: return res

        if node.op_tok.kind == TokenKind.op_plus:
            result, error = left.added_to(right)
        if node.op_tok.kind == TokenKind.op_minus:
            result, error = left.subtraced_by(right)
        if node.op_tok.kind == TokenKind.op_multiply:
            result, error = left.multiplied_by(right)
        if node.op_tok.kind == TokenKind.op_divide:
            result, error = left.divided_by(right)

        if error:
            return res.failure(error)
        else:
            return res.success(result.set_pos(node.pos_start, node.pos_end))
#
(left) (op) (right)
drifting sonnet
#

@candid fox could I have the ability to ss?

#

@desert vector could I have the ability to ss?

empty vault
#

hi

final crane
#

function calculateWinner(squares) { const lines = [ [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6], ]; for (let i = 0; i < lines.length; i++) { const [a, b, c] = lines[i]; if (squares[a] && squares[a] === squares[b] && squares[a] === squares[c]) { return squares[a]; } } return null; }

#

if

#

if

#

`

#

`

#
 function calculateWinner(squares) {
  const lines = [
    [0, 1, 2],
    [3, 4, 5],
    [6, 7, 8],
    [0, 3, 6],
    [1, 4, 7],
    [2, 5, 8],
    [0, 4, 8],
    [2, 4, 6],

  ];
  for (let i = 0; i < lines.length; i++) {
    const [a, b, c] = lines[i];
    if (squares[a] && squares[a] === squares[b] && squares[a] === squares[c]) {
      return squares[a];
    }
  }
  return null;

}```
#

x
x
x

#

@ivory stump

Can you enable screen share for me

drifting sonnet
#

@wind raptor can I have the ability to ss please?

winter plover
#
number = Number(5).get_value()

variable = instance_call(attr).mehtod_call()
#

number.get_value()

#
class Geek:
    def __init__(self, age = 0):
         self._age = age
      
    # getter method
    def get_age(self):
        return self._age
      
    # setter method
    def set_age(self, x):
        self._age = x
  
raj = Geek()
  
# setting the age using setter
raj.set_age(21)
  
# retrieving age using getter
print(raj.get_age())
  
print(raj._age)
#

!e ```py
class Geek:
def init(self, age = 0):
self._age = age

# getter method
def get_age(self):
    return self._age
  
# setter method
def set_age(self, x):
    self._age = x

raj = Geek()

setting the age using setter

raj.set_age(21)

retrieving age using getter

print(raj.get_age())

print(raj._age)

wise cargoBOT
#

@winter plover :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 21
002 | 21
winter plover
#

raj = Geek("Name")

#

raj.set_age(21)

#

print(raj.get_age())

#

21

#

print(raj.get_name())

#
def get_name(self):
  return self._name

empty vault
#

guys how to request api from youtube?

winter plover
#

!e

wise cargoBOT
#
Missing required argument

code

winter plover
#

!e ```

class Geek:
def init(self, age = 0):
self._age = age

# getter method
def get_age(self):
    return self._age
  
# setter method
def set_age(self, x):
    self._age = x

raj = Geek()

setting the age using setter

raj.set_age(21)

retrieving age using getter

print(raj. + 'get_age()')

print(raj._age)

empty vault
#

am i have to get it here?

drifting sonnet
#
class Employee:
    
    def __init__(self,first,last,pay):
        self.first = first
        self.last = last
        self.pay = pay


emp_2 = Employee("test","User",5000)



emp_2.first```
winter plover
#

!e ```

class Employee:

def __init__(self,first,last,pay):
    self.first = first
    self.last = last
    self.pay = pay

emp_2 = Employee("test","User",5000)

print(emp_2[])

wise cargoBOT
#

@winter plover :x: Your 3.11 eval job has completed with return code 1.

001 |   File "/home/main.py", line 13
002 |     print(emp_2[])
003 |           ^^^^^^^
004 | SyntaxError: invalid syntax. Perhaps you forgot a comma?
winter plover
#
print(emp_2.__dict__)

{'first': 'test', 'last': 'User', 'pay': 5000}
#
print(list(emp_2.__dict__))
['first', 'last', 'pay']
drifting sonnet
#

!e```py
class Employee:

def __init__(self,first,last,pay):
    self.first = first
    self.last = last
    self.pay = pay

emp_2 = Employee("test","User",5000)

for x,y in vars(emp_2).items():
print(getattr(emp_2,x))```

wise cargoBOT
#

@drifting sonnet :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | test
002 | User
003 | 5000
winter plover
#
print(vars(emp_2).items())
dict_items([('first', 'test'), ('last', 'User'), ('pay', 5000)])
#
print(emp_2.__dict__.items())
drifting sonnet
winter plover
#

!e ```py
class Employee:

def __init__(self,first,last,pay):
    self.first = first
    self.last = last
    self.pay = pay

emp_2 = Employee("test","User",5000)

for key in emp_2.dict.keys():
print(emp_2.dict[key])

#

!e ```
class Employee:

def __init__(self,first,last,pay):
    self.first = first
    self.last = last
    self.pay = pay

emp_2 = Employee("test","User",5000)

for key in emp_2.dict.keys():
print(emp_2.dict[key])

wise cargoBOT
#

@winter plover :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | test
002 | User
003 | 5000
winter plover
#

2021

drifting sonnet
#

0.001

#

0.001 x 10,000

#

10

slow venture
#

hey guys do you know why it says not defined even though i defined it in the function already for xtail and ytail?

winter plover
#
Graphics libray


circle = Cirlce(radius, color, x, y)

def update():

  if keyboard press
    cirlce.x = circle.x += 1

vocal basin
slow venture
#

can you give an example?

#

so i have to define what xtail is first and then use it in the function?

vocal basin
wise cargoBOT
#

@vocal basin :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 6, in <module>
003 |     g()
004 |   File "/home/main.py", line 4, in g
005 |     print(x)
006 |           ^
007 | NameError: name 'x' is not defined
drifting sonnet
#

lol

vocal basin
#

there are two ways to fix it

vocal basin
slow venture
vocal basin
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

1
vocal basin
#

first way

slow venture
#

could you do the example with xtail and xcor()

#

so its easier for me to understand

#

sorry

final crane
#

@green bone

vocal basin
#

!e

class C:
    def f(self):
        self.x = 1
    def g(self):
        print(self.x)
c = C()
c.f()
c.g()
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

1
final crane
#

Can you give me screen share please @green bone

winter plover
vocal basin
# slow venture

the better way is to return xtail, ytail from the first function instead of setting fields or global variables

empty vault
#

guys gtg it was enjoying to talk with you but i gotta tore apart df into 100 pieces 🙂

winter plover
#
from tkinter import *
from tkinter import ttk
root = Tk()
frm = ttk.Frame(root, padding=10)
frm.grid()
ttk.Label(frm, text="Hello World!").grid(column=0, row=0)
ttk.Button(frm, text="Quit", command=root.destroy).grid(column=1, row=0)
root.mainloop()
vocal basin
empty vault
#

bye

vocal basin
#

where are you calling the first function right now?

#

(function that defines xtail, ytail)

slow venture
#

in the function

#

with the picture

#

itself

slow venture
drifting sonnet
#

K. this is what u need

#

!e```py
class C:
def init(self):
self.x = 1
pass

def g(self):
    return f"f{self.x}" 

test = C()

print(f"{test.x}")```

wise cargoBOT
#

@drifting sonnet :white_check_mark: Your 3.11 eval job has completed with return code 0.

1
slow venture
#

I'm so sorry but i'm very new at this so i have no idea what that means

vocal basin
#

!paste

wise cargoBOT
#
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.

slow venture
#

yeah ofc!

#

sorry guys

vocal basin
slow venture
#

ohhhh

#

I have to put the return

#

is that correct?

#

and it will fix it?

vocal basin
#

it may fix it

#

partially

slow venture
#

ahhh okay i will try it

drifting sonnet
#

According to TIME, OpenAI — the creator of ChatGPT — is said to have outsourced Kenyan workers who earned less than $2 per hour to make the chatbot less toxic. The workers are under Sama, a San Francisco-based firm that hires people in Kenya, Uganda, and India.

vocal basin
slow venture
vocal basin
slow venture
#

ohhh so did it work?

vocal basin
slow venture
#

I think i might have tried it wrong then

#

i just did the return

#

but didn't do the other part

vocal basin
winter plover
vocal basin
#

tk inter

#

short from interface, I guess

#

@drifting sonnet type annotations

#

this has been valid since at least 3.6

#

it does neither

drifting sonnet
#

str(title)

vocal basin
#

only hints to the IDE

winter plover
#

title: int = 12

#

window("was")_

vocal basin
winter plover
#

window(12_

drifting sonnet
#

title: int = 12

vocal basin
#

!e

i: str = 42
print(i ** 2)
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

1764
vocal basin
#

annotations don't influence the runtime

winter plover
vocal basin
#

!d typing

wise cargoBOT
#

New in version 3.5.

Source code: Lib/typing.py

Note

The Python runtime does not enforce function and variable type annotations. They can be used by third party tools such as type checkers, IDEs, linters, etc.

This module provides runtime support for type hints. The most fundamental support consists of the types Any, Union, Callable, TypeVar, and Generic. For a full specification, please see PEP 484. For a simplified introduction to type hints, see PEP 483.

The function below takes and returns a string and is annotated as follows...

vocal basin
#

TypeVar is for generics

#
from typing import TypeVar, Generic

T = TypeVar('T')

class Container(Generic[T]):
    def __init__(self, value: T):
        self.value = value

int_container: Container[int] = Container(1)
#

same syntax as list[int]

winter plover
#

def init(self, title, (w, h))

vocal basin
#

I'd say both options are fine

vocal basin
winter plover
#

window_size: tupl

vocal basin
#
def __init__(self, title: str, xy: tuple[int, int]):
winter plover
#

xy.x

vocal basin
#

xy[0]

winter plover
#

xy[0]

vocal basin
#

or use dataclasses

#

!d collections.namedtuple

wise cargoBOT
#

collections.namedtuple(typename, field_names, *, rename=False, defaults=None, module=None)```
Returns a new tuple subclass named *typename*. The new subclass is used to create tuple-like objects that have fields accessible by attribute lookup as well as being indexable and iterable. Instances of the subclass also have a helpful docstring (with typename and field\_names) and a helpful `__repr__()` method which lists the tuple contents in a `name=value` format.

The *field\_names* are a sequence of strings such as `['x', 'y']`. Alternatively, *field\_names* can be a single string with each fieldname separated by whitespace and/or commas, for example `'x y'` or `'x, y'`.
vocal basin
#

depends on what's easier to use

#

you can have Config class to store every configuration parameter, for example

#

!e

from collections import namedtuple

Dimensions = namedtuple('Dimensions', ['width', 'height'])

dimensions = Dimensions(800, 600)
print(dimensions)
width, height = dimensions
print(width, height)
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Dimensions(width=800, height=600)
002 | 800 600
vocal basin
#

!e

from collections import namedtuple
Dimensions = namedtuple('Dimensions', ['width', 'height'])
dimensions = Dimensions(800, 600)
print(dimensions.width, dimensions.height)
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

800 600
vocal basin
#

also, can use .field syntax

#
def __init__(self, title: str = "some title", dimensions: Dimensions = Dimensions(800, 600))
#

(or just use tuple without all this extra work around it)

#

just pick the simplest solution right now, you can change it later to whatever is better

#

these are all fine

def __init__(self, title: str = "some title", dimensions: Dimensions = Dimensions(800, 600)):
def __init__(self, title: str = "some title", wh: tuple[int, int] = (800, 600)):
def __init__(self, title: str = "some title", wh: int = 800, h: int = 600):
def __init__(self, config: Config = default_config()):
def __init__(self, config: Config | None = None):
#

!d bisect

wise cargoBOT
#

Source code: Lib/bisect.py

This module provides support for maintaining a list in sorted order without having to sort the list after each insertion. For long lists of items with expensive comparison operations, this can be an improvement over the more common approach. The module is called bisect because it uses a basic bisection algorithm to do its work. The source code may be most useful as a working example of the algorithm (the boundary conditions are already right!).

The following functions are provided:

vocal basin
#

for searching for greatest value below a certain threshold, there also exist specialised data structures

#

mostly trees

#

performance-wise they're generally equivalent to array+binary search
(linear construction time, logarithmic search time)

#

((construction time from sorted))

#

construction from unsorted is O(NlogN) for both

#

@final crane linked lists are faster to split/join

drifting sonnet
#

@candid fox can u give me the ability to ss?

final crane
#

!N

whole bear
#

@final crane

final crane
#

log(x) =

whole bear
vocal basin
#

these labels are very task-dependent

final crane
#

f(x) = x *2 +4

vocal basin
#

2^log2(n)=n you meant?

final crane
#

log2(2^n) = n

#

log2(n) =

whole bear
drifting sonnet
#

Sigmoid Function

whole bear
vocal basin
vocal basin
jaunty reef
#

bitwise operation magic

final crane
#

^

whole bear
#

be back later @final crane

#

technical issues

final crane
#

ok

hasty jungle
#

@mild quartz hi

#

are you still there

woeful salmon
#

!code

wise cargoBOT
#
Formatting code on discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

#

Hey @ebon mist!

You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.

ebon mist
winter plover
#

Run a message through each encryption then decrypt one by one should be fun

#

Ooo that could be a cool project idea have a password manager that generates a random key for each user then encrypts their passwords from outside users .. big brain pappycat

ebon mist
#

i made it for a bet

winter plover
#

A what

woeful salmon
winter plover
#

Am I a robot

#

Is it like a puzzle or something

winter plover
woeful salmon
winter plover
#

Ah

woeful salmon
#

the first page is something like are you a robot? you know where to go

winter plover
#

Hacking

woeful salmon
#

which is the right thing if you see that

winter plover
#

Yes

#

Sad that I’m on mobile rn lol

#

I can’t do it

woeful salmon
#

you should have time

#

xD

winter plover
#

Has it not be solved or something

woeful salmon
#

it has

winter plover
#

Oh

woeful salmon
#

ye its just for fun there's no real reward except for the satisfaction of solving it and the fun you have along the way

winter plover
#

All I would think of is going into inspection mode lol

somber heath
#
widget = Widget()
...
widget.update(text=...)```
winter plover
#

Oh no economics

somber heath
#

!paste

wise cargoBOT
#
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.

somber heath
#

@jagged olive👋

jagged olive
somber heath
#

@tough gust👋

#

!voice

wise cargoBOT
#
Voice verification

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

somber heath
#

@glad raptor👋

#

@wary turret👋

wary turret
#

I have not permission to speak in the channel how can I get the permission @somber heath

somber heath
#

!voice

wise cargoBOT
#
Voice verification

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

ebon mist
#

‰¡·§ˆ´¬»´¦Ž¥›º‚¦‰¼ˆ¡¼‰ºƒ»´Šƒ¶¼‚¥½™°ƒ§ˆŠ€°‡»Ž¶§‡¬‚¥™¡Žï³çˆæ´äög¯2ô%®8°¬)ö#º:‡"«/ü8¤ÿ/©$º)‡8©3ñ:«>ºp­{¤¸s-x˜o¦r¼_ƒc¶iòp‡he´rŒ_™e¶nòc™r‚y‡p¶t½:´7ˆ4þö©ö¢¶ˆŸ›Ž†…ˆŸ…Œ›ˆ±ŽŠð®ôõ–¬¢®ÿ¢ü ¬õò«®ü ®ð¬üåòþ…Ÿø¶´°¦´§Š¶¼¥½°§Š°»¶§¬¥¡ïçäçø-transposition_cipher_encrypt:157

somber heath
#

@cedar glacier👋

#

@quaint flower👋

#

@sand willow👋

sand willow
#

hii

somber heath
#

@timid crypt👋

ebon mist
#

def transposition_cipher_encrypt(key, message):
encrypted_message = ""
for i in range(key):
for j in range(i, len(message), key):
encrypted_message += message[j]
return encrypted_message, str(key)

timid crypt
#

I cannot speak

somber heath
wise cargoBOT
#
Voice verification

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

scenic quiver
#
class Solution(object):
    def minCostClimbingStairs(self, cost):
        n=len(cost)
        step=0
        su=0
        while step<=n-2:
            if step==n-3:
                if (cost[step]+cost[step+2])>cost[step+1]:
                    su=su+cost[step+1]
                else:
                    su=su+cost[step]+cost[step+2]
                step=step+3
            else:        
                if cost[step]>=cost[step+1]:
                    su=su+cost[step+1]
                    print(cost[step+1])
                    step=step+1
                else:
                    su=su+cost[step]
                    print(cost[step])
                step=step+1
        return su
#

I need help in this question. 256 / 283 testcases passed

wise cargoBOT
#

@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 |    / \
002 |   /   \
003 |  /     \
004 | ─────────
somber heath
#

@frigid pewter 👋

#

!voice

wise cargoBOT
#
Voice verification

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

slow venture
frigid pewter
#

wtffffffffffffffffff

slow venture
frigid pewter
#

wtfffff why do you guys write so much how much time do you have hahahaaha

somber heath
golden sonnet
#

hi opal

somber heath
#

@slow venture Have you heard of beziers?

slow venture
#

I'm still new at this

somber heath
#

Personally, I'd just say design the vector data in Photoshop or GIMP or something and be done with it.

#

But well done on what you have done.

#

I was eyeing it the other day.

#

Looks rather Toothless.

slow venture
#

thank you so much!

#

it is toothless

#

or the toothless we have at home

#

HAHAHAH

somber heath
#

Ha

slow venture
#

I just don't understand why the right side have been giving me so much trouble

somber heath
#

As in "Mom, can we get Toothless? We have Toothless at home." The Toothless at home:

slow venture
#

I'm so close to getting the code to work

#

i just don't know why the right side isn't rotating

somber heath
#

The thing is, with image data like this, it's usually better to not do it in code at all. If you do, you want it data-driven, not code-driven.

#

So you might have a series of point-to-point coordinates with data describing the way in which the line should be drawn. That way might include data that describes a less direct path.

#

As above: See beziers.

slow venture
#

I'm so sorry but i have no idea what that means as I am clueless

somber heath
slow venture
#

wow

#

I wouldn't know how to do that o.o

somber heath
#

It's mathy, but it's how computers often draw curves.

vocal basin
slow venture
#

ohhhh

#

Hi yu!

vocal basin
slow venture
somber heath
#

So what you end up with is more a recipe to be interpreted, rather than you calling a bunch of functions manually.

slow venture
#

but how do i even implement that in python turtle

vocal basin
slow venture
#

yeah! i thought so too

#

but idk how to fix it

#

I've tried changing the points but then it just makes it worse

#

and goes everywhere

#

left is perfectly fine

#

but i think it has something to do with the setpos()

vocal basin
#

you have two offsets controlling the right part

slow venture
#

do I

#

?

#

o.o

vocal basin
#

setpos(160*hexa + place_dragx, place_dragy) in def right_head():
setpos(160*hexa + place_dragx, place_dragy) in def right_wing():

#

maybe more than these two

slow venture
#

ahhh

#

yeah i see it

#

but don't i need those

#

to direct where my drawing points are?

#

I've been at this all day my brain is so fried

vocal basin
#

something like this?

slow venture
#

AMAZING

#

WAIT WHAT

#

HOW DID YOU DO THAT

#

WAIT WHAT

vocal basin
slow venture
#

HOW DID YOU DO IT SO EASILY

#

Wdym 7 in both?

vocal basin
#

setpos(160 * hexa + place_dragx - 5, place_dragy - 7)

slow venture
#

It was just a simple change of number?

vocal basin
#

just subtracting 5 and 7

#

in both places at the same time

slow venture
#

How did you know it was that though... I spent 5hrs trying to code it

#

Wth

formal ember
#

!e import datetime

current_year = datetime.datetime.now().year
print(current_year)

slow venture
#

Would I be able to rotate it any direction with that?

wise cargoBOT
#

@formal ember :white_check_mark: Your 3.11 eval job has completed with return code 0.

2023
vocal basin
#

not exactly for proper rotation

slow venture
#

So if I rotate it again I'd have to change the numbers again?

#

I'm so grateful for you though omg

#

🥹

vocal basin
#

I'd still suggest using data-driven approach instead of separate statements for each segment

slow venture
#

Idk how to do data driven approach

#

:((

slow venture
vocal basin
slow venture
#

Maybe I can make a variable to easily change it

vocal basin
vocal basin
#

to make the data dimensionless

slow venture
#

Is that to make a curve?

golden sonnet
#

sup?

slow venture
golden sonnet
#

hi how you doin'?

vocal basin
slow venture
#

thank you Yu i really appreciate your help

#

thank you opal for the suggestion as well

golden sonnet
#

it looks like a misspell to me

slow venture
golden sonnet
#

i'm not very good with graphic stuff (or any other stuff :))

#

i'd help otherwise

slow venture
#

@vocal basin yeah you're right so as soon as anything changes the offset is out of place again :((

slow venture
#

my brain is fried time to sleep 1AM here

#

good night everyone

#

hopefully i can figure it out soon

golden sonnet
#

goodnight

formal ember
#

try catch sounds better than try except. 😂

formal ember
golden sonnet
#

not me
him

formal ember
formal ember
golden sonnet
#

i wanted to do one more question but it's depressing

slow venture
#

Does this make it easier to rotate the right side?

vocal basin
#

mirroring would be performed just by flipping the angles (automatically)

slow venture
#

It looks simpler but I'm not familiar with these commands so I'm afraid I will mess up the code

#

Is there any other way to fix the right side with the current code I have? Instead of the temporary fixed positions of subtracting 5 and 7?

scenic quiver
#

welcome @outer scaffold!

winter plover
#

ahhh

viscid pond
#

hi

#

im trying to run some 3b1b animations but i need to use the manim library

#

and im having some problems

#

can smn help

viscid pond
#

it says: no module named 'manim_imports_ext'

proven raft
#

rip

slow venture
#

@somber heath it doesnt let me talk

#

no permission

somber heath
#

!voice

wise cargoBOT
#
Voice verification

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

slow venture
#

haven't been on the server long enough

#

full focus time opal!

#

time to fix this toothless

#

idk what you mean I'm super new :((

#

should i delete the right side now

#

and redo it

#

Yu was saying i had two offset

#

and i think the way i placed them was wrong

#

ahhh

vocal basin
#

I'll try to translate the whole left side into this form

    interpret(
        [
            ('right', 80),
            ('forward', 100),
            ('circle', 100, 10),
        ],
        hexa
    )
somber heath
#
import turtle
points = [(5, 5), (3, 4), (7, 12), (8, 11)] #You could load this from a separate file
turtle.penup()
turtle.goto(points[0])
turtle.pendown()
for point in points[1:]:
    turtle.goto(point)```
#

Not this but just as a demonstration of the idea of data-driven vs code-driven.

slow venture
#

I think i kinda understand

vocal basin
slow venture
#

WHAT

vocal basin
#

I increased the scale temporarily so it'd be easier to see

slow venture
#

how you do that!

#

can it do that if it was smaller as well?

vocal basin
#
def mirror(commands: list[tuple]) -> list[tuple]:
    mirrored: list[tuple] = []
    for command in commands:
        match command:
            case ['left', float() | int() as angle]:
                command = 'right', angle
            case ['right', float() | int() as angle]:
                command = 'left', angle
            case ['circle', float() | int() as radius, float() | int() as angle]:
                command = 'circle', -radius, angle
        mirrored.append(command)
    return mirrored
vocal basin
slow venture
#

I haven't learnt this stuff yet so i only know the basic directions :((

vocal basin
#

and to rotate, just add left() or right() calls before left_side()

vocal basin
vocal basin
slow venture
#

is there anyway to do it without the mirroring effect? or the way you do it

#

is there a way to do it similar to how i did it

vocal basin
#

if you need to manually alter the mirrored version, you can just do pprint.pprint(mirror(left_side_commands()))

#

(then copy whatever's printed, paste into right_side_commands() and change it)

vocal basin
#

that's, like, the whole point of captcha

#

it[ChatGPT]'s very good at citing non-existent sources

#

"just pay OpenAI to access ChatGPT/GPT-3 without so much downtime"

#

that's kind of what they expect you to do when it's "overloaded"

red arch
#

ChatGPT has passed many exams like Law, medical etc but it never pass an IQ test

somber heath
#

@whole bear 👋

vocal basin
vocal basin
red arch
#

no AI can't past IQ test questions, nor more simpler captcha

verbal zenith
#
>>> import utils
>>> dump()
Variables: [
]
Functions: [
    print(_, args, sep=' ',end='\n',flush=True, _) {
    '<built-in function>'
  }
    exit(_, _, code=0, _) {
    '<built-in function>'
  }
    dump(_, _, show_self=False,show_var=True,show_func=True, _) {
    '<built-in function>'
  }
    clear(_, _, _, _) {
    '<built-in function>'
  }
    join(val, list, _, _, _) {
    IfStatement: [(FunctionCall(len, [list], {}) == 0, { [return ''] })]
    let i = 1
    let str = list[0]
    while i < FunctionCall(len, [list], {}) { [str = str + val + list[i], i = i + 1] }
    return str
  }
    split(val, str, _, _, _) {
    let list = []
    let start = 0
    let i = 0
    while i < FunctionCall(len, [str], {}) { [IfStatement: [(str[i] == val, { [FunctionCall(append, [list, str[start:i]], {}), start = i + 1] })], i = i + 1] }
    FunctionCall(append, [list, str[start:FunctionCall(len, [str], {})]], {})
    return list
  }
    sort(list, _, _, _) {
    let i = 0
    while i < FunctionCall(len, [list], {}) { [let j = i + 1, while j < FunctionCall(len, [list], {}) { [IfStatement: [(list[i] > list[j], { [let temp = list[i], list[i] = list[j], list[j] = temp] })], j = j + 1] }, i = i + 1] }
    return list
  }
    sum(list, _, _, _) {
    let i = 0
    let total = 0
    while i < FunctionCall(len, [list], {}) { [total = total + list[i], i = i + 1] }
    return total
  }
    reverse(list, _, _, _) {
    let i = 0
    let j = FunctionCall(len, [list], {}) - 1
    while i < j { [let temp = list[i], list[i] = list[j], list[j] = temp, i = i + 1, j = j - 1] }
    return list
  }
    enumerate(list, start, _, _, _) {
    let i = 0
    let new_list = []
    while i < FunctionCall(len, [list], {}) { [FunctionCall(append, [new_list, [start + i, list[i]]], {}), i = i + 1] }
    return new_list
  }]

I overhauled how my functions are printed which makes debugging so much easier

somber heath
#

@whole bear Ask a mod when they happen to be in voice chat.

verbal zenith
#

I deleted like 99% of the builtin functions by the way

vocal basin
#

!paste

wise cargoBOT
#
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.

red arch
vocal basin
red arch
#

in the objective sense

somber heath
#

@whole bear Type text. Your audio is poor.

vocal basin
red arch
#

there are IQ test for 3 year olds, nothing culture or language dependent on this

#

^ something AI can't solve, that and the typical sign up captcha

somber heath
#

An if stanza consists of the following.py if condition: #Exactly one if ... #do this and only this elif some_other_condition: #Else, if. Zero or more elif ... #do this instead and only this else: #if none of the above. Zero or one. ... #do this instead and only this.Conditions are assessed in this order. The first condition that is satisfied in an if/elif/else stanza is the one block that gets run.

#

@whole bear

#

So if some_other_condition is satisfied, but so is condition, then the condition block will be run.

#

But if condition is not satisfied, the some_other_condition block will be run.

#

If none are satisfied, the else will be run.

#

elif and else are optional

#
if condition:
    ...
... #code here that isn't an elif or else block ends the stanza.```
#

!e py print("$" * 30)

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
somber heath
#

!e py v = 6.6 print(f'Apples: {v}.')

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

Apples: 6.6.
somber heath
#
'abc' + 'def'```
#
'abc' + str(v)```
#
val = True
if val:
    ...```
![incident_actioned](https://cdn.discordapp.com/emojis/714221559279255583.webp?size=128 "incident_actioned")
#
val = True
if val == True:
    ...```🚫
#
a = True
b = False
c = a is b
d = a is not b```When comparing booleans at all, use `is`, not `==`.
#

not inverts truthiness.

#

So True becomes False

#

False becomes True

#

Concise as possible but also descriptive as possible.

#

lowercase

#

!pep8 see: Naming conventions.

wise cargoBOT
#
PEP 8

PEP 8 is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like flake8 to verify that the code they're writing complies with the style guide.

More information:
PEP 8 document
Our PEP 8 song! :notes:

somber heath
#

!e py var = False #1 + 5 == 2 if not var: print('Hello.')

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

Hello.
#

@whole bear :x: Your 3.11 eval job has completed with return code 1.

001 |   File "/home/main.py", line 2
002 |     if is not var:
003 |        ^^
004 | SyntaxError: invalid syntax
vocal basin
somber heath
#
if var is not False:
    ...```Avoid this, though.
#

Do this, instead.py if not var: ...

#

!e py if 'abc': print('A')``````py if '': print('B')

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

A
vocal basin
#

sounds normal

somber heath
#

Verdict says it's you.

#

I'll try to type.

#

What this is demonstrating is the truthiness of objects. A string with characters in it is truthy. A string without any characters in it is falsy. It is this property of truthiness/falsiness that if/elif/while relies on when deciding whether to run a codeblock or not.

#

True is truthy.

#

False is falsy.

#

Zero is falsy. Nonzero numbers are truthy, including negatives.

#

None is falsy.

#

!e py print(bool(None))

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

False
somber heath
#

Empty lists are falsy. Lists with things in them are truthy.

#

Expressions, like 1 + 1 == 2, boil down to be True or False. That one object that if looks at.

#

or elif or while

#

2 == 2

#

True

#
1 + 1 == 2
2     == 2
Yes.```
#
if 1 + 1 == 2:
    ...```
wise cargoBOT
#

@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.

it's better now
somber heath
#

I use ... to indicate 'code goes here'

#

Except where it's syntactically significant.

#

Which you don't have to worry about.