Better HN
topnewbestaskshowjobs
Log inSign up

bdevine

237 karma · joined Aug 14, 2012 (14y ago) · 82 submissions

Submissions

comment 11y ago · link · parent

Ah! Thanks for the correction. Somewhere along the way I picked up the belief that in addition to the file-closing aspect, "with" ensured a line-at-a-time iterator, akin to adding on "for line in f:".

I'm not sure I understand your third comment though. As I understand it, iterables have an __iter__ method. __iter__ methods return iterators. So an iterator for the iterable f traverses f and sends f's values to, in this case, set(). I believe we agree there. My initial concern was simply that the statement could be read "The iterator, set(), uses f.", and I don't see where the disagreement arises.

comment 11y ago · link · parent

I think you may have gotten ahead of yourself in your explanation, but to be clear, it's the "with" statement that causes the line iteration that then feeds into set(f). To say that "set(f) uses f as an iterator" might imply to some that set() is causing the iteration, which isn't true.

ETA: See raymondh's post below.

comment 11y ago · link · parent

Always glad to see tips, tricks, and otherwise for Python. But for anyone checking out Python who sees how useful the defaultdict construct is but doesn't necessarily need nested attributes, the Counter class[0] has been available for some time now. If you just want to keep track of, well, counts, it's very handy and versatile.

[0] https://docs.python.org/3.1/library/collections.html#collect...

comment 11y ago · link · parent

Taken in good fun, but if anyone is interested, urn models are frequently used in probability theory though. [0]

[0] http://en.m.wikipedia.org/wiki/Urn_problem

comment 12y ago · link · parent

As someone who is similarly afflicted, here's a seconded "Thank you"!

comment 12y ago · link · parent

Thanks for posting this. A great read and I'm now following the author on Twitter.

comment 12y ago · link · parent

Having only an infrequently-used personal account, I was told by the landing page that analytics would only apply to tweets going forward. Rather disappointing, but I suspect that I'll check in on it from time to time anyway.

comment 12y ago · link · parent

Right, given that as yet no DNA from Kennewick Man is available, I believe it's implied that he may have been the product of intermingling between the theoretical first settlers and the later Bering settlers. No revision of land bridge migration dates would be needed.

comment 12y ago · link · parent

Well-said; thank you for the reply. Based on what you've said and what the article says and implies, I am inclined to be biased against the tribes in this matter. While there is obviously a long and tragic history that is still in play, it seems to me that if there is an agreement that is in place that allows the federal government (NOT necessarily within the Corps) primacy in determining whether remains belong to some tribe(s), then such tribes have no immediate grounds to claim the remains. I agree that the Corps comes off looking very much like they intended to use the remains as a bargaining chip.

comment 12y ago · link · parent

Summary: About 15,000 years ago, sea-faring people made their way from what is now Japan along the North Pacific rim to what is now the First Nations region. It was only later that the Bering land bridge migration occurred, those peoples integrating with the first settlers. This article offers a fascinating look into the intersection of cutting-edge archeology and tribal/governmental politics.

If anybody has any insight into the Corps of Engineer's behavior that was discussed in the article, I'd love to hear it.

41.

The Kennewick Man Finally Freed to Share His Secrets(smithsonianmag.com ↗)

67 points · by bdevine · 12y ago · 24 comments

42.

Why Does Absinthe Get Cloudy?(seriouseats.com ↗)

2 points · by bdevine · 12y ago · discuss

comment 12y ago · link · parent

Here's an article detailing just how it is that all these local police departments are getting such lovely weapons of mass murder:

http://www.newsweek.com/how-americas-police-became-army-1033...

(Short answer: Congressionally-enabled DoD surplus transfers.)

comment 12y ago · link · parent

I'm fond of attributing this quote to myself, but I may have the causality reversed.

comment 12y ago · link · parent

The sessions, the wget-like download mode, the binary detection, the upload capabilities... there is a lot to like here. I will definitely be checking this out. Thanks for posting!

comment 12y ago · link · parent

"Treading in Python, Vol. 2" by Harrison goes pretty in-depth with the usual suspects -- iterators, generators, decorators, dunder methods, etc. Then Knupp's "Idiomatic Python" is handy to review for tips and tricks. But overall I also like Beazley et. al. for a great cookbook and a good glimpse into "effective" Python.

comment 12y ago · link · parent

Good points all. This is what I get for mouthing off from my phone instead of taking the time to think about what I'm saying. I will say though that given the continuing productivity of language, the fact that those earlier examples exist doesn't necessarily preclude my supposition that "X-eer" could see an uptick in neologistic usage - although again you're quite right that it wouldn't be "inchoate" in the sense of not being extant.

comment 12y ago · link · parent

Nice catch! I didn't go there at all, but maybe I should have!

comment 12y ago · link · parent

I haven't heard this term before, but maybe that's just me:

"... it became clear that ad retargeting—in which you show ads to people who recently visited your website—was where MARKETEERING dollars were going" (emphasis mine).

That's an interesting turn of phrase: it evokes Disney's Imagineers, who can be loosely said to be engineers with a heavily creative bent, and applies it to the act of marketing, thereby implying a more heavily creative and technically adept form of "marketer". I wonder if "X-eer" is an inchoate language trend?

comment 12y ago · link · parent

San Diego, CA | Local, remote, open to relocation | Full Time, Part Time, Contract Stack: Python generalist with some Flask and HTML/JS/CSS. NLTK, Pandas, etc. - please see my linkedin profile for a full list of keywords. Resume: https://www.linkedin.com/pub/brandon-devine/7/a6a/82b and https://github.com/morpheme?tab=repositories Contact: my.name at gmail

I'm a recent graduate in Computational Linguistics who's looking for an opportunity to do interesting work in various aspects of NLP, as well as general data science and web dev-related work. I also have a background in GIS from a former career and it would be particularly awesome to find a position that allows me to tie mapping and data analysis together. Most of all, though, I just want to get my hands dirty in the nuts and bolts of your app and help you build something cool -- an API, a recommender, analytics tools, or whatever you have in mind. I love learning about new verticals and if you're in a niche industry that isn't "sexy", all the better! At this point in my career, company size isn't a huge issue for me; I feel that I can learn a lot in any situation. Local to San Diego or remote would be great, and my family and I would consider relocating to the Bay Area, Austin, or D.C.

comment 12y ago · link · parent

True, true. But the point still stands that there are options which hint at the durability of cockroaches without invoking disgust!

Actually this all does remind me of research on the tangible effect of disgust on products -- see [0]. That work studied physical contact, but it's easy to extrapolate from there.

[0] https://faculty.fuqua.duke.edu/~gavan/bio/GJF_articles/conta...

comment 12y ago · link · parent

That's the first thing I thought. If anybody from the team is looking, how about something like BlattoDB[0]?

[0] http://en.m.wikipedia.org/wiki/Blattaria

comment 12y ago · link · parent

It's really awesome to see the enhanced Vagrant support, as well as the Angular support. What I am really looking forward to/hoping for, though, is IPython notebook file integration.

comment 12y ago · link · parent

Yes, I remember that well. Seeing the animated graphics linked within that article really was an 'ah ha!' moment for me; I'd definitely recommend it as an introductory intuitive motivation.

comment 12y ago · link · parent

I feel like I have read most of these in a piecemeal fashion, but seeing all these articles together like this really drives home the importance of paying attention to the basics. Great collection; thanks for sharing!

comment 12y ago · link · parent

I liked the latest edition of "Python Cookbook" by Beazley and Jones for precisely this.

comment 12y ago · link · parent

As someone who is currently looking for a job, I'm slightly annoyed (with myself) that I missed it. There are several salient points already made about its merits and drawbacks, but please consider this a vote for some kind of periodic recurrence. Being that I'm looking for a relatively junior position, I did appreciate @glimcat's comment re: taking job posts at face value, and I think that the possibility of having companies approach a candidate that has previously had no idea where s/he is shooting in the dark is refreshing, affirming, and motivating.

comment 12y ago · link · parent

I am currently going through Miguel Grinberg's Flask dev book (the early O'Reilly version) but I had considered diving into Django instead. My rationale for making this choice basically came down to seeing that Flask doesn't "come with batteries", and I thought it would be more educationally valuable to have a broad understanding of the various components of a web app before trying something like Django which apparently does things that Flask doesn't. (I may be off-base here, of course -- I know that I don't know what I don't know!) All of which is to say that I hope you give some space to at least discussing "why Django?". Good luck!

comment 12y ago · link · parent

I do this as well, because the cart has the property of notifying me of price changes of items saved in the cart. I'm actually not sure if wish lists do this as well, but as I am in the cart so often (shopping online as much as I do), it's easy for me to keep an eye on items that I might be hesitant about pulling the trigger on.

comment 12y ago · link · parent

That's very interesting and cool, but the myth[0] is that a large amount of copies were buried, and one copy found is necessary but insufficient evidence of the myth's veracity.

FWIW, I do hope that the legends are true!

[0] http://en.m.wikipedia.org/wiki/Atari_video_game_burial

123