« first day (3640 days earlier)      last day (1533 days later) » 

01:55
Hi
How do I save images to PIL.ImageSequence ?
02:10
nvmd. I got it
 
6 hours later…
08:28
cbg. Some nice Saturday morning news - a missing cockatiel that sings the Addams Family tune is reunited with owner :)
09:06
@Aran-Fey Just wanted to let you know: We are likely going to push from sockets + homegrown protocol to websockets – once I'm back in the office and can scheme a little. Yes there are all sorts of reasons to stick with sockets, no they do not practically apply.
TY for raising the question. ;)
Cool, although I'm not sure if it's really worth switching if you already have a working protocol in place
Honestly, just having a standard protocol instead of something homegrown is worth a bit of work now to make the switch.
user13786942
09:43
hey guys
@NeoNØVÅ7 hello
 
2 hours later…
11:23
I have list say marks = [2,5,8,4,6,7,8,34,6,7] and I want to get every alternate value from the list in {2 : '2' , 8:'8', 6:'6' , 8:'8' , 6:'6'} as output. Can someone help me here please?
uh, why did your list turn into a dict with duplicate keys and strings as values?
I need it for something
>>> marks[::2]
[2, 8, 6, 8, 6]
I'll let you figure out the rest on your own
how to use this as list comprehension?
I got it that...thanks
12:09
cbg, if I want to do what this site manytools.org/hacker-tools/convert-images-to-ascii-art/go does in python, what module other than PIL is needed? I keep seeing some image to ascii conversion but its not color
12:49
Is it possible to write something over the bubble in graphviz?
ibb.co/2nt1YXs I need to make a diagram of this sort. I know how to make the 1 or 2 but to mark the temperatures, I do not know what to do
It's a heat exchange network synthesis diagram if it can give better insights
13:04
another thing is that using the Source() class and writing the big string, the order of the nodes displayed are reversed. What to do to get the order preserved? Writing in reverse doesn't seem to be a good idea.
Hi,
I'm looking for python modules to read .rtf files,
please give me some suggestions
rtf is just a rich text format file. Isn't the open function working?
13:37
@VisheshMangla it works as well as for .exe files
exe, aren't they windows protected files?
@VisheshMangla open and .read() functions are working.
Im trying to read and compare two rtf files, also i wanted ignore some string values while comparing (i dont knw whether i can do that).
Morning!
The read() function gives you a string. Once you get the string, you can do basic string manipulation.
How does the Python community handle duplicate answers that should really be comments under the existing answer?
13:45
ya I too have seen them and even with 100+ votes
If it's an exact duplicate, flag for plagiarism. If it's not... well, just downvote it, probably
@VisheshMangla okay, thank you
@Aran-Fey It looks "exact" to me in terms of the Q/A part. Thanks for your input.
yeah, those do look eerily similar
oh, that code was copied from the question. That's what I get for chatting while distracted
they are 2 min apart...probably best just to let them alone. Thanks for helping me with the sanity check
 
1 hour later…
15:25
df[df["Condition"].str.lower().contains("utility" )] Can someone tell what would be the right code for getting the following? Basically find all rows where a column has "utilility" in it.
df["utility" in df["Condition"].str.lower()], This too gve KeyError
15:55
hi guys
localStorage.setItem("actions: ", JSON.stringify(actions))
can someone help me how can I store above actions variable at mysql from django template
I see only post and get request can store the data at sql but how can I store at mysql static text without post and get request
I've started the call, if anyone wants to join a minute early
Sep 1 at 2:22, by inspectorG4dget
Here's the calendar invite for the Oct 3 hangout. 9am in Seattle, 12pm in Toronto/NYC, 21.30 in India, 17.00 in London
what topic?
come find out
 
1 hour later…
17:13
@inspectorG4dget can you allow me in the meet?
@VisheshMangla read the error. .str.lower() gives you a series, so you need to use another .str accessor before .contains
ahh, right, I really need to improve my thinking skills. Thanks
Reading the error messages and understanding them goes a long way
AttributeError: 'Series' object has no attribute 'contains'
that was obvious after you told me but I couldn't think of debugging it this way. Also jupyter if it is good on one hand at visualizations, it's neither a text editor or ide
it's not harder to debug code in jupyter unless you'd use a fully fledged debugger instead
17:21
I think you are referring to pdb to debug. Aren't you?
Pdb is a debugger, yes. Not all debuggers are pdb.
yes, it's the default one which I saw but I found it tough to be used. I found the vs code debugger the best.
Yeah, it's a bit cumbersome. It's like gdb. I prefer pudb, which is a bit like gdb --tui, just with a few more bells and whistles. But if you use an IDE it will have a debugger of its own.
Hey all, I'm trying to improve the MoviePy API and I've got a question about API naming/conventions: Currently the central objects are various types of Clip. Clip has several methods such as .set_fps(), .set_layer() etc. Currently these methods work 'outplace' i.e. they don't modify the object, they return a new Clip with that modification done to it. This causes a lot of confusion because they don't act like you'd expect a 'setter' to.
Is there a better standard that we should switch to? I was planning on renaming them to .with_fps() and .with_layer() etc, but perhaps it would be better to make them inplace? What are the advantages and disadvantages with that?
PS Should I just ask this as a question on SO?
Ok , I will try installing those.
17:24
@VisheshMangla go with your IDE's debugger
@TomBurrows seems a bit open-ended and maybe opinionated to me for the main site
.set_* plus returning a new object is definitely confusing naming
well, I don't use IDE, or maybe I do. I use vscode.
@VisheshMangla as far as I know VS Code is an IDE. If it has a debugger that's a strong hint in itself.
It is borderline between text editor and IDE
Most of the functionality comes from plugins
I was on discord a month ago and devs were fighting me that it's a text editor and not ide.
sorry, got to go for a while
17:26
Yeah, but you definitely can debug from it (maybe after installing the Python extension)
yeah, there's an interesting talk by Erich Gamma on it, one of the co-authors of the GoF book. He says that it's not an ide and some language server is implemented.
@TomBurrows Yeah I 'll continue to use it atleast as long as it w'd be possible. Getting comfortable to a new ide is difficult
Is there any way to number these as Hot1 , Hot2 and Cold1, Cold2 here-> dpaste.org/jxzu without iterrows? The clipboard has broken the indents
 
2 hours later…
19:07
@inspectorG4dget and others: following the room chat, could you take a look through the existing Q&A on [python] _name_ _main_ multiprocessing and tell us which is good/best? Some of those Q&A are Windows-specific, some aren't. Which is best?
@AndrasDeak Thx for janitorial. It was too old to delete
@nerd It's just an unofficial meet of a handful of people from this room, whoever wants to say hello. Today we got 7 people. Last month, 4.
For inspectorG4dget and others looking for a more advanced terminal-handling package e.g. with overwrite, overlay, refresh on a subwindow with arbitrary coordinates: try curses
19:23
a pointer right? Here in python you ig call it a reference .
neither, it's the exact same dataframe
@VisheshMangla please read and understand nedbatchelder.com/text/names.html
the fact that you have a dataframe is completely irrelevant
oh , yes and actually I have read it 2ice before
Neither, it's just a new name for the same dataframe Equals (=) vs shallow copy vs deep copy in Pandas Dataframes on community.dataquest.io. But it's worth asking and self-answering here on SO.
@VisheshMangla So read it as many times as you need to understand this very fundamental aspect of python name binding :P
19:26
ya, I know but I have to merge the gap that I have between python and c++
@AndrasDeak Ok but since the best 'good' answer is on community.dataquest.io, it's worth asking and self-answering here on SO.
Someone referred me that doc on IRC node when I asked them about [[1]*5]*5 and the for loop version
@smci that's quite the non-sequitur?
@VisheshMangla there's no gap. They work very differently. Trying to apply a mental model of one onto the other language will only confuse you. Understand how each works independently.
but isn't python(that most of us use) is a fsm interpreter which ultimately runs c++ code beneath?
@VisheshMangla I don't know what fsm is, but no
19:29
there's python's implementation in java too
finite state machine
@VisheshMangla does that not prove that the implementation is irrelevant?
If I had used jython I could have commented on that but unfortunately I haven't used jython
jython= java implementation
in fsm basically you read a string , break into tokens and run a c++/java function
OK, sorry, I don't have the bandwidth for this right now
@AndrasDeak It's entirely a sequitur, and we've discussed it at least 5+ times over the last year. Most new SO users arrive via Google, and the SEO battles from tutorial and other Q&A sites, and worse still often they plagiarize good content from SO and use gray-hat SEO for higher Google listing. So when we find worthy SO content that should be or isn't in the top-10 Google hits for a question, it's worth improving/curating. Or in this case a non-SO site with a canonical that did not exist on SO.
@smci but you said "Ok but" as if it were a reply to something I said... when I didn't respond to your link in any kind of way
19:32
well, I try to find original sources. I think Uncle Bob is an intelligent man. I really love his way of teaching computer science
@AndrasDeak I said "Ok but..." to your response to VisheshMangla. (Which obviously means I was saying your response was partially correct but IMO there was something wider you were missing.)
@smci OK
@VisheshMangla please say 'parser' or 'REPL'. ('FSM' means 'Finite State Machine', CS people say 'automaton' instead', CS parser-theory people say 'LR1' or 'LL1' or 'LR0').
sorry mb, but indeed parser's are implemented using FSM
CS and physics has taken maths to unimaginable boundaries that it has almost become impossible to decide what to understand to understand what. These terminologies are mix of various domains
@VisheshMangla I'm not here to argue semantic equivalency, I'm recommending you use the terms that are standard in Python if you actually want to get answers. e.g. to "How does the Python REPL interpret [[1]*5]*5?" (I'm an electronic engineer btw, and I know FSMs very well. But I have no interest in debating the terms.)
19:40
ya, that's all good. Hey, can you recommend me some book to understand how software and hardware work in synchrony?
@VisheshMangla 'parser'. You can safely assume everyone in this knows what a parser is, what they do, and how they're implemented. This is the Python room, not CS or EE theory site/room.
ok sorry, you can delete those messages. TIA
@VisheshMangla Are you studying CS, CE, EE or what? Dependin on what you're asking exactly, you might be asking about multithreading and synchronization primitives, or how database commits are atomic, or clocks and flipflops in hardware, or lots of other things. (Please give specific example of 'software'). But that's mostly offtopic to the Python room.
chemical + chemistry
but highly interested in maths and CS
it's ok if it's offtopic, I will find appropriate place for these doubts
@VisheshMangla But what's your actual question? How do CPUs work, in the sense how do we prevent race conditions wrt clock skew in flipflops(/registers) on chips?? How do Operating Systems work in allowing concurrency (multiple programs and multiple threads, some accessing the same data)? etc. All those are offtopic for Python room plus extremely broad, but please see any of the excellent videos/tutorials/blogs/Coursera etc.
The one-line answer is "This stuff is seriously complicated, look at a view from 100,000ft into CPU design, Operating Systems, threads, concurrency etc."
@MattDMo But can you type us some more about your "canonical comment" suggestion? For the second month running, didn't get to hear about your idea...
19:53
@smci sorry, my wifi died near the end and I couldn't connect again for another hour
The idea is pretty straightforward. I (like probably a bunch of people) have a markdown file filled with canned comments and useful links. Somebody posts a question with code in an image, I have a comment for that. Homework help? There's a comment for that, etc.
I have about 45 comments for Stack Overflow in general and Python in particular, plus a bunch more for some other sites I'm active on. I have another 20 or so good links as well.
My idea is to make a wiki page that trusted users can use to post their own collections and collaborate on common ones so they have the right tone, content, spelling, and whatever.
For each comment, there'd be the formatted comment first, then the raw Markdown under it so you can copy and paste. You could even have one of those handy copy buttons :)
Thoughts?
make sure you don't duplicate work from github.com/SO-Close-Vote-Reviewers/auto-comments
20:08
I didn't know about that repo, cool.
That looks good, and I may contribute some, but it's meant for use with the auto-comment system, which not everyone may have. I'm thinking more of a direct copy-paste thing.
20:31
@smci yes I know it's complicated, how these drivers work and each operating system has its own code so it's difficult to understand them.
I 'm interested in stuff which tells how these small logic gates built up the drivers, how sensors send signal to computers, how is memory stored in magnetic domains, all that stuff . Talking about coursera, I have tried a few physics courses there from University of Michigan, which I didn't feel comfortable with. If you have read some good book, which talks like a human, plz do tell.
Anyone got any ideas about my API renaming situation: chat.stackoverflow.com/transcript/message/50604779#50604779?
@MattDMo Ok, except that isn't straightforward though :) Are those a) open-ended, constructive comments intended to get the OP to edit/improve their question? Or b) politely pushing back on the user like "This seems to be homework(/a code spec), you need to show code and identify an actual specific question" or c) dog-whistle type comments like "This question is VLQ and should be closed, downvoted and possibly deleted?" Many users will assume intent c) or b) and not a)...
...if you look at my history posting on here + Meta, esp. in the last 2 years, a distinct portion of power users regard posting comments as a total waste of time, and another portion think the only point in posting a comment is to get a question closed, often as dupe. They're simply not interested in a question where you have to go to-and-fro with the OP, sometimes over a period of hours or days, to elicit a (specific, answerable, on-topic) question. Disincentivized by SO site changes since 2018
@TomBurrows I'd prefer in-place operations, I found the constant copying super annoying
and the set_X naming definitely didn't help
20:46
@smci It's a mix. Here it is if you want to take a look.
...I'm not starting a foodfight about who is "right" and who is "wrong", I am alerting you that there's enormous fundamental disagreement about why/when SO users should ever even bother posting a comment,a nd their expectation. So, you'll need a longer preamble about what "canned comments" are for and what they're not for.
My reservation is that as it is now you can do clip.set_fps(20).set_duration(10).set_layer(1).subclip(2, 20) all in one line. That wouldn't be possible if the methods are inplace?
I don't think commenting is a waste of time, as it sometime/often elicits responses. Yes, there are going to be those dump-and-run OPs that don't care, but others do. That's why I keep using SO and SE in general.
@TomBurrows For one thing, I wouldn't even want to do that in one line. But I wouldn't mind a method that lets you set multiple attributes at once via keyword arguments
clip.set(fps=20, duration=10, layer=1, start=2, end=20) or whatever
Hmmm that's an interesting idea
However unless I got rid of the dedicated methods as well that would mean that there's 2 ways of changing those things
Its especially tricky because even though it will be a breaking change, I'm reluctant to make it too hard to upgrade to
20:54
@MattDMo "useful comments.md": it's near-impossible to read with that formatting, isn't rendered by DropBox, and the first paragraph isn't even English. But honestly paragraph 1 line 1 needs to start with "Here is a list of suggested 'canonical comments' for use on StackOverflow, typically in posting on questions asked by new or inexperienced users. Our intent is threefold: 1) for questions which are unclear/ borderline/ irreproducible/ no MCVE, to guide the OP to fix those issues ...
@smci sorry, I didn't realize Dropbox would butcher it like that. Open it in Sublime or VSCode or whatever with Markdown formatting and it'll look a lot better. The doc is just my personal collection of stuff, not a mockup of what the page would look like or say...
... 2) for questions which are off-topic/subjective/too broad, to guide the OP to reformulate them, or at least understand why they're likely to get closed, so OPs know wat edits they need to make to get them reopened 3) for questions which have serious issues and are unfixable, to constructively explain why to the OP"
@MattDMo I don't have Sublime or VSCode. Assume most users's browsers/editors don't have Markdown formatting, or it won't trigger by default, so your list is unviewable for many of us. Can't you just generate HTML? and keep this list in github?
I guess one thing to consider is how you want to handle the start/end time. I believe the current implementation with .subclip() only lets you make clips shorter. So the question is, should there be a way to shift the start/end point in arbitrary directions? And should that return a new clip or also be in-place? And if it's a subclip of a longer clip, what happens if the original clip changes?
heck, use vim. It's just a text document...
hold on, I'll put it on Github...
Indeed. There is also currently set_start and set_end methods that allow you to set where the clip should go if you are about to put it together into a CompositeVideoClip
21:01
Might actually be a good enough reason to make clips immutable after all
We were also planning on using the object slicing methods to map to .subclip calls as well (so clip[2:10:-1] would play between t = 2 and t = 10, but backwards)
Which would obviously have to be outplace
I hope nobody ever puts me in charge of making design decisions
Haha, well I've never done this before (and I didn't design the original moviepy api either), so I just want to check that what I'm planning makes sense!
But I appreciate your input
Some of the links don't render because they're comment shortcuts like [help]
21:10
@MattDMo But I still can't make any head or tail of it, it's not a list of 'canonical comments'(?!) Can you totally delete the 'Common Symbols' part, add a two-para preamble of what this is and what it's for, as the first thing in the document; and within the 'Stack Overflow' section add headings, hierarchical section headings....
@smci Yes, that would be the goal if we actually go ahead with the idea. Like I said, this is just my personal file that I keep handy for cutting and pasting if needed. It'll need a lot of work to get it ready for public consumption. I just wanted to give you an idea of the type of comments I was talking about.
...also your choice of comments seems very selective, 20% of what I was expecting to see comments for is (regrettably) irreproducible/"no MCVE"/"your MCVE is a wall-of-code, but the 'M' in 'MCVE' is supposed to be 'Minimal'". Sometimes, generating a short but representative example is nontrivial.
A lot of comments I just freehand, especially in cases like those
@MattDMo But honestly I think you could make some quick edits like I suggest above in 5-10min. I'll be happy to take another look if you can just do that.
OK, let me see what I can do...
21:16
Perhaps one good step would be poll (Python) people on what their "top-3" canned comment list would contain, then write drafts for those 3? Irreproducible/MCVE is definitely in my top-3. I wouldn't even look at anything else until I had a decent (Python) draft for that - which the current, overly language-agnostic SO wording is failing for.
@AndrasDeak You know if you have to ask, it probably isn't. Chuck Norris references are very US-TV-centric, also kinda 80s/90s, people outside in general won't know who he is. Until I moved to the US, I didn't know who on earth he was, but people kept constantly sending me annoying programmery joke emails about some guy attacking water and not getting wet.
...what are other cultures' answers to Chuck Norris: Singham, Jackie Chan, ...
@MattDMo and all: not that our only intent is close-voting, but does anyone have an SEDE query for "All SO questions in Python tag which received close votes in the last 365 days, rolled up both by close-reason and rep of OP (<90, <110, <150, <200, <500, ...)"?
5
Q: SEDE query to get all custom close reasons?

AndyIs there a way to pull a list of custom "Other..." close reasons that users have typed from SEDE, preferably including deleting posts? I'm looking to propose a new close reason on Hardware Recommendations but can't seem to find the data I'm looking for in the data explorer that I need to proper...

61
Q: Misuse of "off topic" closure reason

Duncan JonesI feel there has been a recent rise in people closing questions they don't like using the "off topic" closure reason. I saw an example today where the closure reason was: This question appears to be off-topic because this isn't a code-writing service (emphasis mine) It received four other...

21:38
Gist has been updated, but the comments haven't been sorted or categorized yet.
...and the whole never-ending VLQ debate...
@MattDMo But let's categorize them. Pick your top-3, what are they? My #1 is no-MCVE/irreproducible/not minimal. What's yours?
27
Q: What close reason was used to close this question?

SinatrI am confused. Earlier I could easily determine the reasons, but looking at this question (timeline) I am not able to figure it out. Which of those below off-topic reasons it was? I am curious and someone else may want to improve his SO-voting skills.

Aha, now how do we filter this by Python tag, and asked within 90 days:
22:00
@smci I'm curious - do I classify as a "power-user" to you?
@roganjosh If you pay me enough bitcoin...
Oh, that ship sailed a bit too early for me and my throwing arm isn't what it used to be to get the cash on the deck :/
22:15
Cabbage! I'm intermediate python coder with possibly some knowledge in advanced topics. I want to toughen and broaden my skills. I know there are uncountable amount of resources out there, but are there any tutorials you can recommend? Bonus if it's interactive or hands-on.

« first day (3640 days earlier)      last day (1533 days later) »