#voice-chat-text-0
1 messages Β· Page 287 of 1
.latex
$1^5 - 1=0$ is trivially a multiple of 5
yep
.latex
Assume that $p(n)=n^5-n$ is true, so check if the expression still holds for $p(n+1)$
.latex
$p(n+1)=(n+1)^5-(n+1)$, expanding, we get:
.latex
$(n^5+5n^4+10n^3+10n^2+5n+1)-(n+1)$
Awh I was trying to do a neat expansion but had to use a modulo trick to make it work
.latex
$=(n^5-n)+5(n^4+2n^3+2n^3+n)$
(re-writing)
.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
.latex
This concludes the proof that $n^5-n$ is a multiple of $5$
Thanks
.latex
$(17)^5 - 17 = 1419840=283968\cdot 5$
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}$:
.latex
$5^n-4n-1$
Welp if they're all in the same inductive vein as the previous it's no fun
Here p(n+1) = 5p(n)+16n
@rugged root how can i get permission for screen share
its not
how does this show its a multiple of 16?
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
Close, but I am struggling to understand where you got the 16n
.latex
Assume $p(n)=5^n-4n-1=16k$; then,
from the aforementioned p(n+1) = 5p(n)+16n
.latex
$p(n+1)=5^(n+1)-4(n+1)-1=5\cdot 5^n - 4n -5$
you certainly love your capslock key
.latex
$5^n=16k+4n+1$
.latex
Replace the $5^n$, we get, $5\cdot (16k + 4n + 1) - 4n -5 = 16(n+5k)$
More evident that it is a multiple of 16
SHIFT
That's what I did to get this relation earlier
Well actually
slightly differently
That is why I was a little confused
Here is another one, I doubt you can get this one easily:
Since you don't need to have any inductive tools to get the relation from before
.latex
$n^3+(n+1)^3+(n+2)^3$ is a multiple of $9$ for all $n\in\mathbb{N}$
good luck...
sigh ah well off we go
heh... ehhehehe.....
HEHEHEHEHEHEHHE
AHAHHAHAAHAHHAHAHAHAHAHAHAHAHA
SUFFER
SUFFER FOR ETERNITY ATTEMPTING TO SOLVE THIS
*It does have an answer, so this is NOT a trick question
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
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}$
.latex
$a^n-b^n=(a-b)\display\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$ for all $n\in\mathbb{N}$
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 ...
We are not looking for the possible solutions of n, but we are attempting to prove that the expression is a multiple of 5
Original question was:
.latex
Prove $n^5-n$ is a multiple of $5$ for all $n\in\mathbb{N}$
.latex
$a^n-b^n=(a-b)\display\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$ for all $n\in\mathbb{N}$
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)
@eager tapir done
Yes, but that does not qualify as a proof
Sure does, all operations in that are reversible
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
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}$
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
.latex
$a^n=b^n+(a-b)\sum_{k=1}^{n}{a^{n-k}b^{k-1}}$
Before I begin, I'd like to say I hate nothing more than an induction question that doesn't need it
Multiple a on both sides
Yeah fair enough I see that reducing
it is an elegant way to prove certain statements
I agree
But when the proof structure you have to roll out for induction is more cumbersome than a direct proof it isn't worth it
You won't know which is more cumbersome until you try all ways
Honestly it's close to be fair
.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}}$
I did the rest mentally and wasnt bothered to actually write it
And we are here to witness it
I'm happy that it reduces trivially no need to latex it
.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}}$
This reorder is the only non-trivial step, I liked that part tbf
.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}}$
.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}}$
sad
it was only going to get better
Anyways, congratulations
You've done ot
You should be semi proud
There, about as much proof as I'd bother writing
Anyway those were interesting
Cheers
YOU are interesting
π΄ πΌ π΄
anyways im out
Where would those be
under a particular tab?
What are you guys talking about?
You mean "Naughty" in a not-creepy way, I assume @wise loom
should be under user settings if u update your discord client or go on the web
I mean sure.. whatever suits you best
hi, I need help with my raycaster
im trying to implement a line_line intersection algorithm
i answered in voice not sure if you heard? π
software dev for an autonomous vehicles start up
fun stuff sometimes, other times not
you?
I'm trying freelance currently, how long have you been at it? @wise loom
with some system of equations
That sounds great! Is it hard to work at a startup?
I hear it's especially challenging
#?
LOL
you should try #game-development
many years
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
What tea is that? A strong brew I imagine
That's impressive, are you considered a senior yet?
You have no idea
It's got cinnamon
cinnamon wow π€―
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?
Desside I think
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
You too creepy potato guy
hi
havent gotten my 50 words in
@coarse remnant
#bot-commands message
do you develop in python?
or nah?
fair enough
hi josh
sup
@random sorrel #pedagogy message
@random sorrel bro
Hi friend ππ
hi
@sweet gustπ
hi @somber heath
have some issue with my mic
no check the rules
@tropic girder π
1 second
I have to do the voice verification
nevermind
I havent been in the discord long enough
@somber heath
@lethal plazaπ
@hardy elmπ
Dang
yo
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
Corey Schafer
Corey Shaffer?
Python for Beginners
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...
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
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
!e py a, b = 'ab' print(a) print(b)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | a
002 | b
no I'm still slightly confused
this is my code
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
It's 31 lines
basic
!e py a = 'a' b = 'b' print(a) print(b)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | a
002 | b
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
!e py a, b, c = 'abc' print(a) print(b) print(c)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | a
002 | b
003 | c
needed a better understanding of
!e py a, b = 'abc' print(a) print(b) print(c)
@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)
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
@opaque hazel bro is your problem solved ??
you cant do this d, s, v, = 'dsv'
you can do this
d=s=v='dsv'
!e py d, s, v, = 'dsv' print(d) print(s) print(v)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | d
002 | s
003 | v
@teal jackal hi
hi
have you ever create twitter bot?
no
ok
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
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
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
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.
class A:
x: int | str
class B(A):
x: str
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
no not yet zen can't figure it out
@somber heath hello
@whole bear π
im not typing 50 times to chat, im a stubborn degen.
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 π
teach me maths?
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
@whole bear π
i didnt do voice
ok thanks
No disrespect becuase you sou like a nice guy, but I just wanna punch you for no reason @ opalmist
sup vc how's it goign
...lol
Sup nerds
sup
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
wheres the cat?
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
does anyone know a gui tool in python rather than tkinter
tkinter is the Python interface to tk.
Who knows when rye will be properly stable
is there any other tool?
PyQT, beeware, kivy, dearpygui...others.
thx
Hawt
ask openai that and say "list 50"
cap
π« π§’
I just wanted to poke my head in. I'll talk to you file folks later
i had it give me 75 so....
got swatted by automod π
my file is hopeless.txt
@minor sapphire ffmpeg -i input.mp3 output.wav
This is how to convert files from one form to another using ffmpeg (at least the basic way)
hi Plome
Co-worker is here so back to Typelock
@next tapir You said you use VS Code, right?
Just couldn't remember
anyone good with the pickle concept in python?
I'm familiar with it. What's your question?
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
What was the level maker?
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...
What's the issue with using the editor? And I guess it would depend on what the output of the editor looks like
this is my level map list
the editor works
but i dont want to be using others peopeles work
I see you in there lone 8. Don't think you went unnoticed.
I mean... that's what programming is
People make tools that are better or more conveneint than ones we would create
i want to convert this into a csv taht will load using pickle
ye but i dont want to do that
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
to load in multiple levels after the plyer finishes the one level, the pickle would load in the next level
i see
Unless you have huge levels, generating it from a CSV wouldn't be that intensive
how to i code that list and make it into a csv using that?
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.
Toss it in the paste bin here
@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
ok
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
so will that automativcally save as a csv file?
Yep!
The writer will take the list and put them in row by row
Oh make sure that when you use writerows plural
i see did it work for you when you used it?
omg tyyy
Wrote it and loaded it back
@molten pewter https://youtu.be/TeeN9JKvay4?si=qW-jGyEgJSc0rv4u
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...
where will the file be saved?
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
i see so if i save it in a folder called level, it will be saved there right
Bingo
And you can do that with a relative path
So it's just based on your projects structure and stuff
if you dont mind could you explain what relative path means
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
i see
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
ohh
.. means parent directy, so in this case it would be Projects. . would be Game
i see
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 ..
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
Well this is already relative
ohhh
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
could you please explain what the three lines do one by one? im sorry im a beginner sorry to botehr you so much
It's no problem! This is what I like doing
with open("map.csv", 'w', newline='') as csv_file:
file_writer = csv.writer(csv_file)
file_writer.writerows(map_list)
:))
ok
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.
i see
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
ohh i see
By default, if you don't specify, it will open in read mode
like file handling
Exactly
i see
@boreal kernel Is it specifically the Jenkins part that's tripping you up?
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
https://www.vice.com/en/article/3abavv/this-keyboard-lets-people-type-so-fast-its-banned-from-typing-competitions you could put this next to your trackball to completely throw coworkers off @rugged root
i see so it will do it for everyline in my list
Exactly. It knows how to format it properly, so it takes over for the regular open() handling in that regard
i see
The with context manager is really handy
Typically when you open a file, you have to then .close() it afterward
also solves lots of annoying pytest warnings
ye
@boreal kernel https://docs.djangoproject.com/en/5.0/topics/install/
i see
does anyone use jenkins anymore?
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
iirc with is a context manager
oh
All you need to know is that it's handy
at work we use github actions
Makes your code less error prone
switched about 4 years ago
where is the with written in the code tho?
thankyou
with open()...
ohhh yhh i see itt
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:
ye
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
it does the same thing as tthe firt code thats is sent right but that is mre efficient?
I think the efficiency is the same
oh i see
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
which saves developer hours; efficient use of available manpower
It just does it for you
ye
@boreal kernel
That's what he's talking about
@dark lantern Everything making sense so far?
yes
Next line then?
yes
thankyou
can with open() also read from a file stream?
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
are you saying this things to me or somebody elseπ
You can tweak it and customize it if you have special circumstances with your data
according to SO, there is a param to do it but it is better to use some lib
That one was to Saz
Yeah there's an io stream one I think
i thought that all for me
Nope sorry
i see
One sec, talking to a co-worker
thats ok
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.
Everything make sense more or less now?
Oh, and I really don't recommend using pickle unless you know you need to
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
one sec, ill show you the video of teh guy i am following
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/...
oh i see ok
All good im in the coffee abyss rn.
coffeeee gooood !!!! bzzzzzz
hi
i
just
need
10
more
messages
so,
i
can
speak
@stark river hello!
im having so much fun
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
for talk in voice chat i have to text 50 messages
Again?
what
Yep
ok
Oh
really?
I do python games
cool
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
:))
@torpid zephyr π
Sup
I'll see you later guys, need to get some zZZ
Hello
yeah, a lot of times
oh so it kind a scrapes the data and displays just the info that you need right?
what's the problem ^?
venv is confused
classic
can I use a package for two different processes?
I made clippy live
!code
print("Hello world!")
`
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.
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
add this in the first line of game_loop
with open("highscore.txt","r") as f: saved_highscore=int(f.read())
What do you mean?
"""
______
|/ |
| \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
alr thx
So they're not only hanging them, they're dismembering them. Barbaric.
well its reverse so that he can put it in a list and index by [score//10]
bc he takes the score from 100 by 10 each wrong guess
That's not all that much better.
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
Gibbet.
Hey
They kept thinking about him, he kept getting remembered.
did that try to be a pun bc i did laught a litle bit
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']
A lot of the things I say are. Sometimes they're noticed.
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);
}
}
wondering if it'll hit 100
remove GC from OCaml, add proper lifetimes to C++
also
https://cpponsea.uk/
The C++ rvalue Lifetime Disaster - Arno Schoedl - C++ on Sea 2023
Rvalue references have been with us since C++11. They have originally been introduced to make moving objects more efficient: the object an rvalue reference references is assumed to go out of scope soon and thus may have its resources scavenged without ha...
existence
when language's lifetimes are described as disaster, there is probably an issue
btw Rust has a severe lifetime bug too
allows contravariant cast without checking if the function is valid
Huh, I hadn't seen that yet
this conversion is only valid if 'b outlives 'a:
fn(&'a &'b T) => fn(&'static &'static T)
But I'm still learning
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"
@loud tapir You are a robot
@rugged root pepop pap
if the function requires &&str, using it with &"literal" is that conversion
Huh
another part of the problem is that &'a &'b T is allowed to be defined even when it's impossible to create one
sometimes it puts implicit bounds
sometimes it just lets it be
no
@tawny plume Yo
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
@burnt shale Yo
Hey hey
corrected, it's from inner to outer
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
}
@vocal basin hi
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
where's the option all three instead of none
parent commit is essential part of a commit, in my view
can you join code/help vc
how do you think about git branches?
- just the commits that "branch" off
- the history of every previous commit
- just the commit at the end ("branch = pointer")
- other / show results
first also describes commits that don't belong to any branch
imv: 3 in implementation, 2 in use
(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")
Hello Guys!!
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
What url?
Plan routes and get driving directions from GraphHopper Maps using open source and open data
I wonder how topologically non-trivial this can get
f-string?
nope
use an f-string to modify it maybe
There is very little context, so maybe explain what you are doing a bit better
I'm trying to do cross-merge
but
it doesn't seem to be possible in web
(attempting to replicate what Griff described earlier)
I'm enjoying the conversation here atm, sorry
ok np
there being no close button is so annoying:
Yeah that is weird that they don't
or this broke it
Can you type out what you are doing. I can help from in here maybe if I can understand your problem.
hi HemiPlot and CrisFrame
wha
ok i do screen share here
haven't seen this branch status before
π
Okay. π₯π
see the get direcrion link
(it's a reference, I promise)
You are not streaming
now?
okay, I'm deleting fun once more
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
oh yeah i never got that
Why are you sending it with html?
means how?
You just need what is in the href, right?
GIF = kif
yes
when i make tweet you can see that ancor tag also get tweeted
You can use an html parser to grab that out of there
hi, i haven't been on the server long enough for vc privileges lol
^
okay I give up
it's what beautiful soup uses
ok i try
bs is a bit easier to use
currently teaching my self modular arithmetic via palindromic numbers, which has led me into really over-optimising this one problem
i think have to use regular expressions
ok
@rugged root
defined on equivalence classes of numbers with same remainder
bs you don't need regex. you can just go through the html like it was a dictionary
yeah priority queues use it for wrap-around pointers
which one?
beautiful soup
ok i think its use for web scraping
@uncut meteor
indexeddb?
still works for what you are doing
or whatever it's named
IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including files/blobs. This API uses indexes to enable high-performance searches of this data. While Web Storage is useful for storing smaller amounts of data, it is less useful for storing larger amounts of structured data. IndexedDB provides a solut...
ok i will try
it would be something like soup.find('a')['href']
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?
could i have some help with some of my tkinter code
ok i check it
@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?
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
i know people who use rust, threading mechanics on it do seem cool
Rust's standard library is not as large as Python's
for handle in handles {
// TODO: a struct is returned from thread::spawn, can you use it?
results.push(handle.join().unwrap());
}
how can I enable my mic?
but that's reasonably not in standard
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
rand is also excluded to update more freely
updated 16 days ago
I cant get Gemini API
not stable
kind of old news, but what do you guys think about the us government backing rust over c++
2 years ago
use vpn if its work
I will try that
why is it so non-trivial to find docs on pre-release version suffixes
if it was in standard library, there would be no rand 0.9.0 even planned
ig rand_core might be reasonable inclusion
ok ty anyway guys
Back to Typelock
@rugged root btw, std seems to depend on rand
https://doc.rust-lang.org/src/std/hash/random.rs.html#57
just how it depends on hashbrown
That can't be right
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
It's not lised in the imports, though
(or has depended)
for reference, i have no practical linux experience
((as far comments claim))
Roger
currently has custom implementation
I don't have much experience or talked to many/any people who have used their Chromebook for Ubuntu
For curiosity , any other method to include other rust crate (library) besides using syntax use rand ?
And you don't explicitly have to use Linux as your daily driver
I should find what version the comment refers to
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
yeah i plan to duel boot it in case, and make a windows 11 back up
just like written in that comment: refer to an item by its path instead of importing it
Personally I'd do a VM first to get the overall gist of it before dual booting
But that's just personal preference
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
oh , I saw that comment
Source to the Rust file ../src/libstd/collections/hash/map.rs.
I do most of my stuff on Win 11. Granted I'm a hobbyist, but it's fine as a dev environment once you get used to it
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
i mean if i get a thinkpad that's ubuntu certified, mint should work mostly fine right?
another dependency of std:
https://docs.rs/hashbrown
This crate is a Rust port of Googleβs high-performance SwissTable hash map, adapted to make it a drop-in replacement for Rustβs standard HashMap and HashSet types.
Raspberry Pi's can run Ubuntu if you so desired
Hell, the main OS for them are based on Debian
i know it's lighter weight, but i've heard it has some screen-based problems