Skip to content

Instantly share code, notes, and snippets.

View robcowie's full-sized avatar

Rob Cowie robcowie

  • Recycleye
  • Leeds/London, United Kingdom
View GitHub Profile
@UranusSeven
UranusSeven / README.md
Last active August 31, 2023 00:16
Benchmark pandas 2.0.0 with TPC-H

The TPC-H is a decision support benchmark. It consists of a suite of business oriented ad-hoc queries and concurrent data modifications.

Pandas 2.0.0 RC0 and RC1 has been released. According to the release notes, the main new features in 2.0.0 focus on performance improvement.

The benchmark runs on my laptop:

MacBook Pro (16-inch, 2021)
Chip Apple M1 Max
Memory 32 GB
@mva-verbit
mva-verbit / gh-alerts.sh
Created November 3, 2021 14:09
display open GitHub Security Alerts with high/critical severity
#!/bin/bash
set -e
REQUIREMENTS="gh"
for CMD in ${REQUIREMENTS};do
if ! command -v $CMD &> /dev/null
then
echo "Please install $CMD"
exit 1
@andrewssobral
andrewssobral / agx_xavier_tips-and-tricks.md
Last active April 12, 2024 18:21
Tips and Tricks for Jetson AGX Xavier
@joelonsql
joelonsql / decode_asn1_der.sql
Created December 3, 2020 22:45
ASN.1 DER Decoder using PostgreSQL Recursive CTEs
CREATE OR REPLACE FUNCTION decode_asn1_der(asn1der bytea)
RETURNS TABLE (
type_tag char(2),
length integer,
value bytea
)
LANGUAGE sql
AS $$
WITH RECURSIVE X AS (
SELECT
@dornfeder
dornfeder / Readme.md
Last active January 24, 2024 09:38
Git Branching Diagram Template

Git Branching Diagram Template for diagrams.net

This is my own variant of a git branching diagram template based on Bryan Braun's great template.

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/dornfeder/13abff279de357f048e474d4ed6c692d/raw/f5efc838bd34429e59e38063bd348b7a86457d18/git-diagram-template.xml
  4. Customize as needed for your team.
@adujardin
adujardin / clean_jetson.sh
Last active February 20, 2024 10:35
Script to remove unnecessary stuffs from the Jetson to save disk space (WIP)
# https://elinux.org/Jetson/FAQ/BSP/RootFS_Reduction#Remove_installed_deb_packages
## Step 1, safe
sudo apt update
sudo apt autoremove -y
sudo apt clean
sudo apt remove thunderbird libreoffice-* -y
## Step 2, still safe but not recommended for dev use
# samples
@bryanbraun
bryanbraun / git-branching-diagram.md
Last active April 16, 2024 14:18
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

Easy Scala Publication

The following describes how you can publish artifacts for any sbt project using the GitHub Package Registry and the sbt-github-packages plugin.

Step 1: Create a GitHub Token

In your GitHub account, go to Settings > Developer settings > Personal access tokens, then click on Generate new token (or click here). Fill in some sort of meaningful name (I chose Dev) and click on the write:packages checkbox:

the new personal access token page with the above steps having been followed

@dedsm
dedsm / app.py
Last active October 12, 2021 03:32
Fastapi cache setup
from .initialize import setup_cache
from .connections import connection
@app.on_event('startup')
async def setup_connections():
await setup_cache()
@app.middleware("http")
async def connections_middleware(request, call_next):