Programming Leftovers
-
Rlang ☛ Unveiling the Earliest Date: A Journey Through R
Greetings, fellow data enthusiasts! Today, we embark on a quest to uncover the earliest date lurking within a column of dates using the power of R. Whether you’re a seasoned R programmer or a curious newcomer, fear not, for we shall navigate through this journey step by step, unraveling the mysteries of date manipulation along the way.
Imagine you have a dataset filled with dates, and you’re tasked with finding the earliest one among them. How would you tackle this challenge? Fear not, for R comes to our rescue with its arsenal of functions and packages.
-
Julia Evans ☛ Inside .git
Hello! I posted a comic on Mastodon this week about what’s in the .git directory and someone requested a text version, so here it is. I added some extra notes too. First, here’s the image. It’s a ~15 word explanation of each part of your .git directory.
-
University of Toronto ☛ In Go, I'm going to avoid using 'any' as an actual type
But after Go generics became a thing, there's been a trend of using this new 'any' alias outside of generic types, instead of writing out 'interface{}'. I don't think this is a good idea. To show why, consider the following two function signatures, both of which use 'any': [...]
-
SusamPal ☛ Quicksort with Jenkins for Fun and No Profit
I first encountered Jenkins in 2007 while contributing to the Apache Nutch project. It was called Hudson back then. The nightly builds for the project ran on Hudson at that time. I remember sifting through my emails and reviewing build result notifications to keep an eye on the patches that got merged into the trunk everyday. Yes, patches and trunk! We were still using SVN back then. Hudson was renamed to Jenkins in 2011.
Since version 2.0 (released on 20 Apr 2016), Jenkins supports pipeline scripts written in Groovy as a first-class entity. A pipeline script effectively defines the build job. It can define build properties, build stages, build steps, etc. It can even invoke other build jobs, including itself.
Wait! If a pipeline can invoke itself, can we, perhaps, solve a recursive problem with it? Absolutely! This is precisely what we are going to do in this post. We are going to implement quicksort as a Jenkins pipeline for fun and not a whit of profit!
-
[Repeat] HowTo Forge ☛ How to Create a New Branch in GIT
Git is a distributed version control system used for tracking changes in source code during software development. It supports collaboration, allowing multiple developers to work on different parts of a project simultaneously. Git is known for its speed, data integrity, and support for non-linear workflows.
-
Rlang ☛ Mastering Date Calculations in R: A Guide to Calculating Months with Base R and lubridate
Greetings fellow R enthusiasts! Today, let’s dive into the fascinating world of date calculations. Whether you’re a data scientist, analyst, or just someone who loves coding in R, understanding how to calculate the number of months between dates is a valuable skill. In this blog post, we’ll explore two approaches using both base R and the lubridate package, ensuring you have the tools to tackle any date-related challenge that comes your way.
-
Python
-
Juha-Matti Santala ☛ Python Bytes featured Syntax Error
I’m awestruck. I absolutely love Python Bytes as it’s such a great podcast to learn about new stuff and different tools and libraries and events in the Python world in a bite-sized format. And to have one my own creations as one of those things to learn about is just wonderful.
-
Abhinav Gopalakrishnan ☛ Jinja gotcha
I had been stuck on a weird issue at work for an hour or so. And got nowhere until I did what thought was total nonsense which turned out to be the solution.
Jinja is pretty common templating engine to use in Python.
To the uninformed, basically you can pass in data to html templates to generate html.
-
-
Shell/Bash/Zsh/Ksh
-
Bill Mill ☛ profiling zsh startup
zsh has a built-in profiler, which is very handy. Before I ran it, my shell startup was about 373ms: [...]
-
[Old] Big Binary LLC ☛ Profiling your zsh setup with zprof
While using frameworks like oh-my-zsh to upgrade your shell, it is pretty easy to get carried away with all the available plugins. This can eventually take a toll on your shell’s performance. One significant way it can affect your workflow is by slowing everything down. The more number of items you add to your .zshrc file, the more time your shell would need to start up. Profiling your shell is a good start to figuring out what is slowing it down.
-
-
Education
-
Raspberry Pi ☛ Our third (ish) birthday is coming up!
In February and March, Raspberry Pi community events all over the world will be celebrating our upcoming twelfth birthday, which is also our very special third leap birthday. It turns out that when you launch a product on 29 February, every four years you have a great excuse to make the celebrations extra special.
-