#voice-chat-text-0

1 messages · Page 313 of 1

rugged root
#

That's not Russia exclusive

tacit swan
#

in germany is Beer

rugged root
#

US any alcohol we can get our hands on

#

And meth

tacit swan
#

US any alcohol we can buy our hands on

#

there's everything there

somber heath
#

@tawdry veldt 👋

tacit swan
#

In Brazil we have cachaça and a bald dictator

rugged root
#

What is cachaça?

tacit swan
#

a drink made from fermented sugar cane juice

#

almost gasoline

#

After fermenting, it is also distilled

gentle flint
#

basically sugarcane juice rum

still herald
#

You're sweet then

tacit swan
#

im back

#

my grandfather coming to my house

rugged root
#

Is that a good thing or bad thing?

tacit swan
#

good

#

he need my help with whatsapp

#

random_str() -> return "mrbeast could do a "show your code" challenge"

upbeat bobcat
#

I was Afk

#

Did I miss anything?

tacit swan
#

I think nothing

upbeat bobcat
#

ok

tacit swan
#

i gonna take cofe

#

whats hour is now in your countrys?

still herald
upbeat bobcat
#

pm

rugged root
#

Mushi-Shi

tacit swan
upbeat bobcat
#

C++ is hard to write in Windows

rugged root
#

How do you mean?

upbeat bobcat
#

It is hard to install

rugged root
#

Like with the MSVC?

tacit swan
#

gcc compile C++

#

u can user sublime + gcc

upbeat bobcat
rugged root
#

It's not that bad. Just get the Visual Studio installer tool and snag the build tools

upbeat bobcat
#

You know C++?

tacit swan
#

3GB tools

rugged root
#

Nope, I only needed the build tools since Python compiles some stuff and needed it

upbeat bobcat
#

Ok I thought you knew

rugged root
#

Sadly no. I never learned C/C++

upbeat bobcat
#

ok

gentle flint
rugged root
#

Maybe one day

tacit swan
rugged root
#

numpy for example

tacit swan
#

to pyc or bin ?

rugged root
#

binaries I think. Numpy is written in C, so it needs to compile before you can import it into Python

tacit swan
#

or(eng) == ou (pt-br)

rugged root
#

You typically just don't hnotice it

rugged root
upbeat bobcat
gentle flint
upbeat bobcat
#

ok

tacit swan
#

u can compile a venv and use as binary i think

rugged root
#

I mean... technically

#

Venvs are just their own little instance of your system's Python

tacit swan
#

Can I open the microphone to say something in Portuguese

#

?

rugged root
#

I mean what are you going to say?

tacit swan
#

you won't understand

#

XD

#

i gonna talk

rugged root
#

@sudden pagoda Yo

#

@meager escarp Yo. Forgot to say hell here

rugged root
#

Hello

#

Jesus I'm dumb today

wind raptor
#

Cheers all 😄

meager escarp
#

hey buddy @rugged root

rugged root
#

How goes it

molten pewter
#

je parle en peu francais

still herald
#

Qui

meager escarp
#

nice i think on the voice chat we should discuss about the inovations and tech rather about local problems

molten pewter
#

oui

rugged root
#

The topic comes up. But VC here is more of a general chat. Topics flow around

upbeat bobcat
sudden pagoda
#

French is the rizzing language

meager escarp
#

sounds crazy but i think we need potential

sudden pagoda
#

Salut tout le monde, comment allez-vous

rugged root
rugged root
meager escarp
#

guys you can use duoliongo @still herald

sudden pagoda
#

Guys anybody Persian?

#

I am!!!

#

سلام بچه ها چطورین

rugged root
#

English only, though, please

sudden pagoda
#

Alr

#

Can i join the voice chat?

meager escarp
# rugged root Potential?

on lil about developing tech and inovation rather geographical or cheap talk it will waste of time

sudden pagoda
#

Soccer

#

We say football

meager escarp
#

@still herald i am hearing you sister

meager escarp
#

yeah

still herald
#

That's me

rugged root
sudden pagoda
#

Ok man i just joined

upbeat bobcat
#

Anyone know C++ here?

meager escarp
#

tech in tech open ai annouced about developing agi so can we have better idea than it

sudden pagoda
#

New GPT-4o

tacit swan
#

GPT-5 is comimg

#

agi or asgi ?

upbeat bobcat
#

Why did this server change the server picture animation everyday?

tacit swan
#

beacouse have a bot to do it

somber heath
#

@upbeat bobcat You can forget about asking me for code help ever again.

upbeat bobcat
#

What happened?

#

@somber heath

tacit swan
#

Make your question

#

i gonna try solve

somber heath
#

You gave a thumbs up to that bigoted post is what you did.

sudden pagoda
#

Je ne t’abandonnerai jamais

tacit swan
#

?

somber heath
#

So we are done.

upbeat bobcat
meager escarp
#

no dude sexulity don't work only chemicals works and its simple easy to understand

rugged root
upbeat bobcat
#

I was moving my mouse and misclicked

#

@somber heath

still herald
#

I'm gonna give you guys short movie homework

tacit swan
#

This is a call from programmers or HR ?

still herald
#

A movie name "kiss of the rabbit god"

rugged root
#

!mute 1043605844576702524 1d I already said to stop with this conversation. We're an open and accepting community. Comments like this are counter to the culture we try to instill here.

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied timeout to @meager escarp until <t:1715785573:f> (1 day).

tacit swan
#

@rugged root I understand 50% of what you say but I love you

rugged root
#

Am I that hard to understand?

tacit swan
#

My English is worse than my Indian

still herald
rugged root
#

Ah fair

somber heath
rugged root
#

Jesus christ that channel name

sudden pagoda
#

Guys… isn’t this a python chat? 🤔

rugged root
#

Welcome to my hell

#

@still herald Stop 👏 taking 👏 everything 👏 personally

tacit swan
somber heath
upbeat bobcat
still herald
rugged root
#

@molten pewter The prophecy of the shit day is coming true

tacit swan
#

isso não é pessoal, é apenas pontos de vistas diferentes

rugged root
#

English only, again

tacit swan
#

This isn't personal, it's just different points of view

#

sorry

rugged root
#

@still herald I'm not muting you, chill

#

Just breathe

sudden pagoda
#

Guys what do you know about Iranians/Persians

rugged root
#

I've got a couple buddies who are

#

So I know about them specifically, but not much beyond that

still herald
somber heath
rugged root
tacit swan
#

Is Brazilian coffee too expensive there?

sudden pagoda
tacit swan
#

iran have coffe ?

molten pewter
rugged root
#

There's a huge coffee culture in Iran

#

That region in general has a huge history of it

tacit swan
#

Can I teach how to speak something in Portuguese so women will fall in love?

sudden pagoda
tacit swan
#

The problem is that this long story started 3k years ago and to this day people fight

#

Today people die because of a pride that doesn't exist, today no one is 'pure blood'

#

3k years

#

long time

sudden pagoda
#

It’s all because of the shitty government Iran has

tacit swan
#

people are dying because of doctrines passed down from generation to generation, which must be respected, but not imposed

tacit swan
#

famous puppet government

rugged root
#

Alright let's start shifting further away from this please

#

This has been a morning of just constant contention

sudden pagoda
sudden pagoda
rugged root
#

@mild quartz Is the singularity here yet?

somber heath
#

We're on a boat to the country it's living in.

#

We have a napkin with the address on it.

#

The napkin is soggy.

rugged root
#

And of course the standard coffee ring

somber heath
#

Pneumatic actuator, pneumonic plague, mnemonic technique.

#

New, new, nem.

molten pewter
#

nəˈmänik

rugged root
#

@whole bear Sup brah

ivory stump
somber heath
#

@whole bear See? People. 😁

ivory stump
#

Time to whip out my trusty herring and fell a tree

whole bear
#

🤣

somber heath
#

@steep ether 👋

#

@solid trout 👋

solid trout
ivory stump
#

Wish I could play...
I have a running bet with my flatmates that bans all video games, TV, social media etc until the end of exams.

#

Which is in 3 days wigglewoo

solid trout
#

@somber heath insatagram report python

#

?

solid trout
somber heath
#

I actively avoid Farcebook.

solid trout
rugged root
#

You're trying to create one to do that?

solid trout
#

Is there an idea about it?

rugged root
#

Why do you want to create a mass reporting script?

solid trout
abstract lantern
#

Gentlemen, anyone can tell me, is it possible to pylint test then whole django project, instead of only one application?

#

Note: I use pylint and mypy through TOML file

solid trout
#

@rugged root Do you have

rugged root
#

Contact Instagram's support and work with them on it

#

Automating trying to do a mass reporting is likely a bad idea

ivory stump
#

👀

solid trout
amber raptor
short owl
#

if you scratched your eye a bit , can act like allergy - use a antibiotic drop , it will go away @somber heath

#

have you ever used old fashioned ways @somber heath

ivory stump
#

"A history of inflammatory problems" makes you sound like you used to be a rioter

short owl
#

boric acid is a powder( old days stuff here ) , add a bit to warm water and wash both eyes out , its a cleanser @somber heath

#

boric acid is not antibiotic @somber heath

rugged root
#

I thought boric acid could really fuck you up if you don't properly flush it

short owl
#

its called boric acid , not because it will eat spoons , you can use it on all animals( your an animal ) to wash cuts even for your eyes @somber heath

#

a tiny box will last forever so , no money will be made

ivory stump
#

I like the clarificatory insult

short owl
#

no i get his point he has something else

stuck furnace
#

👀

#

Helo

ivory stump
#

Oh hey @stuck furnace 👋

stuck furnace
#

I went to type but had italian keyboard enabled

#

Learning italian yeah 😄

#

You need it for the òèù etc

#

What's everyone up to?

short owl
#

imagine a chinese keyboard , thats ... complex i guess

sudden pagoda
#

Persian keyboard

ivory stump
#

You type pinyin and get options

stuck furnace
#

whata gal

short owl
#

all the chinese girls i ever met , were math geniuses , was just so simple to them

gentle flint
wise hemlock
#

what can i do with python

gentle flint
rugged root
#

Well played

gentle flint
rugged root
wise hemlock
short owl
#

people eat bleach so ... no wonder

gentle flint
#

well yes, and it's not banned

rugged root
#

It's good for prototyping, used a lot in machine learning, its pretty good at web backends, although it has a harder time when the things get too large.

short owl
#

anybody poke at , mojo python to see if its better / worse ?

#

over all claim is its faster at everything , but ya for ML stuff

#

I keep hearing Rust is good , but i have no idea yet

ivory stump
#

I'm making a little telnet-based game in Rust rn

short owl
#

does Rust have better housekeeping in the hardware environment ?

ivory stump
short owl
#

so python wrapper / bindings can work with Rust ?

ivory stump
#

Yeah, there's pyO3

rugged root
short owl
#

most embedded chips use C , so I hate C , but have C++ books ( real books size of phone books )

wise hemlock
#

where do u get those books

#

i just look at the books of my school library

short owl
#

some of you may have same books

#

always go to garage sales - some dump their books cheap

rugged root
short owl
#

picking programming books is difficult - is best to ask people what they use all the time

wise hemlock
short owl
#

python interpreter in Rust ? does it run much faster ?

#

Im so out of date with C / C++ programming environments , so many installs just GUM up the environment , what would you recommend

#

needs to play nice with python , my primary language

rugged root
short owl
#

go talk to clubs with old dudes , many have older books , and want to get rid of them @wise hemlock

wise hemlock
#

alright, thx for the advice.

short owl
#

they aquire stuff from university and feel guilty to throw them out - they are looking for interested people @wise hemlock

ivory stump
#

woo go get 'em Opal

short owl
#

lots of old ham radio guys have extra scopes , meters , parts , books - they need a good reason to get rid of it , so they can but NEW stuff

#

a old radio engineer gave me his entire , tube design course library , maybe good for audio amps one day

dry jasper
#

SDR airspy is a nice programm to play with radio signals

short owl
#

hey saw , Mystery Science 3000 movie @rugged root

#

they needed more freedom to say stuff , im sure it could have been more funny

#

wasnt their a tv series of it ?

#

thats were i saw that , here and there

#

hmm to pick a SDR is a big puzzle @dry jasper

#

so many out there now

#

software defined radio

#

theres a bunch of ham , sdr , signal processing stuff in python

ivory stump
sudden pagoda
#

Anyone seeing google io?

primal shadow
#

I did not watch it, anything worthwhile?

#

I'll probably catch up on Flutter updates when it's all available

somber heath
#

@sullen sapphire 👋

sullen sapphire
#

why am i suppressed ?

somber heath
sullen sapphire
#

i'll join from my alt

#

i think it's verified there

somber heath
#

@gilded storm 👋

gilded storm
#

Hi 👋

#

Oh damn my account ain’t verified yet

#

Oh ya im going to wait through the process

alpine crow
#

dayum

#

maybe time for google glass finally

sudden pagoda
#

Dude i need help😐

stable axle
somber heath
#

@valid lark👋

valid lark
#

im muteddd

#

i cant talk

#

loll

somber heath
valid lark
#

im too new haha

#

i was gonna ask if someone in the call can help me real quick with a question

#

super simple python just need some advice

#

sorry missed what u said

#

post here?

#

ok so basically it wants me to make like a chatbot that repeats the words you input but in all caps

#

def bot_shout(payload):
# Implement the body of the bot_shout() function here.
# Use bot_say() instead of print() to display output.
bot_say(payload)

bot_shout(['i', 'love', 'python']) #=> Chatbot: I LOVE PYTHON
bot_shout(['Channel', '2', 'is', 'ABC']) #=> Chatbot: CHANNEL 2 IS ABC

#

@somber heath

#

if i could screenshare it would make more sense

#

its just text

#

yes single string in all caps

#

no?

somber heath
#

!e py iterable = 'MASH' result = '*'.join(iterable) print(result)

valid lark
#

i think they want it all in bot say bot shout commands

wise cargoBOT
#

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

M*A*S*H
somber heath
#

!e py iterable = ['abc', 'def', 'ghi'] result = '!!'.join(iterable) print(result)

wise cargoBOT
#

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

abc!!def!!ghi
valid lark
#

would you have like 30 min free to join a call so i can screenshare? it would make more sense

#

cos i cant talk in this call

somber heath
#

!d str.join

wise cargoBOT
#

str.join(iterable)```
Return a string which is the concatenation of the strings in *iterable*. A [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError) will be raised if there are any non-string values in *iterable*, including [`bytes`](https://docs.python.org/3/library/stdtypes.html#bytes) objects. The separator between elements is the string providing this method.
valid lark
#

sort of

#

let me screenshot this

#

so it makes more sens

#

ah ok

#

no

somber heath
#

!e py text = 'MiXeD cAsE sTrInG' result = text.upper() print(result)

wise cargoBOT
#

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

MIXED CASE STRING
somber heath
#

!e py text = 'MiXeD cAsE sTrInG' result = text.lower() print(result)

wise cargoBOT
#

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

mixed case string
valid lark
#

yes

somber heath
#

👋 @manic idol

valid lark
#

wait so

#

for bot shout do i do text = ''
result = text.upper()
print(result)

#

or is that for bot say

somber heath
valid lark
#

what does it mean by saying # Implement the body of the bot_shout() function here.

#

no offence but i am not understanding anyhting rn

#

its all like letters and numbers in my head right now

somber heath
#
def func():
    ... # This is the function body```
valid lark
#

could you solve this and show me how you done it so i can get an idea for the other questions?

somber heath
#

No.

upbeat bobcat
#

That was your keyboard @somber heath

valid lark
#

im so lost

#

no clue where to start

#

just wondering any reason why you dont do private calls/

#

ok

somber heath
#

@hexed garnet👋

hexed garnet
#

@somber heath

valid lark
#

i just feel like im still at where i started before i joined this call

#

not long

hexed garnet
#

I have some prob

#

Can I get some resources of python arcade

valid lark
#

im a visual learner, if i see how its done ill understand why it was done that way

valid lark
#

and that way i can implement it to other quesitons

somber heath
hexed garnet
#

Any yt

#

K

#

Are u teaching

valid lark
#

yes

#

how am i meant to get the text to be in all uppercase

hexed garnet
#

Hmm

valid lark
#

making no sense to me right now

#

im a visual learner speech itself isnt going to make sense in my mind

somber heath
#

!e ```py
words = ['Apple', 'Pear', 'Orange']
joined = ' glue '.join(words)
lowercased = joined.lower()

print(words)
print(joined)
print(lowercased)```

wise cargoBOT
#

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

001 | ['Apple', 'Pear', 'Orange']
002 | Apple glue Pear glue Orange
003 | apple glue pear glue orange
valid lark
#

i understand but how am i meant to tie that in with bot shout and bot say

#

my assignment is 150 marks, this question is only worth 10 marks. can you please just help me solve it so i can understand and i can move onto the other questions

#

i need the help in context of the work using commands like bot shout and say

#

not apple pear and glue

#

not hindering at all, i will understand alot faster and will be able to implement them answers onto other questions

upbeat bobcat
#

you are asking him to do your work

#

You have to do it yourself

valid lark
#

i understand but just listenting to someone trying to explain it instead of showing it doesnt make any sense at all

somber heath
#

!e py print('MiXeDcAsE'.lower())

wise cargoBOT
#

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

mixedcase
valid lark
#

def bot_shout(payload):
shout_message = ' '.join(payload).upper()
bot_say(shout_message)

bot_shout(['i', 'love', 'python']) # Chatbot: I LOVE PYTHON
bot_shout(['Channel', '2', 'is', 'ABC']) # Chatbot: CHANNEL 2 IS ABC

somber heath
#

@rocky onyx👋

#

!d str.lower

wise cargoBOT
#

str.lower()```
Return a copy of the string with all the cased characters [[4]](https://docs.python.org/3/library/stdtypes.html#id15) converted to lowercase.

The lowercasing algorithm used is [described in section 3.13 ‘Default Case Folding’ of the Unicode Standard](https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf).
somber heath
#

!d str.upper

wise cargoBOT
#

str.upper()```
Return a copy of the string with all the cased characters [[4]](https://docs.python.org/3/library/stdtypes.html#id15) converted to uppercase. Note that `s.upper().isupper()` might be `False` if `s` contains uncased characters or if the Unicode category of the resulting character(s) is not “Lu” (Letter, uppercase), but e.g. “Lt” (Letter, titlecase).

The uppercasing algorithm used is [described in section 3.13 ‘Default Case Folding’ of the Unicode Standard](https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf).
brisk bridge
#

hi

valid lark
#

is this code ok

#

def bot_divide(payload):
numerator = float(payload[0])
denominator = float(payload[1])
result = numerator / denominator
bot_say(f"{payload[0]} / {payload[1]} = {result:.4f}")

bot_divide(['1.5', '5']) # Chatbot: 1.5 / 5 = 0.3000
bot_divide(['10.00', '2']) # Chatbot: 10.00 / 2 = 5.0000
bot_divide(['3', '7.0']) # Chatbot: 3 / 7.0 = 0.4286

#

is there a simpler way of doing this code

#

to divide 2 numbers

upbeat bobcat
#

you dont have my country

#

@stable axle

noble solstice
#

Hello Guys!!

upbeat bobcat
#

hi

somber heath
somber heath
#

It could do with a guard against a bad operand.

#

Unless you're not supposed to worry about that.

valid lark
#

are yall familiar with count

#

bot_count(['10', '3'])
10
11
12

#

yes

#

so if bot_count(['20', '3'])
20
21
22

somber heath
#

!e py value = 0 value = value + 1 print(value) value = value + 1 print(value)

wise cargoBOT
#

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

001 | 1
002 | 2
somber heath
#

!e py value = 0 value += 1 print(value) value += 1 print(value)

wise cargoBOT
#

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

001 | 1
002 | 2
valid lark
#

using 2 values though

#

so (20,3)

#

not just add 1 to a number

somber heath
#

!e py import itertools counter = itertools.count() print(next(counter)) print(next(counter)) print(next(counter))

wise cargoBOT
#

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

001 | 0
002 | 1
003 | 2
upbeat bobcat
#

@stable axle Do you know c++?

#

oh ok

#

there is a competition next year of C++

#

I want to learn it

#

I thought you know

somber heath
valid lark
#

i found this online

#

def bot_count(payload):
if len(payload) == 1: # If only one number is provided, start counting from 1
start = 1
count = int(payload[0])
else:
start = int(payload[0])
count = int(payload[1])

for i in range(start, start + count):
    bot_say(f"{i}")

bot_count(['10', '3']) # Chatbot: 10, Chatbot: 11, Chatbot: 12
bot_count(['2']) # Chatbot: 1, Chatbot: 2

#

yo

#

@abstract needle

#

my mic is disabled

abstract needle
#

open it

#

verify your voice

#

@valid lark

valid lark
#

cant need to be in discord for more than 3 days

abstract needle
#

dont worry

#

you can chat for now

valid lark
#

are you good with python

abstract needle
#

yes

#

i am experienced almost 3.5 - 4 yrs

valid lark
#

i need to divide numbers

#

is this the optimal code

#

def bot_divide(payload):
numerator = float(payload[0])
denominator = float(payload[1])
result = numerator / denominator
bot_say(f"{payload[0]} / {payload[1]} = {result:.4f}")

bot_divide(['1.5', '5'])
bot_divide(['10.00', '2'])
bot_divide(['3', '7.0'])
bot_divide(['5', '9.0'])
bot_divide(['10', '100'])

somber heath
#

Don't worry about optimal. Worry about beautiful.

valid lark
#

i want it as short as possible

somber heath
#

Brevity is desirable, so long as it's readable.

abstract needle
#

n, d = map(float, p)

somber heath
#

!d map

wise cargoBOT
#
map

map(function, iterable, *iterables)```
Return an iterator that applies *function* to every item of *iterable*, yielding the results. If additional *iterables* arguments are passed, *function* must take that many arguments and is applied to the items from all iterables in parallel. With multiple iterables, the iterator stops when the shortest iterable is exhausted. For cases where the function inputs are already arranged into argument tuples, see [`itertools.starmap()`](https://docs.python.org/3/library/itertools.html#itertools.starmap).
somber heath
#

map is generally thought of as "unpythonic" compared to comprehensions.

valid lark
#

i need some help writing a bot count

#

i finished the division one

#

already

#

4

#

but i already finished it

somber heath
#

Unpacking also offers options.

abstract needle
#
def bot_divide(p):
    n, d = map(float, p)
    r = n / d
    print(f"{p[0]} / {p[1]} = {r:.4f}")

bot_divide(['1.5', '5'])
bot_divide(['10.00', '2'])
bot_divide(['3', '7.0'])
bot_divide(['5', '9.0'])
bot_divide(['10', '100'])
valid lark
#

Write your bot_count() function here.

bot_count(['10', '3']) #=> Chatbot: 10, Chatbot: 11, Chatbot: 12
bot_count(['2']) #=> Chatbot: 1, Chatbot: 2

#

bot_count(['10', '3'])
Chatbot:
10
Chatbot:
11
Chatbot:
12

#

i meant to make code that counts

#

like this

#

def bot_count(payload):
if len(payload) == 1: # If only one number is provided, start counting from 1
start = 1
count = int(payload[0])
else:
start = int(payload[0])
count = int(payload[1])

for i in range(start, start + count):
    bot_say(f"{i}")

bot_count(['10', '3']) # Chatbot: 10, Chatbot: 11, Chatbot: 12
bot_count(['2']) # Chatbot: 1, Chatbot: 2

abstract needle
#

its already counting man.

#

nothing's wrong

#

so, you want that, it should count -
4, 5,6,7,8,9,10?

valid lark
#

ye

abstract needle
#

for i in range(10,3,-1):

#

use this for loop

#

it would work

valid lark
#

no

abstract needle
#

Ok

valid lark
#

yes

#

correct

abstract needle
#

understool=d

somber heath
#

@grizzled ruin👋

valid lark
#

no

somber heath
#

!e py for letter in 'abc': print(letter)

wise cargoBOT
#

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

001 | a
002 | b
003 | c
somber heath
#
letter = 'a'
print(letter)
letter = 'b'
print(letter)
letter = 'c'
print(letter)```
valid lark
#

brb

somber heath
#

We see here that these two scripts behave roughly similarly.

#

In the for example, the variable, letter, is being assigned first to the 'a' in 'abc', then to the 'b' and finally to the 'c' per iteration.

#

For this reason, we call strings iterable. They can be plugged into a for loop in this manner.

#

Lists are also iterable.

abstract needle
#
def bot_count(payload):
    start = int(payload[0])
    end = int(payload[1])
    if start > end:
        for i in range(start, end, -1):
        print(i)
    else if start < end:
        for i in range(start, end, 1):
        print(i)

bot_count(['10', '3'])
somber heath
#

!e py for fruit in ['apple', 'pear', 'orange']: print(fruit)

wise cargoBOT
#

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

001 | apple
002 | pear
003 | orange
somber heath
#

!rule 8

wise cargoBOT
#

8. Do not help with ongoing exams. When helping with homework, help people learn how to do the assignment without doing it for them.

somber heath
#
fruit = 'apple'
print(fruit)
fruit = 'pear'
print(fruit)
fruit = 'orange'
print(fruit)```
abstract needle
#

@valid lark

#

are you here?

somber heath
#

Thus, a for loop is an assignment operation that repeats.

#

Given a series of things to assign to.

#

and if you need, you can perform actions per assignment

#

Which you include in the indent of the for loop.

#

A for loop used like this creating an indented section.

#

A for loop used like this is known as a compound statement.

#

Anything that needs an indent like this is a compound statement.

#

def, for, while, if, elif, else, etc

abstract needle
#

@somber heath
I helped him out with the understanding of code and he is understood the values and functions

#

He is done with the work

#

cool man

somber heath
#

So long as it also achieves understanding.

abstract needle
#

Yes. he understands the code pretty well

#

I didn't give the code to him, but one line of new concept, like float string, and told him to implement it

upbeat bobcat
#

??

#

C++ aati ha?

#

@abstract needle

#

kya kar raha ha?

abstract needle
#

roblox

upbeat bobcat
#

nahi khail ta

abstract needle
#

ok

abstract needle
#

i am currently in a live stream

#

any ideas?

upbeat bobcat
#

channel

#

link

#

@abstract needle

abstract needle
#

hi

#

did you see?

upbeat bobcat
#

G

abstract needle
#

ggg

upbeat bobcat
#

😂

somber heath
#

@cobalt sequoia 👋

cobalt sequoia
#

Howdy

#

sorry I got anxious lol

#

Hello

somber heath
cobalt sequoia
#

sure thing

#

I joined yesterday and It needs 3 days

hexed garnet
#

Hmm

cobalt sequoia
#

wat

#

Obsessive is the worst

somber heath
#

@broken bronze 👋

broken bronze
#

helo

hexed garnet
#
def bot_count(payload):
    start = int(payload[0])
    end = int(payload[1])
    if start > end:
        for i in range(start, end, -1):
        print(i)
    else if start < end:
        for i in range(start, end, 1):
        print(i)

bot_count(['10', '3'])
#

Output

#

May

#

Error

rugged root
#

What's the error?

#

Actually wait

#

!e

def bot_count(payload):
    start = int(payload[0])
    end = int(payload[1])
    if start > end:
        for i in range(start, end, -1):
        print(i)
    else if start < end:
        for i in range(start, end, 1):
        print(i)

bot_count(['10', '3'])
wise cargoBOT
#

@rugged root :x: Your 3.12 eval job has completed with return code 1.

001 |   File "/home/main.py", line 6
002 |     print(i)
003 |     ^
004 | IndentationError: expected an indented block after 'for' statement on line 5
cobalt sequoia
#

!e

print("Hello world")
wise cargoBOT
#

@cobalt sequoia :white_check_mark: Your 3.12 eval job has completed with return code 0.

Hello world
rugged root
#

Oh, you just need to indent the prints

#

Currently they're on the same margin line as the for loops

hexed garnet
somber heath
#

My understanding is that the second element is a vector from the first.

hexed garnet
#

Write it simple bru

rugged root
#

Nothing wrong with that

#

Simple, clean, understandable

somber heath
#

Am I mistaken?

hexed garnet
somber heath
#

In which case you've got a logic error

hexed garnet
#

Bru it's may be written in a for loop

peak depot
rugged root
#

@coarse crater 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

hexed garnet
#

With much easy syntax and understable

somber heath
#

Is the goal to count from 10 to 13?

#

Or from 10 to 3?

peak depot
rugged root
#

@desert wasp Yo

dry jasper
rugged root
#

@coarse crater You can talk in here

hexed garnet
#

@rugged root

#

I think this code may be more simple

#

Wut about it?

rugged root
#

@coarse crater It won't let you use this one?

hexed garnet
#

Hemlock

coarse crater
#

ok

#

thank you

hexed garnet
#

Asking something

coarse crater
#

ok so basically

#

im retaking this thing

#

but the code im using is from like

#

last year

rugged root
coarse crater
#

so i just need some clarification

somber heath
#

@lone raptor 👋

coarse crater
#

does

#

length -1 need to be used in for loops

#

when appending

lone raptor
coarse crater
#

so like (birdNames.length - 1)

#

is descending?

#

my b i asked that wrong

hexed garnet
#

Simplest code I this world

coarse crater
#

yeah so i have an if statement that checks to see if the color parameter matches the birdColor[i]

#

i append

#

to my result list

lone raptor
#

how are you guys

rugged root
#
meats = ["ham", "pork", "beef"]
for i in range(len(meats) - 1):
  print(meats[i])
coarse crater
#

birdNames[i]

coarse crater
#

but that if statement is in a for loop]

rugged root
#

!e

meats = ["ham", "pork", "beef"]
for i in range(len(meats) - 1):
  print(meats[i])
wise cargoBOT
#

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

001 | ham
002 | pork
coarse crater
#

for (var i = 0; i < (birdNames.length - 1); i++)

hexed garnet
#

@rugged root can u tell me how to I write this code in this way

somber heath
#

@pliant jasper 👋

coarse crater
#

if (color === birdColor[i]) {

#

its javascript

#

sorry

coarse crater
#

not python

#

i use python usually

hexed garnet
#

Hmm @coarse crater can u tell

#

How to do like this

coarse crater
#

appendItem(resultList, birdNames[i]);
appendItem(imageResults, birdImages[i]);

hexed garnet
#

Which command

rugged root
#

Paul, give me a sec

coarse crater
#

that stuff

hexed garnet
whole bear
coarse crater
#

im just wondering why

#

we need to use

#

length -1

rugged root
#

Trying to remember

coarse crater
#

is it cuz length

#

is 1 more than index

#

cuz index includes 0

#

ok

#

alr tysm

#

yeah i figured cuz i did python a while back

#

and looks relatively the same so i just figured i could ask yall

#

cuz this server is more active

#

than javascript

#

alg

rugged root
#

@hexed garnet So are you just doing a countdown from one to the other?

#

!e

def bot_count(payload):
    start = int(payload[0])
    end = int(payload[1])
    if start > end:
        for i in range(start, end, -1):
            print(i)
    elif start < end:
        for i in range(start, end, 1):
            print(i)

bot_count(['10', '3'])
wise cargoBOT
#

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

001 | 10
002 | 9
003 | 8
004 | 7
005 | 6
006 | 5
007 | 4
rugged root
#

Oh there's a logic error

peak depot
#

bag = pussi, chef = kokki

hexed garnet
#

It's simple

#

Hmm what's difference

rugged root
#

It's in the second for loop

#

Oh nope

#

Right

#

Misread

#

Thought the -1 was in that one as well

#

Ignore the hem. It's counting down if the start is larger, up if it's smaller

#

I haven't had caffeine yet, apologies

#

I think that's the cleanest option

somber heath
#

Do you want 10 to 13 or 10 to 3?

hexed garnet
rugged root
#

The original one you have, the one I repasted/reran

hexed garnet
rugged root
#

There's ways to make it shorter, but it'd make it less clear

#

Yes

#

Oh god I just thought of something cursed

#

Hold on

somber heath
#

It needs to go into a def call, not a print call.

rugged root
#

The one I'm about to write is NOT recommended

karmic obsidian
#

by default a function returns None isn't it?

rugged root
#

Correct

somber heath
#

If nothing is specified otherwise.

rugged root
#

If no return is specified, it will return None

#

!e

test = ['10', '3']
start, stop = sorted(map(int, test), reverse=True)
for i in range(start, stop, -1):
  print(i)
wise cargoBOT
#

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

001 | 10
002 | 9
003 | 8
004 | 7
005 | 6
006 | 5
007 | 4
hexed garnet
peak depot
rugged root
#

What I have isn't very pythonic

#

Doesn't really fit the style of what you'd normally do in Python

#

Typically we want to shy away from map()

#

Not that it's not useful, but it's...

#

Trying to think of the word

peak depot
#

A data engineer's primary focus is on creating the right environment and infrastructure for data generation, including responsibilities such as building data pipelines, creating data models, and ensuring data quality through wrangling.

On the other hand, a data scientist interprets the generated data, making sense of insights provided by data engineers.

rugged root
#

Yeah I can't think of the word. Drinking tea now

karmic obsidian
#

Data Engineers are basically software engineers aren't they?

rugged root
#

Granted, take what I say with a grain of salt. I code as a hobby

hexed garnet
#

def code(n, n2):
while n > n2:
print(n)
n = n - 1
code(12, 4)

rugged root
#

I do IT professionally

hexed garnet
#

@rugged root

karmic obsidian
#

@whole bear hey are you doing a bootcamp or something?

karmic obsidian
#

I was just asking you bro! @whole bear

rugged root
#

But in general, since you know how many times something is going to happen, a for loop is better

whole bear
rugged root
#

for loops are for when you know that the loop has to happen a certain number of times, like when you're doing range(). while loops are better for when the number of loops is uncertain

#

Like making sure user input is valid or there's other conditions that have to be watched

karmic obsidian
#

I had one more question...
if there is variable inside for loop
something like...
c=0
for i in range(3):
c= c+ 1
print(c)

so the above code will create c object each loop right ?

#

how is your health @somber heath ?

whole bear
rugged root
#

I'd do this instead for the incrementing:

c += 1
karmic obsidian
rugged root
#

It would, yeah. And that's purely because integers are immutable

vocal basin
#

unlike strings

rugged root
#

Something I'm enjoying about Rust imports or import equivalent:

mod components;

use components::{
    dialogmodel::{DialogInput, DialogModel},
    headermodel::HeaderModel,
};
use gtk::prelude::{ApplicationExt, GtkWindowExt};
use relm4::*;
#

I like how easily you can chain and tier out the use

somber heath
rugged root
#

So like:

use components::{
    dialogmodel::{DialogInput, DialogModel},
    headermodel::HeaderModel,
};
use gtk::prelude::{ApplicationExt, GtkWindowExt};
use relm4::*;

mod components;
vocal basin
#

yeah
idk why the style guide says that but that's the way it is

rugged root
#

That feels weird, though

molten pewter
vocal basin
#

ig this:

extern crate ...;

use ...;

mod ...;
#

use is more logical to be near extern crate

#

and extern crate really should be at the top

rugged root
#
use gtk::prelude::{ApplicationExt, GtkWindowExt};
use relm4::*;

use components::{
    dialogmodel::{DialogInput, DialogModel},
    headermodel::HeaderModel,
};

mod components;
#

Or do you mean specifically ones with the extern keyword

vocal basin
#

no

#

extern crate is a separate thing

rugged root
#

Gotcha

vocal basin
#

self and super must come before any other names

use self::components::{
    dialogmodel::{DialogInput, DialogModel},
    headermodel::HeaderModel,
};

use gtk::prelude::{ApplicationExt, GtkWindowExt};
use relm4::*;

mod components;
#

brain pain

rugged root
#

That's going to take me a bit to get used to

#

I'm used to Python's:

built-in

pip installed

local 
vocal basin
#

for now I just let rust-analyzer auto-import however it likes

rugged root
#

Same

#

And let rustfmt deal with the rest

vocal basin
#

rustfmt has many import-related stuff but it's nightly

rugged root
#

Do they have when they're going to do the next major stable on the roadmap or something?

#

Because we're still currently on 2021 edition I think

vocal basin
rugged root
#

OH dude, okay

#

Something that's been pissing me off

vocal basin
#

2024 is in proposal stage I think

rugged root
#

So I don't know if this is specifically rust-analyzer or something weird in my Sublime, but I'm using the relm4 library, and when you're doing something like:

#[relm4::component]
impl SimpleComponent for AppModel {}

There's a bunch of expected functions and a macro in there. And the intelli-sense does show those and lets you tab complete them. But then it just eats half the code that's already there.

#

It's the strangest thing

#

Like it'll eat up current to 8 lines up

#

I have no idea why it's doing that

vocal basin
#

how does it look like

rugged root
#

I'll make a quickie example

molten pewter
rugged root
#

Oh of course, now that I'm talking about it, of course it's not doing it

vocal basin
#

maybe rust-analyzer got updated and you didn't notice

rugged root
#

Possibly

#

Although Sublime's pretty good about telling me when there's an update

vocal basin
#

I've seen it do worse:

fn method() \{
\}
#

on stable rust-analyzer

#

then I switched to experimental and there it was fixed

#

I never switched back to stable ever since

rugged root
#

I'm always worried it's because I'm using Sublime, but they have official support for it on the rust-analyzer site, so I don't think it's that

#

Fingers crossed it's just a fluke

formal bramble
#

whaaaaaaaaat

vocal basin
# vocal basin October 17th
  • prelude: Future and IntoFuture are added
  • -> impl Trait captures every lifetime in scope
  • public/private dependencies
  • remove implicit features
formal bramble
#

It happens actually, when the person you are talking to shows interest in the convo, it becomes a discussion rather than just you speaking

rugged root
#

Remove implicit features? Hold on can you toss a link?

formal bramble
#

I've seen interviewers doing something else while taking the interview which ruins it completely

rugged root
#

Interesting

still herald
#

Why do you guys think I need a psychiatrist?

#

Sometimes I think I'm a sociopath

still herald
rugged root
#

Because you have expressed concerns about your depression, about your ability to focus, about your anxiety. Concerns that you have said you don't think you're able to take care of on your own, that you admit prevent you from doing things that you enjoy or that you need to do

wind raptor
rugged root
#

That's why I recommend it

still herald
#

Am I not normal?

rugged root
#

There is no such thing as normal

#

The concern here is that you are having issues with things you need to do and want to do. This is something you have said here and have told me directly.

It's like saying someone who needs glasses isn't normal

still herald
#

I blame my country for this, I'm not educated about my mental health

rugged root
#

It's just something that they need in order to help them do things

still herald
#

Yeah

rugged root
#

And some people do need meds, some don't

#

There's nothing wrong with either

#

But getting help in order to help you figure out what works best for you is important

#

Taking that first step is the biggest thing

still herald
#

It's really hard to take the first step

#

Idk why

formal bramble
still herald
rugged root
#

What?

formal bramble
#

I'd like to be, yeah

still herald
rugged root
#

I...

#

What

formal bramble
rugged root
#

Beep bep

still herald
#

Let me just be weird and dumb for a while @rugged root

still herald
rugged root
#

@still herald What were you asking, sorry?

still herald
#

What is the difference between hybrid and remote locations?

#

I always get confused between two

formal bramble
#

Hybrid's remote and onsite both
Remote is just work from home

rugged root
#

Wait, hold on. @vocal basin So even if a function is marked as unsafe, you still need to wrap the line inside the function with another unsafe?

unsafe fn get_unchecked<T>(x: &[T], i: usize) -> &T {
  unsafe { x.get_unchecked(i) }
}
vocal basin
#

they want to make it so

#

to make unsafe fn mean only "this has extra safety preconditions"

#

not "this function asserts that preconditions for what it calls are met"

#

because right now it's both requirement for external code and promise to internal code

#
unsafe fn | unsafe trait
------------------------
unsafe {} | unsafe impl
rugged root
#

Interesting

tall ridge
#

I miss you folks, I have been AFK for a while.
I will be at pycon in Pittsburgh this week. Please say hello if you're there too.

rugged root
#

Hope you've been well! Been thinking about you, just keep forgetting to poke you to check in

tall ridge
#

Thank you, I've been busy resting, reflecting and doing family things. I noticed that I need more social interaction.

rugged root
#

Yeah it can make a huge difference

tall ridge
#

I'll send updates from pycon, cheers.

rugged root
#

Have fun!

gentle flint
#

Oudaen

rugged root
gentle flint
#

Muiden Castle (Dutch: Muiderslot, Dutch pronunciation: [ˌmœydərˈslɔt]) is a castle in the Netherlands, located at the mouth of the Vecht river, some 15 kilometers southeast of Amsterdam, in Muiden, where it flows into what used to be the Zuiderzee. It is one of the better known castles in the Netherlands and featured in many television shows set...

peak depot
short owl
#

needs archers

still herald
#

Guy's what's the difference between data mining and data profiting?

I've never seen a real example of data profiling

short owl
#

walks past coffee machine like its a stranger

short owl
#

there was a ANT on roof , it was fast view , along with the pool of water

rugged root
still herald
peak depot
#

Alarm system

gentle flint
still herald
rugged root
#

From what I found on google:

Data profiling is the process of examining the data available from an existing information source and collecting statistics or informative summaries about that data.

#

Data mining would be the actual collection and harvesting of data

short owl
#

nice and fancy - fresh ground coffee

still herald
short owl
#

lots of universities put their course outline , online with PDF books , at least chapters

still herald
#

Where do we find that stuff?

short owl
#

do you want knowledge or a piece of paper

#

LENOVO are scattered across many offices far and wide

stark river
short owl
#

a laptop is just a interface to click and view info then network it to a tower with real compute power

#

lack of motivation is a weakness

stuck furnace
short owl
#

you need a few terabytes of parts inventory to sort - show trends bla bla

stuck furnace
#

gtg

formal bramble
#

Which one did you order btw? @still herald

#

Laptop

still herald
#

Didn't ordered, will buy 1 out two tomorrow from the showroom

formal bramble
#

I see

short owl
#

get a laptop that you can swap hard drives easy , it will happen

#

@still herald

tacit swan
#

Brazil

alpine crow
#

So I highkey disagree w this article in general unless you’re talking abt UI

stuck furnace
# alpine crow Maybe for CS but every scientific study is quantitative basically

Yeah not necessarily an endorsement 😄 They were looking for things they could write about the pitfalls of data analysis. I actually agree with the article partially though. Statistics is often used poorly where qualitative research would have been fine. This is a nice quote at the end:

Yes, experts get better results than beginners from qualitative studies. But for quantitative studies, only the best experts get any valid results at all, and only then if they're extremely careful.

alpine crow
# stuck furnace Yeah not necessarily an endorsement 😄 They were looking for things they could ...

Next, we consider the science of psychology. Incidentally, psychoanalysis is not a science: it is at best a medical process, and perhaps even more like witch-doctoring. It has a theory as to what causes disease—lots of different “spirits,” etc. The witch doctor has a theory that a disease like malaria is caused by a spirit which comes into the air; it is not cured by shaking a snake over it, but quinine does help malaria. So, if you are sick, I would advise that you go to the witch doctor because he is the man in the tribe who knows the most about the disease; on the other hand, his knowledge is not science. Psychoanalysis has not been checked carefully by experiment, and there is no way to find a list of the number of cases in which it works, the number of cases in which it does not work, etc.

#

this quote is hilarious

#

from him

#

he is just saying there are way too many unknowns for psyschoanalysis to be considered science atm

#

We do not know what it means, or what change there is in the nervous system, when a fact is learned. This is a very important problem which has not been solved at all. Assuming, however, that there is some kind of memory thing, the brain is such an enormous mass of interconnecting wires and nerves that it probably cannot be analyzed in a straightforward manner. There is an analog of this to computing machines and computing elements, in that they also have a lot of lines, and they have some kind of element, analogous, perhaps, to the synapse, or connection of one nerve to another. This is a very interesting subject which we have not the time to discuss further—the relationship between thinking and computing machines. It must be appreciated, of course, that this subject will tell us very little about the real complexities of ordinary human behavior. All human beings are so different. It will be a long time before we get there. We must start much further back. If we could even figure out how a dog works, we would have gone pretty far. Dogs are easier to understand, but nobody yet knows how dogs work.

#

this was during like freudian psychology tho

#

it was pretty unscientific compared to today lol

#

its from these tho u prolly have seen them but free 2 year physics course from the QED GOAT himself

somber heath
#

@buoyant elk 👋

buoyant elk
#

hi

somber heath
#

@whole bear 👋

whole bear
#

Hi

#

I can't talk because I haven't reached the required number of messages.

#

I need some help.

#

class stack(object):
    
    __list = []
    
    def __init__(self):
        """  """
    def push(self, val):
        self.__list.append(val) 
    
    def pop(self):
        del self.__list[-1]
        
    def top(self):
        return self.__list[-1]
        
    def count(self, val):
        return self.__list.count(val)
        

class kToPy(stack):

    __list = []
    
    def __init__(self, *args, **kwargs):
        self.__txt = args[0]
        self.parser()
    
    def parser(self):
        """
            conver k string to python syntax
            
        """
        try:
            
            lines = self.__txt.strip().split("\n")
            
            for line in lines:
                st = "\t" * self.count("{") + line.strip()
                
                if "{" in st:
                    self.push("{")
                    st = st.replace("{", ":")
                    
                if "}" in st:
                    self.pop()
                    st = st.replace("}","")
                
                self.__list.append(st)
            self.execute()
            
        except Exception as e:
            print(e)
            
    def execute(self):
        """
            here will be the execution of your
            txt
        """
        
        li = self.__list
        st = "\n".join([i for i in li])
        return exec(st)
        


            
kToPy("""

def func(n){

    #global func
    
    if n in [1,2] {
        return 1
    }
        
    else {
        return func(n-1) + func(n-2)
        }
}

print(func(4))

""")


#

this is my parser to convert {} to python ident

#

but if u run this u will get error

#

!e


class stack(object):
    
    __list = []
    
    def __init__(self):
        """  """
    def push(self, val):
        self.__list.append(val) 
    
    def pop(self):
        del self.__list[-1]
        
    def top(self):
        return self.__list[-1]
        
    def count(self, val):
        return self.__list.count(val)
        

class kToPy(stack):

    __list = []
    
    def __init__(self, *args, **kwargs):
        self.__txt = args[0]
        self.parser()
    
    def parser(self):
        """
            conver k string to python syntax
            
        """
        try:
            
            lines = self.__txt.strip().split("\n")
            
            for line in lines:
                st = "\t" * self.count("{") + line.strip()
                
                if "{" in st:
                    self.push("{")
                    st = st.replace("{", ":")
                    
                if "}" in st:
                    self.pop()
                    st = st.replace("}","")
                
                self.__list.append(st)
            self.execute()
            
        except Exception as e:
            print(e)
            
    def execute(self):
        """
            here will be the execution of your
            txt
        """
        
        li = self.__list
        st = "\n".join([i for i in li])
        return exec(st)
        


            
kToPy("""

def func(n){

    #global func
    
    if n in [1,2] {
        return 1
    }
        
    else {
        return func(n-1) + func(n-2)
        }
}

print(func(4))

""")


wise cargoBOT
#

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

name 'func' is not defined
whole bear
#

if u make global
it will run with no error

#

!e


class stack(object):
    
    __list = []
    
    def __init__(self):
        """  """
    def push(self, val):
        self.__list.append(val) 
    
    def pop(self):
        del self.__list[-1]
        
    def top(self):
        return self.__list[-1]
        
    def count(self, val):
        return self.__list.count(val)
        

class kToPy(stack):

    __list = []
    
    def __init__(self, *args, **kwargs):
        self.__txt = args[0]
        self.parser()
    
    def parser(self):
        """
            conver k string to python syntax
            
        """
        try:
            
            lines = self.__txt.strip().split("\n")
            
            for line in lines:
                st = "\t" * self.count("{") + line.strip()
                
                if "{" in st:
                    self.push("{")
                    st = st.replace("{", ":")
                    
                if "}" in st:
                    self.pop()
                    st = st.replace("}","")
                
                self.__list.append(st)
            self.execute()
            
        except Exception as e:
            print(e)
            
    def execute(self):
        """
            here will be the execution of your
            txt
        """
        
        li = self.__list
        st = "\n".join([i for i in li])
        return exec(st)
        


            
kToPy("""

def func(n){

    global func
    
    if n in [1,2] {
        return 1
    }
        
    else {
        return func(n-1) + func(n-2)
        }
}

print(func(4))

""")


wise cargoBOT
#

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

3
whole bear
#

why i should use global

#

look at the same exec.
!e

def func(n):
    
    if n in [1,2] :
        return 1
    
        
    else :
        return func(n-1) + func(n-2)
        


print(func(4))



#

!e


def func(n):
    if n in [1,2] :
        return 1    
    else :
        return func(n-1) + func(n-2)
        


print(func(4))



wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     py 
004 |     ^^
005 | NameError: name 'py' is not defined
whole bear
#

!e


def func(n):
    if n in [1,2] :
        return 1    
    else :
        return func(n-1) + func(n-2)
        


print(func(4))



wise cargoBOT
#

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

3
whole bear
#

Am i alone ?🥲

#

ok

somber heath
#

@whole bear I'm wondering if it's to do with the sequence of how things run regarding exec.

#

Scoping, maybe.

#

Ah.

#

It might be to do with the scope.

#

kToPy.execute's

#

@graceful minnow 👋

whole bear
#

All I did was merge a bunch of texts into one text.

somber heath
#

returning the exec call looks a bit off, too, but I don't think that's the problem.

whole bear
#

i tried everything

#

!e


class stack(object):
    
    __list = []
    
    def __init__(self):
        """  """
    def push(self, val):
        self.__list.append(val) 
    
    def pop(self):
        del self.__list[-1]
        
    def top(self):
        return self.__list[-1]
        
    def count(self, val):
        return self.__list.count(val)
        

class kToPy(stack):

    __list = []
    
    def __init__(self, *args, **kwargs):
        self.__txt = args[0]
        self.parser()
    
    def parser(self):
        """
            conver k string to python syntax
            
        """
        try:
            
            lines = self.__txt.strip().split("\n")
            
            for line in lines:
                st = "\t" * self.count("{") + line.strip()
                
                if "{" in st:
                    self.push("{")
                    st = st.replace("{", ":")
                    
                if "}" in st:
                    self.pop()
                    st = st.replace("}","")
                
                self.__list.append(st)
            self.execute()
            
        except Exception as e:
            print(e)
            
    def execute(self):
        """
            here will be the execution of your
            txt
        """
        
        li = self.__list
        st = "\n".join([i for i in li])
        exec(st)
        


            
kToPy("""

def func(n){

    #global func
    
    if n in [1,2] {
        return 1
    }
        
    else {
        return func(n-1) + func(n-2)
        }
}

print(func(4))

""")


somber heath
#

Though if you wanted the function out of it, you'd want to return the created function.

wise cargoBOT
#

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

name 'func' is not defined
somber heath
#

!e ```py
def alpha():
exec("""
def f(v = 5):
print(v)
if v:
f(v-1)
""")
return f

f = alpha()
f()```

wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 11, in <module>
003 |     f = alpha()
004 |         ^^^^^^^
005 |   File "/home/main.py", line 8, in alpha
006 |     return f
007 |            ^
008 | NameError: name 'f' is not defined
somber heath
#

Hm.

#

@dim rivet 👋

dim rivet
#

not verified i tend to text less :sadge

somber heath
#

Oh well. 😁

dim rivet
#

yep

#

wut you guys doin

somber heath
#

I was just trying to wrap my brain around a corner of Python I don't usually deal with amidst distractions.

dim rivet
#

i see

#

what corner are you stuck at

somber heath
#

!e ```py
def alpha():
exec("""
def f(v = 5):
print(v)
if v:
f(v-1)
""")

alpha()
f()```

wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 11, in <module>
003 |     f()
004 |     ^
005 | NameError: name 'f' is not defined
somber heath
#

Just the particulars of how exec thinks.

#

Because above person has an issue.

#

Let's have a crack at eval.

dim rivet
#

local scope issue

brisk bridge
#

hi

somber heath
#

Yeah, that's kind of what I was thinking.

dim rivet
#

yep

somber heath
#

!e py def f(v = 5): print(v) if v: f(v-1) f()

wise cargoBOT
#

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

001 | 5
002 | 4
003 | 3
004 | 2
005 | 1
006 | 0
somber heath
#

@keen citrus 👋

#

Maybe if I was on the desktop.

keen citrus
dim rivet
somber heath
#

Mhm.

dim rivet
#

😔

keen citrus
#

What to do for voice verification?

#

@somber heath

#

@dim rivet

somber heath
dim rivet
#

ig the voice verification didnt used to be there 2 years back

#

cause i used to join the vc

keen citrus
#

Same

#

Now the things have changed

dim rivet
#

yepp

#

the amount of beginners on tech servers is more and they tend to have lack of patience so yeah it makes sense

#

what is @night sparrow doing?

#

ok got it

#

got it

#

i tired digging into ML but did not get much time. Had a surface level knowledge want to continue but currently focusing on job hunting.

#

what are you learning @somber heath

#

xD

#

ic

#

+1

#

understandable

#

the situation of current job market is cooking my brain

#

true

#

whats the temp?

#

its 42 here lmao

#

did autralia had rains?

#

a few years back i saw a news that it did not rain for a couple of years

#

there

#

true

#

bye

dim rivet
#

local scope issue

whole bear
#

ok

dim rivet
#

we have ACs for years now

#

the temp keeps rising

#

yepp

#

the RCFCs

#

but people want a quick sol to the heat which is AC

#

you asking me?

slate marten
#

@night sparrow it is from junji ito manga

dim rivet
#

india

#

i see

#

yeah it is kind of similar in the nothern part of india

slate marten
#

@night sparrow could u help me with one python code?

#

this regarding leap year

#

to check whether the year is leap year or not

dim rivet
#

yeah

#

send the code

slate marten
#

#Leap year

year = int(input("Enter the current year:"))

if year % 4 ==0 and year % 100 != 0 and year % 400 != 0:
print(f"{year} is a leap year")
else:
print(f"{year} is not a leap year")

#

is it valid?

#

yes in anime

#

but the anime quality is not so good

dim rivet
#

you can use the doctype

#

to send code snippets

slate marten
#

doctype?

dim rivet
#

triple (`)

slate marten
night sparrow
#

!e

year = 2000

if year % 4 ==0 and year % 100 != 0 and year % 400 != 0:
    print(f"{year} is a leap year")
else:
    print(f"{year} is not a leap year")
wise cargoBOT
#

@night sparrow :white_check_mark: Your 3.12 eval job has completed with return code 0.

2000 is not a leap year
slate marten
#

is this a valid/correct way to write the code

dim rivet
#

yes

#

no prob in the code maybe you can make it a func to

#

make it cleaner

#

yeah but there are some conventions which youll have to follow in an organization