« first day (2792 days earlier)      last day (2149 days later) » 
01:00 - 17:0017:00 - 00:00

1:25 AM
it's so convenient to be able to clean up after yourself
@user3483203 cbg chrisz. I see you're rebranding yourself
 
Cbg
How does Python handle large numbers, like 10000!?
 
1:41 AM
Lol I had a user call my cell phone number and curse at me, figured it may not be smart to use my real name
 
@user3483203 wow seriously?
what did they say?
 
Just f* off then blared a bunch of rap music, but when I looked up the number I found their website and SO profile, and I had commented on one of their questions
I was admittedly snarky with them, but still seemed extreme
 
2:04 AM
Did you flag for moderator attention?
if you were able to trace the number back that could be proof enough
 
I flagged the comments for being rude, and cleaned up the rest of it, didn't think it was within the realm of SO mods
Could have just been having a real bad day, and my number was easy enough to find
 
2:33 AM
Hi GUys
 
3:09 AM
cbg
 
cbg
 
So I have to share that because it is a bit frustrating. I shared my slice-based sieve in an answer and the OP said it was not ok because it had to find smaller primes which would "slow the code"... and then went for sympy.isprime, which is actually slower :(
 
3:26 AM
Yea the accepted answer is low quality
 
Well, it is decent. A one-line solution using a well-known library is fine. It's just frustrating because there is no other deterministic way to find if a number is prime and sympy is just doing the same but slower.
 
yea but that's an algorithmic question, not a library question
Also, sympy actually has a sieve implementation
 
Yes, sympy uses the sieve but with a bunch of checks for low primes to speed up the process. This ends up slowing it down for high primes.
And for integers greater than sys.maxsize it falls back on probabilitic algorithms
 
3:58 AM
 
so we should flag?
 
ah... nah, if you don't have the privilege to delete, wait it out
 
I'm unpriviledged
@coldspeed Should I rename the string interpolation question "can I accidentally make an eval by using an f-string"? :p
 
that would require me to edit my own answer to add "No" :D
 
4:24 AM
Your answer was very practical, thanks for that. The other answers helped me figure out the missing piece in my head: f-strings do not eval, their bytecode is generated at compilation
 
Yea I tried to flesh out my answer a bit. The key point is that the inner expression is evaluated pretty much the exact same way each time, just in the second example, instead of finding an expression, a string is found, and it would be bad design to ever have the compiler assume the contents of a string to be valid Python
Very interesting question
The last paragraph of Amadan's answer is key
 
Yes, one of the reason I was wondering about this was to be sure there could be no hidden eval that could make f-strings unsafe, but it rapidly came up that it is not the case
 
I've never understood what no roomba means
 
Yes what is no roomba?
I mean I assume it refers to "no automated/robotic vacuum cleaner" Oh wait - there are bots that auto purge unanswered posts?!
 
If a question is closed without any answers, it is deleted eventually
 
4:35 AM
Ohhhh closed questions. Got it
 
Having answers on those questions prevents that. This is a problem if the question is especially crappy
roomba is the deletion script
 
literally automated cleanup xD
nice naming
 
rhubarb all
 
0/
@user3483203 you're answer to what? o:
 
4:43 AM
@Cosmo to that question
 
ty
oh neat. f-strings are still new to me xD
I should probably catch up on new python features some day
 
Yes definitely, some cool features have been released. I feel 3.5 and 3.6 really brought a lot of neat stuff
f-strings and unpacking generalization have been the coolest syntax-wise
 
5:03 AM
wow nested f-strings... super cool
 
pandas users, are you aware of this neat undocumented(?) behavior: pd.DataFrame.from_dict(cols, orient='index').T; transposepads with NaN cells to make the dataframe rectangular. Found in this answer by root which should be canonical.
 
@smci yeah I think I've exploited that a couple of times in the past... quite nifty
 
5:19 AM
@coldspeed It doesn't seem to be documented, right? And the pad value is not parameterizable from NaN. a) I was going to raise a docbug to have it documented. b) I think that Filling dict with NA values to allow conversion to pandas dataframe should be a canonical?
 
yes, pandas has a lot of doc bugs. I think this really is a side effect of something else than a feature in and of itself
 
5:47 AM
@coldspeed Either way, before production comes to rely on it... and if it is official, it would be nice to parameterize the fill-value. (Although seeing that as an arg to transpose seems wack.)
Oh and since which version does that behavior work?
 
@smci No clue. I entered the scene when 0.16 was out and it's worked that way long as I can remember...
 
@coldspeed Uhuh. While we're at it, do you know of any other undocumented behavior?
 
6:05 AM
not sure if it qualifies, but I have come across a few solutions with no straight answer but lots of workarounds that exploit unintended behaviour. Can't think of a specific instance though
questions*
 
6:30 AM
Is list.sort(key=foo) guaranteed to call the key function exactly once per list element?
 
hi! anyone aware of an example that uses pymc3 to fit parameter in differential equations?
 
@Aran-Fey yes, I think key is called once per element and then the original is argsorted by those values. I'd like to know how it is implemented though.
 
6:48 AM
Take a look at the source code and find out... or scratch your head and give up, like I did
 
6:59 AM
recbg
 
Cabbage
 
good thing we have someone here who can actually read that behemoth codebase
 
cbg
 
specifically the loop is this
 
7:12 AM
I'm thinking of launching a subprocess from a Flask app that I'm running through gunicorn. Specifically using subprocess.Popen(). This would allow the user to continue using other functions on the site. gunicorn will kill and restart threads after a certain amount of work; does it matter if the thread that called Popen() is killed? Does it have any responsibility for the subprocess after the call is made?
 
or more correct answer is that key is called for each element exactly once starting from lowest index until an exception is thrown or the list is exhausted.
@roganjosh no. but the parent process has.
therefore you'd need to know whether you meant threads or processes in the above.
 
Well until you raised that, I would definitely say threads. I launch gunicorn with 3 workers, so it would be a worker that initiates the subprocess call? That would just be a thread?
mmm, I need to look into this more
Ok, they appear to be processes from the docs
 
@AnttiHaapala great, this clears it up. I tried confirming this by writing a wrapper around min that increments a global counter (blergh, I know), and passed it to key under 3 separate test cases to verify the counter was always incremented exactly len(mylist) times.
 
ah, that was for sort. min is ofc different beast. Since it works for iterators, it absolutely doesn't make sense for it to go back because that would just require additional storage.
 
cbg-ning
 
7:27 AM
Ok, so the front-end is a dashboard to specify a lot of parameters for a simulation. These are written to a database, so the simulation itself is basically independent of the front-end. It's also self-aborting (it writes a mutex and a second call would just cause it to abort). What's the best way of launching the simulation code and completely detaching the call from the user actually clicking a button in the Flask app?
In terms of, the user clicks a button to launch the initial process, and then the Flask app and the simulation are entirely separated.
 
then you launch the back-end as a server separately
 
Because I don't want it to tie up a thread/process and I don't want the behaviour of gunicorn restarting processes or threads to affect the simulation while it's running.
 
they could also communicate with docs.python.org/3/library/…
You could use a message queue for notifying the back end about changes
 
If a worker thread/process (and I'm using both terms because it appears I have a choice) does sys.call() does it still become a parent process?
I'm not so fussed about piping messages back from the simulation. If the user loads the results page, I can just look for the mutex and say "simulation running". And I can communicate the results back from a database once the simulation is done.
And this is an internal tool so there's really only one person who's going to actually run the simulation, but there are multiple people who want to see the results.
So I'm not thinking about this in terms of a high-load webapp :)
 
if this is an internal tool I'd forget about gunicorn then.
just embed flask or whatever in the same app for getting parameters in :D
then displaying results perhaps might be completely separate
 
7:43 AM
long time no see Antti
 
Wait, Flask is the app. One giant app that acts as a dashboard that allows the user to set parameters in a database. The last piece in the cog is just to make sure that the whole webapp-iness of the dashboard and clicking "run" can't crash the simulation because something happens with a thread etc. I just want clicking "run" to call the simulation entry point and be done with it - the Flask app should then relinquish all responsibility.
It's quite possible this is of zero concern, but it's also hard for me to test whether it could ever be an issue :/
 
8:16 AM
Ok, so os.system(python my_script.py) also makes that caller a parent, which makes sense. But it looks from the documentation that gunicorn is assured not to kill the simulation caller and I can afford to have 1 worker tied up, since a second call to run the simulation will see the mutex and quit. Thanks for the discussion Antti.
 
8:41 AM
Why the yam does repl.it always save my quick-n-dirty code dumps, but when I want to actually share the code with other people, it never saves?
 
snek cabbage
 
@Neoares snek?
 
@Aran-Fey They've a sophisticated AI just for that.
 
@AndyK it's the name I use for the people in this chat
snakes -> sneks
python is a snake
nvm xD
 
8:52 AM
@Neoares LoLoL
 
I hope it's not offensive :S
by the way, I'm glad to announce that I definitely dropped JS and I'm working 100% with python :)
 
:S <-- if you put that at the end, then no :-p
 
 
2 hours later…
10:27 AM
Cabbage
 
cbg
 
@coldspeed Using a global (or function attribute) for stuff like that is perfectly ok. It's also instructive to give sort or max or min a key function that prints its arg to make it clear what's going on.
 
cabbage..
 
Another fun thing is to call sort etc on custom objects that have print calls in all the comparison methods like __lt__ etc.
 
10:39 AM
cbg
 
@AndrasDeak Done
 
thanks
 
No worries. I a bit wary of hammering stuff I don't have domain knowledge of, but that one was obvious.
 
There is a common file "A" with a common function "a" , Everyone uses that file to use the function "a" (its an important initializing function). Now I have to do something in my own file and function but I have to first call that "A" file and then proceed with my own thing. The problem is , My task needs data which already the "A" function has but does not return because being a common function it returns only one thing. Do i copy paste that code in my file or how do I address this..
I dont blame you if you find that confusing.
THe "a" function returns data which everybody needs so I cannot alter it to return additional variable which I need , how do i handle this..
Basically , I want a common function which everyone uses to return one extra variable without messing it for others who are calling that function.
 
Hi! I have a python program with scikit logistic regression applied on sentiment analysis.. With the help of predict() function I get 1 or 0.. but can I get the exact value between these two scores?
 
10:48 AM
@Anarach You could introduce an optional keyword which results in more return values. It's not generally considered a nice pattern, but I've seen it being used docs.scipy.org/doc/numpy/reference/generated/numpy.unique.html
 
@Anarach Do not copy paste the code
 
so everyone can use it the way they already do, and you can pass give_me_stuff=True and take the other data too
 
is there a pythonic way to handle this? has anyone else run into this sort of thing?
@AndrasDeak Optional keyword.. hmm..
 
you want a function that can do two very different things, I suspect you'll have to get your hands dirty somewhere
 
@Anarach Eh? You can't call a file. But you can import that a function, and then call it inside a new function.
 
10:50 AM
can't you deepcopy the data and then merrily manipulate it?
 
@PM2Ring , I actually tried that. didnt work.
 
the other option might be to define a b inside A which does the extra work for you, but I suspect what you need is computed inside a. Then again you can refactor a so that it calls setup_for_a to get the data, and then b can call that function too
 
@Arne deepcopy? let me google..
 
@Arne I don't think this is a reference thing
it's just that they have a library that has a function that should do one thing for some users and another thing for other users
 
@AndrasDeak I think you are right. I misread this line
 
10:52 AM
@AndrasDeak I tried that.. but didnt work.. I created a "b" inside the "a" which only returns that specific thing which i want but the code didnt run.
 
@Anarach scrap that, I misunderstood you
 
@Anarach because you probably don't understand how importing vs execution works in python, see also PM's remark
do we have a good canonical about that?
 
@AndrasDeak Exactly! But one thing for everybody. , Its that only I need something additional from it. so its specific for me.
 
I know what that is..
 
10:54 AM
3 mins ago, by Anarach
@PM2Ring , I actually tried that. didnt work.
2 mins ago, by Anarach
@AndrasDeak I tried that.. but didnt work.. I created a "b" inside the "a" which only returns that specific thing which i want but the code didnt run.
Are you sure? Those don't sound like that ^
so you'll either 1. have to really understand, or 2. be more specific about what happens (or doesn't happen)
 
let me check :-D
 
anyway I'll be off for a while, but the others will need this anyway
 
okay.. Thank you :-)
 
can anybody help me with scikit learn logistic regression?
 
11:16 AM
How to call a function inside another function inside a class.
 
@Anarach depends on how the function inside the class is defined and whether you're working with instances or the class itself
 
again, an MCVE will help
I don't think you can call a function defined inside a function from outside the enclosing function, unless the inner function gets returned beforehand
 
ohh
didnt know that
 
it would be like referring to a local variable of a function from outside
 
11:22 AM
Yes... Thats the point
I would love to do that
how do I do this .. senpai..
 
by stepping back along your XY problem
if you want to refactor parts of a so that you can call it from b, you need to put the refactorted part outside a
so that both a and b can see it
 
I see..
I think it was designed that way to avoid people like me :-P
 
or because nobody planned to use ccc outside, in which case one might define a local function (started out as a lambda, someone realized they shouldn't bind it to a name; something like that)
rhubarb for a longer while
 
Cbg room 6
 
11:47 AM
cbg
 
12:01 PM
cbg
 
@OlivierMelançon I added a couple of comments to that prime testing question. There's a good slice-based sieve at stackoverflow.com/a/3035188/4014959 It's Py2, but easy to fix, and I linked to a Py3 version in a comment.
@OlivierMelançon You may be interested in looking at my deterministic Miller-Rabin code, which I discussed here a while ago.
Feb 10 '16 at 14:08, by PM 2Ring
Using the deterministic version of the Miller-Rabin test you can determine the primality of all n < 3,317,044,064,679,887,385,961,981, with these witnesses: (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41)
 
12:24 PM
@PM2Ring I am interested, thanks
I was not aware someone literally wrote the same code
@PM2Ring Did you just check to see if it works for all such primes or you have a proof?
 
Oops, I forgot to link to my range sieve stackoverflow.com/a/26440674/4014959 I guess that could be improved a little.
@OlivierMelançon :D I stole that info from miller-rabin.appspot.com
 
Oh I see
By the way, have you had a look at how sympy.isprime works?
low primes are just hardcoded, which makes it extremely fast in that case, but their sieve algorithm seems to be somewhat slow as it is easy to beat for high primes
 
12:40 PM
@OlivierMelançon I'm not familiar with Sympy, but IIRC it just calls the is_prime function in the GMP library. There's a Python module for GMP called gmpy, there's also gmpy2, but I've never used it. I use mpmath for arbitrary precision stuff, and mpmath can use gmpy, but not gmpy2.
@OlivierMelançon Ah, ok.
 
I really should get familiar with at least one of those good math libraries
 
That potential_primes generator of mine is nice in theory, but in practice it's actually slower than a simpler version that just yields 2,3, and thence numbers of the form 6n-1 and 6n+1
@OlivierMelançon mpmath is great, and it has excellent docs.
 
Ironically, my studies were in pure math, my career is as a python dev, but I never did math with python :p
 
Hi Guys
 
12:47 PM
If there are good math libraries, there must also be evil math libraries, spoken of only in whispers in the seedier parts of the math district
 
@OlivierMelançon It can be fun hitting number theory problems with brute force, trying to find clues in the patterns. :) Of course, it gets rather slow when the numbers get big, but at least Python makes it easy to work with big numbers.
 
You know what they say, if anything you're doing contains a number bigger than 4, it's not real math
 
Laurel
 
any opinions on talk-python-to-me paid tutorials? I'm googling for some kind of review and not seeing anything.
 
Exercise: create a bijection between "the real numbers between (and including) 0 and 4" and "all real numbers", or prove that no such bijection exists
 
1:02 PM
Speaking of primes,
Jan 12 at 3:24, by PM 2Ring
"All primes are odd, except for 2, which is the oddest prime of all".
 
That is a self referential observation. Definition of odd is based on % 2. We can say the same thing of 3 if we defined a term throdd that meant non-equivalence to zero mod 3.
It would sound like this "3 is the only prime that isn't throdd'
More generally, every prime defines an equivalence class in which it is the only prime to be a member.
 
So for any distinct primes a and b, a is not divisible by b? Someone should write a paper about that.
;-)
 
@piRSquared True, but 2 does have some unique things going on that happen with no other prime, mostly related to the fact that it's the only prime p where p-1 has no prime factors. Thus you get Mersenne primes, and Fermat primes being based on powers of 2, but there are no interesting equivalents based on powers of other primes.
 
@PM2Ring I'm with you. I'm not a dirty 2 hater. I believe in 2 and all it stands for. I just always found the observation that it is the only even prime odd. You gave me the opportunity to express those thoughts, so thank you.
 
@Kevin I think $tanh^{-1}(x/2-1)$ works.
 
1:17 PM
Now you can do real math on whatever numbers you like :-)
 
\o cbg
 
somehow completely missed that it was the string 1-tuple issue
 
@piRSquared Ok. Yes, that 2 is the only even prime is trivial, and of minimal relevance to its exceptional behaviour in the set of all primes. Much more important is thing I mentioned before, and the fact that it's the smallest prime.
 
aye
 
@davidism hammered
 
1:24 PM
Today the HugeCo internal network is down for maintenance. The office is 95% empty.
most of the departments need the network to do productive work. Not us programmers though. I guess that means I get to stay here while everyone else works from home ;_;
 
Me: don't you have an account on @StackOverflow? @mitsuhiko: Yes Me: Why don't you log on? @mitsuhiko Don't event remember which email, let's see Me: I guess you have a couple of pending notifications
@Kevin how are you even supposed to work with the network down?
 
File a bug report on meta: rep gain notification styling overlap if you don't log in for 10,000 points
 
I'm beating Armin in terms of rep, but I think he's won.
 
@davidism I still have access to Internet, email, and source control.
I need the network for looking at QA and/or prod, and for doing certain corporate training. Not high priorities today.
 
@Kevin You need a function with 2 points of discontinuity and fill them in with the end points wolframalpha.com/input/?i=plot+1+(x%5E2+-+1)+%5E+-1
That isn't exactly right. Working on it
 
1:33 PM
So it seems as though there are an entire category of bijections, of the form "S-shaped curves that range from -infinity and +infinity in a finite amount of width"
 
DSM
Capital cabbage for everyone!
 
yes, but you want to include the endpoints
 
DSM
So I see we're making some kind of bijection?
 
@DSM blah. I was pulling for Las Vegas
 
I'll award 99% credit if you need to fudge the endpoints to be exclusive rather than inclusive. I only picked those because I thought they'd be easier.
@DSM Yes, because numbers bigger than 4 aren't true scotsmen numbers. Original context: chat.stackoverflow.com/transcript/message/42857990#42857990
 
I think we've really cracked this one wide open, boys. Get the president on the wire.
 
he's busy. oh wait, which president?
 
I'm not picky. Any of the 44 POTUSes. (POTii? POTopodes?)
What's William Henry Harrison up to these days?
 
@piRSquared señor présidente trump
 
DSM
From the "on the wire" language, maybe Harding or Coolidge? Feels oldtimey.
 
1:46 PM
I'll go with the rare and pedantic POTopodes
 
I'm sure The Orange One is terribly busy, let's not try him please
 
DSM
Wait, the 1920s might be too early. Maybe Hoover.
 
rbrb relearning SAS
 
It's nice that we can use LaTeX in comments over on Physics & Maths, e.g. physics.stackexchange.com/questions/410422/… But I guess it's fair enough that we can't use it here.
 
@PM2Ring what was neat is that I copy/pasted that latex into wolframAlpha and it worked just fine
 
1:49 PM
recbg
 
If we had LaTeX on the main site, we'd have a 1:4 ratio of LaTeX comments and replies from underinformed users saying "hey, that's cool, how do I do that?"
 
If we got latex support in chat before multi-line markdown I'd be slightly miffed
 
https://twitter.com/brungarc/status/1005049081733971968 NM
 
#goals
 
1:53 PM
@piRSquared g'luck
 
@PM2Ring I like the idea of #15 being determined on a moment-by-moment basis, so Serena could have several short non-contiguous terms if she alternately wins and loses matches
 
@PM2Ring I had to look up primogeniture
 
@Kevin True, and any post on SO that really needs LaTeX is probably off-topic.
@Arne But we already have multiline markdowns, you just can't do it via backticks. And you can't mix code blocks with non-code styling. And it's almost impossible to enter multiline stuff directly from a mobile device. ;)
 
Perhaps that's too much power, though, since then she can appoint any person she likes as President, for as long as she likes, simply by setting up an exhibition game to them and throwing the match
 
@PM2Ring I use hacker's keyboard and shift+enter works fine
@Kevin not if the other throws it first
 
2:02 PM
Yeah, I probably need to install a better keyboard before I inflict violence on this one.
 
I'm hung up on the phrasing "install a keyboard". It created a visual of using a screwdriver to pull out the keyboard from wall mounted terminal unit.
 
2:49 PM
wasawasup bitconnect
 
hey hey hey
 
Hi Guys
Hello,

I want to assign the sessions to the speakers. For a session there are several speakers, which I would like to save as a list as a value in a dict.
and this is my code
        #xml parsing
        for child2 in child:
            for amk in child2.findall("ZUORDNUNG"):
                for amk1 in child2.findall("URHEBER"):
                    for amk2 in child2.findall("FUNDSTELLE"):
                        vorgang = {amk.tag:amk.text, amk1.tag:amk1.text, amk2.tag:amk2.text}

                        for amkilet in child2:
                            for amkkk in amkilet.findall("VORNAME"):
                                for aqqq in amkilet.findall("NACHNAME"):
and this my output.
{'ZUORDNUNG': 'BT', 'URHEBER': 'Gesetzentwurf,  Urheber : Fraktion BÜNDNIS 90/DIE GRÜNEN, Fraktion der SPD ', 'FUNDSTELLE': '13.12.1999 - BT-Drucksache 14/2340', 'REDNER': {'VORNAME': 'Ludwig', 'NACHNAME': 'Stiegler'}}
{'ZUORDNUNG': 'BT', 'URHEBER': 'Gesetzentwurf,  Urheber : Fraktion BÜNDNIS 90/DIE GRÜNEN, Fraktion der SPD ', 'FUNDSTELLE': '13.12.1999 - BT-Drucksache 14/2340', 'REDNER': {'VORNAME': 'Monika', 'NACHNAME': 'Griefahn'}}
How can I map the 'REDNER' as a list in a one dict?
 
@madik_atma sorry, that's too much text.
 
@madik_atma e.g.?
 
put it into a dpaste please next time
 
2:55 PM
{'ZUORDNUNG': 'BT', 'URHEBER': 'Gesetzentwurf,  Urheber : Fraktion BÜNDNIS 90/DIE GRÜNEN, Fraktion der SPD ', 'FUNDSTELLE': '13.12.1999 - BT-Drucksache 14/2340', 'REDNER': [{'VORNAME': 'Ludwig', 'NACHNAME': 'Stiegler‘}, {'VORNAME': 'Monika', 'NACHNAME': 'Griefahn'}]
@coldspeed ok sure
I want this as output.. @shad0w_wa1k3r
 
if "REDNER" in vorgang:
    vorgang["REDNER"].append(redner)
else:
    vorgang["REDNER"] = [redner]
 
but vorgang is a dict, not a list?
has a dict the function append?
 
cbg
 
@madik_atma I'm making vorgang["REDNER"] as list
 
3:00 PM
that should probably be reconciled with the original definition of vorgang, though
 
yeah, that'd be better
 
ideally the key "REDNER" should be initialized to an empty list there, after one has checked that the rest of the items in the dict view don't clash with this
or use a defaultdict, but in this case it's probably overkill
 
Hey guys, quick string formatting question.

I'm trying to print an f-string which contains a variable to format. this variable is being converted to a string within the f-string, and it's possible the variable may contain newline or other special characters. I'm trying to see if there's a way I can set it up such that any special characters in the variable are treated as literals and aren't interpreted when printing. Example:

myVar = "this text has a \n in it."

myStringToPrint = f"I'm printing my variable {str(myVar)}." (ignore the superfluous str() call, in my actual code I'm looping o
 
@JoshKitchens why are you using str inside your f-string?
oh, there's a remark about that, nevermind
@JoshKitchens try repr instead of str?
 
@AndrasDeak @AndrasDeak but I want to append only the speaker to their speeches. not all speakers to all speeches. or?
 
3:04 PM
@madik_atma I have no idea what you mean by that
 
oh nice, that worked perfeclty, thanks @AndrasDeak!
 
you see, I don't speak German
 
perfectly even
 
@JoshKitchens no problem. I think there's a format code for a repr
 
@shad0w_wa1k3r @shad0w_wa1k3r I got this as output
{'FUNDSTELLE': '13.12.1999 - BT-Drucksache 14/2340',
 'REDNER': [{'NACHNAME': 'Stiegler', 'VORNAME': 'Ludwig'}],
 'URHEBER': 'Gesetzentwurf,  Urheber : Fraktion BÜNDNIS 90/DIE GRÜNEN, '
            'Fraktion der SPD ',
 'ZUORDNUNG': 'BT'}
{'FUNDSTELLE': '13.12.1999 - BT-Drucksache 14/2340',
 'REDNER': [{'NACHNAME': 'Stiegler', 'VORNAME': 'Ludwig'},
            {'NACHNAME': 'Griefahn', 'VORNAME': 'Monika'}],
 'URHEBER': 'Gesetzentwurf,  Urheber : Fraktion BÜNDNIS 90/DIE GRÜNEN, '
            'Fraktion der SPD ',
the second dict is good, but I dont want to get the first dict
 
3:07 PM
@madik_atma are you printing the dict multiple times in a loop while it's being populated...?
because then don't do that :|
 
you're right, my embarrassing mistake @AndrasDeak
 
it's OK, we've all been there
 
talk about yourself :-p
(I've been there multiple times :D )
 
god bless stackoverflow :) ty guys!
 
no problem
 
3:14 PM
rb folks
 
rbrb
 
time to clean the pool and have hamburgers
 
Or maybe clean the hamburgers and have the pool? What about pool the hamburgers and have the clean?
 
@shad0w_wa1k3r can you tell me, with which technique you have solve my issue? I would to learn this too, ty.
 if "REDNER" in vorgang:
        vorgang["REDNER"].append(redner)
    else:
        vorgang["REDNER"] = [redner]
 
well, I'd call it initiliazation with a default type (list in this case)
 
3:20 PM
cbg
 
I have try this same before, with initialize a list, apend the REDNER and then do the same as in else. But every time, its append all the speakers to the list
 
6 minutes to breakfast ... slow start to a friday
guh, soo lethargic... :)
 
@JoshKitchens The quick way to get the repr is f"like this {myVar!r}"
@madik_atma All those nested for loops are a pain to read. You can collapse that quite a lot by using itertools.product
@madik_atma I haven't looked closely at your code, it's too hard to read, especially on a phone. But whenever you get unexpected replication in a list that's usually a sign that you're appending or extending with multiple references of the same object when you should be using separate copies instead. If you're working with nested objects you may need to use deepcopy.
 
3:51 PM
@PM2Ring I thank you very much for your tips. I will look the itertools.product and deepcopy informations..
 
4:13 PM
Talked myself off of the pandas subclassing cliff again.. phew, that was a close one.
 
you don't want to do that
 
thoughts on close voting this question ? stackoverflow.com/questions/50708528/… I voted on it but it doesn't seem like others are interested in closing it, was I wrong to vote close on it, for being to broad?
 
no thinking, only clicking
 
RTFM. It's technically answerable but lacks research effort.
I'm on the fence about closing it, just downvoted it for now
 
but the manual doesn't tell us how much is enough effort, which to me, it's little to none.
hence I wasn't sure about closing it or not, I ended up voting it but now I just wanted feedback lol
 
4:18 PM
lack of research effort is not an official reason for closure
 
1 more vote needed for closure
 
I can argue that their question isn't clear. What limits? Hourly? Daily? Monthly? And the "Also, is there any per day restrictions ?" opens the gate for any number of answers. Too many questions being asked. This is too broad.
 
It's also very likely subject to change, so any answer could very well be wrong tomorrow.
 
wellll, technically the rate of development of a product/software doesn't necessarily contribute to whether the question is appropriate... today your answer may be fine, but tomorrow you will need to update it. That, or someone else will post an updated answer.
 
I'd take that in the case of a breaking API change in terms of code. But rate limits are not really related to code; it's just business discretion. No?
 
4:37 PM
It's off-topic, and I guess "too broad" covers it. It's no different to "I'm writing a football game program. How many players are in a football team?"
Actually, it's even worse, because the official team size can't change without notice.
 
4:58 PM
@Simon "phyton" is a brilliant flagpost for the quality of what you're about to see, don't suggest corrections :P
 
01:00 - 17:0017:00 - 00:00

« first day (2792 days earlier)      last day (2149 days later) »