« first day (2643 days earlier)      last day (2312 days later) » 
00:00 - 21:0021:00 - 23:00

12:00 AM
However, when I run the code, it doesn't properly reshape my binary image frmo 500x500 to 1x500x500x3 because
the each label has to be put into a separate channel.
So if I have a ground truth image with 4 different labels, then I'dhave 4 channels. But I'm unsure how to even visualize what that would look like in terms of an image matrix.
 
Can you please try to structure multiple sentences and send them as a single message please?
 
sounds like the XYest of problems
You sound like you want to go from a 500x500 binary image to an 500x500x3 one-hot image where img[...,0] are background pixels, img[...,1] are middle kind pixels and img[...,2] are top pixels. Most importantly, you'll never be able to reshape from 500x500 to 1x500x500x3.
if your actual pixel values in the binary image are 0 XOR 50 XOR 100, you probably need something like img_onehot = (img[...,None] == np.unique(img)).astype(int) where img.shape == (500,500)
>>> img = np.random.random_integers(1,3,(3,3))
>>> img
array([[3, 1, 3],
       [2, 2, 1],
       [3, 2, 1]])
>>> (img[...,None] == np.unique(img)).astype(int)
array([[[0, 0, 1],
        [1, 0, 0],
        [0, 0, 1]],

       [[0, 1, 0],
        [0, 1, 0],
        [1, 0, 0]],

       [[0, 0, 1],
        [0, 1, 0],
        [1, 0, 0]]])
(the printing is off because pretty printing goes row-major)
But of course your first mention of "rgb image" contradicts your later mention of "binary image [of shape] 500x500", so who knows what you need
 
12:17 AM
the RGB image is the input image into the network. It has nothing to do with the problem I'm discussing persay.
@cᴏʟᴅsᴘᴇᴇᴅ my bad, i'll be cognizant of that next time.
 
oookay
So now you're not only leaving out information, but also introducing irrelevant information to throw us off. Well, it's working :P
 
 
1 hour later…
1:32 AM
@AndrasDeak That actually fixed the problem, thanks!
If possible, please post your answer in my question. I'm sure it'll be helpful for others as well.
 
1:54 AM
Thanks, but I voted to close as unclear instead. If I could've discerned that that question is this question, I would've badgered you not to ask here about it. My impression was that your question on main is something else
 
Your vote will age away :-(
 
2:15 AM
Hooray for rep being multiples of 10, 100, or 1000.
 
 
2 hours later…
4:33 AM
stackoverflow.com/q/48180333/4909087 it needs python so I can hammer
^ OP self-deleted.
 
cbgimg/icon-zip.png" alt="icon-zip" title="icon-zip" width="15" height="15"></a>
cbg
 
4:50 AM
@cᴏʟᴅsᴘᴇᴇᴅ that was me. I reading it now.
 
Oh, gotcha... thanks
Not much demand for sparse structures, it would seem
 
5:08 AM
Just got off of facetime. I'm in Seattle and my wife was freaking out because she thought my 4 year old broke his nose. He didn't but ... I don't even really know how to describe that kind of chaos.
 
user9182841
5:32 AM
hello . . .
 
is pypy currently the best go-to for performance?
 
 
2 hours later…
@poke done
 
Thanks :)
 
cbg
 
 
1 hour later…
9:07 AM
Phew... just done with my most recent question facelift. Overhauled the title, content, and the tags. It's cumbersome, but I do it with the thought that it would hopefully become a more useful resource for the site besides just points for answering.
 
9:35 AM
hi all,

inside this function, the time difference between last_published_time from JSON file and time_now will be calculated. the first run of this functions gives me correct result, the second execution gives me a wrong result with negative deslta timestamp -1 day, 23:59:55
Could someone tell me please where is the error in my code
def energy_consumption():

if not os.path.isfile(filename): # this script will not calculate energy consumption when there is neither file nor values
return
with open(filename) as feedjson:
 this is the output:
    signal detected 21
    Counter value:  121.78217821782181
    121.78217821782181  >  121.69306930693071        1.0
    counter value export triggered by change of value
    last_value: 120.69306930693071
    actual_value: 121.78217821782181
    last_published_time: 2018-01-10 09:25:05
    actual_published_time: 2018-01-10 09:25:00
    delta_time -1 day, 23:59:55
    energy_consumption: 1.089108910891099
the print results of last_published_time and actual_published_time are correct but the result of subtraction operation is wrong
 
@AhmyOhlin Please use pastebin/gists for pasting large amounts of code and output, rather than dumping it here.
 
cbg
 
what is pastebin/gists ? where can i find it
 
On google
 
I foud it.
here is the link to my code: https://gist.github.com/anonymous/962fa35c85921e4f80dd0371e8243bef
 
9:50 AM
Just to confirm, but Intellij's (or PyCharm's) Smart Checkout feature never ever works correctly, does it?
I'm not even sure what it does, all I know is that I always lose some changes and have merge conflicts after using it
 
why python gives me a wrong result of subtraction
delta_time= datetime.strptime(time_now, '%Y-%m-%d %H:%M:%S') - datetime.strptime(last_published_time,'%Y-%m-%d
last_published_time: 2018-01-10 09:25:05
    actual_published_time: 2018-01-10 09:25:00
    delta_time -1 day, 23:59:55
 
well, it's not wrong...
 
10:10 AM
Yup. It was my mistake i stored the variable time_now in 2 different ways. that was the reason behind it. i fixed it now
 
@cᴏʟᴅsᴘᴇᴇᴅ done, go ahead and nuke it
 
Hammered, thanks
Though I'm not 100% sure if closing it was the right thing... the answer was indeed grouped plots, but OP didn't know that's what they needed
Huh... whatever, as long as it solves the question
 
10:30 AM
Where could I best ask a question about program design? It is too vague for SO, I don't have code yet I could post to CodeReview, and it feels like too big of a question for this chat.
 
software engineering?
 
user8452104
Yeah, I would assume that too.
 
Thanks =)
 
user8452104
Does anyone know a possibility, to run python scripts, without having to have python installed? I want something like an .exe-File you double-click, which opens a specified .py-Script and runs it. I don't want to compile the code, I need just something like a python standalone interpreter.
 
Can you use chromium embedded framework? not 100%
 
user8452104
10:38 AM
I have tkinter and PythonImageLibary installed via pip, is it possible to use this import with chromium embedded framework?
 
user8452104
I'll ask a question. :)
 
@AhmyOhlin recommendation, paste your code with syntax highlighting enabled. in case of gist you do that by setting a filename with the proper extension (e.g. mycode.py for python)
 
@JonathanBabelotzky google 'compile python exe' or something, there are a lot of options
 
Pet peeve of the day: Seeing one line answers with hundreds of votes
 
user8452104
I don't want to compile my code, as my teacher needs to take a look at it. The big problem is, my teacher said, he want to run the code, without having to install anything, but the code should not be compiled. @AndrasDeak
 
user8452104
10:50 AM
So I really need a standalone interpreter and not a compiler, but all questions about standalone interpreters I have found so far, were basically about compilers.
 
put it in a container that has python installed
or if it is a single instance, just send a repl link.
 
@JonathanBabelotzky your teacher sucks
 
user8452104
0
Q: Python 3.5 standalone Interpreter needed. (Source code not compiled.)

Jonathan BabelotzkyIs there a standalone Python 3.5 interpreter out there in the world? I have a .pyw script as main script, using some modules in some folders, with dozens of .py scripts. Also I have tkinter and pillow installed via pip in my python on my Computer. I need an application, which is executable and ru...

 
user8452104
@ArneRecknagel I have no clue about containers with Python installed :/
 
Inb4 gets closed as a dupe
 
10:58 AM
Can you just copy paste the code in repl and send your teacher instructions, like "Press the ply button to run the code"?
 
They don't have python installed
 
user8452104
The project description forces an executable in the main folder, which runs the uncompiled python3.5 code, with all its dependencies.
 
I have never ran a container or VM in windows, I'd assume they don't come with hypervisors out of the box, so that isn't really an option
 
4 0 vote accepted answers today... /sigh
 
What class is it? Classical philology?
 
11:02 AM
hey.. that gets a badge too, right? unsung hero? silver linings.
 
It also gets a lot of whining
 
@ThiefMaster thank you very much. i did a test and i see the difference. its much better with syntax highlighting enabled than without.
https://gist.github.com/anonymous/fd49af20d545cc7e77885bcfb28581e6

I have a question: i want to implemet this code in my thesis report. i write my report with Microsoft office 2010. Do you know how can i implement my code in M.Office with syntax highlighting enabled?
 
seems that you already have that one .. ¯\_(ツ)_/¯
 
stop right now, your problem is that you are using office to write your thesis
instead, use LaTeX
 
11:04 AM
it's easy and you won't want to kill yourself when word screws up formatting
or when you need to manually syntax-highlight code
 
Hah, joke's on you, I already have that badge
 
If you want to give it a try, you can take my two thesis repos as starting points if your university doesn't provide their own latex template: github.com/…
 
user8452104
As I got -1 after abot 3 seconds, I edited my question, could someone overlook it, if it is now asked in good style? stackoverflow.com/questions/48185844/…
 
user8452104
*about
 
user8452104
And I assume review is the right word, not overlook.. :D
 
11:06 AM
@ThiefMaster
Do you think it's easy to use Latex. I have never used LAtex before.
 
look over it and overlook it are two completely different things
 
user8452104
Perfect thanks, my english is not the best. :)
 
@AhmyOhlin Usually yes. See github.com/ThiefMaster/master-thesis/blob/master/03a_Indico.tex for an example chapter written in latex
 
+1 for latex
There is a bit of a learning curve. But worth it
Automatic numbering and references, citations, non-ugly-as-yam equations...
Of course I have mainly scientific works in mind
@ThiefMaster is the spacing after z.B. correct due to the capital B, or are you missing a backslash?
Wait, that should only work if there's a space before B I think
 
user8452104
Why do I always get downvotes for my questions, that's annoying :C This time, I thought, it was good style and as well not too broad or a dupe, but again, downvotes incoming.
 
11:19 AM
It was dupe or unclear
 
user8452104
Or maybe to obvious, as it seems in the comments, but unfortunately the comments are not really helpful to me.
 
👎
The retag request is still pending :-)
 
@ThiefMaster Danke dir. I downloaded it now.
can you tell me please the difference between public and secret "Gist" in usecase?
 
@AhmyOhlin public ones are visible on your profile if you are logged in with your github account while posting it
secret ones are only visible if you know the link
so usually secret is the way to go, even if it's just stuff nobody else looking at your profile will care about
@AndrasDeak yeah looks fine in the PDF
 
Finally I am here... Hurrayyyyyyy
 
11:27 AM
@MOHAMMEDSHEIKDAWOODSJ Welcome, please read the room rules while you're here.
 
@JonathanBabelotzky I'd say you get downvotes on this one because it is painful to understand when your problem should realistically even arise. The obvious answer to your actual problem seems to be "don't have stupid requirements on your work that produce a lot of effort for no value from a programmer-point-of-view"
 
user8452104
@ArneRecknagel I sounds stupid to me too, but still it is a requirement.
 
@MOHAMMEDSHEIKDAWOODSJ why is your name in all caps? ;x
 
How did other people solve it?
 
@ThiefMaster, I suppose he enjoys it when other people have to SHOUT his name
 
11:31 AM
@ThiefMaster Tank you.
 
user8452104
They just said things in the comments, that let me think it is kinda obvious to them, but still not to me. :( @ArneRecknagel
 
user8452104
I feal really dumb right now, because of that...
 
I mean in real life. Are you the only person who is doing this task?
 
user8452104
Ouh, I have no possibility to contact them, I see them all next monday and until sunday we have to send the project per E-Mail.
 
user8452104
11:34 AM
This project is 12,5% of my final exam.
 
I think your way to do is to mention in the docs that Python needs to be installed ;)
If your professor complains, tell him this is how literally almost every single Python application in the real world is shipped
 
Just my 2c, could it be you've a bit misunderstood the requirements? While tools for creating "standalone" executables, or something close to that, of Python apps do exist, it's not that common.
 
user8452104
@ThiefMaster it is a teacher, not a professor, I am in my final year at school.
 
user8452104
And I don't like that I have to do the task, but if the teacher says, no python is installed, on the executing windows 7 computer, then I can't do anything to surround that, I have to do this or will get big troubles with my grades. Teacher always has the power.
 
user8452104
Right now, my question got marked as off-topic :((, I am really depressed right now.
 
11:42 AM
I'm not sure what you're going to achieve by complaining here, considering people from this room had a hand in closing your question
 
@JonathanBabelotzky Have a look at py2exe or cx_Freeze. Never used them, so can't say much about them, but those might be something you're looking for.
 
user8452104
This people could explain me, why this question is off-topic or much more help me, where to ask it then. It seems programming related to me and I don't know, why it should be written in bad style.
 
"Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it."
 
user8452104
@IljaEverilä I already looked at those, but the both compile my whole code
 
I thought that was pretty clear.
 
11:45 AM
@cᴏʟᴅsᴘᴇᴇᴅ Beat me to it :|
 
Call it a fgitwer's speed
 
Well, if you need to send the environment to execute the code along with the code, your options are VMs, containers, and virtenvs. All of these also need some kind of library to be used, which, as I said, I assume Windows 7 doesn't come with out of the box.

If I was you, I would consider solving the problem in a different way at this point, because that seems easier than the problems at hand. Was it your decision to use pyhton, or is it part of the task? If it is, contact your peers how they solved it. If it isn't, solve your problem in a different way. I assume C# or powershell would work
 
user8452104
@ArneRecknagel It is part of the task, I have no phone numbers or E-Mails of my peers
 
I don't know what your actual code does, but run python code on windows 7 with no python sounds hard enough already.
 
Hi @ThiefMaster , my name is Mohammed
 
11:54 AM
@JonathanBabelotzky They compile your code, but I'm pretty sure they can still execute code from .py files
@MOHAMMEDSHEIKDAWOODSJ That doesn't answer why it's all-caps :)
 
Next option: Run a python kernel online, with all the packages you need. Send your code to your examiner, together with some .exe script that uploads the code to your server, which runs it and sends the answer back.
 
user8452104
@ArneRecknagel I have no server. :D
 
user8452104
-2
Q: How to pack python.exe (Python 3.5) standalone, including two libraries?

Jonathan BabelotzkyHow to pack python.exe (python3.5 version) including the two libraries pillow(fork of "Python Image Libary" for python3) and tkinter(basic GUI-Libary) into an excutable, that automatically runs a specified script "start.pyw". I don't want to compile my code with something like py2exe or cx_Freeze...

 
user8452104
I have completly reworked and edited my question.
 
user8452104
How to ask for review, if it is still off-topic?
 
12:03 PM
@JonathanBabelotzky Please note that the room rules state that linking fresh (1-2 days old) questions here is not that welcome. And now you've linked it twice.
 
user8452104
@IljaEverilä Oh okay, sorry. I did not knew that.
 
user8452104
I apologize for that.
 
Though you're not doing it in the sense of "hey here's my question, plz answer". I'll let others weigh in.
 
@ThiefMaster , ok I will change it
 
@ThiefMaster neat, thanks :)
 
user8452104
12:07 PM
@IljaEverilä is there a button anywhere, like "ask for review, if it is still off-topic" I missed somehow, or is there any mechanism on SO I have to activate?
 
First edit after closing will put it in the reopen review queue
 
I'm afraid that in its current form the question is probably going to stay closed. I'd say the odds are against it being reopened.
 
Hello! Anybody here knows how to set a timeout when initiating a sftp connecting with the pysftp library?
Because when the server is down, it tries to connect infinitely
Can not find anything in the docs
 
@JonathanBabelotzky If your assignment's description is in English, perhaps quote some relevant parts. But can you not just return both the resulting executable and the source? Does it matter if the exe runs on its own and the source is there for interested parties to examine.
 
user8452104
@IljaEverilä Uhm okay, you mean because it is still off-topic? I don't understand why, but when it is so, is there any Stack Exchange Site I could ask this question.
 
user8452104
12:13 PM
The assignment description is in german. @IljaEverilä
 
@DowinskiField does this timeout not affect initial connection, only reads/writes?
Oh, instantiating that class already connects, so probably not
 
user8452104
@IljaEverilä both, source code and compiled, might cause me problems, as the teacher cannot state, that the compiled code is the same as the project code, the project is about 30.000 lines of code, so he cannot verify that with just reading
 
This does not have any effect
 
user8452104
@IljaEverilä But I assume, that is better than nothing
 
yeah I'm not surprised :( I don't know that module so I was barely-more-than-rubber-duck helping. I've got nothing
 
12:18 PM
I do have a different idea, using the timeout-decorator (github.com/pnpnpn/timeout-decorator)...
Problem is, it can only return data that can be pickled.
the sftp connection object can not.
 
Look at the source to see if it's easy to hack in a timeout in the __init__?
 
I am trying to append it to a global variable or a ConnectionManager object. But as as soon as the get_conn() function finishes. The pysftp object is destroyed.
 
That's weird
Read the rules and sopython.com/wiki/…
The former tells you not to dump a lot of code here, the latter tells you how to format small dumps of code
 
recbg
 
Oh I am sorry..
May I private message you the code?
 
12:24 PM
You can't and may not
Rhubarb for now
 
@DowinskiField use a pastebin instead.
 
user8452104
Use for example pastebin.com there you can paste code and others can take a look at it
 
Ah of course, thanks haha
Does anyone know, why the obj is destroyed after the function call? (I think it's because the object lives inside the function on the stack)
And, would anyone know a solution?
 
@DowinskiField you'd return the object from the function...
that's it
return sftpconnManager
outside do
my_connection_manager_whose_name_has_no_relation_to_that_sftpconnManager_within_the_function = get_sftp_conn()
 
@AnttiHaapala Yeah that would be obvious.. I didnt explain the context entirely. As you see, I am using the timeout-decorator library (github.com/pnpnpn/timeout-decorator) and when using it on the thread, it can only return objects that can be pickled.
@AnttiHaapala Unfortunately the connection object can't. That's why I am looking for a solution to deal with this.
 
12:30 PM
well, that's another problem then
you cannot pickle a connection because it has a live socket among others
how do you expect to pickle hat.
 
I don't expect to pickle it..
I expect to get my connection :p
 
well, the thing is it says: "multiprocessing"
you cannot move the connection from one process to another - you just can't
it is impossibru
 
Ah.. so I want to send the connection within the same thread.
 
Like this level:
 
So I will test the decorator without use_signals = false
 
12:33 PM
@DowinskiField that's also written on the rules page
hence your "should read it"
 
@AndrasDeak Alright.
@AnttiHaapala The decorator without has_signals=false raises the exception "Signal can only be used on the main thread"
@AnttiHaapala Wait.. I could get the connection on the main thread and deliver it to the worker thread.
 
 
1 hour later…
1:37 PM
@DowinskiField it might very well be that the decorator itself isn't good.
 
1:51 PM
Afternoon cbg.
 
cbg
I believe to remember that someone had posted a link to an article about Git here one day, which explained why git works and is designed as it is.
IIRC it did start by imagining we would copy the whole source folder as backup, then copy only changes, later adding branches/merging to collaborate, where one of the characters would go boat programming, ...
Does anybody remember the link?
 
\o cbg
 
This, which was about the fifth answer on searching the room history? stackoverflow.com/questions/20666331/…
 
no, no.
It was an external blog
 
A blog or a book?
 
2:23 PM
And it was written as a story.
I guess blog.
 
(If that’s not what you were looking for, then still: read that. That’s about the best explanation you can get for understanding Git’s object model)
 
nope, wasn't that :-/
 
was it this one? Wayne introduced me to this one to learn git, it has a mini story to explain git and whatnot in a blog form
 
Yeah, that was it! \o/
@MooingRawr Thank you! hugs
 
for real? *rolls eyes*
Guess I expected a lot more depth with your request for “why git works and is designed as it is”
 
2:35 PM
nah
Just wanted this as intro for a friend
 
That's my reading for the next 15 minutes sorted. :)
 
I see. Well, if you want an actual look inside, John Wiegley’s book is still my recommendation – or my answer linked above that gives you a quick summary of the same thing.
 
noted
Thank you as well.
 
2:44 PM
duped
 
3:07 PM
Happy New Year Cabbage, all
 
you too holdenweb
 
Is Gravatar acting up again for everyone else too?
Half of the icons are missing
 
works fine for me.
 
DSM
Did you modify an adblocker policy? That's tripped me up in the past.
Midweek cabbage for all.
 
cbg
 
3:17 PM
cbg
 
cbg
 
3:37 PM
Morning cabbage
 
cbg @Code-Apprentice
 
On my way to work. Get to finish installing my dev environment first thing
 
DSM
What have you been working on up until now?
 
All prod, all the time
Everything I do is perfect, so...
 
DSM
Understood. :-)
 
> If you need something, then yes, you need code for it. – davidism, 2018
4
 
so much for living in the future
 
I was reminded of the garbage in garbage out quote:
> On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
 
DSM
I learned that one from @Kevin, I think.
 
if SO ever gets a motto, I know where my vote will go
 
3:58 PM
I’d vote for the classic “Stack Overflow – What have you tried?”
 
wim
"I've tried asking on stack overflow"
 
"Stack Overflow: What are you actually trying to do?"
 
Reading this git parable link now -- really nice so far but I wish it also had some pictures
 
4:17 PM
time to create some and make a pull request :D
 
4:34 PM
do a cabbage roll
 
5:09 PM
my co worker is eating cabbage rolls for lunch, cbg idjaw
 
Or, "Do you know what you're doing?"
cbg to one and all.
 
5:47 PM
cbg all
 
cbg
 
cbg
 
Hello
I could use a bit of help using python to log into a webpage
 
My first try of doing this... installed 'robobrowser' since it seemed like a good/easy mix
 
5:57 PM
please use a paste service such as dpaste.com for large blocks of code
 
DSM
Mental note:Add dpaste vs. gist recommendation to list of topics for discussion at the GM.
 
@DSM gists onebox, defeating the purpose
 
I have no idea on how to grab the form so I can add in my username+password
browser.get_form(id='login')
browser.get_form(id='superdoc')
fails
browser.get_form(name='login')
TypeError: find() got multiple values for argument 'name'
 
Considering robobrowser uses beautifulsoup, it is eerily familiar to this: stackoverflow.com/questions/2877114/…
 
seems like you have to verify whether you are in fact using the methods as designed
 
will soon look into the stackoverflow link... just wanted to update my pasted code to this one which includes the 'superdoc' word
The example I have started with and the example in the stackoverflow link points to:
id="form-531f740522f8c290ead9b88f3da026d2"
But the page doesn't seem to have one
<input name="referrer" value="" type="hidden">
I'm pretty sure I need to use other attributes to grab the form... it is just a bit confusing at this point to know what to choose (I've made a couple attempts)
 
I would have to probably put in as much effort as you or more to troubleshoot this.
I suggest going deeper to see what the methods are returning
what happens when you do a get_form on its own
what happens if you play with different attributes?
go deeper
 
browser.get_form(id='superdoc')
I thought the following would give me something, but all I got is 'None'
That's where I decided I could use some help
I just realized the command is "get_form"
not get_div or something similar
The form id seems to be the missing link
Any help would be genius
 
Try get_form('login')
 
6:16 PM
None
 
Are there any canonicals that help users understand how to access random fields in arbitrarily nested JSON?
You see a lot of questions like this: "Hi, I have this JSON, how do I get this 'XXX' string from it?"
 
...there's the python tutorial, but I guess that doesn't count.
 
sigh... well, I gotta head off. But if anyone has any ideas, that would be fantastic
 
DSM
@davidism: well, that's not any good. :-/
 
6:19 PM
cheers for the good intentions and suggestions
 
this one gets close, but it only has dicts and no lists
 
I just wrote a canonical-ish answer which may or may not be a decent enough dupe target... any thoughts?
 
Could someone check if I've gone overboard here about MCVE requirements. Or should I meta?
 
I'm not a flask guy, but based on the question, it doesn't seem like they've provided a reproducible example.
 
@IljaEverilä I gave up interacting with that user, removed all my comments.
Looks like they deleted and reposted their question.
 
6:29 PM
I saw that previous question about the same topic, but I think they're being a lot more civil this time.
 
@cᴏʟᴅsᴘᴇᴇᴅ The answer is good, but I don't think that question would make a good canonical. Having json inside of a dict is rather rare; I think a canonical question shouldn't have such exotic requirements.
 
The question is a little unusual, yes. I still think the rest of the answer sans the loading would be useful. Someone would see the answer and think, "yeah, I understand how this guy solved their problem for their data, so I can solve my own problem"
Hopefully?
 
Oh yes, the answer is definitely useful. I very much like the idea of having a canonical question for that. I'm just saying it would be better to find a more suitable question, one that asks the simple question "How do access this element in this nested data", without any additional complications. And if you can't find one I'd encourage you to make your own, self-answered, question.
 
Fair enough. I could see there's a lot of scope for improvement if you consider some common JSON structures and address each individually, for which a separate Q&A would be better suited
 
wim
6:45 PM
even though I hate reduce ...
 
We're talking about noobs who don't know how to access nested structures at all; reduce would just blow their minds :p
 
Hah, also, not sure that accepted answer would work for potpourris of dicts and lists
That Q&A would make an even less acceptable canonical
So you did not invest a few mins to read the docs? — sascha 1 min ago
 
wim
oh. meh.
 
Ah, what a difference that would make to the site if more people read the docs before asking questions
 
wim
I hate those canonicals for obvious RTFM things
 
6:49 PM
It uses operator.getitem, so it absolutely should work for lists and anything else that has a __getitem__ method
 
@Rawing Oh, you're right. If you switch the keys with integer indices (for lists), it works like a charm.
@wim Unfortunately, those RTFM questions are rampant on SO :-(
 
Welp, found the part from the SQLAlchemy documentation that states that the fellow from before is just doing it wrong. Now I may rest.
 
7:14 PM
cbg.v2
 
7:31 PM
cbg to you :D
 
Anyone who used shapely on AWS lambda?
 
wim
who can guess the X of this XY ??
 
not subclassing array?
> Or does this produce memory leaks, double frees or other memory ownership issues?
newest edit ^ ...
no wonder they didn't tag it with [python], they probably come from another language
 
I've had a couple of run ins with that user, mostly over posting identical answers... not that it's relevant here
 
that's always relevant for you
 
8:02 PM
Hi! I am trying to figure out how to use pylint, without "dirtying" the pip freeze output (that I include in my project). Is this something that is possible?
 
any wxpython users here?
I have a PaintDC in a panael, that I want to have the x0y0 at the bottom... using dc.SetAxisOrientation(True, True)
i get no more output from the drawing
nevermind
 
DSM
Another problem solved merely by me thinking about it. B-)
 
yup
needed to SetDeviceOrigin
 
RubberDucky6 solves another case!
 
8:17 PM
The real answer is don't use requirements files, use install_requires and extras_require in setup.py.
 
wim
"dirtying"...?? don't invite your friends over to look at your pip freeze output
 
Depending on when you want to start the coin chain :D
 
I believe we already have quatloon that is being held by BanKKevin
 
00:00 - 21:0021:00 - 23:00

« first day (2643 days earlier)      last day (2312 days later) »