#voice-chat-text-0

1 messages ยท Page 115 of 1

stuck furnace
#

Heyy, what you all up to?

#

Ah right. Leetcode?

#

Btw, is anyone speaking? I can't hear anything.

#

Thanks

#

What kind of math? ๐Ÿ˜„

stuck furnace
#

Depends on the context I think.

stuck furnace
#

Cya

fierce wigeon
#

I miss the context, can you explain why that's different than common python syntax

stuck furnace
#

Moostafa ๐Ÿ„

robust lichen
#

logger := log.New(os.Stdout, "INFO: ", log.Ldate|log.Ltime)

You can then use the logger to write log messages using the Print, Printf, and Println functions. Consider this PrintIn log message:


logger.Println("This is an info message.")

It will produce this output:


INFO:2023/02/17 14:30:15 This is an info message.
#

@limpid cove

limpid cove
#

Llongfile

robust lichen
#
logger := log.New(os.Stdout, "INFO: ", log.Ldate|log.Ltime|log.Llongfile)
limpid cove
robust lichen
#

@limpid cove

limpid cove
somber heath
#

@whole bear That happened like, what, a decade ago?

whole bear
#

2020

whole bear
somber heath
#

This is a rhetorical question, but what the fuck happened to time?

whole bear
#

A 2017 documentary, The Problem with Apu, written by and starring comedian Hari Kondabolu, criticized the character as a South Asian stereotype. In January 2020, Azaria reacted to this by announcing that he and the production crew of the series agreed for him to step down as the voice of Apu. The final time that Azaria voiced Apu was in the season 29 premiere "The Serfsons" in 2017; since then, Apu has appeared as a background character.

#

anyway

#

i guess not fully cancelled.

past cradle
#

why i cant talk

wind raptor
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.

nocturne tulip
#

lol I don't have enough messages to voice verify

#

how do i check my message amount lol

#

not that I know of

#

it says less than 50 messages

#

huh, I swore I had more than 6 lol

#

no

#

Yeah, I'm pretty sure I only talked in help channels

#

In old ones

#

I don't really use the help channels anymore because I'm smart enough to read docs lol

#

big cringe lol

#

Can you give me the role?

#

It's probably just the role that gives perms

#

Twisty has the strat

#

@lavish rover what lang is that?

#

I don't recognize .ae

whole sequoia
#

I can't talk either lol

#

All good though I'll just listen ๐Ÿ™‚

somber heath
#

!e ```py
class MyClass:
def enter(self):
print('Enter')
def exit(self, exception_type, exception_message, traceback):
print('Exit', exception_type, exception_message, traceback)

with MyClass() as thing:
pass```

wise cargoBOT
#

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

001 | Enter
002 | Exit None None None
somber heath
#

It's Python.

#

Everything is an object.

#

Except for the syntax and whatnot, and even some of that is objects in disguise.

whole sequoia
#

I need to get on mustafa's level

teal flower
#

Hello

whole sequoia
#

That's crazy

whole sequoia
#

Are you implying that you're not supposed to leak classified documents for minecraft clout?

#

rip

#

I feel that. I'm old too

#

I feel younger building apps though. Programming keeps the brain stronk

somber heath
#

That's pretty variable.

whole sequoia
#

I'm in my 30s OOF. That's like ancient in Discord

rigid gorge
#

Hello guys

warped raft
#

@verbal zenith , @somber heath hello

#

@lunar haven hello

#

i didn't notice you

#

doing not grrat

#

the first sha with a but the next one a is not spelt

#

a more of a int the first one

#

first one

#

yup

#

my delivery partener is not giving my cod remmitance

#

he is such BI&&h

#

The delivery partner collects in the from of cash of delivery and giving it to mer

#

will like to compete in some clash of code

#

then please create a link all languages and reverse

#

here you go

#

any one else coming

#

don't do that @lunar haven

#

@lavish rover will you like to join

#

so i start @verbal zenith

#

i will not do

#

the quesiton scared me

#

yup

#

do anyone listen to neffex

#

share your code

#

@verbal zenith

#

@whole bear wanna join

#

yeah

verbal zenith
#

!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.

placid sapphire
#

first time i play this game

warped raft
#

@verbal zenith can you share the code

#

what the hell is that

#

one liner

#

just have a look at my code ans score

verbal zenith
#

!e

x = "1001"
y = "0110"
print("".join([max(a,b) for a, b in zip(x,y)]))
warped raft
#

and

wise cargoBOT
#

@verbal zenith :white_check_mark: Your 3.11 eval job has completed with return code 0.

1111
dense meadow
#

!e

wise cargoBOT
#
Missing required argument

code

#
Command Help

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

Run Python code and get the results.

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

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

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

By default, your code is run on Python 3.11. A python_version arg of 3.10 can also be specified.

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

warped raft
#

no i will know

#

don't do that

#

i can not understand python often then you

#

will do that in cc

#

should i start next

#

should i start

#

that was stupid

#

i was sumb

#

that was so fucking stu[id

#

i am fucking mad

#

who made the code

#

challenge

#

there no way to increase the dificult

#

no

#

becaus i want to do that

#

from the next one

#

you con't

#

@Yu/AF

#

yup

#

golf meaning

#

my browser lagged like hello

#

hell

#

i gave up

#

i forgot to remove the comment also

lavish rover
terse needle
#

@lavish rover @verbal zenith how long have you two been in vc

#

I have gone to sleep and woke up and you two are still in vc

desert wolf
#

Hey guys, i've been listening for a few hours, since mustafa was playing with what looked like a raytracer or some other nifty algorithms.. I'd say stuff, just don't have anything particularly fruitful atm (as I need to sleep lol)... Did want to say hello though ๐Ÿ™‚

vocal basin
#

I woke up

#

oh, it's shortest

#

yes, I didn't optimise lol

#

map is shortest, as far as I remember

vocal basin
#

I have an idea

#

but it doesn't work

#

I'm too unable to think further for now

#

oh, didn't think of that

#

because it breaks the behaviour

#

some testing systems will kill you for that

lavish rover
#

you get an exception but it accepts it anyway ๐Ÿ™‚

vocal basin
#

:= is making it worse

vocal basin
lavish rover
vocal basin
#

oh, it shows code size in the editor

#

isn't it UB in C?
I don't remember what specs say

#

(bitshifting negatives)

#

it is

#

it's defined in python

#

properly

#

!e

print(-3<<2)
wise cargoBOT
#

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

-12
lavish rover
#

'.'*4

vocal basin
#

yes

#

I forget eval exists at all because it's useless in normal code

lavish rover
vocal basin
#

it would be 49 if not for )for

lavish rover
vocal basin
#

I'm not

#

wtf

#

I was testing

#

it's a scam

#

and now I did submit

vocal basin
#

ohno

#

I know maybe

#

how to improve mine

#

such a dumb way

#

nvm it's same number

#

wait

#

I'll try

#

it's not

#
print(f"{m} 1 12 7\n11 8 {m-1} 2\n5 10 3 {m+2}\n4",m+1,6,9)
#

this is closer

#

commas not spaces

#

also, one {} less

#
print(f"{m} 1 12 7\n11 8 {m-1} 2\n5 10 3 {m+2}\n4",m+1,6,9)
print(m,f"1 12 7\n11 8 {m-1} 2\n5 10 3 {m+2}\n4",m+1,6,9)
turbid sandal
#

so do you guys like know how to make a python app a .app or a .exe file

#

if you do let me know

#

and ping me

vocal basin
#

still need "" for \n

turbid sandal
#

what is """ and \n

vocal basin
#
print(m,f"1 12 7\n11 8 {m-1} 2\n5 10 3 {m+2}\n4",m+1,6,9)
print(m,1,12,7,"\n",11,8,m-1,2,"\n",5,10,3,m+2,"\n",4,m+1,6,9)
turbid sandal
#

so do you guys like know how to make a python app a .app or a .exe file

#

if you do let me know
and ping me

vocal basin
#

with \n var it's +3

#

without it's +5

lavish rover
#
print(m,"1 12 7\n11 8",m-1,"2\n5 10 3",m+2,"\n4",m+1,6,9)
turbid sandal
#

so do you guys like know how to make a python app a .app or a .exe file
if you do let me know
and ping me

vocal basin
#

there was a clever solution

#

but

#

it's 35

#
print(581-sum(input().encode())<<2)
#

because it strips

vocal basin
#

but it's long

#

omg it's equal

input().encode()
map(ord,input())
turbid sandal
#

so do you guys like know how to make a python app a .app or a .exe file
if you do let me know
and ping me

quaint oyster
#

if x is "s":

#

i wrote this

#

and it was not case sensitive

#

still worked

#

didn't know that

quaint oyster
#

an exe file

#

from python

#

???

vocal basin
turbid sandal
#

so how me make script a app

turbid sandal
#

i dont get it

ivory horizon
#

Hi guys, can you share the link which question you are trying?

#

can't speak have to send 50 + msg

ivory horizon
#

oh k

#

You guys doing it for fun? see no use of solving it

vocal basin
#

some previous clash ended probably

#

notification for earlier

#

someone timed out

ivory horizon
#

oh we have to do in shortest line, does next line count's as a character?

vocal basin
#

shortest amount of characters

#

or bytes, rather

vocal basin
surreal grotto
#

Clash of code... what is that? Is that like a coding game or something

vocal basin
#

yes

surreal grotto
#

Sounds fun. Is it competitive?

ivory horizon
#

questions are not like real world problems but looks fun.

vocal basin
#

there are three modes
fastest: first to solve
reverse: same but you only know the tests not the problem statement
shortest: solution with least bytes

ivory horizon
#

reverse sounds interesting

turbid sandal
#

so do you guys like know how to make a python app a .app or a .exe file
if you do let me know
and ping me

vocal basin
surreal grotto
#

So it encourages test driven development in conjunction with optimized development practices. That's like a wet dream got damn

vocal basin
#

this is not TDD

surreal grotto
#

sorry wrong reply

vocal basin
#

converting python to one single exe is wrong

surreal grotto
#

I suppose so, I'm on linux tho so i haven't really got that good of an idea

surreal grotto
vocal basin
#

clash of code doesn't encourage "best practices" in any way

#

I played 4 in the open pool

surreal grotto
#

I suppose I got the whole 'best practices' thing because I thought less means more efficient. It's now I realize that's not the smartest thing to say

vocal basin
surreal grotto
#

I suppose though in some ways, less can be better, but not in all cases.

vocal basin
#

grammar error in the task

surreal grotto
ivory horizon
surreal grotto
#

no, but the idea for this chat is that if you don't have voice perms you talk here.

#

for voice chat.

#

not for general convo

vocal basin
surreal grotto
#

oh ok

#

no that's fair enough

ivory horizon
#

is 1231 counts 2 changes or 3 anyone?

surreal grotto
#

I haven't the slightest idea what you mean

surreal grotto
#

ooh thats some sick design right there

#

god damn

vocal basin
#

changing to C?

turbid sandal
#

i want to make a python app into a exe or a .app file so it can be run as a file or a normal app

surreal grotto
#

Please stop spamming. If you need help, please create a thread and wait patiently, but do not spam

ivory horizon
#

haha, had to search how to print integer last time coded in C was in cllg.

vocal basin
#

epic restart for some reason

somber heath
#

@knotty echo๐Ÿ‘‹

knotty echo
#

yo

ivory horizon
#

waiting for yuu answer with assist.

vocal basin
#

oh f

#

I could have 113

#

I forgot

#

yes

#

it would be only one character more

ivory horizon
#

i think i should have taken time( forgot that we could take input like that)

#

welcome to c

vocal basin
#

make them add APL

#

APL would be too good for shortest

ivory horizon
#

it takes more time to remove code and spaces then to actually write

vocal basin
#

it's ascii so can make it at least 13% smaller

#

there was an attempt in python earlier

ivory horizon
#

my most of the time went into how you guys did into 64 and mine was 66 then realized the extra char in formula

vocal basin
ivory horizon
#

after this i am gonna compress production code into 1 line no space
go hell with readability haha.

vocal basin
#

I have a wild suggestion

#

life without +=

ivory horizon
#

well one question how the program was compiling when we remove stdio.

#

it is required for input?

#

oh understood.

vocal basin
#

how sad will this be

ivory horizon
#

never did in Rust.

vocal basin
#

oh, now I realise I never implemented taking input in Rust

#

ig there will be template code

vocal basin
#

Rust doesn't allow as much tricks as python/c

ivory horizon
#

got the documentation up in a tab

#

what is this

vocal basin
#

for rare usecases it will fail

#

default language for Arduino is a custom C++ variant

proper creek
#

In this video we learn how to do fingerprint matching in Python.

Apply For AI Camp: https://ai-camp.org/partner/neuralnine/

Kaggle Dataset: https://www.kaggle.com/ruizgara/socofing
โ—พโ—พโ—พโ—พโ—พโ—พโ—พโ—พโ—พโ—พโ—พโ—พโ—พโ—พโ—พโ—พโ—พ
๐Ÿ“š Programming Books & Merch ๐Ÿ“š
๐Ÿ The Python Bible Book: https://www.neuralnine.com/books/
๐Ÿ’ป The Algorithm Bible Book: https://www.neuralnine.com/bo...

โ–ถ Play video
ivory horizon
#

i gave up.

vocal basin
#

it won't round

#

that's an issue

#

:.1 will print .25 stuff

ivory horizon
#

have you guy ever tried the bot challenge looks interesting?

vocal basin
#

.unwrap on readline is unnecessary

#

should try something like Perl or Haskell/Clojure at some point

ivory horizon
#

how many language do you know

vocal basin
#

I know nothing about actual Perl programming

#

besides regex

#

2:42 timing wasn't intentional

#

I did think about sep

vocal basin
ivory horizon
#

how my one is going above 42._.

verbal zenith
#
print("\n".join(["+"*n]*n))
vocal basin
#

join is too verbose

#

I knew about sep being smaller than join

#

join is better when you have to have generator comprehension

ivory horizon
#

forgot could use sep._.

vocal basin
ivory horizon
#

what

#

is this

vocal basin
#

"lwoisness", state of beng lwoisous

ivory horizon
#

hmm

vocal basin
#

else " could be else"

ivory horizon
#

well you would be still ahead

vocal basin
#

* lengths

vocal basin
#

ig there might be some benefit from input being an integer

#

but I don't see any

#

if if there's only 1000 tests, they are varied enough to catch inaccuracies

somber heath
#

@whole bear๐Ÿ‘‹

ivory horizon
#

how do you come up with this

vocal basin
#

lol I didn't think of //

#

could improve what I did ig

#
print(round(.5+int(input())**2*3**.5/4))
print(-int(int(input())**2*3**.5//-4))
print(int(1+int(input())**2*3**.5/4))
#

or just int(1+...)

#

I did consider it

#

but I forgot it actually works

#

because intermediate result can't be an integer

#

both inside and outside should be fine

ivory horizon
#

sorry

#

was away

#

yeah

vocal basin
vocal basin
hoary plaza
#

!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.

ivory horizon
#

mine is at 26 dk how to get it to 24

somber heath
#

@hot roost๐Ÿ‘‹

vocal basin
#

bit shifts have different priority compared to **, quite inconvenient for some code golf problems and helpful for other ones

#

no useful information in these embeds

#

I forgot

ivory horizon
#

can't see how can i beat you.

vocal basin
#
I=input
I(int(I())*int(I())//60)
#

this is smaller by 4 bytes

ivory horizon
#

damm

verbal zenith
#

I WAS GONNA DO THAT

#

thought it was bigger so I ingored it

#

nooooo

vocal basin
#

it's bigger for one input and one print

#

two inputs are already enough

verbal zenith
#
print(int(input())*int(input())//60)
i=input;i(int(i())*int(i())//60)
#

where is the 4th byte?

#

wait

vocal basin
#

/60)

verbal zenith
#

nvm I can't count

ivory horizon
#

haha

verbal zenith
#

I think I'm dyslexic I saw the second / as being on top the paren

vocal basin
somber heath
#

@steel plume๐Ÿ‘‹

vocal basin
#

JS bundlers do code-golfing in some sense

#

without losing performance, though

vocal basin
#

this is output of some model idk which one

#

I saw someone use the site and decided to test how it would respond

#

at least code golf allows to put an extra newline at the end

#

there needs to be some sort of analogue to rustlings but for software architecture problems

#

with problems being more proper services or parts of those (in containerised form)

#

but that takes some time to prepare

#

the a real way to get this experience except for containerisation is:
go to GitHub
pick any project
experiment with it

#

this is an option, at least

vocal basin
#

codewars, for example, has two ways to rate a solution

#

best practices
clever

#

I prefer expressive one-liners over cryptic one-liners

#

like, the code should read as an obvious solution to the problem

#

or, at least, an obviously valid one

#

an important goal of programming is to simplify the systems we build
to express solution as some clear primitive thing, not as an unthinkable mess

ivory horizon
#

how did you do that "yneos" forgot

vocal basin
#

like
teaching AI to understand this too is important

#

or demanding this from AI-produced solutions

#

"roughly somewhat passing tests" shouldn't be the only metric of acceptance for software

vocal basin
ivory horizon
#

map returns a object right, it unpacks too oh ok did not know that

somber heath
#

Python map? Yeah. It returns a lazy iterator.

vocal basin
#

* benefits

ivory horizon
#

a,b,c=map(..)

#

never tried like this

somber heath
#

A lazy iterator doesn't compute the elements until the for loop or list/tuple/set/etc casting asks for each next element.

vocal basin
#

"lazy iterator = iterator" generally

ivory horizon
#

well normal iterator also does not compute unless next is called

somber heath
vocal basin
vocal basin
rustic comet
#

Hello there!

vocal basin
#

there is a better and shorter solution for higher powers

#

sadly, too long for this problem

#

should be optimal (in size) starting with 4
or with arbitrary power

ivory horizon
#

haha

vocal basin
#

yes, for **2 it's more optimal just to self-multiply

somber heath
#

Well, I suppose it depends on your definition.

vocal basin
ivory horizon
#

i read it wrong i guess

vocal basin
#

:= generally doesn't help

ivory horizon
#

what is the command to verify voice?

verbal zenith
#

!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.

vocal basin
#

can start next one

#

mode: shortest

ivory horizon
#

for _ in'_'*int(input()):print((x:=int(input()))+~x%2) i give up what is this wizardry

vocal basin
#

~x%2 gives 1 for even, 0 for odd

ivory horizon
#

c|((c&1)^1) made it complex lol

vocal basin
#

I started participating in clash of code a month ago, I think

#

before that I was a competitive programmer for something like 4 years

vocal basin
ivory horizon
#

i guess from cp you are getting the calculation tricks

vocal basin
#

there are some optimisations which help to pass tests at the cost of general correctness

#

also, those competitions usually allowed submitting code something like 50 times

#

limitation was only because of compute power the servers had

vocal basin
#

!e

print((~4)%2)
print(~(4%2))
wise cargoBOT
#

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

001 | 1
002 | -1
vocal basin
ivory horizon
#

never used walrus in python

vocal basin
#

i=input() wastes space if you call i less than three times

ivory horizon
#

oh, never calculated looked like it was

#

haha

vocal basin
#
input();input();
i=input();i();i();
vocal basin
#

so, mostly, single-argument function calls

#

I can start it later with all languages

#

right now it's only python

#

this one is targeted at languages like C

#

certified "addict" in two games

#

minesweeper has more valid requirements for that achievement

#

(not completed yet because it's seasonal)

#

doing [-2:] doesn't matter

#

because python is fast enough with this

vocal basin
#
if len(n) > 2:
    n = n[-2:]

is equivalent to

n = n[-2:]
#

comments don't really improve readability

#

better function/variable/class names are better

#

comments are not universally good

#

write documentation not comments

#

if code cannot be understood without comments, it's usually bad code

#

there are some exceptions to that

#

(for example, complex algorithms)

vocal basin
#

at least, examples of how to use the code

#

!d docstring

wise cargoBOT
#

A string literal which appears as the first expression in a class, function or module. While ignored when the suite is executed, it is recognized by the compiler and put into the __doc__ attribute of the enclosing class, function or module. Since it is available via introspection, it is the canonical place for documentation of the object.

vocal basin
#

this is only basic documentation

#

still Sunday

#

!d math.fsum

wise cargoBOT
#

math.fsum(iterable)```
Return an accurate floating point sum of values in the iterable. Avoids loss of precision by tracking multiple intermediate partial sums:

```py
>>> sum([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1])
0.9999999999999999
>>> fsum([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1])
1.0
```  The algorithmโ€™s accuracy depends on IEEE-754 arithmetic guarantees and the typical case where the rounding mode is half-even. On some non-Windows builds, the underlying C library uses extended precision addition and may occasionally double-round an intermediate sum causing it to be off in its least significant bit.

For further discussion and two alternative approaches, see the [ASPN cookbook recipes for accurate floating point summation](https://code.activestate.com/recipes/393090/).
vocal basin
#

from what I understand those don't come from docstrings

#

they come from the external tool used for docs

#

Sphinx specifically

vocal basin
#

!e

print(int.__doc__)
#

eh

#

not enough lines

#

!e

doc = int.__doc__
print(doc[doc.find('>>>'):])
wise cargoBOT
#

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

001 | >>> int('0b100', base=0)
002 | 4
vocal basin
#

I wonder if Sphinx knows how to parse it

warped raft
#

@somber heath hello

vocal basin
#

I think yes

#

not sure

#

will test now

#

ok

#

pressed "ignore"

#

(cross button)

#

oh

vocal basin
obsidian dragon
somber heath
#

@whole bear๐Ÿ‘‹

whole bear
#

hello

obsidian dragon
#

@whole bear hi

whole bear
#

why i can't speak

vocal basin
warped raft
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.

obsidian dragon
#

@warped raft yes

#

just my computer

warped raft
#

then can you give me one mointor

vocal basin
#

.5 of a monitor

whole bear
#

!voiceverify

obsidian dragon
#

naw. somehow i need them

vocal basin
whole bear
#

ok

warped raft
#

all of them

whole bear
#

nice

warped raft
#

five on fve

#

@somber heath just want to ask one thing

#

how to tell my parents that

#

i am talking to stranger on internet

#

and if they don't know even the I of internet

#

then will they not listen when i talk

#

they are in same house

#

the mentality of them is this

#

that i must be talking to some terrorists

#

online

vocal basin
warped raft
#

of al-kayda or something

#

@somber heath how do you know that

#

the risk of telling my parents is that maybe they will allow me to talk or they will stop me from texting also

#

@somber heath

#

so what sould i so

vocal basin
warped raft
#

no they arenot

#

i am too scared

somber heath
#

@whole bear๐Ÿ‘‹

warped raft
#

i will tell them 1 and half year later or something

whole bear
#

hi

#

how to i get my mic unmute ?

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.

warped raft
whole bear
#

!voice

warped raft
#

here i showed them

#

they said that it was not something they would like

#

gui version

#

yup

whole bear
#

where do i type it ?

vocal basin
#

well, that seems like specific issue of the game

#

if this version of this word game isn't accepted locally, should probably avoid that

warped raft
#

anyways gonna drink some energy drink and then tell thme

#

that

#

i wnat to talk to some strange people

#

can i or not

#

i am a 14 year old boy

#

yup

#

that's the only problem

#

they are the geneartion of no technology

#

the problem is that

#

my mom is asleeop

#

i will ask them after showing them the term one result and scoring good marks in themn

#

for being capable in India you need only one thing

#

money

#

and i don't have that now

#

that was a good advice

#

already started from my lifetime pocket money

#

and they are angry at that alo

#

they are angry that i spent money

#

the investment

#

yup

#

have a look

whole bear
#

impressive

warped raft
#

yeah

#

that was funny

#

just started the firsst pay check coming tomorrow

#

it is like rs. 2202

#

$27

#

this not the matter

#

they are not going to check that if it is good

#

agreed

#

i am going to die there are mosquitoes everywhere

#

so how the website performance @whole bear

whole bear
#

Elon Musk has entered the chat.

warped raft
#

that was for me

#

i want to talk so badly

#

but I can't

#

going to do it

vocal basin
#

quite a lot of people pulling out don't even know that

#

so no

#

also, he's very fond of stealing others' success

somber heath
#

@faint magnet๐Ÿ‘‹

vocal basin
#

so eh

whole bear
obsidian dragon
somber heath
somber heath
somber smelt
somber heath
#

@whole bear๐Ÿ‘‹

whole bear
#

Hello

#

what happening?

#

can someone help me with code?

#

my code doesnt want to run

vocal basin
#

any errors?

#

better to just copy the text

#

more reliable

whole bear
#

f

#

i just deleted my example

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.

whole bear
#

oh

#

its to big

somber heath
#

```
Stuff goes here
```

somber heath
whole bear
#

how do i do that?

vocal basin
# wise cargo

open this
paste code there
then save button
then copy the URL and send here

whole bear
#

import speech_recognition as aa
import pyttsx3
import pywhatkit
import datetime
import wikipedia

listener = aa.Recognizer()

machine = pyttsx3.init()

def talk(text):
machine.say(text)

machine.runAndWait()

def input_instruction():
global instruction
try:
with aa.Microphone() as origin:
print('listening...')
speech = listener.listen(origin)
instruction = listener.recognize_goggle(speech)
instruction = instruction.lower()
if 'akai' in instruction:
instruction = instruction.replace('akai', '')
print(instruction)

except:
    pass
return instruction

def play_akai():

instruction = input_instruction()
print(instruction)
if 'play'in instruction:
    song = instruction.replace('play', '')
    talk('playing' + song)
    pywhatkit.playsonyt(song)

elif'time' in instruction:
    time = datetime.datetime.now().strftime('%I:%M%p')
    talk ('ร‡urrent time'+ time)

elif 'date' in instruction:
    date = datetime.datetime.now().strftime('%d /%m /%Y')
    talk('Today the date is'+ date)

elif 'how are you' in instruction:
    talk('I am having some trouble with renewing my code but do not worry, how are you doing if you do not mind me asking?')

elif 'WHat is your name' in instruction:
    talk('My name is Akai, What can I do for you?')

elif 'who is' in instruction:
    human = instruction.replace('who is', '')
    info = wikipedia.summary(human, 1)
    print(info)
    talk(info)

else:
    talk('Could you please repeat that, I did not receive your comment very well')

play_akai()

vocal basin
#

is this all code?

whole bear
#

yep

somber heath
#
import speech_recognition as aa
import pyttsx3
import pywhatkit
import datetime
import wikipedia

listener = aa.Recognizer()

machine = pyttsx3.init()

def talk(text):
    machine.say(text)

machine.runAndWait()

def input_instruction():
    global instruction
    try:
        with aa.Microphone() as origin:
            print('listening...')
            speech = listener.listen(origin)
            instruction = listener.recognize_goggle(speech)
            instruction = instruction.lower()
            if 'akai' in instruction:
                instruction = instruction.replace('akai', '')
                print(instruction) 



    except:
        pass
    return instruction

def play_akai():

    instruction = input_instruction()
    print(instruction)
    if 'play'in instruction:
        song = instruction.replace('play', '')
        talk('playing' + song)
        pywhatkit.playsonyt(song)

    elif'time' in instruction:
        time = datetime.datetime.now().strftime('%I:%M%p')
        talk ('ร‡urrent time'+ time)

    elif 'date' in instruction:
        date = datetime.datetime.now().strftime('%d /%m /%Y')
        talk('Today the date is'+ date)

    elif 'how are you' in instruction:
        talk('I am having some trouble with renewing my code but do not worry, how are you doing if you do not mind me asking?')

    elif 'WHat is your name' in instruction:
        talk('My name is Akai, What can I do for you?')

    elif 'who is' in instruction:
        human = instruction.replace('who is', '')
        info = wikipedia.summary(human, 1)
        print(info)
        talk(info)

    else:
        talk('Could you please repeat that, I did not receive your comment very well')

play_akai()```
#

!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.

somber heath
#
try:
    ...
except: #"Bare except"
    ...```
#
try:
    ...
except IndexError: #Just as example
    ...```
whole bear
#

wait so all exceptions are not working?

vocal basin
#

!d traceback.print_exc

wise cargoBOT
#

traceback.print_exc(limit=None, file=None, chain=True)```
This is a shorthand for `print_exception(sys.exception(), limit, file, chain)`.
whole bear
#

got it i think

vocal basin
#
try:
    ...
except Exception:
    traceback.print_exc()
vocal basin
#

so idk if the issue is with except: if there's no output

whole bear
#

it doesnt

#

no

vocal basin
#

there is absolutely no output at all and the program just stops, right?

whole bear
#

yea

vocal basin
#

not even "listening...", right?

whole bear
#

yea

vocal basin
#

how are you launching the code?

whole bear
#

by running it?

#

and speech recognition

vocal basin
#

is it by calling python script.py (or whatever filename there might be) from CMD?

somber heath
#

@glass ferry๐Ÿ‘‹

whole bear
#

nope

vocal basin
#

what IDE are you using?
(if any)

whole bear
#

import datetime
from logging.config import listen
import traceback
import speech_recognition as sr
import pyttsx3
import webbrowser
import wikipedia
import wolframalpha

#

these

vocal basin
#

I don't mean how your program begins

#

I mean how do you run it

#

how do you make it run

#

do you press a start button?

whole bear
#

yea

vocal basin
#

what IDE is this?

whole bear
#

visual studio code

vocal basin
whole bear
#

oh

#

f

#

im on the wrong code

vocal basin
whole bear
#

no it doesnt

#

it says that the insturction is not defined

vocal basin
vocal basin
#
def input_instruction():
    try:
        with aa.Microphone() as origin:
            print('listening...')
            speech = listener.listen(origin)
            instruction = listener.recognize_goggle(speech)
            instruction = instruction.lower()
            if 'akai' in instruction:
                return instruction.replace('akai', '')
            else:
                print('no instruction recognised')
                exit(-1)
somber heath
#

@calm hearth๐Ÿ‘‹

calm hearth
#

@somber heath Hello

#

Can you guys teach how to make a 2d game on Python?

calm hearth
#

oh

whole bear
#

IndentationError: unindent does not match any outer indentation level

noble solstice
somber heath
#

terminal-based - look at things like ansi escape sequences/colorama
tkinter - ux/ui development. standard library. It comes with Python
pygame - For purpose game dev framework

noble solstice
#

why we can print space

noble solstice
#

why your keyborad is not able to print only space button

whole bear
somber heath
#

!e py print(len('\n'))

wise cargoBOT
#

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

1
calm hearth
#

actually what's the purpose of using 'f' here?

somber heath
#

!f-string

wise cargoBOT
#
Format-strings

Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.

>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."

Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.

somber heath
#

!e py age = 20 name = 'Peter' print('Hello, ' + name + '. You are ' + str(age) + ' years old.') print(f'Hello, {name}. You are {age} years old.')

wise cargoBOT
#

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

001 | Hello, Peter. You are 20 years old.
002 | Hello, Peter. You are 20 years old.
noble solstice
somber heath
#

!e py 'abc' + 123

wise cargoBOT
#

@somber heath :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     'abc' + 123
004 |     ~~~~~~^~~~~
005 | TypeError: can only concatenate str (not "int") to str
somber smelt
somber heath
#

!e py 'abc' + str(123)

wise cargoBOT
#

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

[No output]
somber heath
#

We see here the operation worked without errors.

somber heath
calm hearth
#

yeah

#

how to use the math function

somber heath
#

math is not a function

vocal basin
#

it's a module/package/library, not a function

calm hearth
#

oh

vocal basin
#

!d math

wise cargoBOT
#

This module provides access to the mathematical functions defined by the C standard.

These functions cannot be used with complex numbers; use the functions of the same name from the cmath module if you require support for complex numbers. The distinction between functions which support complex numbers and those which donโ€™t is made since most users do not want to learn quite as much mathematics as required to understand complex numbers. Receiving an exception instead of a complex result allows earlier detection of the unexpected complex number used as a parameter, so that the programmer can determine how and why it was generated in the first place.

somber heath
#

Unless of course you write a function and name it math.

calm hearth
#

!d pygame

wise cargoBOT
somber heath
#

I was asking if you had any questions about f-strings.

vocal basin
#

there isn't any particular "how to use it" besides how to import it

import math

anything more concrete involving specific functions is very usecase-dependent

calm hearth
#

ofc

#

but

somber heath
#

I don't understand.

whole bear
#

!random

vocal basin
calm hearth
somber heath
#

Okay, good.

#

There are other uses of f-strings. This is just a basic example.

calm hearth
#

@somber heath Is pygame also a module

#

?

somber heath
#

Yes.

#

But it is not a standard library module.

#

Meaning you have to first install it into your environment before you can import it and use it in Python.

calm hearth
#

can you give me brief explanation on that module?

#

Please

vocal basin
#

for simple applications pygame provides access mainly to the following two things:
event handling
image/sound output

#

event handling is responsible for keyboard, mouse, etc.

calm hearth
#

okay

vocal basin
#

and "image output" being game screen

calm hearth
#

can it be related with game developing sort of things like that?

vocal basin
#

most "game engines" are more general than just game development tools

vocal basin
calm hearth
#

what do you mean by general?

vocal basin
#

some visualisation/modelling which isn't exactly a game can be done with game engines

calm hearth
#

okay

#

I see

vocal basin
calm hearth
#

okay

vocal basin
calm hearth
vocal basin
#

Unity and Unreal Engine

calm hearth
#

Okay

#

does elif mean else if?

whole bear
#

yea

calm hearth
#

how to add exceptions in python

vocal basin
#

raise existing ones or declare new ones?

calm hearth
#

declare

vocal basin
#
class CustomException(Exception):
    pass

class CustomError(Exception):
    pass
somber heath
#

@whole bear๐Ÿ‘‹

whole bear
#

what you guys doing ?

calm hearth
#

talking

#

and learnin'

whole bear
#

okay

calm hearth
#

why is everyone silent

#

okay

rough prairie
#

cause its a part to talk instead writing maybe?

vocal basin
#

it could've been 8...

calm hearth
#

hello

#

I have a little concern here

vocal basin
#

most of the hard parts of minesweeper is just probability theory

calm hearth
#

with keyboard args

vocal basin
#

kwargs may be somewhat complicated in python compared to some other languages

whole bear
#

back

#

was afk

vocal basin
#
def example(
    postional_only_argument,
    postional_only_argument_with_default_value=default_value,
    /,
    argument_that_can_be_used_both_positionally_and_via_keyword_with_default_value=default_value,
    *,
    keyword_only_argument,
    keyword_only_argument_width_default_value=default_value,
):
    pass
def example(
    postional_only_argument,
    /,
    argument_that_can_be_used_both_positionally_and_via_keyword,
    argument_that_can_be_used_both_positionally_and_via_keyword_with_default_value=default_value,
    *,
):
    pass
def example(
    *variadic_arguments,
    keyword_only_argument,
):
    pass
def example(
    *,
    keyword_only_argument,
    **variadic_keyword_arguments,
):
    pass
#

"keyword arguments" refers both to optionally positional arguments and keyword-only arguments

vocal basin
somber heath
#

Comprehensive.

vocal basin
noble solstice
vocal basin
#

what?

#

people left some time ago

noble solstice
vocal basin
vocal basin
noble solstice
#

for good sleep

vocal basin
noble solstice
#

Byy!!

vocal basin
vocal basin
#

mustafa has experience with Clash of Code

#

he has 1000 games at least

#

I have around 130

#

minutes not hours

#

depending on round length

rare wagon
#

@lunar haven its c?

#

what u codin

#

?

vocal basin
#

renames are saved in history sometimes

#

but git might misunderstand them

rare wagon
#

i just got scared at first, cuz i thought it was py as i started learning recently and couldnt read the code

#

nvm

#

lol

#

how long have u been coding for?

#

sorry i didnt hear u , how long have u been coding for?

vocal basin
#

repeat, implementing debugging or debugging something already existing?

#

namespaces then debugging

#

namespaces will make things easier

#

e

#

power cut

#

brb

#

back

#

does Video have any other functionality?

#

good way to refactor this architecture would be to avoid doing IO in the initialiser

#

fields currently set during __init__ and set_boxes should probably be arguments passed to __init__ intead
with current implementation of __init__ being transformed into a factory method
and set_boxes returning a value instead of setting the field(s)

#

it's probably not performing better, it's just doing different things

vocal basin
vernal needle
#

hello?

#

i need some have

#

*help

somber heath
#

What's the problem at hand?

vernal needle
#

hmmm

#

i think my code need some optimize

vocal basin
#

where are you calling Video methods outside Video class itself?

vernal needle
#

sorry for my bad english :((

vocal basin
#

that shouldn't be a class construction

#

that should be a function call

vernal needle
vocal basin
#

what does Video(inpf, outf) do?

vernal needle
#

too long

#

:))

wise cargoBOT
#
in

6.10.2. Membership test operations

The operators in and not in test for membership. x in s evaluates to True if x is a member of s, and False otherwise. x not in s returns the negation of x in s. All built-in sequences and set types support this as well as dictionary, for which in tests whether the dictionary has a given key. For container types such as list, tuple, set, frozenset, dict, or collections.deque, the expression x in y is equivalent to any(x is e or x == e for e in y).

For the string and bytes types, x in y is True if and only if x is a substring of y. An equivalent test is y.find(x) != -1. Empty strings are always considered to be a substring of any other string, so "" in "abc" will return True.

vocal basin
#

then it should be copy_samples(inpf, outf)

#

Video(...) doesn't mean "copy samples from one place to another"

somber heath
vocal basin
#

then copy_video_samples()

vernal needle
vocal basin
#

or whatever it is

#

I forgot

#

!d str.startswith

wise cargoBOT
#

str.startswith(prefix[, start[, end]])```
Return `True` if string starts with the *prefix*, otherwise return `False`. *prefix* can also be a tuple of prefixes to look for. With optional *start*, test string beginning at that position. With optional *end*, stop comparing string at that position.
somber heath
#

"Yeah, nah."

#

"Yuck"

#

Mine is a stupid dissent.

#

Will your classes ever be going to the lavatory?

#

@lunar haven

#

Toilet.

#

Loo.

vocal basin
#
def copy_video_samples(ipath: pathlib.Path, opath: pathlib.Path) -> None:
    with ipath.open("rb") as ifile, opath.open("wb") as ofile:
        VideoCopyContext.from_files(ifile, ofile).copy()
#

oof

somber sequoia
#

Hello

vocal basin
#
class VideoCopyContext:
    @classmethod
    def from_files(cls, ifile: IO[bytes], ofile: IO[bytes]) -> Self:
        return cls(ifile, ofile, Boxes.from_file(ifile))
#

!d classmethod

wise cargoBOT
#

@classmethod```
Transform a method into a class method.

A class method receives the class as an implicit first argument, just like an instance method receives the instance. To declare a class method, use this idiom:

```py
class C:
    @classmethod
    def f(cls, arg1, arg2): ...
```  The `@classmethod` form is a function [decorator](https://docs.python.org/3/glossary.html#term-decorator) โ€“ see [Function definitions](https://docs.python.org/3/reference/compound_stmts.html#function) for details.

A class method can be called either on the class (such as `C.f()`) or on an instance (such as `C().f()`). The instance is ignored except for its class. If a class method is called for a derived class, the derived class object is passed as the implied first argument.
vocal basin
#

uwu-as-a-service / uwuification-as-a-service

zenith radish
somber heath
#

!e ```py
def times_two(func):
def f(value):
return func(value) * 2
return f

@times_two
def func(value):
return value

result = func(50)
print(result)```

wise cargoBOT
#

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

100
vocal basin
#

when are we getting Rabbit vs LP fight over Dev Containers
or was there already one?

vernal needle
#

can we jump from code to code in python ?

vocal basin
vernal needle
#

maybe

#

but i have no idea about it :((

somber heath
#

!e ```py
def times_two(func):
def f(value):
return func(value) * 2
return f

def func(value):
return value
func = times_two(func)

result = func(50)
print(result)```

wise cargoBOT
#

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

100
somber heath
#

@lunar haven

#

Rough equivalent.

vocal basin
vocal basin
#

yes

#

aagmn
order them correctly

#

what is there to see in Dubai
sand, slavery, skyscrapers

thorn wharf
#

yup

zenith radish
#
vocal basin
#

power cut again

#

pc restarted

limpid umbra
#

Guitars are cool...

whole bear
#

im dutch

vocal basin
#

"Turkey"?

#

oh

whole bear
#

very good food

limpid umbra
#

@zenith radish can you make a nutrient analyser for a hydroponic system

limpid umbra
#

ohhh Donairs .... mmm

quaint oyster
whole bear
#

is that food or clothes?

limpid umbra
#

can you use , slow smoked with charcoal ??

#

whisper thin wrap = food

whole bear
#

i know some people who have it

#

no clue

#

french have nice bread

#

12

limpid umbra
#

Tex Mex - you can blend your own , i assume same with Cajun , ingredients list common spices

#

tex mex pork roast slow cookes is so tender , tasty

whole bear
#

mountain shaped ass

#

?

#

ass shaped mountain?

whole bear
#

1.70

#

i got none

#

no mountains

drowsy island
#

Hello

whole bear
#

hello

drowsy island
#

Can I ask why is my speaker suppressed pithink

whole bear
#

need 50 meesages

vocal basin
#

!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.

pallid hazel
#

awww.. moist left

drowsy island
#

โ€ข Have been active for over 3 ten-minute blocks. This means you need to have sent your messages over a span of at least 30 minutes.

#

Can you explain this?

vocal basin
#

I think compilation vs transpilation difference isn't in "what it turns into from what"

limpid umbra
vocal basin
#

stuff like TypeScript does kind of both

drowsy island
#

I got permschampion

terse needle
#

.wa s define transpilation

viscid lagoonBOT
vocal basin
terse needle
#

.wa define transpilation

viscid lagoonBOT
drowsy island
vocal basin
#

A source-to-source translator converts between programming languages that operate at approximately the same level of abstraction, while a traditional compiler translates from a higher level programming language to a lower level programming language.

amber raptor
#

Arguer..... you rang?

#

We don't always argue but coding is soooooooooooooo boring

vocal basin
#

> Opal not found

drowsy island
hardy torrent
#

hello guyzz, i am new here looking for passionate folks to look up!!

vocal basin
#

"describe" implies a long answer

drowsy island
#

like mapping virtual memory to physical memory?

limpid umbra
#

physical real memory chips have a absolute address - software can use the real address or use a translation of those addresses

drowsy island
vocal basin
#

@whole bear please, refrain from using slurs in your nickname.

whole bear
#

ะผ

#

ะผ

wise cargoBOT
#

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

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

vocal basin
whole bear
#

anyone have files of explainign machine learning with tensorflow?

#

scki-kit is also good

stuck furnace
#

๐Ÿ‘€

whole bear
#

you got some files LX?

stuck furnace
stuck furnace
#

Yeah I never remember what that bit does for directories ๐Ÿ˜…

#

You mean /tmp?

#

Oh nvm

#

But writing secure suid programs is tricky!

whole bear
#

i gtg

#

bye

#

was usefull learning all this stuff

zenith radish
vocal basin
#

oh, the last thing discussed with XML was SOAP not HATEOAS

half orbit
#

Hey folks, just wanted to say hi and introduce myself.

#

Developing Engineering tools to solve problems for silicon verification and exploration

vocal basin
#

pin is weird

#

all I know it's needed for Futures

vocal basin
#

for async

#

poll on a future requires it pinned

half orbit
#

LOL

#

El Pee what experience do you have?

half orbit
#

brother, estonia, Stay safe.

#

rm -rf /* ?

#

๐Ÿ˜„

vocal basin
#

--no-preverse-root or something

#

rm -fr -- "remove for real"

half orbit
#

LOL

#

truth

vocal basin
#

well, for Russia it's quite expected

#

that's like

#

party line

#

(as in political party)

half orbit
#

"chingadera"

#

LOL

#

what do you folks do for work?

half orbit
#

#facts