Programming Leftovers
-
Rlang ☛ Mastering gregexpr() in R: A Comprehensive Guide
If you’ve ever worked with text data in R, you know how important it is to have powerful tools for pattern matching. One such tool is the gregexpr() function. This function is incredibly useful when you need to find all occurrences of a pattern within a string. Today, we’ll go into how gregexpr() works, explore its syntax, and go through several examples to make things clear.
-
Rlang ☛ Positive or Negative in R
Positive or Negative in R, we will learn how to use the sign function in R to determine whether a numeric value is positive or negative.
The sign function returns the signs of numeric elements, with a value of 1 for positive numbers, 0 for zero, and -1 for negative numbers.
-
Lewis Dale ☛ Learning Go: Day Fourteen
In my last post, I managed to get static files bundled into my binary and deployed to the server, meaning I can easily create some HTML output. Now, I want to make that output actually something worthwhile.
-
dissertmake
Ian suggested I share the highly involved build process for my doctoral dissertation, which I submitted for examination earlier this year. Beyond just compiling a PDF from Markdown and LaTeX sources, there are just two, simple-seeming goals: produce a PDF that passes PDF/A validation, for long term archival, and replace the second page with a scanned copy of the page after it was signed by the examiners. Achieving these two things reproducibly turned out to require a lot of complexity.
First we build dissertation1.tex out of a number of LaTeX and Markdown files, and a Pandoc metadata.yml, using Pandoc in a Debian sid chroot. I had to do the latter because I needed a more recent Pandoc than was available in Debian stable at the time, and didn’t dare upgrade anything else. Indeed, after switching to the newer Pandoc, I carefully diff’d dissertation1.tex to ensure nothing other than what I needed had changed.
-
Python
-
The New Stack ☛ How and Why You Should Use Type Casting in Python
Type Casting is the process of converting an object from one data type to another.
-
SANS ☛ Another PDF Streams Example: Extracting JPEGs, (Fri, May 17th)
...I showed how to use my tools file-magic.py and myjson-filter.py together with my PDF analysis tool pdf-parser.py to analyze PDF streams en masse.
-
-
Rust
-
Rust Blog ☛ The Rust Programming Language Blog: Faster linking times on nightly on GNU/Linux using `rust-lld`
TL;DR: rustc will use
rust-lld
by default onx86_64-unknown-linux-gnu
on nightly to significantly reduce linking times.
-