#voice-chat-text-0
1 messages ยท Page 166 of 1
Official 4K Video for โHandyโ by โWeird Al" Yankovic
Listen to โWeird Al" โ Yankovic : https://weirdalyankovic.lnk.to/listenYD
Subscribe to the official โWeird Al" โ Yankovic YouTube channel: https://weirdalyankovic.lnk.to/subscribeYD
Watch more โโWeird Al" โYankovic videos: https://weirdalyankovic.lnk.to/listenYC
Follow โWeird Al" โ Yank...
:LETSFUCKINGGOOOO:
very cool emoji
sadly i dont have nitro
here
thats more like it
IStock
thats an amazing fix
true tho
TRUE THAT IT WAS TOO FAR
np
alright
alright i wonder
if women can choose to not date short guys
then can men reject overweight women
without getting some sort of hjate for it
hate*

i should honestly shut up before i get banished to the shadow realm
? repeat that
true tho
i am a overweight woman ๐
ษช แด ษชแด ษดแด sแดส ษช แดกแดแดสแด สแดแดแดแดแด sแดแดแดแดษดแด
true tho
i am NOT an overweight woman
i changed my mind
lmao
i think im gonna have to anaylse the executable
executables are cool
looks like the characters are intertwined with the others like riskys revenge
but i have no way of copying a character so this is gonna be hard
@graceful eagle M
I suggest #โ๏ฝhow-to-get-help and #user-interfaces.
!d tkinter
Source code: Lib/tkinter/__init__.py
The tkinter package (โTk interfaceโ) is the standard Python interface to the Tcl/Tk GUI toolkit. Both Tk and tkinter are available on most Unix platforms, including macOS, as well as on Windows systems.
Running python -m tkinter from the command line should open a window demonstrating a simple Tk interface, letting you know that tkinter is properly installed on your system, and also showing what version of Tcl/Tk is installed, so you can read the Tcl/Tk documentation specific to that version.
I could look at your code, but I'm restricted to mobile and I'm cold and crotchety.
Hey guys is it possible to ask you a question?
Is is. Whether it's possible for you to receive a satisfactory answer, however, is yet to be determined. What's up?
of course
I recently started learning python and covered the fundamentals and recently began webdev
import time
from multiprocessing import Queue
from threading import Thread
from fastapi import FastAPI
app = FastAPI()
class Run:
def __init__(self):
self.run_detector = True
self.com_queue = Queue()
self.running_thrad = None
def run_detect(self, queue):
while queue:
print("self.com_queue: ", self.com_queue.qsize())
print("self.run-detector:: ", self.run_detector)
print("hey there i'm running")
time.sleep(2)
def stop_detector(self) -> bool:
print("stopping the detector -> ")
self.run_etector = False
self.com_queue.put(False)
return True
def run(self) -> None:
self.running_thread = Thread(target=self.run_detect, args=[self.com_queue])
self.running_thread.start()
# self.running_thread.terminate()
runner = Run()
@app.get("/")
async def main() -> dict[str, str]:
"""
main function
"""
return {"message": "2"}
@app.get("/run")
async def run_detector() -> dict[str, str]:
runner.run()
return {"message": "started the thread"}
@app.get("/stop")
async def stop_detector() -> dict[str, str]:
runner.stop_detector()
return {"message": "detector stopped"}
Hi, Need help on the above code.
I'm trying to stop the thread but nothing is working like
I've tried to modify the run_detector directly without passing to thread
and also tried using queue but it's not working?
But im having trouble picking django or flask to learn as I know the trade offs but i want to know if I have the prerequisite knowledge necessary to learn
go for fastapi
I see
If you don't mind me asking what does fastapi teach me in terms of learning webdev?
You'll learn about types and async programming
Interesting. Will it give me some ground and fundamentals moving forward in webdev when using frameworks like django?
Django is well-suited for building large-scale, feature-rich web applications,
while FastAPI excels in building high-performance APIs with modern asynchronous capabilities.
By familiarizing yourself with these frameworks, you'll have a solid foundation to move forward in web development
and later on you can pickup any of the framework that doesn't matter once you'll have required concepts
btw
I wanted to ask if some of you were taught programming in school
@wind raptor ?
I learn it in school but it isn't the height level
Nah Im self taught
Nice
in school I learned only C#
but c, c++ and python I had to learn by myself
life is great
untill you need to debug code
what your opinion on legalization of nuclear bombs?
Definitely ok
singelton is cool
but it is more of a concept
programming isn't age restricted
Im 16 for example
i meant isnt
same
everyone can start programming whenever they are ready
my first language was python but I never got too deep into it until two years ago
ohhh
Im learning it right now
by the way what is the difference between tenserflow and pyflow?
I read about them but I would like to hear a second opinon?
no idea
put d in front of etector , apart from that idk
but i'm not using self.run_detector there
:incoming_envelope: :ok_hand: applied timeout to @turbid sandal until <t:1689530810:f> (10 minutes) (reason: attachments spam - sent 10 attachments).
The <@&831776746206265384> have been alerted for review.
!unmute @turbid sandal
:incoming_envelope: :ok_hand: pardoned infraction timeout for @turbid sandal.
:incoming_envelope: :ok_hand: applied timeout to @turbid sandal until <t:1689535480:f> (10 minutes) (reason: attachments spam - sent 8 attachments).
The <@&831776746206265384> have been alerted for review.
:incoming_envelope: :ok_hand: applied timeout to @whole bear until <t:1689538178:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
wow everyone being warned
macbook or windows for coding
i prefer macos
yo
does anyone know what code editor this is?
probably visual studio i guess
its vscode with a theme and side terminal
atom?
Legalize nuclear bombs? BOOM! Swaaaag Messiah
:incoming_envelope: :ok_hand: applied timeout to @obsidian dragon until <t:1689601343:f> (10 minutes) (reason: newlines spam - sent 102 newlines).
The <@&831776746206265384> have been alerted for review.
!unmute 163839418623459330
:incoming_envelope: :ok_hand: pardoned infraction timeout for @obsidian dragon.
The coronavirus pandemic has resulted in millions of cases across the globe. The United States has one of the highest death rates due to COVID-19 across the world, and its mortality rates will likely increase. Due to different approaches to containing the virus across countries โ as well as the quality and accessibility of health [โฆ]
:O
@stoic chasm
๐
Hi
Can someone unmute me ?
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
hey stranger ๐
Chris i can share my screen?
you can type in here we pay attention to text to
@wind raptor
Americas. How many burgers you eat today?
What kind of content did you want to share?
i'm writting some code
web scrapping
Most web scraping projects break TOS of the site they are scraping, so we generally don't allow it as content on stream
okay
incorrect plugin / extension use ?
Looking forward to participate in the conversation once I get voice verified
text more
programming with chat gpt be like ...
me
human meat seems like a health hazard
we're most likely to catch disease/parasites from human meat than any other
Iโve noticed several issues with chat gpt as a beginner. I still use it for giving me problems to solve. Also good for random questions
Will do
what's the issue here?
pretty sure python programming doesn't cause a fire risk
thats sutch a sketchy looking website
was off reddit
Hemlcokkkkk
Sup
it's been soo long
Ffs
That cut deep
Mr. Hemlock
Any environment is funny if there are enough people in it
It's always the case
what could be wrong with a simple innocent little rar file
XDXD.rawr
Lmaoooo @lucid blade
๐
8080 and hemlock, you guys are a sick duo
You can't prove that
You know 8080 this was just reckless. Now you're going to have to cut us in to keep us quiet.
Steve Wozniak prints his own pads of $2 bills... and spends them. He'll sell you a sheet with 4 bills for $5. Joshua Topolsky investigates this interesting bit of commerce on The Engadget Show.
Watch/download the full episode here: http://www.engadget.com/2011/01/31/the-engadget-show-017-steve-wozniak-sony-ngp-playstation-ph/
@lucid blade
As explained by reddit user exteras:
"Just so people don't get confused: these are real bills, printed by the US government. He buys uncut sheets of them from the Bureau of Engraving; anyone can buy these. He then takes them to a professional printer who cuts them up into pads and perforates them.
He's not printing the bills themselves, and its not illegal."
It wouldn't make sense to buy it if it wasn't cheaper though is it
Hemlock
Miyamoto Musashi once said, if you know the way broadly, you will see it in everything else. Do you see it in everything else?
Not sure
For the comedy of it
england in the midlands
Nice
i really hide my accent
I find that hard to believe
You sound like what I imagine zeus would be like
๐
that means Australians are the strongest people
๐ฉ๏ธ
cause anything that doesn't kill you makes you stronger ๐
Are you also insanely jacked and chiseled?
no im really skinny and lanky ๐
HA
of course
Come at me scrublord I'm ripped
That doesn't sound right
0 is still the first index
Spectre
No
What about me
You've known me for 3 years
Lmaooooo
Ykw
8080 you sound like tom hardy
That's who you remind me of
"server acquired"
What is going on?
Lmaooooo
Are you googling jokes?
Camp GetsShitDone
and my uncle Dinesh
8080 it gets boring when you're quiet
๐
lmao okay
ehhh
What's up with these questions?

Shit
And I'm stuck with vendors that are repeatedly giving me -- like, I've got one vendor that's told me four times in a row to "just try installing our application on a different server"
_I only have one server
_
All together I'm going insane
But I think I'm managing
WTF
30k??
might be a command to boot in to safe mode from your current session
bcdedit /set {current} safeboot minimal
Keen on more dad Jokes? Hit the subscribe button ya legends ๐
Find us on social media:
https://www.instagram.com/yeahmadtv
https://www.tiktok.com/@yeahmadtv
https://www.facebook.com/yeahmadtv
If you're in Sydney and want to come a long to our next shoot, shoot us a message!
Sam's Socials:
https://www.instagram.com/sammywalshhh_/
Akila's Soci...
i don't think that worked
bcdedit /set {current} safeboot network
shutdown /r
bcdedit /deletevalue {current} safeboot
this one?
Thankfully these are things that are explicitly on their end.
8080 do you really print stickers?
yeh
So you grew sick of programming?
just for other people
Have you considered research?
i dont think ill get back in to programming for a living
You'd be doing stuff for yourself and work on what you once enjoyed doing
What about things like google brain?
Do you believe in anarchy 8080?
Badass
You're like hobie brown from across the spider verse
mitch altman
Sick accent and badass guy
what does that even mean
Oh you normally have a thicker accent?
I don't have a telephone voice
yeah but that's different
you don't swear as much but your accent doesn't change
LMAOOOOO
Nicee XD
did you also work at NASA?
Or is that one of the things on the internet we shouldn't believe
Alright, this was fun. I'm going to hop off. 8080, it was nice meeting you. I had a good laugh.
From around Birmingham?
Very Tommy Shelby like
dont ever visit ... they wont let you leave ๐
Does that mean you're stuck?
spaceship with a space in between
sorry ๐คฆโโ๏ธ
Alright before I leave, could you please say something cool in your cool unfiltered accent
Yes please
Ah
Very nice
can you say it for me also please @lucid blade
@whole bear
welcome ... WHAT IS YOUR QUEST!?
๐
googles
Scaling neural networks has been popular in recent years. Several potent deep networks are produced with the depth largely increased for exponential expressivity. Then, the hidden dimension is effectively expanded using sparse MoE models and model parallelism techniques. As the last atomic dimension of the neural network, the sequence length sho...
Crazy
hehe
Sup
If you started a podcast, I would pay to listen to it
lol ๐ youre funny too ๐
I'm on the spectrum actually
yeh people hate the truth though in most cases ... i think im on the spectrum but never diagnosed
I'm not on the spectrum
are you a hacker??
i wish im not that clever
Okay...
I'll be back in like an hour
noooo
Have to have a meeting with a vendor to get our password manager up and running for the firm
@lucid blade have you heard of this company called Sandvine?
Or they'd form a human chain
1 ton isnt that much
1 cup = 8 oz
that's 9e12 tonnes
OMG
1 litre rice = 0.8 kg
2.8147498e+14
two hundred eighty-one trillion four hundred seventy-four billion nine hundred eighty million
what?
Therefore, 2 to the power of 48 is 281474976710656.
yes
5.629.499.534,21312 liter
13340046445 liters
!e py grains = 1 total = 0 for _ in range(64): total += grains grains *= 2 print(total)
@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.
18446744073709551615
1 litre rice = 0.8 kg
One kilogram of white medium rice converted to liter equals to 1.24 L
140737490
@midnight agate :white_check_mark: Your 3.11 eval job has completed with return code 0.
18446744073709551615
[2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904, 9223372036854775808, 18446744073709551616]
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...
I knew there was a trick, I didn't know what it was, specifically.
it starts from 1
!e
code
!eval [python_version] <code, ...>
Can also use: e
Run Python code and get the results.
This command supports multiple lines of code, including formatted code blocks. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.
The starting working directory /home, is a writeable temporary file system. Files created, excluding names with leading underscores, will be uploaded in the response.
If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside them.
By default, your code is run on Python 3.11. A python_version arg of 3.10 can also be specified.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!
so i was right
[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904, 9223372036854775808]
!e
import matplotlib.pyplot as plt
data = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904, 9223372036854775808, 18446744073709551616]
plt.plot(data)
plt.show()
@dry jasper :warning: Your 3.11 eval job has completed with return code 0.
[No output]
18446744073709551615
times the weight of each grain
yessir
It's 2^64 -1 grains
at 0.05 grams, it's 922337203685477632 grams
added is 2^64-1
yep
8080
1 kg = 15432 grains
noooooo
peace ๐
1 rice grain ~= 25mg
r u guys solving any dsa question?
!e
grains = 2**64 - 1
weight_kg = grains * 25 * 1e-6
print(weight_kg)
@vivid jacinth :white_check_mark: Your 3.11 eval job has completed with return code 0.
461168601842738.75
460 billion ton
chess rice grain story
?
There was once a king in India who was a big chess enthusiast and had the habit of challenging wise visitors to a game of chess. One day aโฆ
Tldr;
Can u just explain me this
simple words
some online cybersecurity groups are like that
At LEAST 5
dubai
!e
import os
@whole bear :warning: Your 3.11 eval job has completed with return code 0.
[No output]
hm
its 0% up to 12k in the us
Floating nuclear power stations (Russian: ะฟะปะฐะฒััะฐั ะฐัะพะผะฝะฐั ัะตะฟะปะพัะปะตะบััะพััะฐะฝัะธั ะผะฐะปะพะน ะผะพัะฝะพััะธ, ะะะขะญะก ะะ, lit.โ'floating combined heat and power (CHP) low-power nuclear power plant') are vessels designed by Rosatom, the Russian state-owned nuclear energy corporation. They are self-contained, low-capacity, floating nuclear power plants. Rosatom pl...
Might be shortly, but not currently
alright
I've travelling to overseas and not able to join discord recently
Oh sick, where all have you been traveling?
Yeah, its beautiful. Enjoyed a lot
very nice call
lol
without help desk who will hold back the hoard
you mean horde
@wind roost ivecometotalkwithyouagain
So long as it's not in a spammy way yeah
@rugged root is your name daniel
Correct
don't worry i won't
I didn't think you would, just force of habit to say it
and is your name Daniel Brown
Yes, it's in my profile on my Spotify
but there have been cuts in the tech sector esp. for contractor
Mainly in big tech I thought
I don't work in big tech and contractors are being cut
Is it mainly businesses just going to MSPs?
maybe i work in education and it mainly balancing budget and the consolidating onto one platform
one
Yeah that makes sense. Are you US based?
yes
Doesn't help how much we skimp on education
Why do you ask
yea its all about the tax dollars
Many products both within and outside Microsoft rely on .NET Framework. Beginning with version 4.5.2 and later, .NET Framework is defined as a component of the Windows operating system (OS). Components receive the same support as their parent products, therefore, .NET Framework 4.5.2 and later follows the lifecycle policy of the underlying Windows OS on which it is installed. The support lifecycle for various versions of Windows can be found on the Windows lifecycle fact sheet.
.NET Framework covers a broad set of technologies including the .NET Common Language Runtime, .NET Framework Base Class Libraries, WPF, and ASP.NET Web Forms.
.NET Framework 4.8 is the latest version of .NET Framework and will continue to be distributed with future releases of Windows. As long as it is installed on a supported version of Windows, .NET Framework 4.8 will continue to also be supported.
๐ฅธ
@somber heath We swapped to COBOL
Colon blow.
Anyone know about sony imx477?
gotta go shower, back in 20 minutes
wtf are you gonna do in the shower for so long
no lol
Why tho?
it takes max 5.5 min
โ ๏ธ gas station behavior โ ๏ธ
Oh lol
waiting in the line
Are the vc escapades classified as truck stop behavior or gas station behavior?
favorite variant btree?
I bet youโre a huge red black tree
I KNEW
Ha!
The amount of over talking to silence someone is crazy, yo
That's internet debates
i agree
If you are writing a set of options on how to eat a pie, would that be a CRUST API?
I'm sorry, that was really forced
ehhh hahahaha
I'm a embedded developer and mac is not friendly for embedded development : )
depends what kind of org and the size and your postion in the company
Yeah I could see that
Yea but Embedded is few programmers
What system do you typically use? Actually what editor as well? I've never been sure if folks that do embedded need particular programs or systems
On the scale of LP rage, yeah
Well correction
Modulating it now
Editor doesn't matter but let's consider i want to fash my development board and mac os won't support wide range of drivers
I also don't think it allows to ssh etc
lets move on
no
@rugged root HI how you been
Speaking of languages, it's time to halt starting any new projects in C/C++ and use Rust for those scenarios where a non-GC language is required. For the sake of security and reliability. the industry should declare those languages as deprecated.
7691
1582
Decent, you?
@zenith radish Tokyo?
!zen compli
Complex is better than complicated.
Well hmm
oh it won't give more than that
What better way to check the battery life than shorting the cell?
That's a nuclear take
I thought the majority in eastern europe was squatting and eating sunflower seeds
Isn't the groupthink here "I like to use Discord"?
Whatever you say I am, that's what I'm not.
@zenith radish you sound like you would enjoy reading Emerson
Rancid plastic mixed with the scent of cheap cloth and ink prints, and lightly pepered whith the sent of sex toys.
Sex toys have a scent?!?
idk, but apparently they have a sent
the back room of spencer's has a smell but it isn't the sex toys, it's the incense and the cannabis supplies.
the spelling of the last section reminds me of Chaucer
what did i walk in on
ill do all of you
what lol
@weary pivot hi
what kind
indeed
guys
@solemn igloo
gather around
i must tell you
something
let me lend you in on a tip
huh
A-MAZING
never back down
never give up
@weary pivot depends
on what?
never back down
never give up
A-mazing
@solemn igloo dms
import utime
from machine import Pin, PWM
Button = Pin(17,Pin.IN)
Butto = Pin(20,Pin.IN)
pwm = PWM(Pin(15))
MIN = 100000
MID = 150000
MAX = 200000
pwm.duty_ns(MID)
pwm.duty_ns(MAX)
left = Button(17)
right = Butto(20)
def move_right():
pwm.duty_ns(MAX)
utime.sleep(1)
pwm.duty_ns(MID)
def move_left():
pwm.duty_ns(MIN)
utime.sleep(1)
pwm.duty_ns(MID)
this is my current code
i am trying to achieve were when i press the left button the servo moves left
and when i press the right button the servo moves right
currently when i plug this code into it it just keeps moving in one directionm without me even clicking anything
im new to coding and really need some help
@elfin bone
very small error
so
basically
add this to the bottom:
move_right()
i dont fully get this code
bc im new, but it should work
bc u need to print the def

๐จ๐ฟโ๐พ ๐ ๐ฎโโ๏ธ
while True:
left.value()
move_left
right.value()
move_right()
import utime
from machine import Pin, PWM
Button = Pin(17, Pin.IN)
Butto = Pin(20, Pin.IN)
pwm = PWM(Pin(15))
MIN = 100000
MID = 150000
MAX = 200000
pwm.duty_ns(MID)
pwm.duty_ns(MAX)
left = Button
right = Butto
def move_right():
pwm.duty_ns(MAX)
utime.sleep(1)
pwm.duty_ns(MID)
def move_left():
pwm.duty_ns(MIN)
utime.sleep(1)
pwm.duty_ns(MID)
move_right()
bc ur defining something
on move right
u need to use it
what do u mean what do i mean def
does it work now
@weary pivot
nope
dam
GOD
UHH
@solemn igloo can u help him
let me think
whats the issue
explain it fully
look at dms
lol
check dms
man
this guy wants to like
make me click on his website
jk
@weary pivot @solemn igloo
yo bro
this guy said he knows russian nuclear codes
huh
nothing u said it
i said huh
moo
what
it cant be so serious
why cant you "discuss" it
how serious was it
were you trolling
or inappropiate stuff
ok so its probably something bad
its ok
i dont care
its over anyway
just make an alt
if it affected you
discord client, I assume
then maybe shut up?
@vocal basin what the fuck is your problem
im being nice to him
this isn't your buisness
and neither did i mention you
its ok
youdo you
> not allowed to discuss
and you're trying everything to make a discussion about it
please keep it family friendly here
im giving him advice
so maybe alisa should shut the fuck up
and leave me alone
what are you talking about?
shes acting as if im doing something harmful
im giving a guy advice and accepting his decisions
and alisa is making a fuss over it
and giving an aggresive attitude
anyways goodnight
alt account for warning evasion is obviously a harmful advice
it isn't a crime if you aren't caught
although
he isn't evading a ban
who said he cant make a new acc
no you dont need to hide
you can just make a new acc
its ok
moving topics
goodnight
what does grep do
ps/top
xbox is top ps is garbage
does anybody know how to open a csv in vscode?
you can open it just like a regular text file
or do you want it to be typeset as a table?
yes as a table this is my first hw assignment and I am trying to use the data set in the csv to
I've tried 3 different ways but it won't budge
> data set
do you need to access it from a program?
what do you do with the data afterwards? or do you only need to view it?
Financial Analysis
Total Months: 86
Total: $22564198
Average Change: $-8311.11
Greatest Increase in Profits: Aug-16 ($1862002)
Greatest Decrease in Profits: Feb-14 ($-1825558)
need a script to take the data set and output this, as well as export to .txt
this doesn't involve opening CSV in VS Code, likely
do you need to do this in python?
yes
!d csv
Source code: Lib/csv.py
The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. CSV format was used for many years prior to attempts to describe the format in a standardized way in RFC 4180. The lack of a well-defined standard means that subtle differences often exist in the data produced and consumed by different applications. These differences can make it annoying to process CSV files from multiple sources. Still, while the delimiters and quoting characters vary, the overall format is similar enough that it is possible to write a single module which can efficiently manipulate such data, hiding the details of reading and writing the data from the programmer.
!d pandas
these two libraries help with handling CSV
first is built-in
second is a package
problematic problem
name doesn't fully describe what's asked of a solution
leetcode changed interface again
it took me way to long to understand my previous solution
I refactored it a little bit and now it's faster, allegedly
@midnight agate multiple most common elements?
that might be why it's failing
@midnight agate what's your opinion on how to use git through GIT bash or through GIT GUI(GITHUB Desktop/Web) for beginner who wants to learn?
GUI tools will eventually fail at something, at which point you'll have to use CLI;
but GUIs are generally more user-friendly; I'd say it's true regardless of beginner/non-beginner;
and "it depends" will always be true; learn what's easier to learn, then learn the other thing too
(or maybe learn what's harder to learn first, idk)
thanks.
knowing the CLI provides the common language for the concepts that Git deals with
(so, if you were to need some functionality from a GUI you're not familiar with, you'd be able to do it quicker)
I use windows lap and i really want to learn @vocal basin
many IDEs now support interaction with Git
() missing
now it's ((lambda ...), y)
whereas the intended one probably was (lambda ...: (..., y))
!e
lambda a, b: b, a
@vocal basin :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 | lambda a, b: b, a
004 | ^
005 | NameError: name 'a' is not defined
!e
lambda a, b: (b, a)
@vocal basin :warning: Your 3.11 eval job has completed with return code 0.
[No output]
O(N) solution seems to be possible, and sorting is an unlikely element of an O(N) solution
||```py
from collections import Counter
class Solution:
def findShortestSubArray(self, nums: List[int]) -> int:
ctr = Counter(nums)
minidx = {}
maxidx = {}
for i, x in enumerate(nums):
minidx.setdefault(x, i)
maxidx[x] = i
return min((-freq, maxidx[x] - minidx[x]) for x, freq in ctr.items())[1] + 1
public class Solution {
public int FindShortestSubArray(int[] nums) {
Dictionary<int, int> frequencyMap = GetFrequencyMap(nums);
int maxDegree = GetMaxDegree(frequencyMap);
int minLength = GetSmallestSubarrayLength(nums, frequencyMap, maxDegree);
return minLength;
}
static Dictionary<int, int> GetFrequencyMap(int[] nums)
{
Dictionary<int, int> frequencyMap = new Dictionary<int, int>();
foreach (int num in nums)
{
if (!frequencyMap.ContainsKey(num))
frequencyMap[num] = 0;
frequencyMap[num]++;
}
return frequencyMap;
}
static int GetMaxDegree(Dictionary<int, int> frequencyMap)
{
int maxDegree = 0;
foreach (int frequency in frequencyMap.Values)
{
if (frequency > maxDegree)
maxDegree = frequency;
}
return maxDegree;
}
static int GetSmallestSubarrayLength(int[] nums, Dictionary<int, int> frequencyMap, int maxDegree)
{
Dictionary<int, (int firstIndex, int count)> countMap = new Dictionary<int, (int, int)>();
int minLength = nums.Length;
for (int i = 0; i < nums.Length; i++)
{
int num = nums[i];
if (!countMap.ContainsKey(num))
{
countMap[num] = (i, 0);
}
countMap[num] = (countMap[num].firstIndex, countMap[num].count + 1);
if (countMap[num].count == maxDegree)
{
int length = i - countMap[num].firstIndex + 1;
minLength = Math.Min(minLength, length);
}
}
return minLength;
}
}
not sure how
well, that can be interleaved
does more inequality comparisons of counts/slice lengths, seemingly
something's going very wrong
reboot fixed it
very bad
maybe docker restart could've fixed it too
as in that's not the good solution
in for lists mean "is an element of"
same for set
@stoic chasm because the behaviour of the list is the question
don't just blindly assume the goal of someone else's action
public class Solution {
public bool RotateString(string s, string goal) {
int slen = s.Length;
for(int i = 0; i < s.Length; i++)
{
if(s == goal)
{
return true;
}
s = s.Substring(1) + s[0];
}
return false;
}
}
given lists needle and hay you can do needle in (hay[i:] for i in range(len(hay)))
something like this?
||len(s) == len(goal) and goal in (s+s)||
inefficient
how so?
O(N^2)
length of a string
doesn't work for arbitrary sequences, that's the problem
??? normalize it first?
chain of two strings in this case
can join them, but that would involve making a new string
yes who cares tho
why do you need this operation to be fast
what's the time limiting preasure
how large do you expect your input to be
if you don't care then don't interfere
solution to what?
you're not the one to judge
well what's the benchmark difference
have you benchmarked your hot loops yet?
why do you need to check this that often
if you can cache the list it's gonna be fast
there is this isolated question
not only that, but also it performs a lot of allocations on each slice
is that the ones not in hot loops
are fine
honey this is python
adding big enough integers
allocates
that's below parrot even
it wasn't meant derogatory
its the style of answer
allocations happen
and the honey was meant as an example word
not as anything else
keyword big enough
yes > 256
example of what?
a word to start an example
an example word
it's literally how i speak
not even a gendered word
I need to find a gif that Clari sent earlier
it wasn't an address tho
i wasn't addressing anyone
maybe you aren't from here
english is complex
and i dont see any issues
"keep digging lol"
you are just trying to make fun of me
i dont like that
i wasnt calling anyone anything
it was the form of the example
i want calling anyone anything
its just how language works
you're not the one to judge
quoting you, "english is complex"
str.__contains__ seems to use these
https://en.wikipedia.org/wiki/BoyerโMoore_string-search_algorithm
https://en.wikipedia.org/wiki/BoyerโMooreโHorspool_algorithm
Ok sir
I'm surprised it's not horribly slow
I implemented the second one
with way too much OOP
(two classes, should've been zero)
it becomes harder with actual strings, because of how python stores them
@midnight agate if you're doing slices and concatenation, might as well just s+s
(in the last)
problem constraints seem to be to small for optimisation there
(+ variance in times is high for same reason)
need to test outside leetcode
it's a complex and data-dependent problem, just like caching
I'll try another method of string comparison
infinite hi chain?
Im having networking issues
How is that a easy problem lol
?
as in a lot of people agree
@glad sandal ARCh dub
oh haha
I am not the best programmer but I know a medium to hard problem when I see one
well, it works
and works poorly
each character gets assigned a permutation
hash of a sliding window is a composition of those permutations
||```py
class Solution:
def binaryGap(self, n: int) -> int:
return max(map(len, f"{n:b}".split("1")[1:-1]), default=-1) + 1
now the question is what you corrected to "you"
I don't remember any other non-abelian groups
wording
!e
print(int("เงชเญจ") * 10 ** 20 // 99)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
42424242424242424242
!e
for i in range(1, 10, -1):
print(i)
@vocal basin :warning: Your 3.11 eval job has completed with return code 0.
[No output]
doesn't print
Yea
first number in range is always the starting number
!e
code
I should use a function swapcase() right
!d str.swapcase
str.swapcase()```
Return a copy of the string with uppercase characters converted to lowercase and vice versa. Note that it is not necessarily true that `s.swapcase().swapcase() == s`.
x=int(input("enter a string:"))
Print(x.swapcase())
@vocal basin :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 | assert "ร".swapcase().swapcase() == "ร"
004 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
005 | AssertionError
I re-implemented my solution using abelian groups
but that's a terrible idea
do you know why abelian groups are bad there?
abelian groups are commutative
moving elements around doesn't change the result
which is not good
async def reminder_message():
print(3)
while True:
for i in data:
print(i)
if get_date() == i[1]:
now = datetime.datetime.now()
then = now+datetime.timedelta(days =1 )
then.replace(hour=15, minute=24)
wait_time = (then-now).total_seconds()
print(1)
await asyncio.sleep(wait_time)
print(2)
await print("MESSAGE HERE")
await print?
yea, cant think of anything else, any suggestions
you need to execute it at a specific time, right?
Yea
!e
from datetime import datetime, timedelta
now = datetime.now()
then = now.replace(hour=1, minute=0)
print(now)
print(then)
if then < now:
then += timedelta(days=1)
print(then)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 2023-07-19 10:06:54.314788
002 | 2023-07-19 01:00:54.314788
003 | 2023-07-20 01:00:54.314788
should probably use .date of now instead of replacing hour/minute
!e
from datetime import datetime, timedelta, time
now = datetime.now()
then = datetime.combine(now.date(), time(hour=1, minute=30), now.tzinfo)
print(now)
print(then)
if then < now:
then += timedelta(days=1)
print(then)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 2023-07-19 10:09:19.433431
002 | 2023-07-19 01:30:00
003 | 2023-07-20 01:30:00
so, this is just to find the next 01:30
if you need to wait until specific time
I'd probably make a separate function for repeating something at certain time
not for interval, for schedule rather
so basically, what i want is to get messages(print) at 4AM, 4PM, and 7:30PM every date i've in the data last, asynchronously if feasible as the program have other functions as well
problem here is that replace doesn't change the datetime
it returns new value
async def repeat_at(schedule_time: time, callback, *args):
loop = asyncio.get_running_loop()
now = datetime.now()
schedule_date = now.date()
def schedule_datetime():
return datetime.combine(schedule_date, schedule_time, now.tzinfo)
while schedule_datetime() < now:
schedule_date += timedelta(days=1)
while True:
now = datetime.now()
wait_time = (schedule_datetime() - now).total_seconds()
await asyncio.sleep(wait_time)
loop.call_soon(callback, *args)
schedule_date += timedelta(days=1)
also you need to check that schedule is actually in the future
if I wrote it correctly, that code calls callback(*args) each day at a given time
schedule_date is the day when the next callback will occur
what version of Python are you using?
3.11.4
async def do_something():
print("doing something")
def schedule_something(tg):
tg.create_task(do_something())
async def run_tasks():
async with asyncio.TaskGroup() as tg:
tg.create_task(repeat_at(time(hour=4, minute=0), schedule_something, tg)
tg.create_task(repeat_at(time(hour=16, minute=0), schedule_something, tg)
tg.create_task(repeat_at(time(hour=19, minute=30), schedule_something, tg)
(idk if any of it works, but it might)
tg?
task group
introduced in Python 3.11
simplifies management of tasks
there is also asyncio.create_task
!d datetime.time
class datetime.time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)```
All arguments are optional. *tzinfo* may be `None`, or an instance of a [`tzinfo`](https://docs.python.org/3/library/datetime.html#datetime.tzinfo "datetime.tzinfo") subclass. The remaining arguments must be integers in the following ranges...
this one is passed in as an argument
from datetime import datetime, time, timedelta
creates new task to handle do_something
so that if, for whatever reason, do_something takes longer than a day once, it doesn't prevent next iterations from running
should probably try with something more frequent than once every day
idk how though
it will actually be easier with the date-specific solution
repeat_at defined here
another variant
async def repeat_at(schedule: AsyncIterable[datetime], callback, *args):
loop = asyncio.get_running_loop()
async for schedule_datetime in schedule:
now = datetime.now()
wait_time = (schedule_datetime - now).total_seconds()
if wait_time > 0:
await asyncio.sleep(wait_time)
loop.call_soon(callback, *args)
async for there to allow dynamically adding dates
schedule is just a stream of datetimes
can be just a list (if you change async for to for)
I'll write a more detailed explanation later
cool
Can't join right this moment, will be there later
@midnight agate Can you read your dm ?
In Python, indices begin at zero.
@midnight agate https://leetcode.com/problems/trapping-rain-water/
hii
How's it going folks
Sorry, I just realized I wasn't scrolled down to the bottom of this chat ๐ตโ๐ซ
O7TV own all distribution rights of the uploaded videos on our YouTube channel. If you like to use videos for uploads or commercial use please contact "license@shooba.de".
.-""""-. .-""""-.
/ \ /
/_ \ /
// \ / \ // \ / \
|_\ //| |__\ //|
\ || / \ || /
\ / \ /
\ __ / \ __ /
'..' '..'
| | | |
| | | |
@vocal basin hello
@vocal basin if you have time , i need some help
@somber heath hello
The ascii art is getting a bit spammy and if everyone starts doing it, chat would become hell. Would you mind not posting these?
@midnight agate https://www.democrats.senate.gov/imo/media/doc/uap_amendment.pdf
@somber heath can you see the change when i had make this responsive to mobile view the text in shifting
can you help me with this?
I'm not in a position to be helpful right now.
i want when i shift to moblie view the text should me remain same as desktop like on fix on left and right side
can anyone help me with this?
ok no problem
@willow ruin can you help me with this?
Please stop pinging individual people for help.
Lmao
I just meant don't use more
This is becoming my favorite discord server
*sigh*
is it breaking any server rule?
It's considered poor etiquette.
MMMm
Typically better to just ask the question and wait for a response instead of pinging lots of people individually
ok means they were online so i think if its possible to them they will help