« first day (2636 days earlier)      last day (2310 days later) » 

12:17 AM
Evening cabbage
 
@Code-Apprentice cbg
Yay I'm celebrating a silver badge 17 min ago and a gold just a few minutes ago!
 
@AnttiHaapala JetBrains and one liter of beer
@Simon which ones?
 
Electorate and Strunk & White
Also my highest rep increase since the 100 increase a month or so ago. +33 yesterday and +52 the day before.
Oh No I've lost my hats!
And I've risen to top 2% this month. What an eventful day already.
 
12:38 AM
\o/
 
cbg
How long has SO prevented you from leaving a comment with "What have you tried?" on a post that shows no effort?
@Simon Way to go!
 
@Craig. Thanks I hope I can keep up the tempo. I don't know for who that comment is but I agree. The amount of questions I've seen today say "how do I do x? Please hurry" is amazing. Clearly without effort.
 
OK. So a check on meta shows that the phrase "What have you tried" has been banned for years. If you add anything else, the comment will go through.
 
12:55 AM
Interesting. I must have seen that four times yesterday. I keep away from the "classics" like that and go for something a little more creative.
Or just skip it entirely.
@Craig you couldn't give me the relevant link could you.
 
89
Q: Comments can't contain that content - "What have you tried?"

Kuba Spatny"What have you tried?" - I've seen that comment a million times on question that ask for help (usually on really basic stuff) without showing any effort to solve it themselves. I've just wanted to post the same comment, but got a warning Comments can't contain that content instead. This comment ...

Hah! You said I couldn't, but I just did.
 
Thanks very much daredevil. I'll read that with interest :p
 
cabbage
 
So if I see them I should flag them?
@james cabbage!
 
2:04 AM
rbrb
 
2:14 AM
cabbage
 
hi homies!
 
2:45 AM
django and heroku problem, please help! i'm getting this error message...
2018-01-03T02:39:35.291600+00:00 app[web.1]:     self.wsgi = self.app.wsgi()
2018-01-03T02:39:35.291602+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2018-01-03T02:39:35.291603+00:00 app[web.1]:     return self.load_wsgiapp()
2018-01-03T02:39:35.291601+00:00 app[web.1]:     self.callable = self.load()
2018-01-03T02:39:35.291603+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
from heroku... this is my wsgi.py:
import os

from django.core.wsgi import get_wsgi_application

name = os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fistsfullofcake.settings")

application = get_wsgi_application()
and this is my settings.py
actually, is this enough? the settings.py is kinda long...
 
 
2 hours later…
4:21 AM
Does anyone know what bootstrap means in this situation? (The word is just in conjunction with image data)


"n this blog post, we’ll look at object detection — finding out which objects are in an image. For example, imagine a self-driving car that needs to detect other cars on the road. There are lots of complicated algorithms for object detection. They often require huge datasets, very deep convolutional networks and long training times. To make this tutorial easy to follow along, we’ll apply two simplifications: 1) We don’t use real photographs, but images with abstract geometric shapes.
 
I had a quick look, does this seem right? "A program that bootstraps itself is one that begins with an extremely trivial operation and then uses that to continue the startup process internally. In a strict sense, the program does need help for the very first step but once that happens it doesn't need any external help."
 
4:37 AM
@Bonstark Not sure; however in this case, it's not a program but image data that is being bootstrapped.
Here is another sentence from the blog:

Basically, we use the same approach as above: Bootstrap the images with 8x8 numpy arrays and train a feedforward neural network to predict two bounding boxes (i.e. a vector x1, y1, w1, h1, x2, y2, w2, h2). However, if we just go ahead and do this, we get the following (quite disappointing) result:
 
5:09 AM
Perhaps by "bootstrap" they mean "replace"?
 
5:46 AM
Hello, Everyone. I have been stuck with a pyhon problem from months now. So, here is the problem. I have a text file containing a large no of lines.
Here is a sample of the file: "yyyyyy=xxxx
yyyyyy=xxxxxxxx

Sun Oct 22 15:19:23 PDT 2017
calling sequenc node

++ entering node aaa ( )
Sun Oct 22 15:19:23 PDT 2017
lines xxxxxxxx
calling wroot.bat

++ entering node bbb (xxx )
Sun Oct 22 15:19:23 PDT 2017
xxxxxxxxxxxxxx
calling bsod.bat
xaaaaa
bbbbb
tttttt
bbb completed successfully
-- exiting node bbb
Here is the expected output:

calling wroot.bat
calling bsod.bat,
xaaaaa,
bbbbb,
tttttt
calling wpretest.bat
 
@AbhijitBorkakoty read input line by line in a generator
 
Can you please elaborate on it?
I am new to python
 
@Naji I am pretty shure it fails before loading your settings. Don't ask what's the problem tho.
 
This is the code I am using : re.findall(r'calling.*?(?=\n[^\n]*completed succ[^\n]*\n|\n\+\+|\s*\Z)',bla,re.DOTALL). But this returns all the calling lines in the file.
 
6:12 AM
@AbhijitBorkakoty read the input line by line in a generator. You need a state machine
 
6:43 AM
not helping
 
7:12 AM
Garlic
 
@AbhijitBorkakoty I'm happy to be curt. You are asking for a magic answer to a task that isn't trivial. It requires thinking through how each line ought to be parsed. As @AnttiHaapala has already suggested, you should parse each line separately, testing whether conditions are satisfied and decide what to do. This exercise is really all up to you. It won't be easy, but then again, this room isn't meant to make your life easier. Sorry the suggestions don't feel more helpful.
cbg
 
going to see if there are any questions I can answer. I answered one last night and I might go back and look for a dupe now that I've had some sleep
 
@piRSquared I'm going to steal your setup for benchmarking performance... would severely improve the quality of my answers.
 
Please do
 
I've also picked up on the habit of using intermediate variables like 'i, j instead of cramming everything in one line. So much nicer to look at that way.
 
@IljaEverilä don't get me started on stats. There is only one reason why I'm not first on that list... and that's because... well Mama said if I don't have something nice to say...
 
@IljaEverilä He's not first because he's not a yamming repwfarmer
 
^ (-:
 
Though I must say efforts to improve said user are turning out to be more successful than I imagined. The fgitw hasn't stopped, but they're now more wary of answering dupes and VLQs than before.
 
7:29 AM
that's good.
He is also aware that I was upset stackoverflow.com/questions/40901770/…
 
The % of that certain account's answers to closed dupes is surprisingly low, which might be an indicator that the tag could use cleanup.
 
pandas is a difficult tag to close dupes. I know there are very common themes that run through questions, but there is always enough room to claim non-dupe-ness.
 
"That user" seems to be under the misconception that when a Q he answered is closed its a dupe, he's duty bound to delete his answer. Which is fine. However, he took this a little personally when I closed his question, and went hunting down an answer of mine with 5 votes, closed it as duplicate, and tried brow beating me to delete mine, because it's "only fair".
 
so, someone asked me if there is an official guideline that duplicates and off-topic questions shouldn't be answered..-.
Answer well-asked questions

Not all questions can or should be answered here. Save yourself some frustration and avoid trying to answer questions which...

...are unclear or lacking specific details that can uniquely identify the problem.
...solicit opinions rather than facts.
...have already been asked and answered many times before.
...require too much guidance for you to answer in full, or request answers to multiple questions.
...are not about programming as defined in the help center.
 
I sometimes check to see if a user has chosen answers for their previous questions as criteria for answering their question.
 
Where is the best tutorial for Phyton Beginners?
 
cabbage
 
Instead of learning, Can I eat cabbage rather?
 
@GNMercado dunno about Phyton
 
8:03 AM
@IljaEverilä Yes @IljaEverilä been reading it quite some time now.
@AnttiHaapala Yea sorry for the spelling, Python :)
 
cbg
 
8:20 AM
@piRSquared Atleast some start from the code I posted
 
8:32 AM
Nope... don't use re. Follow @AnttiHaapala's advice. And that's all I'll say.
 
well you can use re. but not like that.
not every text processing problem can be written in a single regular expression. They're not turing-complete.
 
reboot, coming back
 
copy = False
bucket = []
for line in infile:

if "calling" in line:
bucket = []
copy = True

elif "completed successfully" in line:
for strings in bucket:
outfile.write( strings + '\n')
copy = False

elif copy:
bucket.append(line.strip()). I tried this too but not helping.
 
8:49 AM
@AbhijitBorkakoty clap clap :D
so what's wrong, seems to be right
(mostly)
except for the formatting
you didn't account for the '++'
 
@AnttiHaapala it returns only the lines which is between "calling" and "completed successfully". It does not include the lines " containing the "calling line"
 
@AbhijitBorkakoty I wonder why is that
 
that's where I am stuck now
 
well, there is no helping you then :D
how did you come up with this code?
 
It was an answer to a not so similar question.
 
8:56 AM
you should apply the Snake book knowledge in addition to the Sloth book
I am done here.
garlic
 
I modified the code though
 
I had a substantial laurel. You don't know how tempted I was to star ^
 
9:14 AM
Cᴀʙʙᴀɢᴇ
 
cbg
 
@Simon "Please hurry" and "Urgent" are codewords which mean "Please down-vote and close-vote my crappy question". :)
 
9:32 AM
Wow! I was good for one answer. I spent 30 minutes looking. Left some comments. But could only bring myself to answer one.

That's it for me. Rbrb all!
 
9:49 AM
@PM2Ring for me those questions often screamed "Edit me"
 
@PM2Ring Nice small caps.
 
@Simon If I'm feeling in a generous mood, and the OP seems like they genuinely want to learn, and not just have us do their work for them, I'll edit stuff like that out of the question.
@cᴏʟᴅsᴘᴇᴇᴅ Thanks. I should get around to updating my small caps translator: it's written in Python 2.
 
Ooh, that sounds like fun.
 
 
1 hour later…
11:09 AM
@PM2Ring I probably get those sorts questions more than most because of the tag I cover. As you say most of them just want it over with. Hopefully with someone else giving them the script to use.
One (this is cx_freeze) even asked something like "I've got this app, I've installed cx_freeze, how do I use it." If the correct action is not to close and down vote that I don't know what to do.
 
Oh how I hate it when people appeal to "customer reasons" for not showing their code (or effort): stackoverflow.com/questions/48076004/…
 
Time for me to make an attempt.
Oh you've beaten me to it
/*frantic typing* I'll just try some obvious load of rubbish so I can say I tried.
@IljaEverilä I wonder how others manage? I'm sure many here who do code for clients.
 
11:32 AM
Writing long, meaningful, and comprehensive answers is so self-gratifying.
 
Isn't it. I like to do that myself : ) not a pandas person so I won't vote.
Actually your answer is only twice as long as my longest
 
@Simon Seems like a common misconception that a MCVE is a code dump of everything at hand.
 
You mean like 50+ Lines of complete junk that can be boiled down to one line?
 
Pretty much.
 
Thanks. I should do it more often.
 
11:40 AM
@IljaEverilä Well as long as they are actually trying I don't mind I just don't bother reading.
@cᴏʟᴅsᴘᴇᴇᴅ Ah competition!
 
cbg
 
@AndrasDeak cabbage
 
11:55 AM
@IljaEverilä I'm tempted to reply: "I could tell you how to do this, but then I'd have to kill you."
 
cbg
 
Cbg, @Cam_Aust Long time, no see. Happy New Year. I've moved back down to Sydney. I wish I were still up near Coffs...
 
@PM2Ring Hey, how are you. Thanks. Happy 2018 wishes to you also. I grew up in Sydney, moved, and have not looked back. Still like to visit, but would not want to live there. Yet, if I recall, that was where work took you.
@PM2Ring Yep, I have not been up to much re learning python. All the same, I have posted a few answers to questions on SO. My opportunities due to limited experience are quite few. Fun though. Approaching 500 reputation. Slow and steady.
@PM2Ring Been meaning to post my solution to selecting text & background colours in Unix, Terminal, Bash. I find the net references of what color for what number simply do not match universally. So wrote a little unix program that displays the 256 options - in the terminal/unix version/OS you are using - to be sure you get what you want. All that just to tidy up my terminal prompt line. Fun to play - but oh so basic!
@PM2Ring So your thoughts on Sydney now you have returned?
 
12:12 PM
@Cam_Aust Not quite. I had to find a new place to live, but didn't have any luck up north. Fortunately, an old friend in Sydney had a spare room he was wanting to rent out.
 
@PM2Ring So hard being in the renting game. All that money just to have a place to sleep. I moved into a really old farm house in rural area, no running water, etc, but rent free. Build from there slowly. Good to be with a friend though.
@PM2Ring So how is life since we last talked. I have an SE puzzling situation to ask about, but first, keen to know how you are doing overall. I have valued our exchanges.
 
@Cam_Aust Cool. I don't often use colours in the *nix terminal because of the lack of a universal standard.
 
@PM2Ring Ah, so it was not just me, OS, etc. Good to know. I only use color in the prompt line. Happy now I have that to my liking.
@PM2Ring Did you go into the city for New Years eve, fireworks etc?
Can I ask something.
Given your experience on SE
 
@cᴏʟᴅsᴘᴇᴇᴅ I have more competition for the longest answer awards.
 
12:30 PM
@Cam_Aust No, I was here chatting. :) But I did hear some fireworks.
@Cam_Aust Ask away!
 
OK, for those of you experienced with SE and moderating, I wonder if you can shed light on this experience, though not on So, rather Think Different. Get email of inbox message of an answer to a long posted Q&A I did. New answer has a link, and some Excel macro code. Follow up on link, site, macro download package. With caution click to download macro package to check out, no download file. Post as comment, concern re the post and link - perhaps malicious. Then ...
on returning to question, everything gone. The new question, the comments, and the in box email that originally notified me. All like never was. Reloaded question, nope. All I have is the original email in my email inbox.
My original Q & A + one comment, remains.
 
@Simon I'd be curious to know who holds the record as of now. There's probably a SEDE query for it.
 
@Cam_Aust Do you mean Ask Different?
 
@Cam_Aust deleted by moderators as spam/malicious?
 
What Andras said.
 
12:36 PM
Yes sorry. Trying to recall the way to put a link into this chat.
 
if a question is deleted, low-rep users don't see it at all
this is a newly deleted question on SO stackoverflow.com/questions/48077413/…
 
@Cam_Aust like this: [link text](https://example.com)
 
if an answer is deleted the same happens: low-rep users don't see any trace of it
 
Yep OK, in this case, just the new answer and comments were deleted. Ok ta. It was this Q&A. link
Thanks. Now my only concern is if the download file did not turn up in my normal download folder, where did it go, re malicious code concern. I checked for all recent files, and perhaps there was no download. Could not see any other suspicious activity, and as for Excel Macros - my spreadsheets are set for not allowing macros without first asking me. So I fairly sure all is fine. But if my enter HD gets encrypted, ransom ware, I will be not happy.
By the way thanks @PM2Ring and @AndrasDeak.
By the way, the poster of the new question had a reputation of 1, so quick scam sign up account on SE would fit with all said here.
Must say, I have missed being here. Love the quote: " (comparing the mod team to ringwraiths in the most affectionate possible way)"
Creative writing skills, clearly.
 
@Cam_Aust I think that the fact that the comments in your inbox are also deleted probably means that the user was removed from the system, although I guess a mod may have deleted them. It may be worthwhile to ask about this in an Ask Different chatroom or the Ask Different Meta site, or at least do a search for similar questions on Ask Different Meta.
 
12:46 PM
@PM2Ring OK, good idea, will do that.
Should I look forward to "accessing review queues"?
 
@Cam_Aust We keep trying to encourage Kevin to do some creative writing, but so far we haven't had much luck. But he does post some gems here from time to time.
 
@cᴏʟᴅsᴘᴇᴇᴅ. You without doubt you (you've been here longer) but we are on different tags.
 
@PM2Ring Well I am still laughing at his comment, but not in agreement with its application to moderators. I read Tolkein's work oh so long ago, way before D&D came out and it became popular. Let alone the movies. So unkind!
 
jjj
new year cabbage banana peoples
 
@jjj to you also.
 
12:51 PM
@Cam_Aust Review queue work can be very satisfying, but it can also be very depressing, because you see so much utter garbage. Most people don't last long in the review queues (I certainly didn't), but some people seem to enjoy it.
 
@cᴏʟᴅsᴘᴇᴇᴅ It all comes down to the time each user has spent here I suppose
 
jjj
there is a huge sale of packt books on humble bundle. Anyone has an opinion about those and would like to share?
Quick google suggests that Machine learning is worth something, but also that packt is not a respectable publishing company.
 
@PM2Ring I like the triage and don't mind the late answer but positively can't stand the other one
 
jjj
@Cam_Aust thanks!
 
@PM2Ring OK appreciate the comments and heads up. Not being a professional programmer, SO participation is more side fun interest. I like to tag along, and contribute. Though do also want to improve my coding knowledge and skills. I use some other SE groups eg astronomy. Beats lawn mowing, Guardianship work on behalf of disables family member, wrangling on behalf of small community with local council amalgamations, etc, etc,
 
12:56 PM
@Simon I meant overall. I've seen some pretty long answers, for example the yield answer by e-satis.
 
If you use simple LEN(Body) as the criteria, then the SQL/XML answers come on top...
Figures.
 
@cᴏʟᴅsᴘᴇᴇᴅ, @Simon If you don't mind me adding a comment on long answers. In many life situations sometimes long answers - to genuinely resolve an issue, are warranted. So many times providing short answers, only to find that the confusions of insufficient info, wrong tangents taken by others, and follow up, the long patient full step through would have taken less overall time in the end. SO is a special case situation though.
 
@cᴏʟᴅsᴘᴇᴇᴅ chat.stackoverflow.com/transcript/message/40658779#40658779 in my opinion. MartijnPieters does long ones
Not sure who is longest really but it would be interesting
 
@jjj can not help you with the humble bundle, other than whenever I give in to an impulse buy, I always regret it!
 
1:05 PM
@GNMercado who can say they don't want useful comments?
 
@PM2Ring Wondering if I should mention. Sort of life hack option. Family member, now early 20's, bought van, stripped inside, 3 months to insulate, fit sink, bed, solar power (sound system), shelves ... so now can visit friends, camp in back yard, make contribution re gas, hot water, elec, and travel to where work options arise. ...
@PM2Ring Some drawbacks, and has here as back up for storage of things etc, but financially efficient, and loving it so far. Plans to live in van for a few years, check out life experiences and options, then invest in being more permanent. Mention should this idea have played on your mind as a thought.
Works for one person.
 
jjj
@Cam_Aust its the same with me, thats why Im asking :)
 
@ReblochonMasque o\
 
cabbage @AndyK
 
2:02 PM
rbrb
 
Cbgrb? (Translation)?
@cᴏʟᴅsᴘᴇᴇᴅ
 
@Simon Some of my timeit answers get rather large, since they gather code from all the other answers, plus my own contributions, and compare their running times on a variety of data. The biggest one so far is this monster, which I had to split over 2 answers.
 
Sweet : )
 
@PM2Ring OK re the issue I asked about. Moderator person confirmed they deleted the answer as it did not answer the question, but did not check out the download link so can not comment on the malicious code concern my side. So there is confirmation of the suggested explanation.
 
2:22 PM
hi
 
cbg \o
 
Wow how time flies. rbrb to you all. Always a pleasure to visit.
 
See ya, @Cam_Aust.
 
2:44 PM
Regarding "longest answers", this one's a gem: stackoverflow.com/a/41858390/2681632 :D
3
 
3:15 PM
Laurel
 
New Years' Cabbage
 
jjj
4:00 PM
@IljaEverilä This is brilliant, thks for sharing.
 
4:14 PM
I've ended up supporting a couple of forks of python utilities (and having to install from those forks) because project owners have been slow to respond, or completely unresponsive. One has finally merged my fixes, but they're still not on pip. Can anyone give any advice on getting fixes back into python projects and up onto pip? I'm not a python dev really, I don't really want to publish my forks on pip just to get the fixes available in a simple way
 
rb folks
 
On a related note - one of the forks I need to fix again is broken now because of the pymysql 0.8 release on December 20 which has BC breaks. Is that something I should expect from minor version (albeit pre 1.0) projects - do python projects not tend to follow semver? Sorry if this sounds hostile - it's not meant that way, I'm just trying to make these tools work again, and passing a GitHub .tar.gz url to pip/pip3 just feels wrong.
 
4:28 PM
I don't think the community follows any particular versioning standard
I can assert this without looking up whether there's a PEP or anything on the topic, because if I'm not aware of it off the top of my head, then neither will 50% of the people publishing their projects for the first time
It's not written in 50 foot high burning letters on the side of a mountain, therefore there will be many people not aware of it
But wouldn't it be nice if we did follow semver? I think it would be nice.
 
cabbage
 
cabbage
 
Time for my once-in-a-blue-moon contribution to open source - I fixed a single-character typo in the documentation of a firefox add-on I use. Project maintainer was last seen last month so I'm optimistic my PR will be accepted by the end of the year
 
Hi, has anyone managed to requests.get an HTTPS URL in python 3.x before?
 
I was sitting on SO and thought "oh yeah, there's that chat thing I'm part of."
 
4:36 PM
@LarsaSolidor Sure, works fine on my machine
>>> import requests
>>> requests.get("https://www.example.com")
<Response [200]>
 
^^ ditto. We use it like that for our authentication microservice.
 
@davidism who are you again? :P
 
Obscure FFXII name.
 
Mine takes ages to respond
 
@Kevin and if it doesn't get merged would you have actually successfully contributed? will this drive you to the point where you will have to hunt down the author to make them merge it or so help them god, you will write them an angry letter/review?
 
4:37 PM
And then gives me loads of errors
FFXII FTW… ;)
 
@MooingRawr Maybe I'll fork it and then I'll be the neglectful project maintainer
 
Oh, of course, errors. Now it's all clear and we know exactly what's wrong.
 
@LarsaSolidor if you want any help you might want to create a mcve
 
(There's a recent question on the main site, re MCVE)
 
sigh, that didn't take long
@LarsaSolidor please read our room rules, don't ask about recent questions here.
 
4:39 PM
Where are they?
Oops
Ah!
Will I be banned?
 
@Kevin heh it reminded me of a scary urban story of a hunted ice cream trunk where it has to have a human trapped in it as it's life force, and the only way to get out of the trunk is to lure another human into the trunk with the ice cream... when will the cycle end?
 
First infraction punishment: slapped with a wet herring
 
ouch
 
Gross, but not as gross as the second infraction.
 
4:40 PM
:-D
 
I hope it also involves a wet herring
 
I'm bored of writing this API. I need something more fun to do.
 
The Nth punishment is to be slapped with N factorial wet herrings
 
(related: I started playing around with Unity last night, that seems actually fun)
 
1733
A: In YAML, how do I break a string over multiple lines?

Steve Bennett ㄹThere are 5 6 NINE (or 63*, depending how you count) different ways to write multi-line strings in YAML. Block scalar styles (>, |) These allow escaping, and add a new line (\n) to the end of your string. > Folded style removes the newlines within the string (but adds one at the end): Key: > ...

YAML strings are insane. The spec is so dry, but this answer makes it obvious.
 
4:42 PM
@Kevin It would be nice. Then again, responding when someone files a bug report and submits a PR for a ridiculously obvious bug would be nice too.
 
Oops I didn't file a bug report, only a PR. Fetch the wet herring!
 
Wait one hour to a day, depending on your local fishing hole.
 
@MooingRawr A group of ice cream enthusiasts band together and voluntarily take shifts in the trunk (truck?). Their pure love for ice cream may cure the tru(n|c)k of its curse. If not, that's also fine, as they still get unlimited ice cream at the expense of being chilly for an hour a day.
 
@Kevin I have no idea what the etiquette around that is. Even for Flask, sometimes I'm ok with someone just fixing a bug, sometimes a PR without a separate issue is no good. I have no hard rule for identifying it.
 
truck*, And that's a good idea.... did you just convert a scary story into a "normal" story ?
 
4:45 PM
I mean, I could go and make a bug report right now if I wanted...
@MooingRawr Yeah but there are any number of ways to turn it spooky again. Maybe the truck vanishes and reappears across the country every night, which makes it very hard to coordinate any kind of collaborative effort. Maybe getting caught in the trunk automatically drains you of one year's worth of your life force, which makes frequent shifts implausible. Maybe there's a really unsettling skeleton in the driver's seat, so nobody wants to ride along with him.
Just, like, the spookiest of skeletons, man.
 
if anime has taught me anything skeletons can range from wonderful singers, to menacing warriors for necromancers... so I choose to think of them as great artists for the road trip :D
 
"Fleshbags just don't understand the craft of ice cream these days", says the skeleton. He casts a sidelong gaze at you with empty sockets. "Uh, not you, though. You're one of the good ones". The ensuing silence is uncomfortable.
 
<insert Peter Griffin's why thank you gif>
 
5:01 PM
re-cbg. @Kevin I figured out an efficient way to handle negative numbers in that subsequence sum question we were looking at yesterday. Stefan Pochmann pointed out it was better to use a dict rather than sorting and groupby, and hinted that it was possible to find the maximal group in linear time, even if negative items are permitted.
 
Interesting. The dict thing was something I was already kicking around, but I'm surprised that there are additional potential improvements on top of that.
 
DSM
Eating-pizza-at-desk-because-I'm-behind cabbage for all!
 
cbg, hope there are pineapple on that pizza :D
How long did it take you to read through all your emails that was piling up when you were on vacation ? (I'm assuming you got a lot of emails :) )
 
DSM
Only a morning, although there's a lot of work mentioned in them which is going to eat up time for a while. Could have been much worse, though, so I shouldn't complain.
 
5:18 PM
@Kevin I feel a bit silly for not seeing that a dict of lists is the best approach. But as I said to Stefan, I got locked in to seeing it as a groupby problem.
This question is a reversal of a common newbie error. His user input is integers, and he's comparing it with strings. I guess that was more common in ancient times, before people got admonished not to use Python 2 input. stackoverflow.com/questions/48081801/…
 
Anything in the itertools module is fun to use and therefore it's hard to factor them out of your code later on ;-)
 
When estimating the hours for a task, remember to account for both cognitive difficulty and emotional difficulty
 
5:44 PM
guys need some help with a shell command... I want to copy all files from their location within src/**/*.css into dist/**/*.css, respecting their original location. i.e., if the file was at src/avatar/avatar.css, it would go to dist/avatar/avatar.css
 
DSM
What shell?
Ehh, I'm impatient. Assuming bash:
[close but no cigar!]
Oh, wait, that's one directory too deep.
 
I think the command probably starts with python -c ;P
 
for k in src/**/*.css; do echo cp $k ${k/src/dist}; done unless that changes every "src" to dist
 
DSM
Yeah, now I realize every time I've done this in the past I've done it at the file level. :-(
Or just been making a separate copy entirely like my first effort did.
 
@corvid Do you have rsync on that machine?
 
DSM
5:51 PM
I don't know what shells support **-globbing, so I can't guess the answer to my which shell question.
 
OP left his question alone, not a good sign :\
 
I think you can enable ** in bash
 
Hello
 
DSM
I guess using --parents will work if you cd appropriately. Not quite as elegant, but functional.
 
cbg
 
5:54 PM
Where's the best place to add some code if I got a question
 
DSM
The main site. ;-)
Off to start the training process for my two new co-op students. Here's hoping! Rhubarb for all.
 
I started explaining my issue but realized the solution while writing the story.. thanks for the help!
hehe
 
@ofer.sheffer The room 6 rubber duck triumphs yet again. :)
 
jjj
@ofer.sheffer This is the best part in trying to write a good question :)
 
But for future reference, gist.github.com is a good place to put code.
 
6:01 PM
@PM2Ring Thanks!
 
give our room rules a read next time, since it has a solution to your question.
 
6:19 PM
actually, I'm not a huge fan of dpaste
 
cbg
dpaste sounds like an R/Matlab function.
 
not matlab :P
 
@AndrasDeak Oh, right... You're our resident Matlab expert here. Hmm, I've never considered learning Matlab, even though my university lets us download the 2.xx GB software with a student license
 
oh, you probably mean like dsolve
I'm not sure about "resident matlab expert" but at least I think my experience is relevant :P
matlab's great, but my experience is that unless you use specific toolboxes, python is even better and free and opensource
I switched from matlab to python and never looked back; couldn't be happier
but I'm sure there are toolboxes (image processing? signal processing?) where matlab probably has an advantage
They somewhat recently started doing array broadcasting (to the dismay of many users writing buggy code), and despite all efforts and a new string class handling strings is a PITA. MATLAB is for numbers.
 
6:35 PM
I think matlab's signal processing toolkit is richer.
I remember a specific one: im2col operation which python does not have.
 
easily possible
 
How odd. I just noticed that I lost 10 points a couple of days ago from a 21 month old answer because it was unupvoted.
 
huh
 
@PM2Ring Voters can be fickle like that. Earlier today, someone downvoted an answer of mine and upvoted a competing answer for whatever reason. Sanity prevailed, and a timeit test revealed my solution was indeed the fastest of the lot.
I've kinda learned to shrug stuff like that off now. I'm sure you have too.
 
Normally votes are locked after a short time period, unless the post is edited. But that post was edited by Community last year, when the great http to https link conversion happened.
 
6:47 PM
perhaps the user wanted to upvote it again and hadn't notice the original upvote?
it really doesn't make any sense
 
@cᴏʟᴅsᴘᴇᴇᴅ It's no big deal, nor is the other 10 points I lost yesterday due to User was Removed. I just scored 45 points from a 2 minute answer, so I can't complain.
 
I keep leaking losses from users being removed. Nothing like that one time where I lost like 450+ rep though. Phew, that was something.
 
@AndrasDeak Exactly. I'm more baffled by it than I am annoyed by it. If it were a revenge downvote, you'd think they'd actually downvote, not merely remove the upvote. It's not a fantastic answer, but it's ok, and the OP seemed happy with it at the time. stackoverflow.com/a/36479825/4014959
 
Got it, it was a huge pain
 
@cᴏʟᴅsᴘᴇᴇᴅ Yeah, I remember that. You took it pretty sedately, IIRC. I wouldn't have blamed you for being rather upset. I know I'd be upset if I lost that much in one hit from user removals.
 
6:58 PM
Yup... I wasn't really bummed out about it. Made up for it in a couple of days, so 'twas all good. ;) It was in the best interest of the site so it was fine by me.
 
 
1 hour later…
8:06 PM
Yay. OP finally decides to post some fake sample data instead of just trying to describe it. Within a few more days, the question may even be answerable. ;) stackoverflow.com/questions/48065413/…
 
I was going to end the day with one final answer but it gets downvoted. Go figure.
whatevs, rbrb.
 
too broad with "no modules used" stackoverflow.com/q/48084224/5067311
 
8:28 PM
I got you andras!
 
DSM
8:54 PM
TFW your intern did exactly the right thing after you just told him something was possible in a certain way and he figured the rest out himself :'-)
 
\o/
go home, it doesn't get any better than that
 
DSM
I know, right? Feels like everything else that can happen this week will be a step down.
 
9:16 PM
Until the intern surprises you by fixing a random bug while playing around with a fork.... :D
 
9:45 PM
    def collect_youtube_cookies(self):
        pickle.dump(browser.get_cookies(), open('ytCookies.pkl', 'wb'))

    def collect_facebook_cookies(self):
        pickle.dump(browser.get_cookies(), open('fbCookies.pkl', 'wb'))

    def collect_instagram_cookies(self):
        pickle.dump(browser.get_cookies(), open('igCookies.pkl', 'wb'))

I got these 3 methods in one of my classes, obviously they are very "DRY". I was thinking of doing some function programming magic. Now since we are dealing with methods I am a little unsure how this should be done, I would highly appreciate some advice, tha
 
def collect_cookies(self, filename):
    with open(filename, 'wb') as file:
        pickle.dump(browser.get_cookies(), file)
 
I was thinking of a function that returned a function, but I guess that'll work too.
 
 
1 hour later…
11:19 PM
Quick daft question is it possible to get the amount of votes I can cast lowered? Like a ban or something?
 
Well, you could submit a request to be banned...
 
Well it seems almost every day I reach my voting limit. 3 remaining for today. I'm either a voting manic or I have had my voting amount lowered.
Actually it's probably the review queue.
 
Check your vote history.
 
Looks like I'm a voting manic then. I need to do more down-votes. Ah! That's my new years resolution. More Down-votes
 
11:37 PM
I fully support this resolution.
 
Starting from now.
 

« first day (2636 days earlier)      last day (2310 days later) »