skysight-inc/HackerNews huggingface dataset:
Seems that the goal here is to sort via the letters 'a', 'b', etc combined with capturing the original ordering?

You could do this, although it's admittedly uglier than your example:

In [1]: sorted(enumerate([('b', 1), ('c', 3), ('a', 2)]), key=lambda x: (x[1][0], x[0], x[1][1]))
Out[1]: [(2, ('a', 2)), (0, ('b', 1)), (1, ('c', 3))]

However, if you're flexible about the ordering of the resulting tuples, this seems clearer and reasonably painless:

In [1]: sorted((x, i) for i, x in enumerate([('b', 1), ('c', 3), ('a', 2)]))
Out[1]: [(('a', 2), 2), (('b', 1), 0), (('c', 3), 1)]

I know that doesn't address your underlying complaint. This is mainly to note that the flexibility of Python tends allow a variety of approaches and that sometimes finding the clearest one takes some effort. ("There should be one obvious way to do it..." often does not hold, IMHO.)
Man gets 20 years for gunpoint domain hijack
They offers lots of configuration and customization with that price. Maybe you mean somebody offer a simple, straightforward product with no customization at a lower price?
A good measure would be to break up Ghettos. Stop putting all low-income people in one part of the city and then cry when it leads to problems. Mix your districts. Worked wonders here.

Second, there is no problem with mandatory pre-school. For everyone. If you just make it for one specific group that is discrimination instead of trying to solve a problem. Pre-school is good for everyone, there should be no reason to not send everyone there.
I would like to see adding a comprehension-like filtering clause to for-statements:

for n in range(100) if n%2:
print(f'{n} is odd number')

Does anyone know if there is a PEP covering that?
News to me. dslreports reported a C for bufferbloat. My router (eero) has a "labs" section that had SQM disabled. After enabling, dslreports is reporting an A.
This is horrible. It looks like ":=" is a comparison operator. The last line is dangerously close to Erlang list comprehensions:

[ {X, Y, X/Y} || X <- Some_Function (), Y <- Some_Other_Function () ]

And people bitch about Erlang syntax.

Edit: "/" is the division operator
I don't consider cultures nor religions as races, simple as that. The original comment didn't mention any races, so I interpret his "third-world people" as meaning those people's cultures instead of their skin color.
there is no such thing as 50ms of loss. Loss, when your queue is short, is recovered from in an round trip. Bloat on the internet can add seconds of jitter. ( http://www.dslreports.com/speedtest/results/bufferbloat)

But, I too am allergic to loss. fq_codel supports ECN, (explicit congestion notification), which is enabled, now, universally by IOS. As near as I can tell, the ECN usage of 6% (https://www.ietf.org/proceedings/98/slides/slides-98-maprg-t... ) in france is almost entirely from free.fr's deployment of fq_codel which they enabled by default in 2012 (!!!!!!). I had expected all the ISPs to have lept on this by now....
How many, how often? How do you know they abused it? Anecdote, data and so on.
It's incredibly smooth and powerful to use that feature. Set up some folders and it will auto-sort things based on the e-mail address, including sub-folders (e.g <parent>.<subfolder>@<username>.fastmail.com). It will also fall back on placing e-mail in the <parent> folder if there is no <subfolder> present.
Read about similar where doctors would keep using older DOS based software because they could operate the keyboard by touch, and thus bring up test results etc while maintaining the conversation with the patient.
No matter how dangerous free speech may be in your mind, censorship is 1000x more dangerous. I see evidence of this all around me as the remnants of an inhumane regime still stand in every city here and in the cities of most of our neighbors. If no such evidence is present in your environment, consider yourself extremely fortunate and please don't take it for granted. Pick up a history book and consider the implications of what you are saying very carefully.

Simply put, the way to fight the abuse of free speech is with more free speech, not less, more access to information, not less, more freedom of assembly and association, not less. This principle has been the foundation of the least repressive societies in human history and it has a definite and proven track record, unlike limiting speech, which simply does not.
I had the Sony Ericsson M600[0] Symbian phone for a while, and loved the jog wheel on it. The software never really took full advantage of it though, and just used it to select in lists. It would have been great for stuff like quick-launch shortcuts.

[0] https://www.gsmarena.com/sony_ericsson_m600-pictures-1425.ph...
As pointed, you can use either a default dict or just simply, and [more pythonic](https://blogs.msdn.microsoft.com/pythonengineering/2016/06/2...):

try:
bar[baz] += 1
except KeyError:
bar[baz] = 1

Also you can check if a key is in a dict simply by doing "if baz in bar" no need for "list(bar.keys())", which will be slow (temp object + linear scan) vs O(1) hashmap lookup.
Since the cave is off-limit during rainy season (which typically shouldn't have begun yet), I'd guess that nobody know the cave will flood
As I recall, the internet behemoths settled on ad revenue when other forms of generating revenue failed for their systems. People were not willing to pay monthly for Facebook nor google search. But maybe that’ll change after people react to the current situation.
Christmas and Easter are really not religious holidays though. Half the traditions date back to paganism/pre-christian culture and those are also the ones that are most important to scandinavian culture.

Christmas is even still called "Jul", which is also of pagan origin.

So it depends on what they mean, they shouldn't be forced to go to church for a christmas sermon, but I don't see anything wrong with having them walk around a christmas tree and sing about santa for instance.

To me, christianity has become pure culture. I really don't mind singing about jesus anymore than I mind singing about trolls or Odin. I think that's the way it should be. In a way, by going out of your way to avoid christianity, you are taking it more seriously than you're taking Norse mythology.. and if both are just superstition, why would you?
I'll give r/legaladvice a try, as well as consult some of my lawyer friends (if they aren't to busy to spare some time for my rather trivial matter, hah). Thanks for the advice!
The problem is, python list comprehensions are very... specific. Add to that the brokenness of if...else and you get a very quirky and specific sublanguage that is hard for outsiders to read. And this is before we take into account the locals/scope/clojure discussion in the link and the PEP (which I frankly did not bother to read.)

On the other hand, you have a concept which translates easily to any language with first-class functions and lambdas. Even the syntax stays the same among languages which use "f(x,y)" for function evaluation and parameter passing.

/* This post is for those occasions when a list comprehension style is advocated over a functional style, which I know was not necessarily what you were doing in your comment. But I think the two points are valid enough on their own. */
Was it a SAAB? Pre-GM they had amazing cockpits, well laid-out and as easy to use at night as day.
Lw4o6: One-step further than dual-stack networks
It's all a bit theorical though, isn't it? All those user ids aren't necessarily human.

Look at a non-trivial application such as Postfix. It still is simple enough to be understood by one individual human, but it's complex enough to make use of file system rights and various forms of interprocess communication to do its job.

Once you've re-implemented this with unikernels, haven't you re-invented access control and authorization, which you wanted to do without? And yet, you've only got your email transport up. Still a long way to go for a modern collaboration server.

Real world systems, like airline bookings or ERPs, are orders of magnitude more complex than that. I'm not convinced I'd not rather have those use standard components for things like ACLs, process accounting and user ids. They were invented for a reason, and makes it easier to reason about data at rest and things like backups and process scheduling. My suspicion is that you'd want to reinvent them pretty soon when your system grows beyond that single micro service.
Language Grammar – BNF, EBNF, ABNF
Time to dump dual-stack networks and get on the IPv6 train – with LW4o6
I definitely used to be a hardcore finisher. It's a really difficult habit to break, as it feels like personal failure, and violation if principle. My wife was also, and independently a book finisher.

I don't recall the realisation that life is short and there is so much to do. Neither of us are finishers now. But I do have a special shelf for unfinished books. They stare at me.
Does this save anything? The canonical way to do this is

for n in range(100):
if n%2:
print(f'{n} is odd number')

Only two more indents. What is the point of your proposed syntax?
Reminds me of the kind of hacks you would find in an old-school K&R book.
I think one reason store chains etc are moving to touch screns is that they can push various changes centrally.

I recall seeing older systems that used transparent keycaps, and invariably they would be covered in stickers and whiteout as the employees had tried their best to implement changes on the fly.

And now that i think about it, were there not a story posted a while back about a restaurant where the waiters used an age old grease marker on the screen of their POS to mark reservations that had arrived? This because while the software had such a feature, it required too many clicks or some such to be effectively done during a busy day.
Probably a fair rule to go by overall
But if I'd followed her rule I might not have read 'Fathers and Sons' through. The first fair chunk of the book I found extremely boring but at some point I became engrossed and to this day remember it as one of the books I've enjoyed the most.
report stylish to Google https://chrome.google.com/webstore/report/fjnbnpbmkenffdnngj...
I'm currently behind a Linux router with basically nothing but firewall rules configured; I still get an A on that test (meaningful?). I guess this sort of thing is just the default nowadays?
Interesting css graphic animation framework
Agreed these are a little verbose but they get the job done no?

for n in filter(is_even, range(100)):
print(f'{n} is odd number')

for n in (i for i in range(100) if i % 2 == 0):
print(f'{n} is odd number')

Are there any points against these solutions other than verbosity?
This article about Harrison Okene whose boat sank is interesting in terms of surviving in an air bubble underwater (and seems somewhat analogous to the cave situation).

http://www.slate.com/articles/health_and_science/science/201...
Is there anyone at Microsoft that you would like to especially single out? (-:
I like the git commit-history diagram near the top of the article, with text-bubbles for the commit messages.

Is there any tool that shows commit-histories like that?
Fastmail is the best.
I enabled sch_cake on my router (an R7800 with Openwrt 18.06 on it) recently. Worked like a charm. Would happily recommend.

I imagine the main thing that's holding back ISPs from using it on their consumer routers is the (minimal) configuration the user has to do to set to upload bandwidth limit. If ISP routers were also using decent queuing algorithms and not buffering like crazy then that wouldn't be necessary of course, but it doesn't seem like that's going to change any time soon.
Historically there has been much resistance to proposals like this which only save a line. The existing code is, after all:

for n in range(100):
if n%2:
print(f'{n} is odd number')

You proposal also leads to a more ambiguous grammar because the following is currently allowed:

for n in range(100) if n%2 else range(n):

The ambiguity can be extended with multiple if's, compare:

for x in range(10) if n%2 if n else range(n):
for x in range(10) if n%2 if n else range(n) else n**2:

A work-around would be to raise something akin to the "SyntaxError: Generator expression must be parenthesized if not sole argument" that occurs with expressions like "f(b, a for a in range(3))", but that's a lot of work just to save a newline, two indents, and ":", isn't it?
for n in [i for i in range(100) if i%2 == 0]:
print n

Will work (if a bit repetitive looking)
AT&T APN Settings
Diarrhea will make you die a lot faster, your attitude is a bit blasè for water that is potentially contaminated with feces.
+1 for Runbox.

I do wish they had better filtering options.
SEEKING WORK- REMOTE full time and freelance consulting.

I'm a Lean Startup and Lean growth marketer, Europe based. I work at the intersection of marketing, product and data. I speak German, English and Croatian on a native level.

Freelance over Upwork: https://www.upwork.com/freelancers/~0140c61711ca62fc44 LinkedIn: https://www.linkedin.com/in/anakolarevic/ Angellist: https://angel.co/anakolarevic Can be contacted through the above channels

SOME OF THE THINGS I CAN HELP YOU WITH:

- Testing customer demand for startups and existing companies looking to develop new products, services or features through the Lean framework

- Business Model Canvas/ Business Modelling: Spot potential weaknesses & strengths, identify untapped opportunities and opportunities of scale

- Customer Development Process & Lean startup methodology: Framework to understand your customers and what they pay for, and how to interview customers, Lean experiments

- Marketing strategy: Converting customer aqcuisition strategies and funnels using Lean startup and smart digital marketing hacks

- Marketing execution: Google Adwords, Bing, Facebook & Instagram Ads, Reddit Ads, Social Media & Community management advice, paid & earned demand creation

- Pitches /Investor decks: Creation of quality content, metrics and delivery for pitch decks or audience pitches, diction and speech training included
https://www.python.org/dev/peps/pep-0572/#alternative-spelli...
This is a mentality based on economics purely. That doesn't work well in practice. Economics might even lead as motivation for one to migrate (as it often does), but culture/religion play a pivotal part in creating difficulties in further assimilation. What do you get then? Exactly what you have in Europe: ethnic division and people living in a country with distaste for it, but benefiting economically from it.
From GitHub to no-hub. A decentralized open-source ecosystem
I don't think the controversy here is with the feature itself, more with the implementation. Many, me included, would have preferred to seen a different implementation of solutions to the same problems.

Code starts becoming a lot harder to reason about when more than one state is mutated on the same line. The good design of Python makes this harder than in say C and I think this is a step in the wrong direction in that regard.

The two real things this solves are checking for truthyness in an if and reusing values in a filterting comprehension. Instead of the syntax we have now that can be used anywhere, adds a whole new concept and feels kind of out-of-place, I would have much preferred a solution that can only be used in vetted places, doesn't add a new thing people need to learn and follows the style of the language

For example, my preferred solution for `if` would have been:

if thing() as t:
print(t)

Usage of `as` is already established by the `with` block

[value for x in y
if value
where value = x * 2]

The order is unfortunately a bit weird here, but there is no need to add the whole concept of a different type of assignment and this syntax will feel instantly recognizable to people familiar mathematical notation, which is where the existing list comprehension syntax comes from and so has been established as well.
I think the mixed mode works really well.

Touchscreens are pretty natural and intuitive, especially for things like ATMs, but you can't have braille on ATM touch screens so you need the buttons no matter what. At least in the US they usually have headphone jacks to replace the information presented on the screen though, and since you have a screen you might as well make it a touch screen.
A lot of people need fishing to survive (I've done it while living at a shore village near armutlu) so I'm not sure how imagining being shot into space via a hook solves that problem.

Sounds more like first world problems.
Presumably they try to figure out the IPs of popular video content providers & their CDNs and throttle the bandwidth to them.
I wonder what would break if they started treating if as an expression. It is much nicer to do:

def foo(X):
if bar(foo):
1
False
Not sure what point you're trying to make, but 1200p was just barely a thing at the turn of the century, and only for CRT. It would have cost you $300-400 and still not have been full HD. Completely different beast. FWIW, the LCD screens of the day topped out at 1024x768.
Maybe OP is a dog? https://www.amazon.co.uk/Ama-ZODE-Drinker-Dispenser-Plastic-...
Don't wait for 3.8, and don't bother with defaultdict.

collections.Counter is what you want for the counting case.

dict.get() + dict.setdefault() for the general case.

defaultdict is only useful if the factory is expensive to call.
> In addition, if people are working less than 8-10 productive hours per day, then they are clearly not being as productive as they could be.

Am I the only one that immediately thought about employees as the Clueless on the Gervais Principle[1]?

It looks to me like they need to sell this dream of exiting big for people to sacrifice everything for the company. However everyone forgets how absurdly low the chances of winning the lottery is.

It's essentially the carrot on the stick.

Maybe I'm wrong and it's easy to win on this "game"? I'd love to see some data on how many actually become millionaires after killing themselves on the startup grinder.

[1]: https://www.ribbonfarm.com/the-gervais-principle/
At the end do you still read the book straight through? Even so, it seems equal in effort to just read the book. Though to be fair I haven't tried your method, I just feel skeptical.
>On the other side of the coin, Firefox makes it quite hard to push updates to users that require more permissions, requiring manual intervention to update. It signifies this with a small muted yellow exclamation mark on the hamburger menu, which is really hard to see.

I'm not sure how you can see this as anything but a good thing. If your extension wants more permissions than originally promised, then it absolutely should have to require user intervention to do. You can't just change the agreement like that. Maybe it could be better communicated, although I have to say I don't think I've ever not noticed that yellow icon, but this is far, far better than the alternative.
This site helps you find cheap startup domain names that aren’t completely shit
> by writing extra lines?

That doesn't seem possible (see my sibling comments). You might be able to write a different program, which might be similar (e.g. same return value, most of the time), but I don't think there's anything that's equivalent.

This is an important distinction! For example, let's say you're given a program that uses a lot of `x := y` expressions. You're asked to back-port this to an older Python version, which doesn't have `x := y`. What do you do? If there's an equivalent expression, you can just swap them out; you could even automate it with a keyboard macro, since there's no need to think about it.

If, on the other hand, you only know how to write similar code, you can't be as confident. Some examples of where "similar" programs can end up behaving differently are:

- The application makes heavy use of threading

- There are lots of magic methods defined, like `__getattribute__`, which can alter the meaning of common Python expressions (e.g. `foo.bar`)

- Those magic methods cause global side effects which the program relies on, so that they have to get triggered in the correct order

- The program manipulates implementation features, like `locals()`, `func_globals`, `__class__`, etc.

- The software is a library, which must accept arbitrary values/objects given by users

- It makes use of hashes, e.g. to check for data in an existing database, and those hashes may depend on things like the order of insertion into internal properties

Whilst it's perfectly reasonable to curse whoever wrote such monstrous code, that doesn't help us backport it. We would have to tread very carefully, and write lots of tests.

> I'd prefer more lines for readability reasons

Verbosity and readability are not the same thing. Overly verbose code might have easier to understand parts, whilst obscuring the big picture of what it's actually doing. A classic example is assembly: each instruction is pretty easy, e.g. "add the value of register A to register B", "jump to the location stored in register C if register B is non-positive", etc. Yet we can pluck a page of disassembled machine code from, say, the middle of LibreOffice and have no idea what problem it's meant to be solving. (I posted a rant about this at https://news.ycombinator.com/item?id=16223583 ).
You're one of the lucky ones with an ISP with properly configured buffers.
A+ is the goal on that test though, which basically means no extra latency under load.
Database of Various XSS Worms
It's a voluntary design choice since the beginning of Python to avoid the very common mistake of doing:

while continue = "yes":

instead of:

while continue == "yes":

Those mistakes introduce bugs that are hard to spot because they don't cause an immediate error, linters can hardly help with them and even a senior can make them while being tired.
Now that the route is mapped, I wonder if you could get robots to do the supply trips instead.
How to Kick Start Your Projects with Project Management Tool
> Python has examples like `foo += bar` being sugar for `foo = foo + bar`.

Nitpick, but I don't think that's true – AFAIK they translate into different method calls.

`foo + bar` →`foo.__add__(bar)`

`foo += bar` → `foo.__iadd__(bar)`

(note the `i` in the second one)
Is there a list of routers and their support for the different queuing methods (and how they are setup by default) ?
I wanted "as" too. But the accepted operator has the benefit of integrating perfectly with type hints.
Iranian APT Poses as Israeli Cyber-Security Firm That Exposed Its Operations
Organize Walmart labor.

Difficult. Probably not impossible (they are already employing the sliver of people willing to accept the hours and pay and not immediately able to obtain a better job).
Hm, maybe the algorithm could be refined to define a threshold of boredom; should this be met before 50 pages, use the remaining pages (50 minus pages so far) to randomly select pages to explore for more something exciting ahead.
Hmm. I thought everyone knew this was the case for most articles in most trade journals.
> Where people are essentially born with different values, customs, and ways to behave in society.

When I went to school there was a pretty high number of second generation muslim immigrants, but even there you already saw their strict values eroding. Where their parents were mostly strictly religious, most kids (not all) went partying and drinking, didn't care about wearing veils.
A girl from back then, became my neighbour last year and she couldn't care less about religion anymore, they have decent jobs and live life like everyone else here. I'm certain not every immigrant or their kids will adjust as fast, but it's a matter of time, if not this generation, the next. What 'strict' values will my neighbours kid still have from their 'home' country? They won't even be brought up with their religion anymore.

> the ability and capacity to assimilate has been exceeded
Has it? Can this be quantified in some way? Just like my anecdote, is this a personal feeling? As I don't feel that way at all.
That's why parenthesis are mandatory.