#voice-chat-text-0
1 messages · Page 179 of 1
Wassup fellas
@zenith radish you mind going more in detail to what exactly you do at work?
@uncut meteor you're so real for that
Repo Men is a 2010 science fiction action film directed by Miguel Sapochnik, starring Jude Law, Forest Whitaker, Liev Schreiber, Alice Braga, and Carice van Houten. An American-Canadian production, it is based on the novel The Repossession Mambo by Eric Garcia, and follows a repo man who goes on the run after he becomes the recipient of an artif...
Poe lets you ask questions, get instant answers, and have back-and-forth conversations with AI. Gives access to GPT-4, gpt-3.5-turbo, Claude from Anthropic, and a variety of other bots.
the link i provided is my conversation
There's a related discussion on Reddit: https://www.reddit.com/r/dotnet/comments/15ljdcc/does_moq_in_its_latest_version_extract_and_send/ It seems that starting from version 4.20, SponsorLink i...
@zenith radish
surely not during the war
elul or no elul, that's going a bit far
iirc the breslover rebbe also advised against travelling there for rosh hashanah this year
feel free to take me up on this over PM
k
!e py a = range(5) b = map(str, a) c = list(b) print(a, b, c, sep='\n')
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | range(0, 5)
002 | <map object at 0x7f19deebd0f0>
003 | ['0', '1', '2', '3', '4']
Meow
infix fun Int.shl(x: Int): Int { ... }
// calling the function using the infix notation
1 shl 2
// is the same as
1.shl(2)
I AM AN IT GOD
more like it clown /j
Hello fine folks and LP
Parents been visiting since start of august
Will be on later next week
@zenith radish that was a joke ily
Coolio
How long have u guys been programming?
So your 14
no 13
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
@whole bear Corey Schafer, YouTuber, Playlist for Python beginners.
!kindling
The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
First of all, what is Python? According to its creator, Guido van Rossum, Python is a: > “high-level programming language, and its core design philosophy is all about code readability and a syntax which allows programmers to express concepts in a few lines of code.” For me, the first reason
God would be "Girl, believe me, I've tried."
@lavish rover hey man how you been
how do i install pip on linux (raspberry pi os lite) because it doesnt exist for me
yep
I need to be around SWE🤣and startup founders
wait i found something
Polish plait (Latin: Plica polonica, Polish: Kołtun polski or plika, Kołtun in Polish meaning matted), less commonly known in English as plica or trichoma, is a formation of hair. This term can refer to either a hairstyle or a medical condition. It also relates to the system of beliefs in European folklore, and healing practices in traditional ...
looks like shit
I'm getting Ghostbusters 2 mink coat vibes.
"This term can refer to either a hairstyle or a medical condition."
That tracks
מי דובר עברית?
@pulsar island you can check your audio
shabat shalom
Settings -> Voice and Video
There is a test audio option
@pulsar island Also hear your audio
Yeah it was a bit disruptive
Coloureds (Afrikaans: Kleurlinge or Bruinmense, lit. 'Brown people') refers to members of multiracial ethnic communities in Southern Africa who may have ancestry from more than one of the various populations inhabiting the region, including African, European, and Asian. South Africa's Coloured people are regarded as having some of the most diver...
how do i use flask with ngrok to connect from a remote pc
cancelled
i dont say the n word :0
i only think the n word
say balls if you're cool
how tf do 1) check my powershell version 2) how tf to update
im doing this for the ssh computer
the docs didn't help
as clear as mud
isn't it auto-updated with Windows?
"updated with windows" bold of you to assume i software update my windows thru ssh
i just do shutdown -r
don't think it updates
$PSVersionTable.PSVersion
latest is 5.1
if you have windows 10 or newer, it's likely 5.1
Latest built in
Major Minor Build Revision
----- ----- ----- --------
5 1 22621 1778
hmm
but i saw this
andre@DESKTOP-V8OIDCG C:\Users\andre\RemoteFolder\tz-rust>powershell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows this bit
Current latest is 7.3.6
yeah i saw
(as far as what you can expect from windows itself)
updates won't make it update further
then tf is this
it sounds to me like there's an upgrade
that one is non-automatic
damn
but that message is annoying af
also
if i do shutdown -r does it update windows as well
(tbh i dont think so since the reboots are fast)
defo not enough time to do a windows update
@zenith radish theocracy?
https://www.statista.com/statistics/1121014/gdp-per-capita-of-african-countries
https://www.statista.com/statistics/1373462/gdp-per-capita-eu-member-states-2022/
so like i have to manually do it?
but winget is not behaving
as usual
> Lithuanian haven't colonised anything
as part of union with Poland they did conquer places, in 16~18 century
but in terms of colonies, no, don't seem to have done that
like
PS C:\Users\andre\RemoteFolder\tz-rust> winget upgrade --all
Failed when searching source: winget
An unexpected error occurred while executing the command:
0x8a15000f : Data required by the source is missing
Greek not Italian
the closer to equator, the earlier the sunset during summer
Russia and Spain overlap
timezone-wise
because Spain has permanent summer time + summer summer time
and Russia has Königsberg
What is up guys
Still coding still doing
I’ll be better than @wind raptor one day
Flex
who is claiming it's not?
This is a bunch of rubbish fed to children
If I sent you a picture of an alien would you suppose I think aliens are real
no
Because if Something is not real it’s not necessary unless you’re creating an article page proving so
Because otherwise it’s a waste of discussion
Well I suppose we’re different in someways
you're missing the context from VC
E-girls and e-boys, sometimes collectively known as e-kids, are a youth subculture of Gen Z that emerged in the late 2010s, notably popularized by the video-sharing app TikTok. It is an evolution of emo, scene and mall goth fashion combined with Japanese street fashion (such as anime, cosplay, kawaii and lolita fashion) and K-pop fashion.Videos ...
tldr 😊
🥺
oh ye all the django nerds on this
at least it be ez
js was a mistake
holy moly
David Bowie as the Alien (Lithuanian) who came to Earth in search of water for his planet;
"Per Ardua ad astra - Through difficulty to The Stars." -
Directed by Nicolas Roeg; 1976 British science fiction film;
Based on the book by Walter Tevis.
Produced by Michael Deely & Barry Spikings (The Deer Hunter)
David Bowie's first starring film role.
Thats just like, your opinion, man
Pulp Ficiton?
the matrix
Have you seen Chef?
Akira is good too
Yeah that was pretty solid
Did this kid just say he greened out
@alpine crater Yo
what did I walk in on
Standard LP and Charlie
and also 👋
Use Alt + left
Do you have a disabled relative
dictionaries only describe how words are used, they dont decide what they mean, if everybody uses a word wrong then it isnt wrong anymore 😛
⭐ Ad Blockers ⭐
Doesn't help with the content just not being well written
Even for things like Bloodborne
I am enjoying this conversation 10/10 would listen to you people talk again.
Yeah it's.... an experience being here
The animal can't see the blade it gets killed with I think
Yea, in the old testament you can only eat marine life if it has fins and scales. so no lobster, shrimp, or clams
Qurbān (Arabic: قربان) or uḍḥiyah (Arabic: أضحية, lit. 'sacrificial animal') as referred to in Islamic law, is a ritual animal sacrifice of a livestock animal during Eid al-Adha.The concept and definition of the word is derived from the Qur'an, the sacred scripture of Muslims, and is the analog of korban in Judaism and kourbania in Christianity....
Australian opal has been cited as accounting for 95–97% of the world's supply of precious opal
worst told story ever
agreed
IS THIS AN OPALMIST REFERENCE
I've finally connected the SSD I bought earlier
that truly did take some time to do
#voice-chat-text-0 message
am i drippy enough?
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
didnt slenderman come from something awful
[] = edited info for privacy
"I am a [Major US Carrier] A320/321 Captain, the following sighting occurred during one of my flights recently. Since I have shared my story, several other [Major US Carrier] pilots have reached out to me and shared their similar experiences,…
1297
229
\
@turbid sandalhey court went well, i behave they will drop it
what did i just walk into?
I like andrew tate
We're all entitled to our bad opinions
misheard it as "feudal"
the philtrum is the big giveaway
in some places, medication isn't as available
Also true
and where it is available number-wise, there exist some Shkrelis that increase the prices because they can
Also yeah
With our anonymous search engine Swisscows you will find absolute security. No tracking ✓ Search anonymously ✓ Family friendly ✓ at | swisscows.com
want privacy => use tor and reset the circuit after every query
daaaaaaaaaaaaaam
Would that actually help? I thought that might make it worse
Not sure why
tbf, best way to make it impossible to link any two queries as coming from the same user
is to search only once in the entire life
works? yes
convenient? questionably
tor isn't slow bandwidth-wise
it has high delay though
eh
no, not necessarily
if something is inconvenient, you're likely to use it less securely
because can't be bothered to care
Let me be a boomer real quick, what's tor?
technology from 90s, intended to make it very hard to associate two separate ends of a connection
okay thanks, I'll have to look into that, sounds intreasting
so like something similar to what VPNs do?
which is why you use a bridge
yes
but without a centralised entity controlling the traffic
trade off is that it becomes even slower due to delay
actually, not always
Okay, thank you for helping grandma pixel
bridge is also used as first node
in current version, afair
so, you put as much trust in a bridge as in normal guard node
@rugged root thing you might've thought about earlier is that first node shouldn't be changed often
no-bridge tor changes it around once a month
Gotcha
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
If you're wondering - yeah that
🖕
I join discord today so, I dont meet the requirements to voice chat
You let the intrusive thoughts win
If your attitude continues you're not going to get voice perms period
Someone said thats just Euro-pinion
I Love cheeseburgers from my homeland united states
with curly fires
Truly one of our gourmet meals
bro no one beats U.S. with cuisine
and they say we have no culture
A kazan or qazan is a type of large cooking pot used throughout Central Asia, Afghanistan, Azerbaijan, Turkey, and the Balkan Peninsula, roughly equivalent to a cauldron, boiler, or Dutch oven. They come in a variety of sizes (small modern cooking pots are sometimes referred to as kazans), and are often measured by their capacity, such as "a 50-...
@whole bear Yo
100% Lamb Shashlik | Whole lamb cooking recipe
https://youtu.be/tnpq2qLbezQ
UZBEKISTAN PILAF | UZBEK Traditional Delicious Food | JAYDARFOOD
https://youtu.be/-6GbG_NN1MU
BESHBARMAQ Traditional Kazakh Food in Uzbekistan | Horse Meat
https://youtu.be/Q2qpCIcKquc
QOPOQ SAMOSA | Central Asian Food | Uzbekistan, Tashkent, Minor
https://youtu.be/mt...
yeah, i use gmail
gmail works
outlook for university stuff
but why do you config your email apps xD
thank you very much, linkedin
but there is 2 different outlook apps for desktop no?
rewrote bodged
is the new one the one that feels like a mobile app?
is the voice verification broken?
not enough messages too, seems like
#voice-verification do !voiceverify
linkedin caching is so awful
it caches notification count
whyyyyy
how
I refresh the page and it re-appears
how many notifications there are?
zero
ill drag it out a bit
i used to be very active in this discord years ago on another account, but then the voice verification made it so tedious
Yeah I hear ya
Ah also the messages are only counted from like.... late 2019 or 2020, can't remember exactly. It's been a while
So you may have more, but the count won't reflect the really old ones
back then there was no voice verification
Yep
I personaly find pork digusting
🍍 + 🍝, as suggested by some
I click the button
nothing shows up
such a failed UI
it also always defaults to light theme, and there seems to be no way to change it for account, only per session
which ui is that
pulled pork
it tastes aight, but you feel those things
its bad
okay, I made one important change to my linkedin profile: swapped C# and Rust;
not that it matters really
Yeah
did the opposite, because
- I'd rather not write more C# for quite some time
- since recently, I have way more knowledge of Rust, even though I've been using C# for 6 years
i hate mint chocolate and fruit chocolate
the thing is that the C# is so much more useful in industry, and that 6 years experience is gold
why?
yes
I only know why they need Rust:
low-level, simple, reliable system
none of those apply to C#
are you a backend dev?
I don't really differentiate between backend and frontend
found the full stack
would be full stack, if agreed to write device drivers
somewhat close to having to do that, actually
currently updating nextcloud from 24 to 27
nothing broke yet
more like, I don't like those terms, just like the "full-stack" as a term
C# is more widely used just like Java is, it's what I'd call Mid Level language. Enough power to get alot shit done efficiently but not enough to blow your own legs off.
Is task scheduler the best way to run a script once a week
Untyped nature can do that
Rust takes too much effort for some things
like, you certainly wouldn't go into Rust applying OOP patterns left and right
rust vs c++ ?
(separate statements, both saying "think before picking a language for a task")
depends
for integrating with existing C++ code:
depends too
so say i want a low level language to learn for the first time, do i go C, C++, or Rust
?
I guess this:
Rust -- for high-level abstractions and not having to routinely worry about memory
C++ -- for OOP
C -- for simplest, "feels closest to the metal" experience and for learning manual memory management
that all not taking existing environment into account
Rust so you write secure code?
without extra considerations, I'd suggest Rust
what even is the fuss around Rust?
IS PYTHON GOOD FOR FRONT END? (MY CAPSLOCK STUCK)
what do you mean by frontend?
BACKED SORRY
no xD no problem, probably go for js
anyone know about DJ decks
backend Django and flask is decent
BACK-ED
or any server that might know
SO PYTHON AND DJANGO?
Flask isn't decent, if you need performance
yes
WHATS THE BEST?
best for what?
BACKEND
what type of project?
how big is the project?
big project go for Django, a lightweight application flask
SO PYTHON DJANGO AND FLASK?
no choose one
?
sHOULD I WRITE ONE LINE WITH DJANGO AND ONE LINE WITH FLASK?
CAPS LOCK WORKING
NVM NO
kali?
T
TAILS
THIS WINDOW IS SHIT MY KEYBOARD IS WORKING
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
WAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
F 12 HOURS INSTALATION.
does it not have on-screen keyboard as an accessibility feature?
LOL SPEND 4 HOURS TO FIND THE AWAY TO INSTAL DISCORD
HAS NOTHING LIKE WINDOWS
NO ANYTHING SUPPORT THIS SHIT
NOT EVEN VISUAL STUDIO CODE
you can't mix Django and Flask in one project
it should run VSC fine, given it's just debian
WHY? DOESENT TASTE GOOD?
both Django and Flask are frameworks, they expect to be in full charge of file structure
dont even worry about it
istg these are made to confuse and scare noobs
just like learn shit as you need as you go
i WILL WORK AGAIN IN TEMPLE RUN TO COLLECT THIS SHIT RUBBYS
??????
LOOK THERE AT THE FLOW
JAVASCRIPT
PYTHON
RUBY
it's also missing SQLite, which is good enough for many beginner and intermediate projects
I LIKE SQL
I WANNA GO SQL LOL
FRONT END IS AWSOME BUT I LIKE SQL
ALSO
ANY GOOD AWAY TO HOST MY WEBSITE
CHEAP?
FULL STACK?
i HEARED ABOUT SOME SHIT GOODLE CLOUD PLATFORM?
fixed
HOW DID U GENERATE THIS?
Congratulations
(or irrelevant part)
WHERE IS DJANGO?
or flask
REMOVED?
it wasn't in the original diagram, and I'm too lazy to write it there
BYE BYE DJANGP
ALISA SLAPED THE SHIT OUT OF YOU
NOOB DJANGO
I WANNA LEARN C LIKE THE OLD TIMES
how dare he insult, the cheesburger
CHEESBURGER IS TRASH
DigitalOcean
AWS
Google Cloud (+firebase)
I don't remember other
CHEESE CAKE
HOW MUCH THESE CHARGE?
fuck seed oils
YOUR NAME NEED TO BE RENAMED TO : SHAME
I think all of those have free versions
RLL?
but your going to have to look for specifics
FULLSTACK?
also linode and vultr
"DigitalOcean offers a free tier that allows you to create a server with 1GB of RAM and 10GB of storage."
IS IT DOLLAR?
CAN I SEND MY WHOLE PC TO THEM AND GET IT FOR FREE. HAS ENOUGH RAM AND GB
LET ME SEE
can you stop with the caps plz
CAPSLOCK STUCK
I think its just to host a website
oh okay, then
I think so
I only have 1 month of programming expriance
but i have read that you can
only within 60-day period, seems like
LIKE DOES IT HAVE TO STAY ON 24/7
"Indeed, a computer can be used as a server when it has an internet connection and web server software installed on it" - https://webuyusedtape.net/2022/02/22/how-to-use-your-computer-as-a-server/#:~:text=Indeed%2C a computer can be,website or use its resources.
AWS gives a year, but free credit isn't enough to use 24/7
for backend
https://www.digitalocean.com/pricing/droplets
um, no clue
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
I have never used digital ocean
requests that can be made to the server, I guess?
like, how many times someone can open a site or something
not sure
dude your going to have to google some of this stuff if you want decent responces
SO IF I RUN OUT OF REQUESTS?
I GOGLED ALOOOOT
THEY ALL DUMAS
EVEN YOU KNOW MORE THAN THAM
where does it show it?
ask google bard, it might be able to help
ALL WANT TO PROMOTE VPN SHIT
WHICH OF THESE?
ON MY FREE TRAIL SPACE AT W3SCHOOL
top left
APP PLATFORM?
left not right
VIRTUAL MACHINES?
yes
SUGGEST ME ONE AS A STARTER
AFTER I CHANGE PLAN
LOOK
i AM WORKING WITH MY TEAM
HOW CAN WE WORK FULL STACK ONLINE?
LIKE SCYNABLE FILES
GOODNIGHT AND TYYY
@whole bear how you feel about khomenei
W 🤝 🗿
i'm not a fan
Opinion on fesenjan
it's a tasty food
where you find this pic of me?
that's you
best pic ever
trying to find my code be like
ohj haha you dont name your repl's huh?
you thinck you now memes
found my code !
showed it to my friend
hey check it now
class Individual:
def __init__(self, name, is_believer):
self.name = name
self.age = 0
self.alive = True
self.hunger = 0
self.resources = 0
self.intelligence = 0
self.beliefs = []
self.happiness = 10
self.fame = 1
self.drug_use = False
self.is_believer = is_believer
self.beauty = random.randint(-15, 60)```
you can see when i started to feel the power
Doesn't is_believer and beliefs create a redundancy?
it was made by chat gpt
ofcours idnt now what it did
run the sim
guys i have problems with selenium . was selenium being updated and changed or some thing?
what problem?
and, likely, yes it was updated
especially if it is related to creating a chrome driver or whatever
new version uses options
yes it is
Is there a course explains selenium with the new update?
@vocal basin Hello
ok thank you
@vocal basinwhy are you avoiding me
?
!rule 5
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
@vocal basin 
I knew you wouldn't help me
@vocal basinokay just tell me the last thing the best anti-virus for my Windows
built-in windows defender or whatever it's called
still no idea where this question even comes from
I forgot to call you boy one day and since then you don't reply my messages
a what?
Emacs OS
Interview with an Emacs Enthusiast in 2023 with Emerald McS., PhD - aired on © The Emacs.
org. air date 1990.
Programmer humor
Software humor
Elisp humor
Software tools
Retro computing
Vim vs emacs editor
Computerphile
Emacs humor
Emacs jokes
emacs vs vim
Programming memes
gnu emacs
spacemacs
emacs memes
lex friedman ide
VS Code
confi...
If you're looking for a paid course related to CompSci, this is probably the best one: https://www.dabeaz.com/
sup
what u doing
nice
school project? personal project? work project?
u making a programming language?
nice. what is this programming language gonna be used for?
nice
the syntax seems like js+python to me.
nice
did u create anything till now in your own programming language? or used it in any way?
nice
a bunch of people left
lol
are u 18?
aha. and u tried python for the first time at the age of 11yo? nice
nub
kidding
and now error
i am
@whole bear @whole bear 👋
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
union find?
this?
In computer science, a disjoint-set data structure, also called a union–find data structure or merge–find set, is a data structure that stores a collection of disjoint (non-overlapping) sets. Equivalently, it stores a partition of a set into disjoint subsets. It provides operations for adding new sets, merging sets (replacing them by their uni...
looks cool
buy a mic
This isnt public room?
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
ouhh dang I thought I tick the agree box it's already done xD
@trim relic 👋
lmao
I think it's your accent I guess xD
u are an indian in nepal ?
geez need to send 50 messages
@pulsar harbor 👋
@somber heath 👋
you in KL?
@shy monolith
abit late isit in kl
originally from Johore but yeah I lived in KL right now
since I'm working there
i see
yea 11:56pm rn
but for programmers it's still early I guess haha
hahaha where did u from just now?
you can speak canto?
cantonise?
yes
nah
oh lol :/
my race is a malay
ah
xD
not overseas chinese?
nah nah
but yk chinese tho
I'm not sure did u familiar with malay race or not
no lah
I knew chinese?
eh u knew our 'lah'
Malaysian or male asian? You decide!
no no hahah I mean I didnt know have u ever heard or not a "malay" race
啦
I see
yea in here everything already kinda like "rojak"
xD
i follow sg and malay meme pages lmao
yeah
U know a lot
hahah no
Malaysian! HAHAHA
your small neighbour was a tough competitor from where i was from, but not anymore. singapore just WON
male asian for me
then try to compare sg food with malaysian food then
xD
chicken rice 👍
laksa 👍
nasi lemak 👍
nasi goreng 👍
eh where are you from?
but im in uk rn lol
I see
5:04pm
ahh still early
bro go sleep lah you wanna get tired isit
no, sg was our competitor
@hoary kayak 👋
hello
ahhh MY?
i have gave plenty of hints lmao
but no
can any one help me in the code ?
🤦♂️
hahaha okok lemme listed out the hints
dont ask to ask lol
- male asian
- same competitors
wut code?
i have a proplem in class
what's the problem?
show us your problem?
look the class should take name and age and put it in txt file
this is an oppurtinity for me to send 50 messages haha
exactly i was helping you
then after that there is search
in what format?
what does the text file look like?
and how do you store the data in the program when you load the file?
!past
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.
more convenient way to implement writing to a file:
with open(r"names.txt", "a") as file:
file.write(f"name: {self.name}, age: {self.age}\n")
(auto-closes the file)
Is it mandatory to write in txt file. Are you allowed to write it in .json file instead??
That would make it a lot easier
first, you likely need to convert whatever you've read from a file into instances of Person
csv would be simpler in this case
oh CSV would be even better
quite close to what the format already is
it already worked but the proplem is i want to change the age and i cant
.
how ?
but it will not me together then
?
can I hav the sample of your text file content?
def update_student_age(file_path, student_name, new_age):
with open(file_path, 'r') as file:
lines = file.readlines()
updated_lines = []
for line in lines:
name, age = line.strip().split(',')
if name == student_name:
updated_lines.append(f"{name},{new_age}\n")
else:
updated_lines.append(line)
ouh sorry
do this and it should work
name = input("enter your name 😊
age = input("age 😊
class Person:
def init(self, name, age):
self.name = name
self.age = age
def myfunc(self):
#print("name : " + self.name + " , age :" +self.age)
names = open("names.txt","a")
names.write("name :"+self.name + " , age : "+self.age +"\n")
names.close()
p1 = Person(name,age)
p1.myfunc()
srch = input("enter the name 😊
word = srch
with open(r"names.txt", 'r') as fp:
# read all lines in a list
lines = fp.readlines()
for line in lines:
# check if string present on a current line
if line.find(word) != -1:
print(word, 'string exists in file')
print('Line Number:', lines.index(line))
print('Line:', line)
else:
print('string does not exist in a file')
search_text = srch
replace_text = "replaced"
with open(r'names.txt', 'r') as file:
data = file.read()
data = data.replace(search_text, replace_text)
with open(r'names.txt', 'w') as file:
file.write(data)
Printing Text replaced
print("Text replaced")
!paste
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.
would work for csv
but not for that format
because it has name : and age :
i will try it
sorry it won't work
As alisa feistel saida
said
I ignored the format
how i use past to put the code here ?
name : John , age : 25
name : Emily , age : 22
name : Michael , age : 24
if the txt is in this format
then this code will work
def update_student_age(file_path, student_name, new_age):
updated_lines = []
with open(file_path, 'r') as file:
for line in file:
if f"name : {student_name}" in line:
updated_lines.append(f"name : {student_name} , age : {new_age}\n")
else:
updated_lines.append(line)
with open(file_path, 'w') as file:
file.writelines(updated_lines)
Usage
file_path = 'path/to/your/students.txt'
student_name = 'Emily'
new_age = '23'
update_student_age(file_path, student_name, new_age)
Replace 'path/to/your/students.txt' with the actual path to your text file, 'Emily' with the student's name you want to update, and '23' with the new age you want to set.
This code reads the file, searches for the student's name, and updates their age if found. It then writes the updated data back to the file. Just like before, if you have multiple students with the same name, this code will update the age for the first occurrence it finds.
!e
import re
pattern = re.compile(r"name\s*:\s*(.*?)\s*,\s*age\s*:\s*(.*)")
# intentionally messed up input
line = "name :Bob ,age: 33"
parsed = pattern.search(line)
name, age = parsed[1], parsed[2]
print(name, age)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
Bob 33
can I copy that code?
which code?
yours
!code @devout bloom
import re
pattern = re.compile(r"name\s*:\s*(.*?)\s*,\s*age\s*:\s*(.*)")
# intentionally messed up input
line = "name :Bob ,age: 33"
parsed = pattern.search(line)
name, age = parsed[1], parsed[2]
print(name, age)```
@vocal basin thank you i used selenium but now i have an issue with openpyxl 😂
@devout bloom !e before code runs it
you can write a more case-appropriate code for your application
there
this, for example, is not very good at handling trailing space
or any trailing data in general
the regex is scary, but it brings a satisfaction sensation if you understand that because you kind level up
!code
"name"
":"
anything, non-greedy
","
"age"
":"
anything, non-greedy
with spaces in-between
trying it now
!rule 10 if the code is from AI
(like, marking it is necessary, for reasons)
there's a part missing from that rule, that is generally understood:
"this is only wrong if you present answers as your own"
got it
see my code please
look i can change only the name
and i dont know why
and this is the result
search_text = srch
replace_text = "replaced"
your replace text is static
yeah what about this line
replace_text is static
make it dynamic
replace_text = input("enter the new name ")
replace_name = input("enter the new name ")
replace_age = input("enter the new age")
data = data.replace(search_text, replace_name)
data = data.replace(search_age_text, replace_age)
do this @hoary kayak
Copying this code will not work you might have to make few changes
but this is the gist of it
okay i will try it
ive seen multiple websites have a "sign in with github" option. kinda wanna do that but dont know how
you want to know how to use github??
it's easy to learn
you'll find plenty of Youtube videos
you can check one out
https://www.youtube.com/watch?v=tRZGeaHPoaw
In this step-by-step tutorial, learn how to use Git and GitHub for source control management (SCM). We start with Git. What is it? How you can get it running on your system, and how you can start working with it? Then we look at GitHub.com, a platform for hosting and collaborating on Git repositories. By the end of this video, you'll be well on...
search_text_age
oauth2?
oh its fine
yea
that's not exactly what that button does, but adjacent
this takes in the age as an input from the user
and is used to change the age
two parts:
tell GitHub where to redirect after authorisation is done
add button on your site to redirect to GitHub for authorisation
you should probably use some pre-existing tools to do that for you
replace_age takes the input but search_text_age is not defind
know of any?
I've only used framework/site-specific ones
I tried writing auth via discord myself, to understand how it works
generally all behave the same (no fundamental difference between GitHub and Discord)
😂
one of the longest answers I've seen recently
https://stackoverflow.com/questions/71741596/how-do-i-implement-social-login-with-github-accounts
@cosmic bison can you not just map the drive from your linux machine?
flashbacks to asynchronous IO in Haskell, i.e. that time I learned Python isn't as terrible memory-wise as it could be
@dry jasper base usage for interpreter is 8~20 mb, which scales with multiprocessing
eh
Haskell has weird sleep logic
very expensive, iirc
you can run ~million asyncio.sleeps in Python and be fine
it scales linearly more or less, in terms of resources
whereas Haskell would just hit a wall at some point
(another one of the reasons I chose Rust over Haskell)
iirc, Haskell has some sort of green thread model, which is quite far from being minimalistic
similar to Go, or Lua, or Rust pre-1.0
but better at isolating it
most threading side-effects would be abstrated into IO
so you can't safely wait on IO String to get String
okay thank you
Windows on its own isn't POSIX-compliant, but has a layer to allow for that
WSL and user-land wrappers like cygwin and mingw
MSVC tries to be compatible with POSIX
but only tries, and not that much
Microsoft POSIX subsystem, an optional Windows subsystem included in Windows NT-based operating systems up to Windows 2000
optional, then removed
oh shit
with open(r'names.txt', 'r') as file:
data = file.read()
# make the user search for his/her name and age first
search_name = input("enter your name")
search_age = input("enter your age")
#write a code here that searches the users name and age in the file
updated_data = []
for line in data:
if f"name : {search_name}, age : {search_age}:
# then take new name and age from the user.
new_name = input("new name")
new_age = input("32")
replace_text = f"name : {new_name}, age : {new_age}"
#then replace it
with open(r'names.txt', 'r') as file:
replace_text = file.readlines()
for line in replace_text:
if replace_text in line:
line = f"name : {new_name} , age : {new_age}\n"
updated_data.append(line)
with open(r'names.txt', 'w') as file:
file.writelines(updated_data)
this is how I would do it
again copying this code will not help
First of all, what is Python? According to its creator, Guido van Rossum, Python is a: > “high-level programming language, and its core design philosophy is all about code readability and a syntax which allows programmers to express concepts in a few lines of code.” For me, the first reason
@whole bear
@hoary kayak
i am trying it right now
oh ok sorry
no I did not
copying the code won't work
you will have to debug and make it work
with open(r'names.txt', 'r') as file:
data = file.read()
# make the user search for his/her name and age first
search_name = input("enter your name")
search_age = input("enter your age")
#write a code here that searches the users name and age in the file
updated_data = []
for line in data:
if f"name : {search_name}, age : {search_age}:
# then take new name and age from the user.
new_name = input("new name")
new_age = input("32")
replace_text = f"name : {new_name}, age : {new_age}"
#then replace it
with open(r'names.txt', 'r') as file:
file_data = file.readlines()
for line in file_data:
if replace_text in line:
line = f"name : {new_name} , age : {new_age}\n"
updated_data.append(line)
with open(r'names.txt', 'w') as file:
file.writelines(updated_data)
I had the same name for 2 variables
in line 17 and 19
i thunk i got the proplem
this image hurts my eyes
w3schools is great
!e
print("Hello, World!")
@lunar mulch :white_check_mark: Your 3.11 eval job has completed with return code 0.
Hello, World!
!e
print("Hello, World!")
exit(9999999999999999999999)
@lunar mulch :x: Your 3.11 eval job has completed with return code 1.
001 | Hello, World!
002 | Traceback (most recent call last):
003 | File "/home/main.py", line 2, in <module>
004 | exit(9999999999999999999999)
005 | ^^^^
006 | NameError: name 'exit' is not defined
huh?
you need sys
!e
print("Hi klaus. How are you?")
yeah guys
@devout bloom :white_check_mark: Your 3.11 eval job has completed with return code 0.
Hi klaus. How are you?
sus amogus
Sys stands for
!e ```py
from os import listdir
os.listdir("/")
@scarlet halo :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 2, in <module>
003 | os.listdir("/")
004 | ^^
005 | NameError: name 'os' is not defined
lmao
oh shit
Sus yamming smoothie
!e ```py
from os import listdir
listdir("/")
@scarlet halo :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e ```py
from os import listdir
print(listdir("/"))
@scarlet halo :white_check_mark: Your 3.11 eval job has completed with return code 0.
['home', 'usr', 'snekbox', 'lib64', 'lib', 'etc']
awe
how to do this
snekbox, github it
i have been solving this for 4 hours
sheiße
welcome to the programming world my friend
but i havenot solve it yet ...
!e
import socket
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(("162.159.133.232", 80))
@lunar mulch :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 4, in <module>
003 | client.connect(("162.159.133.232", 80))
004 | OSError: [Errno 101] Network is unreachable
!e ```py
with open("/balls.txt","w") as f:
f.write("balls")
print(open("/balls.txt").read)
@scarlet halo :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | with open("/balls.txt","w") as f:
004 | ^^^^^^^^^^^^^^^^^^^^^^
005 | OSError: [Errno 30] Read-only file system: '/balls.txt'
bruh
cringe bot
!e
import os
print(os.listdir("../"))
@lunar mulch :white_check_mark: Your 3.11 eval job has completed with return code 0.
['home', 'usr', 'snekbox', 'lib64', 'lib', 'etc']
!e
import os
print(os.listdir("../"))
@lunar mulch :white_check_mark: Your 3.11 eval job has completed with return code 0.
['home', 'usr', 'snekbox', 'lib64', 'lib', 'etc']
!e
import os
print(os.listdir("../usr"))
@lunar mulch :white_check_mark: Your 3.11 eval job has completed with return code 0.
['local', 'lib']

