« first day (3967 days earlier)      last day (998 days later) » 
00:00 - 17:0017:00 - 00:00

12:36 AM
@CoolCloud looks the same to me
 
12:48 AM
cbg!
 
1:10 AM
I am trying to make this answer kinda a bit more like a canonical: stackoverflow.com/questions/68919220/…
Any ideas for me to edit would be welcomed!
 
 
2 hours later…
3:31 AM
Ye! Finally a gold badge
@ThePyGuy I answered another one of your bountied questions, hope you saw it
 
 
1 hour later…
4:32 AM
@U12-Forward, Thanks for the answer, I just saw that
 
@ThePyGuy Alright!
 
Hmm, Congrats for the Pandas golden badge
 
Haha thanks man!
 
 
3 hours later…
7:43 AM
Hello Everyone, I am thinking to take Data Structure Course, should I take in C++ or Python.
 
hello, this is the python room, so answers might be biased
but if I were you, I would just start what I already know, so I dont waste time on learning the language but instead the course
 
That's right. I am learning in Python and I can also code in C++. But I will go with python.
 
"waste time", not that learning a language is wasting time, considering your priorities, should have phrased it better
 
Is pthon_user a bot?
 
I think it depends on the kind of data structure you're learning but I may be wrong
 
7:47 AM
ohh wow
 
@MalikHamza Yes, he's pretty good at giving human-like answers
 
I am just impressed. Wow
 
reply with "nice bot" to get 10 upvotes
 
@python_user nice bot
Done, but didn't get upvotes.
 
you can stop, I am not a bot, idk what made you assume that, bad "joke" from my end to
 
7:52 AM
ohh, sorry!! my bad. He said you are. I just thought you really are.
 
@MalikHamza You should sense the humor a bit...
Obviously it's not like a bot is gonna give you 10 upvotes...
 
Got it. I am sorry for that.
 
@MalikHamza I'm sorry I was just messing with you, but a bot this good would be really impressive indeed
 
@AlexandreMarcq Yep, may be in future we will see bot like us. and we won't be able to recognize.
 
cbg
 
7:57 AM
cbg
 
cbg
 
Would you mind telling me the cbg means please?
 
Cabbage, which means hello
Please see the link Alexandre Marcq sent
 
8:00 AM
Oh got it!! Thanks. I have learnt something new.
Melon!!
 
@MalikHamza Make sure to read the rules also on the same site, so that you can get how this room works
 
Obv, I will. And I will follow those rules.
 
I am thinking about some pandas cannonical...
Any ideas...
I've this morning edited this answer to be a cannonical-like answer...
But thinking of something else like a self-answer... Maybe about explode... not sure
Ohh maybe will do something about melt.. yeah!
 
8:39 AM
7
A: We’ve removed the option to disable the fixed top bar

Ilmari KaronenI didn't notice that Ollie had already written a user script to make the top bar non-sticky, so I wrote my own. I like mine slightly more, since it just injects a couple of lines of CSS instead of installing any active event handlers: // ==UserScript== // @name SE No Sticky Top Bar // @na...

Userscript inside
 
9:26 AM
ngrok is such a useful tool
 
10:17 AM
Python web automation?
I am having some problems with python selenium I have made a code that creates a google account but it needs a phone number verification to complete the process is there any way of making like a phone number to receive messages like sms in python? and set it to a variable
 
@python_user Wow, but it looks very very different....
 
can you send a screenshot? maybe I just didnt notice :/
 
yeah, its different for you
 
Laurel, just me? I do not remember doing anything that might change the font. Anyone else?
 
10:23 AM
Does this chat support python web automation?
 
Anyway the old one looks far better to me...
 
@Havish.S what do you mean?
 
Hi everyone I need some help
I have this JSON data in this format. My end goal is to flatten it and have it in the form of columns. I tried using json_normalize but it adds rows rather than adding columns(i.e. total no of rows should remain constant). Here is some sample data:pastebin.com/UdARJagU
 
10:42 AM
@RaphX weren't you asking this yesterday?
 
@JonClements yes but I didn't provide any sample data
 
@python_user I meant that does this chat support python web automation?
Hello
 
Hello,
If we have a sorted array A=[1,2,3, ...] indexed by U={1,2,3,..., N}, then why inserting/putting a new item costs O(N) given that we could simply skip half of elements since array is sorted please?
 
I can't help because I am not very experienced with python
 
@Avra I think you might be confusing the time complexity of finding the insertion index with the time complexity of actually inserting a value into a list. Inserting a value into a list is always O(N) because the list has to shift the position of all subsequent elements
For example, if you insert a value at index 0, then the element that's currently at 0 must be moved to position 1, that one must be moved to position 2, and so on
 
10:56 AM
@Aran-Fey. Thank you. I got confused because this was coupled with another assertion that if we have unordered array, then put costs O(1), but why for ordered array it costs O(n) please?
 
I don't understand why that would be the case. I neither understand how it could possible be as fast as O(1), nor do I understand why that time complexity would shoot up all the way to O(N) for an ordered array... even if we take the time complexity of finding the correct insertion point into account, that would only be O(log N)
 
@Aran-Fey. This was taken from Prof. Goodrich slides.
 
I don't know the guy, and I'm not going to google who he is or what he wrote. He's either wrong, or terrible at explaining what on earth he's talking about
 
@Aran-Fey. We are on the same page! Thanks.
 
this conversation bothers me. I think you've understood something that is not correct.
 
11:06 AM
@Aran-Fey inserting into a sorted list is O(n) right?
 
Inserting into any list is O(N), yes
 
ok, I just got confused because of "nor do I understand why that time complexity would shoot up all the way to O(N) for an ordered array."
 
@Aran-Fey this is the main explanation
 
Oho, I just realized he said unordered, not unsorted. So when he says "unordered array" he might be referring to a set
 
11:10 AM
Pretty sure "unordered array" is an oxymoron, but whatever
 
also yes
 
unordered and unsorted are same right?
 
@Aran-Fey. I am referring to array-based table. So, again I am confused why put takes O(1) for unordered and O(N) for ordered ARRAY, when we could simply skip half of elements in ordered array (not list or set).
 
@Avra okay, you've definitely misunderstood stuff.
 
@python_user. I assume that both are same as the term used for sorted elements is ordered, so I would assume unordered means unsorted
 
11:12 AM
so, i guess, let's put things into perspective. first things first, people can be very loose with the term "array" in general. Sometimes people think they're doing everyone a service by keeping things language agnostic, but it might not help.
So let's be specific here. if you're familiar with python datastructures, it would help to refer to the concepts against the datastructures in python
things with an O(1) "put", lead me to believe that "unordered array" was intended to be what would be a python "set".
 
@ParitoshSingh. Then I would choose list as its the closest to array I guess
 
@python_user No. Unsorted is something like ['b', 'c', 'a'] - 'b' < 'c' < 'a' is not true, therefore it's not sorted. But, because it's a list, it's still ordered - 'b' is the 1st element, 'c' is the 2nd element, and so on. Unordered is something like a set, which doesn't have such a thing as a "first element".
 
ahh got it, thanks that makes much more sense now
 
so, either blame the author, or give them the benefit of doubt, either way is fine: but the case with O(1) add/put is in context of hashsets or sets.
now, insert into the middle of an array (let's say, actual arrays or list won't actually matter, but for the sake of discussion let's say it's equivalent to python list) is O(n).
note, that i was specifically inserting in the middle of the list. now, even if i had a sorted list, it wouldn't matter for insertion. The reason is already explained by Aran above
just to be very clear, time complexity isn't a measure of "exact" times, it's a measure of how the times change/scale/grow in relation to the changes in number of items
this is why inserting at the middle and inserting at the start won't make a difference, You're still having to do a shifting of elements that are proportional to n, (even half of n is still proportional to n, and so on.)
 
@ParitoshSingh. Thank you. Why it's O(N), when we could simple take middle=(len(list)-1)-0/2 please? Then we compare against that element at the middle index? So we can skip half of elements of ordered list in this case please?
 
11:19 AM
compare? or insert?
what operation are we talking about here. let's also be clear on that
 
Yeah, you're talking about finding the insertion point again. Not about the actual process of inserting the value into the array.
 
you've probably mixed up searching with inserting
yep, Kevin'd by Aran
 
@Aran-Fey. @ParitoshSingh, @python_user. Thanks. I appreciate it.
 
Here's the problem with this whole thing: An "unordered array" (or better, an "unordered collection") is a high-level concept. You can't really make any claims about its time complexity because that depends on the implementation. For example, a HashSet might insert in O(1) time while a TreeSet does it in O(log n). So the time complexity of insertions in a "Set", is... what?
 
aye, i personally don't like statements that try to be generic to a fault
 
11:27 AM
fwiw, the book would explain that, "from here after sets refer to hash sets"
most books have that
maybe Avra just skipped that part when explaining here
 
11:38 AM
Last question, how much does it cost on average to access a hash table (dictionary in Python) please? I see that on average it should cost O(log N) not O(1) because summation from i=0 to n of 1/i would give log N. Becasause on average, first element access of dictionary takes 1/1. Second, takes 1/2, third, 1/3, ..., 1/N. So, if we sum those values, we would get log N?
 
Why does the second access take 1/2? I'm not familiar with that principle
 
@Aran-Fey, @ParitoshSingh, @python_user. This is where I found ordered array takes O(N) and unordered takes O(1).
 
Interesting. I'd like to see more. Can you provide a link to that site?
 
@Kevin. Because, if we are calculating on average access time, then accessing 1 element, would cost 1 on. Accessing 1 of two, would take 1/2, and so on I guess?
 
I'm having one of those days... be sitting here getting frustrated with a client that hasn't responded to query I said about an urgent problem they've having... and just realised I never actually sent it... stupid puppy...
 
11:45 AM
@RaphX Nice, we're halfway there. Now just provide the exact expected output for your sample data and I'll be happy to look into the problem. (If you're thinking "do I really have to calculate by hand the dozens of rows of outputs that this input should produce?", not at all. Feel free to reduce the size of the input to just a few rows and columns, and hand-calculate those.)
 
@Avra "Becasause on average, first element access of dictionary takes 1/1. Second, takes 1/2" uh.. what?
 
@Kevin. Regarding first question, homepage.divms.uiowa.edu/~hzhang/c31/notes/ch06.pdf
 
Cool, thank you :-)
 
@Avra ok, this is a completely different ballgame. the thing is "dictionary implementations using <insert thing here>".
i suppose it wont really affect anything too much, maybe, ish, sorta, i guess.
 
you forgot "possibly"
 
11:49 AM
indeed, possibly
 
Looking at the slides... I think it's proposing implementing a dictionary by storing (key, value) tuples in an array. In the "ordered array", the elements are sorted by key. In the "unordered array", there is no gaurantee of any entry's position
 
@ParitoshSingh. What if each hash slot is list for example?
 
Both of these seem fairly silly to me, but hey, in theoretical CS sometimes things get weird
 
@Avra I don't think anyone has answered this question yet, so... it's O(1) in python
(99% sure it really is true for python and not just CPython)
 
yes, its true for python
 
11:51 AM
@Kevin. Thanks. You mean keys could be unsorted and thus we would have O(N) instead of O(log N) I mentioned
 
python has to guarantee this for it's datastructure, implementations have to uphold this contract
afaik. (there, saved myself)
 
@Kevin Hey its solved @Kevin
 
Yeah, for an "unordered array" dict, keys could be unsorted. Then the get operation is O(N).
 
@Avra im afraid i don't follow.
 
@Kevin Just found out a neat trick to do it
 
11:52 AM
@Aran-Fey. So Python implementation assumes no list at each index of a dictionary please? This is why it has O(1)
 
@RaphX, cool. Normally I would put the thumbs up character here, but it's on my other computer
 
haha
 
I have no idea how exactly it's implemented. But to clarify, it's O(1) on average. I don't know what the worst-case complexity is.
 
@Aran-Fey. Can you please clarify why O(1) on average? Do you have resource online so that I can further read pleasE?
 
I think Python does use some kind of linked list within its dict implementation, to resolve hash collisions... I don't fully understand the logic involved though
 
11:54 AM
Worst case complexity for dict access is O(n). That's if all the hashes collide.
 
There is some sophisticated logic that makes dicts smartly resize their buckets if it reduces collision frequency
 
@Avra I can't tell you why, all I know is that that's how it is. Like I said, I'm not familiar with the exact implementation
 
@Aran-Fey. @Kevin. Thank you.
 
@Avra If you're determined, you can always go right to the source: dictobject.c. There may also be useful details at dictnotes.txt, and the urls listed at dictobject.c line 14&15
 
@Avra dict indices are computed based on the key hash and dict size, both of which are O(1) to fetch (they don't depend on the dict size).
But in the case of collisions, there is a pseudo-linear probing of fallback indices, which can worst-case be O(n).
So the O(1) "only" applies averaged over all cases, in which the worst case is negligible.
Decently sure it's amortized O(1), not averaged O(1), though. Not that it matters.
 
12:00 PM
When I hear the word "amortization" my brain assumes I'm back in Econ 101, and I go into sleep mode
 
I don't know what amortized means, is it worth the effort to find out?
 
Nah.
 
Good, I'll keep watching clips of VTubers then
 
If you put your thumb over some important details, it's basically the same as averaging
 
priorities
 
12:03 PM
I, too, enjoy VTubers. I will say no more, as I have gathered that the uninitiated find the topic as interesting as I find Econ 101
 
are Vtubers vloggers?
 
If and only if a hotdog is a sandwich
 
ohh Hatsune Miku
I didnt know she (it?) is a vtuber
 
I believe "she" is the conventional pronoun for her, even though she has no tangible form
 
@Avra The discussion around the "new" (aka current :P) dict implementation might be useful for you. See the announcement and especially the proposal.
 
12:07 PM
@MisterMiyagi. Thanks! Implementation of dict in Python is 5001 lines of code. Interesting!
 
And half of that is just comments and semicolons. Easy
 
@Kevin. :/. The question is please, where to start from that code as the rest is easier
 
Perhaps line 4917, _PyObjectDict_SetItem. That is the function that gets called when the user does my_dict[x] = y
 
@Kevin. Thanks. At 4917, it's not documented how code works though
 
Yeah :-(
 
12:14 PM
I was hoping anyone would hyperlink line 4917, fine here
 
Nice. :thumbs up character goes here:
I wonder if there's any good documentation on the old dict implementation. The announcement/proposal that MisterMiyagi linked to essentially say that the new implementation is similar to the old one, except it has an additional "dense" table that makes things more compact. So nearly all of the good qualities of old dicts will still apply to new dicts.
 
12:28 PM
Here's the 3.0 implementation of old dicts, which may be slightly more legible github.com/python/cpython/blob/v3.0/Objects/dictobject.c
 
cbg, everyone
 
cbg
 
Yo
@Avra This looks useful -- line 739 mentions "Algorithm D from Knuth Vol. 3, Sec. 6.4." Googling that exact string gives me a pdf of the document, but I won't link it here because I don't know if it's reputable.
Algorithm D looks quite sophisticated, no surprise there. As expected of the powerful Knuth.
 
@Kevin. Yes. Prof. Knuth is undefeatable
 
1:13 PM
So else after a loop will only execute if the loop didn't break?
 
I always forget how that works. It's either that, or the exact opposite of that
 
:D
 
Let's see... You were right. Consult docs.python.org/3/reference/… for a lengthy confirmation.
 
Is there some way to rename keywords for one file to compile? Like allow "my_dog" instead of "if"? No touching of the compiler.
 
My guess is no, at least for CPython.
many languages grapple with the problem of "should we accommodate non-English speaking programmers by localizing our keywords?" and the usual result is "nah, it's reasonable to force them to learn 20 English words"
 
1:19 PM
I only thought about renaming "else" for loops into "nobreak"
 
@Kevin And then there's PC SOFT
 
In the interest of fairness, the next version of KevinScript will use keywords that correspond to no existing language. kiki(a == b){f();}bouba{g();}
 
this is a thing emojicode.org
KevinScript should probably have this in the next version ;)
 
@SAJW in principle you can use a custom export hook, but it is non-trivial to say the least.
 
Are all of if,else,for/while keywords? Are they something more specific?
 
1:32 PM
Hi, does anyone here know about PCA?
 
Can't say that I do
 
@SAJW it's also skipped for return and raise. Not sure if there are other cases. The important part is that else is run as soon as the iterable is exhausted.
 
I'm having trouble understanding why my PCA's output is 36 by 36, even though I kept only 100 of the dimensions, and so it should be 10 by 10
 
Principal Component Analysis?
 
Hi @Kevin , it didn't work as expected
 
1:34 PM
@MisterMiyagi Yes
 
@rb3652 math SE should be better for it??
 
let me create the expected output for that
 
@SAJW No, because I'm using PCA in Python!
 
ah ok^^
 
Yup
 
1:35 PM
that probably means whatever function you're using to invoke PCA, you probably didn't read all it's params that are set implicitly
 
It's ok, the room looks at data analysis problems from time to time
 
OK, so here's the issue:
I have 36 by 36 pixel images of graphs. The CNN is trained to classify these graphs into one of 3 categories: Linear, Quadratic, or Cubic
Now, I want to perform PCA on these graphs to reduce my training time and keep only the most essential pixels (i.e., not useless white pixels in the background).
 
oh dear
 
It's very simple, really
I simply
pca_oliv = PCA(n_components = 100)
X_proj = pca_oliv.fit_transform(X)

print(np.cumsum(pca_oliv.explained_variance_ratio_))

plt.xlabel('# Dimensions')
plt.ylabel('Explained Variance')
plt.plot(np.cumsum(pca_oliv.explained_variance_ratio_))
And my PCA is done.
The only problem is ... the output is still 36 by 36! I don't understand why that is. I kept only 100 of the pixels, right? So shouldn't by output be 10 by 10? Isn't the whole point of this dimensionality reduction?
 
here's a suggestion, make n_components into 12 and observe what happens.
you'll probably understand your mistake by that itself
 
1:40 PM
@ParitoshSingh OK, let me try
As expected, the images look more blurry.
 
what is the shape of the output
 
@MisterMiyagi Sounds interesting. Are custom export hooks something that Python natively supports? Or is it just a general build process thing, or what
Google is not being nice to me today
 
Here's how they look: imgur.com/a/JgCPOSH
 
@Kevin *import D:
 
@ParitoshSingh Shape of reconstructed image is still 36 by 36
If I try to make it 3 by 4 (since 3*4 = 12), it says
 
1:42 PM
Hmm, slightly less interesting. I was hoping for a bizarro-world import, like how Intercal has COMEFROM instead of GOTO.
 
ValueError: cannot reshape array of size 1296 into shape (6,2)
1296, of course, comes from 36 by 36
 
@Kevin You could try your luck with a custom encoding.
 
i shall probably back out of this conversation, i have no idea what's going on.
 
Here's the notebook I'm coding on: colab.research.google.com/drive/…
 
Python devs, please implement the export to x statement, which forcibly adds the current module to the target source file the next time it runs
 
1:44 PM
@Kevin sounds like a good idea
 
I forgot what DHCP means, but it sticked in what MAC means (media access control) (in mac-adress)
for what I need that, still wondering
the P probably stands for protocol
 
dynamic host control protocol?
configuration ah close
 
Now the ultimate question: how did they get only the targets garbage in Sneakers?
 
Hey I have a remote device with about 25-30 supervisor processes. Normally around 20 of them run in a functioning system. Now I log onto the system and all of them but 1 are stopped. How is this possible? It could always be customer stupidity, but it just seems very unlikely, customers should not have access to the supervisor in the first place and it would be weird if they had, to stop all processes. I slightly afraid the system got hacked and I wonder what would be places to find out if it was
I'm currently looking trough journalctl of today but nothing weird. Any other logs which might show who connected when to the system? It's a Ubuntu 18.04
 
2:11 PM
Just a question, is the topology of a network interesting when trying to hack it? (bar DoS)
 
I imagine the hacker would find that information to be useful, sure
 
2:22 PM
@SAJW As useful as a map when you're visiting a new country
 
@SAJW Topology as in cabling, routers and switches? I doubt it.
@Hakaishin syslog and audit log should be useful, provided they are enabled.
 
"Our topology survey indicates the super top secret server is inaccessible from the Internet, but they did hook it up to an IoT coffee pot and forgot to change the default password"
 
@Kevin if it were only that, looks like it was some hardware issue. On the bright side, journalctl is actually super useful, it's way too verbose, but it seems to have caught what happened. At least I found the place where it's 30 lines of process x stopped
 
Sounds promising :-)
 
Mmh, is wlan different than a star-topolgy with cables leading to a router?
 
2:38 PM
just glaring at logs while only understanding 10% scrolling up and down, reading a word or two every other line, hoping to find out what happened here. It's like looking for a pearl on the beach
 
I know that feeling
 
But something just send sigterm to all processes, later sigkill. I just can't make out what it was that did that
 
2:50 PM
@Hakaishin Like reading the transcript of this room sometimes laurel
 
random, but what 2fa apps do people use, if any? looking to replace my current app since apparently it's a bit out of date
 
the microsoft one is pretty nice
 
alright, good enough for me, thanks
 
Breaking out my hobbyist electronics kit because I need an LED indicator for a thing. It seems I've forgotten how resistance works, because my blue LED just glowed bright red and emitted smoke
 
:D
 
3:03 PM
Is there a way to use a backup router(s) in case the primary router malfunctions? @Kevin :D
 
Sorry, I basically know nothing about that kind of systems management
 
Empirical data collected:
2 AA batteries -> sad little flickering light
9V battery -> catastrophe
 
on a sidenote: are timing attacks still a thing in 2021? (password guessing by response time)
 
@Kevin lol 9V a little too much? :D
I'm trying to "append" to files on MinIO using the python sdk... Is there a decent community online for MinIO + python questions? I feel like what I'm asking too weirdly specific to fit anywhere. Curious if anyone can recommend
 
3:06 PM
I guess 9V is too much? I have zero intuition about this kind of thing. You may as well ask me if 10 milliboubas will overload a reticulating flange
 
@Kevin Haha - check the voltage requirements of your LED :) Running in serial / parallel will change voltage vs amps. Volts should always be equivalent and amps need to be the same or greater than :)
But that is about as far as my electrical knowledge goes lol
 
isn't there a technique you can use to gauge the max voltage a (light)diode can take?
 
Yeah, increase voltage until the smoke comes out
 
Haha can't put the magic smoke back
 
The little info sheet here says that, when it was alive, the blue LED had a "vdrop" of 3.0-3.4 V. If vdrop is the same as "voltage requirements", then my two 1.5 AA batteries should have been sufficient
 
3:10 PM
yeah that is odd
 
3:21 PM
I don't know if a multimeter can do that, but how about increasing voltage by 0.1 V stopping exactly when it makes a visible light (in case of LEDs), then just add 10% for the maximum
nonvisible light diodes... don't know
 
The Internet says, try using a resistor. Good advice. It goes on to say, here's how you calculate the ohms of a resistor, by referring to its four colored bands, which have a particular assymmetric spacing so you can tell which one to read first. All of my resistors have five bands, with perfectly even spacing.
 
ûnfortunate
amn those french letters
 
Then there's a lot of unit conversion math you have to do. I decided to skip this part and just use the resistor with the 90 degree bend in the pins, because presumably I used it before and it didn't burn my house down
And my yellow LED lit up instead of exploding. So that's nice.
 
does it matter whether you put the resistor before or after the diode? I can only guess no
 
My guess is also no. I will experiment.
Both arrangements light up as desired. No apparent difference
Going by these diagrams, it's conventional for the resistor to go between the led and the battery's minus end, but the text only says it has to be "in the series". My entire circuit is one series, so anywhere qualifies
Oops, I read the diagram backwards. The convention is between the led and the plus end
 
3:38 PM
a resistor before the diode allows more diodes parallel to the diode without more resistors
oh but of course after the diode allows for the same
but then all has to be before the resistor
@Kevin and to spread confusion: there's a difference between the physical "-" and the symbold "-" on a battery
 
My grade school level mental model of the system is, the resistor acts as a speed bump for the current passing through the circuit. In real life, one typically puts speed bumps in front of the sensitive area that people shouldn't be driving 50 mph in, rather than behind the area. By that logic, the resistor should go between the source of the current and the LED.
If you're saying that the plus on these diagrams indicate the source of the current, then the circuit layout matches my mental model
 
electrones are negativly charged
 
Yes, I agree
 
but that is how far I can remember reading wikipedia
 
Hmm, not useful for my purposes I'm afraid
 
3:49 PM
yeah, was just wondering what that was about haha
 
You may not have heard of just "battery" in the context of law, but if you've ever caught an episode of CSI you may have heard of "assault and battery", or a "battered wife"
 
It's a pretty-well-known meaning of the word in native English speakers (at least in the UK, not sure about the US). "Aggravated mayhem", on the other hand, used to sound quite comical to me. Turns out it's not quite a light-hearted as I had imagined
 
Kind of like how "breaking and entering" shows up a lot in crime dramas, but just "breaking" without "entering" is pretty rare
 
Observation #2206: the difference between the physical minus pole and the industrial battery pole is not googable without serious effort
(but I'm pretty sure it's just the opposite)
 
I bet it's quite challenging to distinguish positive charge from negative if you have a hobbyist's budget and no tools that can act as a reference
If some prankster puts black paint over all the plusses and minuses on your multimeters and batteries and such, then you've got a limited number of options for re-deriving them from first principles
I wonder how hard it is to do electrolysis at home...
 
3:59 PM
at home there's alternating current
so the pole doesn't matter
you get shocked anyway
 
@Kevin I would imagine it's a car battery and salt water?
Though that would only tell you about the car battery. I guess you'd then have to make your other battery and the car battery interact, which might be "fun"
 
@SAJW HSRP ?
 
I simply need a very very good resistor, and then I can use an LED to compare my results across batteries
 
Nevermind, that's proprietary
 
so the one topology I need to remember for any network with internet access is bus topology, because if the router is demanded too much the network fails(for internet services)
mmh can't decide whether it's star/bus...
 
4:13 PM
Or just add redundancy
 
Is it affordable for a home-setup to have 2 routers? the cost might be just 30$ or whatever
 
Oh neat, you can do electrolysis with a simple AA battery. en.wikipedia.org/wiki/Electrolysis_of_water#/media/…
I'm suspicious that the other end of the battery is out of the shot. Maybe that end also has bubbles on it, and the author didn't want to explain that the other end is collecting oxygen, and how to distinguish between them
My plan of "fill a balloon with each and see which one floats in air" is impractical with this piddling production rate. Maybe I need the car battery after all...
 
depending on if oxygen floats in "normal" air, both could rise, just at different speeds
 
Yeah true
 
oxyhydrogentest doesn't sound as good as the German counterpart :P
 
4:25 PM
Cabbage. A question about why you need a resistor with a LED: electronics.stackexchange.com/q/28393
 
Wikipedia says that you can expect the hydrogen end to have more bubbles, since there are twice as many H2 molecules as O2 molecules, and they have about the same volume under the pressure you might find in a glass of tap water in your kitchen
 
@PM2Ring Hi! and what does cabbage mean?
 
When I was a kid, me & my other chemistry nerd friends used to do electrolysis with battery power. But it chews through batteries pretty quickly.
Cabbage means "hello".
 
I understand these explanations as far as "putting a whole lot of current through an LED (and for that matter, most things) will probably do bad things to it"
 
4:31 PM
I'm ignoring the answers that act as if my circuit has zero resistance, because I don't remember buying these wires from the room temperature superconductor store
 
The point is that a LED (or other diode) basically acts like a short circuit, once the voltage is over the threshold. So if you don't put it in series with a resistor you're relying on the internal resistance of the battery (or power supply) to limit the current. A resistor obeys Ohm's law, so I = V / R, but a diode is a non-ohmic device, i.e., its voltage-current graph isn't a straight line through the origin.
 
I see. Literally, because I'm looking at en.wikipedia.org/wiki/File%3aDiode-IV-Curve.svg
 
:)
 
Going beyond the Cliff of Doom in the green zone seems... Inadvisable
I assume the y axis on this chart is "amount of magic smoke released"
 
@Kevin Laurel
 
4:40 PM
Yeah. The vertical axis is current.
 
cbg
So I was thinking diff between lambda and list comprehension. Like should we use lambda of list comprehension in the program. Or it depends on the situation
 
It's easy to distinguish oxygen gas from hydrogen gas in a test tube. Hydrogen burns, but oxygen doesn't. Although of course oxyeg supports combustiin. So you get a small stick, set it on fire, blow the flame out, and put it into the test tube. If it's oxygen, the flame will reappear.
A small amount of pure hydrogen in air burns with a gentle "pop" sound. If you mix it with air or oxygen the reaction is more vigorous, and the sound is described as a "bark".
 
@MalikHamza Can you give an example of a problem where both lambdas and list comprehensions are valid solutions? It will be easier for me to tell you which I prefer when there's a concrete scenario in front of me
@PM2Ring Now this is the kind of information I require that I can't find on Wikipedia
 
Actually I was doing a coding challenge on HackerRank and in that question they want us to use List comprehension. And also I have used lambda function in some cases. So I was thinking about the difference
 
If only one approach can solve the problem, then use that approach
 
4:51 PM
I used to have fun bubbling hydrogen through soapy water so that it made bubbles that rise. If you're quick, you can get the bubbles to "pop" with a lit match. That experiment is best done in a well-ventilated environment. ;)
 
@Kevin Alright, Thanks.
Is list comprehension faster than lambda?
Actually, list comprehension is much clearer and faster than filter+lambda, but you can use whichever you find easier. The first thing is the function call overhead: as soon as you use a Python function (whether created by def or lambda) it is likely that the filter will be slower than the list comprehension.
Source: Intellipat.com
 
Sorry if I sound a little glib. I'm trying to give advice that applies in a broad number of scenarios, but then I end up with generalities like "write code that works".
If my messages make you think "well, duh", that's because I'm not imparting my thoughts clearly
 
Yes, right. Thank you!!
 
@MalikHamza In general, Intellipaat is not a great source. However, that's reasonably true: in that situation, a list comp is more efficient than a filter which calls a function written in Python.
 
@Kevin Yeah np. Thanks mate
 
4:57 PM
I suspect that list comprehensions were created in the first place in order to supplant filter and map, so it makes sense that the devs would work hard to make them faster, in order to ensure their popularity
 
@PM2Ring Yes, true.
 
Source: I feel it in my waters
 
what is the quickest way to get my_list=[[1,2,3],[4,5,6]]?
suppose I have [1,2,3] and [4,5,6]
 
00:00 - 17:0017:00 - 00:00

« first day (3967 days earlier)      last day (998 days later) »