#voice-chat-text-0
1 messages ยท Page 151 of 1
@whole spire They're talking about making their own languages.
You could ask them questions.
@midnight agate
so, I did the maths, and looks like 16 out of all 22 (or 20) submissions for this problem in Rust were made by me
(therefore having better/worse times is basically of no statistical significance)
https://leetcode.com/problems/height-of-binary-tree-after-subtree-removal-queries/
now I'm curious how it actually generates this bars/buckets
* these
finally lol
so, yesterday the graph looked like this, which is extremely weird if you think that times are plotted linearly
times actually look something like this, obviously not linear
well How r u able to solve leetcode problems not able to make logic
I am not able to solve leetcode problems
well, then don't
beep boop
its such a nice looking bird
mmmmm chicken
I ate chicken
Yes, so do I, but I don't crow about it.
lol
lol
It annoys me that people just shoot them.
If the population and genepool is properly administrated...okay, whatever, but ungh.
They remind me of birds of paradise.
yeah i can see the similarity
Discord doesn't like it.
So if you use it anyway and you get dinged for it...oh well.
Ya.
Oh, well, if it's in the name of disability accessibility, Discord can go pound sand, they should have got their shit together.
I am.
Please don't stop on my account.
Oppaimist
When it gets that hot, I take frequent, short, cool showers or otherwise wet my skin to get the evaporative cooling. I have a shirt that's the basketball shirt material with all the little holes. I wet and wear that.
Push to talk, yes.
damn gotta get my fingers right
lol
you got it
@somber heath I think my lady is setting me up, she tells me she thinks its great im making friends all over the world on here...
and given my observations of her, im left to ponder such a motive.
@Opa
I know neither you nor your significant other well enough to comment.
@somber heath ah yes, but i do. and im using this knowledge for the benefit of casual converation with humor based context.. is it working?
:9
what the hell was that?
errg
๐ฆ
better
@turbid sandal ALT + F4 trust me
@wind raptor should i key up the mic and see if he notices his own typing?
Every move you make,
Every key you press,
Every mouse you click,
Every breath you take,
WE CAN HEAR YOU.
Theme song for the FBI
Right?
@turbid sandal can i hab the domain name of ur site? i just wanna test
just fuzz openssh with AFL lmao
curios and curioser
quricious
in the context of alice of wounder land n
y
=x * the value of y squared
y = sqrt(1/x)
if y == y then y commit?
then x = y
i just changed my cpu its 0 now
error
what's the context?
@midnight agate
https://leetcode.com/problems/add-two-integers/
are there any vc logs in discord? if yeah then check the voice log 45 min ago
I wonder where those 12.1% come from
when coders chat lol
mood
there are actually ways to make it worse
||```py
from collections import namedtuple
from operator import add
_Solution = namedtuple('Solution', ['sum'])
Solution = lambda: _Solution(add)
the inputs are string
#!/bin/bash
The Code of Conduct for our community.
item 5, first example listed
#!/bin/lmao
or #!/bin/fish
or #!/bin/python
or #!/bin/zsh
#!/ -folder missing-
thanks
folder
quant@lincox:/ no such file or directory
thank you i don't pay much mind to santax on my own system
sadge
@turbid sandal sudo chmod +x {filename}
you dont need sudo unless u want it to be ran as root tho
there are ways to solve it without explicit iteration/lambdas/etc.
ew
doesn't snekbox have, like, a temporary file system to some extent?
Yes.
we used to have write perms in snekbox in the earlier days
then googlel nsjail kicks in
and mood
me
Can you solve this real interview question? Reverse Nodes in k-Group - Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.
k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-out nodes, in the end, should...
all substrings need to be either in form "0...01...1" or "1...10...0"
oh ok my bad
Yahoy.
How else are governments supposed to make money from sales of alcohol and cigarettes?
good ol fashioned stealing
!voiceverify
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Anyone here who can take me with them remotely, as if I can learn to coding in python please? I've some hidden autism that need accountable environment to learn with fun! Hope you feel my struggle!
absolutely understand you needs, if anyone wishes to conform to those needs, or some individuals are in publicly private session you are welcome to join.
@wind raptor @inland gorge interesting
@midnight agate why do keep track of low?
!stream 1053732836693258391
โ @turbid sandal can now stream until <t:1687441594:f>.
ah, previous bounds
||```py
from itertools import pairwise
class Solution:
def findLengthOfLCIS(self, nums: List[int]) -> int:
c = 1
m = 1
for a, b in pairwise(nums):
if a < b:
c += 1
else:
m = max(m, c)
c = 1
m = max(m, c)
return m
I changed it a little bit and this happened
"luck, visualised"
@inland gorge noise
@rugged root vim works just fine with arrows and other things
it doesn't make you use hjkl
"slower" doesn't matter here, I think
it's too random
another solution
||```py
from math import isnan
from itertools import pairwise, groupby, starmap, filterfalse
from operator import lt, itemgetter
class Solution:
def findLengthOfLCIS(self, nums: List[int]) -> int:
return max(filterfalse(isnan, map(sum, map(itemgetter(1), groupby(starmap(lt, pairwise(nums)), (float('nan'), 1).getitem)))), default=0) + 1
one-liner except for imports
and the third one just so I can forget these troll problems exist
https://leetcode.com/problems/root-equals-sum-of-children/
in the previous answer that gave 99.3 could you try declaring the variables before the funciton? see if that increases speed at all?
it's random, same solution can have +- 20ms time difference
maybe, Codewars' more than three levels of difficulty make sense
8/7 are fundamentals
which these would qualify as
if stuff
else stuff
done
6/5 are what leetcode would have as easy/medium
4/3 are what leetcode would have as medium/hard
2/1 are almost "project-sized" sometimes
@midnight agate I found this tag exists
but there are no easy ones
https://leetcode.com/tag/randomized/
also I found out that you don't actually have to return a list in some tasks
IF-FI comes from Algol, iirc
from some other problem
"at which point should I just use Lisp instead?"
Be back in a bit
press ctrl+alt+l to auto-format
if it's PyCharm
that'd be the first step
PyCharm underlines most of the simpler issues
whats the issue with that line tho
@drifting latch Temp muted you because your mic was stuck open
hover over it and it'll tell
And we were getting lots of static.
Please check your voice settings and fix it, if you don't mind
oww yeh
i forgor
my headset
unmute me?
i think its ok
this might fix most of it
Still doin' it
it did
but there is just like one line
where its saying simplify it someotgasdjai
lists are gon have me dead ๐ฏ
so, next thing, still regarding formatting:
N name implies it's a constant
it should be n instead as PEP8 says
OHH
@inland gorge I think the echo is coming from you
at first I thought the task was to remove neighbours if they both exist
which would be a fit for collections.Counter
@whole bear It's still echoing from you
Maybe mute between when you're talking?
while 1 < n < 26:
@inland gorge Please mute your audio. We're getting street noise
search here|do not search here|search here|do not search here|search here|...
||```py
class Solution:
def countAsterisks(self, s: str) -> int:
return sum(group.count('*') for group in s.split('|')[::2])
in Python it's cheaper
time-wise
!stream 589486368049201163
โ @drifting latch can now stream until <t:1687444233:f>.
unless groups are too granular, most of the time is spent in str.count/str.split
I wonder if split+count would be faster or slower in Rust compared to no-double-pass
Rust's split works with slices
well it probably work fastest if you could figure out the physical size of the memory block and conform each function wthin that size, sorta like programming in twitter where you give full context in a short amount of characters
the only thing I know about programming in twitter is how they totally misused Ruby
although i agree, i must express my sincerest point that it was an example
five hundred milliseconds of compute per requests
why?
"try-catch is more idiomatic than for"
Ruby was not designed at the time to cheaply handle exceptions
hmm
so the orginal construct of they did is proprietary ? no wonder elon was interested
!e
fruits = ["banana", "banana", "banana"]
try:
i = 0
while True:
print(fruits[i])
i += 1
except IndexError:
pass
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | banana
002 | banana
003 | banana
\\
s p a m b o t s
voice trolls rather
We had an issue with hit and run trolls. Folks who would join the server, join voice chat, scream, and then leave
true
this is way cheaper in Python, compared to (old) Ruby
We haven't really had that issue since we put up the gate
true ๐ญ
I know it's inconvenient, however if you plan on being in the server for a while, it's a drop in the bucket
It's also to encourage interaction with the server in general
But if you have a better suggestion, I'm always open to hearing new ideas
if there are 5~10 people joining at the same time and trying to disrupt everything, voice gate is probably the best option
Because it's hard to verify intent
you can participate naturally in conversations in the text channel, for now
@echo garden the more effort they put in, the more they fail as trolls
trolling metric:
(others' effort)/(your effort)
You're participating now. If we're in VC, we're typically watching the text chat as well
So no one gets left out
its funny sometimes listening and watching because its always like "HOW COME I CAN'T" then its like " oh "
i get you I didn't agree with it much myself but we all have gone through it
"very trustworthy academic source":
https://youtu.be/AHqGV5WjS4w
Speaker: Matt 'openfly' Joyce
Trolling is something that today has a very negative connotation on the Internet and in the common usage of the word outside of it. However, for better or worse trolling has long enjoyed a close relationship with hacking be it in the area of information security, or simply in technology development. I intend to d...
while True:
ham = int(input("Enter the number of hams you want: "))
if 4 < ham < 75:
break
The only issue i have with voice when it gets to about 5 its a whirl wind of trying to cut in lol
if only emojis were of proper width
@midnight agate extra challenge for what you just solved:
O(1) extra space (maybe sacrificing correctness)
my first solution was same up to reformatting
||spoiler||
no, streamed
counter solution is streamed too
which type of sum?
it still need to be very correct
like
correctness is a parameter
you can't have it fail in 10% cases
sacrificing but not entirely
||```py
from functools import reduce
from operator import xor
class Solution:
def divideArray(self, nums: List[int]) -> bool:
return reduce(xor, map(hash, map(str, nums))) == 0
@inland gorge I scooted you down to afk. Please figure out the background noise in your mic before returning
no
it'd fail
hash of a string is more reliable
hash of an int is mostly equal to it
except for -1
hash of -1 is -2
!e
print(hash(-1))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
-2
"""
code that
won't
be run
"""
unless data is maliciously constructed, it should work fine most of the time
isn't there micropython for microcontrollers also?
micropython has a built-in implementation of b-trees
quite unexpected, tbh
https://docs.micropython.org/en/latest/library/btree.html
@drifting latch https://www.adafruit.com/
Adafruit Industries, Unique & fun DIY electronics and kits : - Tools Gift Certificates Arduino Cables Sensors LEDs Books Breakout Boards Power EL Wire/Tape/Panel Components & Parts LCDs & Displays Wearables Prototyping Raspberry Pi Wireless Young Engineers 3D printing NeoPixels Kits & Projects Robotics & CNC Accessories Cosplay/Costuming Hallow...
I still don't understand what's the state of Windows on ARM
Windows has traditionally run on machines that are powered by x86 / x64 processors, but more recently, also runs on devices powered by Arm processors.
seems like the state is "yes"
They do have an ARM branch yeah
solution 2
||```py
class Solution:
def findNonMinOrMax(self, nums: List[int]) -> int:
nums = iter(nums)
mn = mx = next(nums)
for x in nums:
if x > mx:
if mx != mn:
return mx
mx = x
elif x < mn:
if mn != mx:
return mn
mn = x
elif mn < x < mx:
return x
return -1
solution 0
||```py
from itertools import filterfalse
class Solution:
def findNonMinOrMax(self, nums: List[int]) -> int:
mn, mx = min(nums), max(nums)
return next(filterfalse({mn, mx}.contains, nums), -1)
solution 1
||```py
from functools import partial
from itertools import filterfalse
from operator import ne
class Solution:
def findNonMinOrMax(self, nums: List[int]) -> int:
mn, mx = min(nums), max(nums)
return next(filter(partial(ne, mn), filter(partial(ne, mx), nums)), -1)
this seems to be minimal state
no mid
- exists as early as possible
my solution to this is total bad manners because of the type coercion I discovered recently
https://leetcode.com/problems/find-the-difference-of-two-arrays/
yes, given numbers being distinct
this
why assignment?
For all those who feared their Game Boy days would be but a memory, worry no more!ย The Game Boy may be dead, but with this packย you'll have a chance to revive it in style. ...
people don't like taxes
Our favorite food when hacking on code or electronics is a hot bowl of noodles - and around NYC these are often called 'noods'! What we've got here are flexible LED ...
I want
Adding LEDs to anything makes it 5x better -- it's a scientific fact! But when you have LEDs, you've got wires and power supplies and all that stuff is kinda annoying. What if you ...
This touch-able add on HAT for Raspberry Pi will inspire your next interactive project with 12 capacitive touch sensors. Capacitive touch sensing works by detecting when a person (or animal) ...
fruit drums!
:eyes
Hhhh
config error?
in my experience, all apache errors were config errors
but it might be something else
if it exits on startup, it might be as simple as a syntax error
(but it won't tell it)
some syntax errors aren't even recognised by apache
once I forgot to close the virtual host tag and it just started treating everything as that virtual host
(took a very long time to debug because imo config shouldn't even parse in this case)
now I have apache exclusively in docker
trying to move to nginx
because I don't use extensions like PHP/CGI/etc.
"we 'do agile', we deploy and explode a rocket each week"
Le sigh. Hey boof.
Youre on the roof?
The sigh isn't because of you.
Low tide....HIGH TIDE!
Low tide....HIGH TIDE!
Sorry, it doesn't make sense to have multiple pancakes? Er...no?
Weird business models...there's a phrase.
It happens
thanks
left my laptop running discord
now i can bake bread on this
lol
Delicious
Basically a case of knowing your surroundings.
tides
@rugged root This is why we're friends.
this is so weird hearing "passport" living in a country where the terminology for what it means is broken
How do you mean?
wow and i really thought paspports were like sucha general id to have in rest of the world
ye exactly
keep track of the time and the tide abd you won't get into trouble
forget and you might
iirc, with nitro, they regenerate
USSR used to have two passports:
- internal because you can't freely move around the country
- foreign for getting out of the country and be identified in other countries
after the dissolution of the USSR, internal passports got adopted by the republics as IDs
and the name "passport" remained
paying for nitro made sense because of streaming quality
we have the same
but you can use id in all of eu
and passport worldwide
I just use passport for everything though
Stovey McStoveface.
chaos cats
https://netflix.github.io/chaosmonkey/
None
Chaos Monkey is responsible for randomly terminating instances in production to ensure that engineers implement their services to be resilient to instance failures.
so, same but with cats
Cover the cable in a bitterant and that'll put a stop to that
They're talking about recovery, vs rescue, now.
Unless the people in the sub performed what Terry Pratchett would describe as "the dreadful algebra of necessity".
In which case less than a full compliment may yet be rescued.
In any case, I don't hold high hopes.
there's always a lot of implied and subtle assumptions in any manual
"I like how detailed this is"
good catch lol
something to inspire a seasoned developer
I was saying hello and asking how you were
class Solution:
def findDifference(self, nums1: List[int], nums2: List[int]) -> List[List[int]]:
nums1 = set(nums1)
nums2 = set(nums2)
return nums1 - nums2, nums2 - nums1
as I said, type system abuse
Of course it can make sense.
@turbid sandal Stop!
||```py
class Solution:
def sumOfMultiples(self, n: int) -> int:
n += 1
k, _ = divmod(n, 105)
return (
(k * 2940 + 5985 * (k - 1) * k // 2)
+
sum(i for i in range(k * 105, n) if i % 3 == 0 or i % 5 == 0 or i % 7 == 0)
)
speed comes from the other thing
it never loops more than 104 times
Maro I'm sorry I insulted l33t code yesterday
Or day before
My memory is shot
Just worried you were mad at me, was trying to say hello
everything up to (n+1) - (n+1) % 105 can easily be calculated
seems to work fine enough
Systems tend toward disorder.
Same
!e
print("[" + "".join(" +"[i % 3 == 0 or i % 5 == 0 or i % 7 == 0] for i in range(105)) + "]")
print("[" + "".join(" +"[i % 3 == 0 or i % 5 == 0 or i % 7 == 0] for i in range(105, 210)) + "]")
print("[" + "".join(" +"[i % 3 == 0 or i % 5 == 0 or i % 7 == 0] for i in range(210, 315)) + "]")
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | [+ + +++ ++ + ++ + ++ ++ ++ + + ++ ++ + + ++++ ++++ + + ++ ++ + + ++ ++ ++ + ++ + ++ +++ + ]
002 | [+ + +++ ++ + ++ + ++ ++ ++ + + ++ ++ + + ++++ ++++ + + ++ ++ + + ++ ++ ++ + ++ + ++ +++ + ]
003 | [+ + +++ ++ + ++ + ++ ++ ++ + + ++ ++ + + ++++ ++++ + + ++ ++ + + ++ ++ ++ + ++ + ++ +++ + ]
same pattern
sum for [105*k;105*(k+1)) is sum for [0;105) (2940) plus 105 times the number of numbers that fit the criterion (57)
and 5985 is 105*57
(k - 1) * k // 2 is just to optimally accumulate that over all values of k
spacebook and myface?
or facemy
wanted neither dead nor alive
@rugged root Me too.
!pep8 has stuff to say about asterisk
PEP 8 is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like flake8 to verify that the code they're writing complies with the style guide.
More information:
โข PEP 8 document
โข Our PEP 8 song! :notes:
the only reason why it's relatively okay for tkinter is because it's nearly dead so there's a little chance stuff you import gets changed
theoretically, you can put wildcard import before non-wildcard to make sure nothing gets shadowed if exports do change
@midnight agate there's actually a very small number of possible inputs, so they can all be pre-calculated
Not entirely surprising
@final osprey its proably because of "wow carbon fiber" and doesn't realize that carbon fiber is strong is on tension and not in compression
Yarp
NORFOLK, Va. (AP) โ People have been diving to the Titanic's wreck for 35 years. No one has found human remains, according to the company that owns the salvage rights. But the company's plan to retrieve the ship's iconic radio equipment has sparked a debate: Could the world's most famous shipwreck still hold remains of passengers and crew who di...
Not finding remains on Titanic is very likely since most of remains were on the surface
@amber raptor there is wild live there: https://www.youtube.com/watch?v=FmR14Yng9kI&t=24s it is just infrequent because of the decrees in production
Deep Sea Gigantism | Why Creatures of the Deep Grow so Large. Enter at https://www.omaze.com/naturalworldfacts for your chance to win a Custom Teslaยฎ Model S-APEX and support a great cause, the Petersen Automotive Museum. The experience closes on January 27th at 11:59pm PST and I promise, you donโt want to miss this!
Deep sea (abyssal) gigantis...
I'd like it if Fox News was actually just news about foxes. Neighbourhood sightings, new litters, video compilations, etc.
That'd be cool
I mean if they fix it up. Just realize the water give zero cares about you
Cruising Crew: How to be Welcome on Board
Something something Olympic-sized swimming pools.
I wrote "Kevlin" so often I automatically wrote that instead of "Kelvin"
What's Kevlin?
Kevlin Henney
That is a fascinating head he has
@gentle flint Democracy coming soon to the Hague: https://en.wikipedia.org/wiki/American_Service-Members'_Protection_Act
The American Service-Members' Protection Act (ASPA, Title 2 of Pub. L. 107โ206 (text) (PDF), H.R. 4775, 116 Stat. 820, enacted August 2, 2002), known informally as the Hague Invasion Act, is a United States federal law described as "a bill to protect United States military personnel and other elected and appointed officials of the United States ...
The butterfly bend is a knot used to join the ends of two ropes together. It is the analogous bend form of the butterfly loop, in that it is the butterfly loop with the loop cut. The observation that the butterfly loop is secure enough to isolate a worn or damaged section of rope within the loop indicated that the bend form of the knot would b...
The sheet bend (also known as becket bend, weaver's knot and weaver's hitch) is a bend. It is practical for joining lines of different diameter or rigidity.
It is quick and easy to tie, and is considered so essential it is the first knot given in the Ashley Book of Knots. Additionally, it is one of the six knots given in the International Guild...
In 1 hr
The bowline ( or ) is an ancient and simple knot used to form a fixed loop at the end of a rope. It has the virtues of being both easy to tie and untie; most notably, it is easy to untie after being subjected to a load. The bowline is sometimes referred to as King of the knots because of its importance. Along with the sheet bend and the clove hi...
The Siberian hitch (or Evenk knot) is a hitch knot used to attach a rope to an object. It is a type of slipped figure-eight noose. The hitch is known for having a tying method suitable even while wearing heavy gloves or mittens in cold climates. As a slipped knot it can be released simply by pulling the working end of the rope.
||```py
from itertools import accumulate, starmap
from operator import sub
class Solution:
def leftRightDifference(self, nums: List[int]) -> List[int]:
return map(abs, starmap(sub, zip(accumulate(nums), reversed(list(accumulate(reversed(nums)))))))
||```py
from itertools import accumulate, starmap, pairwise, islice
from operator import add
class Solution:
def leftRightDifference(self, nums: List[int]) -> List[int]:
return map(abs, accumulate(starmap(add, pairwise(nums)), initial=-sum(islice(nums, 1, None))))
```||
second is O(1) extra space
either multiple lookups of the same element, or multiple walks
||```py
from itertools import chain
class Solution:
def separateDigits(self, nums: List[int]) -> List[int]:
return map(int, chain.from_iterable(map(str, nums)))
@lucid blade
"it's all Germany, it has monopoly on Tor exit nodes"
this accidentally beat 99.63% by time
||```py
from itertools import cycle, starmap
from operator import mul
class Solution:
def alternateDigitSum(self, n: int) -> int:
return sum(starmap(mul, zip(map(int, str(n)), cycle([1, -1]))))
file:///C:/Users/Iona/Downloads/Untitled%20Diagram.drawio
@tepid edge it reduces time from "basically forever" to "doable for wealthy enough corporations"
** Deleted **
why VPN+Tor?
that extra VPN adds no security
!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.
||```py
from itertools import pairwise, chain
class Solution:
def isCircularSentence(self, sentence: str) -> bool:
words = sentence.split()
return all(word_l[-1] == word_r[0] for word_l, word_r in pairwise(chain(words, words[:1])))
||```py
from itertools import pairwise, chain, starmap, islice
from operator import eq
class Solution:
def isCircularSentence(self, sentence: str) -> bool:
words = sentence.split()
return all(starmap(eq, zip(
map(next, map(reversed, words)),
map(next, map(iter, chain(islice(words, 1, None), words[:1]))),
)))
```||
I never used map with more than one iterable
(maybe because I never read its documentation)
still avoiding for and lambda
||```py
class Solution:
def findClosestNumber(self, nums: List[int]) -> int:
x = min(map(abs, nums))
if x in nums:
return x
else:
return -x
can anyone suggest me some anime?
can i have stream
u sound like stewie from the family guy
I'm not back yet
u sound like stewie from the family guy
u sound like stewie from the family guy
Mushi-shi, Trigun, Martian Successor Nadesico, Baccano!, Outlaw Star
I could probably scrounge up a few more
u used to sound like stewie exactly like in 2021
sad
damnnn
like i can connect plome's accent to stewie's somewhat but the voice has completely changed fr
he was "verbose oof" back then
And in my heart, he still is
makes sense
us
but not SuperSonicSandwichSnatcher, I think
fair
like back then only few peeps came in the vc, Hemlock, verboof and opal
when shall I be plome
were the first few
Only time will tell
LP was there after 2021 mid june ig
damn
where is meuuustafa
?
F
no he was there yesterday working of aecor
4,9,5 | 9,4,9,8,4
!e
from typing import List
from collections import Counter
def intersect(nums1: List[int], nums2: List[int]) -> List[int]:
return [i for i, j in Counter(nums1).items() if i in Counter(nums2) for _ in range(min(j, Counter(nums2)[i]))]
print(intersect([4,9,5],[9,4,9,8,4]))
@cosmic lark :white_check_mark: Your 3.11 eval job has completed with return code 0.
[4, 9]
ez
now remove fors
no
i like messing around with people who try to comprehend codes
like a bit of obfuscations
well, it's trivial by the code what it does
it's just extremely ugly and inefficient
it's not obfuscated
thats how i want it to be seen lol
the ultimate would be to combine it with more idiomatic/efficient tools
but not gain any readability or real efficiency
like if u want more efficient it would be like:
def intersect(nums1: List[int], nums2: List[int]) -> List[int]:
counter1 = Counter(nums1)
counter2 = Counter(nums2)
intersection = counter1 & counter2
return list(intersection.elements())
tbh
but ig we are doing one liner solutions here
!e
from typing import List
from collections import Counter
def intersect(nums1: List[int], nums2: List[int]) -> List[int]:
counter1 = Counter(nums1)
counter2 = Counter(nums2)
intersection = counter1 & counter2
return list(intersection.elements())
print(intersect([4,9,5],[9,4,9,8,4]))
@cosmic lark :white_check_mark: Your 3.11 eval job has completed with return code 0.
[4, 9]
\aaaaaa\
there is this way to re-implement elements
def elements(ctr: Counter):
return chain.from_iterable(starmap(repeat, ctr.items()))
one liner with efficiency
right
hmmmm
brb
next in queue:
https://leetcode.com/problems/count-operations-to-obtain-zero/
@turbid sandal
!e
from functools import reduce
from collections import Counter
def commonChars(words):
return list(reduce(lambda x, y: x & Counter(y), words, Counter(words[0])).elements())
print(commonChars(["bella","label","roller"]))
@cosmic lark :white_check_mark: Your 3.11 eval job has completed with return code 0.
['e', 'l', 'l']
I did the same
I'm glad I chose to eat
All I had this morning was half a bottle of soda and like 1/3rd of a bag of jerky
\\\
I make poor life choices
!code
.container {
position: absolute;
top: 10px;
left: 10px;
text-align: left;
}
h1 {
font-size: 48px;
margin-bottom: 20px;
text-transform: uppercase;
}
.button {
display: inline-block;
padding: 16px 32px;
font-size: 20px;
border: none;
border-radius: 50px;
background-color: #4CAF50;
color: #fff;
text-align: center;
text-decoration: none;
cursor: pointer;
margin-right: 10px;
transition: all 0.3s ease;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.button:last-child {
margin-right: 0;
}
.button:hover {
transform: scale(0.95);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.header {
background-color: #282c34;
padding: 30px;
text-align: left;
font-size: 16px;
white-space: pre-wrap;
font-family: "Courier New", Courier, monospace;
}
</style>
</head>
<body>
45,8 43%
Hi! Too warm to do anything!
What's the temp?
Hello there
Yo
28, according to my heater's thermostat
germany?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Secret!</title>
<script>
function showMessage() {
var audio = new Audio('audiofile.mp3');
audio.play();
alert("You did not listen!!!");
}
</script>
</head>
<style>
body {
background-image:linear-gradient(to right, blue ,violet);
text-align:center;
}
.button {
border:none;
height: 100px;
width: 200px;
border-radius: 10px;
background-color: #4CAF50;
color: white;
font-size: 16px;
transition: width 0.32s ease 0.1s;
}
.button:hover {
width: 250px;
background-color: #4CAF50;
color: gray;
}
.button:active {
background-color: #807d7d;
}
</style>
<body>
<h1>Do not press</h1>
<div class="textbox"></div>
<button class="button" onclick="showMessage()">DON'T Press</button>
</body>
</html>
@turbid sandal
/secret
yeah
I'm new here though I am just trying to reach that 50 messages xd
to participate in voice chats
Isn't "Yusuf" an Arabic boy name!!???
New Jersey, Piscatawy.... nice
I mean they are a boy sooo
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.
password: capybara
I thought it's a girl voice ๐คฆโโ๏ธ๐คฆโโ๏ธ๐
They get that a lot
whats python even that good for
are these links have exploits or what, I don't understand
Stuff
Good for making tools, accessing APIs, prototyping things, gluing things together, stuff like that
@somber smelt Him, not her
didnt know
I know, that's why I'm saying
https//i.postimg.cc/PqYpqRw5/DSC9686.jpg
is that your public ip add?
VPS = Violent Puppy Squad
The ORIGINAL CUCUMBA Video (Macka B's Medical Monday)
Cucumba T-Shirts Available From: https://www.mackab.com/product/cucumba-t-shirt/
Please leave your comments below and share
Follow Macka B:
https://www.instagram.com/officialmackab
https://twitter.com/mackab
https://www.youtube.com/user/OfficialMackab
https://www.mackab.com
Lyrics:
Cucumb...
back in a bit
Heyyy
sup
a cheese burger with keptchup on the side
you know what is list?
its a sign
!docs list
class list([iterable])```
Lists may be constructed in several ways:
โข Using a pair of square brackets to denote the empty list: `[]`
โข Using square brackets, separating items with commas: `[a]`, `[a, b, c]`
โข Using a list comprehension: `[x for x in iterable]`
โข Using the type constructor: `list()` or `list(iterable)`...
!docs tuple
class tuple([iterable])```
Tuples may be constructed in a number of ways:
โข Using a pair of parentheses to denote the empty tuple: `()`
โข Using a trailing comma for a singleton tuple: `a,` or `(a,)`
โข Separating items with commas: `a, b, c` or `(a, b, c)`
โข Using the [`tuple()`](https://docs.python.org/3/library/stdtypes.html#tuple "tuple") built-in: `tuple()` or `tuple(iterable)`...
class set([iterable])``````py
class frozenset([iterable])```
Return a new set or frozenset object whose elements are taken from *iterable*. The elements of a set must be [hashable](https://docs.python.org/3/glossary.html#term-hashable). To represent sets of sets, the inner sets must be [`frozenset`](https://docs.python.org/3/library/stdtypes.html#frozenset "frozenset") objects. If *iterable* is not specified, a new empty set is returned.
Sets can be created by several means:
โข Use a comma-separated list of elements within braces: `{'jack', 'sjoerd'}`
โข Use a set comprehension: `{c for c in 'abracadabra' if c not in 'abc'}`
โข Use the type constructor: `set()`, `set('foobar')`, `set(['a', 'b', 'foo'])`...
@lunar haven i've never done leetcode is 94% good?
h.ttp://66.135.9.182/images/cola.jpg
enumerate(iterable, start=0)```
Return an enumerate object. *iterable* must be a sequence, an [iterator](https://docs.python.org/3/glossary.html#term-iterator), or some other object which supports iteration. The [`__next__()`](https://docs.python.org/3/library/stdtypes.html#iterator.__next__ "iterator.__next__") method of the iterator returned by [`enumerate()`](https://docs.python.org/3/library/functions.html#enumerate "enumerate") returns a tuple containing a count (from *start* which defaults to 0) and the values obtained from iterating over *iterable*.
```py
>>> seasons = ['Spring', 'Summer', 'Fall', 'Winter']
>>> list(enumerate(seasons))
[(0, 'Spring'), (1, 'Summer'), (2, 'Fall'), (3, 'Winter')]
>>> list(enumerate(seasons, start=1))
[(1, 'Spring'), (2, 'Summer'), (3, 'Fall'), (4, 'Winter')]
``` Equivalent to...
i did basic math and it takes you*** close to*** 4years to study 10,000 hours LOL
isnt it a year if you didnt sleep, eat shower and work
no it'd be a year and 2 months
easy
lowkey guessed, but i did the math and i was a week off lmao
it'd be a year and you'd make it on february 20th sometime during the day
class Solution:
def longestCommonPrefix(self, strs: List[str]) -> str:
strs.sort()
s1, s2, res = strs[0], strs[-1], ""
for i in range (len(s1)):
if s1[i] == s2[i]:
res += s1[i]
else:
break
return res
!e
'fl' > 'f'
@vivid jacinth :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e
print('fl' > 'f')
@vivid jacinth :white_check_mark: Your 3.11 eval job has completed with return code 0.
True
class Solution:
def longestCommonPrefix(self, strs: List[str]) -> str:
s1, s2 = min(strs), max(strs)
i = 0
while i < len(s1):
if s1[i] == s2[i]:
i += 1
else:
break
return s1[:i]
class Solution:
def longestCommonPrefix(self, strs: List[str]) -> str:
s1, s2 = min(strs), max(strs)
mismatch_index = next((i for i, (c1, c2) in enumerate(zip(s1, s2)) if c1 != c2), len(s1))
return s1[:mismatch_index]
@lunar haven
I forgot to remove strs.sort() ๐
@lunar haven what's the runtime of your soluntion?
What's up?
unlucky
Bicyclist uses music to get across the Brooklyn bridge.
- Jukin Media Verified *
Find this video and others like it by visiting https://www.jukinmedia.com/licensing/view/948386
For licensing / permission to use, please email licensing(at)jukinmedia(dot)com.
The cyclist is Noam Osband. You can find him
atย www.noamosband.comย orย
https://www.face...
its a one only episode (a pilot I guess) from OatStudios, available on Netflix
it is a sci-fi showing a point of view where Aliens came to our planet, with advanced technology start to destroy our cities, start to build megastructures that spill substances on the air to terraform the atmosphere for them
they slave humans, is mindblowing
YES
@turbid sandalits 4am in the morning i can't really talk loud
@turbid sandali just woke a little bit ago i have to go to my Probation appointment today
what is that
its what people goto if they want to stay out of jail.
tf
just got some things to do today
hows the weather today?
hot
interesting thing i came across about Elon Musk.. he "Has a slave a guy"
Join this channel to get access to perks:
https://www.youtube.com/channel/UCf7k_CRPu1ufFYXBCPHEt4g/join
taking a long time
!d pathlib
New in version 3.4.
Source code: Lib/pathlib.py
This module offers classes representing filesystem paths with semantics appropriate for different operating systems. Path classes are divided between pure paths, which provide purely computational operations without I/O, and concrete paths, which inherit from pure paths but also provide I/O operations.
If youโve never used this module before or just arenโt sure which class is right for your task, Path is most likely what you need. It instantiates a concrete path for the platform the code is running on.
Pure paths are useful in some special cases; for example:
"selenium" is not accessedPylance
Import "selenium" could not be resolvedPylancereportMissingImports
ctrl+shift+p
select interpreter
select the one that's in the venv
selecting the first one should fix the issue if the earlier pip show output was valid
python -m venv venv
his env is messed up ig
that still gives pylance error
it shows env as selected (iirc workspace means selected)
but shell is with .venv
yep he selected the one with .venv
in the interpreter selection
#web-development Ask here
I always wish the best all programmers here
It will be great if i would get any partner with my research interest with machine learning journey
When I can talk in voice server? 1
When I can talk in voice server? 2
When I can talk in voice server? 3
When I can talk in voice server? 4
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
guys is there a website that learns you phyton, html?
am very new to phyton, html.
and i need a webiste to learn me it. If there is a free website pls DM!!
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
!user command shows exact time of joining
You are not allowed to use that command here. Please use the #bot-commands channel instead.
Anyone hear that Mark Zuckerberg and Elon Musk is gonna have a cage fight?
zuck wins clearly
his fight stance is literally good
and he been training MMA for years now
alright, can't wait to see it to be honest
good fight
i mean wont be a good fight
musk doesnt train
zuck does
so its clearly a one way
fight
whatever makes them busy so they don't make world a worse place by their normal actions
what money does to a person
!pep8 @boreal copper
PEP 8 is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like flake8 to verify that the code they're writing complies with the style guide.
More information:
โข PEP 8 document
โข Our PEP 8 song! :notes:
@robust bone do ik u?
Homelander .! ๐ก๐ช
Wrong channel, dev
"I don't know anymore"
same
!code
!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 floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
@rugged root
I managed to get a meme font to work in my VS Code
best
> pickle for serialisation
this is so wrong
sorry
yeah, RCE
what did you mean wrong channel hemloack? @rugged root
I wasn't upset, was just saying if you were trying to show the code and links to folks in the Live Coding chat, you'd want to use the #off-topic-lounge-text channel
where?
pickle
Unearthรฉd code, in flowing pen
10 print 'Hello!'
20 goto 10```
Talking about how using pickle is super unsafe
tensorflow is made by googlel speaks alot for itself
Or at least potentially so
yeah
which website again?
no i mean people working on AI/ML arent mostly cybersec peeps
context from VC:
allegedly pytorch models are deser'd using pickle
fun fact : there has been ctf challenges featuring the exact same problem of uploading a pickle model
exactly
i mean there must be two groups the research and the implementations lol
pickle is quite common in CTFs
yep specifically on web challs
or jailbreak outs
like
probably, the largest security risk after exec/eval
yep
unless SSTI enters the chat
FORCEDENTRY.txt
TTYs aren't really the peak of security either if done wrong
thing to watch
https://www.youtube.com/watch?v=gd5uJ7Nlvvo
Software is complicated. Machine learning, microservice architectures, message queues... every few months there's another revolutionary idea to consider, another framework to learn. And underneath so many of these amazing ideas and abstractions is text.
When you work in software, you spend your life working with text. Some of those text files a...
not related to vulnerabilities but still important
speaking of how plain text can cause issues:
fonts can cause failure conditions
something doesn't exactly align
it's so weird
I changed notepad back to Consolas, all normal now
That's so bizarre
reverse engineering heaven
common tank name
@vivid palm Hiiiiiiiiiiiiiiiiiiiiiiiiiiiii
hola
the other way
I almost like the lamp.
.wa -6 f to c
-21C?! That'll freeze the hair on your chest.
I had light therapy once upon a time. So miserable.
Had to have it so often, too.
The shape.
I like the colour of the light and the salt lamp look I like, but the shape is squares on squares in a way that breaks the immersion of the effect.
I don't remember what lowest temperature we had this year
I think the February was abnormally warm
text editor itself isn't monospace
lines aren't evenly spaced either
which is annoying because inline type hints are just a little bit off
like, a couple of pixels
(with a normal font)
IntelliJ and VS have same issues
(in addition to VSC)
mostly good enough
eh
Wait
I forgot a command in ubuntu
to un-small it
container, specifically
unminimize
I don't remember anything about vim beyond what I use
things I use:
i
shift+A
:wq
:q!
esc
dd
gg, dG
and, I think, nothing else
Ah, yes. The sensual allure of shirking paperwork.
I wonder if there can be a mnenomic for ggdG (delete the entire file)
last one needs to be screamed
your mom is italics
@heavy flame What is your avatar from?
It's entrancing and confusing
hahah it s from one of discrod games
in terms of tech, TeX is somewhat ancient
last stable release of TeX is 3.141592653
today I found some "real software" using Subversion as a VCS
You merely adopted the fax machine. I was born into it. Molded by it.
yes, now, those three, I think
though, knowing the software engineers, that could just be Git at old SVN URL
Fair
this is all IntelliJ recognises by default
Makes sense
disk management thing is more useful to get the sizes
because it shows partitions, etc.
default partition might be less than 100%
I wasn't serious
Hi
Iโm new to python. Any good recommendations to learn the language?
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
We have a whole bunch of them listed on our site
I typically recommend "A Byte of Python"
Oh thatโs cool
And of course, if you end up having questions or need a concept explained or what have you, we're always happy to help
"Yeah, I murdered your family. Why aren't you negotiating with me?"
Thank you. Iโm reading currently the book โpython crash courseโ by Eric matthes
Crash Course is pretty good too
"Yeah, I stole your children. Why won't you sit down at the table with us?"
Depends
If you're not really enjoying it or learning as much from it as you think you should, then swap over
Otherwise I'd say stick with it and then look at the other one to see if there's anything the other one missed
Usually good to look at a few beginners things to make sure you've got your bases covered
Okay. I think until now it works pretty well. Iโll read it and at the end, I can just read the other one too and as you said, learn the new things that were missed in the first book
Python has a very large community anyway
If you get tripped up on classes let me know. I love teaching about them
So YouTube will also be very useful
Alright thank you so much
I got to go. Thank you for your time @rugged root
Any time
Lorem ipsum salts.
Context?
Heath Ledger's Joker. Some migrants die at sea, that's expected, so it doesn't capture people's attention. Some CEO and compliment get trapped in a submarine and people get entranced.
People use xbox controllers on navy ships.
Right?
That part of it wasn't all that surprising to me.
Yeah
Also, haaay Macro. ๐
I am.
lies!!
Nah, I do believe him
I am THE opal
I mean, we have a message history.
@somber heath I thought I had cancer in my chest and got an xray
if you're interesed in seeing my chest
Sure.