skysight-inc/HackerNews huggingface dataset:
For Python 2.7 there's collections.Counter [1]:

import collections
c = collections.Counter('supercalifragilisticexpialidocius')
print c
# Counter({'i': 7, 'a': 3, 'c': 3, 'l': 3, 's': 3, 'e': 2,
# 'p': 2, 'r': 2, 'u': 2, 'd': 1, 'g': 1, 'f': 1,
# 'o': 1, 't': 1, 'x': 1})

[1] http://docs.python.org/2.7/library/collections.html#collecti...
I love curiosity sparking posts like this.

>>key in dct

is much better than

key in dct.keys()

Of course, that got me curios to find out if there is a magic method out there that takes advantage of keyword "in". Turns out __contains__ does that.

Always exciting to stumble upon new stuff in my favorite language.
Zombie doesn't use a "real" browser, but a simulated DOM Window using jsdom.
So at least in the past when I worked for TechTV new networks paid for carriage, and eventually got paid by the cable operator once they earned their stripes (usually 3 to 5 years)

I doubt this cost is really the relevant one though. More importantly its the opportunity cost. Cable operators are limited in bandwidth and the number of channels they can carry at any given time. Getting rid of Ovation free's up that network bandwidth for another, more profitable network (or more HD channels etc...)

Ovation and Current both were at a disadvantage as independent networks. Larger network groups like NBCU, Scripps (food network) Viacom (Comedy Central & MTV) have a better chance getting a smaller network off the ground because of their increased leverage.

Hopefully at some point the cable operators will move to a Switched Digital Video[1] system which would free up bandwidth and allow for these smaller networks to get traction a bit easier, but its not going to happen soon and (hopefully) streamed internet networks will really start to flourish. Maybe the Ovations and Currents of the world will move this way sooner now.

[1] http://en.wikipedia.org/wiki/Switched_video
If you don't want to compile, assuming you have CoffeeScript installed, you can just run it with coffee instead of node and everything else works like normal.
I've been interested in Haxe for some time, but I've never really felt the urge to start anew. I have released a few AS3 games using a loose common engine. It was relatively painless to port from AS3 to pure JavaScript. I think it's time to make the jump to porting it to Haxe to see if I'm ready to develop full-time in Haxe.
No argument here, good point.
The actual headline is "Time Warner Cable drops arts channel" which talks about the Ovation channel being dropped because nobody tunes in, as an aside it also mentions that Current TV was dropped after being acquired by Al Jazeera.

Now I suspect the person who submitted this thought there was some weird conspiracy about Al Jazeera and Time Warner and what not but the reality is that when a channel changes ownership previous contracts get voided, sometimes that gives folks an easy out. In this case it looks like they took that out.
I think what you're really saying, in so many words, is that research in important medical treatments, vaccines and drugs shouldn't be left in the hands of drug companies at all. Maybe all basic research should be funded by the public and made freely available to all companies that want to utilize it. Sure, companies won't be able monopolize the cure for cancer, but who thinks that's a good outcome anyway? Let them compete on price and marketing the way they already do with aspirin.
Foursquare quietly updates privacy policy
I would imagine that the Python deployment process is a few `pip install package-name` and a `hg clone ...`.

For Go, `go build -o name` creates a complete, statically linked binary, so deploying is `cp name dest/`, but I'd guess to deploy to your server you usually just do `hg clone ...` and call `go run name`.
Yeah let's get rid of regulation, then we can
live under mafia control with bad sanitation!

See Kowloon Walled City
http://en.wikipedia.org/wiki/Kowloon_Walled_City

Also: see Somalia 10 years ago
Research firm comScore Inc. a year ago estimated that Google+ users spent an average of three minutes on the site each month, versus more than 400 minutes for the average Facebook user. In the U.S., Google+ had nearly 28.7 million unique visitors through PCs in October—well below Facebook's 149 million, comScore says. Those numbers don't include mobile-device users.
It can after you install coffee-script.

$ echo 'process.stdout.write "Now with CS level #{1 + 2}!"' > foo.coffee
$ coffee foo.coffee
Now with CS level 3!
$
You aren't in jeopardy here. Trademarks aren't like patents -- you can clearly have companies with the same name as long as the use is not confusingly similar for similar products and/or services sold in the same class:

* Delta Airlines

* Delta Faucets

* Delta Delta Delta Sorority

Which one has rights to the domain delta.com? They all do. But only one has it. And the others can't sue.

Just because you have a "similar" domain name doesn't mean you are in practice infringing on a trademark. And the definition of trademark means you have to actually use the mark in commerce. If he's not using the mark in commerce, you're not violating a trademark.

In fact, you don't even need to register a trademark to have common law rights.

Don't give up so easily. Talk to a lawyer - they'll consult you for free. Just tell him to bugger off.

Read here:
"It should be noted that trademark rights generally arise out of the use of, or to maintain exclusive rights over, that sign in relation to certain products or services, assuming there are no other trademark objections."
[1] https://en.wikipedia.org/wiki/Trademark

"In fact all trademark law and rights are based on the use of your trademark, not just when you register it (if you choose to do so), but also on an ongoing basis--in fact 6 years after you get federally registered you must swear you're still using it in commerce and then 4 years after that and then every 10 years thereafter you must swear to it again (there are minor exceptions but you don't want to go there)."
[2] http://www.idearights.com/trdmrk.htm

Talk to someone who knows what they are doing and don't be such an easy push over ;) I say that in kindness.
This may get buried, but I took a stab at creating a first draft of a demo by adapting Scott Chacon's Pro Git to WBB's directory structure.

It's not working for all output formats (and images are missing and there's no stylesheet, etc) but I'm hoping to invite collaboration by just throwing it up there:

http://github.com/tspike/wbb-demo for source or http://tspike.github.com/wbb-demo for HTML

Thanks for making this tool! It's very timely for me.
That's a really interesting way of reading a programming book. I think one thing on the back of my mind w/my reading style is I want to know as much about the language at any given time so that if I wanted to spin up quick code to do something I don't have to research for it.

I also have this question in the background, if i was at an interview and I had to use this language, am I fluent enough to get around w/access to search things?

I'm going to download mind map and try your way of learning things, I may like it more. It seems to be quicker.
My favorite example is Illinois' 4th Congressional district[1]. But: there can be positive outcomes to such gerrymandering. Chicago is very strongly majority democratic. Splitting the city with straight lines would not change this. All of the congressional districts that include the city are already held by democratic incumbents.

But this funny shaped district connects the two large latino neighborhoods: predominantly Puerto Rican in the North and Mexican in the South. And as such, Luis Gutiérrez has represented the district since 1993, when the district was defined as such. He was the first Latino to be elected to the House from the midwest.

More information on the general 4th district wikipedia page[3].

1. https://upload.wikimedia.org/wikipedia/commons/a/a0/IL04_109...

2. https://en.wikipedia.org/wiki/Luis_Guti%C3%A9rrez

3. https://en.wikipedia.org/wiki/Illinois%27s_4th_congressional...
I seriously hope this is a troll post, but after reading the whole thing and seeing the location of the one signature, I'm not sure anymore.
otf compiling is pretty simple regardless.

index.js:

require('coffee-script')
module.exports = require('app.coffee')
Why not github? I am surprised to see any non-google employee actively putting new projects on sourceforge or google code. I've also seen 2-3 different people search for "thing that is open source and does XXX" on github exclusively. It is like doing a social media campaign for your business and ignoring Facebook. Serious question, not a troll.
Six states now outlaw employer snooping on Facebook
Mass assignment as a feature is completely removed from Rails 4, and a gem with the replacement (strong_parameters) is available _today_ for you to use with any 3.x application.
There's an old saying about advertising frequency:

The first time people look at any given ad, they don't even see it.
The second time, they don't notice it.
The third time, they are aware that it is there.
The fourth time, they have a fleeting sense that they've seen it somewhere before.
The fifth time, they actually read the ad.
The sixth time they thumb their nose at it.
The seventh time, they start to get a little irritated with it.
The eighth time, they start to think, "Here's that confounded ad again."
The ninth time, they start to wonder if they're missing out on something.
The tenth time, they ask their friends and neighbors if they've tried it.
The eleventh time, they wonder how the company is paying for all these ads.
The twelfth time, they start to think that it must be a good product.
The thirteenth time, they start to feel the product has value.
The fourteenth time, they start to remember wanting a product exactly like this for a long time.
The fifteenth time, they start to yearn for it because they can't afford to buy it.
The sixteenth time, they accept the fact that they will buy it sometime in the future.
The seventeenth time, they make a note to buy the product.
The eighteenth time, they curse their poverty for not allowing them to buy this terrific product.
The nineteenth time, they count their money very carefully.
The twentieth time prospects see the ad, they buy what is offering.
> Real people like an app ecosystem with their latest Angry Birds games

Since Dalvik is open-source, perhaps they could tweak a few things to make Android apps run on Ubuntu, albeit a little slower? Out of the box compatibility with existing Android apps would be a huge gain for a mobile OS that is just trying to enter the market.
Nokia N900?

apt-get install python
Goroutines are M:N green threads but they're not 1:1 native threads.
Exactly.

Seeing all that private activity with no way to capitalize on its inherent virality has driven Google away from their natural core. From a company which started out with an quirky barebones homepage, deliberately eschewing the natural monetizability of it, this new aggressive identity grab is a big cultural transformation.
I recommend looking into Cloudflare. Even the free plan can handle HN spikes.
No. I think it will have a native GUI toolkit that can adapt to both with some hints by the developer.
How is this a DOS vector? Would passing a symbol instead of a string in the parameters cause the app to crash?
Yeah can be summed as: "lets think of another way for the world to laugh at the US"
One my favorites, safe deep searching:
by returning a dict you can run another .get

var = {'a' : 'b' , 'c' : {'d' : 'f'}}

print var.get('c', {}).get('d')
print var.get('DNE', {}).get('d')
I use dictionary comprehensions personally but I have mixed feelings about the syntax. It looks too much like set comprehensions on first glance. Compare the following to see what I mean.

myset = {x for x in "This is my stuff".split()}

mydict = {x:len(x) for x in "This is my stuff".split()}
In Australia electoral boundaries set by the Electoral Commissions. Officers of those commissions are by law required to be politically neutral. For example, because I have been a member of a political party, I am ineligible to work for them.

There's a modest amount of argy-bargy every time the boundaries are redrawn, but in general seats are contiguous and have shapes that follow the population distribution.
Remember first you have to earn 10B and then spend. If you just paid taxes on 10B you will still have a lot of net gain couple of B at least. I guess haters will hate regardless.
YouTube was an optionally pseudonymous social network (with subscriptions to feeds, followers, comments, etc.) built around videos. I am not a big YouTube user but I can see people who are really into the culture of YouTube being torqued about having that culture re-engineered.
Thousands of dollars' worth? Stretching it, I'd say.

Anyway. Yes. Personal responsibility... for not being cynical enough to realize that you never should have trusted the nefarious fiends like Google to begin with when you started using their services.

No, really though: when someone like Google lulls a bunch of people into thinking that they'll be doing one thing, and then do another, that's what the layman calls "bait and switch". (Go ahead, blame the victims.)

The economist would examine the system, question whether there was any tendency toward a natural monopoly because of network effects (possible but not certain), and point out that because there are high switching costs that the market for social media and like services doesn't really meet the prerequisites for being an efficient one (low transaction costs). The result is an inefficient market causing a deadweight loss to society, at least in the short to intermediate run... still nothing to celebrate in any event.
More context: http://www.deadline.com/2013/01/al-jazeera-to-acquire-curren...

Since Time Warner Cable would not consent to the sale “Current will no longer be carried on TWC. This is unfortunate, but I am confident that Al Jazeera America will earn significant additional carriage in the months and years ahead.” Time Warner Cable says that it is “removing the service as quickly as possible.” The loss of the No. 2 cable operator will hurt: Time Warner Cable has 12.2M video subscribers and Current reaches about 59M homes. Others also could follow Time Warner Cable’s lead as they look to prune their often bloated channel lineups.
Oh my good God, your post could be the Wikipedia example for "Hindsight Bias".
Here are the reasons why I think Mark Shuttleworth is doing this:

Today, Linux is everywhere in the sense that beneath Android – runs Linux. Unfortunately, Ubuntu doesn’t figure in the equation. Tablets, phones are all locked down devices and enthusiast/hobbyist open source doesn’t figure unless drivers are available. To maintain relevance, Ubuntu needs to exist in the mobile space.

Today’s announcement is an early one, and is making the same value proposition as Android did early on, before Google’s acquisition. i.e. an open source system that any phone vendor can use to build their smartphone platforms on.

The Problems

Ubuntu has a remarkably polished desktop product for years but it has remained a fringe product and the PC market has simply stopped growing. Jobs has carefully taken Apple around MS’s hegemony on the desktop by tackling music players first, then a pincer movement through Windows Mobile dominance by producing a very expensive smartphone.

Shuttleworth faces not one but several well established and cashed up competitors – Apple, Google/Samsung, Amazon. I haven’t even mentioned Microsoft, or the Chinese Korean and Taiwanese versions of a smartphone OS. Each of them have an arsenal of patents and services that gives them degrees of freedom to move around the space. Google for example commands the email/contacts/calendar integration, YouTube, Maps and Navigation. Google’s approach is to deny competitors full functionality of these services to cripple their smartphone offerings. e.g. turn by turn in the case of iOS, YouTube search APIs in the case of Windows Phones. Apple and Amazon have offered cloud locker services for those who purchased music and books from their online stores. Microsoft has some cards left in enterprise management and server integration.

Next steps

I believe this is just an initial salvo. Promising compatibility with Android kernel level drivers is a good start. Right now there isn’t enough value proposition for Ubuntu phone in terms of apps or services. Integrating a phone and desktop are novel but it is far from a sure bet. A reference phone design might be good bet if they think it will persuade some of the smaller Chinese manufacturers to jump onboard. However, this will not please Dell. It might make a MIUI-like play, and remain a niche phone OS for several years until the opportunity is right.

What Ubuntu really needs to do now as an organisation is to make a sideways bet into iOS and Android. It needs to kick start development of its own mail app, or acquire a navigation maker like Waze, and get these loaded onto the popular phones today. There is still some geek-cred left in Ubuntu for people to load these apps on, and who knows, they might catch on in the enterprise space.
var jq = document.createElement('script');
jq.src = "http://code.jquery.com/jquery-latest.min.js;
jq.onload = function () {console.log($(".entry-content a[href*='http://www.bakadesuyo.com]).length);};
document.getElementsByTagName('head')[0].appendChild(jq);

Am I the only one who's turned off by this number? I understand that's what you're supposed to do and doing this is a nice way to get a bump on your traffic but being bombarded by the links just gives me the feeling that the entire content is there to do just that, rather than conveying any useful information.
Maybe a better example: Imagine your eazy-pass was mis-programmed. Going over the GG bridge, you get $$ credited to your account each trip rather than -$$ subtracted. So, depends on if the ez-pass was hacked by the user or just broken/mis-programmed by the EPA.
It is possible, but not straightforwardly. There isn't a code path I know of that converts param keys to symbols.

(I wouldn't have said it was possible unless I had a curl line that did it, for what it's worth.)
On learning InnoDB: A journey to the core
I sometimes get distracted by vocals, so I often find myself listening to Soma FM. Ambient type beats: http://somafm.com/

You might check out the Groove Salad, Space Station Soma, and Underground 80s stations.

They also have an iPhone app.
I don't see how instant run-off voting would change much of anything, unless perhaps you got rid of the endorsement process at the same time so that people of the same party could more easily run against each other.
Sci0028 - The Operational Strategy and Plan
Being able to kick a ball, no matter how accurate, is a feat of coordination and physical dexterity, not brains.
No; the theory behind that attack is, Rails doesn't GC symbols, so you could just repeatedly stuff requests that created new symbols until memory was exhausted. I don't care about that attack (there are others like it), but it's viable.
Symbols are interned and never garbage collected, so if you can cause an app to create arbitrary symbols, you can cause it to use up all the RAM on the machine and throw it into swap, effectively killing its ability to respond to requests in any kind of timely fashion.
Did /r/murica get word of the metric thing?
That is seriously hilarious. I wish there were some way that it could get the needed number of votes so that the white house has to respond. They could simple post a photo of the president sticking his tongue out.
Unpolished sure but I have to disagree that it sucks. I've solely used an N900 for the last 3 years now. The power of maemo for me overrules the occasional frustrations - I'm just kind of worried about what I'll do if I break it.
Stick Them With The Pointy End: Apple Files ‘Active Stylus’ Patent
The root cause of the bug here is not sql injection. Its that one of the query functions is overloaded to do different things depending on what datatype you pass to it and that the user can manipulate that datatype (for example, by passing an object in a part of a JSON message that would usully conatin a string). Of course, this is only really serious if one of the overloads gices too much power (in this vulnerability's case it would let you run an arbitrary query)
From what little of their reporting that I've watched, Al Jazeera has been of very high quality, and their "third party" point of view has been very refreshing.

Best of luck to them!
You're the expert here, but that's really disturbing. Is it fixable?
2013 Programming Podcasts for the New Year
In the case of a lot of states with one major city, the algorithm basically just splits that main city, for instance New Mexico: http://rangevoting.org/Splitline2009/nm.png – when the city is big enough to have a couple districts of its own it's not as bad, like: http://rangevoting.org/Splitline2009/mn.png

I'm kind of unimpressed. There are mechanisms to remove partisanship and political gerrymandering without making the whole thing into an algorithm.
Very simple but pretty screensaver-type page with JS / HTML canvas
I happen to agree with you that (5) is a magic bridge too far, but that's a different discussion.
I think soccer bowling has a real shot at becoming an Olympic sport! :-)
The trustee report assumes benefits will stop being paid when the trust fund runs out of money and cost will either be made to conform or services rationed appropriately. The CBO just draws a trend line on health care costs and assumes they go up forever and we'll always pay them. I think it's somewhat possible that the US will look more like the rest of the world in terms of costs as time passes. It's also very possible that we may end up paying radically more for senior care than we do now in 70 years but that's something democracies continue to decide for themselves. There's no blank check being written today about health care in 2083.
Check out http://www.nissan.com - crazy that it still doesn't have a useful home.
I did not say otherwise. I said that ORMs may be vulnerable if they are carelessly constructed.
It would be ridiculous to deny that government does solve some problems in society. My issue is with using violence to solve those problems, and I believe nonviolent solutions are just as ample and strictly more effective.
What's wrong with algorithms?
The Checklist Manifesto, recommended by multiple HN participants. I read it and learned a lot, and it's an enjoyable read besides giving you new perspectives on old problems.

http://www.amazon.com/Checklist-Manifesto-How-Things-Right/d...
For the uninitiated:

en.wikipedia.org/wiki/A_Modest_Proposal
There were all those green flashes coming from Mars then, too.

Hmmm.
I've been going through the code for ActiveRecord and now AuthLogic. I'm admittedly not well versed in Ruby.

However from the description of the vulnerability found at [1], it would appear as though the cookie value can be set to a Ruby string value that is then parsed by server to produce a Ruby Hash value (rather than the AuthLogic plugin's assumed string value).

Is the eval() of the cookie value done by Rails or is it done by AuthLogic? Is that a potential security vulnerability in itself?

[1]http://phenoelit.org/blog/archives/2012/12/21/let_me_github_...

edit: forgot the URL

edit2: nvm ... apparently it's using the Ruby Marshal API, not an eval()-type call.

http://stackoverflow.com/a/2241740
Government Plans To Expand Start-up Loans Scheme
The same guy owns http://www.digest.com -- it's nuts that he hasn't sold them.
Eric Schmidt heading on mystery mission to North Korea
Actually, TWC does use SDV in most of their markets.
FTC's 'Robocall Challenge' draws over 200 ideas to combat mobile spam