Tux Machines

Programming Leftovers

Posted by Roy Schestowitz on Sep 16, 2023

=> today's leftovers | New services aren’t only Twitter replacements

Histograms with Two or More Variables in R

=> ↺ Histograms with Two or More Variables in R

Histograms are powerful tools for visualizing the distribution of a single variable, but what if you want to compare the distributions of two variables side by side? In this blog post, we’ll explore how to create a histogram of two variables in R, a popular programming language for data analysis and visualization.
We’ll cover various scenarios, from basic histograms to more advanced techniques, and explain the code step by step in simple terms. So, grab your favorite dataset or generate some random data, and let’s dive into the world of dual-variable histograms!

Truthiness in C

=> ↺ Truthiness in C

This week someone mentioned that C supports casting from int to bool. That naturally triggered my curiosity – what does the generated code look like?
First I think it’s important to point out most casts in C are “free”. “Free” in the sense that the compiler changes its internal understanding of an expression. But in actual assembly nothing really changes – registers don’t have types. (NB: architecture dependent)

Insuring that my URL server and client programs exit after problems

=> ↺ Insuring that my URL server and client programs exit after problems

I recently wrote about my new simple system to open URLs on my desktop from remote machines, where a Python client (on the remote server) listens on a Unix domain socket for URLs that programs (like mail clients) want opened, and reports these URLs to the server on my desktop, which passes them to my browser. The server and client communicate over SSH; the server starts by SSH'ing to the remote machine and running the client. On my desktop, I run the server in a terminal window, because that's the easy approach.

Using Selenium & Chrome to automatically download Blob files

=> ↺ Using Selenium & Chrome to automatically download Blob files

The Selenium WebDriver is a brilliant way to programmatically interact with websites. You can write little Python scripts which can click around inside browser windows and do "stuff".

=> gemini.tuxmachines.org

Proxy Information
Original URL
gemini://gemini.tuxmachines.org/n/2023/09/16/Programming_Leftovers.1.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en-GB
Capsule Response Time
143.002161 milliseconds
Gemini-to-HTML Time
0.572992 milliseconds

This content has been proxied by September (ba2dc).