Better HN
topnewbestaskshowjobs
Log inSign up

kortex

8,487 karma · joined Feb 1, 2017 (9y ago) · 2,549 submissions

Submissions

comment 9y ago · link · parent

In [1]: breakfast = {"bacon": 2, "eggs": 3}

In [2]: sorted(breakfast)

Out[2]: ['bacon', 'eggs']

Done. One and only one obvious way to return a sorted list of keys of a dict.

comment 9y ago · link · parent

> I would say there is currently no “right” or “wrong” as long as both Python 2.7.x and Python 3.x support the libraries that you are planning to use.

No. 3.x is right, unless you have a darn good reason. Darn good reasons:

1. A library or legacy codebase is in 2.x, or a system will only support it, and it is impractical to refactor to 3.x

2. You are being paid to specifically write in 2.x. Often, this is because of reason 1.

It's pretty simple, really.

comment 9y ago · link · parent

And with the air mostly removed, you can spin the drum really really fast! I think you're on to something here. :P Maybe not.

I've done hundreds of solvent evaporations under vacuum (rotovap). The problem is you need a trap, or else solvents condense in the pump which causes your efficiency to go down. So now you need a heat pump or similar, now you're talking about a really complicated dryer. But it'd be efficient.

comment 9y ago · link · parent

There are a lot of things which would likely not break down oven millions of years, provided they were largely protected from the element. A lot of glasses, ceramics. Tungsten carbide (pretty much any super hard machine tool, as long as it wasn't subducted). The isotopic distribution of nuclear waste would be a big clue.

And anything we've stuck on the moon.

Not to mention, all of the LACK of things. Giant holes from mining operations. All the straight cuts we've made through mountains. The Panama Canal.

comment 9y ago · link · parent

I use git/gitlab in a private repo to keep track of my zsh profile and history. Stupid like a fox!

comment 9y ago · link · parent

There are a lot of these crappy 6-20 unit apartment complexes around me. They have all the downsides and none of the upsides of renting. They are usually the price of larger apartments but with none of the amenities. I'd far prefer a larger complex with a pool, gym, and reliable maintenance.

comment 9y ago · link · parent

One of the primary drivers of melatonin suppression is the IPRGC [1]. So yes, what seems to be more important than the perceived color is the intensity of light in the 460-480 nm range. Which, if the spectral data in the original post are correct, means that NightShift has a major disadvantage.

[https://en.wikipedia.org/wiki/Intrinsically_photosensitive_r...]

comment 9y ago · link · parent

That gave me actual shivers. I can't believe the general populace (especially in the USA and UK) fall for this garbage. The bread and circuses must be really good. Ok maybe just circuses, I think Trump wants to cut SNAP.

comment 9y ago · link · parent

Theoretically, I'm sure some crafty solution like that exists, but then that is no longer true end-to-end encryption. It's 'leaky' E2E, which in the eyes of most crypto enthusiasts, is practically worse than open channel, because it gives a false sense of security.

comment 9y ago · link · parent

And yet, (from what I've read) DGX-1's are getting snapped up faster than Nvidia can make them. If you have a >6 month wait list, and people still want them at that price, then supply & demand suggests you may even be under-priced (of course Nvidia wants that market saturation).

comment 9y ago · link · parent

Banking as a utility? I love it. Credit unions are already a thing, and we have the National Credit Union Association, it's a small jump to the idea of a National Credit Union.

And we need single payer healthcare yesterday.

comment 9y ago · link · parent

See my other comment. 20 years may be too long for some industries (software), but may not be long enough/ structured properly for R&D heavy industries like pharmaceuticals and biosciences.

Biologics (all the -mab drugs, monoclonal antibodies, adalimumab Humira) are a treat because you have to share your methodology, but you do not have to share your cell culture line. Since the cell line itself needs to be approved, the me-too's have to go through ALL the trouble themselves.

comment 9y ago · link · parent

A big part of the high price of drugs is that the pharmaceutical companies have essentially a mad dash to recoup the (m/b)illions of dollars spent on R&D and clinical trials. Patent process has to begin once the target is discovered (e.g. assayed). Now you have to do further assays (0.5-1y), non-clinical safety studies (0.5-2y), route scouting and scale up (a few months), several years of clinical trials, then scale up the process to manufacturing. You've just burned 5-8 years of your patent protection. You have 15 years or less to recoup the cost of not only this drug, but all others that failed to get through the pipeline (which can be as much as 5-to-1).

Once it goes off patent, 80% of the sales of brand name can vanish [1]. Getting a generic approved is a fraction of the time and cost as getting the original through the pipeline. It's like P vs NP, since the FDA approval means publishing pretty much a how-to guide (synthesis route) and much of the safety data. You just have to demonstrate "our stuff is the same as the proven stuff".

I've long been a proponent of "15 years from FDA approval" - this gives a reliable, predictable cushion, without having to predict clinical failure rates. More time can be spent on safety studies (NCSS) and less costly Phase I and II trials, ideally leading to safer and more effective drugs. There is still pressure to move quick, because as soon as the clinical trials start, other companies have access to the leads you are looking at, and can simulate the structure and look for similar leads.

[1]https://www.forbes.com/2002/05/02/0502patents.html

comment 9y ago · link · parent

I don't think there is a risk of cyberpunks completely censoring the Establishment Media. The point is to level the playing field. Improve the signal-to-noise ratio.

comment 9y ago · link · parent

Indeed. You can't know what's truly true (istina) without some crucible in which free ideas flow, to enable the discourse which moves toward that truth. Free speech is quintessential to escaping the pravda, truthiness-es and alt-facts fed to us. The side effect is that some alt-facts find a safe space to thrive and multiply. I don't think this can be avoided, I think it ultimately is a feature of nature.

To use a machine learning analogy, all the pravda out there - everyone's relative truths - is your training set. If you limit your training set, you lose some ability to generalize to the real world.

comment 9y ago · link · parent

Strongly seconded. There are a lot of things I am tinkering with where I would love to have more fine-tuned control over loss, and have to resort to various hackery to get a mediocre approximation of my real idea.

comment 9y ago · link · parent

Windows 10 is not free, neither as in beer or libre.

Sure, they gave it away for a little bit, but by that logic, drugs are free, because the guy down the street gave me some free baggies because 'he likes me'!

comment 9y ago · link · parent

All poodles are dogs, not all dogs are poodles.

Using 'dogs' and 'poodles' interchangeably subconsciously implies that all/most dogs are poodles.

I think the big difference here is the relative mindshare of Windows in the Windows ecosystem (100%) vs the share of Ubuntu in the Linux ecosystem (popular and dominiant, but not 100%).

A very small portion of the Linux community made the decision to put the launcher ads in, a large chunk of the community made a very loud fuss, and the feature was removed.

comment 9y ago · link · parent

I googled that and got

  Showing results for *conceptnet cumberbatch*
Oh, the many names of Bumblebee Banglesnatch.

comment 9y ago · link · parent

When working with images, do you use mode 0, 1, or 2?

comment 9y ago · link · parent

I thought the same thing. There are so many other options in the Python toolbox, Enum is far from the first I would reach for. Not sure what the benefit is.

comment 9y ago · link · parent

The favicon is an avocado. snert. Yeah I get that exact same vibe too.

comment 9y ago · link · parent

Space is craaazy expensive for a lot more reasons though (ionization and lack of mission-redundancy are the big ones. Every launch is expensive, so every mission/satellite must have a bazillion nines).

comment 9y ago · link · parent

I wonder what the cost differential is (any given rack, not just an underwater one) for a system which is designed to NEVER be maintained by people over its service life (or duty). Hard drive goes bad? Board fails? Just push the load elsewhere and shut off power to it. No idea what sort of attrition rate these systems have.

Sure, you might be at 50% capacity after 3 years, but that's just like lithium ion batteries.

comment 9y ago · link · parent

As a chemist this headline makes me actually angry.

comment 9y ago · link · parent

It's impossible. Most chemicals of interest are pretty boring in the visible spectrum. I'd say >95% of pure substances I've worked with - everything from pesticides to pharmaceuticals - are some variant on "white to off-white solid" or "clear to amber liquid." White/clear indicates that all photons visible to us interact with the materially equally. You get tans, yellows, and browns largely from high-frequency (deep blue/purple part of the spectrum) being absorbed by assorted chemical bonds.

Spectroscopy is predominantly done with UV (200-280 nm most common) and IR, which are regions where photonic interaction is dominated by electronic and vibration/rotational transitions, respectively.

Visible light absorption is typically caused by highly conjugated bonds and metal-coordination complexes. In terms of day-to-day, this is almost exclusively dyes (synthetic and natural). Dyes also tend to be really potent absorbers - you only need minuscule amounts of them to create very vivid colors. So a purely visible-light-based app would at best be able to give you a handle of what sort of dyes are in something. It won't tell you if it has pesticides (let alone traces!) or HFCS or nutrients or what-have-you.

tl;dr - no, it's not remotely possible to even detect pesticides with visible light.

comment 9y ago · link · parent

> Oh, Brasilia was designed that way.

Hardly. A 3-lane highway plus frontage roads cuts straight through the center. Then you have L4, which hugs the waterfront and cuts off much of the city in a very Robert Moses-esqe fashion. Its metro/rail system is completely anemic.

> Good thing the city was also designed with a huge collection of streets going around those neighborhoods, because everyone is on those, all the time.

I'd say that is precisely why it has more driving and less walking/public transport.

(disclaimer: never actually visited it, but this much is apparent from maps and such)

comment 9y ago · link · parent

I built a city in Sim City 3 exactly like this and it was pretty stellar. The entire city was split into 8 wedges, between each wedge was a continuous span of parks, trails, and water features, which all ran to a grand central park. Light rail and subway connected radially and tangentially. Roads were small and limited mostly to connecting blocks (a quasi-necessary feature due to the way SimCity simulates traffic, though later I learned I could construct without any roads).

How did Sims react to this hyper-planned city? Massively booming commerce, health, longevity and education through the roof. The only downside was the insane upfront cost to build in such a structured way (though interestingly, a huge chunk of that cost was subway. If I were in Sim City 4, there are more raised rail options).

I actually tried an annular highway (beltway) around the whole city (as is found in many real-world cities), and much to my chagrin, it was a headache that largely made traffic worse, just like real-world beltways.

comment 9y ago · link · parent

It gets better, and if you are a programmer, I recommend go straight to Dvorak for Programmers or similar coder-oriented layout.

I made the switch in 2011 and still one of the best decisions I've made. I set up the hotkey to rapidly switch between QWERTY and Dvorak because I 'defaulted' a LOT that first month (this is essential and don't let it discourage you to switch a lot!). I did a lot of drills for the first two weeks - there was a website specifically for drilling Dvorak, and it took some forcing to stick with the layout on non-critical tasks.

Peak QWERTY before was ~70-80 WPM. After about 2 months I was 50 WPM Dvorak and a slight dent in Qwerty speed. Not sure when the crossover occurred exactly, but a month or so later I was at 80 in Dvorak. I use Qwerty about 2% of the time but remain bi-lingual (bi-manual?) at ~75, with Dvorak just squeaking over 90. Occasionally I'll get [qwertial aphasia](https://xkcd.com/604/) and get stuck in the wrong brain mode for a few words when switching.

At this point, I've found the biggest limiter is muscle memory (letter patterns/n-grams), mistakes, and reading in words when taking these typing tests. But Qwerty feels like "crazy fingers", I feel like my fingers are all over the place, where Dvorak spends most of the time on home and upper row.

Started learning Dvorak for Programmers a few months ago and I really like that a lot - the number rearrangement is a bit weird but I mostly use the numpad for digits anyways, but having ()[]{}&$=!# and splat all without shift is GLORIOUS.

I'm curious about Colemak/Workman, and might take those on as a neuroplasticity challenge, but it's less of a push for me since DfP is so much win.

The only major pain is now Ctrl-Z -C -X -V are no longer one-handed, if I can, I try to rebind them to -' -Q -J -K, but mostly learned to live with what is effectively -' -/ -B -I -. . The brain is crazy adaptive.

edit: HN doesn't support Markdown-style links? Boo.

1
8182838485