Ted Laderas
@tladeras.bsky.social
2.4K followers 560 following 200 posts
Director of Training/Community at the Data Science Lab at Fred Hutch. Former OHSU, DNAnexus. Posit Data Science Mentor (when I have the time) #bioinformatics, #datascience, #teaching, and #ambientmusic. https://laderast.github.io
Posts Media Videos Starter Packs
Reposted by Ted Laderas
brandonrohrer.com
New post: Controlling IP traffic on your webserver

A cool part about having your own webserver is that you get to choose who can visit. When IP addresses try to access sensitive files or aggressively scrape, you can just block them.

Here's how.

brandonrohrer.com/hosting5.html
Block an IP address
The most straightforward way to block and IP address is in the firewall. It is the tool build specifically for this.

To block the address 101.101.101.101, run from the command line


sudo ufw insert 1 deny from 101.101.101.101

This instructs ufw (the Uncomplicated FireWall) to insert a rule at the the top of the list (position 1) to deny all incoming traffic from the address. After running this, no restart of the firewall is needed. The rule is active. (ufw docs

The position 1 is important because in ufw, the first rule that matches is applied. If there was a rule to allow all addresses that started with 101. and that rule came before the deny rule, then the deny rule would never be reached.

While it's possible to block specific ports, or even to block an IP address from seeing particular pages, complex rules and conditions get difficult to analyze very quickly, and can lead to cases where there are loopholes. Use fancy rule combinations sparingly.

Parse logs
In their raw form access logs are technically human-readable, but they are a lot. I found it really useful to do a little parsing to pull out the bits I'm interested in. (I'm working with the default nginx log format, so adjust this according to your own.)

I wrote a script to take advantage of the repeatable structure of these logs to dissect them into their parts. It uses tricks like splitting the log based on brackets and spaces. It productes a pandas dataframe with columns containing the IP address, requested URI, HTTP status code, and every component of the date and time.
tladeras.bsky.social
If you like dogs and you like horror films, I highly recommend "Good Boy". A great horror film from a dog's perspective. Really refreshing and different, and amazing to see how they shot it with the director's dog, Indy.

Note: nothing bad happens to the dog.
Reposted by Ted Laderas
andrew.heiss.phd
Just discovered the {gm} package, which lets you programmatically create sheet music (and audio!) with #rstats (with MuseScore as the backend) flujoo.github.io/gm/index.html
library(dplyr)
library(gm)

golden <- tribble(
  ~pitches,  ~duration,   ~lyric,
  "E4",      "q",         "I’m",
  "G4",      "q",         "done",
  "C5",      "q",         "hid-",
  "B4",      "q",         "-ing",
  "D4",      "q",         "now",
  "G4",      "q",         "I’m",
  "E5",      "q",         "shin-",
  "D5",      "q",         "-ing",
  "G4",      "q",         "like",
  "B4",      "q",         "I’m",
  "A5",      "q",         "born",
  "F#5",     "q/3*(q/8)", "to", 
  "G5",      "q/3",       "be._",
  "G5",      "h",         ""
)

music <- 
  Music() +
  Key(1) +
  Tempo(125) +
  Meter(2, 4) +
  Line(pitches = golden$pitches, durations = golden$duration) + 
  Tie(13) +
  Lyric(golden$lyric[1], 1) + Lyric(golden$lyric[2], 2) + 
  Lyric(golden$lyric[3], 3) + Lyric(golden$lyric[4], 4) + 
  Lyric(golden$lyric[5], 5) + Lyric(golden$lyric[6], 6) +
  Lyric(golden$lyric[7], 7) + Lyric(golden$lyric[8], 8) + 
  Lyric(golden$lyric[9], 9) + Lyric(golden$lyric[10], 10) + 
  Lyric(golden$lyric[11], 11) + Lyric(golden$lyric[12], 12) +
  Lyric(golden$lyric[13], 13)

show(music) The first part of the bridge from "Golden" from KPop Demon Hunters
tladeras.bsky.social
It's Bandcamp Friday (which means that 100% of your purchases go to me), and I'm releasing a new live album called *I play better when no one's watching*. Soothing ambient music written for an art fellow's reception:

Check it out here: ooray.bandcamp.com/album/i-play...
I play better when no one's watching, by The OO-Ray
10 track album
ooray.bandcamp.com
tladeras.bsky.social
Is this a silly idea or not? Thinking about putting together a simplified and lightweight learning management system (LMS) using #rstats / #shiny / #surveydown
Reposted by Ted Laderas
openscapes.bsky.social
📣 Come work @openscapes.bsky.social ! We're looking for a NASA Openscapes Team Member to improve access & use of NASA suborbital data thru reproducible notebook clinics. Apply by October 26, 2025. Start December 2025.

Details including pay rate: openscapes.org/connect#work...
Please share!
connect – Openscapes
openscapes.org
tladeras.bsky.social
Not Proud/Proud of coining the term "YOLO merging".

(at least in our group - I'm sure someone else has used this)
tladeras.bsky.social
You cannot unsee this
tladeras.bsky.social
Everything else works, including install.packages("tidyverse"). You may need to install "knitr" to get things to render
tladeras.bsky.social
It was actually a pretty straightforward process:

1. Install gdebi package manager,
2. install positron arm64 deb package.
3. Install R using instructions at R4Pi.org.
4. Install uv using instructions
5. Install Jupyter in project using uv
R for the Raspberry Pi
R4Pi.org
Reposted by Ted Laderas
wyden.senate.gov
Trump is launching an authoritarian takeover of Portland hoping to provoke conflict in my hometown. I urge Oregonians to reject Trump’s attempt to incite violence in what we know is a vibrant and peaceful city. I will do everything in my power to protect the people in our state.
tladeras.bsky.social
It's actually going to be my dedicated Obsidian machine, but I thought I'd try to install Positron just to see if I could.
tladeras.bsky.social
It's bigger than a blackberry (it's about 5x7 inches/13x18 cm). But I do have to look over my glasses like an old person to read it. Probably because I am an old
tladeras.bsky.social
Yes, it works. Got tidyverse, quarto, and Jupyter all installed and it renders just fine.
tladeras.bsky.social
Positron running on a small Raspberry Pi CM5 computer (Hackberry pi). Why am I compelled to do things like this? #rstats #python #quartopub
tladeras.bsky.social
Inspired ny @libbyheeren.bsky.social, I made a bunch of hex sticker magnets. A relaxing morning arts and crafts type thing. Instructions here: libbyheeren.com/blog/2024-06...
Multiple hex stickers made into magnets.
tladeras.bsky.social
It didn't add boing boing sound effects and a slide whistle? INFERIOR AI
Reposted by Ted Laderas
grimalkina.bsky.social
I shared this earlier because I think it is so funny but then I also thought to myself, what advice would I (a learning scientist by background, married to someone who teaches programming) actually give a developer who feels bad reading this? How can you avoid writing this?

A few tips:
tladeras.bsky.social
Can verify that watching it stoned makes it 10x worse as well
tladeras.bsky.social
I figure "human made" will be the new bespoke.
tladeras.bsky.social
Tidy Dev Day was super fun! If you have extra day for PositConf, I highly recommend it. Managed to make two PRs that were merged. And I forgot to branch, but Jenny Bryan talked me down from the ledge. #PositConf2025
Reposted by Ted Laderas
tladeras.bsky.social
Finally @noamross.net talked about the rOpenSci Champions program and encouraging diverse contributors to rOpenSci. So cool that they had a 100% spanish cohort.