Skip to content

Instantly share code, notes, and snippets.

@b-mq
b-mq / reverse_csv.py
Last active January 13, 2025 13:11
reverse a csv file into new _reversed file (by keeping the header row) in python
"""
This script reads a CSV file, reverses the order of its rows (except for the header),
and writes the reversed content to a new CSV file '<input_csv>_reversed'.
"""
from pathlib import Path
import sys
def app():
// simple glsl ellipse function based on circle form BookOfShaders (https://thebookofshaders.com/07/)
float ellipse(in vec2 st, in vec2 position, in float radius, in float feather, in vec2 aspectratio){
// receive bigger of both numbers from aspect ratio
float max_val = max(aspectratio.x, aspectratio.y);
// clamping the aspect ratio ensures that the ellipse will deform but won't scale
// scaling should only result via changing the radius
vec2 clamped_ar = aspectratio / max_val;