- Printing Photos from the Linux Command Line Here’s a handy script that lets you leave your printer in its default mode (i.e. configured for printing ordinary documents on letter or A4) but also print photos from the command line. The handy thing here is you can then skip the annoyance of manually editing a bunch of printing menus to configure the paper size, tray, glossy paper, DPI, 4x6” page size, and a specific color profile.
- Backing up Postgres Databases with Docker Docker is a pretty good abstraction, but has it some leaks. Today I was trying to deploy a test Postgres database with some data stored in it, and ran into problems shipping the data around between my machines using Docker.
- Symmetric Encryption in Python Hashing strings is useful for creating unique identifiers for strings, blobs of data, etc. In Python, it’s sometimes handy to make your own hashing function from AES. Here’s a brief snippet of how to do that for short messages. Kind of fun!
- Nodemon HTTP Server While playing with three.js today, I needed a hot-reloading JS webserver in a real hurry to serve out content. Here’s how to start a server at http://localhost:8080/ in just three lines:
- Preferring Quantiles to Histograms The histogram is most scientists’ tool of choice for viewing the distribution of values of a single variable. But lately I have been exploring an alternative: quantiles (e.g. deciles, percentiles, etc). Although viewing data in this way is not perfect, it has several advantages to histograms, including robustness to outliers and a freedom from apriori assumptions about the range or smoothing level of the data.
- Jupyter Quick Install for Scientists Python is a good language, but its tooling (like pip, conda, setup.py, setup.cfg, requirements.txt, and the awkward support for binaries needed for libraries like scipy, keras, etc), leaves much to be desired. And for most scientists, it’s simply not interesting using all these build tools when you just want to get coding quickly on a new machine.
- Automatic CSV to SQL ETL in Clojure This is another basic example to help beginners get started in Clojure, which is still my favorite programming language, almost 10 years after I first started using it. Like all languages, Clojure has some warts. But it also has a lot of very powerful and abstract concepts that many average programmers have not seen before, and like most mathematical concepts, the power of such abstractions are greatly underestimated by many people. Even fancy-sounding but easy-to-understand concepts like homoiconicity are still really underappreciated in the programming community.
- Notes on CSS Popup Tooltips Front-end website development is not my strongest area, so I’m just going to share some notes I took on how to make a hover “tooltip” on some text using CSS. I have a feeling this will come up again as handy sometime.
- Python CSV Load Times and the Feather Format One of the most common data science tasks is loading structured data in tabular form. For “small data”, a popular format is often Comma-Separated-Value (CSV), which nearly everybody can read and write correctly. For so-called “big data”, one often needs a database, preferably SQL database like Postgres, or if the dataset gets very large, then often NoSQL becomes the only practical choice. Well, what do you do when you have “medium data”? Data that is still small enough to fit on a single computer, but is too large to load into memory?
- Composite Robot Construction This article describes the progress of a fiber-reinforced polymer monopod robot that I built over a period of about 30 days. My hope is that seeing some of the successes and failures I encountered will help you build your own composite robots. Foam and fiberglass are very versatile materials that are just as accessible to garage-level workshops as they are to research institutions, as I hope you will see.
- Loading CSVs in Clojure Loading CSVs in Clojure is really easy using clojure.data.csv. Depending on what you will do with the data, you can either represent it in tabular form (as a vector of vectors), or as a list of hashmaps. Both approaches have their advantages and disadvantages, and here are some very stock functions for how to achieve that:
- A Localhost Swagger Editor I’ve always edited swagger docs using the online editor, but thanks to docker, you may run it locally with equal ease:
- A Metta Meditation Sometimes, the best thing to do when you hear a good idea is just to pass it on.
- Connecting a Clojure REPL to a PostgreSQL Docker Container In this tutorial, we’ll launch Postgres (a.k.a. PostgreSQL) in a Docker container, create a Postgres database, and connect to it from a Clojure REPL. Postgres is a great open source SQL database with a long history, and is a good choice for many small-to-medium scale projects.
- Packaging and Running Clojure Apps Locally with Docker This is just a simple tutorial on how to package and deploy a Clojure application to a Docker file, which can then be deployed locally, on a server, or in the cloud.
- Adding Page Numbers to PDFs This is just a post to share a simple bash script for automatically adding page numbers to PDF files. It’s particularly handy when you need to renumber a new document that is the concatenation of multiple scanned PDFs that were concatenated using pdfunite, a useful command line tool on Debian.
- Layered Tetrahedral Geometric Structures This article describes another iteration of the dome-like structure that I discussed a few months ago. I still don’t have a good vocabulary for describing why I think these things are neat, except to say that I somehow find it relaxing to work on toy engineering problems once or twice a month. I guess de gustibus non est disputandum – “there’s no accounting for (bad) taste!”
- The Reinforced Pentakis Dodecahedron Dome For your amusement, I would like to present a reinforced version of a geodesic dome that is many times stronger than conventional geodesic domes. It is essentially two concentric domes, one nested inside the other, connected entirely by tetrahedra in a way that both strengthens the dome and provides space for insulation. Compared to single-layer geodesic structures, this new structure uses about 2-3x more materials, but it is so much stronger that it is startling.
- Introduction to Geometric Algebra, Part 1 Geometric Algebra (GA) is one of those things that we should have all learned in high school because it would have made physics and mathematics in college so much easier.
- Hyperbolic Geometry & Special Relativity While studying An Introduction to Particle Physics on a recent flight to Japan – studying math that is way above my head is a nerdy hobby of mine – I came across a simple viewpoint on special relativity that really stunned me:
- Reviving the Dead...Content From 2003 until 2016, I had a personal website at roboloco.net. It lasted until last year, when I finally grew tired of upgrading applications, keeping comments free of spam, and the servers secure from hackers and the occasional website defacement. Thank you, GitHub, for providing this terrible sysadmin a free place to store this content, and one that requires no regular maintanance!