skysight-inc/HackerNews huggingface dataset:
Happened to me too, I always used 'for key in mydict: do_something(key, mydict[key])' instead of 'for key, value'

I guess python leaves so many ways to do things that you tend to settle on some style quickly even if it's not the most efficient one.

When self learning new languages I still miss an efficient way to get all the idioms. However I think that in python it's not really that important, as long as you get stuff done - your code is still going to be quite readable.
> I mean, every time you press Alt, the menu bar at the top of the screen flashes. That's a horrible, distracting misfeature encountered in the first 30 seconds of using the thing.

How else are you going to access the menu with the keyboard?
I tend to be partial towards

z = dict(x, **y)

if the keys of y are compatible with unpacking.
Ocaml replacement not .Net F#
For those of us who don't want to be tied into .Net what is the next goto language after Ocaml? Ocaml it would appear has had its community fragmented between F#, Haskell, Erlang and Scala and has been in decline since 2007.
American illusion of freedom isn't something easy to grasp for people from "less free" countries who are, for instance, able to travel freely to Cuba.

American expats who moved permanently abroad have to file their taxes with IRS forever. In any European state your last contact with the country's Revenue is for the last year you lived there (unless you still have income in this country). You don't have to file anything, ever. You're free to go.

From that standpoint, Americans are effectively property of their government.
I haven't managed to find a job yet, however that is probably due to the fact that I require a H1B visa for the USA. I have actually used the who's hiring threads to meet a lot of people though, I met some interesting entrepreneurs in 2012 via the thread.
Wow, talk about a pointless discussion. Metro is clearly not and never has been intended to replace desktop productivity work. Desktop mode isn't gone anywhere. Despite the ridiculous alarmism, Microsoft has shown absolutely zero signs of intending to get rid of or deprecate it. The worst thing you can say about Windows 8 is that Microsoft went a little overboard getting rid of the start menu, and the out-of-the-box workarounds require inelegant Metro-Desktop bridging. Damn, what a catastrophe... I'm sure Microsoft won't think up anything better for Windows 9!
> if the USA tries to emulate Europe in healthcare more than we alreay do, we will end up wasting even more money.

The evidence is that American health care costs would go down significantly, given the clear correlation across industrialized countries between the extent to which health care spending is private and the overall cost (either per capita or as a share of GDP).

> Contradiction.

It's not a contradition, the latter follows necessarily from the former. It's why nearly every industrialized country has converged on public health, public education, public health care, affordable housing, and so on.

> But providing a moral basis for individual rights requires understanding a complete philosophical system, which is out of the scope of an HN comment.

Or we can dispense with the 18th century a priori legerdemain and just recognize human rights as a self-evident basis for a fair, just and humane society.

> You're asking something that may be outside the scope of reality.

And yet the rest of the industrialized world does a much better job of it than the United States.

> As someone from a poor part of rural eastern North Carolina, all I can do is LOL at this

The plural of anecdote is not data.
Thanks! It should be up and working now.
Why smart glasses might not make you smarter.
Nitpick: these are all trademark issues, not patent issues.

Less of a nitpick: because these are trademark issues, the holders of the mark must attempt to defend them, or they are lost. While I happen to agree with the judge and feel that App Store is too generic to be upheld as a trademark (and agree with you about Apple Store, though mostly because most of the products there are made by Apple, unlike the App Store), I don't at all blame them for going after Amazon here - and I say that as an AMZN shareholder (AAPL too). It's probably in Amazon's best interest to rename simply because App Store is so firmly associated with iOS, never mind shutting up the lawyers and letting both companies focus on more important stuff.

Interestingly, the article mentions this was a suit over false advertising and copyright. I don't know if its wrong or our court system is that backwards, since that's very clearly not the actual issue at hand here. But then again, most of the Apple/Samsung battle should have been waged trademark grounds rather than patents too (analogy: knock-off handbag manufacturers are sued by the original designers under trademark laws too, which makes sense when you consider the concept of a trademark)
The Norovirus: A Study in Puked Perfection
This will probably be the first time I've upvoted one of your comments, but I have to admit that this one was right on.
How about the argument that higher sugar intake causes you to be more hungry, therefore making it easier to eat less calories on a low suger (high-fat) diet. I know it's an entirely different argument from the "keto magic" argument you are ranting against, but do you object to it?
Even if your premise is valid, do you believe the people at U.S. airports are "anti-terrorist teams"?

Dozens of articles refute the usefulness of the TSA, some referring to real anti-terrorist teams like Israeli ones (see some below, I can't find the best one).

http://www.nypost.com/p/news/opinion/opedcolumnists/forget_t...

http://www.theatlantic.com/international/archive/2012/03/on-...

Even if, like yourself, you want real security, you shouldn't like the TSA.

I'm not an U.S. citizen nor do I live there, but from the outside (plus some experiences by relatives and being shoe-searched on American Airlines) it doesn't look good at all.
A healthier attitude than the "stuck in a hole" one, I would think.
There is often substantial risk turning a research result (molecule X inhibits virus Y) into a safe medicine. You have to do significant, expensive testing. That is where the money is spent because that is where commercialization fails.
Louis Vuitton Outlet,Louis Vuitton Online Shop
The most hostile development environment in the world
TSA was present in UK at the Olympics.
Honestly I don't understand why people get all flustered over email validation, I would probably use something along the lines of this just to check that the email address is along the lines of name@domain.com, obviously this could do with a little tweaking.

The best way to validate an email address is to send an email to whatever address is supplied to you, if it is a true email address the user will receive an email and it will be validated, if not then their account or query will go unused/unanswered and that will be down to them.
See http://wiki.creativecommons.org/4.0/NonCommercial especially "NC Proposal No. 9: Create a new CC license, NC-EDU, that prohibits non-commercial uses, but allows educational uses" for further discussion of this issue.
You're very confident of your abilities. It could be that they did actually give the job to a stronger candidate.
Yes, my point was anyone else but Apple can't do it. And Apple was successful because it was the first mover in such a market. If you try to be like Apple with the 10th OS in the market, you won't succeed, unless you completely change the rules of the game again, and disrupt (not just compete with) both iOS and Android (and the others).
Mailrox – Quickly build bulletproof HTML emails
"I'm 95% of the way back there now, with Ubuntu with Unity (even got the global menu bar back - yay!), but there are still annoying niggles in my workflow.."

What you describe sounds very like the way I use dwm/dmenu (suckless tools on Linux) on a small screen. Each application has its own 'tab' (workspace in dwm), those are the private screens. Your 'public' screens sound like the dwm behaviour where you can 'merge' tabs on a temporary basis, then unmerge. There is also 'monacle' and 'floating' mode.

xfce4 can also provide 'private' screens by using the alt-F11 keyboard short cut to remove window decorations, so the program uses the whole screen (no panels or window decoration visible) but the program's menu bar still shows. Recent Firefox seems to break this, but LibreOffice works fine.

All that is on 1024 by 600. On 1920 by 1080 x2 I just use a lot of stacked windows.

Interesting.
Try to register a trademark with the name - "employify.me"

p.s. nice to see someone from azerbaijan here
I completely disagree with that and the recent events in the middle east tend to prove i'm right.
People stood up for their right and gain more freedom.
They didn't leave the country they stayed and did what they believe was the right thing to do for the country they love.

And it seems to work.

And by the way the people who already left the country and are actually living in europe did nothing because they now have a jobs, families, ... So they have way more to lose by fighting for the right of they original country than doing nothing.
It was pg who wrote (in Good Bad Attitude, H&P p. 55):

> It would be ironic if, as hackers fear, recent measures intended to protect national security and intellectual property turned out to be a missile aimed right at what makes America successful.

Short of violence, I would like to do everything possible to accelerate that realization in the minds of as many Americans as possible.

I think the best way to do that is to respond appropriately: leave, and go live/work in, support, and pay taxes to other countries instead.

Can you imagine the next Facebook or Google being started somewhere that isn't the USA? I can. Those that are paying attention are starting to realize just how bad the situation there has become.
Not only would you not have the medicine, but you wouldn't have delivery vehicles (devices, forms) either. It's because USA and Europe require such substantial testing, at various stages, to prove (1) efficacy, and (2) safety. These are not binary-outcome experiments. They are expensive (gotta pay people to take your dope and you gotta pay - and train - docs to keep an eye on them. Remember- the outcomes are not binary).

Some percentage of your population aren't going to feel well while in the trial. Is is the fault of your medicine? You better be absolutely sure. Oh wait, you can't. Can you find anybody who might be able to help you decide?

So before VCs will give you $5M, they are going to be sure that Walmart can't knock off a copy once you have the proof. That's where the money goes, and why you won't get any unless you can arrange some exclusive sales.

And, like everything else, you have to make sure that there is a paying market (meaning docs will use it and insurers will pay for it).
Yes 0.5 inches would be exactly 12.7 mm but that comes from the way the inch is now defined (which is 1 in equal to 25.4 mm) as opposed to the earlier definition (i.e. 1/12th of a foot (this definition being the older imperial definition).
machined to 12.7 mm simply means that the original imperial definition is abandoned for imperial units and although the chuck/collet/etc is still sold as 0.5 inch chuck/collet/etc; when constructing it, it was measured in the SI units of mm for precision purposes.
I was finding some of your comments in this thread inspiring, but you are completlely wrong in this one.

To change the USA politically, it's necessary to change it culturally.

Attacking the roots means attacking the ideas, not the economy.

Say the economy totally collapses, which seems to be the strategy you're advocating. Will the outcome you want come about? No; we will see more facism; the collapse will be blamed on the country not being godly enough by the conservatives, and on capitalists being too greedy by the liberals, who will insist on running even farther from economic freedom (and prosperity).

The solution is to change the ideas of the society to be more principled and pro-freedom.

I do agree with you that it's unlikely to be solved in our lifetimes, though. Changing a culture traditionally has taken generations. Now we're in the information age, so that might help, but there are too few fighting for good ideas; the vast majority of people are accepting more bad ideas, and most people who are fighting are fighting on the wrong side.
Yes. Here's a quick reason why: http://news.ycombinator.com/item?id=5001897

You don't seem to understand where the money goes.
"All the matters is: can you impose a long term deficit? Whether by paleo, keto or any other dietary method, the sole long term determinant of average body mass is net caloric balance."
Average body mass (!), not body composition etc. You need to actually read his assertion. He is completely right.
Italian Sausage and 15 Bean Soup Style Recipe
I use Maemo every day and I'd say it definitely worked out.
Prediction: The first cybermurder will be made in 2014
I spent most of my vacation hacking on Clojure including prodding yogthos into getting Luminus ready for the outside world.

I am trying, very hard, to make Clojure + Ring/Compojure work for my web development projects but it's just not more productive than Python/Flask. Not by a long shot.

For one thing, the debugging story isn't as good as Python or Common Lisp. I'm accustomed to having a trivially injected in-language unified debugger/REPL environment in Python and CL. Swank/CDT comes close but is abandoned/awkward, Ritz is on nREPL but it's unclear to what extent it's just using Java debug tooling.

Another problem is templating. I'm sufficing with Hiccup for now, but it's a far cry from ERb and Jinja templates. Doing something relatively simple like pagination is out-and-out irritating in Hiccup. Kicking up random template overrides like for headers, footers, title tags, etc are more annoying in Hiccup and Ring.

This is partly due to the fact that in order to have a parent with a bunch of children functions generating the HTML, the only way to override is to manually and explicitly kick a map of data from the handler to the template function and back to the parent being overridden.

The only indication I've seen that anybody in the Clojure world truly understands the needs of web development is Kiln.

https://github.com/straszheimjeffrey/The-Kiln

Most others I've spoken to have brushed off my concerns as trivial. Well yes, sure, from an engineering standpoint. But I still need my projects to handle the whiplash of a fickle product manager whether you think it suits your "simple" design principles or not.

I've been trying to use Clojure for my projects since '08 or '09. I was excited when MMc announced Ring and less excited when he moved to Go. I'm tired of waiting for Clojure to become practical.

I get that the Clojure community needs to have their daily 5 minutes of hate for Rails and Django, but those communities have been shipping a lot of quality websites. I even understand their distaste as I use a minimalist web framework (Flask) myself.

Shipping > aesthetics.

I'll port my current project back to Flask/Jinja/Mongo unless I have an epiphany regarding templating and managing state in Clojure.

The simplicity of Clojure's ecosystem serves only to make my own life more complicated.

I still can't get over the fact that it's a Lisp without a good native inline debugger.
Excellent Analytics Tip #101: Getting your things done right now
I've got three monitors - two at 1280x1024 and one at 1366x768 - running on my workstation and there are times I wish they were bigger or I had a fourth.

The idea of only being able to look at one application at a time - and of not having a dead-easy and intuitive way to switch between them - seems like an utterly asinine way to screw up a productive workflow for the mere sake of fashion.
neat ! does django and flask support python 3 too ?
Is it significant that the "apps" you list are either a browser or 3 Google properties that are better known as web apps, and primarily ad supported?

I would have thought games would be the more difficult step since most people seem to use their "smart"phones as fashionable gameboys and you need a complicated system of in-app-purchases for getting kids to accidentally buy $100 dollars worth of "smurfberries" with their parents credit cards to finance the production of these games.

And games has, traditionally, been something that Ubuntu and Desktop Linux hasn't had much success with.
"I really don't care what the average user wants, if the system doesn't support my usage pattern then I'm not going to use it."

We've had cheap client hardware up to now and for a few years more because the standard UI will support more complex needs. I think that as the bulk of 'casual' computer use moves to smaller portable devices, and as UIs suited to these 'casual' tasks are simplified, we might find ourselves paying extra for more capable devices.

Sad admission: I found myself using my phone to check a definition the other day while typing a complex paragraph in the wordprocessor on a laptop. It just happened.
Have people actually tried out Windows 8? On a desktop PC, once you get past the start screen it's almost identical to Windows 7.
That's a rather poor argument as you present no reason justifying when a shortened name cannot be protected by trademark law. What about these Fortune 500 companies?

Tech Data (short for technical data)
Computer Sciences
Waste Management
Genuine Parts
Health Net (short for health network)
Applied Materials
Whole Foods

... and so on? Those are all pretty generic names. Some are short for something else; others are self-descriptive. Which of those should not exist as a trademark and why?
SEEKING WORK - US based (Washington state) - Remote preferred - available part-time to full-time

Full-Stack Developer. HTML5, CSS3 and JavaScript (jQuery, jQuery mobile, JSON), and RESTful APIs built with PHP and Node.js on the server.

Specializing in responsive mobile designs that work beautifully on different screen sizes and devices, and iOS and Android apps built with Cordova/PhoneGap.

Strong design skills to build projects that are simple to use and attractive in design. Proficient using Photoshop to build the artwork needed to go in a website or app, and to listing apps on the iTunes App Store and Google Play Store.

20 years professional software development experience, 15 years freelance experience

Portfolio:
https://play.google.com/store/apps/details?id=com.imagenuity...
https://play.google.com/store/apps/details?id=com.imagenuity...
https://itunes.apple.com/us/app/scorekeepr-free/id490888743?...
https://itunes.apple.com/us/app/scorekeepr-bacon/id586533542...

Contact: twitter: @jimbergman or http://jimbergman.net/contact/
Superb Leikr Linux Smartwatch Is Now on Kickstarter
Why does the US put up with gerrymandering, which barely exists in most countries?
"Con Monti per l'Italia (dei vecchi)"
I believe the answer is "Yes, but only up to two tiles in two choices of layouts: 1/3 and 2/3 or 2/3 and 1/3"
Neither of them support Python 3 but upcoming [1] Django 1.3 will have an experimental support. Luckily you can also other than web stuff on Heroku.

[1] https://www.djangoproject.com/weblog/2012/mar/13/py3k/
http://en.wikipedia.org/wiki/Man_versus_Horse_Marathon
If you just want to track sleep, use Sleep Cycle (iPhone/Android phone app).

I personally love the FitBit ecosystem (I use the app and scale religiously, and its UX is fantastic) and stopped using Sleep Cycle in favor of the tracking via FitBit.
Luckily, perforce has a fantastic graphical merge tool, which i’ve now adapted into my post-Google Git tooling.

Anyknow know what he is referring to?

Edit: anyone know what Git tool he is referring to?
Rails Security Digest. ELI5
> It is probably acceptable in most cases to just use a trivial regex to match the most likely 99.9% of addresses.

The more trivial the better (something like .[star]@.[star] ([star] == *, HN formatting bites sometimes)); people going too clever with validating e-mails (like if there was a good reason for doing that) end up rejecting + sign in the address as invalid, which is incredibly annoying for GMail users.
> Say the economy totally collapses, which seems to be the strategy you're advocating. Will the outcome you want come about? No; we will see more facism; the collapse will be blamed on the country not being godly enough by the conservatives, and on capitalists being too greedy by the liberals, who will insist on running even farther from economic freedom (and prosperity).

You say "we", as if in that scenario you'd still be there.

I see no other practical method of getting the US government off the fiber backbones and out of the closets of carriers short of undermining the country's competitive advantage in the world economy, and even that will take dozens of years.

The USA PATRIOT Act was 10 years old in October of 2011. The 1st, 2nd, 4th, and 5th amendments are dead and buried, and the only response to new laws further abridging those rights we used to have under them is "lol" (e.g. The Daily Show, Colbert Report).

It's delusional to think that it's going to somehow get better when doing so would require large popular support from people who really don't give a fuck about anything and can't be effectively reached en masse save via military-industrial-complex controlled mass media channels that dissenting opinions aren't given access to (e.g. the most recent series of presidential debates).
5 Beautiful Email Landing Pages
Elite Kickstarter successfully raises £1.2m with 36 hours to go
Regarding the presentation part of this, even if you don't use it for exchanging data, serializing JSON to YAML can output a nicely readable and terse structure. The example JSON ends up looking like this: http://pastebin.com/gw6SGz4U
It's not that the phone is incapable of scroll, it's that the phone is guaranteed to freeze up and not render the site properly on that page. But, even if the phone could handle the computation necessary to display the site, the author probably did not design a version that is easy to use on tiny screens.
I think you mean Django 1.5, Django 1.3 came out a couple of years ago.
Good catch, I'm glad that it's a best practice. I wasn't trying to shame those projects, I'm not a rubiest so I was just trying to figure out how someone might gain access to a secret token.
Nobody Goes to Facebook Anymore (January 2012)
The font they are using is called "Ubuntu" ("Ubuntu Light", to be exact, I think), which is fairly distinct from Apple's choice of Helvetica, even in the limited area of clock digits

You can type in some example times here to see:

http://font.ubuntu.com/
If you are going to use IMAP, why would you use gmail at all?

Gmail's main selling point is the excellent web-interface, not the way the mail-store works well with IMAP.
It depends on whether you are using the straight line or declining balance method. In this particular context, the 15-20% rule of thumb for cars does refer to declining balance, which does reflect the market value of cars more closely.

If it were straight line though, you could just have a predetermined residual value for a specific useful life of the asset, and then depreciate the percentage of the difference from the original value and the residual value each year. You can also easily have depreciation where the residual value is less than the fair market value at the end of the asset's useful life or stated period though. You can never perfectly predict the residual value after all, but that's what capital recovery, or gain on disposal are used to describe.
With an effective maximum URL length of 2000 characters, you'd be stuck with a regex limit of around 1300 characters once you take into account the overhead of base64 encoding.
Yes.
http://www.ncbi.nlm.nih.gov/pubmed/17413101
http://www.ncbi.nlm.nih.gov/pubmed/1989409
http://www.ncbi.nlm.nih.gov/pubmed/1734671
http://www.ncbi.nlm.nih.gov/pubmed/8968851

Also: http://ajcn.nutrition.org/content/79/5/899S.long
Can't see how it's different from:

(in a manager)

def find_by_foo(self, arg):
return self.filter(foo=arg)[:1]