skysight-inc/HackerNews huggingface dataset:
This comparison isn't so great because of the following:

for product_id in unique_products:
product_items = [x for x in dataset_python if x[0]==product_id ]

This is O(unique_products * observations), and it looks like O(unique_products) = O(observations). Thus we have a quadratic scan when a linear one would suffice. You'll get the best performance using whichever solution lets you code this to linear the fastest. E.g. pure python, make a dict from product_id to observations and iterate over that, or for pandas, use groupby.
I use iCloud Keychain on macOS and iOS. Both operating systems include a rudimentary interface for managing passwords, and automatically store passwords entered in Safari. Keychain Access on macOS also allows to create secure notes on iCloud Keychain.
The problem is that they evolve, and eventually they will lose whatever data we encode into them because it costs resources for them to generate and reproduce it. A random mutation that erases our data would be a slight gain in efficiency.
> an opportunity to enter the fray.

I'm a fairly large guy, and prone to have jumped in the middle of this. I can only imagine how difficult it would have been to navigate the cramped seats and isles, where surely everyone was gawking and rubbernecking, just to get to the galley, where 2 small people have a hard time standing side-by-side, and help in the fight. Two people tussling in that space is about all it's going to allow, and the troublemaker was clearly on something I ain't on, to take a beating with a wine bottle, and keep fighting. There's just no good answer here, except for the pilot to ask, over the intercom, if there's a Jackie Chan on board.
> I tend to get depressed ("cabin fever") if I'm alone all day every day

I think we found your problem
> and I also imagine that many people know someone that could have had a mental breakdown like this and done something like this.

This kind of dramatic event is very rare. You could focus some attention on early intervention services that work with people experiencing first episode of psychosis. Ideally those services would be all age, but pragmatically I guess 14 to 35 would cover most people.

About 1% to 2% of the population has a psychotic illness. I think that prevalence, with the rarity of events like this is reassuring.

You're far more likely to come to harm on a plane from a drunk or drugged person, or from someone dropping their bag on your head as they get something from the overhead locker.

And this risk from drunk / drugged people shows perhaps another thing to target: phobias are very treatable. People don't know this, and can't afford the treatment, so they self-medicate with alcohol and meds and drugs.
Understanding UK's 2017 Early Elections, the Promises Made and the Real Issues
They teach that in CPR training for the exact reason. Otherwise people just rubberneck to watch someone die.

In this case the flight attendant should have said "You in seat 1A perform the eye gauge"

Edit: s/stewardess/flight attendant

Is stewardess "politically incorrect?"
Accessibility is fascinating
There are redundant systems (IIRC 3 or more) that keep the exit doors locked when the plane is at altitude. When the plane isn't very high, opening the door is less of a big deal.
It absolutely DOES happen for C-level execs - I've been at a company where it happened and the (IMO extreme) payout was revealed in the S-1 filing when the company IPOed. It's yet another example where the rules at the top are created specifically to benefit them at the expense of everyone else.
I was wondering if we should not code a Python renderer for one JS framework and be done with it.

We already have one JS engine in Python (https://github.com/kovidgoyal/dukpy). We even have pluggable renderers (https://pypi.python.org/pypi/PyExecJS). Later we will have webassembly renderers in Python, so you will be able to take frontend frameworks, compile them and execute them in Python.

Finally, we have some fantastic framework that are powerful, yet not that big, such as Vue.js, that already have a pluggable architecture for rendering without a DOM on the server side (https://ssr.vuejs.org/en/basic.html)

The Python community has done much more complicated projects already, and half the work is there, so my guess the reason it hasn't happened yet is we REALLY hate js and most of us just touch it to get the job done and go to the next task.

It's a bit like the async situation. We have the tools, but there is no Django of the asyncio because we love our tools as their are so much. I'm so guilty of this.

The problem is: the rest of the Web is moving ahead, and while it's still relevant to do DRF + Vue.JS right now, one day stuff like meteorjs will be so crazy yet stable it will be hard to compete.

I was hopping webassembly would let us eventually run Python on the client side. But I doubt it will happen. However, I'm thinking more and more than it will allow JS tooling to be plugged in many other languages on the server side.
Y40 jump: Guillaume Néry explores the deepest pool in the world [video]
I personally am not in a risk group of people who are stalked on social media. Judging by your reaction here I assume this is the same for you.

I always try to let the people who do have to deal with harassment and stalking speak on these kind of new features and try to learn from them. It's horrible what they have to deal with on a daily basis.
Templates cause bugs. The solitary appropriate solution is an unparser – a component that walks an AST and serializes it.

Making sure the result conforms to the grammar of the output language without any unparser would always involve a parser.

> As soon as I'm looking at more than one programming or markup language in the same file, I'm looking at spaghetti code.

Iain Dooley, December 2011

http://www.workingsoftware.com.au/page/Your_templating_engin...
>This is the BBC 3 part of the site rather than BBC News, so it's meant for a younger audience.

Maybe, but I still don't understand why the younger should be fed with crappy "dramatization".

And younger as they might be they should know how a bottle of wine is made and need not an illustration of it (that continues making little sense).
Indeed, unless the traffic/file is explicitly labeled as encrypted (protocol, file header etc.) I think there's no way to tell if a particular piece of data is encrypted or not.

More generally, the incredible stupidity in those calls for encryption bans is that the "bad guys" will abide to the law. There's a dark market for botnets etc., so why not for custom stealth encryption tools? I wouldn't be surprised if it already exists.
Google had to embrace OEM bloatware to get Android into the market and has been, so far without success, trying to stuff the evil OEM product management "we have to be distinctive" genie back into the bottle ever since.

Google is going to have to save Android Things from the same fate or we'll have billions of unpatched IoT devices.

Without diagnosing Android One, Nexus, Android Silver, etc. and why they all failed - not to mention Cyanogen - why do two guys with a Linux distro think they will succeed?
>But it would take a severe communications breakdown for that to get to the point where a weekly performance review was needed. Normally, you'd talk about how this all works before the person is even hired.

Frankly, I'm not surprised. Often these expectations are not explicitly set. And often (probably more often than not), managers will let it get to the point of "exploding" and suddenly you find yourself in such a meeting. Many managers are uncomfortable with these conversations. They are often feeling defensive going in, and to counter that they will wait until they have enough "data" to have the conversation. But by that point, the damage is done.

Severe communications breakdown? Perhaps. Rare? Not at all.
Taking threads like this even deeper into nationalistic-political-religious flamewar territory does no good. Please don't post like this on Hacker News, it's not the kind of discussion we're here for.

https://news.ycombinator.com/newsguidelines.html
It works perfectly with Wine as well.
As someone on a PIP who is quite sure the problem is on my side, not the company's, I wish there were mentors that a software engineer could hire to help you figure out how to debug problems with his/her job performance.
I live and run a small business in North Idaho. This law was something I have been a bit concerned about. I am not employed by anyone other than myself but I am often contracted by companies to do odd jobs (repair/upgrade machines, solve small issues, work on projects, etc). There have been quite a few NDAs involved in the past which has always concerned me since there is an overlap in what I do and what they do...but now the question is do I as a contractor need to watch for this? Could a non compete slipped into a contract (in cases of tech overlap) cause me issues in my own company? How liable am I as a contractor? Or is this only in cases of employment?

I suppose this is one of those laws I really need to look into. NDA is one thing...but being sued for doing what I already did as a company...or contracting to another company (competitor with differing tech for instance) would put me out of business.

There is a group of people who are putting a lot of work into driving the startup scene to my area (Coeur d'Alene/Spokane) but I feel this may hinder the companies...although...it might be beneficial for the people who are actually folding the cash at the end of the day.

Any insight from those more experienced would be helpful.

edit: Not that it should matter. But my bread and butter comes from remote open source/openhardware projects. The locals are the only ones who have ever required an NDA.
Agreed. I am learning something called "crucial conversations" right now. These are conversations where opinions vary, stakes are high, and emotions run strong. People have an aversion to having these conversations. It usually ends in silence or violence.

The book I am drawing this from claims that handling it is a skill that is teachable and learnable. I have been trying to apply what little I have learned so far and it had been working way better than what I have been using.
The article specifically focuses on using BTC for settlement - essentially, Joe Consumer wouldn't be using on-network transactions to buy coffee. He'd use an off-network transaction at a wallet provider, his wallet provider would tell the merchant's provider, at the end of an agreed time period (daily, usually in banking today) the two providers "settle" whatever net balance differential lies between them.

If this makes you start asking questions like "wait, aren't 'wallet providers' here just unregulated banks? How is this better?", remember the Cryptocurrency Creed: "From each according to his gullibility, to each according to his greed."
Wouldn't anyone with access to my two factor authenticated Google/gmail account be able to reset most of my passwords anyway? The biggest risk is perhaps a rogue Chrome extensions scraping the password page when I visit it.
Meet the teenage thought leaders marketing Gen Z to the masses
I used pwclip [1] for several years but I no longer believe that hash-based password managers are the best plan. Now I'm using Seal [2], which is like pass but doesn't depend on gpg.

[1] https://github.com/davidlazar/pwclip

[2] https://github.com/davidlazar/seal
Good research, thanks for sharing.
Kauffman has interesting content.
This will never become a thing. If my phone heats up and dies after twenty minutes because the news site I'm reading is crunching numbers on my phone's GPU, I am (and most other folks on HN are) going to be VERY salty. Compute time on user machines isn't free, and users will notice.

On top of that, display advertising pays when the user sees the ad. Coin mining only pays when the user has completed enough useful work to send results back to the server. The odds of that happening for a huge number of websites are very low.
Personal insults like this don't belong on HN. If you have a point to make, it needs to be made civilly and substantively.

https://news.ycombinator.com/newsguidelines.html
I memorize my passwords and reuse them to a large extent. Strength of the password is actually a lot less important than the website's security and the value of the account.

* relatively weak/old passwords for sites I don't care about and would lose nothing if they were compromised (vast majority)

* a couple relatively strong passwords for the 5-6 sites I don't want compromised, but wouldn't have huge consequences and could be email recoverable.

* unique strong passwords for a couple vital services such as email account.

The re-use depends somewhat on how much I trust the site's security. Also I cycle occasionally by introducing new passwords at the "top" and moving those passwords "down" to less important sites.
For numerically heavy software it's fairly recent.

That said I cross compile a 15k LoC numerically heavy app with ICC 2017 and Clang 5 (also MSVC which is not really in the running) and clang handily beats ICC.

Most of the win from clang seems to come from small vector and small string optimizations along with better inlining and whole program optimization.

ICC has better vectorization, but it's a smaller part of the performance than it might seem. Moreover, if a core loop is banking on vectorization, you should probably code it in intrinsics at that point to make sure it's always correctly optimized
How valuable would that experience really be? "Hired some friends and had a good time playing pretend-company until we ran out of daddy-money" is a likely outcome and that sounds way to much like the kind of college years that is spent completely ignoring all education opportunities before eventually dropping out.

When the company turns out to be viable the person would not be looking for a job. But when it falls despite all the free runway the experience is likely much lesser than that of someone who failed by a tiny main bootstrapping or convincing real investors.
Additionally, how many programmers do you know who write code as efficiently as possible? Or even know how to write "Efficient Code"?
It doesn't always work in my experience. The guy who signs off on vacations might be different than the guy managing day-to-day work.

There might not be a clear vacation policy (as much as you like etc).

Ask HR? I've worked at companies with 100 people who had no dedicated HR staff...
That may (or may not) be true. But in my experience, at least some percentage of people bound by non-competes elect to just be on the beach rather than going the legal route. Some companies have a reputation for consistently litigating these.

In addition, even if the employee/ex-employee is willing to risk it, lots of potential new employers aren't. I worked for a small firm for a number of years and we wouldn't even entertain having discussions with someone if they were bound by any remotely relevant non-compete.
They have (fr08 completely blew my mind when I ran it at the time), but this isn't one of them.

Far cooler from the same competition alone is fr-minus-019
(a 64k intro) https://demozoo.org/productions/173267/
Using twitter for 6 months trained me to screenshot text instead of pasting it. Ugh. What a shitty product.
I think @rustyshelf has removed the most salty posts, but the bulk of the story is still somewhere in their blog:

https://blog.shiftyjelly.com
Jet engines can "eat" a lot of stuff before failing, and exploding, like in the movies. They're 3,000 degree incinerators with giant 30,000 RPM food processors in front and back. I'd be more worried about the slide wrapping over the wing, and fouling the control surfaces. Surely plane engineers have thought through this scenario though, and have some mitigation strategies in the design?
Yeah. I actually used to use Dashlane, which has some really crazy cool features like auto-password-changer or something like that.

I switched to 1Password because the quality of support for Dashlane just kept getting lower and lower, and 1Password started getting some really nice features.

Some day I might switch over to `pass` as it's free.
Determine long running progress status in JavaScript
Wee! Pointless optimization Saturday!

Looks like my gen_stats_eesmith is even faster. Radim's is about 400x faster, iClaudiusX is 450x faster, and eesmith is 580x faster.

Under pypy2-v5.8.0 those are 65x, 16x, and 91x, respectively. The original algorithm is 10x faster under pypy.

def gen_stats_python(dataset_python):
start = time.time()
product_stats = []
unique_products = set([x[0] for x in dataset_python])
for product_id in unique_products:
product_items = [x for x in dataset_python if x[0]==product_id ]
num_orders = len(product_items)
total_quantity = 0
total_price = 0
for row in product_items:
total_quantity += row[2]
total_price += row[3]
avg_price = float(total_price/num_orders)
product_stats.append([int(product_id),int(num_orders),int(total_quantity),round(avg_price,2)])
end = time.time()
working_time = end-start
return product_stats,working_time

def gen_stats_radim(dataset_python):
start = time.time()
aggr = {}
for product_id, product_order_num, quantity, price in dataset_python:
item = aggr.get(product_id, [0, []])
item[0] += quantity
item[1].append(price)
aggr[product_id] = item
return [
[int(product_id), len(prices), int(quantity), round(float(sum(prices)) / len(prices), 2)]
for product_id, (quantity, prices) in aggr.items()
], time.time()-start

def gen_stats_iclaudiusx(data):
start = time.time()
stats = []
data.sort(key=itemgetter(0))
for p_id, p_items in itertools.groupby(data, key=itemgetter(0)):
num_orders, _, total_quantity, total_price = map(sum, zip(*p_items))
p_id, num_orders, total_quantity = map(int, [p_id, num_orders/p_id, total_quantity])
stats.append([p_id, num_orders, total_quantity, round(float(total_price/num_orders),2)])
end = time.time()
working_time = end-start
return stats, working_time

def gen_stats_eesmith(dataset_python):
start = time.time()
product_stats = []
total_num_orders = defaultdict(int)
total_quantity_by_product_id = defaultdict(int)
total_price_by_product_id = defaultdict(float)

for product_id, order_id, quantity, price in dataset_python:
total_num_orders[product_id] += 1
total_quantity_by_product_id[product_id] += quantity
total_price_by_product_id[product_id] += price

for product_id in total_price_by_product_id:
num_orders = total_num_orders[product_id]
total_quantity = total_quantity_by_product_id[product_id]
total_price = total_price_by_product_id[product_id]

avg_price = float(total_price)/num_orders
product_stats.append([int(product_id),int(num_orders),int(total_quantity),round(avg_price,2)])
end = time.time()
working_time = end-start
return product_stats,working_time

reference_result = reference_dt = None
gen_stats_functions = (gen_stats_python, gen_stats_radim,
gen_stats_iclaudiusx, gen_stats_eesmith)
for gen_stats_function in gen_stats_functions:
result, dt = gen_stats_function(dataset_python)
if reference_result is None:
reference_result = result
reference_dt = dt
assert result == reference_result, (gen_stats_function.__name__,
result[:2], reference_result[:2])
print(gen_stats_function.__name__, dt, reference_dt/dt)
Or less charitably... they die...
Not following the demo scene, and not being current on the capabilities of graphics cards these days, I have no idea if this is impressive. Wish it came with some explanation.
Using NgRx 4 to Manage State in Angular Applications
OP also asked what people are using. They're not mutually exclusive statements.

I use 1Password and I don't pay a subscription. I pay them outright, per platform, and call it a day until they give me a reason to do something else. I've also set up other recently in similar patterns. If OP's only issue is the subscription, they may now be aware that there are non-subscription options.
Nice job Anirudh! You and the team did some awesome work!
It increases employers' leverage over their employees. That isn't bad for employers.

Even employers who are restricted from hiring will benefit in the form of lower wages and a more pliable workforce.
Yeah, Henry George was awesome :)

For those interested: http://en.wikipedia.org/wiki/Georgism
>I'd really hate to see how the author of the piece would have reacted to the Russian Managers at the company I'm with at the moment, as the managers certainly don't sugar coat when they're unhappy; it's not abusive, it's just very to the point.

I don't know - he may actually prefer it?

I had a manager who would be polite, indirect, etc when he wanted to criticize me. As a result, he did a really poor job at it and because he felt defensive he felt he had to strategize the whole thing, and it was a waste of company time. I cannot correct his misconceptions because he was so indirect that it wasn't clear what his concerns were, etc.

My other boss: He occasionally has a tantrum and throws F-bombs - borderline shouting. Very scary in the beginning, but overall better. The direct feedback loop works well. And when he's wrong, even if he won't admit it, it is less stressful for me. It's easier when you know someone is wrong than when you don't even know what the person is thinking.

Anyway, to the larger point - a company should invest in coming up with an appropriate methodology for having these conversations. Managers should follow it ("stick to the script"), and employees should be aware of it as well. That way, at least there's no side conversation on how appropriate the feedback was.
Yep. This is sage advice, I think even for in-office workers. Visibility and clear communication to your managers is critical to success.
Re:Bluetooth
I use AirDroid for this.
It works as a vnc client not as a Bluetooth keyboard.
I'm confused — what's the difference of `pass` and `gopass`?
What specifically makes you believe that wealth can only be attained through inequality? My gut suspicion of wealth in inequal systems is that it was transferred rather than created.
I think they ask your google password once again, when you try to access that functionality, even if you already logged in.
My advice would be: Add a simple landing page on a matching domain which contains opening hours, address phone number and the logo. And add an entry to google maps, (bing?) and apple maps.
This of course ignores the problem of energy and entropy. Computation takes energy and generates entropy. An infinity long computation would require infinite energy and would generate an infinite amount of entropy.

Interesting concept, though.
Neither I nor the quote said that China has to reach the same state as Hong Kong. Nor did I or the quote say that Hong Kong's state was better than China's.

Now maybe it is Liu Xiaobo's belief that China should be like Hong Kong, but that is not necessarily implied by the quote.

Do you also believe that "brain in a jar" thought experiments imply that someone wants to cut your brain out and put it in a jar?
Way to millions (my journey to retirement)
I use it but as others have mentioned it seems the browser extensions are getting slower and buggier
Thank you for giving your perspective on this, I for one appreciate it.

I also don't see how you've violated the guidelines (which btw. are called "guidelines" and not "rules", but that's another issue). Where you mentioned politics, you were merely stating facts or personal experience.
I use a Mooltipass Mini https://www.themooltipass.com
What is “modern” programming?
The notion that children are not developing many new brain functions as late as 10, so behaviors that show up then are probably cultural?

That is not a non sequitur.
Noncompetes are named accurately. They make an area much less competitive.

Idaho has only one meaningful tech company, and it's mentioned multiple times in the article. Analysts say its overpriced and due for a fall. It's a company that hasn't had much real innovation for a long time. Not surprising given that it is headquartered in a anti-innovation state that no highly qualified engineer in his right mind would move to due to the toxic legal environment for technologists.