Skip to content

Instantly share code, notes, and snippets.

View disouzam's full-sized avatar
🚲

Dickson Souza disouzam

🚲
View GitHub Profile
@disouzam
disouzam / prepare-commit-msg
Last active July 21, 2026 02:19
Prepare commit message - Hook
#!/bin/sh
# Source - https://stackoverflow.com/a/68879891
# Posted by CarloDePieri, modified by community. See post 'Timeline' for change history
# Retrieved 2026-07-19, License - CC BY-SA 4.0
echo "First parameter: $1"
echo "Second parameter: $2"
echo "Third parameter: $3"
# The file containing the default commit message
@disouzam
disouzam / better-todo-tree.vscode.json
Last active July 14, 2026 11:28
Better Todo Tree VS Code extension settings
{
"better-todo-tree.general.tags": [
"BUG",
"HACK",
"FIXME",
"TODO",
"XXX",
"[ ]",
"[x]",
"noqa"
@disouzam
disouzam / git_cmd.sh
Created June 29, 2026 11:55
Get markdown summary of merge commits
#!/bin/bash
function gitmd() {
local ref="${1:-HEAD}"
local outfile="$2"
# Colors (terminal only)
local BOLD="\033[1m"
local RESET="\033[0m"
local CYAN="\033[36m"
@disouzam
disouzam / check_status_periodically.sh
Created June 28, 2026 16:15
Scripts to run and monitor Cosmic Ray execution (being built for pycalphad)
#!/bin/bash
# This script checks the status of mutation testing at a configurable interval (default: 90 seconds).
interval_seconds="${1:-90}"
if ! [[ "$interval_seconds" =~ ^[0-9]+$ ]] || [[ "$interval_seconds" -le 0 ]]; then
echo "Usage: $0 [interval_seconds]"
exit 1
fi
prev_complete=""
@disouzam
disouzam / Microsoft.PowerShell_profile.ps1
Last active June 12, 2026 15:05
PowerShell profile and functions
# https://lazyadmin.nl/powershell/powershell-profile/
# Set Default location
Set-Location C:\
function Install-Python-Dependencies {
# https://www.w3tutorials.net/blog/utf8-script-in-powershell-outputs-incorrect-characters/
# Set output encoding to UTF-8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
# Set input encoding to UTF-8 (for reading user input with non-ASCII chars)
@disouzam
disouzam / Unblock-Files.ps1
Created April 5, 2026 23:25
Unblock File Preview in Windows Explorer
# https://learn.microsoft.com/en-us/answers/questions/5682431/how-to-make-the-previewer-work-again
Get-ChildItem . -Recurse | Unblock-File
@disouzam
disouzam / HaltonSequencer.cs
Created March 2, 2026 01:42 — forked from michael-sacco/HaltonSequencer.cs
A demonstration of Halton Sequencing Quasirandom Noise
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Note that the Halton bases must consist of coprime integers.
// Learn more about the Halton sequence: https://en.wikipedia.org/wiki/Halton_sequence
// Learn more about low discrepancy sequences: https://en.wikipedia.org/wiki/Low-discrepancy_sequence
// Learn more about coprime numbers: https://en.wikipedia.org/wiki/Coprime_integers
@disouzam
disouzam / microgpt.py
Created March 1, 2026 21:35 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@disouzam
disouzam / processa_microdados_sus_sih_rd
Created February 1, 2026 00:21 — forked from fernandobarbalho/processa_microdados_sus_sih_rd
Script para gerar arquivos com dados anuais de internação hospitalar do sus
library(microdatasus)
library(tidyverse)
estados<- c("AC","AL","AM", "AP", "BA","CE","DF","ES","GO","MA","MT","MS","MG","PA","PB", "PR","PE","PI","RJ","RS","RN","RO","RR","SC","SP","SE","TO")
download.file("ftp://ftp.datasus.gov.br/dissemin/publicos/SIHSUS/200801_/Doc/IT_SIHSUS_1603.pdf", destfile = "documentacao.pdf", mode= "wb", method = "libcurl" )
@disouzam
disouzam / .gitignore
Last active February 3, 2026 10:13
VS Code User settings
.vscode/