#voice-chat-text-0

1 messages Β· Page 972 of 1

past peak
#

check out this 3d engine with lighting physics all made in tkinter

#

it took months

whole bear
past peak
whole bear
#

this is code from a project called LithicRivers that just defines some game objects

#

@whole bear you can see https://github.com/HenryFBP/LithicRivers/blob/master/lithicrivers/game.py#L125 if interested further

wise cargoBOT
#

lithicrivers/game.py line 125

class Tiles:```
whole bear
#

just a funny minecraft meem

whole bear
past peak
#

also most of the 3d engine was coded on a chromebook so if it rotates at lightspeed youll know its just because of how slow those chromebooks are

whole bear
#

did you make a renderer?

past peak
#

like what do you mean by render in this context

whole bear
#

like a raycast renderer

past peak
#

it uses algorithms to determine the lighting, not raytracing

#

also if you are wondering its full true 3d

#

its not a raycaster

#

(also raycast lighting and raycasting are 2 different things)

#

also if you do want the source code i might post it

quasi condor
#

dett + debit == debt

whole bear
molten pewter
mortal crystal
#

.copy()

whole bear
#

@mortal crystal

#
from copy import deepcopy

my_dict = {'one': 1, 'two': 2}
new_dict_deepcopy = deepcopy(my_dict)```
#

that deepcopy removes all references

mortal crystal
#

thank you mate, ill try the .copy methon and if it doesn't work ill try yours

unborn badger
#

Guys I asked help in one of the channels and the assistant hasnt helped me yet. Please if smn can help me, I I appreciate it

#

My problem is drawing a square in turtle using for loops

#

It is like that but it is hard

#

Yes?

#

I have tried and this is what I got

#

It looks so bad lol

#

this is my code

#

import turtle
import math
squareLength = 36
t = turtle.Turtle()
screen = t.getscreen()
pentagonLength = 2squareLength/1.539
pentagonLengthHalf = pentagonLength/2
innerPentagonLength = math.sqrt(2
(pentagonLengthHalf2) - (2*pentagonLengthHalf2*math.cos(math.radians(108))))

for i in range(4):
t.forward(squareLength)
t.right(90)
t.forward(squareLength)

t.fillcolor('black')
t.begin_fill()
for i in range(4):
t.forward(35)
t.right(90)
t.forward(5)
t.end_fill()

mortal crystal
#

does the t.right(x) rotates x grades?

unborn badger
mortal crystal
#

lemme try

unborn badger
#

alright

grave laurel
#

Mc

#

I can’t speak in the voice chat?

#

How do I speak in it I’m muted

mortal crystal
#

can u also send me a capture of your code please

mortal crystal
#

you have to be active in the channel for a certain time and then go to verification chat and write something

unborn badger
#

No it doesnt crash, it actually runs

#

you mean it closes by it self?

#

Hmmm!

#

Oh alright

#

yea

#

yea but the problem I draw the black square is bigger and it is in the right side,however I need it in the left up corner

#

just how exactly in the pic

#

alright

#

alight

#

r

#

Ohhh I got what you mean

#

yes

#

kinda

mortal crystal
#

penup()

#

pendown()

unborn badger
#

I changed the code and I got this!

mortal crystal
#

nice!

mortal crystal
#

but... you can work on that latter

arctic ledge
#
import math
squareLength = 36
t = turtle.Turtle()
screen = t.getscreen()
pentagonLength =  squareLength/1.539
pentagonLengthHalf = pentagonLength/2
innerPentagonLength = math.sqrt(2 * (pentagonLengthHalf) - (2*pentagonLengthHalf*math.cos(math.radians(108))))


for i in range(4):
    t.forward(squareLength)
    t.right(90)
    t.forward(squareLength)


t.fillcolor('black')
t.begin_fill()
for i in range(4):
    t.right(90)
    t.forward(36)

t.right(90)
t.forward(squareLength * 2)

for i in range(4):
    t.left(90)
    t.forward(36)



t.end_fill()```
unborn badger
#

broo!!! I cant believe it I almost getting it lol

unborn badger
arctic ledge
#

See what you can learn from my code and try the triforce one. Let me know if you can't get it

unborn badger
#

and @mortal crystal I wont forget for helping me I really appreciate it

mortal crystal
#

dw mate

unborn badger
#

Thanks guys have a good one

weak harbor
#

How do I talk in the channel?

#

Ah been a member for a while, but guess I gotta write a lot more.

#

yeah not enough messages

#

Dang I want to talk

#

Maybe I just write 50 messages here

#

I think I've been here for more than a year for sure

#

I'm playing League, but after I'll get my quota of messages

arctic ledge
#

Cool

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied mute to @weak harbor until <t:1644637241:f> (9 minutes and 59 seconds) (reason: burst rule: sent 8 messages in 10s).

steady jasper
#

lol funny

#

so how is everybody?

stuck furnace
#

Oh yeah, that's a nice fact πŸ˜„

#

Although it's more surprising that the Aztec empire was so recent.

#

πŸ‘€

#

Yep πŸ˜„

#

Don't arrest me :C

velvet urchin
#

mute @stuck furnace

stuck furnace
#

:C

weak harbor
#

I once wore hat that was made by a Python.

#

<></> πŸ™‚ oh wait that's not python!

#

was supposed to do the smiley face via text which looks like a hat

stuck furnace
#

Uhhh @sturdy wadi

#

Let's not finish this "joke".

sturdy wadi
stuck furnace
#

Β―_(ツ)_/Β―

#

Erm, gtg πŸ‘‹

mortal crystal
#

Pglet

tall cloak
#
ships = {"Aircraft Carrier": "1,1","1,2","1,3","1,4","1,5", "Battleship":"2,1","2,2","2,3","2,4"} # etc
#
ships = {"Aircraft Carrier": [(1,1),(1,2),(1,3),(1,4),(1,5)], "Battleship":[(2,1)(2,2)(2,3)(2,4)]} # etc
light python
#

Hi excuse me

#

There a any way of can I view how many messages a sent until now

velvet urchin
#

!e ```py
x = True, True, True
y = True, True, True
z = (True, True, True == x)
print(x,y,z)

wise cargoBOT
#

@velvet urchin :white_check_mark: Your eval job has completed with return code 0.

(True, True, True) (True, True, True) (True, True, False)
light python
#

I want so much to unlock voice in the channels

wind raptor
#

!voice @light python

wise cargoBOT
#

Voice verification

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

light python
#

Ty

velvet urchin
#
#

ships = {"Aircraft Carrier": [(1,1),(1,2),(1,3),(1,4),(1,5)], "Battleship":[(2,1)(2,2)(2,3)(2,4)]} # etc

#

x,y = tuple

#

ships = [[(1,1),(1,2),(1,3),(1,4),(1,5)],[(2,1)(2,2)(2,3)(2,4)]]

#

ships = {"0": [(1,1),(1,2),(1,3),(1,4),(1,5)], "1":[(2,1)(2,2)(2,3)(2,4)]} # etc

tall cloak
#

x,y = ships[0][0]

velvet urchin
#

x,y=ships["Aircraft Carrier"][0]

tall cloak
#

!eval

wise cargoBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

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

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

tall cloak
#

!eval

ships = [[(1,1),(1,2),(1,3),(1,4),(1,5)],[(2,1)(2,2)(2,3)(2,4)]]
x,y = ships[0][0] 
wise cargoBOT
#

@tall cloak :x: Your eval job has completed with return code 1.

001 | <string>:1: SyntaxWarning: 'tuple' object is not callable; perhaps you missed a comma?
002 | Traceback (most recent call last):
003 |   File "<string>", line 1, in <module>
004 | TypeError: 'tuple' object is not callable
tall cloak
#

!eval

ships = [[(1,1),(1,2),(1,3),(1,4),(1,5)],[(2,1),(2,2),(2,3),(2,4)]]
x,y = ships[0][0] 
wise cargoBOT
#

@tall cloak :warning: Your eval job has completed with return code 0.

[No output]
tall cloak
#

!eval

ships = [[(1,1),(1,2),(1,3),(1,4),(1,5)],[(2,1),(2,2),(2,3),(2,4)]]
x,y = ships[0][0] 
print(f"X: {x}, Y: {y}")
wise cargoBOT
#

@tall cloak :white_check_mark: Your eval job has completed with return code 0.

X: 1, Y: 1
stuck furnace
#

I think saying you prefer Bash to Python a bannable offence /dev/null πŸ˜„

#

Go join BashDiscord if you love it so much :C

devout heath
#

🀣

stuck furnace
#

Now that I've learned most of its quirks, I have to admit, Bash isn't too bad.

#

But definitely not great for more structured programming.

#

Oh right

#

Ah yeah. Pipelines in Python are more complicated than they need to be.

devout heath
#

optimalizatoin

#

coin it

#

buy a dictionary

#

it's a book reccomendation

#

I dunno man. optimization seems like something a bash genius would know about

#

maybe know how to pronounce, would have read it a few times

#

yeah

#

ptt takes 3 tons of force

stuck furnace
#

πŸ€”

#

Sooo, what's everyone up to?

unkempt remnant
#

right now, making a dataset of sites that allow scraping πŸ˜‚

#

I'm not scraping anything, just making it more as a reference since a lot of people don't like to dive into the terms of sites

#

only site I've come across that explicitly allows scraping in some way is github

stuck furnace
#

Have you seen Discord's robots.txt file?

unkempt remnant
#

gotta block the nsa

stuck furnace
#
User-agent: nsa
Disallow: /
``` Yep πŸ˜„
#

That'll show them.

unkempt remnant
#

they can't do anything now πŸ€·β€β™‚οΈ

stuck furnace
#

Β―_(ツ)_/Β―

unkempt remnant
#

but yeah like github actually allows scraping and I think that's pretty cool

stuck furnace
unkempt remnant
#

I think they've been working on the code search stuff but idk

stuck furnace
#

/dev/null, are you taking part in the "trivia night" later?

#

πŸ‘

unkempt remnant
#

trivia is exciting, sad I can't make it

#

really fun to see all the work that was put into the code behind the scenes though

#

pr open since october

#

sir-lancebot#910

viscid lagoonBOT
unkempt remnant
#

welcome back lx

stuck furnace
#

Β―_(ツ)_/Β―

unkempt remnant
#

it grabs attention

stuck furnace
#

I mean, you could answer the questions as if they're about JS, but you probably won't score very highly.

#

JS has some nice trivia actually πŸ˜„

#

It was created by one guy in a week.

#

Oh yeah, but you're kind of forced to learn all the history of Unix, just to understand how it works.

unkempt remnant
#

I should head off too πŸ‘‹

stuck furnace
#

@wind raptor πŸ‘‹

unkempt remnant
#

πŸ’€

stuck furnace
#

Like, you know why there's /bin as well as /usr/bin?

#

It's because they ran out of space on their main hard drive πŸ˜„

#

And had to move some stuff over to /usr

#

But people have kind of rationalised it after the fact.

#

Erm, yep, I'll find the source...

#

I think on most systems now one is a symlink to the other.

#

Ah yea, on Ubuntu /bin is a symlink to /usr/bin.

#

Yeah, Nix does everything its own way.

#

I have been meaning to give it a try.

#

There's a guy in the voice chat here frequently, who is like obsessed with NixOS πŸ˜„

#

πŸ‘€

#

Oh yeah, like "deterministic"

#

Still not sure I know what that means exactly πŸ˜„

#

Yep

#

Wait what?

#

Oh pithink

#

Don't you mean dynamically linked?

#

I'll try it out in Docker.

#

!stream 319509382889209866

wise cargoBOT
#

βœ… @velvet urchin can now stream until <t:1644645646:f>.

stuck furnace
#

Oh πŸ€”

#

I'll give it a try. But I gtg πŸ‘‹

#

Cya

humble oracle
#

guys

#

hello?

whole bear
#

helloooo

#

that sounds nice

#

i am suffering trying to figure out how to code something

#

im coding a dbms

#

yas

#

Hey

#

yes

#

since im doing it from scratch

#

i decided to make a

#

parser for sql

#

as well as like execute sql commands

#

@somber heath you cna use he/him for me

#

@zenith radish develop a parser

sick dew
#
import random
import turtle

pen = turtle.Turtle(shape='turtle')
screen = pen.getscreen()

pen.setheading(random.randrange(-180, 180))

while 1:
    pen.forward(1)
    pen.setheading(pen.heading() - random.randrange(-18, 18))

    pos_x, pos_y = pen.pos()

    if not -(screen.window_width() / 2) < pos_x < screen.window_width() / 2:
        pen.setheading(180 - pen.heading())

    if not -(screen.window_height() / 2) < pos_y < screen.window_height() / 2:
        pen.setheading(-pen.heading())
raw sentinel
#

I accidentally joined the call..

#

😁 πŸ˜…

#

I was wondering about what in Python πŸ€”

#

Was discussed

sick dew
raw sentinel
#

😁 πŸ€” python

#

I left the call already after joining 2 times☎️

somber heath
#

Langton's art.

fallow dock
#

hellooo

#

@somber heath why i cant speak?

somber heath
wise cargoBOT
#

Voice verification

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

fresh lynx
#

Traceback (most recent call last):
File "a:\Alve\Hottiti\Documents\First file\test.py", line 2, in <module>
playsound("A://Alve//Hottiti//Documents//try.py//Sounds//Thanos.mp4")
File "C:\Python10\lib\site-packages\playsound.py", line 34, in _playsoundWin
winCommand('open "' + sound + '" alias', alias)
File "C:\Python10\lib\site-packages\playsound.py", line 27, in winCommand
exceptionMessage = ('\n Error ' + str(errorCode) + ' for command:'
TypeError: can only concatenate str (not "bytes") to str
PS A:\Alve\Hottiti\Documents>

#

I am getting this error can anybody help me to fix this

whole bear
#

yo

#

guys

fresh lynx
#

hey

#

can anybody help me

compact yacht
#

yess

#

just put .str. in the method

whole bear
#

@stuck sky sup

#

im good too

#

@stuck sky hes using a soundboard to do that

crystal yew
#

how do i watch the vid

#

*stream

whole bear
#

@stuck sky my mic is broken

#

i cant share my screen

#

wont aloww me to

stuck sky
#

@dire folio 853291821173702677 this guy is coming to vc n abusing n leaving

crystal yew
#

F

edgy echo
#

ao bhai pubg khelte hei

#

@stuck sky

#

mera bap snake charmer hai

#

ye python ko dudh mila mila kai

#

mardega

#

hindi mai bolo na bhai @warm vapor

#

kya ye chinese rakha hai nam mai?

#

kitna ummar ka hai @stuck sky

#

how old are you mister

#

?

#

mera bap iit mai kam karta hai

#

firak nahi

#

tum log kiska bat kar rahe ho?

#

hindi mai bolne se kya jata hai

#

mere se karlo

#

mai to pro hu

#

pubg mai 10+ kills

#

t2 player

#

@stuck sky
kaun gali karke gaya tha kya?

#

@warm vapor mai bhi 14 years old but much more smarter

#

@warm vapor

warm vapor
#

yes

edgy echo
#

@stuck sky

stuck sky
#

u're just a noob @edgy echo

edgy echo
#

make like an education platform
it will help with course book studies and this websites thing too

edgy echo
#

your mom noob

#

wait i come from another acc

sturdy wadi
#

boostrap ez

#

bootsrap is just css but easier

#

so ezier

#

btw what are your guys wpm?

#

haha

#

going to flex now

warm vapor
#

def name(name: str) -> dict:

compact yacht
#

100 maybe

stuck sky
#

def xyz():

sturdy wadi
#

learn react.js guys

compact yacht
#

depends if typing syntax

stuck sky
#

@compact yacht join vc first(xD)

compact yacht
#

ok cool

sturdy wadi
#

he said

stuck sky
#

r u a web d?

sturdy wadi
#

are you web developer

#

smart people πŸ€“

#

but i use arch btw

#

@stuck sky make discord bot and impress girls

stuck sky
#

kya bola? @warm vapor

sturdy wadi
#

backend ke liya kya use karta hai @stuck sky ?

warm vapor
#

he said u sound advance

stuck sky
#

me noob

warm vapor
#

ig

sturdy wadi
#

he is lying

compact yacht
#

very advanced for your age

sturdy wadi
#

@compact yacht how much salary can you get from data science?

compact yacht
#

i start 100k usd

#

as uni graduade

sturdy wadi
#

where you from?

compact yacht
#

.au

sturdy wadi
#

oh wow

#

what is highest earning thing in like computer?

compact yacht
#

penetration testing is well paid

#

but work inconsistent

stuck sky
#

ig computer vision , ai , ml ,deep learning

weak harbor
#

How long is this going to take?

sturdy wadi
#

@stuck sky make a website that has like homeworks and ADS
you get money

#

i did that

#

that will help in your studies

#

and coding too

stuck sky
#

see this

#

lol

weak harbor
#

Hard to feel like you are making progress with coding without seeing results. But hearing people talk about it makes it more feasible.

#

Like this 50 message limit for talking....

#

I don't feel like it will ever end.

compact yacht
#

it won't.

#

you will learn new things for your life - life long learning.

#

just take at relaxed pace

#

so you don't burn out.

#

in 20 years the technology will be completely different than today.

weak harbor
#

Yeah, gotta make it part of your life but with a job, side hustle, gym, and hardly any social life, it's harder to set aside time.

#

True true, do you think Golang is a good investment to learn?

#

Or is Python the future?

compact yacht
#

i've never heard of golang.

#

Python is heavily used.

stuck sky
#

why r u thinking of 20 years later

compact yacht
#

and very powerful.

weak harbor
#

I feel like Python is harder to get a job for some reason everyone lists Python as their coding.

compact yacht
#

Mostly i just use Python, R , and unix shell commands.

sturdy wadi
#

which programming language is good for getting a job?

weak harbor
#

Yeah Aryan

sturdy wadi
#

react.js

weak harbor
#

Is 30 too old to make a career shift for programming? I have so much experience with marketing but coding just seems more valuable and more fun things to do.

#

But coding friends of mine get burnt out of coding.

compact yacht
#

definitely not, 30 - you still have 40 years of working life, if you work hard, you can have a high level of profficiency in 1 year.

weak harbor
#

Whereas marketing I think I could do forever with no worries.

#

Which is better to do something you enjoy and can not get burnt out but not so rewarding or something that challenges you but is rewarding and can get burnt out?

compact yacht
#

ozycon - you definitely can be successful if you have the aptitude and are willing to put in 1-2 hours per day

#

ozycon - personal choice. life quality generally better

warm vapor
#
from fastapi import FastAPI
from fastapi.middleware.wsgi import WSGIMiddleware
from django.core.wsgi import get_wsgi_application
import os
from importlib.util import find_spec
from fastapi.staticfiles import StaticFiles
from django.conf import settings


# Export Django settings env variable
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings')

# Get Django WSGI app
django_app = get_wsgi_application()

# Import a model
# And always import your models after you export settings
# and you get Django WSGI app
from accounts.models import Account

# Create FasatAPI instance
app = FastAPI()

# Serve Django static files
app.mount('/static',
    StaticFiles(
         directory=os.path.normpath(
              os.path.join(find_spec('django.contrib.admin').origin, '..', 'static')
         )
   ),
   name='static',
)

# Define a FastAPI route
@app.get('/fastapi-test')
def read_main():
    return {
        'total_accounts': Account.objects.count(),
        'is_debug': settings.DEBUG 
    }

# Mount Django app
app.mount('/django-test', WSGIMiddleware(django_app))```
weak harbor
#

Do you feel that Python is only valuable for backend?

sturdy wadi
#

is data science hard

#

@compact yacht

compact yacht
#

no lol

sturdy wadi
#

you learn from university or yourself?

compact yacht
#

you already have the skills to be successful. today.

#

i did a mathematics degree, but the concepts are similar.

sturdy wadi
#

thanks

weak harbor
#

I really like data science

#

So applicable with marketing

sturdy wadi
#

btw how old are you clone?

compact yacht
#

old lol

#

it's from a yelp data set. - reviews of restuarants.

#

logistic regression uses a log link function to link sum of squares to discrete outcomes

weak harbor
#

Me wanting to voice chat ^

stuck sky
#

hey!

#

i'm back

zenith radish
#

!paste

wise cargoBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

zenith radish
#

@zealous blade

weak harbor
#

Don't mind me just doing my homework

#

Getting closer and closer to 50 comments so I can speak

#

What's fresh OpalMist?

#

Are y'all talking about produce?

#

Green tea or Vanilla ice cream

#

See this is the trouble with no mic, many don't even look at chat but I'm trying to add to the convo.

#

Feels like I'm watching a Twitch Chat but just the voice.

#

I just want to speak T_T

#

Tea all the way.

#

Coffee is addiction, Tea is a choice.

zenith radish
weak harbor
#

I'm well aware of that

#

Just need 50 messages

#

You are not currently eligible to use voice inside Python Discord for the following reasons:

β€’ You have sent less than 50 messages.
β€’ You have an active voice infraction. (wut...)

#

I wrote too many messages is all to reach 50

#

I also said the name Vold ... emort

weak harbor
#

There should be an option to see how many messages you have left

meager cairn
#

So close

weak harbor
#

Do these count as messages?

#

Because I should be close

#

I think

meager cairn
#

I don't know

#

but I hope yes

weak harbor
#

@zenith radish can you talk about GO?

#

Career wise and tech future?

#

Isn't it super fast?

#

Pros and Cons?

#

So hiring wise Java or C# is better than Go and Python?

#

Thanks btw

#

Do you feel the same way about Go?

#

Cool cool, yeah I hear it's good for NFT and Crypto.

#

So my website went from PHP to Golang. So it's so much easier and faster but looking back maybe I should have done Python?

#

Do people even hire Golang Developers or better to find others? Not to mention the frontend.

#

But like easily and aggresively

#

Degree? not in tech

somber heath
#

I have ninety degrees.

weak harbor
#

Which niche?

somber heath
#

L

weak harbor
#

Ah gotcha

primal yacht
weak harbor
#

@zenith radish talk Golang to meh

#

Anything

weak harbor
#

I had trouble learning it in an hour

#

Granted I learned via udemy. Still in the course. I really like Python, but my website where I have a dev who I pay is in Golang.

#

But my skills in Python isn't good enough to build a website y'know?

#

Ok lol

#

Can you say anyone can just build an NFT marketplace and video site?

#

Tyy, I'm just explaining why I have to hire a dev, that's not being negative. I can hire someone if I need.

#

If you think no one should hire a developer, that's like saying no devs should have jobs lol.

#

Yup yup

past peak
weak harbor
#

Enough about me, that was a cute cat

primal yacht
#

hewwos. nom noms for now

past peak
#

float

pallid hazel
#

ughh.. I'm trying to make this more efficient, but I've had good and bad results at lower run counts also.

Run Counts || Run1 1 || Run2 6 || Run3 3 || Run4 3 ||  Run5 0
plans - (202, 125, 92)
Run Counts || Run1 1 || Run2 18 || Run3 9 || Run4 9 ||  Run5 0
plans - (102, 125, 92)
Run Counts || Run1 1 || Run2 40 || Run3 20 || Run4 20 ||  Run5 0
plans - (203, 128, 89)
Run Counts || Run1 1 || Run2 12 || Run3 6 || Run4 6 ||  Run5 0
plans - (204, 128, 89)
Run Counts || Run1 1 || Run2 64 || Run3 32 || Run4 32 ||  Run5 0
plans - (302, 126, 91)
Run Counts || Run1 1 || Run2 58 || Run3 29 || Run4 29 ||  Run5 0
plans - (103, 128, 89)
Run Counts || Run1 1 || Run2 22 || Run3 11 || Run4 11 ||  Run5 0
plans - (205, 125, 92)
Run Counts || Run1 1 || Run2 6 || Run3 3 || Run4 3 ||  Run5 0
plans - (206, 128, 89)
Run Counts || Run1 1 || Run2 38 || Run3 19 || Run4 19 ||  Run5 0
plans - (303, 125, 92)
Run Counts || Run1 1 || Run2 24 || Run3 12 || Run4 12 ||  Run5 0
Run Counts || Run1 1 || Run2 18 || Run3 9 || Run4 9 ||  Run5 0
plans - (111, 128, 89)
pallid hazel
#

not very efficient atm, cant seem to get it as a pool atm, so is running run number 100,200,300 per core.. unused cores if a run finishes.. pool keeps doubling the run, so some work to do when I persure that more.

#

i prefer to only use builtins, so if I need to construct anything additionally.. i dont have to contend with an imported lib

quasi condor
#

!e ```py

from dataclasses import dataclass, asdict
import json

@dataclass
class Test:
name: str
age : int

bob = Test('bob', 15)
print(bob)
print(asdict(bob))

getting a string to jam over the socket

serialised = json.dumps(asdict(bob))

Turning the received thing back into an object

deserialised = Test(**json.loads(serialised))
print(deserialised)

pallid hazel
#

ized

wise cargoBOT
#

@quasi condor :white_check_mark: Your eval job has completed with return code 0.

001 | Test(name='bob', age=15)
002 | {'name': 'bob', 'age': 15}
003 | Test(name='bob', age=15)
quasi condor
#

!e ```py
from dataclasses import dataclass

@dataclass
class Test:
name: str
age : int

t = Test('a', 20)

print(eval(repr(t)))

wise cargoBOT
#

@quasi condor :white_check_mark: Your eval job has completed with return code 0.

Test(name='a', age=20)
zenith radish
pallid hazel
#

i was playing with your code @quasi condor

#

!e
from dataclasses import dataclass

@dataclass
class Test:
name: str
age : int

adict = {1:10, 2:20, 3:30}
for key, value in adict.items():
for x in range( len(adict)):
t = Test(key, value)
print(eval(repr(t)))

wise cargoBOT
#

@pallid hazel :white_check_mark: Your eval job has completed with return code 0.

001 | Test(name=1, age=10)
002 | Test(name=2, age=20)
003 | Test(name=3, age=30)
quasi condor
zenith radish
unborn storm
neon elk
#

what is this

zenith radish
neon elk
#

why cant i speak?

quasi condor
#

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

neon elk
#

what do u study?

quasi condor
unborn storm
quasi condor
zenith radish
quasi condor
zenith radish
#
candidate := ve.localCandidates[len(ve.localCandidates) - 1]
ve.localCandidates = ve.localCandidates[:len(ve.localCandidates) - 1]
#
candidate := pop(ve.localCandidates, 1)
wind raptor
#

G2g cheers

zenith radish
#

πŸ‘‹

quasi condor
zenith radish
#
candidate := ve.localCandidates[0]         
ve.localCandidates = ve.localCandidates[1:]
lyric pawn
#

@zenith radish i fell out of the shower and hit my head off of the wall as a landing if that makes you feel better

#

ive been coding to try and heal

#

its life long man

#

@zenith radish is the 7 foot 2 guy a good coder?

pallid hazel
#

triangulate?

lyric pawn
#

πŸ‘Œ

lyric pawn
#

@zenith radish have a good night

#

the code looked good

#

πŸ™

#

interesting

#

ok talk later man

somber heath
#

!voice @timid creek

wise cargoBOT
#

Voice verification

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

neon elk
#

hey

#

@timid creek i love ur profil pic

frosty star
#

😳

sick dew
#
import turtle
from itertools import cycle


def rgb_to_hex(r, g, b):
    return f'#{hex(r)[2:].zfill(2)}{hex(g)[2:].zfill(2)}{hex(b)[2:].zfill(2)}'


pen = turtle.Turtle()
turtle.bgcolor('#000000')
width = 1

rgb_colours = []

# Making a ROY G BIV fade
for num in range(255 // 3 + 1):
    rgb_colours.append((255, num * 3, 0))

for num in range(255 // 5):
    rgb_colours.append((255 - (num + 1) * 5, 255, 0))

for num in range(255 // 5):
    rgb_colours.append((0, 255 - (num + 1) * 5, 0 + (num + 1) * 5))

for num in range(255 // 5 - 1):
    rgb_colours.append((0 + (num + 1) * 5, 0, 255 - (num + 1) * 5))

# Convert all the RGB values into Hex values
hex_colours = []
for colour in rgb_colours:
    hex_colours.append(rgb_to_hex(*colour))


colour_cycle = cycle(hex_colours)
radius = 100

for _ in range(len(hex_colours)):
    pen.color(next(colour_cycle))
    pen.circle(radius, 180)
    pen.left(185)
    pen.circle(-radius, 180)
    pen.left(360 / len(hex_colours) / 2)
somber heath
#

!e py import numpy as np start = 0,128,255 end = 255,0,128 steps = 10 endpoint = True gradient = np.linspace(start, end, steps, endpoint).astype(int) print(gradient)

wise cargoBOT
#

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

001 | [[  0 128 255]
002 |  [ 28 113 240]
003 |  [ 56  99 226]
004 |  [ 85  85 212]
005 |  [113  71 198]
006 |  [141  56 184]
007 |  [170  42 170]
008 |  [198  28 156]
009 |  [226  14 142]
010 |  [255   0 128]]
sick dew
#
data[..., :-1]
somber heath
#
data[:, :, :, :, :, :-1]```
#

!e print("abc"[:-1])

wise cargoBOT
#

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

ab
sick dew
#

Source: https://stackoverflow.com/a/3753428 ```py
data = np.array(im) # "data" is a height x width x 4 numpy array

red, green, blue, alpha = data.T  # Temporarily unpack the bands for readability

# Replace white with red... (leaves alpha values alone...)
red_areas = (red == 255) & (green == 0) & (blue == 0)
data[..., :-1][red_areas.T] = (255, 255, 255)  # Transpose back needed
somber heath
#

So.

#

np.where

#
import numpy as np
shape = 5, 5, 3 #5 units by 5 units in size, three colour channels
arr = np.zeros(shape, int)
arr[0,0] = 128,128,128 #Set position 0,0 colour to grey
print(arr)
arr = np.where(arr == (128, 128, 128), (255, 0, 0), arr) #Wherever the colour is grey, change it to red
print(arr)```
stuck sky
#

yo

runic jewel
timid creek
#

!pastebin

wise cargoBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

gentle flint
stuck furnace
#

πŸ‘‹

stuck furnace
#

Hello cat πŸ˜„

#

Soo, what is everyone up to?

gentle flint
somber heath
gentle flint
somber heath
gentle flint
stuck furnace
#

I had a stare down with it until it left πŸ˜„

#

Probably the biggest fox I've ever seen πŸ€”

#

Yep

#

Oh, they're like everywhere here.

#

Usually at night.

#

But this one was pretty brazen.

#

Have you seen those Russian domesticated foxes?

#

Oh yeah. It's a really long-running experiment.

#

Mhm, and their appearance changed to be more dog-like.

#

But apparently they still don't make very good pets yet πŸ˜„

#

Got to decide if I want to spend today productively...

#

And then figure out how to spend it productively πŸ€”

#

Hey @willow lynx πŸ‘‹

#

Yikes

#

Hello πŸ‘‹

stuck sky
#

hey

stuck furnace
#

I'm going to get on with some work πŸ‘‹

reef sinew
#

id join voice chat but i haven't sent enough messages working on class workshops for boot camp this week

light python
#

@thorn magnet hi

whole bear
#

very quiet

thorn magnet
acoustic scroll
#

anybody paly Lost Ark?

pallid hazel
#

6:50 am or pm?

#

@woeful salmon

clever zodiac
#

@somber heath I just got my voice verified

#

ya

warm vapor
#

which way πŸ‘€

#

???

pallid hazel
#

youve said enough

warm vapor
#

what are you guys talking about ;-;

pallid hazel
#

random.shuffle()

warm vapor
#

oh

undone idol
#

!d random.shuffle

wise cargoBOT
#

random.shuffle(x[, random])```
Shuffle the sequence *x* in place.

The optional argument *random* is a 0-argument function returning a random float in [0.0, 1.0); by default, this is the function [`random()`](https://docs.python.org/3/library/random.html#random.random "random.random").

To shuffle an immutable sequence and return a new shuffled list, use `sample(x, k=len(x))` instead.

Note that even for small `len(x)`, the total number of permutations of *x* can quickly grow larger than the period of most random number generators. This implies that most permutations of a long sequence can never be generated. For example, a sequence of length 2080 is the largest that can fit within the period of the Mersenne Twister random number generator.

Deprecated since version 3.9, will be removed in version 3.11: The optional parameter *random*.
sturdy wadi
#

@wind raptor are you buddhist?

pallid hazel
#

muhahha.. I've done it..

#

I just dont like the output very much

#
Run Counts || Run1 1 || Run2 24 || Run3 24 || Run4 24 ||  Run5 0
plans - (<Synchronized wrapper for c_int(510)>, 130, 87)
Finished SM MOCK Initial Moves, It took 64.2278368473053 seconds.

Will look into changing up (<Synchronized wrapper for c_int(510)>
but it's down to 64seconds from 1250..

#

No.. it's more Go... my brain hurt already :/

wind raptor
zenith radish
quasi condor
#

"my" cat ^

pallid hazel
#

noo.. i have a bug 😦

gentle flint
#

πŸ‡»πŸ‡³

gentle flint
#

πŸ‡§πŸ‡Ύ

stuck sky
#

anybody good at mysql?

#
mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
uncut meteor
#

docker run -it --rm -v $PWD:/workspace -w /workspace golang /bin/bash

uncut meteor
pallid hazel
#

@uncut meteor can I stream, trying to resolve a race condition

uncut meteor
#

!stream @pallid hazel

wise cargoBOT
#

βœ… @pallid hazel can now stream until <t:1644763338:f>.

uncut meteor
#

im interested

pallid hazel
#

my mic needs to be cycled, but I cannot figure this out. 😦

unkempt magnet
#

my mic is muted

quasi condor
#

!voice

wise cargoBOT
#

Voice verification

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

pallid hazel
#

seems i may have solved the race condition, but oddly by making up something that probablly shouldnt work, as all the examples I could find are people trying to keep the initial number the same..

#

like who would want that in a counter, makes no sense.

#

brb

stuck sky
#

hey

gentle flint
#

hi

zealous blade
#

Server side code:

unkempt magnet
#

hey

pallid hazel
#

ohh, one wonders what goes on in the "super secret staff meetings" ... although I imagine mostly horse playing..

#

tough decisions like, should we go back to the animated icon or leave the pink one? ...

smoky talon
#

def alphabet_position(text):
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26']
my_dict = {char: number for char, number in zip(alphabet, numbers)}
for character in text:
num = str(my_dict.get(character.lower()))
good = text.replace(character,num)
return good

uncut meteor
#

!code

wise cargoBOT
#

Here's how to format Python code on Discord:

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

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

smoky talon
#
def alphabet_position(text):
    alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
    numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26']
    my_dict = {char: number for char, number in zip(alphabet, numbers)}
    for character in text:
        num =  str(my_dict.get(character.lower()))
        good = text.replace(character,num)
    return good
knotty inlet
#

`py

uncut meteor
#

!e

alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

for i, val in enumerate(alpha, start=1):
  print(i, val)
wise cargoBOT
#

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

001 | 1 a
002 | 2 b
003 | 3 c
004 | 4 d
005 | 5 e
006 | 6 f
007 | 7 g
008 | 8 h
009 | 9 i
010 | 10 j
011 | 11 k
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/omecomovuk.txt?noredirect

knotty inlet
#

!docs enumerate - don't forget to set the start keyword to 1.

wise cargoBOT
#

enumerate(iterable, start=0)```
Return an enumerate object. *iterable* must be a sequence, an [iterator](https://docs.python.org/3/glossary.html#term-iterator), or some other object which supports iteration. The [`__next__()`](https://docs.python.org/3/library/stdtypes.html#iterator.__next__ "iterator.__next__") method of the iterator returned by [`enumerate()`](https://docs.python.org/3/library/functions.html#enumerate "enumerate") returns a tuple containing a count (from *start* which defaults to 0) and the values obtained from iterating over *iterable*.

```py
>>> seasons = ['Spring', 'Summer', 'Fall', 'Winter']
>>> list(enumerate(seasons))
[(0, 'Spring'), (1, 'Summer'), (2, 'Fall'), (3, 'Winter')]
>>> list(enumerate(seasons, start=1))
[(1, 'Spring'), (2, 'Summer'), (3, 'Fall'), (4, 'Winter')]
```  Equivalent to...
knotty inlet
twilit oar
#

I know JavaScript

#

Actually I always chill here because the JS server is veryyy idle

terse needle
#

gimme a sec need to fix my audio

limber helm
#

!code

wise cargoBOT
#

Here's how to format Python code on Discord:

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

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

pseudo ice
#
print("Hello world!")
pallid hazel
#

damn, thought my current script was done.. retested again before moving to the next section and found an anomalie... grrr..

cunning lake
#

Lonli

#

@somber heath I miss you

orchid sierra
#

Hello

cunning lake
#

hii

#

Hello world

#

you mean

orchid sierra
#

I'm don't speak english

cunning lake
#

which Language you do speak ?

orchid sierra
#

I live in Russia, and you

somber heath
cunning lake
#

Israel my body

cunning lake
orchid sierra
cunning lake
#

I know only English and Hebrew

#

come to chat

orchid sierra
#

link to chat

cunning lake
#

voice chat

orchid sierra
#

please

somber heath
#

Does Hebrew have a sister language named Shebrew?

cunning lake
#

?

cunning lake
somber heath
orchid sierra
#

Π•ΡΡ‚ΡŒ ΠΊΡ‚ΠΎ ΠΈΠ· России Ρ€ΠΎΠ΄Π½ΠΎΠΉ

orchid sierra
somber heath
#

!paste

wise cargoBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

orchid sierra
lyric pawn
#

its lively in this voice call

somber heath
#

You know us.

#

Party animals.

primal yacht
#

The editor war is the rivalry between users of the Emacs and vi (now usually Vim, or more recently Neovim) text editors. The rivalry has become a lasting part of hacker culture and the free software community.
The Emacs versus vi debate was one of the original "holy wars" conducted on Usenet groups, with many flame wars fought between those insi...

ripe salmon
#

yo sup

whole bear
#

Fine man

somber heath
#

!e py class MyClass: def __init__(self): self.__ = None mc = MyClass() mc.__

wise cargoBOT
#

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

[No output]
rugged root
primal yacht
#

!e ```py
class A:
def init(self):
self.__a = 1

class B(A):
def init(self):
super().init()
self.__b = 2

x = B()
print(sorted(set(dir(x)).union(object.dir(x))))

wise cargoBOT
#

@primal yacht :white_check_mark: Your eval job has completed with return code 0.

['_A__a', '_B__b', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__']
somber heath
#

!e py class MyClass: def __init__(self): self.__foo__ = None #Yes. I'm aware. mc = MyClass() mc.__foo__

wise cargoBOT
#

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

[No output]
somber heath
#

!e py class MyClass: def __init__(self): self.__foo = None mc = MyClass() mc.__foo

wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "<string>", line 5, in <module>
003 | AttributeError: 'MyClass' object has no attribute '__foo'
primal yacht
#
mc._MyClass__foo
somber heath
#

Thus, starting an attribute with __ does namespace scrambling, unless it also ends with __. They can be the same __.

primal yacht
#

!e ```py
class A:
def init(self):
self.__ = 2
self.___ = 3
self.____ = 4
self._____ = 5

x = A()
for name in sorted(set(dir(x)).union(object.dir(x))):
y = getattr(x, name, None)
if type(y) is int:
if 1 < y < 5:
print(repr(name), '->', repr(y))

somber heath
#

But, of course, dundering things that aren't dunders which govern sugar syntax can be confusing.

wise cargoBOT
#

@primal yacht :white_check_mark: Your eval job has completed with return code 0.

001 | '__' -> 2
002 | '___' -> 3
003 | '____' -> 4
primal yacht
#

!e ```py
class A:
def init(self):
self.__ = 2
self.___ = 3
self.____ = 4
self._____ = 5

x = A()
for name in sorted(set(dir(x)).union(object.dir(x))):
y = getattr(x, name, None)
if type(y) is int:
if 1 < y < 6:
print(repr(name), '->', repr(y))

wise cargoBOT
#

@primal yacht :white_check_mark: Your eval job has completed with return code 0.

001 | '__' -> 2
002 | '___' -> 3
003 | '____' -> 4
004 | '_____' -> 5
primal yacht
#

If the class name consists only of underscores, no transformation is done.

stuck furnace
#

πŸ‘‹

primal yacht
#

hiii >w<

gentle flint
#

🀨

primal yacht
#

I'm used to the old series

#

The modern one is weird

stuck furnace
primal yacht
#

Just like "Teen Titans Go" .... just ... ...... weird

rugged root
#

Back in a bit

stuck furnace
#

Apparently he put a lot of effort into the colour of the bricks at Pixar HQ πŸ˜„

rugged root
#

Gotta install the phone Desktop app on someone's rig

wind raptor
#

Can you remote in? @rugged root

rugged root
#

I mean he's here

wind raptor
#

And...

rugged root
#

Easier if I walk in there and step him through it if need be

wind raptor
#

Lol

rugged root
#

He's one of the partners, he deserves that much

wind raptor
#

Fair

stuck furnace
#

Pfft, partner shmartner

rugged root
#

Partner shartner

stuck furnace
#

Did you see that Mark Rober experiment with the wallets?

stuck furnace
#

Erm, @wind raptor you've got background noise.

#

Ah yeah good idea!

#

@wind raptor moved you to AFK.

#

Someone did actually leave when you were away Katie.

#

Wait, free candy? pithink

#

This is a thing?

#

Oh nice πŸ˜„

#

Yep πŸ˜„

#

I feel like it would be really fun to work there.

#

Also Disney's robotics/animatronics division.

#

They do some interesting stuff.

#

E.g.

#

But in that case it's more about making it look good than actual useful robots.

#

I love how the first one is literally just a stick πŸ˜„

#

Venturing off into the wilderness?

amber raptor
#

It’s more that special effects have gotten cheap enough that robots are good enough

stuck furnace
#

Oh yeah. I guess they might use them at the theme parks as well πŸ€·β€β™‚οΈ

primal yacht
rugged root
#

@wind raptor I'm an idiot

#

I was testing to make sure that annotations did cover the global generics

#

And I mistyped the future import, and it errored

stuck furnace
#

Ohh, apparently 'potato milk' is a thing now.

rugged root
#

Oooooo that sounds good

stuck furnace
#

Actually kind of does πŸ˜„

primal yacht
rugged root
#

Derp

somber heath
#

Take mashed potato, add water. Shake vigorously.

stuck furnace
#

Should use Brawndo. It's got what plants crave.

rugged root
#

Electrolytes

somber heath
#

A surprisingly watchable movie.

stuck furnace
#

Ah, yeah just got rejected.

#

If you're talking about what I think you're talking about.

primal yacht
#
Callable[[...], Any]
stuck furnace
#

Oh yeah, sorry nvm.

somber heath
#

Rejected, projected, ejected. When you turn up for a job interview, get turned down, and get slingshot out of the skylight.

stuck furnace
#

Me? πŸ‘€

#

Yeah the PEP.

#

What're you guys talking about sorry?

rugged root
sweet lodge
#

Go is weird

stuck furnace
#

Go's a great language to learn (apparently)

stuck furnace
#

I mean it was designed to be relatively easy to get up to speed in.

#

Ah

sweet lodge
#

Have you met Microsoft's documentation?

#

I hate Microsoft's documentation when I'm trying to learn something

#

fair fair

sweet lodge
#

Swagger?

#

They have the runner builtin

rugged root
wise cargoBOT
#

pglet/utils.py lines 100 to 111

def open_in_browser(url: str) -> None:
    """Open the passed URL in a browser
    :param url: The URL to open
    :type url: str
    :return: None
    :rtype: None
    """
    if get_system() == "windows":
        # FIXME: explorer.exe is the file explorer. Should this be MS Edge instead?
        subprocess.run(["explorer.exe", url])
    else:
        subprocess.run(["open", url])```
sweet lodge
#

Is there not an edge.exe on PATH that could be used instead?

stuck furnace
#

Background noise @glass forge

#

Also feedback

glass forge
#

@stuck furnace Can't control either while on mobile with this headset

primal yacht
sweet lodge
rugged root
#

Should be a way to just open default browser

#

Shouldn't have to go to explorer

primal yacht
#

64-bit Win10 has it located here:

"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
#

I have the base executable pinned on my Start Menu

pallid hazel
#

why straight copy?

sweet lodge
#

... Why is the 64bit in the 32bit folder?

pallid hazel
#

umm.. who would do that

quasi condor
primal yacht
pallid hazel
#

low level it with marcium

primal yacht
sweet lodge
#

Hmm
What percentage of people still have old Edge?

quasi condor
#

!docs webbrowser

wise cargoBOT
#

Source code: Lib/webbrowser.py

The webbrowser module provides a high-level interface to allow displaying web-based documents to users. Under most circumstances, simply calling the open() function from this module will do the right thing.

Under Unix, graphical browsers are preferred under X11, but text-mode browsers will be used if graphical browsers are not available or an X11 display isn’t available. If text-mode browsers are used, the calling process will block until the user exits the browser.

quasi condor
#

That seems like it's a built in thing doing that but better

#

But I'm also probably missing context and being unhelpful

primal yacht
#

webbrowser uses an environment variable by default

quasi condor
#

Says what?

primal yacht
#

... err ... maybe not on Windows

#
# Platform support for Windows
#

if sys.platform[:3] == "win":
    class WindowsDefault(BaseBrowser):
        def open(self, url, new=0, autoraise=True):
            sys.audit("webbrowser.open", url)
            try:
                os.startfile(url)
            except OSError:
                # [Error 22] No application is associated with the specified
                # file for this operation: '<URL>'
                return False
            else:
                return True
shut hill
#

can someone briefly share screen and review strings for pythong real quicvk for like 5 minuyes?

#

Like just introduct strings i have a lesson for strings in 20 minutes for it

#

i want to know it before i do my class

#

I do, but i want to know in advance

#

yea

#

sure

#

and whats it used for?

#

oh so for like an input

rugged root
#

input()

shut hill
#

yeaa

#

but only in ""

#

oh so say you do, name = input ("What is your name")

#

print (name)

#

wait what you say?

primal yacht
#
name = input("What is your name? ")
print(name)
shut hill
#

For my parentisis?

#

Oh...

#

i make it cleaner...

#

;-;

#

i thought it was clean

#

no im saying this

#

print()
print ()

#

can i do either

#

why tho?>

#

is there a reason

#

oh...

#

okok makes sense

#

ty

primal yacht
wise cargoBOT
#
**PEP 8 - Style Guide for Python Code**
Status

Active

Created

05-Jul-2001

Type

Process

shut hill
#

whats that lol.

#

oh cool

primal yacht
#

immutable - cannot directly manipulate

shut hill
#

ok

primal yacht
#

mutable - can be manipulated

shut hill
#

i doubt that

#

but ok.

#

Cause my teahcer is stupid

#

lol

#

oh shoot, we are doing string methods

#

whats the difference

#

is there an example?

rugged root
#

!e

name = "Hemlock"
combined = "Hello " + name + "."
print(combined)
wise cargoBOT
#

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

Hello Hemlock.
shut hill
#

ohh okok

#

and how about string methods im confused what that is...

rugged root
#

!e

normal = "spam"
big = normal.upper()
print(normal)
print(upper)
wise cargoBOT
#

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

001 | spam
002 | Traceback (most recent call last):
003 |   File "<string>", line 4, in <module>
004 | NameError: name 'upper' is not defined. Did you mean: 'super'?
shut hill
#

!e

combined = "Hello " + name  + "."
print(combined)```
wise cargoBOT
#

@shut hill :white_check_mark: Your eval job has completed with return code 0.

Hello Mr. Hemlock.
shut hill
#

BA,M

#

So cool

#

lol

rugged root
#

!e

normal = "spam"
big = normal.upper()
print(normal)
print(big)
wise cargoBOT
#

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

001 | spam
002 | SPAM
shut hill
#

!e

big = normal.upper()
print(normal)
print(big)```
wise cargoBOT
#

@shut hill :white_check_mark: Your eval job has completed with return code 0.

001 | spam
002 | SPAM
shut hill
#

wait

#

how did it set 1 and 2?

#

like how are there numbers

#

ohh

#

lol

#

yeayea

#

The upper is same as HTML

#

yeyeya

#

i like to get aheadof the class so i can get a 98 πŸ™‚

sweet lodge
#

!f-string

#

!f-strings

wise cargoBOT
#

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

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

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

shut hill
#

Hemlock

#

wanna tutor me πŸ™‚

zenith radish
#

surprise meeting

shut hill
#

i will give you print statments

#

πŸ™‚

#

😭

#

hemlock

#

not one on one

#

im sayin in a vc

#

πŸ™‚

rugged root
#

!e

name = "Mr. Hemlock"
combined_concat = "Hello " + name  + "."
combined_format = "Hello {}.".format(name)
combined_fstring = f"Hello {name}."
print(combined_concat)
print(combined_format)
print(combined_fstring)
wise cargoBOT
#

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

001 | Hello Mr. Hemlock.
002 | Hello Mr. Hemlock.
003 | Hello Mr. Hemlock.
shut hill
#

WOAH

#

wait

#

hold u

#

p

#

wiaitiiwiawiittiwiait

#

oml

#

floaT?

#

can u explain float

#

i know

#

but im wondering

#

im so lost

#

;-;

#

yea

#

lol

#

ok

#

and int

#

yea

#

lol

#

and that thing

#

ok mmbbmb

#

for format what does it do?

#

and what doesthe curly braces do?

#

Like what tho

primal yacht
#
# integer `int`
12345
-12345
# floating point / decimal number `float`
123.456
-12.0
1e20
shut hill
#

oh so name

#

so u can also do "Hello (name). "

#

???

#

Ohhh

#

so wehat u did was 3 diffeeent methods

#

ohhhh

#

wait what is the easiest one

#

u said?

#

whats good abiut it

#

can u give me an excersie for me to do?

#

tytyt

#

dw take ur time. πŸ™‚

#

where do ui work?

rugged root
#

!e

number = 5
example = "The number is: " + number
wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "<string>", line 2, in <module>
003 | TypeError: can only concatenate str (not "int") to str
rugged root
#
number = 5
example = "The number is: " + str(number)
shut hill
#

so would you put it inside the string with curly parentisis?

sweet lodge
#

!eval

x=22
print(f"{x=}")
shut hill
#

oh

wise cargoBOT
#

@sweet lodge :white_check_mark: Your eval job has completed with return code 0.

x=22
shut hill
#

!e

example = "The number is {number}"

print(example)```
wise cargoBOT
#

@shut hill :white_check_mark: Your eval job has completed with return code 0.

The number is {number}
shut hill
#

oh

#

;-;

#

ohhhh

#

!e

example = f"The number is {number}"

print(example)```
wise cargoBOT
#

@shut hill :white_check_mark: Your eval job has completed with return code 0.

The number is 5
shut hill
#

coool

#

and how about urs?

#

which one do u prefer

#

The one i did?

#

what do u mean

#

!e

example = f"The number is {}"

print(example)```
wise cargoBOT
#

@shut hill :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 2
002 |     example = f"The number is {}"
003 |                                  ^
004 | SyntaxError: f-string: empty expression not allowed
shut hill
#

do u have to put stuff in it?

#

whats that

#

!e

example = "The number is {}"

print(example)```
wise cargoBOT
#

@shut hill :white_check_mark: Your eval job has completed with return code 0.

The number is {}
shut hill
#

oh

#

again...

#

!e

example = "The number is " + {}

print(example)```
wise cargoBOT
#

@shut hill :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 2, in <module>
003 | TypeError: can only concatenate str (not "dict") to str
shut hill
#

oop

rugged root
#
example = "The number is {}".format(number)
shut hill
#

!e

example = "The number is {}".format(number)

print(example)```
wise cargoBOT
#

@shut hill :white_check_mark: Your eval job has completed with return code 0.

The number is 5
shut hill
#

oh cool

#

okok

#

but the f string is better?

#

legacy menaing...

primal yacht
#

!e ```py
code goes here
```

shut hill
#

oh ok...

#

my class is starting....

#

but imma mute my teacher πŸ™‚

#

okok lol

#

yea ok thank you.

#

thanks!

#

Waitttt

#

Can you guys gimme answers πŸ™‚

#

on my test lol

#

;-;

#

😭

#

okok

#

lol

#

noo

#

im not cheating

#

im learning

sweet lodge
#

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

shut hill
#

im jkjk

#

how about excersies?

#

excersises?

primal yacht
#

help people learn how to do the assignment without doing it for them.

shut hill
#

Oh ok.

#

No, im saying homework.

#

Of course test.

#

im saying homework...

#

okok

#

sounds good ill be back aftrer class maybe.

#

Bye!!

#

is it normal to do tests on paper... ;-;

rugged root
#

Yes

shut hill
#

oh...

#

why tho?

rugged root
#

In fact that's how things have been for decades

shut hill
#

when doing interviews do they tell you to write code on paper too?

primal yacht
shut hill
#

rip

#

this my excersises for today...

#

could you guys help me later after class?

rugged root
#

You need to put forth your best effort first.

shut hill
#

yea ofc

rugged root
#

Only if you're super stuck

shut hill
#

okok

#

ty

rugged root
primal yacht
shut hill
#

how would i make an input from a user and replace the vowels or any letter to something else?

primal yacht
terse needle
shut hill
#

okok

primal yacht
#

input function, replace method *

terse needle
#

!e

my_string = "Hello World!"
print(my_string.replace("e", "a"))
wise cargoBOT
#

@terse needle :white_check_mark: Your eval job has completed with return code 0.

Hallo World!
shut hill
#

would this work?

#

word = input("Enter a word: ")

word = word.replace("a", "")
word = word.replace("e", "
")
word = word.replace("i", "")
word = word.replace("o", "
")
word = word.replace("u", "*")

print(word)

#

word = word.replace("a", "*")
word = word.replace("e", "*")
word = word.replace("i", "*")
word = word.replace("o", "*")
word = word.replace("u", "*")

print(word)```
primal yacht
#

also got to do uppercase

shut hill
#

wait why

#

???

primal yacht
#

Apple -> Appl*

shut hill
#

huh

#

ohhh

#

okok