skysight-inc/HackerNews huggingface dataset:
itertools.groupby() groups subsequences by equality of some common value.

By default, this is the object itself:

>>> import itertools
>>> for key, subseq in itertools.groupby("AAAbbCcc"):
... print(key, "->", list(subseq))
...
A -> ['A', 'A', 'A']
b -> ['b', 'b']
C -> ['C']
c -> ['c', 'c']

You can specify how to get an alternative key, like folding everything to lowercase (assuming that makes sense for the target language):

>>> for key, subseq in itertools.groupby("AAAbbCcc", key=str.lower):
... print(key, "->", list(subseq))
...
a -> ['A', 'A', 'A']
b -> ['b', 'b']
c -> ['C', 'c', 'c']

The "key" here is a function which is applied to each subsequent element. You can see that "C" and "c" are now treated equivalently. This is because str.lower("C") == str.lower("c").

The first code create a new callable object, call "Monotonic", which keeps track of the previous value, and uses that for the comparison.

Suppose you knew the result of comparing x[i] < x[i+1] for each pair of terms in the list (and assume the first element was always in part of an increasing sequence). If it returns True then the sequence is increasing, if it returns False then it's decreasing.

Then you could use that magic function to group by successive True or successive False values:

for is_ascending, subseq in itertools.groupby("AAAbbCcc", key=monotonic_key):
...

What a Monotonic instance does is keep track of the previous element, so it the next time it's called it can compute the "<" test, and return the monotonic key, used to group the subsequence by that key.

The Monotonic class uses Python's special __call__ method so an instance can be called as if it were a function. This allows the function-like object to track state over time.

Here's what it looks like when called with successive elements of the example sequence:

>>> m = Monotonic()
>>> [m(i) for i in [1, 2, 3, 2, 1, 4, 5, 6, 7]]
[False, False, False, True, True, False, False, False, False]

When used as the magic key function to groupby, the [1, 2, 3] (all False), the [2, 1] (all True), and the [4, 5, 6, 7] (all False) group together.

Note: This implementation has to special-case the first sequence element. In this case it assumes the previous element is -math.inf, which is the smallest possible value that a Python float may have.

As it happens, this assumes the first element is always part of a monotonically increasing subsequence. This is an invalid assumption, as it could be part of a monotonically decreasing subsequence, like [3, 2, 1].

>>> m = Monotonic()
>>> [m(i) for i in [3, 2, 1]]
[False, True, True]

A correct implementation should return [True, True, True].
With Wireguard, the listening port does change each time you connect.
Ask HN: Science Behind Categorization?
How would one look into the study of categorization in terms of divvying up data with different classifications and deciding the best way to go about that?
I was in Madrid a few years ago— it was just for a weekend conference, but my flight was 12h delayed leaving, so I ended up getting a pretty long unplanned walk around the city.

I felt very safe there, though I think the biggest thing was how insanely courteous the motorists were. Compared to North America where even when the signal is on your side you have to watch for a gap in turning cars and dart across the street, in Madrid I would just be walking up to a crosswalk and cars would already be voluntarily coming to a complete stop to wait for me to begin and then fully finish crossing. Night and day difference.
Having always been a fan of "Weird Al" Yankovic, I briefly owned https://weird.al
My daughter’s private school invests quite a bit of effort in teaching critical thinking and source criticism. It’s a little odd that their generation already seems thoroughly cynical as it is, then again they were raised with the internet. They don’t believe anything. They think the world is corrupt. Example: Young women it seems were more “red pilled” by the Epstein fiasco than most adults (perhaps because they identify more with the victims).

This gives me hope. The boomers’ blind allegiance to their news sources and political parties has allowed evil to flourish unopposed.
Anyone else think we'll see dramatic videos of staff being evacuated in helicopters and then the building burned down?
Hasn’t this always been taught?
Like—what was “critical thinking”?
Just so disappointed. Education really is terrible in general. Very few seem to be able to apply their skills in different areas. Sort of like how I was only able to solve a particular kind of math problem but when it was rephrased…kaput.
The post title doesn't suggest anything otherwise..
This is a paper about hesitancy.
I've taken a news literacy class at Stony Brook about 10 years ago, when it was then a relatively new program. I think it's an incredibly valuable thing.

It was taught in more the general sense of how to apply critical thinking to judge news stories. To the people saying that this just instills propaganda about specific news sources: consider learning a little bit more about the class.

It teaches about how to tell journalism apart from other kinds of information, like entertainment and opinion; the hallmarks of good reporting, like transparency; discerning assertion from verification, and evidence from inference; the idea of seeking out multiple sources and how to reconcile them, etc. It's more a toolbox of how to inform oneself, regardless of any specific source.

It definitely included examples of bad reporting from all sorts of sources, because the message is that its ideas are applicable to any source of information.

Ideas: https://www.centerfornewsliteracy.org/what-is-news-literacy/

Class: https://www.centerfornewsliteracy.org/stony-brooks-center-fo...
Institutions have some level of accountability that Facebook memes don't.

The NYT is not an arbiter of truth. However I am much more likely to pay attention to a piece of journalism from them moreso than my neighbor who can't read saying vaccines are just microchips. At the very least there is a credibility factor that they have.

The US has always had biased media - people forget the famous newspapers of the federalists and the republicans as early as the birth of our country - however at times it was able to align with certain truths between factions. It seems this is what was really lost.

Journalism has taken a huge hit in this country and the effects are widespread. I'm not against hearing an argument for something. I am against hearing an argument based on an unsubstantiated rumor and "we don't know if it's true but WHAT IF IT IS true" reporting that exists today.
Sweat reveals our every secret – from what we’ve eaten to whether we’re on drugs
Congress v. Popular Vote
You're probably right, this program looks great and reflects how the industry has changed since A+ towards cloud-based systems. Shame though - people tend to come to IT because they like playing with their computer and A+ was a natural stepping strong from that to administrating a computer. It was like the Hobby->JuniorProfessional stepping stone.
https://nomadvisa.io/france
centers the map on the French Caribbean rather than the main landmass in Western Europe
Many years ago I read "Blue Magic : The People, Power and Politics Behind the IBM PC" and seem to remember quite enjoying it (though it was ~1990).

There's a copy on The Internet Archive you can "borrow" for free:

https://archive.org/details/bluemagicpeople00chpo
> The company that cleans your offices at night is almost certainly a contractor, for example.

In the good old days janitors used to be employees. Heck, even when I worked for the government the janitors were employees (but I believe even the janitors needed a security clearance.)
To all the commenters critical of this idea, what do you suggest as an alternative? I don't think letting kids belive that Facebook/Reddit/TikTok memes are valid news sources is a great course of action either.
A company is still morally responsible if they hire from a contracting firm that mistreats their employees.

I could be wrong, but I doubt that most janitorial contracting firms have a policy of firing people after two years and refusing to re-hire them for a set amount of time. However, if they do then that would be immoral for them to.
I would recommend burying it in old coal mines after compressing it under intense heat.
In what way are they ridiculous?
We discuss this in detail with Richard on next week's episode of The Changelog podcast.

https://changelog.fm
I don't fully understand the politics of this request. The US sure knows that when the Taliban finds US people, they will be brought to death. So it is this just to show that the Taliban are not good people if and when they decide to do that? We already know what to expect from the Taliban.
How to start and level-up your IT career
Wouldn't there be life-ending amounts of Hawking radiation coming from it? In other words, not a black circle :-)
> The assumption that someone with a PhD is smarter, on average, than someone without a PhD is quite laughable.

While the sample size is admittedly small, my own personal experience has suggested that the opposite may be true.
Yeah, my kid also got a teddy with the same scar as his from the hospital. It's a nice idea, but my kid didn't really care about it. (I don't know why, he had other stuffed animals that he really liked, but apparently the scar was not a big deal to him)
That is good to hear. How long will it take till developers, working in shops that contemplate their migration to Java 11, can use it?

No snark intended.
https://archive.md/fBbbu
Do you support that parents should be able to take the education funding of their kids to whatever accredited schools (or home school) they choose?
Do you have a "obese passport", "health score"? You can't use a logic only when it's convenient. Implementing a health score and precenting unhealthy people (or even old people) from going outside would alievate hospital use. Do we want that?

Although the vaccine seems to somewhat lessen the chance of transmission, it IMO is not enough to stomp on people's freedom. I would maybe consider it if it was the black plague.
Magazines cost money and they're still full of ads. Nothing will change online.
If you get more $ in return... I don't see much downside. People will have to learn to run themselves as a business/contractor, and have a bit more discipline re: taxes. Getting a check for $3000 doesn't mean you can spend all $3000 immediately, etc.

If we move in this direction more, we'll potentially chip away at some of the "employer=healthinsurance" mindset that has trapped so many people in less than optimal jobs.
Getting closer to the truth, that's why greek philosophers created logic and focused part of their studies on it.

Using shields (against self-sabotaging traps) as ammo to destroy others is very dumb, but yes it happens.
It's kind of interesting how we're discussing which solution is most pythonic, but nobody has managed to write a solution which actually works. This is partially because the problem is slightly ambiguous, but even then nobody seems to have written a version that works for any of the possible interpretations of the problem.

Most solutions suffer from a combination of any of the following problems:

- Not using strict vs non-strict monotonicity consistently

- Failing to identify the correct direction of a run (either not bothering at all or failing for any run starting with
two equal values)

- Assuming the first run is increasing (implicitly by comparing with negative infinity)

There's also nobody who seems to have given thought on how to solve the ambiguity when you allow runs that are not strictly monotonic.
As mentioned in another comment, you can also scroll down on the landingpage and explore other visa types.
You hash images in the same way, then encrypt the hashes in the same way, and see if the results match.
I think there's a mirror to this in the real economy too.

"Capital" isn't consumed by much of the tech industry in the same way as it was/is by manufacturing. If you're a toaster startup, you'll need a factory, steel, etc. Actual, physical capital that needs to come from somewhere. When your toaster startup goes viral and scales, you'll need more of that physical capital. For every toaster you sell, you'll need to buy more parts and materials.

A tech startup needs riskable money to figure out what they're making, but once it's profitable, they're not sitting across from bankers discussing finance. Also, when covid hits and demand for movies skyrockets, amazon prime or netflix can sell as much as people will by. There's no need for prices to go up. Marginal costs don't exist.

They're pretty much insulated from both real and monetary shock. All they care about is demand. There will not be a shortage of steaming content services' supply chain. A netflix is limited in how much it can invent, but it isn't limited in how much it can produce. Doubling the number of subscriptions or viewing times is trivial. They don't owe on loans.
“ Likewise, she raised the equity issue over people are seeking extra doses on their own while others remain unvaccinated.”

What equity issues? Vaccines are available for anyone that wants them in the us. Unless you include foreign demand there are no issues
I'll take your anecdote and tell you I never experienced anything like this from teachers in public school in IL.

Conservatives aren't demonized they are just disliked because of their political party affiliation and the actions of their elected representatives. I like conservatives, I would even say I love them, but I think they have moronic brain-dead opinions especially on things like CRT that they don't understand.
Why is it instilling bias specifically? Is this because it's your team that comes out badly in this example?
What about internships? Is there any site for remote internships?
It would have to be a pretty sturdy box. Even if such a box could be built, it would be tricky to keep the black hole in the exact center.
In order to avoid copyright violation, Compaq did clean room reverse engineering of the IBM PC BIOS in order to build the first clone. They didn't use any code listing.
That's interesting. I was under the impression that Facebook filled the group chat niche in the US.
It's maybe worth mentioning that, pre-quantum mechanics, this was so far from being a naïve question as to be one of the motivating concerns of early-20th-century physics. It's not the same thing as, but is closely related to, the ultraviolet catastrophe (https://en.wikipedia.org/wiki/Ultraviolet_catastrophe).
Yes, that’s a very clean and robust approach. In the “Deferred resource release → Related work” section, one of the links is to a video from the ACCU 2021 conference by Luca Sas titled “Modern C and What We Can Learn From It” that explains modern C techniques, and your one is mentioned at 23′15″: https://youtu.be/QpAhX-gsHMs?t=23m15s

If you haven’t watched it, I can recommend it.
At this point, education (both the level of, and the schools one attended) is mainly a proxy for social class. That's why employers love to ask for it. You can't say on your job posting that you want middle class applicants only, but you can require a college degree for a call center job and run a credit check on applicants to boot. That weeds out a lot of folks that it would be illegal to weed out via other means.
Back in the mid-2000s at Google, there was some degree for advancement from data center roles, even as contractors, to full-time jobs — even up to fully-fledged engineering jobs (SWE and SRE and NetOps) — if you were extremely talented, dedicated, networked well, and had the right degree of luck. Note all the qualifiers: it was tantamount to impossible.

I rose up through the ranks as one of these, as did a medium-sized cohort of colleagues who became life-long friends. Many of us busted our asses (hard). These days, I reckon the glass ceiling has turned into a cement thanks to managerial cowardice, which was bad at the time, and further desire to segment the workforce/roles. We often said we came into Google through the backdoor.

The degree of disparaging remarks about the folks in the data centers was unreal. It would be foolish to say there wasn't a de facto caste system (SWE > SRE > SETI > SysAdmin > NetOps > Data Center Tech > Facilities). After a couple of promotions from an extinct job ladder and level below L0, I ended up exceeding L6 in my career and became SWE.

In short, the disappointment from the folks in the article resonates deeply. Each time I encounter someone in this position, I try to lend as much of a hand as I can.
To be fair, there doesn't have to be a trail in my opinion. I think most financial crimes today are executed with eyes on everything.

Of course there is money laundering, but the ideas circulating Europe about restricting cash are idiotic policies for activities sake.
None of the Coal CCS have worked but Norway claim their Gas CCS has been working for 20 years. https://www.ice.org.uk/knowledge-and-resources/case-studies/...
> unlikely someone who's invested a lifetime into a career would intentionally jeopardize all of it by not following the journalistic standards and ethics they had learned and studied for so long

This form of journalism is pretty much dead in America.

Moreover, journalists violate journalistic "ethics" all the time and there is very little risk to your career unless you do something really bad and obvious like plagiarism. Even then, you can often stage a comeback if people like your writing.
I worked with AIX on Power5/5+ (mid 2000s) and their hypervisor for LPARs and what they called micro-LPARs at the time was astonishingly good. It provided very nice granularity and control for running multiple LPARs. An LPAR is like a VM, but is closer to bare-metal than what you find in an Intel environment. You had to allocate at least 1/10th of a virtual processor per LPAR. They had something called 'entitled capacity' where you could specify the minimum amount of CPU allocation the LPAR would get even if all LPARs running on the same hardware were running 100% busy at the same time.

It all worked exactly as advertised. I was on a small team that did performance monitoring, optimizations, and capacity planning and we watched the metrics very closely for production workloads (running DB2). It was seriously impressive.
It's pretty simple, just use your gut? This is hardly the foundation of good education.
This is a statement for the headlines, my brother in peak of the Afghanistan war was negotiating with Taliban everyday.
If they had any trustworthiness they would also include the media that led to 2/3 of Democrats falsely believing that Russia had tampered with the votes: https://mobile.twitter.com/peterjhasson/status/1064259048902....

They could also look into all the Russia Collusion stories that turned out to be hot air. People’s overreliance on the Steele Dossier would actually be a good example.

Like there’s actually plenty of stuff on both sides to put together a pretty well balanced unit and I think it would be valuable. But you can’t expect partisans with ideological blinders to teach kids how to be objective.
They recommend NordVPN, which makes me think all their recommendations are just ads.
I disagree, these contractors do the exact same job as some Google employees. They are directly part of "big tech", if they weren't there FAANG companies would grind to a halt.
For those who prefer video there's Julia Galef's channel: https://www.youtube.com/channel/UCz-RZblnhjXK_krP1jDybeQ

She is a co-founder of the Center for Applied Rationality & host of the Rationally Speaking podcast.
Neutralizing antibodies derived from B cells of 1918 flu pandemic survivors
Benefits are just an appealing name given to anything an employer chooses to spend money on instead of paying you that money (and the trade typically works in their favor).

Certainly, there are cases where contract employment is offered with pay that does not compete well against full-time employment/salary plus benefits, but that is not always the case.

Anecdotally, I've seen contracts done as W2 with benefits, even as a part-time employee. And I've seen 1099 contracts that far outpaid the W2 equivalent - in my case allowing me not only to pick and choose my benefits with plenty of money left over (even after paying self-employment taxes), but also using the U.S. tax system to great advantage, putting a very large portion of my gross pay into tax-advantaged accounts[0].

[0] https://www.irs.gov/retirement-plans/one-participant-401k-pl...
Nibbler would be proud.
Fighting over who to cancel is an ugly thing, and we need not do it. What is gained? Civility? The grim possibility of being ostracized is itself the object of conflict. Any sufficiently motivated argument devolves to the question of who deserves to be canceled.

Remove this hazard entirely. Make it easier to step away from an ugly thread.

This is a voluntary meritocracy, not a revolutionary committee for the eradication of hidden societal power structures. As such, the question of who to lynch today has no place in it.
Yes, the -inf approach gives the wrong answer. It's seems clever at first, but induces an invalid mental assumption.
This study implies R>1 for consistent transmission of specific strain in vaccinated staff in Vietnam. The Massachusetts study is consistent with the in vivo R being similar between vaccinated and unvaccinated, so nothing supports drawing the conclusion that lower risk of infection dominates the results AFA safety for other people.

It is perfectly rational for vaccinated people to take more risks around infection since the infection is less likely and lower risk to the vaccinated. I think we shouldn't pretend there is adequate evidence that we provide any form of herd immunity to the unvaccinated as far as we know they are just as unsafe among us as among themselves.
Apple Executive Defends Tools to Fight Child Porn, Acknowledges Privacy Backlash
You could use it to execute prisoners perhaps. Death by blackhole
Facts are difficult, because even if you have facts, you might only have some subset of the facts that skews you in a certain way.

Definitely best to read from a lot of different slants.
Monetization is not a crime
On device != Scanning your device. It scans your iCloud uploads and if configured, iMessages (which you didnt mean, because that doesnt work with hashes)
but if it's self reported. It might only show that they are more willing to say they're hesitant. or they were willing to take a survey.