« first day (1549 days earlier)      last day (3416 days later) » 

2:55 AM
So, if any Brits read this, could you explain what exactly wotcher means? From context, it appears to be a greeting, but I'm not sure what its connotation is...
 
 
2 hours later…
4:45 AM
Well, there goes all my rep potential. Alex Martelli has started answering Flask questions.
On the other hand, I found the greatest playlist ever: mashups of Come On and Slam with other songs/video game music/anime intros
 
5:28 AM
Cbg all
 
 
1 hour later…
6:44 AM
Cbg
@MattDMo it is indeed a greeting, but a bit out of date now in general use amongst teens and 20-somethings, at least outside of London and probably within most of London as well now. Older people might say it, especially Cockneys.
It's not Cockney rhyming slang however; it's short for the archaic "what cheer?"
No particular connotations
 
7:35 AM
print(*reversed('gbc'), sep='...', end='!!!\n')
 
7:48 AM
cbg
Thanks, Mr. Smartypants. This is where LinkedIn does tech support now. developer.linkedin.com/blog/stacking-api-support-linkedinThe Face of Bo 14 hours ago
lmfao.
 
yeah
4 cvs
 
I wish linkedin would be banned from stackoverflow :D
their api is horrible shit
 
They also somehow got my offtopic comment removed, I wonder if they flagged it?
 
11
Q: LinkedIn directing people to SO?

MonkeyZeushttps://developer.linkedin.com/blog/stacking-api-support-linkedin Is this really happening? Can we no longer provide comments to the effect of "Take this up with the support team for XYZ Product." How is this going to be handled within the SO community? How long before other companies claim to...

25
Q: Is it acceptable to use Stack Overflow as a Q&A for a specific product?

David BrossardI work for a small software start-up and I love Stack Overflow. Is it acceptable to encourage our customers to post questions on Stack Overflow so we can answer them there and also let the community benefit from it? Would customers shy away from the fact that it is too public?

 
7:54 AM
119
Q: Reach out to LinkedIn about outsourcing their developer support to Stack Overflow

FfisegyddLinkedIn recently closed their support and began directing their users to use Stack Overflow. This has seen an upsurge in questions within linkedin. This has been previously brought up on Meta here where it was closed as a duplicate. Unfortunately, the majority of these questions are off topic o...

 
yeah
found that one :D
 
8:09 AM
@Ffisegydd what offtopic comment?
@Ffisegydd still see 1 comment
 
8:21 AM
@Antti I voted to close stackoverflow.com/q/27865563/3005188 as OT but my custom comment is missing (at least it is on my page).
(the custom comment that is posted as an actual comment at the bottom of the question)
 
Closed it
 
You are my hero.
And GOOOOOOOOOONG
 
Python team out in force on that question
Data structure that kept me up last night (or more accurately, I read about when I couldn't sleep, and then I could sleep): heaps. I get the max-heap and min-heap operations, but what's a heap for?
 
user559633
morning
 
@RobertGrant heap is the nice simple structure for O(lg n) extract max/min ops
 
8:31 AM
morning folks
 
@tristan mornin' sunshine
 
en.wikipedia.org/wiki/… for any algorithm that requires the following ops ;)
the python heapq is binary heap
it has the worst running times on paper but pretty low constants and easy to understand compared with the others...
 
Cbg :)
 
"The heap is one maximally efficient implementation of an abstract data type called a priority queue."
 
Yeah I heard about priority queues as well in relation to heaps; I'll read about them.
I really like the heap-up and heap-down algorithms; they're very simple and neat. I'll just investigate further
Thanks :)
 
8:39 AM
there are things like say the internet routing algorithm "open shortest path first" -> well, that's a priority queue... and ofc the sched.py "run the task with the deadline now", etc etc.
see the sched.py source
 
Oh yeah I see, thanks! That's a good practical example. Makes perfect sense.
 
8:55 AM
and ofc heapsort :D
In computer programming, heapsort is a comparison-based sorting algorithm. Heapsort can be thought of as an improved selection sort: like that algorithm, it divides its input into a sorted and an unsorted region, and it iteratively shrinks the unsorted region by extracting the smallest element and moving that to the sorted region. The improvement consists of the use of a heap data structure rather than a linear-time search to find the minimum. Although somewhat slower in practice on most machines than a well-implemented quicksort, it has the advantage of a more favorable worst-case O(n log n) runtime...
 
Yeah that's where I'm going next :)
I also like the fact that you can implement it as a 1D array, which still seems like magic
 
yeah, that heapsort algo img shows the heapify first, with the tree...
 
Ah okay, I wondered what that was
 
the white squares show what is the maximum at those points
 
When you run heapify, do you always run through the whole heap? I saw an implementation where they stop if the level they're on is fine (which I guess just means that every operations takes care of its local balancing, so you never need to iterate through all the nodes).
 
9:10 AM
ah heapify is the initial operation, it needs to go through all the elements...
 
Aaaah it's so clever I love it
 
if you insert one by one then ofc you never need to heapify
 
Yeah, that all makes sense
When you're creating the heap then you heapify; after that you don't
 
I need help please. I want to split entire file content on lines that look like '------'
I used: re.split('-+$', content)
I'm obviously missing something
 
user559633
@shevski and what did you get when you tried that?
 
user559633
9:13 AM
what does the source file look like?
 
None None None etc.
some line
----
some lines
----
 
user559633
one line, no new line, no hidden chars, utf-8 encoded? (edit: thanks.) and you expect the lines to be split into a list?
 
ok, so using \n works
instead of $
 
user559633
is it always 4 lines?
 
user559633
yes, because there's an intrinsic newline
 
user559633
9:15 AM
>>> shev = """
... some line
... ---
... i like goats
... ---
... bleet bleet bleet let's eat cans
... ---
... """
>>> shev.split('---')
['\nsome line\n', '\ni like goats\n', "\nbleet bleet bleet let's eat cans\n", '\n']
 
Shouldn't it be '-+\n$'
 
I used fd.read() where fd was the file descriptor
how can it tell $ from \n?
isn't it the same thing?
 
user559633
>>> re.split('\-+\n', shev)
['\nsome line\n', 'i like goats\n', "bleet bleet bleet let's eat cans\n", '']
 
I'll be right back, thanks :) I'll read what you say!
 
user559633
@RobertGrant yeah, but i'd also just escape the dash so it's obvious what we're anchoring on (sorry to imply that you were in any way incorrect, it's 4 here)
 
user559633
9:18 AM
and also sorry for the notification sound like a brazillion times
 
Haha it's totally fine, for both things :)
Didn't seem that way
Possibly regex should actually be a module in CS (or maybe Software engineering) degrees, as it comes up here so often :)
 
user559633
i was about to say that i don't use that much regex at work, but then i realized that's a gosh darn lie
 
user559633
i completely forgot that it takes rep to vote up answers
 
@tristan thanks, I was at another table with a guy from my work (shevski). using '-+\n' did what we expected '-+$' to do. I may look int it later
 
@ReutSharabani Just look up how regexes work in general
But I guess for a split the $ is redundant
 
9:27 AM
I never use complex regex, but I expected $ to be the same as \n
 
user559633
@ReutSharabani ah crap, if i knew it was you, i wouldn't have helped
 
It was us both, so technically you're were only half fooled :)
 
re-cbg
 
user559633
@ReutSharabani well, if it was only half, i guess i can stop making the voodoo doll...
 
@ReutSharabani this isn't complex regex at all - you just need to understand the very basics to know what $ is for. \n and $ have nothing to do with each other.
 
9:36 AM
you'd want to use ^ there somehow
 
I was thinking you don't really need ^ and $ with a split?
 
now the regex matches for example hyphen-
ated words
 
But not with \n?
 
user559633
you could always look for a newline before the \-+
 
though then you want to use the "beginning of line" which depends on \n
then it will eat the newline
 
user559633
9:37 AM
hivemind powers activate
 
Yeah \n\-+\n
 
we ended up using '-+\n'
the non-standard formats people come up with...
 
Wow and that's been edited
 
9:44 AM
Oh, no it's not
@Ffisegydd killed
 
Wow what a poor edit.
 
user559633
"the nerds won't complain, they said. they'll do free support our recruiter network, they said."
 
I love the smell of closed questions in the morning.
 
user559633
i went to get tea and almost came back with a beer before remembering that it's dark because it's early in the morning and i have to go to work today
 
Haha. And oh dear.
 
user559633
9:50 AM
i woke up at 3am thinking "heck yes, let's write some code" and now that's it's only 5am, i'm afraid that by noon i'll be sitting at my desk thinking "oh man, let's stare at some walls!"
 
I think it can be good to act on your enthusiasm when you have it :)
 
user559633
:) i'm almost at the machine learning component of my current project...just another 30 hours of web dev in the way before it gets fun again
 
Woo! ML! What are you doing?
 
user559633
A lot of it is secret sauce behind my apartment website, but analyzing census and other public data to draw income v. monthly rental cost on a map
 
I see
 
user559633
10:07 AM
and then eventually some more whimsical stuff like custom cost of living approximations based on routines
 
Nidaba slave detected
 
I need to do more Nidaba >.< Just so much other stuff on the go.
 
user559633
I can totally understand that
 
-2
Q: Why does the LinkedIn API return "500 Internal API Server Error" when retrieving a specific user's Full Profile

Andrew RederI am using Janrain Social Login to handle login and registration for my website, and LinkedIn is the preferred identity provider of my users. Everything works fine, but I have a small subset of users that are unable to log in. After they enter their LinkedIn credentials into the Janrain Login wi...

how about this?
 
user559633
i already voted to close; it would be nice to see it do so
 
10:14 AM
I'm not so phased by that one, but I dunno.
 
btw, for json stuff, postgresql 94 rocks
 
Meh, I'll vote.
 
it is like "why does linkedin give 500"
if ever you get 500 from any api, it is a support request
500 should never happen.
 
Oh I never noticed that before - if I close and select an existing custom comment reason, it auto-upvotes that comment.
 
rly never noticed? :D
 
user559633
10:16 AM
i VTC because it was a "i'm using some plugin and linkedin is returning 500s, so someone please take a job at linkedin and extra server-side logs for me"
 
I have a simulation.py file and myfunction.py file. In the first, I reference a function doStuff() from myfunction.py. Is there a good practice on how to "import" doStuff() in simulation.py? PyCharm wants to import it as import source from doStuff. Source is the folder where I keep these files.
 
@tristan that only had 3 vcs, you sure? robert, me, and you, and then there is the comment by davidism
 
@Roman generally it depends on how many functions you want to import from the other file, and also whether the function name would accidentally overwrite something in your current namespace.
If you only have 1 function you need to import, I'd usually do from foo import bar (assuming that bar wasn't something like sum which would accidentally overwrite the builtin)
 
@RomanLuštrik surely you wrote something there not right, cannot "import source from doStuff" but "import doStuff from myfunction", aight?
 
10:23 AM
Alternatively, if there were lots of functions you could do something like import foo and then use foo.bar.
The second tends to keep things neater to be honest. For instance it's typical to use import numpy as np when using numpy.
As an aside, I started learning R the other day and have already found a few of your answers useful :P (so thanks for that :D)
 
@Ffisegydd You're right, it's from foo import bar.
@Ffisegydd :)
@Ffisegydd I have very specific function names (e.g. calculatePopSize), so there's little chance to clash.
 
Did I already say cbg?
 
no
cbg
 
is suffering from sleep deprivation this morning.
 
10:28 AM
martijn: go cv some linkedin support requests
 
Well then, cabbage all!
 
I was too
 
@AnttiHaapala cved, one closed now.
 
That linkedin thing is annoying...
 
10:29 AM
LinkedIn has improved their 'go ask on SO' message somewhat.
 
yeah, however it does not materialize on the quality of the questions
 
But it is more annoying that their active devs all have < 1000 points on SO.
 
user559633
@ReutSharabani you mean how they just outsourced support and took a crap on stackoverflow, without any employees on SO in sight with the rep to help moderate?
 
So they cannot do anything useful. They cannot edit. They cannot themselves VtC. They can barely comment..
 
user559633
eurgh i can't english today
 
10:30 AM
@tristan can you ever english?
can anyone?
 
user559633
with great focus and a few beers in me @MartijnPieters
 
I wonder what would happen if their devs got downvoted enough...
 
user559633
@ReutSharabani nothing. their business people don't care
 
considering how the integration thing is a biggie...
... they are shooting themselves in the foot
120
Q: Reach out to LinkedIn about outsourcing their developer support to Stack Overflow

FfisegyddLinkedIn recently closed their support and began directing their users to use Stack Overflow. This has seen an upsurge in questions within linkedin. This has been previously brought up on Meta here where it was closed as a duplicate. Unfortunately, the majority of these questions are off topic o...

 
user559633
Based on the fact that a community manager answers, I bet it's a closed room deal that makes SE money.
 
10:38 AM
Did you remember to wear your tinfoil hat while you said that?
 
user559633
i never take it off..
 
srsly, it is like they soon will change the rules :P
 
I import simuPOP as sim and from simulation_function import calculatePopSize in simulation.py. In simulation_functions.py I call functions from sim. I have solved the dependencies by import simuPOP as sim in simulation_functions.py, but that doesn't look very clean. Is there a way to tell functions from simulation_functions.py to use imports from where they are called?
 
@tristan based on the fact that linkedin cares so little for their reputation, that money must be a very small one
 
10:43 AM
cbg
How many upvotes do I have for each tag? sadly this one not working .. ? why ?
 
user559633
@AnttiHaapala yeah, i can't imagine they broke the bank on outsourcing support. i imagine it was linkedin saying "we're doing this" and throwing a bit of cash at SE to have community managers "ease the transition"
 
I disagree. I doubt Linkedin are paying at all or consulted anyone.
Maybe I'm just an optimist who hasn't been wearing his tinfoil hat enough.
 
user559633
Also a likely scenario
 
user559633
I'm just bored and procrastinating by talking crap :) (edit what is with my english today, good lord it's embarrassing)
 
11:13 AM
and gone :D
jsoup is a java html parser but beyond that it does not make any sense at all
 
11:47 AM
Re-cbg
Errr, cv box in SE app is so inconvenient
 
12:09 PM
 
user559633
What's with the rep, yeah. edit: aww, closed. i was answering
 
user559633
Oh, it's one of those "i ask a lot of beginner questions, so I get a lot of rep from other beginners that google and find my question on SO" (i.e. a f-ing time vampire)
 
This happens all the time in World of tanks. If you play long enough, you'll eventually grind to top tier. No matter the skill.
 
12:57 PM
@Ffisegydd actually I found the answer
ah tristan found too
hmhm
Read permissions:

"e" = change directory (CWD, CDUP commands)
"l" = list files (LIST, NLST, STAT, MLSD, MLST, SIZE commands)
"r" = retrieve file from the server (RETR command)

Write permissions

"a" = append data to an existing file (APPE command)
"d" = delete file or directory (DELE, RMD commands)
"f" = rename file or directory (RNFR, RNTO commands)
"m" = create directory (MKD command)
"w" = store a file to the server (STOR, STOU commands)
"M" = change mode/permission (SITE CHMOD command) New in 0.7.0
 
1:20 PM
I need some help with this https://regex101.com/r/oC1bN5/1
\u0028 and \u0029 are unicodes for opening and closing parentheses. In spite of having just 2 unicode values in the range , why does it capture all words??
Looks like Tristan is putting up a tough competition against Kevin in the Game Of Stars..
 
@Swordy must be matching 8-\
 
but how? only 2 values!!
 
nope, the unicode escapes do not work and it is matching 8-\
try ([8-\\]+)
... and you get identical results
 
i tried all 4 combinations . inserting the u flag and \\ as well as \
 
yeah does not wrok
 
1:29 PM
still matches everything.. :(
 
that site is shite ;)
 
the site?
what would the right way be? my initial approach?
 
yes
regex101 is shit
if you want to match ( and ) then just write them as is in the char class
([()]+)
 
@Jerry is it true?
 
that's a relative point of view
 
1:31 PM
@AnttiHaapala in practical I'll be matching all ascii characters.. the entire unicode range.. :(
 
and I'm busy
 
so I wouldn't use literal for now..
Lets see what SO gets me...
 
@Swordy are you using r' or ' in your code
 
yes
actually i did a "u" for the range
ignored the "r" in that case..
 
\u is not decoded in r''
python 2 or python 3???
 
1:39 PM
2.7.5
 
you are doing u"\u0028", re.U on python 2?
ah \u is decoded in ur'' too
 
yes
 
so you are safe to use ur'([\u0028\u0029]+)' on python 2
but not on python 3!
 
so should "ur" work?
I have nearly prepared the question on SO..
 
yes, ur works, need to be u'' with an unicode escape
 
1:43 PM
raw unicode string
 
@Swordy It works in Python 2 (but unicode escapes are interpreted), not in Python 3 (where u is a no-op prefix).
 
r and you can use raw unicode escapes which will be decoded
 
Erhm, my wording was bad
 
on python 3 unicode escapes are NOT decoded on raw strings, BUT regular expression engine decodes them again :D
 
do you guys mean // by unicode escapes or a / ?
 
1:44 PM
To use raw and unicode in both Python 2 and 3 (cross-compatible codebase) I use r'...' and then in Python 2 decode to unicode.
 
@MartijnPieters does it work correctly?!
 
It depends.
It works mostly, for the cases I needed it for.
Mixing string literals then concatenate also can work.
 
aha :P
gotcha, it is not equivalent...
 
Frankly, creating a cross-compatible unicode regex is a pain.
 
user559633
Amen to that
 
1:47 PM
>>> re.compile(r'\u0029'.decode('UTF-8')).match(')')
>>>
vs
>>> re.compile(r'\u0029').match(')')
<_sre.SRE_Match object; span=(0, 1), match=')'>
too bad :(
2.7.6 above and 3.4.2 below
 
:(
 
it is because in python 2 the re-engine does not support unicode escapes IN the regex whereas in python 3 it does support...
 
Is this question good enough for SO ?
 
just one more difference to the list of "all differences between python 2 and 3 that will drive you mad when writing a polyglot codebase"
 
I have typed the entire thing..
 
1:51 PM
@Swordy which one?
 
my question on unicode..
 
@Swordy about "why doesn't regex101 work"?
 
looks like it .., wait let me check with my code first
 
Lalala
 
@Swordy if it would be answered by a link to that issue, then no, it is not a good question :D
 
1:55 PM
what would the final regex look like? same thing prefixed by a "ur"?
 
@RobertGrant No lalala-ing in here! Take your hippie lifestyle and get out! This is a serious room, for serious coding (and for bashing the linkedin tag)!
 
LinkedIn? Hahahahahaha!
 
@Swordy yes
 
user559633
The Monty Python programming language sure is a serious one.
 
@Ffisegydd you forgot about php
 
user559633
1:56 PM
Just kidding! The suggestion almost made me spit up my breakfast pint all over my good work sweatpants
 
not quite cv-worthy though but...
 
I've had a few breakfast pints in my time. I remember when I was 18 we once got to the pub at 8am. Had a full breakfast and a pint of Guinness, and just kept on drinking until it closed (Gotta love the Six Nations...)
No it's not cv-worthy, but that answer looks pretty crap.
 
@AnttiHaapala yeah I would almost put that on my CV as well
 
Urgh don't mention CVs, I need to re-do mine and finish it this week. Then begin applying for jobs.
 
I guess it is only indians coding linkedin
 

« first day (1549 days earlier)      last day (3416 days later) »