Skip to content

Instantly share code, notes, and snippets.

View geekodour's full-sized avatar
🐧
who are you and why are you here. tell me.

Hrishikesh Barman geekodour

🐧
who are you and why are you here. tell me.
View GitHub Profile
#!/usr/bin/env bash
# Specify the directory where you want to perform the renaming
directory="."
# Move to the specified directory
cd "$directory" || exit
# Loop through all files in the directory
for file in *; do
for num in range(1, 101):
if num % 3 == 0 and num % 5 == 0:
print("CracklePop")
elif num % 3 == 0:
print("Crackle")
elif num % 5 == 0:
print("Pop")
else:
print(num)
@geekodour
geekodour / comparision_whispercpp_faster_whisper.org
Last active August 23, 2023 13:16
whisper.cpp vs faster-whisper using ctranslate2

This is comparison between whisper.cpp and faster-whisper. The faster-whisper readme has some benchmarks on the readme but wanted to test it myself. For whisper, I just ran manually. For faster-whisper, wrote this small script

whisper.cpp

  • ./main -bs 5 -p 2 -f steve2.wav -m models/ggml-small.en.bin
    • Total 8 CPU threads on my 12 core machine
    • -bs 2 : actually performs better about 10s faster.
let
pkgs = import <nixpkgs> {};
pyPackages = pkgs.python310Packages;
fhs = pkgs.buildFHSUserEnv {
name = "normalfsshell";
runScript = "bash";
};
in
pkgs.mkShell {
name = "py";
@geekodour
geekodour / c.md
Last active October 13, 2024 03:34
security and privacy guides backup
@geekodour
geekodour / info.txt
Created May 29, 2020 19:56
instant vector with time
- QUERY: prometheus_http_requests_total
- REQ: http://localhost:9090/api/v1/query?query=prometheus_http_requests_total&time=1590782145.245

Things that programmers don't know but should

(A book that I might eventually write!)

Gary Bernhardt

I imagine each of these chapters being about 2,000 words, making the whole book about the size of a small novel. For comparison, articles in large papers like the New York Times average about 1,200 words. Each topic gets whatever level of detail I can fit into that space. For simple topics, that's a lot of space: I can probably walk through a very basic, but working, implementation of the IP protocol.

@geekodour
geekodour / memory_layout.md
Created March 13, 2020 08:00 — forked from CMCDragonkai/memory_layout.md
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
# NOTE: This is the trimmed down main.workflow for prometheus/prometheus
workflow "Start benchmark" {
on = "issue_comment"
resolves = ["start_benchmark"]
}
workflow "Cancel benchmark" {
on = "issue_comment"
resolves = ["cancel_benchmark"]
#!/bin/bash
# Setting -x is absolutely forbidden as it could leak the GitHub token.
set -uo pipefail
# GITHUB_TOKEN required scope: repo.repo_public
# prombench related
ghactions_dir="ghactions"
org="testpromorg"