HNHacker News
TopNewBestAskShowJobs

Russell91

850 karma · joined December 19, 2013

submissionscomments
Russell91··on Show HN: Pythonpy – the swiss army knife of the command line
Yea, IMO the best way to do this with pythonpy is:

  py -l 'len(l)'
That being said, I still use wc -l every time. In fact, I always prefer regular unix commands (e.g. grep, xargs, head) to pythonpy when possible. But there are some things, such as:

  py -l 'l[::2]'
which while possible with tools like sed, are just much better expressed with pythonpy.
Russell91··on Show HN: Pythonpy – the swiss army knife of the command line
Hmm, I just added this example yesterday, and it seems to be highly contested, so I'll exchange it for something less controversial. That being said, if you're concerned about spaces, the best way to do this is either using shutil.move, or by generating output like mv 'file name' 'file name.txt' to pipe into sh. Of course, since you need to wrap your commands with single quotes to avoid bash quirks, it may seem difficult to use single quotes in a pythonpy expression. Fear not though - just use sharp quotes (`), which pythonpy will swap out for single quotes:

  ls | py -x '"mv `%s` `%s`" % (x,x)' | sh
Russell91··on Project Euler is offline
http://projecteuler.co wayback machine.
Russell91··on Netflix responds to Verizon
Netflix lands more squarely on the customer's side on this topic. They have everything to gain from PR coverage and Verizon everything to lose. Seems like a bad move to me that Verizon decided to boost the awareness of this issue in the first place. Perhaps that wasn't the intention, but it was the effect.
Russell91··on Mac OS X Yosemite Under the Magnifying Glass
I was looking forward to seeing some feature changes, but I could care less about anything this post raved/complained about. Prepare yourself for some serious bike shedding though.
Russell91··on We don't eat swans
The problem is that ppl like you and me can't downvote. Voting systems without downvotes take the expectation of the half-rectified utility across the readership, not the regular utility. So ridiculous articles like this one can survive in spite of having negative true utility. Also, more sensational articles are naturally at an advantage (expectation scales linearly with standard deviation on half-rectified functions). Just one way of thinking about it.
Russell91··on Enough Machine Learning to Make Hacker News Readable Again [video]
Genetic algorithms are not really an off-the-shelf black box that you can just plug your data into and get results. They take a domain expert to use efficiently, and even then they aren't guaranteed to perform that well. The area that I've encountered where they are most effective is in approximation heuristics for NP-hard problems where you slowly assemble a solution from smaller pieces.
Russell91··on Programming and thinking the functional way
Not sure how you find this as O(n^2). It's clearly the divide and conquer version with O(n lg n) expected time. The only asymptotic complexity issue of the algorithm is that it doesn't randomly pick p, so it will get O(n^2) perf on an already sorted list. It would be expected that you randomly shuffle a list before using this quicksort alg. When the author says this is not the true quicksort, he's referring to the fact that it needs O(n) auxiliary memory, because it's not swapping values in place (the real cost here is worse caching performance). It's definitely not an O(n^2) algorithm though.
Russell91··on Home Demo at Google VC's (Kevin Rose) House on Potrero Hill
Articles like these are the reason I'd really like to see a downvote button :(
Russell91··on Do physicists really believe in true randomness?
Haha, well the instances of Bell's experiment that I've seen so far all refer to entanglement. It's pretty easy to think about some unknown quantity having a probability distribution on its states. If you have an electron, and you don't know the spin yet, you say that it can be either up or down. What's special about entanglement between 2 particles is that it says the distributions on the two are not independent. In the classic example, one can only be spin up if the other is spin down - so they have a statistical dependence on each other. Bell's experiment tells us that the strength of this statistical dependence depends on how you measure the particles, which isn't determined until measurement time, when the particles are far away. But that being said, you could imaging all other sorts of spooky action at a distance - like 2 particles that have never been local to one another having some sort of statistical dependence. But that would be really hard to show until you found what type of nonlocal statistical dependence to look for, so usually when we're trying to figure out a good model we end up thinking about entanglement.
Russell91··on Do physicists really believe in true randomness?
This article completely misses the point. You can never disprove hidden variable theories in a stochastic system, because hidden variable theories make the exact same predictions as 'true random' theories - the difference is only philosophical. What you can disprove are local hidden variable theories, which were somewhat popular (and favored by Einstein, for example) prior to Bell's thought experiment being empirically supported. See what Einstein wanted was for all of quantum mechanic's weird results to be explainable by local interactions that took place when two particles interact - so that when they become entangled and subsequently drift apart, you don't have to have any "spooky action at a distance" to explain the results of experiments you do on them separately. However, what Bell's experiment shows is that the dice don't get rolled until one of the particles is measured - and that the way in which a measurement is performed on one particle affects its correlation with the other. So in fact you do need instantaneous nonlocal interaction to explain the real world. The result, unfortunately, has nothing to do with 'hidden variables' vs. 'true randomness'. What it does say though, is that you can't just explain away the weirdness of quantum mechanics as the result of some yet-to-be-found local hidden variables.
Russell91··on What You Can't Say (2004)
The true genius of this essay is that it gives to the reader a sense that every controversial idea they believe is indeed correct.
Russell91··on 1/9998 = 0.0001 0002 0004 0008 0016 0032 0064 0128 0256..
Using the sympygamma link also provided today, we can see why this is: http://www.sympygamma.com/input/?i=series%281%2Fx%2C+x%2C+10...

Look at the equation and then plug in (-2) for x

Russell91··on Ask HN: Summer data science internships for undergraduates?
Data science is a tough area to get an internship in. Most companies want their data scientists to know more about data than they do. That being said, if you find a company whose core product involves data analysis, and get an internship there, there is a good chance you'll be happy. One place I found to be a really good source for these types of companies is the list here: http://www.quora.com/Machine-Learning/What-startups-are-hiri... That being said, you may be better off claiming you have a strength in coding and an interest in data science, rather than the other way around. Oh, and in case this is your first time applying for tech internships, don't forget to plant a BUNCH of seeds.
← PreviousPage 3 of 3