#voice-chat-text-0
1 messages · Page 101 of 1
That would be me
i am in my last year of highschool
I was so good at both but now my brain is just mush
i have to say, i got this far by mistake
I'm doing taxes 😦
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?
import subprocess
from pymegatools import Megatools
url = input("Enter MegaNz Url: ")
mega = Megatools()
print("Download Starting...")
while True:
mega.download(url)```
@rugged root https://pypi.org/project/pymegatools/
Is it possible to play with the video player when it starts downloading?
@whole bear👋
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.
win the lottery.. any payout
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
@muted widget If you're wondering why you can't talk, check out the #voice-verification channel
That'll tell you what you need to know about the voice gate
surreal bovine choreography.
No cows were harmed during the making of this video, though their future prospects probably aren't as optimistic.
music is available here: http://cyriak.co.uk/music.html
Software used: adobe after effects
Yep, 2008
Yes, it was an industrial fan.
That it was a computer fan in a server is beside the point.
"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"
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
Mr Hemlock just farted
i was working with the chatGPT api tbf
@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!
that was pretty fun
!server
🙌 hi
An API for accessing new AI models developed by OpenAI
Yeesh, sorry to hear that
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.
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.
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.
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.
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.
Google strikes again: https://9to5google.com/2023/03/16/google-exynos-modem-vulnerabilities/
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
Get one of those big ass satellite phones
chatgpt premium worth it after the new update?
No idea
i'll just get it
what's going on with Docker?
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"
they owe you, if they over pay.
I don't appear to match the categories given. Which is not, of course, proof of safety. 🤷♂️
Just seems like more "We're tired of you free loaders, actually fucking pay now." (regarding docker)
@mortal burrow How've you been?
New job is going well, I'm WFH now and I'll probably match her schedule and work Wed/Fri from home.
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.
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
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
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...
Neovim is a fork of the keyboard-based text editor Vim. It is focused on extensibility and integrates the Lua programming language for easier scripting.
#programming #vim #100SecondsOfCode
💬 Chat with Me on Discord
🔗 Resources
Neovim Docs https://neovim.io/
Vim in 100 Seconds https://youtu.be/-txKSRn0qeA
Lua in ...
docker was hoping to make money from Docker Swarm, that didn't happen so they need money and only revenue source they see is Docker Desktop and Docker Registry hosting
I'm interested: https://gilesknap.github.io/mciwb/main/index.html
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
@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
from what I've heard, there are also extra regulations for US citizens with regards to opening bank accounts abroad
@dusk raven Yoooooo
Hi
hey
headache
What? Toss you out if you need Medical Treatment?
God I love ipython.... https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-timeit
So friggin' handy
!stream 989201188778016870
✅ @whole bear can now stream until <t:1679072484:f>.
guys, what is the project?
could some1 recap it quickly for me
Trying to help people get the basic web structure and the like
cool
maybe dumb suggestions, but he already tried chatgpt or Bing chat
did he already try that?
did you guys watch gpt4 livestream tho
Heard it was interesting
the guy made a website with a picture lol
Oh yeah yeah
what do you guys think about tensorflow?
if not 1 thing is another.. sigh..
okay sir.
that wasnt to you Ivndj..
I think so but my prof sucks
always stick on java programming
"be kind" lol
Are there any remarks you'd like to make?
nah you good.
As you will.
Too restless
Why School curriculum is too old for todays tech?
Reverse engineering is when you make a train go backwards
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?
Came out a day or so ago
This moment following a third place showing in the 2004 Iowa caucuses all but ended Howard Dean's run for president. More from CNN at http://www.cnn.com/video/
@tranquil epoch https://stackoverflow.com/questions/25545613/how-can-i-push-to-my-fork-from-a-clone-of-the-original-repo
I created a fork (let's call it myrepo) of another repository (let's call it orirepo) on GitHub. Later, I cloned orirepo.
git clone https://github.com/original/orirepo.git
I modified about 20 fil...
@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
at M=790 it is saying that it is the value for which it becomes integer but it not
it has 2-3 zeros after decimal but after that these are some numbers
it not exactly integer
but according to this it is an integer
i hope you understand what am i trying to say
@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
!e
ham = 3.12
print(ham.is_integer())
print(isinstance(ham, int))
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | False
002 | False
@brazen gazelle its general form of pythagorean triples
!e
sample_float = 969345543.0000000000353345432
print(sample_float.is_integer())
@tepid edge :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
@tepid edge @brazen gazelle
decimal.getcontext().prec=
do you know anything about this ??
!e
pork = 3.0
spam = 969345543.0000000000353345432
print(int(pork) == pork)
print(int(spam) == spam)
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | True
002 | True
!e
sample_float = 969345543.5
print(sample_float.is_integer())
@tepid edge :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
!e python a = 3.00000000005 print(a.is_integer())
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
!e
spam = 969345543.0000000000353345432
print(spam)
@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
!e python a=45676543.0000000000000000000000045664 print(a.is_integer()) print(type(a))
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
!e python a=45676543.0000000000000000000000045664 print(a.is_integer()) print(type(a))
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | True
002 | <class 'float'>
!d float.is_integer
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
!e python a=45676543.0000000000000000000000045664 print(a.is_integer()) print(type(a)) print(a.as_integer_ratio())
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | True
002 | <class 'float'>
003 | (45676543, 1)
Objects/floatobject.c line 886
float_is_integer_impl(PyObject *self)```
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))```
!source
!e python a = 1.00000000001 print(a.is_integer())
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
!e python a = 1.001 print(a.is_integer())
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
!e
a = 1.000000002
print(a.is_integer())
@left trail :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
!e python for x in range(0,15): print(x)
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
006 | 5
007 | 6
008 | 7
009 | 8
010 | 9
011 | 10
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/wuwiwuqeda.txt?noredirect
!e
a = 1.0000000000002
print(a.is_integer())```
@left trail :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
yoo
@whole bear If you're wondering why you can't talk, check out the #voice-verification channel
That'll tell you what you need to know about the voice gate
@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())```
@left trail :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
!e
print(a.is_integer())```
@left trail :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
1 zero extra
!e python a = 1.00000000000000023 b = 1.000000000000000023 print(a.is_integer()) print(b.is_integer())
@amber raptor :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | False
002 | True
!e
ham = {"pork": 4, "spam": 5}
print(ham["pork"])
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
4
!e
ham = {"pork": 4, "spam": 5, "sausage": {"beef": 8}}
print(ham["pork"])
print(ham["sausage"]["beef"])
@rugged root :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 4
002 | 8
i have friends who use capslock to write capital letters
thatss the worst use of capslock
maybe you can use that as a door lock
@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
ひまんしゅ?
読まないで聞きたい
ちょっとよくわからにきがする。。。
(define a (cons 1 (cons 2 (cons 3 (cons 4 ())))))
Hello Hemlocke
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
I like this book
It's not C++ but it's fun and exposes you to functional programming.
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...
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
...
@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..
@brazen gazelle mmmhhh........
can u please... explain.....
@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
People are born scientists. Then they go to school, and get the curiosity stomped out of them so they can become factory workers. Independent critical thinking is frowned upon in the western school system.
very true
hi
@shy plume 👋
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!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
!e```py
if name == 'main':
print('Hi')
@smoky field👋
#voice-verification
Follow the instructions therein.
Be sure to read them carefully.
We don't have the ability to grant you voice permissions, I'm afraid.
The power lies within you.
@edgy skiff👋
Twisty is working on their programming language.
oj
I'm preparing a dose of caffeine.
hello
@hollow stag👋
hi
@whole bear👋
hello
Yahoy.
is there any game engine (like godot) for python, ik i sound stupid, but i cant seem to find any
nah, ik those, but i am asking if there are any which have a graphical interface
@torn monolith👋
hence i said i sound stupid
Kivy, Beeware, PyQt5...
tkinter if you want to go standard library
@hearty salmon👋
They're more UX than game engine.
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
: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.
Whoopsydoodle.
Unfortunately no @whole bear there is not
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.
'\t'
' '
Chloris > 1 + 1
[TokenKind.integer_literal, op_plus , TokenKind.integer_literal]
Chloris >
elif self.current_char == '+':
tokens.append(Token(TokenKind.op_plus.name, TokenKind.op_plus.value))
self.advance()
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]
Toke. It's the past tense of take. Join me for more "True" Facts with Opal.
nice, got unmuted
@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)
]
Chloris > 2 + 4
[Token(TokenKind.integer_literal : 2), Token(TokenKind.op_plus : 8), Token(TokenKind.integer_literal : 4)]
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)]
Ohmigosh those paws as so fluffeh!
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()
@halcyon barn👋
!stream @verbal zenith
✅ @verbal zenith can now stream until <t:1679140746:f>.
!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)
@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}
!e
def test(d: list[str:str]):
print(d)
@uncut meteor :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e
print(dict[str, str])
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
dict[str, str]
!e
x = dict[str:str]
print(x)
@uncut meteor :white_check_mark: Your 3.11 eval job has completed with return code 0.
dict[slice(<class 'str'>, <class 'str'>, None)]
Python Enhancement Proposals (PEPs)
when you have to use dicts
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
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)
there's also total=False
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)
can't ** be used?
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
@lean veldt@tepid blade@wary turret👋
!e py iterable_of_tuples = [('a', 'A'), ('b', 'B')] result = dict(iterable_of_tuples) print(result)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
{'a': 'A', 'b': 'B'}
!stream @verbal zenith
✅ @verbal zenith can now stream until <t:1679143581:f>.
(
Token(TokenKind.integer_literal),
Token(TokenKind.op_plus),
(
Token(TokenKind.integer_literal),
Token(TokenKind.op_multiply),
Token(TokenKind.integer_literal)
)
)
!e py d = {'key_a': 'value_a', 'key_b': 'value_b', 'key_c': 'value_c'} print(d.keys()) print(d.values()) print(d.items())
@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')])
@unborn glen@frail beacon👋
hey
@somber heath hiii
im just here to learn something :)
@reef seal👋
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?
You'll be looking at open and, ideally, with open. Of note, pathlib is a thing.
Learn well.
that's more cooler than reading a book @warm jackal
The more you can do that, the easier your progress will be, because you're not gunking it up with crap habits and misconceptions.
True
Less haste, more speed.
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
Hi @elder violet welcome to this server✨
My pleasure
@cedar crest👋
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)
@scenic quiver :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | abc
002 | a
003 | bc
004 | 3
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)
@candid fox could I have the ability to ss?
@desert vector could I have the ability to ss?
hi
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
@wind raptor can I have the ability to ss please?
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)
@winter plover :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 21
002 | 21
raj = Geek("Name")
raj.set_age(21)
print(raj.get_age())
21
print(raj.get_name())
def get_name(self):
return self._name
guys how to request api from youtube?
!e
code
!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)
Google Cloud Platform lets you build, deploy, and scale applications, websites, and services on the same infrastructure as Google.
am i have to get it here?
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```
!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[])
@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?
print(emp_2.__dict__)
{'first': 'test', 'last': 'User', 'pay': 5000}
print(list(emp_2.__dict__))
['first', 'last', 'pay']
!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))```
@drifting sonnet :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | test
002 | User
003 | 5000
print(vars(emp_2).items())
dict_items([('first', 'test'), ('last', 'User'), ('pay', 5000)])
print(emp_2.__dict__.items())
Creation of Regions 2:00
Creates Placement Locations 2:25
First Match 3:00
Enters the next Match 4:40
Auto Chest opening 6:46
Auto Mastery Upgrading 6:57
Song:
Kaskade with Tiësto feat. Haley - Only You from Ultra Records.
!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])
@winter plover :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | test
002 | User
003 | 5000
hey guys do you know why it says not defined even though i defined it in the function already for xtail and ytail?
Graphics libray
circle = Cirlce(radius, color, x, y)
def update():
if keyboard press
cirlce.x = circle.x += 1
defined in one function, used in another
can you give an example?
so i have to define what xtail is first and then use it in the function?
!e
def f():
x = 1
def g():
print(x)
f()
g()
@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
lol
there are two ways to fix it
I'm literally explaining why it happens.
read. the. messages. above.

!e
def f():
global x
x = 1
def g():
print(x)
f()
g()
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
1
first way
could you do the example with xtail and xcor()
so its easier for me to understand
sorry
@green bone
!e
class C:
def f(self):
self.x = 1
def g(self):
print(self.x)
c = C()
c.f()
c.g()
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
1
second way
the better way is to return xtail, ytail from the first function instead of setting fields or global variables
guys gtg it was enjoying to talk with you but i gotta tore apart df into 100 pieces 🙂
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()
and how would i do that
depends on how you use functions
bye
return xtail, ytail
where are you calling the first function right now?
(function that defines xtail, ytail)
here
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}")```
@drifting sonnet :white_check_mark: Your 3.11 eval job has completed with return code 0.
1
I'm so sorry but i'm very new at this so i have no idea what that means
why pass?
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.
...
def left_tail():
...
xtail = xcor()
ytail = ycor()
return xtail, ytail
def left_head(xtail, ytail):
...
...
_xtail, _ytail = left_tail()
left_head(_xtail, _ytail)
ahhh okay i will try it
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.
(this does fix the NameError at least)
what name error sorry?
this
ohhh so did it work?
with this change, yes, it works
I think i might have tried it wrong then
i just did the return
but didn't do the other part
working example:
https://paste.pythondiscord.com/xowesavuyi.py
tk inter
short from interface, I guess
@drifting sonnet type annotations
this has been valid since at least 3.6
it does neither
str(title)
only hints to the IDE
or the language server
window(12_
title: int = 12
!e
i: str = 42
print(i ** 2)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
1764
annotations don't influence the runtime
!d typing
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...
and corresponding PEP
https://peps.python.org/pep-0484/
Python Enhancement Proposals (PEPs)
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]
def init(self, title, (w, h))
I'd say both options are fine
but this is invalid syntax
window_size: tupl
def __init__(self, title: str, xy: tuple[int, int]):
xy.x
xy[0]
xy[0]
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'`.
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)
@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
@winter plover if you're looking for a way to store w/h in one object, this might be the optimal choice
!e
from collections import namedtuple
Dimensions = namedtuple('Dimensions', ['width', 'height'])
dimensions = Dimensions(800, 600)
print(dimensions.width, dimensions.height)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
800 600
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
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:
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
@candid fox can u give me the ability to ss?
@final crane
log(x) =
I prefer this visualisation because it doesn't put NlogN and N^2 in the same "red" category
these labels are very task-dependent
f(x) = x *2 +4
for sorting, NlogN is literally perfect
2^log2(n)=n you meant?
Sigmoid Function
isn't DLP NP-hard or something?
(I looked up and seems like it's still unknown)
bitwise operation magic
^
ok
!code
Hey @ebon mist!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
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
i made it for a bet
A what
i recommend checking this out too https://challenge.pythondiscord.com/
What do you see when opening the link cause I’m not sure what im supposed to see
its a fun ctf-like challenge
Ah
the first page is something like are you a robot? you know where to go
Hacking
which is the right thing if you see that
its been up for an year already i feel so
you should have time
xD
Has it not be solved or something
it has
Oh
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
All I would think of is going into inspection mode lol
widget = Widget()
...
widget.update(text=...)```
Oh no economics
!paste
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.
@jagged olive👋
hey
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
I have not permission to speak in the channel how can I get the permission @somber heath
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
¡·§´¬»´¦¥º¦¼¡¼º»´¶¼¥½°§°»¶§¬¥¡ï³çæ´äög¯2ô%®8°¬)ö#º:"«/ü8¤ÿ/©$º)8©3ñ:«>ºp{¤¸s-xo¦r¼_c¶iòphe´r_e¶nòcryp¶t½:´74þö©ö¢¶ ±ð®ôõ¬¢®ÿ¢ü ¬õò«®ü ®ð¬üåòþ ø¶´°¦´§¶¼¥½°§°»¶§¬¥¡ïçäçø-transposition_cipher_encrypt:157
hii
@timid crypt👋
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)
I cannot speak
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
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
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | / \
002 | / \
003 | / \
004 | ─────────
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
can someone please help with this code https://paste.pythondiscord.com/voduvejoro
I don't understand why the right side doesn't rotate properly and mirror the left

wtffffffffffffffffff
wtfffff why do you guys write so much how much time do you have hahahaaha
Never enough. Why do you think we buy caffeine in bulk?
hi opal
@slow venture Have you heard of beziers?
No sorry I
I'm still new at this
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.
Ha
I just don't understand why the right side have been giving me so much trouble
As in "Mom, can we get Toothless? We have Toothless at home." The Toothless at home:
yeah that XD
I'm so close to getting the code to work
i just don't know why the right side isn't rotating
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.
It's mathy, but it's how computers often draw curves.
why are splines? well my god I have good news for you, here's why splines!
if you like my work, please consider supporting me 💖
https://www.patreon.com/acegikmo
This project grew much larger in scope than I had originally intended, and burnout made it impossible for me to do more with it. It was already getting incredibly unwieldy, so I apolog...
long and fun
you wouldn't happen to know why the right wouldn't rotate properly would you? https://paste.pythondiscord.com/voduvejoro

So what you end up with is more a recipe to be interpreted, rather than you calling a bunch of functions manually.
but how do i even implement that in python turtle
looks like it starts drawing at wrong points
(just an offset)
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()
you have two offsets controlling the right part
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
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

something like this?
160 * hexa + place_dragx - 5, place_dragy - 7 in both
setpos(160 * hexa + place_dragx - 5, place_dragy - 7)
It was just a simple change of number?
!e import datetime
current_year = datetime.datetime.now().year
print(current_year)
Would I be able to rotate it any direction with that?
@formal ember :white_check_mark: Your 3.11 eval job has completed with return code 0.
2023
this is for offsetting
not exactly for proper rotation
So if I rotate it again I'd have to change the numbers again?
I'm so grateful for you though omg
🥹
I'd still suggest using data-driven approach instead of separate statements for each segment
But is this correct sorry?
probably
(depends on how you mirror/rotate, on specific points, etc.)
Maybe I can make a variable to easily change it
[
('circle', -50 * hexa, 30),
('forward', 100 * hexa),
('right', 10),
('forward', 50 * hexa),
...
]
or without hexa and just multiplying by it afterwards
to make the data dimensionless
Is that to make a curve?
sup?
Hellooo
hi how you doin'?
I'll try to write an interpreter for it now
thank you Yu i really appreciate your help
thank you opal for the suggestion as well
it looks like a misspell to me
Just trying to fix this code of mine ;-;
@vocal basin yeah you're right so as soon as anything changes the offset is out of place again :((
thats okay thats basically me as well XD
my brain is fried time to sleep 1AM here
good night everyone
hopefully i can figure it out soon
goodnight
try catch sounds better than try except. 😂
nights
not me
him
nights.
oh ok. haha
i wanted to do one more question but it's depressing
I'm just in bed rn so I can't try that but thank you so much for your efforts
Does this make it easier to rotate the right side?
mirroring/reversing/rotating this would be simpler than doing the same for code statements
mirroring would be performed just by flipping the angles (automatically)
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?
welcome @outer scaffold!
ive opened this on my computer .. NO idea what to do lolo
ahhh
hi
im trying to run some 3b1b animations but i need to use the manim library
and im having some problems
can smn help
it says: no module named 'manim_imports_ext'
rip

!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
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
I'll try to translate the whole left side into this form
interpret(
[
('right', 80),
('forward', 100),
('circle', 100, 10),
],
hexa
)
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.
I think i kinda understand
still doing this
@slow venture this one is automatically mirrored
https://paste.pythondiscord.com/dicatobuyu.py
WHAT
I increased the scale temporarily so it'd be easier to see
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
just change the hexa parameter you already had
I haven't learnt this stuff yet so i only know the basic directions :((
and to rotate, just add left() or right() calls before left_side()
so it'd be something like this
left_side_commands() could be properly separated into different functions
(but I didn't do it)
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
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)
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
@whole bear 👋
most IQ tests are about pattern recognition which is what AIs are quite good at
captchas aren't "just puzzles"
they are specifically targeted not to be solvable by AIs
no AI can't past IQ test questions, nor more simpler captcha
>>> 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
@whole bear Ask a mod when they happen to be in voice chat.
I deleted like 99% of the builtin functions by the way
if only IQ tests had any methodology behind them and meant anything...
!paste
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.
IQ is shown to be the #1 predictor of success
success in what?
in the objective sense
@whole bear Type text. Your audio is poor.
all IQ tests are culture-dependent and not objective enough to judge anything
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
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)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
!e py v = 6.6 print(f'Apples: {v}.')
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
Apples: 6.6.
'abc' + 'def'```
'abc' + str(v)```
val = True
if val:
...```

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.
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:
!e py var = False #1 + 5 == 2 if not var: print('Hello.')
@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
(the answer seems to be "in academic work")
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')
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
A
sounds normal
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))
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
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:
...```
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
it's better now


54,893
318,833


