RSSAmplifier

Blog

Brenton Mallen

Recent content on Brenton Mallen

brentonmallen.comRSS feed ↗16 posts

Latest posts

The Weight of "Just"

“Can’t you just retrain the model?” I’ve heard some version of this sentence more times than I can count, and if I’m being honest, I’ve said my fair share of them too. It sounds harmless. Its usage has become so common that its presence seems to go unnoticed, but it’s already doing damage, because under that “just” sits an iceberg: figuring out…

AI RPG Encounter Generator: RAG Chain Tutorial

Intro This is meant to be somewhat of a tutorial/demonstration on an approach to putting together a Retrieval Augmented Generation (RAG) chain with a fun application of using it to generate situation appropriate encounters for a tabletop role playing game (TTRPG). At the moment, and as presented here, a ‘full encounter plan’ isn’t really generated as much as a list of suggested…

Visual Music Records

Inspiration A while ago I had come across this product that was a display of the average color of each frame in a movie shown as vertical lines. The idea was that, as you moved from left to right, you’d be scrubbing through the movie in time and seeing how the colors and mood change as the film progresses. In certain films, you would be able to even point out some of your favorite scenes.

Circular QR Code in Python

Note: This code is using v7.3.1 of the python-qrcode library. import qrcode from PIL import Image, ImageDraw from qrcode.image.styledpil import StyledPilImage from qrcode.image.styles.moduledrawers import ( CircleModuleDrawer, SquareModuleDrawer ) import matplotlib.pyplot as plt % matplotlib inline def show_qr (img): plt . figure(figsize = ( 5 , 5 )) plt . imshow(img) plt . axis( 'off' ) plt .…

(untitled)

About Me

I am an ocean engineer turned data scientist currently in the field of cybersecurity. I’m addicted to learning and I have way too many hobbies which include: painting, photography, astronomy, underwater acoustics, oceanography, music, metal fabrication, 3D printing, crochet, golf, tabletop boardgames and many more.

Underwater Acoustic Ray Tracing

rat_trace_blog Underwater Acoustic Ray Tracing in the SOFAR Channel using Python In grad school, one homework assignment we had was to perform an acoustic ray trace of the SOFAR channel. This was done in MATLAB and I wanted to revisit it for a couple of reasons: MATLAB isn't really accessible (there is octave, but I feel python is much more approachable) and I miss working with acoustics every now…

Recaman Animation using Matplotlib

Making Gifs with Matplotlib and Recaman Making Gifs with Matplotlib and Recaman This notebook is meant to be a tutorial on generating an animated gif using matplotlib. The subject to be animated is an implementation of the Racaman Sequence .

My Journey to Data Science

After being in the data science field for some years now, I thought it would be good to take a moment to write about how I got here since, in my opinion, my journey has been somewhat atypical and it’s always good to remember where you started. My journey started in college where I first entered as an Electrical Engineering major but midway through my sophomore year I switched over to Ocean…

Adding Multiple Global Secondary Indexes to a DynamoDB Table in CloudFormation

So, you’ve decided to use AWS CloudFormation to make your stack reproducible, iterable and integrate it into a CI/CD pipeline (maybe using CloudPipeline?). Your stack uses DynamoDB tables and, in order to increase efficiency (or other reasons), you’ve decided to use Global Secondary Indexes (GSIs). You can define the table and a single GSI in the CloudFormation template file, but…

I Built a 3D Printer

For a while, I had been wanting to take on a project but I couldn’t decide what I wanted to do. One thing lead to another and I settled on the idea of building a 3D printer. I shopped around online for a kit and found this one. Three days after (including going through customs) what seemed to be a very shady online purchase, this box arrived at my door.

Basic Image Segmentation Using Python and Scikit-Image

This is a quick look at the technique I used when competing in the Kaggle Galaxy Zoo competition a while back ( https://www.kaggle.com/c/galaxy-zoo-the-galaxy-challenge) . I thought it would be a helpful, basic look into using scikit image for image segmentation. The image segmentation technique here is performed by identifying a region of interest (ROI) and creating a mask that will be used to…

An Engineer's Journey to Art (so far)

I am currently a Data Scientist but my degrees are in Ocean Engineering with a focus in underwater acoustic signal and image processing. I mention this only to convey that my mind is a logical one and it always has been. As far back as I can remember, I was tinkering, building and taking things apart just to prove that manufacturers always put in extra screws. Which is why I went into a more logic…

Increase MapReduce Heap Size Using Boto

You might find yourself needing to increase the maximum memory available for MapReduce jobs in AWS. This could be because you received a 143 exit code or for some other reason. To increase the heap size in boto, you can add the following Bootstrap Action to the cluster: Verions: boto 2.38.0 , python 2.7 # Specify the heap size in MB clusterHeapMB = 4000 # Add this to the list of Bootstrap Actions…

AWS EMR Cluster Class Using Boto

I’ve been working with boto for a little while now, and while I know that there are quite a few examples out there on how to spin up an AWS EMR cluster, I couldn’t find anything that put everything together. With that in mind, I present a python class which provides the user with the means to edit cluster attributes, add steps, start a cluster, ssh into the cluster as well as terminate…

Publications and Presentations

Publications Masters Thesis: Proud Elastic Target Discrimination Using Low-Frequency Sonar Signatures U.S. Navy Journal of Underwater Acoustics: B.J. Mallen, P. J. Beaujean, and J. Gazagnaire, “Proud Elastic Target Discrimination Using Low-Frequency Sonar Signatures,” JUA 62(1), 102-118.* Presentations PyData NYC 2015: Global Botnet Detector Triangle AI Meetup | TriPython Meetup: Data Science:…