#voice-chat-text-0

1 messages ยท Page 548 of 1

primal shadow
#

I bet it is much easier to teach people who know German German

#

I walked awya agaiin!

thick cradle
#

greeks are now gonna work 13 hours

#

so next time you call us lazy think of this

amber raptor
#

Are we doing DuoLingo in here?

calm ginkgo
#

no idea

amber raptor
#

What in FinnSpanish is this?

wind raptor
#

!stream 874027855674216528

wise cargoBOT
#

โœ… @red solar can now stream until <t:1762533832:f>.

primal shadow
#

cannot be punished for refusing?

thick cradle
#

Well not all companies are gonna establish that

primal shadow
#

Establish what?

#

The law ALLOWS overtime, up to 150 hours a year

#

so 37 13 hour shifts a year

#

is the limit

haughty pier
mossy glade
#

karhunkierros

feral wadi
#

hallo guys

#

btw, where are u from guys??

vocal basin
#

I have still have the "not a wine" in the bridge

#

@peak depot "data witchery"

#

canonically this old

#

possibly negated and modulo'd

#

only year it works in

#

@peak depot we have that here

#

beertap implemented via delivery people

dry jasper
#

Begin 2020 werd Alfred lead agency van Affligem en lanceren we de eerste landelijke campagne voor Affligem in Nederland.

De nieuwe campagne ontvouwt de ontstaansgeschiedenis van het biermerk, afkomstig uit het gelijknamige plaatsje in Vlaanderen. Een verhaal over een groep ridders die in 1074 het zwaard neerlegde en besloot hun leven te wijden...

โ–ถ Play video
lethal rune
#

How do you specify IP address in python mysql connectivity?

#

mysql.connector()

wise cargoBOT
#
No way, Josรฉ.

No documentation found for the requested symbol.

lethal rune
#

Help help

vocal basin
#

ugh

#

not indexed

lethal rune
#

Uh

mossy glade
lethal rune
#

Do we just specify the ip instead of localhost?

#

That's it?

lethal rune
#

Help

vocal basin
lethal rune
primal shadow
#

Mmmm cheese

lethal rune
#

But it's showing some error

#

ConnectionError

primal shadow
#

Some cheeses

vocal basin
#

what are the details of the error?

lethal rune
primal shadow
#

they use lemon juice to separate the milk

vocal basin
#

are you specifying host="127.0.0.1"?

#

or some remote one?

lethal rune
lethal rune
#

Connected to same wifi

vocal basin
#

if you want to connect from one computer to another, you need to specify the IP that's within the network, not local

#

(if that's what you're trying to do)

lethal rune
#

It's connected to the same wifi

vocal basin
#

ip addr on Linux, ipconfig on Windows

#

it will somewhere in there show 192.168.1.<something> likely

#

which is the local address for the network

vocal basin
lethal rune
#

Let me try

#

Uh...

#

You don't have to say ; in python right?

#

When u specify query in cursor?

vocal basin
#

you mean inside the SQL query?

heavy zenith
#

cursor

#

ai I think

vocal basin
#

no

lethal rune
#

But in python

vocal basin
#

if it's a single statement, ; is optional iirc

#

because, given the context, it knows where the query ends

lethal rune
#

When we type in cursor idk should we use or no

vocal basin
#

try both options; iirc both options work

#

I usually do SQL queries from Rust not Python, and there I omit ; always

#

, however I do SQLite and PostgreSQL, so idk, maybe MySQL requires it

vocal basin
#

not inside sqlx::query!

lethal rune
#

But in lua and all I've nver used it

#

Idk if the same goes for python

#

Wait...

vocal basin
#

in Python itself, not SQL, ; is generally considered a bad pattern

lethal rune
#

Yep

#

Got it

#

Connected!

#

Are there any designers in this server?

vocal basin
#

@peak depot this argument strategy is called "ad drunkium"

peak siren
lethal rune
#

If any graphic designers in this server especially for games please dm me

vocal basin
#

I assumed the "is ; needed" came from prior interactive CLI usage

primal shadow
#

I only want the bad ones

dry jasper
#

Kees

willow light
primal shadow
#

Pro Surfer?

#

Dream job right there

willow light
primal shadow
#

There's no question about it, living here is unsafe.

#

๐Ÿคฃ

#

Free to be detained by the government.

#

Free to pay taxes

#

(or be detained by the government)

#

Free to overpay for healthcare

#

Freedumb

#

love it

willow light
primal shadow
#

I don't see those as opposite sides, they can both be true

#

a better world is possible, but we're gonna maintain the course of we're fucked instead

willow light
primal shadow
#

People are talking it seems

amber raptor
#

Chaos? You rang?

primal shadow
#

is it time to go home yet?

#

Bah

amber raptor
willow light
#

Cracked open a cold one to join the alcohol

primal shadow
#

Just get the bot to bytecode hello world

#

to show the people

wind raptor
#

!d dis

wise cargoBOT
#
dis

Source code: Lib/dis.py

The dis module supports the analysis of CPython bytecode by disassembling it. The CPython bytecode which this module takes as an input is defined in the file Include/opcode.h and used by the compiler and the interpreter.

willow light
#

dis nut

primal shadow
#

"great idea" no

wind raptor
#

!e

import dis

def greet(name):
    return f"Hello, {name}!"

dis.dis(greet)
wise cargoBOT
primal shadow
#

I would not recommend that

#

Possible but doesn't make sense.

amber raptor
#

Node, Golang, Java, .Net

willow light
#

!e

import dis

dis.dis(print("deez nuts"))
wise cargoBOT
# willow light !e ```py import dis dis.dis(print("deez nuts")) ```

:x: Your 3.14 eval job has completed with return code 1.

001 | deez nuts
002 | Traceback (most recent call last):
003 |   File "/home/main.py", line 3, in <module>
004 |     dis.dis(print("deez nuts"))
005 |     ~~~~~~~^^^^^^^^^^^^^^^^^^^^
006 |   File "/snekbin/python/3.14/lib/python3.14/dis.py", line 96, in dis
007 |     distb(file=file, show_caches=show_caches, adaptive=adaptive,
008 |     ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
009 |           show_offsets=show_offsets, show_positions=show_positions)
010 |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/6S2KWRA44L7YOBDUMODNFDQDSY

willow light
#

oh

primal shadow
#

Who writes both Python an Assembly

#

as like... a single program

#

It feels like very different domains

willow light
#

you could if you want

primal shadow
#

I know oyu can

#

but I work in reality, not theory

willow light
#

micropython maybe?

primal shadow
#

xy problem?

#

Assembly is for us to read

#

Machine code is for the machine

willow light
#

everything other than machine code is an abstraction

#

RIP jython

#

you will probably not be missed

#

(seriously is there anyone on this planet who actually wants to be able to use SpringBoot in Python?)

primal shadow
willow light
primal shadow
#

Yea, I bet

#

but as I like to say, fuck Larry Ellison

willow light
#

That's fair.

primal shadow
#

So fuck Oracle, and therefore, fuck Java

willow light
#

Java has some good parts now, though.

primal shadow
#

Ok

#

Fuck Java

willow light
#

Well, the JVM itself is fantastic. I love the JVM. Java itself, though, is a dumpster fire on a good day.

primal shadow
#

๐Ÿ™‚

willow light
#

The JVM brought us good things like Kotlin, Groovy, Clojure, and Scala.

primal shadow
#

You call them good things, I call them spawns of Java

willow light
#

Kotlin is genuinely good.

primal shadow
#

Some people consider Satan good, so spawns of Satan are good to them

willow light
#

Kotlin is good because it forces enterprise to write (relatively) readable code.

primal shadow
#

I don't mind Satan, seems like there's a neat temple all about him

upper basin
#
@contextmanager
def fast_append(self):
    
    if self._fast_append:
        yield
        return

    self._fast_append = True
    try:
        yield
    finally:
        self._fast_append = False
willow light
#

My brother is a Product Owner at a solar tech startup in Maine.

#

I just want to write code dude. I don't want to work on fucking yaml. I want to write python. I'll write Java if I'm paid to.

willow light
#

And in the same time zone as more than 50% of my team. For once.

primal shadow
#

Yep, I would never touch Java unless forced by an employer

#

fts

astral marlin
#

@willow light I suppose that's where some of the ops comes - I get to write python on a regular basis, but as a small company my (+1) team and I are also responsible for infrastructure operations

#

not business ops

vocal basin
#

we have C# banned and Java silently ignored at work

#

AbstractFactoryn't

timid quartz
#

chris did u answer what i asked yesterday i forgot

vocal basin
#

Told Inefficiencies ๐Ÿš€

willow light
timid quartz
#

@wind raptormr chris

willow light
#

"If we are going to be using GitHub Enterprise for our repos, why aren't we using GitHub Actions for our CI/CD pipelines?"

"Because Jenkins has the highest market share."

#

It's the exact same reason they gave for why we're developing all of our software on windows dev environments for linux prod environments.

#

Market. Share.

primal shadow
#

Die Hard 3 was fun

#

Live Free or Die Hard

shadow folio
#

!voice

willow light
#

For context, I live in Nashua (near the top left of the map)

vocal basin
primal shadow
upper basin
#

We all know he said Giggity

#

I'm not crazy

primal shadow
#

Did you jsut say 90% of our houses don't have insulation?

#

Code requires insulation...

vocal basin
#

heat or electricity?

primal shadow
#

Firewalls?

#

Yes we do

vocal basin
#

the other w3schools

primal shadow
#

I guess satire is art..

#

so I suppose

vocal basin
#

but

#

it's surreal enough to qualify

primal shadow
#

Ah so AI slop

vocal basin
#

no AI

willow light
#

The best I saw was the volume control where you type in the volume percentage, but you couldn't use the same number as someone else in the world.

vocal basin
#

or, like, severely mishandled GPT2

#

I don't think AI is advanced enough for this

primal shadow
#

If it hasn't come crashing down, why would I spend money to maintain it?

#

No, the problem with america is greed

#

full fuckign stop

#

greed

#

from the top to the bottom

#

too much goddamn greed

willow light
#

The Dwight D Eisenhower Infrastructure Highway Act would like to have a word.

primal shadow
willow light
primal shadow
vocal basin
willow light
primal shadow
#

Looks like they started a lot of rail in the 1900's

#

so that argument falls flat

#

on its face

#

Early 1900's

primal shadow
#

the east coast rail

vocal basin
#

very rare case where that website starts with Hello World instead of having it in the middle of the tutorial

primal shadow
#

They appear to spend on upgrades

#

America refuses to spend on infrastructure until catostrophic failure

#

it's fucking stupid

#

yes, America stupidity got us here

willow light
#

incorrect.

primal shadow
#

Absolutely fucking idiotic to think we don't need to maintain our infrastructure

#

we are fucking morons

willow light
#

Ronald Reagan got us here

#

America used to invest heavily in infrastructure

primal shadow
#

I can't just blame Reagan

#

He might have pushed things down, but we never picked it back up

#

Just like wecan't blame Obama for today

#

's problems

#

we can't keep blaming the past for the failures of what was chosen to happen after

willow light
#

Ronald Reagan instituted the economic policy that prevented us from having the ability to invest in the future ever again

primal shadow
#

We can't invest in the future?

#

Really?

#

lol

#

Not with that attitude

#

The US is going full communist, we're grabbing up shares of public companies

#

And the republicans are CHEERING

willow light
#

bro has no idea what communism is

primal shadow
#

The government owning hte means of production, no?

vocal basin
#

full "communist" (as implemented by the Soviets)

#

oligarchy

willow light
#

the soviet model wasn't communism, that was oligarchy

primal shadow
#

I always thought it was kleptocracy

vocal basin
primal shadow
#

yea

vocal basin
#

modern Russia is closer to kleptocracy

willow light
#

the current us government is heading in the direction of an fascist oligarchy

primal shadow
#

economic systems are not government systems

vocal basin
#

despite the internal stereotypes

primal shadow
#

America is all about the low education

#

our president LOVES the uneducated

willow light
#

fascism is the us government, communism is the opposite. it is an extreme, but the opposite one.

primal shadow
#

THey are votign against hteir interests becuase they're idiots

#

They are voting for hteir hate

#

not realizing their hate is gonna shoot them in the fucking face

#

it is a too stupid to understand

#

100%

#

why poor people vote republican

#

they are hateful fucking morons

#

Vote for the former democrat billionaire, because he's gonna look out for me

#

๐Ÿคฃ

#

the mental gymnastics are olympic level

#

What/

#

The jan 6 failed coup

willow light
#

@primal shadow step away from the keyboard and take a deep breath for three entire seconds. hold it for three entire seconds. let it out for six entire seconds. hold for three entire seconds. repeat four times. do not post anymore messages on here until you have done so.

primal shadow
#

And then the president pardoned them

willow light
#

and unclench your jaw

primal shadow
#

jaw was never clenched, heart rate and breathing normal

#

thanks for the advice

willow light
#

you are clearly agitated, and your mental state will suffer in the long run if you do not take breaks.

primal shadow
#

I am disagreeing with you, and that upsets you

#

sorry

#

I believe what I belive, you believe what you believe ๐Ÿ™‚

#

we can coexist and disagree

willow light
#

the only thing that upsets me is the fact that you are clearly suffering, and you're refusing to take steps to alleviate that suffering

primal shadow
#

I don't need to clench anything to do so

primal shadow
willow light
#

people are hurting, and the hurt will only get worse

#

we need to hold each other up, not tear each other down

primal shadow
vocal basin
#

I couldn't find anything outstandingly funny in the Dart tutorial(

primal shadow
#

Fuck the Nazis

willow light
#

You are suffering.

primal shadow
#

You just find excuses for em

willow light
#

At what point did I make excuses for them?

#

Point to the exact message

primal shadow
#

I say they are a lost fucking cuase

willow light
primal shadow
#

I'm sitting here tearing down nazis, I guess I misinterpreted your intentions

vocal basin
primal shadow
#

when you asked me not to tear people down

willow light
#

I said we need to hold each other up, not tear each other down. I'm trying to hold you up, and you're trying to tear me down.

vocal basin
#

@willow light look, new language entering into the market

primal shadow
#

Wooo, quittin time

willow light
vocal basin
willow light
#

Just use Octave, it has the same syntax, reads the same files, and is free.

vocal basin
#

... this is just copy-pasted there for each language seems like

willow light
#

Or just use Python. NumPy and Matplotlib were designed to be easy to learn for Matlab users.

willow light
#

yikes

vocal basin
#

such a collection of "what"

#

okay I should probably send something other than what I sent before

vocal basin
willow light
vocal basin
#

that's not just an underline, that's emoticon crying

#

@willow light and The French kept an extra one for themselves

#

come to Russia, grass here isn't green, it's grey

#

it's all grey

#

@willow light only white during winters (August to May)

#

@willow light Kamchatka and its half a road

#

flights to the nearest city more expensive than international ones

#

Altai?

willow light
vocal basin
#

no

#

Altai are shared with China

#

Verkhoyansk Range

#

whatever country it is by then

#

@willow light seemingly the story location (Stalker, movie) is unspecified, and the filming location is no longer Russia

willow light
#

Ingush towers (Ingush: ะณำ€ะฐะปะณำ€ะฐะน ะณำ€ะฐะปะฐัˆ/ะฒำ€ะพะฒะฝะฐัˆ, romanized: ghalghai ghฤlash/vhรณvnash) are medieval Ingush stone structures used as residences, signal posts, and fortifications. Most are found in the Sunzhensky and Dzheyrakhsky Districts of Ingushetia, North Caucasia.
Tower-building in the North Caucasus originated as early...

vocal basin
#

โœ… horse garage included

#

@willow light to... intimidate bears?

willow light
vocal basin
willow light
mossy glade
#

Chargoggagoggmanchauggagoggchaubunagungamaugg

willow light
primal shadow
#

lol tech bro

#

have not heard that one before

#

Been called many things

#

I think girl dad is a much more fitting label.

#

which is quite the opposite of a tech bro

willow light
#

Insufferably smug? Check.
Unable to comprehend the minds of rural northeasterners? check.
Overreliance on technology? check.
overreliance on the internet? check.
discounts lived experience in the face of "reports"? check.

primal shadow
#

I GREW UP IN THE NORHTEAST

#

el oh motherfucking el

#

MY WHOLE LIFE

#

in the northeast

willow light
#

and yet you're acting and talking like a california douche

primal shadow
#

literally

willow light
#

or worse

primal shadow
#

Well, not quite literally, but practically and for all intents and purposes

willow light
#

someone from New York

primal shadow
#

nope

#

visited there a few times, NYC is not for me, saw the eclipse in upstate

willow light
#

either way, a reliance on infographics and reports is no substitute for ground truth.

#

and regardless, I need to make dinner.

primal shadow
#

Relying on reports for statistics about home ownership vs rentership?

#

Yes yoiu seem to quote your "brother lives there and reads reports"

#

or something along those lines

#

I'm confused why your reports are valid, and my reports from the city we're discussing are not

willow light
#

I quote "my brother lives there"

primal shadow
#

That was your source of 60%+ rent

#

Whereas I found a government report that called rentership steady at 47%

#

And I'm finding bad sources

#

I get it

#

I'm wrong

#

no one owns a home in Portland

#

there are no homes

#

just inflated frogs live there now

#

I saw a video

willow light
#

And now you're putting words in my mouth again.

primal shadow
#

it was horrifying, dancing frogs in the streets

#

How?

#

I'm stating all this

#

Where did I say you said a thing?

#

Otrher than when I said you said your brother told you the info you were sharing

#

I said frogs took over the city

#

Not you

#

I said home ownership is 0%

#

I didn't make any claim you said either of those

willow light
#

Tell you what, let's make a pact. Both of us stay off the internet entirely for an entire week.

#

We need this for our mental health.

#

Also no news.

primal shadow
#

I simply conceded my original government report based argument, and now and arguing the other side.

#

based on nothing at all

willow light
#

Just the forest.

primal shadow
#

other than what I've imagined

#

which is to say you're wrong

willow light
#

Because arguing will get us nowhere.

primal shadow
#

its' not 60%

#

it's 100%

#

and it's all frogs

#

That's my argument now

#

I'm for that, I need tro convince you it is true

willow light
#

Look I don't want to fight anymore. I just want to relax. I want to chill. There's too much fighting in this world. Believe what you want. Just relax.

primal shadow
#

The government is trying to get a handle on the situation

#

but they cannot

warped crystal
#

READING

#

A BOOK

#

WHQT

#

Lmao

willow light
#

I really hope you get the help you need.

#

No one deserves to be suffering.

primal shadow
#

lol

#

You have a fine day

#

Watch out for the frogs if you go to the PNW

willow light
#

wtf

#

Portland is in Maine

primal shadow
#

lol

#

too funny

willow light
#

I've been talking about portland maine this whole time. in fact, you joined in on a conversation about maine, and hijacked a conversation about maine, which you verbally acknowledged was a conversation about maine.

primal shadow
#

but we were then talking about portland

#

๐Ÿคท

willow light
#

yes, we were talking about portland.

#

portland maine.

#

the original portland.

#

incidentally, the only major city in maine.

primal shadow
#

The Isle of Portland is a tied island, 6 kilometres (4 mi) long by 2.7 kilometres (1.7 mi) wide, in the English Channel. The southern tip, Portland Bill, lies 8 kilometres (5 mi) south of the resort of Weymouth, forming the southernmost point of the county of Dorset, England. A barrier beach called Chesil Beach joins Portland with mainland Engla...

#

Original you say

willow light
#

like i said i really hope you get the help you need.

primal shadow
#

haha

#

thanks

willow light
#

compulsively gainsaying everything is not healthy

primal shadow
#

I appreciate your good vibes

#

Nothing can save me from my thirst for the truth, but I appreciate your hope for the curse to pass

#

I don't see it happening though

#

doesn't look like rentals are 60% though

#

unless there's 106.7% houses in Portland

#

I just โค๏ธ facts

#

if you think that makes me more wrong than those who prefer the untruth go unchecked, I don't wanna be right (lies, I love the truth, I'll even admit when I'm wrong)

#

which is why I was compelled to figure out homeownership in Portland Maine

#

Or any other location (in the US) with that convenient untrustworthy government website

#

Interestingly, overall Maine is significantly more owner occupied than the country.

#

but cities will often have more multi family housing due to space constraints

whole bear
#

Hey

#

Let me check

#

Oh I have to be in the server for 3 days

#

sure

#

Not really no question

#

Thanks man

#

For a few years now haha

#

Yeah

#

looking for community

#

Communty around data science / coding

#

Right

#

Home ownership sounds good

#

haha

#

Where I'm from its pretty tough

#

Owning a house

#

yeah

#

You guys based in the US ?

willow light
#

I used to think that chasing facts would make me happy. It only made me more miserable, as addictions are wont to do. I gave it up, and I'm much happier and healthier now.

#

Now? I'd much rather be happy than right.

#

Think on it, dude.

#

I don't want you to suffer the way I once did.

whole bear
#

In Hungary where I'm based now, its possible to buy a house with a mortgage but its not accessible to everyone

willow light
#

No one deserves that.,

whole bear
#

So what you guys do ?

#

Software engineering ?

primal shadow
whole bear
#

Damn you guys talks in trillions hahha

#

I got feeling that nearly everyone in US have loads of debt

#

why nigeria ?

#

What does the US have to do with nigeria lol ?

primal shadow
#

๐ŸŒŠ

vocal basin
primal shadow
vocal basin
#

presumably, propelling downwards is seen as an unnatural state for a rocket to be in

cursive quiver
#

I got hacked y'all

#

๐Ÿ˜ญ

primal shadow
#

๐Ÿ™

cursive quiver
#

Yeh the hackers sent everyone in my dms a crypto scam

wise loom
#

I have a question. Is there ever the case that large projects are split into pieces such that SMEs are employed by different companies so no single one company can exercise tactical/strategic moves that would endanger/halt the progress of the project.

#

As I read about AI it seems the devs for different tools are spread across FAANG. The PyTorch dev worked for Meta in the past 11 years.

vocal basin
#

severely mediocre engineers?

#

from random NIH-published paper

#

though these mostly seem to study plant-based diets not full vegan stuff

wise loom
#

Meta projected 10% of 2024 revenue came from scams and banned goods, Reuters reports

#

Meta the scam company

vocal basin
#

... and then another study suggests it's meat that correlates with life expectancy

#

science being weird and not all-agreeing, as usual

#

tbf, in case of meat, this is usually just a result of a common cause:
if you're poor, then you have low life expectancy
if you're poor, then you eat less meat

#

(within the same region)

#

idk if they account for that

woeful blaze
#

!e

Health_potion = {"NAME" : "health potion",
                 "HEALS" : 69,
                 "WEIGHT" : 1.5,
                 "COLOR" : (255,0,0,50)}

print(Health_potion["COLOR"])
wise cargoBOT
somber heath
#

Slice.

#

!d slice

wise cargoBOT
#

class slice(stop, /)``````py

class slice(start, stop, step=None, /)```
Return a [slice](https://docs.python.org/3/glossary.html#term-slice) object representing the set of indices specified by `range(start, stop, step)`. The *start* and *step* arguments default to `None`.

Slice objects have read-only data attributes `start`, `stop`, and `step` which merely return the argument values (or their default). They have no other explicit functionality; however, they are used by NumPy and other third-party packages.
somber heath
#

!e py print("abcdefghijklmnop"[:10]) print("abcdefghijklmnop"[10:])

wise cargoBOT
somber heath
#

!d str.maketrans

wise cargoBOT
#

static str.maketrans(dict, /)``````py

static str.maketrans(from, to, remove='', /)```
This static method returns a translation table usable for [`str.translate()`](https://docs.python.org/3/library/stdtypes.html#str.translate).

If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters (strings of length 1) to Unicode ordinals, strings (of arbitrary lengths) or `None`. Character keys will then be converted to ordinals.

If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in *from* will be mapped to the character at the same position in *to*. If there is a third argument, it must be a string, whose characters will be mapped to `None` in the result.
somber heath
#

!d str.translate

wise cargoBOT
#

str.translate(table, /)```
Return a copy of the string in which each character has been mapped through the given translation table. The table must be an object that implements indexing via [`__getitem__()`](https://docs.python.org/3/reference/datamodel.html#object.__getitem__), typically a [mapping](https://docs.python.org/3/glossary.html#term-mapping) or [sequence](https://docs.python.org/3/glossary.html#term-sequence). When indexed by a Unicode ordinal (an integer), the table object can do any of the following: return a Unicode ordinal or a string, to map the character to one or more other characters; return `None`, to delete the character from the return string; or raise a [`LookupError`](https://docs.python.org/3/library/exceptions.html#LookupError) exception, to map the character to itself.

You can use [`str.maketrans()`](https://docs.python.org/3/library/stdtypes.html#str.maketrans) to create a translation map from character-to-character mappings in different formats.

See also the [`codecs`](https://docs.python.org/3/library/codecs.html#module-codecs) module for a more flexible approach to custom character mappings.
somber heath
#

!d ord

wise cargoBOT
#
ord

ord(character, /)```
Return the ordinal value of a character.

If the argument is a one-character string, return the Unicode code point of that character. For example, `ord('a')` returns the integer `97` and `ord('โ‚ฌ')` (Euro sign) returns `8364`. This is the inverse of [`chr()`](https://docs.python.org/3/library/functions.html#chr).

If the argument is a [`bytes`](https://docs.python.org/3/library/stdtypes.html#bytes) or [`bytearray`](https://docs.python.org/3/library/stdtypes.html#bytearray) object of length 1, return its single byte value. For example, `ord(b'a')` returns the integer `97`.
somber heath
#

!d chr

wise cargoBOT
#
chr

chr(codepoint, /)```
Return the string representing a character with the specified Unicode code point. For example, `chr(97)` returns the string `'a'`, while `chr(8364)` returns the string `'โ‚ฌ'`. This is the inverse of [`ord()`](https://docs.python.org/3/library/functions.html#ord).

The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in base 16). [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) will be raised if it is outside that range.
somber heath
#

The % operator as it applies to objects of type int.

#

!e py for i in range(-4, 5): print(i, i % 4)

wise cargoBOT
wise loom
#

@primal shadow is Kumiko the treasure hunter a tragedy or a comedy?
(the movie)

primal shadow
#

never heard of it

somber heath
#

!e py trans = str.maketrans("abc", "ABC") text = "cake, bananas and apples" result = text.translate(trans) print(text) print(result)

wise cargoBOT
somber heath
#

!e py trans = str.maketrans({"a": "AaA", "b": "BbB", "c": "CcC"}) text = "cake, bananas and apples" result = text.translate(trans) print(text) print(result)

wise cargoBOT
somber heath
#

!e py trans = str.maketrans("abc", "bca") text = "cake, bananas and apples" result = text.translate(trans) print(text) print(result)

wise cargoBOT
somber heath
#

ord and chr?

sleek rampart
#



sclh = ""

# begin

print("Este programa trabalha com a Cifra de Cรฉsar")
print("Deseja cifrar ou decifrar uma mensagem?")
escolha = input("(Digite 'c' para cifrar, e 'd' para decifrar): ")

while escolha.lower() != "c" and escolha.lower() != "d":
    print("Esta nรฃo รฉ uma opรงรฃo vรกlida.")
    escolha = input("(Digite 'c' para cifrar, e 'd' para decifrar): ")
    
if escolha.lower() == "c":
    sclh = "CIFRAR"
    
if escolha.lower() == "d":
    sclh = "DECIFRAR"
    
print("Escolha: " + sclh)

# input cypher

msg = input("Agora digite sua mensagem: ")

comprimento = len(msg)

print("Quantidade de caracteres: " + str(comprimento))

# convert msg string to int array

alfabeto = "abcdefghijklmnopqrstuvwxyz"
msgnum = [ ]


# for i position in length of msg...

for i in range(comprimento):
    
    # if letter in position i of msg equals letter in position i of alphabet...
    
    if msg[i] == alfabeto[i]:
        
        # then create an array of integers and add i++
        
        msgnum.append(i + 1)
        i = i + 1
        


somber heath
#

!e py print(10 <= 15 <= 20) print(10 <= 25 <= 20) print(10 <= 5 <= 20)

wise cargoBOT
somber heath
#

!epy print(15 in range(10, 21)) print(25 in range(10, 21)) print(5 in range(10, 21))

wise cargoBOT
craggy vale
viral knot
viral knot
#

or ASIC

#

ofc you cannot afford ASIC

craggy vale
viral knot
#

but FPGA deft save on you powerbill ovee GPUs... but its quite a lot slower

#

and i mean a LOT slower

craggy vale
#

can it train ai model ?

viral knot
#

yes but you have to program the circits yourself

#

my guy

craggy vale
#

okay np

viral knot
#

you're talking months of runtime

#

over a GPU which might only be a few days

craggy vale
#

hmm okau

viral knot
#

you're wellcome

whole bear
#

yo

viral knot
#

tbh i just want my own $60,000 FPGA

#

but i cant afford

#

๐Ÿ˜ญ

#

we just have the wait for the tech to mature

craggy vale
#

๐Ÿ˜ that ๐Ÿฅฒ

#

I have better stuffs my on ai cpu

primal shadow
viral knot
#
#

the above is probably a decent intermediate board

#

i personally would see if i can program it to crack hashes

#

it uses an AMD manufactured chip aparently

#

this kind of shit blows my fuckin mind man

#

and its only gunna get better and cheaper

craggy vale
#

hmm

#

can it train full chatgpt 4 model ?

#

?

molten wagon
#

yo

#

what is somthing cool i can make in python

#

btw i am new to it so i dont know much

somber heath
#

!kindling

wise cargoBOT
#
Kindling Projects

The Kindling projects page contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

molten wagon
#

is python good for making AI bots

molten wagon
molten wagon
primal shadow
#

gotta talk to us

#

with the keyboard

#

before you use the voice

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.

molten wagon
#

i want to make a Jarvis i can talk to

molten wagon
molten wagon
#

do you want to have a look at it?

#

how much do i have to text to get vc?

#

it dont say how much

#

okay thanks man

#

its okay you dont need to

#

what do you use python for?

#

hahaha

molten wagon
#

what is Python used for the most for

#

you know a lot

#

sorry for changing the subject but do you have any tips on how I can make my bot's voice to sound good or more like a human?

#

I am currently using Windows' text to speech and its not that good

#

i have seen that to

#

its soo cool

#

I am trying to learn how to use API keys to improve my AI/bot

craggy vale
#

ip?

#

idk that

molten wagon
#

api sorry my bad

craggy vale
#

yeah api key

molten wagon
#

@somber heath I am trying to learn how to use API keys to improve my AI/bot

#

ye i see it now

#

Is there anything else I should know

somber heath
#

!resources

wise cargoBOT
#
Resources

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

molten wagon
#

The first thing I coded was a bot that can search for things on Google and YouTube, and it can tell the time and the weather.

somber heath
#

@mighty adder ๐Ÿ‘‹

molten wagon
#

It worked, but I didn't like the bot's speech

#

so now I am trying to find a solution to improve it

molten wagon
#

tell more

#

๐Ÿค”

haughty pier
somber heath
#

@wise scroll ๐Ÿ‘‹

wise scroll
shy lintel
#

hi

wise loom
#

@amber raptor OpenAI should never be allowed this type of bailout if it crashes.
If they die, they die.
https://www.youtube.com/watch?v=CxHTH8rDafo

OpenAI is asking the federal government for loan guaranteesย to buy more chips in a desperate attempt to keep the AI bubble inflated just a little bit longer.ย  This is nothing more than a bailout in advance at your expense.

Support the Channel on Patreon: https://www.patreon.com/NobodySpecialFinance
Support the Channel by Buying Me a Coffee
h...

โ–ถ Play video
#

apparently a GPU has a 6-year depreciation cycle

#

but a more realistic cycle is 4-year

#

@amber raptor so in 4 years, who's gonna give OpenAI money so they can upgrade their GPUs, to offer everyoen the latest garbage AI chatbot?

#

they can't even make money

wise loom
thick cradle
#

do you use udemy

wise loom
thick cradle
#

ok

#

i dont want a book

#

i wanna read .appimage files

wise loom
thick cradle
#

no

wise loom
thick cradle
#

wait i will

wise loom
#

can we help?

thick cradle
#

why cant i upload webm files

wise loom
#

about zero dollars.

thick cradle
#

is that a coding joke i dont get

wise loom
#

yes but the recording is high-quality

thick cradle
#

do you do about 28 october in class

#

explaaain what

#

28 october is when the greeks defeated italians in ww2

#

we celebrate it each year

wise loom
thick cradle
#

ok

#

we also celebrate 17 november

#

each year

wise loom
thick cradle
#

and 25 march

#

no its not religious 17 november is the day the protests against dictatorship where made

#

17 november 1973

#

in polytechnion

wise loom
thick cradle
#

ok

#

sorry

thick cradle
wise loom
thick cradle
wise loom
# thick cradle

notice the 1st time you ran the find command, the command was correct, and you got output too

thick cradle
#

what output

#

oh ok

wise loom
# thick cradle

the 2nd time you ran find, you've concatenated multiple commands into the same line. that was an incorrect command, so you received an error.

thick cradle
#

the website you told me says to write this

wise loom
# thick cradle

the point of you learning find was so you could search for the osu.appimage file on your system.

thick cradle
#

do i type osu.appimage or the directory

wise loom
thick cradle
#

what is concratenated

wise loom
thick cradle
#

i know that

#

do i type find ./search osu.appimage

wise loom
#

/ <-- this is the top-most directory, also called the root.
by using it as a start directory, you can search through all the files.

(note: yes there are other filesystems, some are maybe not mounted, we won't get into that now)

thick cradle
#

does it want the directory or the name

wise loom
wise loom
thick cradle
#

i wanna find one file not all

wise loom
thick cradle
#

what do you mean current

wise loom
thick cradle
#

i want the directory to be downloads

ocean gazelle
thick cradle
#

does html 4 still exist

#

do you guys make apps for android

#

did it work

#

it says it didnt found the file

wise loom
thick cradle
wise loom
# thick cradle

paste only the command in the terminal, not the full Discord message.

thick cradle
#

find /start/directory -name

#

with the directory

#

find /start/directory -name "/home/george/ฮ›ฮฎฯˆฮตฮนฯ‚/osu.AppImage"

wise loom
#

find / -iname "osu.AppImage"

#

use this

#

it's a case-insensitive search starting at the root directory, it will search through all files in all directories.

#

if there is an appimage file, it will find it

thick cradle
#

it says access ddenied

wise loom
#

find / -iname "osu.AppImage" 2>/dev/null

run it again like this. it will supress the errors

thick cradle
#

access denied

wise loom
#

again, you are not posting the screenshot

thick cradle
wise loom
#

yes, note that you're including the backquotes.
the backquotes need to be removed.

#

` <- this is a backquote

paper wolf
#

Also why your language is mathematical symbol

paper wolf
#

Mathematical

wise loom
# ocean gazelle https://leetcode.com/problems/find-all-duplicates-in-an-array/description/ can s...

a hacky solution is to use the sign bit of each number to store whether the number has been seen before. and because there are n numbers all in the range [1,n], this guarantees that x being such a number, you can always access nums[x-1].
if it has been seen before then store it in some separate array to be returned.

there's another solution involving cycle sort which i haven't spent the time to understand.

thick cradle
#

do i need to have 3

#

is 1 ok

thick cradle
#

90% of them are english aand greek

#

the only ones i remember are pi and ฮธ

#

anyways what do i do

paper wolf
#

So the gama, beta, delta, mu, pi, sigma and more I can't recall is English????

thick cradle
#

But theres also english f in physics

paper wolf
#

As far as I know most mathematical symbols are greek

thick cradle
#

Yeah

paper wolf
thick cradle
paper wolf
#

$\function(f)$

#

No latex okay....

thick cradle
#

G is for gravity

paper wolf
#

It's the small g not capital G

thick cradle
#

Ok

paper wolf
#

Again it's a name

thick cradle
#

Ok than idk

paper wolf
#

Have you seen an average physics equation???

#

Take the temperature equation

thick cradle
#

Whats that

wise loom
paper wolf
#

Ahh yes heat equation

thick cradle
#

what do i do now

#

it says access denied

#

WHAT DO I DO

dusty junco
#

Why can't I talk?

#

oh.

sleek otter
#
a = "123456"

a += "534645645"

print(a)
#

!e

wise cargoBOT
#
Missing required argument

code

sleek otter
#

!e
a = "123456"

a += "534645645"

print(a)

wise cargoBOT
sleek otter
#

@red solar you mean functions don't mutate strings?

somber heath
#

Strings are immutable. Once created, the string object, itself, cannot have its data altered.

You might, however, create a new string based on an existing string.

#

You might then assign an existing name to that new string.

#
foo = "123"
foo += "456"

# is similar to

foo = "123"
foo = foo + "456"```
sleek otter
#

hmm interesting

zenith epoch
#

@upper basin is this for quantum computers

somber heath
#

!e py foo = [100, 200, 300] foo[1] = 9001 print(foo)

wise cargoBOT
somber heath
#

Lists are mutable. I can append elements to them, I can change existing elements, as above. They're able to be altered and you still have the same list object.

#

!e py foo = "abc" foo[1] = "z"

wise cargoBOT
# somber heath !e ```py foo = "abc" foo[1] = "z"```

:x: Your 3.14 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 2, in <module>
003 |     foo[1] = "z"
004 |     ~~~^^^
005 | TypeError: 'str' object does not support item assignment
somber heath
#

!e py foo = "abc" print(foo[1])

wise cargoBOT
somber heath
#

Python, are you okay?

#

!e py foo = "abc" print(foo[1])

wise cargoBOT
somber heath
#

Here, I have demonstrated that while I can subscript by index position a string, "Hey, Python, what's at index position 1 in this string?"

#

But I can't assign to that index position as I can with lists

#

I can't change the elements of that string object.

#

Or otherwise change the data.

#

Which might be a slight lie, but nevermind.

#

@stone sorrel ๐Ÿ‘‹

iron geyser
#

๐Ÿ‘€

paper wolf
somber heath
#

@upper basin I learned about Q day, yesterday.

upper basin
#

I coincidentally released qmprs on Quantum Day's 100th anniversary.

#

Can't get anymore perfect than that.

paper wolf
wise cargoBOT
somber heath
#

@torpid heart ๐Ÿ‘‹

torpid heart
paper wolf
#

@wise loom what u doing

thick cradle
#

FINALLY I DOWNLOADED OSU THROUGH AN EMULATOR CALLED OSU WINNELO

paper wolf
#

coding java is the worst coding experience so far for me

thick cradle
#

cause stable isnt native lazer is

paper wolf
thick cradle
#

and idk how to open lazer

paper wolf
#

im sure its just
lazer

thick cradle
#

no its an emulator

paper wolf
#

uh... okay?

thick cradle
#

its called osu winnelo

#

the next step is to download lazer

paper wolf
#

well the way you run it may differ

thick cradle
#

i lost all my beatmaps

#

but the scores are still there

paper wolf
#

you can have a installation scipt/package, you may have a executable or you install it using package manager

sleek otter
paper wolf
#

java is worst

sleek otter
#

gave me more endurance and resiliecne

paper wolf
#

its eating 1/3 of my ram

paper wolf
sleek otter
#

it's like a chubby glutoneous kid

#

like react and its libs

paper wolf
#

nah its bad

somber heath
#

Test.

craggy vale
#

HElllooooo

paper wolf
#
test complete
somber heath
#

Maro, you didn't say the thing.

craggy vale
#

playing gta 4

sleek otter
#

!e

# ๐Ÿง  The Battle of Mutable vs Immutable ๐Ÿง 

# Meet our contestants:
immutable_hero = "Pythonic Knight"
mutable_sidekick = ["Rusty", "the List"]

print("๐Ÿฐ Welcome to the Kingdom of Python!\n")

print(f"Hero enters the arena: {immutable_hero}")
print(f"Sidekick follows: {mutable_sidekick}\n")

# ๐Ÿ”ฎ Magic spell: +=
print("๐Ÿ”ฎ Wizard casts the '+=' spell on both!\n")

immutable_hero_id_before = id(immutable_hero)
mutable_sidekick_id_before = id(mutable_sidekick)

immutable_hero += " of Immutables"
mutable_sidekick += ["and", "the", "Mutable", "Gang"]

# ๐Ÿชž Checking what happened
print(f"Hero after spell: {immutable_hero}")
print(f"Sidekick after spell: {mutable_sidekick}\n")

print("Checking their souls (IDs)...")
print(f"๐Ÿง Hero ID before: {immutable_hero_id_before}")
print(f"๐Ÿง Hero ID after:  {id(immutable_hero)} -> ๐Ÿ˜ฑ NEW BODY CREATED!")
print(f"๐Ÿ‘ฌ Sidekick ID before: {mutable_sidekick_id_before}")
print(f"๐Ÿ‘ฌ Sidekick ID after:  {id(mutable_sidekick)} -> ๐Ÿ’ช SAME BODY, JUST GAINED WEIGHT!\n")

# ๐Ÿงฉ Plot twist: a tuple with a mutable heart
tuple_mystery = ("Frozen", ["but", "alive"])
print("Plot twist! A tuple appears:", tuple_mystery)

print("๐Ÿ˜ˆ Evil wizard appends to the inner list...")
tuple_mystery[1].append("inside")
print("Tuple after dark magic:", tuple_mystery)
print("Moral: Even frozen things can hold chaos within.\n")

print("๐ŸŽญ The End: Mutability isnโ€™t about kindness or strength...")
print("...itโ€™s about whether your soul can change or just your heart can โค๏ธโ€๐Ÿ”ฅ")
wise cargoBOT
#

@sleek otter You've already got a job running - please wait for it to finish!

#

:white_check_mark: Your 3.14 eval job has completed with return code 0.

001 | ๐Ÿฐ Welcome to the Kingdom of Python!
002 | 
003 | Hero enters the arena: Pythonic Knight
004 | Sidekick follows: ['Rusty', 'the List']
005 | 
006 | ๐Ÿ”ฎ Wizard casts the '+=' spell on both!
007 | 
008 | Hero after spell: Pythonic Knight of Immutables
009 | Sidekick after spell: ['Rusty', 'the List', 'and', 'the', 'Mutable', 'Gang']
010 | 
... (truncated - too many lines)

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

paper wolf
#

how about gta 126*10^2352

sleek otter
#

I like how AIs are becoming more creatives than humans lol

somber heath
#

@nova hearth ๐Ÿ‘‹

sleek otter
#

A nice ludic example it created

#

more than uncreative as myself

paper wolf
#

its creativity is just a collection human creativity

sleek otter
#

Yes

paper wolf
#

also its creativity comes from minimizing the function cost

thick cradle
#

i wanna install lazer

#

now

paper wolf
#

sudo apt install lazer

sleek otter
#

and the random factor in next token generation

thick cradle
#

i have it installed i cant open it cause its .appimage file

sleek otter
#

i dont think lazer is a standard package in apt

paper wolf
#

*random distribution

sleek otter
#

you can just run the appimage

thick cradle
#

ive tried sudo chmod +x it didnt work

sleek otter
#

I use cursor as appimage it's the only way the self updating works

sleek otter
paper wolf
sleek otter
#

yes, beware

#

download from only trusted sources

thick cradle
#

its official osu website

paper wolf
#

if so they should have official download instruction

thick cradle
#

they dont

paper wolf
#

then they dont care about thier linux users

#

what they provided you tho?

#

is it a debian package?

#

is it an executable downloader??

thick cradle
#

it just says download game maake account download beatmaps

paper wolf
#

what...

thick cradle
#

.appimage file

#

.appimage

paper wolf
thick cradle
#

IT DOESNT OPEN

paper wolf
#

thats normal...

#

cus its not ment to be open really

#

well it does but usualy for games appimage is the downloader

#

try running it on the terminal

thick cradle
#

this osu whinnello shit is just a wine emulation of osu stable

somber heath
#

@celest ferry ๐Ÿ‘‹

paper wolf
#

dont do wine lol

thick cradle
#

why

paper wolf
#

it break my system multiple times

#

good thing i alr know how to fix my system that time

thick cradle
#

ok than how do i open it

#

the osu lazer

paper wolf
#

well idk what they provided you

thick cradle
#

a guy told me to sudo chmod+x

#

I TOLD YOU ITS APPIMAGE

paper wolf
#

hmmm

#

run it on the terminal

thick cradle
#

i did sudo chmod +x

#

it doesnt work

paper wolf
#

run not give executable perm

thick cradle
#

how

paper wolf
#

run it

#

bruh

#

$ /home/what/ever/it/is.appimage

thick cradle
#

oh yeah ok

#

first i wanna delete the wine emulation

paper wolf
#

no need

thick cradle
#

i dont want it

paper wolf
#

the system can figure that out

#

usually its just

#

sudo apt remove wine

thick cradle
#

it says $ command not found

paper wolf
#

because it is not an command...

thick cradle
#

yeah but i need to type it

paper wolf
#

the?

thick cradle
#

$

#

the $

paper wolf
#

the dolar sign is not a command...

thick cradle
#

what is it

paper wolf
#

it either a variable operator or the bash indicator

thick cradle
#

now it says access denied

paper wolf
#

it should say more than that...

thick cradle
#

bash: /home/george/ฮ›ฮฎฯˆฮตฮนฯ‚/osu.AppImage: Permission denied

paper wolf
#

then give it executable permision

#

$ sudo chmod +x /home/george/ฮ›ฮฎฯˆฮตฮนฯ‚/osu.AppImage

thick cradle
#

it says nothing

paper wolf
#

it would never say something if everything went well

#

if it said something you should be worried

thick cradle
#

ok what do i do now

paper wolf
#

run it

nova hearth
thick cradle
#

IT WORKS

#

THANK YOU

paper wolf
#

you might have missing something when you first do it...

thick cradle
#

i wanna delete the wine emulation now

paper wolf
#

you can add --purge to remove all its files

thick cradle
#

it doesnt delete

#

IT DOESNT DELETE

#

I CANT OPEN LAZER

#

I CANT DELETE THE EMULATION

nova mantle
#

hi

paper wolf
#

emulation?

nova mantle
#

just chillin

#

cant talk yet

shadow folio
#

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

paper wolf
#

so damn quiet here...

somber heath
#

@winter storm ๐Ÿ‘‹

nova mantle
#

sorry i cant reply

#

im new so i dont have prmissions

paper wolf
#

you can just use the text...

sleek rampart
#

Is our friend there sleeping?

paper wolf
#

mostly

sleek rampart
#

Any of you started with python by self learning?

#

You***

paper wolf
#

i learned programing my self

sleek rampart
#

Ow nice

paper wolf
#

with stackoverflow, AI and youtube

sleek rampart
#

If you don't mind me asking, what routine did you take?

paper wolf
#

no actually

sleek rampart
#

Because , you know, I have this tendency with hyper focus. Perhaps hearing other's processes can help

#

I get too much into something, then I burnout

#

Then I take a break, an the cycle continues

paper wolf
#

i just do what stuff interest me at that moment

sleek rampart
#

Ah I see

paper wolf
#

im sure following the way i learn is bad for others

sleek rampart
#

Well if I just give free reigns to my hyper focus I might hit burnout too, so there's that

#

I need discipline

#

And a table with schedule!

nova mantle
#

hello

nova mantle
#

what do yall think? i fixed my auto war game

#
import random


class Card:
    def __init__(self, draw):
        self.draw_number = draw
        self.value = self.Value()
        self.suit = self.Suit()

    def Suit(self):
        if int((self.draw_number - 1) // 13) == 0:
            self.suit = "Spades"
        elif int((self.draw_number - 1) // 13) == 1:
            self.suit = "Clubs"
        elif int((self.draw_number - 1) // 13) == 2:
            self.suit = "Hearts"
        elif int((self.draw_number - 1) // 13) == 3:
            self.suit = "Diamonds"
        return (self.suit)

    def Value(self):
        self.value = ((self.draw_number - 1) % 13) + 1
        return (self.value)

    def Describe(self):
        if self.value > 10:
            if self.value == 11:
                return (f"Jack of {self.suit}")
            if self.value == 12:
                return (f"Queen of {self.suit}")
            if self.value == 13:
                return (f"King of {self.suit}")
        if self.value == 1:
            return (f"Ace of {self.suit}")
        else:
            return (f"{self.value} of {self.suit}")


repeat = 1
while repeat == 1:
    values = list(range(1, 53))
    random.shuffle(values)
    draw_number = random.choice(values)
    draw_number2 = random.choice(values)
    while draw_number2 == draw_number:
        draw_number2 = random.choice(values)

    card1 = Card(draw_number)
    card2 = Card(draw_number2)
    if card1.Value() > card2.Value():
        print("Player 1 Wins!")
        print(f"{card1.Describe()} beats {card2.Describe()}")
    elif card2.Value() > card1.Value():
        print("Player 2 Wins!")
        print(f"{card2.Describe()} beats {card1.Describe()}")
    elif card1.Value() == card2.Value():
        print("It's a tie!")
    repeat = 2

    repeating = input("Whould you like to go again?  Y/n  ")
    if repeating == "n":
        input("Press enter to exit")
    else:
        random.shuffle(values)
        repeat = 1
vocal basin
paper wolf
#

wdym??

#

its assinged only ones

#

you should say

vocal basin
#

read the Value method definition

paper wolf
#

oh...

vocal basin
#

the code is doing self.value = self.value, effectively

#

!d property

wise cargoBOT
#

class property(fget=None, fset=None, fdel=None, doc=None)```
Return a property attribute.

*fget* is a function for getting an attribute value. *fset* is a function for setting an attribute value. *fdel* is a function for deleting an attribute value. And *doc* creates a docstring for the attribute.

A typical use is to define a managed attribute `x`...
vocal basin
#

I assume this was partially what was meant to be used there

#

judging by how it looks like C# translated into Python

paper wolf
#

how?

nova mantle
#

ill admit what i did is alittle bit janky with the if statements

#

but i dont know how else to do it

vocal basin
# nova mantle ```py import random class Card: def __init__(self, draw): self.dra...
  • methods names shouldn't contain capital letters
  • those two methods calculating the suit and value should probably either only called during construction (set attribute once, then use the calculater value) or never called during construction (can be @property in this case)
  • int() calls there don't do anything, result of // is already an integer
  • return generally shouldn't have () after it
  • you can define __str__ instead of Describe, so you can just print(card) and have it display textual description of the card
  • repeat should be bool not int, this way you get just while repeat:
#

i don't remember if there's a way to quickly select two distinct elements, so what you're doing by checking if second is equal is probably close to optimal

paper wolf
#

i always add __str__ on my objects just for the sake of debugging

vocal basin
#

the logic seems to be sound

vocal basin
#

@dataclass automatically defines it

vocal basin
paper wolf
jaunty socket
#

@vocal basin please judge my code, if you have leisure time.

#

be honest please, no worries your feedback improve me @vocal basin

woeful blaze
#

Morning

vocal basin
#

missing newline at the end, some automated tools complain about that thing

#

but I can't find if it's a part of the PEP8