#voice-chat-text-0

1 messages Β· Page 287 of 1

earnest crow
#

literally me

eager tapir
#

.latex
$1^5 - 1=0$ is trivially a multiple of 5

viscid lagoonBOT
earnest crow
#

yep

eager tapir
#

.latex
Assume that $p(n)=n^5-n$ is true, so check if the expression still holds for $p(n+1)$

viscid lagoonBOT
eager tapir
#

.latex
$p(n+1)=(n+1)^5-(n+1)$, expanding, we get:

viscid lagoonBOT
earnest crow
#

Nah

#

17 doesnt

#

work

eager tapir
#

.latex
$(n^5+5n^4+10n^3+10n^2+5n+1)-(n+1)$

viscid lagoonBOT
ivory stump
#

Awh I was trying to do a neat expansion but had to use a modulo trick to make it work

eager tapir
#

.latex
$=(n^5-n)+5(n^4+2n^3+2n^3+n)$

viscid lagoonBOT
eager tapir
#

(re-writing)

ivory stump
eager tapir
#

.latex
The first term $(n^5-n)$ is a multiple of 5 by assumption, and the second term is clearly a multiple of 5 since it has a 5 on front of it

viscid lagoonBOT
eager tapir
#

.latex
This concludes the proof that $n^5-n$ is a multiple of $5$

viscid lagoonBOT
eager tapir
#

Thanks

eager tapir
viscid lagoonBOT
earnest crow
#

Oh right

#

my bad

eager tapir
#

LEFT

#

gotem

#

Anyways, for those interested (which means you two only), you can go ahead and try these ones. I won't solve them here unless you want me to

#

.latex
Prove the following statements valid $\forall n\in \mathbb{N}$:

viscid lagoonBOT
eager tapir
#

.latex
$5^n-4n-1$

viscid lagoonBOT
eager tapir
#

woops

#

.latex
$5^n-4n-1$ is a multiple of $16$

viscid lagoonBOT
eager tapir
#

Anyways I wont write more because i doubt you guys are still alive

#

lemmino tho

ivory stump
#

Welp if they're all in the same inductive vein as the previous it's no fun

#

Here p(n+1) = 5p(n)+16n

willow gate
#

@rugged root how can i get permission for screen share

eager tapir
ivory stump
#

Zero case is trivial

#

And a +1 induction

#

p(0) = 16k, where k=0 p(n+1) = 5*16k+16n = 16p where p=5k+n qed

eager tapir
#

.latex
Assume $p(n)=5^n-4n-1=16k$; then,

viscid lagoonBOT
ivory stump
eager tapir
#

.latex
$p(n+1)=5^(n+1)-4(n+1)-1=5\cdot 5^n - 4n -5$

viscid lagoonBOT
eager tapir
#

CORRECTION

#

.latex
$p(n+1)=5^{(n+1)}-4(n+1)-1=5\cdot 5^n - 4n -5$

viscid lagoonBOT
ivory stump
#

you certainly love your capslock key

eager tapir
viscid lagoonBOT
eager tapir
# viscid lagoon

.latex
Replace the $5^n$, we get, $5\cdot (16k + 4n + 1) - 4n -5 = 16(n+5k)$

viscid lagoonBOT
eager tapir
#

More evident that it is a multiple of 16

eager tapir
ivory stump
#

Well actually

#

slightly differently

eager tapir
#

That is why I was a little confused

#

Here is another one, I doubt you can get this one easily:

ivory stump
eager tapir
#

.latex
$n^3+(n+1)^3+(n+2)^3$ is a multiple of $9$ for all $n\in\mathbb{N}$

viscid lagoonBOT
eager tapir
#

good luck...

ivory stump
#

sigh ah well off we go

eager tapir
#

heh... ehhehehe.....

#

HEHEHEHEHEHEHHE

#

AHAHHAHAAHAHHAHAHAHAHAHAHAHAHA

#

SUFFER

#

SUFFER FOR ETERNITY ATTEMPTING TO SOLVE THIS

#

*It does have an answer, so this is NOT a trick question

ivory stump
#

oh I made a mistake in a multiplication

#

But we're done

#

p(n+1) - p(n) = 9(n^2+3n+3)

#

Which is sufficient

#

You can astronomically reduce the work by considering term difference whenever there's a function of this form

eager tapir
#

huh

#

thats...

#

interesting

#

damn

#

quick too

#

I suppose its a valid answer

#

well well well

#

sorry but I can't let you live...

#

here is one that will definetly make you go "fuck that"

#

and maybe "just show me the answer"

#

.latex
$a^n-b^n=(a-b)\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$ for all $n\in\mathbb{N}$

viscid lagoonBOT
eager tapir
#

.latex
$a^n-b^n=(a-b)\display\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$ for all $n\in\mathbb{N}$

karmic obsidian
# viscid lagoon

this funcation has 5 degrees which will correspond to 5 solutions
I don't we can solve it tho ? or can we ?
we would have to apply factorisation ...

eager tapir
#

Original question was:

#

.latex
Prove $n^5-n$ is a multiple of $5$ for all $n\in\mathbb{N}$

viscid lagoonBOT
eager tapir
# viscid lagoon

.latex
$a^n-b^n=(a-b)\display\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$ for all $n\in\mathbb{N}$

viscid lagoonBOT
eager tapir
#

very nice, seems lancebot cant show the different variants of sum

#

GIVE UP CHEEKI

#

ALL YOUR YEARS OF EDUCATION WENT FOR NOTHING

#

you will NEVER

#

*tricky way to solve it, in particular, a unique way of obtaining the p(n + 1) expression

#

(terms and conditions apply)

rapid chasm
#

@somber heath We lost nearly 220 members after changing the server icon.

ivory stump
#

@eager tapir done

eager tapir
#

w-

#

what

ivory stump
#

No induction involved

#

Pure sum algebra takes you from RHS to LHS trivially

eager tapir
#

Yes, but that does not qualify as a proof

ivory stump
#

Sure does, all operations in that are reversible

eager tapir
#

Show me how you've done it then

#

For all n?

ivory stump
#

I haven't been perfectly rigorous, this fails for n=0 but that's a trivial case so I didn't mention anything to that effect

eager tapir
#

Hmmmmmmmmmmm

#

Oh, silly me, look at that! I've forgotten to add one thing

#

.latex
Prove by induction that $a^n-b^n=(a-b)\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$ for all $n\in\mathbb{N}$

viscid lagoonBOT
eager tapir
#

Look, first step, maybe you can get an idea

#

Actually good that you've written it as you did above

#

Will help in the final step

ivory stump
#

Fine

#

say no more

eager tapir
#

.latex
$a^n=b^n+(a-b)\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$

viscid lagoonBOT
ivory stump
#

Before I begin, I'd like to say I hate nothing more than an induction question that doesn't need it

eager tapir
#

Multiple a on both sides

ivory stump
eager tapir
ivory stump
#

But when the proof structure you have to roll out for induction is more cumbersome than a direct proof it isn't worth it

eager tapir
#

You won't know which is more cumbersome until you try all ways

ivory stump
#

Honestly it's close to be fair

eager tapir
#

.latex
Multiplying $a$ on both sides gets you; $a^{n+1} = ab^n + (a-b)\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$

viscid lagoonBOT
eager tapir
#

Half way there

#

Magic is about to happen

ivory stump
eager tapir
#

And we are here to witness it

ivory stump
#

I'm happy that it reduces trivially no need to latex it

eager tapir
#

.latex
Subtract both sides by $b^{n+1}$; a^{n+1} - b^{n+1} = ab^n - b^{n+1} + (a-b)\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$

ivory stump
# viscid lagoon

This reorder is the only non-trivial step, I liked that part tbf

eager tapir
#

.latex
Subtract both sides by $b^{n+1}$; a^{n+1} - b^{n+1} = ab^n - b^{n+1} + (a-b)\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$

viscid lagoonBOT
eager tapir
#

.latex
Subtract both sides by $b^{n+1}$; a^{n+1} - b^{n+1} = ab^n - b^{n+1} + (a-b)\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$

viscid lagoonBOT
eager tapir
#

sad

eager tapir
#

Anyways, congratulations

#

You've done ot

#

You should be semi proud

ivory stump
#

There, about as much proof as I'd bother writing

#

Anyway those were interesting

#

Cheers

eager tapir
eager tapir
#

πŸ‡΄ πŸ‡Ό πŸ‡΄

#

anyways im out

scarlet halo
#

yall check out this clown decoration

#

open loot boxes rn

ivory stump
scarlet halo
#

settings

ivory stump
scenic garden
#

What are you guys talking about?

#

You mean "Naughty" in a not-creepy way, I assume @wise loom

scarlet halo
wise loom
#

I mean sure.. whatever suits you best

scenic garden
#

Oh

#

What do you do? @urban abyss

frank rock
#

hi, I need help with my raycaster

#

im trying to implement a line_line intersection algorithm

urban abyss
scenic garden
#

Oh shoot no, had someone else calling my attention

#

What was it?

frank rock
#

d

urban abyss
#

fun stuff sometimes, other times not

#

you?

scenic garden
#

I'm trying freelance currently, how long have you been at it? @wise loom

frank rock
#

with some system of equations

scenic garden
#

I hear it's especially challenging

#

#?

#

LOL

urban abyss
frank rock
#

there was missing that part

#

yes, of course, but im going to try it in both

scenic garden
#

Woah, how long have you been there? You make it sound like you're part of the founding team

#

I see, why'd you pick tech?

#

You have a very loud keyboard lol

#

Didn't pick it?? Sounds interesting, what's your story? If you don't mind me asking

#

Drinking tea and got nothing much better to do rn lol

wise loom
#

What tea is that? A strong brew I imagine

scenic garden
#

That's impressive, are you considered a senior yet?

scenic garden
#

It's got cinnamon

wise loom
#

cinnamon wow 🀯

scenic garden
#

What's made you stay at that company this long?

#

I've heard of others switching every couple of months

#

Well then, I sure know how to pick my timing to jump into tech

#

What time is it there?

#

Good point, I'm still new though so I've got lots to do before I see the fortune of being in tech

#

Who joined?

wise loom
#

Desside I think

scenic garden
#

Oh

#

Good job, you read my username right

#

I'm interested in Data Science but have some web dev experience due to some acquaintances

#

It's so competitive though

#

Like damn, it's crazy out there, and like you said. It's practically impossible to be cheaper than people in India

#

Any advice as someone who's already in and working at a company?

#

All right, my tea's up. Gtg. It was nice meeting you Derulo

scenic garden
oblique hollow
#

hi

#

havent gotten my 50 words in

#

@coarse remnant

#

#bot-commands message

#

do you develop in python?
or nah?

#

fair enough

#

hi josh

iron stump
#

sup

wise loom
timber edge
#

@random sorrel bro

somber heath
#

@onyx quartzπŸ‘‹

#

@slender sierraπŸ‘‹

slender sierra
teal jackal
somber heath
#

@sweet gustπŸ‘‹

sweet gust
#

hi @somber heath

somber heath
sweet gust
#

have some issue with my mic

teal jackal
somber heath
#

@tropic girder πŸ‘‹

tropic girder
#

1 second

#

I have to do the voice verification

#

nevermind

#

I havent been in the discord long enough

clever turtle
#

@somber heath

somber heath
#

@lethal plazaπŸ‘‹

lethal plaza
#

hey

#

whats going on?

somber heath
teal jackal
#

its for no one can spam

#

like random

#

yeah

somber heath
#

@hardy elmπŸ‘‹

teal jackal
#

Dang

hardy elm
#

yo

opaque hazel
#

can I make a ticket?

#

jeez man

#

that actually sucks

#

was keen to talk to people about python

#

Just starting out

#

😭

#

Look

#

either way

#

do you have any tips for a beginner on python

#

I am just starting out

#

I've been

#

following

#

youtube videos

#

Sorry just speaking like my brain is talking

#

Fair call

#

Look not trying to spam

somber heath
#

Corey Schafer

opaque hazel
#

Corey Shaffer?

somber heath
#

Python for Beginners

opaque hazel
#

I'm currently doing this atm

#

This video contains over 9 hours of python project tutorials designed to help you master python and learn through projects! There are over 21 unique python project walkthroughs in this content that range from beginner to advanced. See below for the timestamps for these projects:

➑️ Check out my software development course! https://techwithtim.n...

β–Ά Play video
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.

opaque hazel
#

This is what video I'm doing atm its just doing projects I'm slowly understanding how python works

#

Look I keep getting this error too for this program

somber heath
#

!e py a, b = 'ab' print(a) print(b)

wise cargoBOT
#

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

001 | a
002 | b
opaque hazel
#

no I'm still slightly confused

#

this is my code

#

It's 31 lines

#

basic

somber heath
#

!e py a = 'a' b = 'b' print(a) print(b)

wise cargoBOT
#

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

001 | a
002 | b
opaque hazel
#

Right so basically a = 'a' the a < at the start is the Variable that holds the a veriable

#

Right

#

So like a message

#

so print(a)

#

Would Print the letter a

#

and the a is before the = is what holds it

#

then the a after is what it holds

#

I understand that

#

then print creates the text

#

so thats more c++

#

I started learning C++ basic then it was too hard

#

so I turned to python

somber heath
#

!e py a, b, c = 'abc' print(a) print(b) print(c)

wise cargoBOT
#

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

001 | a
002 | b
003 | c
opaque hazel
#

needed a better understanding of

somber heath
#

!e py a, b = 'abc' print(a) print(b) print(c)

wise cargoBOT
#

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

001 | Traceback (most recent call last):
002 |   File "/home/main.py", line 1, in <module>
003 |     a, b = 'abc'
004 |     ^^^^
005 | ValueError: too many values to unpack (expected 2)
opaque hazel
#

Right

#

So basically I can do this

#

d, s, v, = 'dsv'
print(dsv)

#

Right

#

the d s v

#

are the variables

#

that hold

#

dsv

#

or string

#

Sorry I'm propper basic at python really really want to learn just getting into it

#

So sorry if I sound like a stud

#

Because it's not holding it

#

right

#

So its actually

#

more load

#

because it doesn't dirrectly hold variables

#

right

#

Did you see my code

#

I am pulling my hair out

#

trying to work out wtf

#

i'm doing wrong

#

I don't know if its Visual studio that's fucking me around

#

Yes

teal jackal
#

@opaque hazel bro is your problem solved ??

#

you cant do this d, s, v, = 'dsv'

#

you can do this
d=s=v='dsv'

somber heath
wise cargoBOT
#

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

001 | d
002 | s
003 | v
willow gate
#

@teal jackal hi

teal jackal
willow gate
#

have you ever create twitter bot?

teal jackal
#

no

willow gate
willow ruin
#
import tweepy

# Authenticate to Twitter
consumer_key = 'YOUR_CONSUMER_KEY'
consumer_secret = 'YOUR_CONSUMER_SECRET'
access_token = 'YOUR_ACCESS_TOKEN'
access_token_secret = 'YOUR_ACCESS_TOKEN_SECRET'

auth = tweepy.OAuth1UserHandler(consumer_key, consumer_secret, access_token, access_token_secret)
api = tweepy.API(auth)

# Your tweet content
tweet_content = "Hello, this is my tweet from a Twitter bot!"

# Post the tweet
api.update_status(tweet_content)

print("Tweet posted successfully!")
#

make something like this

willow gate
#
Aditya@Prakashs-MacBook-Pro botmark % /usr/local/bin/python3 /Users/A
ditya/Desktop/botmark/botx.py
Traceback (most recent call last):
  File "/Users/Aditya/Desktop/botmark/botx.py", line 15, in <module>
    api.update_status(tweet_content)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tweepy/api.py", line 46, in wrapper
    return method(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tweepy/api.py", line 979, in update_status
    return self.request(
           ^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tweepy/api.py", line 271, in request
    raise Forbidden(resp)
tweepy.errors.Forbidden: 403 Forbidden
453 - You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/portal/product
willow ruin
stuck furnace
#

Hey πŸ‘‹

#

One second sorry

#

You could add a thingy to tell it not to type check a particular line

#

Yeah

#

I think in that specific case though all you need to do is remove the BackendSampler annotation?

#

BackendSampler is a subtype of Backend?

#

The type of backend is Backend | None, in the arguments

willow gate
stuck furnace
#

Right πŸ€”

#

Yeah I'm not really sure what to suggest sorry!

#

Yeah but that won't allow to get away with anything πŸ˜„ Like e.g. this: ```py
class A:
x: int

class B(A):
x: str

#

Right, narrowing the type in the subclass should be ok.

upper basin
#
class A:
    x: int | str

class B(A):
    x: str
stuck furnace
#

Yeah that should be fine

#

Yeah but I think the issue is that lifetimes of the two variables overlap

#

The two variables being backend that you declared in the arguments, and backend that you declared inside the if block.

#

This is something I've picked up from learning Rust πŸ˜„

#
x: int        ---+
if x == 42:      |
    x = "abc" -+ |
    ...        | |
    print(x)  -+ |
print(x)      ---+
#

I'm not sure if this is helpful or just confusing ^

#

I.e. what is the type of x on the last line?

#

Β―_(ツ)_/Β―

#

At the end, you wouldn't know if the type was int | None or str.

#

But if you can determine statically that the lifetimes don't overlap, then you can treat them as like two different variables.

#

Like: ```py
x: str = "123"
x: int = int(x)
...

#

You could rename the second x to y and all would be fine, in this case.

#

No probs

#

Erm, I wouldn't say it's a huge concern

#

A variable is just a reference to an object.

#

Until it goes out of scope yeah

#

Both variables will cease to exist when the function returns.

#

Gotta go, I'll be back later πŸ‘‹

#

cya

opaque hazel
willow gate
#

@somber heath hello

somber heath
#

@whole bear πŸ‘‹

whole bear
somber heath
#

Suit yourself.

#

Many people do just hang out here and listen to us like it's a podcast.

#

When it isn't dead air.

#

But we do keep an eye on this channel, so it's not like you're unable to join in at your leisure.

#

@cobalt sphinx πŸ‘‹

whole bear
somber heath
whole bear
#

computer science and python cord it looks like you might just be the guy XD

#

minecraft?

#

assembly?

#

help me get this Ai architecture into my firmware

#

use openai and copilot allot

somber heath
#

@whole bear πŸ‘‹

whole bear
#

i didnt do voice

somber heath
whole bear
#

ok thanks

#

No disrespect becuase you sou like a nice guy, but I just wanna punch you for no reason @ opalmist

urban abyss
#

sup vc how's it goign

graceful kelp
#

...lol

rugged root
#

Sup nerds

cunning heath
#

sup

rugged root
#

It's alright. Nah, my wife has a doc visit

#

So I'm in the waiting room

#

As good as they're going to be

#

Yarp

#

Thanks

#

Doing we all

#

Don't rather

cunning heath
#

wheres the cat?

rugged root
#

Still really raw, though

#

And plenty of things would be subject to change

#

So I'd be wary of trying to integrate it as part of a larger project

whole bear
#

does anyone know a gui tool in python rather than tkinter

rugged root
#

"I'VE DEPLOYED THIS!!!"

#

I'd still go with pdm or poetry for now

somber heath
#

tkinter is the Python interface to tk.

rugged root
#

Who knows when rye will be properly stable

whole bear
somber heath
#

PyQT, beeware, kivy, dearpygui...others.

rugged root
#

Hawt

whole bear
#

ask openai that and say "list 50"

urban abyss
#

pysimplegui?

#

openai will make up new ones to fill 50 items

#

πŸ₯Ό

whole bear
#

cap

urban abyss
#

🚫 🧒

rugged root
#

I just wanted to poke my head in. I'll talk to you file folks later

whole bear
#

i had it give me 75 so....

urban abyss
#

got swatted by automod πŸ˜‚

peak depot
rugged root
#

@minor sapphire ffmpeg -i input.mp3 output.wav

minor sapphire
rugged root
peak depot
#

hi Plome

minor sapphire
rugged root
#

Co-worker is here so back to Typelock

#

@next tapir You said you use VS Code, right?

#

Just couldn't remember

dark lantern
#

anyone good with the pickle concept in python?

rugged root
#

I'm familiar with it. What's your question?

dark lantern
#

i am developing a game with multiple levels and for each level, i made a list and i need to convert them into csv

#

earlier

#

i used a level maked that automatically did that fo rme

#

do you know how i could do it without a level maker

rugged root
#

What was the level maker?

dark lantern
#

its just helps me arragne my level

#

In this video, I explain the code for my updated level editor. This allows you to create and export levels to be used in your games. In part two I add in parallax scrolling for the background and I create a grid to split the screen into individual tiles.

All the code and assets are on github:
https://github.com/russs123/LevelEditor

Credits f...

β–Ά Play video
rugged root
#

Ohhhh Pygame's

#

Neat

dark lantern
#

this one but a bit different

#

ye

rugged root
#

What's the issue with using the editor? And I guess it would depend on what the output of the editor looks like

dark lantern
#

this is my level map list

#

the editor works

#

but i dont want to be using others peopeles work

rugged root
# dark lantern

I see you in there lone 8. Don't think you went unnoticed.

rugged root
#

People make tools that are better or more conveneint than ones we would create

dark lantern
#

i want to convert this into a csv taht will load using pickle

dark lantern
rugged root
#

Fair

#

Why do you want or need to pickle it?

#

Conversion from CSV to list wouldn't be that intensive

#

There's a csv writer/reader built into Python

dark lantern
#

to load in multiple levels after the plyer finishes the one level, the pickle would load in the next level

#

i see

rugged root
#

Unless you have huge levels, generating it from a CSV wouldn't be that intensive

dark lantern
#

how to i code that list and make it into a csv using that?

rugged root
#

I'll do a quickie example

#

One moment

#

!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 Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

rugged root
#

Toss it in the paste bin here

dark lantern
#

ok

rugged root
#

@gentle flint And you're SO very modest, too

#

It'll be a sec, I want to make sure I tell you the right thing

dark lantern
#

ok

rugged root
#

HOKAY, so

#
import csv

map_list = ... # just imagine the huge input list is here

with open("map.csv", 'w', newline='') as csv_file:
  file_writer = csv.writer(csv_file)
  file_writer.writerows(map_list)
#

And when you want to load it back as a list...

#
import csv

with open("map.csv", newline='') as csv_file:
  file_reader = csv.reader(csv_file)
  map_list = list(file_reader)
#

Quick and easy

#

@gentle flint It's so loud, bro

#

@molten pewter I'll banter you all day

#

MORTAL BANTER

#

Bantality

#

Oh that reminds me

dark lantern
#

so will that automativcally save as a csv file?

whole bear
dark lantern
#

omggg tyyy

#

im gonna try it out now

rugged root
#

The writer will take the list and put them in row by row

#

Oh make sure that when you use writerows plural

dark lantern
#

i see did it work for you when you used it?

rugged root
#

There's also writerow which is one at a time

#

Yep!

dark lantern
#

omg tyyy

rugged root
#

Wrote it and loaded it back

#

This is my large double resonant solid state tesla coil (DRSSTC III) playing my single channel & monophonic version of Mortal Kombat's main theme!
This tesla coil is about 2.20m tall and it's able to generate up to 3.60m sparks on the air. Unfortunately in this video, the input power was very limited in the range of 6kW because it's power suppl...

β–Ά Play video
dark lantern
#

where will the file be saved?

rugged root
#

Wherever the script file is opened. Without any other pathing, just having the file's name will just save it to current working directory

#

@peak depot That feels.... excessive

dark lantern
#

i see so if i save it in a folder called level, it will be saved there right

gentle flint
rugged root
#

Bingo

#

And you can do that with a relative path

#

So it's just based on your projects structure and stuff

dark lantern
#

if you dont mind could you explain what relative path means

rugged root
#

Of course. So there are absolute paths which are the full path all the way to the file: C:/Projects/Game/Levels/map.csv for example

dark lantern
#

i see

rugged root
#

Then there are relative paths. So lets say that you're currently in the Game folder and you run a file from there. You can load the map file within the levels folder:

with open("./Levels/map.csv")...
#

. simply means current directory

dark lantern
#

ohh

rugged root
#

.. means parent directy, so in this case it would be Projects. . would be Game

dark lantern
#

i see

rugged root
#

Those are handy to know when you're using your terminal as well

#

If you cd'd into the wrong directory and need to scoot back by one: cd ..

dark lantern
#

with open("map.csv", 'w', newline='') as csv_file:
file_writer = csv.writer(csv_file)
file_writer.writerows(map_list)
so i have to replace the inside of the brackets with the realvive thing

rugged root
#

Well this is already relative

dark lantern
#

ohhh

rugged root
#

It's just if we want to put it somewhere other than the current directory, we have to be more specific

#

The most specific is an aboslute path

#

Anything less is relative

dark lantern
#

could you please explain what the three lines do one by one? im sorry im a beginner sorry to botehr you so much

rugged root
#

It's no problem! This is what I like doing

dark lantern
#

with open("map.csv", 'w', newline='') as csv_file:
file_writer = csv.writer(csv_file)
file_writer.writerows(map_list)

#

:))

rugged root
#

I'm going to take the first line apart a bit weirdly

#

Let's start with the open

dark lantern
#

ok

rugged root
#

So open() lets you open, create, modify, etc. a file. Typically it's going to be some sort of text file, like a .txt, .csv, .json, etc.

dark lantern
#

i see

rugged root
#

In this case, we're saying "Open this file in write mode."
This means that if the file doesn't exist, Python will create it and open the newly created file. If it does exist, it clears the file and prepares it for use

#

That's what the 'w' argument is

dark lantern
#

ohh i see

rugged root
#

By default, if you don't specify, it will open in read mode

dark lantern
#

like file handling

rugged root
#

Exactly

dark lantern
#

i see

rugged root
#

@boreal kernel Is it specifically the Jenkins part that's tripping you up?

rugged root
# dark lantern i see

newline='' simply means that when the file would do a new line normally, we instead add an empty string. The csv.writer will handle the newline characters

gentle flint
dark lantern
#

i see so it will do it for everyline in my list

rugged root
#

Exactly. It knows how to format it properly, so it takes over for the regular open() handling in that regard

dark lantern
#

i see

rugged root
#

The with context manager is really handy

#

Typically when you open a file, you have to then .close() it afterward

gentle flint
dark lantern
#

ye

molten pewter
dark lantern
#

i see

stark river
#

does anyone use jenkins anymore?

rugged root
#

This does it for you. Anything within that with block will treat that file as being open and do things to it. However if you try to use csv_file after that block, it'll throw an error

stark river
#

iirc with is a context manager

dark lantern
#

oh

rugged root
#

All you need to know is that it's handy

gentle flint
rugged root
#

Makes your code less error prone

gentle flint
#

switched about 4 years ago

dark lantern
#

where is the with written in the code tho?

rugged root
#

with open()...

dark lantern
#

ohhh yhh i see itt

rugged root
#

Ye

#

And as csv_file is just saying what you want to call the file object within that block

#

You could do the same things with the following:

dark lantern
#

ye

rugged root
#
csv_file = open("map.csv", 'w', newline='')
file_writer = csv.writer(csv_file)
file_writer.writerows(map_list)
csv_file.close()
#

But the with is best practice in this case

dark lantern
#

it does the same thing as tthe firt code thats is sent right but that is mre efficient?

rugged root
#

I think the efficiency is the same

dark lantern
#

oh i see

rugged root
#

But it just makes for cleaner code and makes bug catching and stuff easier

#

And if you forget to close files after using them, it can cause problems

#

This makes it so that you don't have to remember to do it

gentle flint
#

which saves developer hours; efficient use of available manpower

rugged root
#

It just does it for you

dark lantern
#

ye

rugged root
#

@boreal kernel

#

That's what he's talking about

#

@dark lantern Everything making sense so far?

dark lantern
#

yes

rugged root
#

Next line then?

dark lantern
#

yes

stark river
#

can with open() also read from a file stream?

rugged root
#

I think? I'd have to double check

#
file_writer = csv.writer(csv_file)

So in order to take our list and turn it into a csv, we have to use the csv built in library. The writer function inside of it will create a writer object which does all the heavy lifting. By default, all we have to feed it with is a file object, so csv_file in our example

boreal kernel
rugged root
#

You can tweak it and customize it if you have special circumstances with your data

stark river
#

according to SO, there is a param to do it but it is better to use some lib

rugged root
rugged root
boreal kernel
rugged root
#

Nope sorry

rugged root
#

One sec, talking to a co-worker

dark lantern
#

thats ok

rugged root
#

Pretty much from then on it's just feeding your lists into the csv writer using .writerows(), which takes multiple rows at a time or in this case a list of lists, and turns it into a proper CSV format
https://docs.python.org/3/library/csv.html#

#

Both reader and writer are the same except, well, one reads from the file and the other writes to it

#

I'll be back, sorry.

dark lantern
#

i see ty

#

np

rugged root
#

Everything make sense more or less now?

#

Oh, and I really don't recommend using pickle unless you know you need to

dark lantern
#

yes it makes sense ty

#

thats ok i am uploading csv files using pickle

rugged root
#

Eh?

#

What do you mean

dark lantern
#

gimme a sec

#

ignore the first comment

rugged root
#

Is the level data just the csv/list of lists?

#

If so then you don't need pickle for that

#

It's really best suited for more complicated objects

dark lantern
#

one sec, ill show you the video of teh guy i am following

rugged root
#

Crap, I'll be back later, sorry

#

Having to call a vendor

dark lantern
#

In this Python tutorial I code a Platformer Game using the PyGame module. I'm going to cover the addition of new levels and how to manage different levels within the game

Code & assets on my website: http://codingwithruss.com/gamepage/Platformer
Alternative link: https://github.com/russs123/Platformer

Code for level editor: https://github.com/...

β–Ά Play video
#

oh i see ok

rugged root
#

Sorry I'm not around more

#

Work has just been so many little things

whole bear
short owl
#

coffeeee gooood !!!! bzzzzzz

oblique hollow
#

hi

#

i

#

just

#

need

#

10

#

more

#

messages

#

so,

#

i

#

can

#

speak

#

@stark river hello!

#

im having so much fun

earnest crow
#

Hey

#

I can't speak rn

#

How are you doing

#

It's pronounced normally like content words rod-ent-US

#

Idk google might be able to pronounce it

#

Are you blinded like blind or like the guy from star trek? Your profile picture has the vibe of the guy with vision

#

I had this IGN for years

#

Isn't it more like Greek?

#

Fair haven't seen azbuka for a long time

#

(azbuka is their alphabet

#

I've seen avatar

#

Both oh them

#

*of

#

You coded for too long

#

Yep I do

#

You think in c++?

#

@echo off
:looop:
Start
Goto looop

#

Run this as a bash

#

And your PC go booom

#

It's a loop that opens CMD than calls itself again

#

Well it's a fork bomb

#

It's closer to the core

#

Godo assembly lol

tardy tusk
#

for talk in voice chat i have to text 50 messages

earnest crow
#

Assembly is the real pain

#

Or brainfu*k

#

Ok

#

They probably won't

tardy tusk
#

hi

#

how are you

earnest crow
#

Again?

tardy tusk
#

what

earnest crow
#

Yep

tardy tusk
#

ok

earnest crow
#

@tardy tusk go to off topic I g

#

This is voice chat

tardy tusk
#

wow

#

cool

earnest crow
#

Oh

tardy tusk
#

really?

earnest crow
#

I do python games

tardy tusk
#

cool

earnest crow
#

It's not

#

But nice to improve at python

tardy tusk
#

im python beginner

#

now im learning pandas

#

from yt videos

earnest crow
#

Yep

#

Damn I kinda struggle to understand you where is this accent from

#

*typo ik

#

It's real fast

#

That could be it

#

3 years Ig

#

Maybe 2.5

#

I got some games

#

Not only but yeah

#

I can't because I'm having technical problems

#

What were you asking?

#

U

#

Mic kinda broken

#

He got Lost

#

So he's on python discord

#

Now you pronounce it well

#

πŸ’ͺ

#

Nevermind imma go

#

Nice hearing from y'all

#

:))

somber heath
#

@torpid zephyr πŸ‘‹

torpid zephyr
#

Sup

whole bear
#

I'll see you later guys, need to get some zZZ

fierce stratus
#

Hello

#

yeah, a lot of times

#

oh so it kind a scrapes the data and displays just the info that you need right?

obsidian dragon
#

python is so irritating some times

#

reverse the issue

urban abyss
#

what's the problem ^?

obsidian dragon
urban abyss
#

classic

obsidian dragon
whole bear
dull sluice
#

!code

wise cargoBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

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

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

For long code samples, you can use our pastebin.

dull sluice
#
print("Hello world!")
sly shard
#

`

dull sluice
#

```py
print()
```

#

!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 Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

sly shard
#

game_loop(word_list, name)

#

def game_loop(word_list, name):

dull sluice
sly shard
#

Traceback (most recent call last):
File "C:\Users\harry\PycharmProjects\pythonProject\HangManFinalsui.py", line 120, in <module>
start_game()
File "C:\Users\harry\PycharmProjects\pythonProject\HangManFinalsui.py", line 26, in start_game
game_loop(word_list, name)
File "C:\Users\harry\PycharmProjects\pythonProject\HangManFinalsui.py", line 64, in game_loop
if highscore < saved_highscore:
^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'saved_highscore' where it is not associated with a value

dull sluice
#

add this in the first line of game_loop
with open("highscore.txt","r") as f: saved_highscore=int(f.read())

urban abyss
sly shard
#

@dull sluice thx for the help

#

i got it

dull sluice
#
"""
______
|/   |
|   \O/
|    |
|   / \ 
|_________
"""
"""
______
|/   |
|   \O/
|    |
|     \ 
|_________
"""
"""
______
|/   |
|   \O/
|    |
|       
|_________
"""
"""
______
|/   |
|    O/
|    |
|       
|_________
"""
"""
______
|/   |
|    O 
|    |
|       
|_________
"""
"""
______
|/   |
|    O 
|    
|       
|_________
"""
"""
______
|/   |
|      
|     
|       
|_________
"""
"""

|/
|     
|    
|       
|_________
"""
"""

|
|     
|    
|       
|_________
"""
"""





 _________
"""

@sly shard here is some asci art if u want to use it it has 10 steps bc thats how many guesses u allow

sly shard
#

alr thx

somber heath
#

So they're not only hanging them, they're dismembering them. Barbaric.

dull sluice
#

bc he takes the score from 100 by 10 each wrong guess

somber heath
dull sluice
#

true

#

it only means they already dismemberd him and now are putting them together on this stand or what that i dont know the name of

somber heath
#

Gibbet.

abstract lantern
#

Hey

somber heath
#

They kept thinking about him, he kept getting remembered.

dull sluice
abstract lantern
#

May I ask, has anyone encountered with such error when working in django?

#

Reverse for 'SMSpage' with keyword arguments '{'app_label': 'phonemasseging'}' not found. 1 pattern(s) tried: ['api/v0\.0\.1/phonemassegingadmin/send\-sms\Z']

somber heath
rugged root
#
use std::collections::HashMap;

fn fruit_basket() -> HashMap<String, u32> {
    let mut basket = HashMap::new();// TODO: declare your hash map here.

    // Two bananas are already given for you :)
    basket.insert(String::from("banana"), 2);
    basket.insert(String::from("pear"), 4);
    basket.insert(String::from("apple"), 3);

    basket
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn at_least_three_types_of_fruits() {
        let basket = fruit_basket();
        assert!(basket.len() >= 3);
    }

    #[test]
    fn at_least_five_fruits() {
        let basket = fruit_basket();
        assert!(basket.values().sum::<u32>() >= 5);
    }
}
vocal basin
#

wondering if it'll hit 100

#

remove GC from OCaml, add proper lifetimes to C++

#

also

#

existence

vocal basin
#

btw Rust has a severe lifetime bug too

vocal basin
rugged root
#

Huh, I hadn't seen that yet

vocal basin
#

this conversion is only valid if 'b outlives 'a:

fn(&'a &'b T) => fn(&'static &'static T)
rugged root
#

But I'm still learning

vocal basin
#

when 'b outlives 'a, it's a perfectly correct conversion

#

also

#

yes you'd normally do that

#

and quite often

#

for example, when using &"literal"

rugged root
#

@loud tapir You are a robot

vocal basin
#

&"literal" is &'static &'static str

#

'_

loud tapir
#

@rugged root pepop pap

vocal basin
#

if the function requires &&str, using it with &"literal" is that conversion

rugged root
#

Huh

vocal basin
#

sometimes it puts implicit bounds

#

sometimes it just lets it be

#

no

rugged root
#

@tawny plume Yo

vocal basin
#

c++ just lets you cast a temporary reference to a non-temporary one because yes

#

this is what the bug actually is, iirc:

fn(&'a &'b (), &'b T) -> &'a T
=>
fn(&'static &'static (), &'b T) -> &'a T
#

conversion from function to function

#

as

#

or just assignment

#

for the first function to work, 'b needs to outlive 'a

#

second one has no such requirement

#

when implementing the first one, Rust assumes that arguments are valid

#

it's not an error, it

#

's UB

#

you can convert any 'a T to any 'b T with this

#

it needs to do more lifetime checks when casting

rugged root
#

@burnt shale Yo

burnt shale
#

Hey hey

vocal basin
#
fn shorten<'a, 'b>(_: &'a &'b (), r: &'b T) -> &'a T {
    r
}

fn shorten<'a, 'b: 'a>(_: &'a &'b (), r: &'b T) -> &'a T {
    //           ^^^^ implicit
    r
}
willow gate
#

@vocal basin hi

uncut meteor
#

How do you think of a git commit?

  • a diff from the previous commit
  • a snapshot of the current state
  • a history of every past commit
  • other
vocal basin
#

where's the option all three instead of none

#

parent commit is essential part of a commit, in my view

willow gate
#

can you join code/help vc

vocal basin
#

so, as a linked list, it contains the whole history

#

and a diff

uncut meteor
#

how do you think about git branches?

  1. just the commits that "branch" off
  2. the history of every previous commit
  3. just the commit at the end ("branch = pointer")
  4. other / show results
vocal basin
#

first also describes commits that don't belong to any branch

#

imv: 3 in implementation, 2 in use

uncut meteor
vocal basin
#

(I don't view, out of two split branches, any one as the main one as compared to the other, so no "just branched ones")

uncut meteor
noble solstice
#

Hello Guys!!

vocal basin
#

maybe encountered it a bit too often

#

commit not belonging to the/a branch

#

so if you rollback and force push enough and break everything else
it happens sometimes

#

"just burn down the repo, it can't be recovered; might delete the account as well, out of shame"

#

deleting fun

wind raptor
#

What url?

willow gate
vocal basin
#

I wonder how topologically non-trivial this can get

uncut meteor
tough osprey
#

DAAM

#

just the thing i needed

uncut meteor
willow gate
wind raptor
#

use an f-string to modify it maybe

#

There is very little context, so maybe explain what you are doing a bit better

willow gate
#

i do screen share

#

should we join code/help?

vocal basin
#

I'm trying to do cross-merge

#

but

#

it doesn't seem to be possible in web

#

(attempting to replicate what Griff described earlier)

wind raptor
willow gate
vocal basin
#

there being no close button is so annoying:

rugged root
#

Yeah that is weird that they don't

vocal basin
#

what does it want from me

#

I've already merged it

#

arrrrrrrrrrgh

rugged root
#

CTRL + Shift + R?

#

Maybe it's just cached and stuck

vocal basin
wind raptor
# willow gate ok np

Can you type out what you are doing. I can help from in here maybe if I can understand your problem.

peak depot
#

hi HemiPlot and CrisFrame

vocal basin
willow gate
#

ok i do screen share here

wind raptor
#

Hey @peak depot πŸ‘‹

#

sure

vocal basin
wind raptor
#

πŸ˜’

rugged root
#

Okay. πŸ₯πŸ–•

willow gate
#

see the get direcrion link

rugged root
#

(it's a reference, I promise)

wind raptor
willow gate
vocal basin
#

okay, I'm deleting fun once more

willow gate
#

i am sending the selected tweet from html to django views then to twitter bot

#

@wind raptor when i am sending the tweet the url get submitted with the html tags

whole bear
#

oh yeah i never got that

peak depot
wind raptor
#

Why are you sending it with html?

willow gate
wind raptor
#

You just need what is in the href, right?

peak depot
#

GIF = kif

willow gate
#

when i make tweet you can see that ancor tag also get tweeted

wind raptor
#

You can use an html parser to grab that out of there

whole bear
#

hi, i haven't been on the server long enough for vc privileges lol

wind raptor
#

beautiful soup is a popular one

#

I like lxml

whole bear
#

^

vocal basin
#

okay I give up

wind raptor
#

it's what beautiful soup uses

willow gate
vocal basin
#

I don't know how to do cross-merge weirdness

#

no, I removed it already

#

five times

wind raptor
#

bs is a bit easier to use

whole bear
#

currently teaching my self modular arithmetic via palindromic numbers, which has led me into really over-optimising this one problem

wind raptor
#

you can also just parse it with regex

#

up to you

willow gate
willow gate
vocal basin
#

@rugged root
defined on equivalence classes of numbers with same remainder

wind raptor
#

bs you don't need regex. you can just go through the html like it was a dictionary

whole bear
#

yeah priority queues use it for wrap-around pointers

wind raptor
#

beautiful soup

vocal basin
#

C integers mostly behave like they're modular

#

signed aren't guaranteed to, iirc

willow gate
wind raptor
#

it's used for parsing html

#

after a site is "scraped"

vocal basin
#

@uncut meteor
indexeddb?

wind raptor
#

still works for what you are doing

vocal basin
#

or whatever it's named

willow gate
vocal basin
#

different size limits

#

under 1MB?

wind raptor
whole bear
#

I've found that because palindromic numbers read the same both ways, you can look for factor pairs whose product makes the largest n-digit palindrome by calculating the modular inverse of one number

#

i think?

quick kayak
#

could i have some help with some of my tkinter code

willow gate
rugged root
#

@quick kayak You'll likely have an easier time getting help using our help system (see the #β“ο½œhow-to-get-help channel for more details on that).

Beyond that, what's the problem you're having?

quick kayak
#

im new and i dont understand the erro

#

oh wait nvm

vocal basin
#

I've considered using it for storing some stuff for a chat app

#

for searching

#

because I can't implement search server-side

#

(it's e2ee)

#

@rugged root
monotonic?

#

reading through the entirety of Rust's standard library docs is somewhat worth it

whole bear
#

i know people who use rust, threading mechanics on it do seem cool

vocal basin
#

Rust's standard library is not as large as Python's

rugged root
#
    for handle in handles {
        // TODO: a struct is returned from thread::spawn, can you use it?
        results.push(handle.join().unwrap());
    }
vocal basin
#

doesn't python require joining too

#

log is at 0.4.20 for quite some time

hasty stratus
#

how can I enable my mic?

vocal basin
#

but that's reasonably not in standard

rugged root
#

You might be right but I haven't done much/anything with threads in Python either

#

@hasty stratus check out the #voice-verification channel. That'll tell you what you need to know about the voice gate

vocal basin
#

rand is also excluded to update more freely

hasty stratus
#

fck i need to send 50 messages

#

can anyone help me? with something?

vocal basin
#

updated 16 days ago

hasty stratus
#

I cant get Gemini API

vocal basin
#

not stable

whole bear
#

kind of old news, but what do you guys think about the us government backing rust over c++

vocal basin
#

2 years ago

hasty stratus
#

and im over 18 and Portugal is allowed

#

read the note

willow gate
hasty stratus
vocal basin
#

why is it so non-trivial to find docs on pre-release version suffixes

vocal basin
hasty stratus
#

@rugged root arent on the list?

#

ok so you recomend VPN?

vocal basin
#

ig rand_core might be reasonable inclusion

hasty stratus
#

ok ty anyway guys

rugged root
#

Back to Typelock

vocal basin
rugged root
#

Wait

#

That...

#

Da fuq?

vocal basin
#

just how it depends on hashbrown

rugged root
#

That can't be right

whole bear
#

ok so i've gotten an offer to get onto a cs degree and definitely need to upgrade my laptop from this 5+ year old chromebook i currently use. the only thing i do enjoy on it is using the in-built linux environment to manage installs, so i'd want to properly get into using linux. Thus, I've started saving up for the newest thinkpad t14 because i know it's certified compatible with ubuntu, so getting mint cinnamon should work because it's essentially ubuntu under the hood? considering that they typically last a fairly long time (maybe not so much for the newer models but still), would this be worth it

rugged root
#

It's not lised in the imports, though

whole bear
#

for reference, i have no practical linux experience

vocal basin
#

((as far comments claim))

rugged root
#

Roger

vocal basin
#

currently has custom implementation

rugged root
#

I don't have much experience or talked to many/any people who have used their Chromebook for Ubuntu

ivory flower
rugged root
#

And you don't explicitly have to use Linux as your daily driver

vocal basin
#

I should find what version the comment refers to

rugged root
#

Learning about it, trying it in a VM, getting familiar with it...

#

Most of the time that's good enough to get your feet wet

#

Just use what is most comfortable for you

#

Plenty of folks use Windows and Mac as their primary

whole bear
#

yeah i plan to duel boot it in case, and make a windows 11 back up

vocal basin
rugged root
#

Personally I'd do a VM first to get the overall gist of it before dual booting

#

But that's just personal preference

whole bear
#

its just that my experience using 11 at school is miserable because of how scared it gets when you try to do anything with it

vocal basin
rugged root
#

Or get it set up how you like it

#

Most of getting to a good dev environment is just getting over the initial hurdles: getting your build tools, setting up your editor, build chain, stuff like that

#

Both have their pros and cons

whole bear
#

i mean if i get a thinkpad that's ubuntu certified, mint should work mostly fine right?

rugged root
#

Oh for sure

#

"Ubuntu Certified" just means it's a computer

vocal basin
#

another dependency of std:
https://docs.rs/hashbrown

rugged root
#

Raspberry Pi's can run Ubuntu if you so desired

#

Hell, the main OS for them are based on Debian

whole bear
#

i know it's lighter weight, but i've heard it has some screen-based problems