Skip to content

Instantly share code, notes, and snippets.

View stefanpie's full-sized avatar
📡

Stefan Abi-Karam stefanpie

📡
View GitHub Profile
@stefanpie
stefanpie / .gdb_pp_vitis.py
Created April 27, 2025 16:53
GDB Pretty Print Debugging for Vitis HLS Types
import gdb.printing
class AP_INT:
def __init__(self, val, basic_type):
self.val = val
self.ta = int(val.type.template_argument(0))
self.signed = True if basic_type == "ap_int" else False
def to_string(self):
@stefanpie
stefanpie / gnnbuilder_neo_knn.h
Created December 11, 2024 09:45
HLS Kernel for a KNN Graph Builder
#pragma once
#include "gnnbuilder_neo_apfixed_utils.h"
#include "gnnbuilder_neo_array_utils.h"
// implement euclidean distance
template <typename T, int NUM_FEATURES>
T euclidean_distance(T_array_1d<T, NUM_FEATURES> x, T_array_1d<T, NUM_FEATURES> y) {
T sum = 0;
for (int i = 0; i < NUM_FEATURES; i++) {
for %%a in (*.mp3) do (
echo processing %%a
REM your ffmpeg command; Input file will be: %%a
REM If you need some output file name: %%~na.wav
ffmpeg -i "%%a" "%%~na.wav"
)
ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4