hrbrmstr's Daily Drop

Share this post

Drop #131 (2022-11-02): Quick Drop Edition

dailyfinds.hrbrmstr.dev

Drop #131 (2022-11-02): Quick Drop Edition

Should We Really Be Messing with Asteroid Orbits?; Binding On Port 0; SPyQL: Command-line Data Analytics

boB Rudis
Nov 2, 2022
1
Share this post

Drop #131 (2022-11-02): Quick Drop Edition

dailyfinds.hrbrmstr.dev

I'm not passing up an offer for a pre-work breakfast outing with @mrshrbrmstr (who usually WFH on Wednesdays), so you get to do some work for today's drop by heading straight to the links with minimal expository. First-run, freshly baked sesame bagels FTW!

Should We Really Be Messing with Asteroid Orbits?

Bombardment of Earth (TV) | The Expanse Wiki | Fandom

My first thought after we humans decided to cosplay Marco Inaros this past September was, "should we really be doing that?". What if we just doomed a civilization on another planet with our desire to poke at flying rocks?

Caleb Scharf, director of astrobiology at Columbia University, has thoughts on the matter as well, which is 100% worth a read, though we'll likely ignore his cautionary tale.

Share

Binding On Port 0

steel wool photography during nighttime
Photo by Jeremy Perkins on Unsplash

Did you know that if you're starting a network server process and have it bind to port 0, most decent operating systems will pick an unused one from an ephemeral port range for you? I did not. Evan Klitzke did, and his short post is worth a gander to learn a bit more about this feature and how you can make the best use of it.

Leave a comment

SPyQL: Command-line Data Analytics

I'm definitely getting soft as the elder years approach since the number of Python resources in these newsletters far outweigh those of the R world (truth be told, if CRAN made it easier for R packages to work as command line tools vs waste time obsessing over opaque inane rules, I'd be more willing to drop R bits here).

If you'd like to be able to use the nigh universal SQL language (and, optional, crufty Python code) from the command line to work with arbitrary data files like this:

$ spyql "SELECT * FROM csv('sample.csv') LIMIT 1 TO json(indent=2)"
{
  "radio": "GSM",
  "mcc": 262,
  "net": 2,
  "area": 852,
  "cell": 2521,
  "unit": 0,
  "lon": 10.948628,
  "lat": 50.170324,
  "range": 15762,
  "samples": 200,
  "changeable": 1,
  "created": 1294561074,
  "updated": 1662692508,
  "averageSignal": 0
}

or, get a quick plot of some summary data via (line breaks for visual clarity):

$ spyql "SELECT radio, count_agg(*) AS n FROM csv('sample.csv') 
  GROUP BY 1 ORDER BY 2 DESC TO json" | plt "bar(radio, n)"

with a little help, then you might like Daniel Moura's (@daniel_c_moura) SPyQL [GH]. Daniel's post has all the deets, and I suspect this could become a handy tool for some readers.

FIN

I'll make sure to save some 🥯 for the rest of you! ☮

Share

Share this post

Drop #131 (2022-11-02): Quick Drop Edition

dailyfinds.hrbrmstr.dev
Previous
Next
Comments
TopNewCommunity

No posts

Ready for more?

© 2023 boB Rudis
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing