2,127 karma · joined March 18, 2015
I'm sorry, but as a big fan of The Office, I'm really offended :)
How about not collecting so much data? I really don't see how my social data benefits anyone except Facebook and advertisers.
I didn't know that too. It's pretty cool. Seems like they overload __truediv__ operator: https://github.com/python/cpython/blob/master/Lib/pathlib.py...
If you have a large number of harassment incidents, it's completely relevant to question if there is a culture problem in the company (a problem which was denied outright by the parent commenter), and IMO this is what HN seems to be doing. Especially when you have accounts of Uber having a "frat" culture trickling down from the CEO and some senior executives condoning (this is probably too strong a word) such behavior.
My point is Uber isn't being treated unfairly by any means.
As for pricing, I definitely agree SpaceX has the edge especially with their reusable rockets. But one can still hope ISRO catches up :)
What part of this is comparing India to India?
I don't get this. How can you "experiment" with price calculations?
s = 'abcd'
prefix = ''
permutation(prefix, s)
def permutation(prefix, s):
n = len(s)
if n == 0:
print(prefix)
else:
for i in range(n):
permutation(prefix + s[i], s[:i] + s[i+1:]) def grep(pattern):
print "Looking for %s" % pattern
while True:
line = (yield)
if pattern in line:
print line,
You initialize the coroutine with g = grep("python"). Isn't this step same as having a partial function with it's `pattern` argument with value "python"? def grep(pattern, line):
if pattern in line:
print line,
And then: g = partial(grep, pattern="python")
g(line='python in a line')
I'm sure this is a very simple example of coroutines, but if this is all I want to do (setting aside async vs sync for a moment), why would I use a coroutine here instead of a partial function?EDIT: As I see more examples of coroutines especially the pipelining use cases, I was wrong and agree that it's completely different from partial functions.