Task: Save Article to Markdown
Let’s use a small snippet to convert any article to Markdown. This might come in handy if you want to repost your articles to blogs that support Markdown like DEV.
Read the article Task: Save Article to MarkdownLet’s use a small snippet to convert any article to Markdown. This might come in handy if you want to repost your articles to blogs that support Markdown like DEV.
Read the article Task: Save Article to MarkdownLet’s run Jupyter notebooks in a Visual Studio Code development container, so we keep our host system clean and our development setup replicable. We’re building a scraper, so let’s add support for Puppeteer (pyppeteer) as well!
Read the article Jupyter Notebooks + VSCode Dev Container with Puppeteer supportLet’s face it: sometimes DateTime is just too much: you only want to deal with dates. Since .NET 6, we finally have support for DateOnly. In this blog I’ll look at how to interact with it and how to add it to your Swagger API docs.
Read the article DateOnly in your .NET 6 APIYou have a bunch of online services that let you take screenshots of a site and save them in a folder. While it can be very useful to pay for such a system, it is not so hard to create it. Let’s use Chrome / Chromium with Puppeteer and Node.js (cluster) to take some snapshots in no-time. We’ll use the Puppeteer Cluster package to run multiple threads / workers to grab those screens in parallel. We’ll be using TypeScript.
Read the article Task: take some website screenshots and put them in a folder (in parallel)The web is unreliable. Here’s a compact exponential back-off retry utility for TypeScript — one function, no dependencies, proportional jitter included.
Read the article Retry with Exponential Back-Off utility methodThis week we had to exfil some data out of a bucket with 5M+ of keys. After doing some calculations and testing with a Bash script that used AWS cli, we decided to go a more performant route and use s3p. They claim to be 5-50 times faster than AWS cli 😊.
Read the article Using the S3P API to copy 1.3M of 5M of AWS S3 keysPositional arguments like $1 and $2 are hard to read. This Bash pattern maps named options to explicitly allowed variables and validates the required input.
Read the article Named Arguments in a Bash ScriptYesterday we’ve encountered a curious problem: we needed use Spark to parse JSON data that was produced by AWS Kinesis. Unfortunately, the data was in a concatenated JSON format. Spark does not support that format, so we had to come up with something our selves.
Read the article Parsing JSON data from S3 (Kinesis) with SparkI love the group by SQL command, and sometimes I really miss these SQL-like functions in languages like JavaScript. In this article I explore how to group arrays into maps and how we can transform those maps into structures that work for us. We will leverage TypeScript generics to do transformation on data structures in such a way that the end-result remains strongly typed: this will make your code more maintainable.
Read the article Having fun grouping arrays into maps with TypeScriptWhile working in Databricks, I needed to plot some images. I wrote some code that does this in IPython notebooks, but nothing that works on a Dataframe. I decided to change the code a bit, so it works in Databricks. This solution uses PIL and Matplotlib.
Read the article Plotting a grid of images in Databricks