Skip to content

Instantly share code, notes, and snippets.

View pcnoic's full-sized avatar
🌍
Working from planet earth

Christos Alexiou pcnoic

🌍
Working from planet earth
View GitHub Profile
@pcnoic
pcnoic / .zshrc
Created March 12, 2024 12:30
.zshrc config
DEFAULT_USER="$(whoami)"
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
eval "$(goenv init -)"
export PATH="$GOROOT/bin:$PATH"
export PATH="$PATH:$GOPATH/bin"
# Aliases
@pcnoic
pcnoic / transcribe.py
Last active November 26, 2024 11:33
Transcribe audio using OpenAI
import argparse
import os
from openai import OpenAI
from pydub import AudioSegment
def chunk_audio_by_size(audio, max_size_bytes=25000000, target_duration_ms=60000):
"""
Splits an audio file into smaller chunks based on a maximum size limit.
Args:
@pcnoic
pcnoic / get_kubeconfigs.sh
Created August 26, 2024 09:01
Generate K8S configs for all GKE clusters under a GCP Project
#!/bin/bash
if ! command -v gcloud &> /dev/null
then
echo "gcloud could not be found. Please install the Google Cloud SDK."
exit 1
fi
if ! command -v kubectl &> /dev/null
then