For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | more jsvine's commentsregister


The story behind the code: "LAPD underreported serious assaults, skewing crime stats for 8 years" http://www.latimes.com/local/cityhall/la-me-crime-stats-2015...


Yes, the library definitely does need some stronger specs. Thanks for flagging. Addressing these two specific issues:

> Is the rgb space actually sRGB?

Yes. Added: https://github.com/jsvine/spectra/commit/7f1ac6f5287340ed356...

> And what is the parameter to brighten/darken/saturate/desaturate?

The parameter for brighten/darken is a positive/negative linear adjustment to the L(ightness) value of the color's Lab representation. (Spectra converts the color to Lab, makes the change, and then converts back to the original color space.)

Likewise, the parameter for saturate/desaturate is a positive/negative linear adjustment to the c(hroma) value of the color's Lch representation.

Added a note here: https://github.com/jsvine/spectra/commit/fd3cbde9338ce388849...

The goal is to, ultimately, have all these details in the docstrings: https://github.com/jsvine/spectra/issues/1


What happens when the adjusted color goes out of gamut?


Another thanks for flagging, mark-r. I've updated spectra to address this issue more explicitly. Per colormath[0], colors are allowed to go out of gamut. Colors now have `mycolor.rgb` and `mycolor.rgb_clamped` properties; `mycolor.hexcode` uses the clamped values. Are there other ways you'd like to see the out-of-gamut issue addressed? Open to suggestions.

[0]: http://python-colormath.readthedocs.org/en/latest/conversion...


Fair criticism. I should add those docstrings. Issue opened: https://github.com/jsvine/spectra/issues/1


Added docstrings in v0.0.6: https://github.com/jsvine/spectra/issues/1


I hadn't heard of OpenColourIO; it looks fascinating and quite powerful. Thanks for the tip!


Thanks! Colormath does an amazing job handling the mathematical conversions between color spaces, but has (at least to me) a somewhat verbose API. Spectra wraps that API in something simpler, and adds scales, ranges, blending, brightening/darkening, and saturation/desaturation.

Spectra uses grapefruit for parsing HTML names and hexcodes.


I'm most excited about the color scales. It looks like a helpful tool for situations where the standard colormaps in matplotlib/pyplot don't work well. Is that an appropriate use case?

I also like seeing nbviewer used for documentation, I haven't seen that very often.


> It looks like a helpful tool for situations where the standard colormaps in matplotlib/pyplot don't work well. Is that an appropriate use case?

Yes, that's definitely the type of use-case I had in mind. Another big one: Choropleth maps.

> I also like seeing nbviewer used for documentation, I haven't seen that very often.

Glad to hear it! It's my first attempt at writing documentation in an IPython notebook. Seemed like a good fit for something so visual.


> ‘Cloud Face’ is a collection of cloud images that are recognized as human face by a face-detection algorithm. It is a result of computer’s vision error, but they often look like faces to human eyes, too. This work attempts to examine the relation between computer vision and human vision.


Is it really computer error? Most of us probably saw the face of Einstein in the one cloud photo, because in fact there was a strong resemblance. If a artist paints a caricature or abstract image we can often identify the original subject. That's not error. There is something else going on here.


It is an error in a sense that these are not in fact faces, but clouds. While humans also can see shapes of faces in clouds, we are capable of understanding that these are not real faces. Computer algorithm is not capable of recognizing the difference which results in such misclassification, thus it is failing its intended purpose.




> Throughout the past six years, the project has been stuck in the beta phase. According to McKinsey, "for past 5 years, Release 1.0 is consistently projected to be 24-32 months away."


[deleted]


In 2012, the largest government contractors were:

1. Lockheed Martin

2. Northrop Grumman

3. Boeing

4. SAIC

5. Raytheon

6. General Dynamics

7. Hewlett-PAckard

8. Booz Allen Hamilton

9. Computer Sciences Corp.

10. DynCorp International.

Also in there are companies like Dell, IBM, Accenture, Batelle, Deloitte, Honeywell, AT&T, Rockwell, GE...

Hardly companies run by blind immigrant union women. And lest you dismiss those top ones as "just" defense, note that I've seen presentations by both General Dynamics and Northrop Grumman talking about their work in the health sector. There's something especially strange about booths featuring pictures of fighter planes at epidemiology conferences.


How dare the government ask (and pay for) companies to engage in ethical and socially concious ways! They should be paying bottom dollar and making sure that the service workers make minimum wage just like they do in the public sector!


I don't think you can extrapolate from a food court on a military base to a $300M project to rebuild Social Security IT. Don't let your political biases blind you to reality.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search:

HN For You