News for hackers. Stuff that matters.

nburger

The tail number is a prime number (in reference to Prime customers) and is also the year AMZN went public.
Re:CSV Challenge on Saturday April 25, 2015 @01:35PM (#9438946)
Here's a solution using just one instance of jq+awk that handles the "multiple files" scenario and writes proper headers on each:

jq -r '.[]|[.timestamp,.name,.creditcard]|@csv'<data.json|awk -F, '{if ($3!=""){f=substr($1,2,10)".csv";gsub(/-/,"",f);gsub(/"/,"",$0);c="(echo name,creditcard;cat -)>>"f;print $2","$3|c}}'

Strangely, the OP's "solution" actually omits the quotes around the strings, which adds unnecessary complexity.

Re:CSV Challenge on Saturday April 25, 2015 @10:43AM (#9438425)
If we're going for succinctness, you could combine these all together:

(echo '"Name","Credit Card"'; jq -r '.[] | select(.creditcard) | [.name, .creditcard] | @csv' data.json) >> `date +%Y%m%d`.csv

Re:Entitlement issues (2009) on Tuesday August 05, 2014 @10:41AM (#8137105)
Have you taken a look at BookVibe? [ http://www.bookvibe.com/ ]
Re:Started.in Atlanta on Wednesday March 26, 2014 @12:29PM (#7474518)
Congratulations on the launch! Also an Atlanta native and signed up!
Good stuff. Take a look at Fabric for another (and very commonly-used) example of Python wrapping SSH: http://docs.fabfile.org. Also you might look to Paramiko for a native SSH implementation: https://github.com/paramiko/paramiko.
or "sort -R"...
Re:Startup docu teaser #01: Michael Hartl on Wednesday November 21, 2012 @05:17PM (#4816620)
Good luck -- looks interesting. "Documentary" misspelled, fwiw.
Re:AWS Storage Gateway on Wednesday January 25, 2012 @12:31PM (#3510673)
Note that the $125 "gateway" fee is minor compared with the storage/transfer fees themselves - $0.14/GB/month for storage, for example. At that rate, a small 5 TB volume is already $700/month.
Re:Military software predicts Greek default on Monday July 18, 2011 @12:43PM (#2776979)
I stopped reading after glancing at the caption underneath the article's image:

"Wherever Senturion is housed it probably looks a lot like this, but more ominous and with blinkier lights."

That this statement is less than rigorous doesn't speak well for the remainder of the article.

The article seems to imply that you need a desktop app installed to extract fully-qualified URLs from the open application. I wonder why a better alternative wouldn't be to embed an encoded URL as part of the webpage itself, have the phone extract the URL from the image? Essentially a steganography-meets-QR code approach.
Re:Ask HN: Who's hiring? (September 2010) on Friday September 03, 2010 @04:53PM (#1661125)
Python/Java/Flash - Atlanta, GA Turner Broadcasting System

We're looking for both entry-level and experienced developers to help in building out existing video frameworks (playback, transcoding, streaming, etc.) that support several large Internet properties. Contact info is in about.

Re:The never-ending finite loop on Monday August 02, 2010 @11:06PM (#1569968)
Ahh.. you're right, of course. What I wrote has an undefined termination condition, besides not being consistent with the original algo. Thanks.
Re:The never-ending finite loop on Monday August 02, 2010 @01:02PM (#1568178)
And you could save an additional character by changing the loop test to a+b form, i.e.:

int i,x[99];for(x[98]=i=1;x+98;)i*=!++x[i++];

The other array references are l-values.