Skip to content

Instantly share code, notes, and snippets.

@fsheikh
fsheikh / loop_ioctls.c
Created January 29, 2022 08:12
loopback-ioctls
#include <errno.h>
#include <fcntl.h>
#include <linux/loop.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <unistd.h>
// Sample program using loop interface to find a free loopback device
// in the system and send a bunch of ioctls to the found device.
// Please see: https://man7.org/linux/man-pages/man4/loop.4.html
@fsheikh
fsheikh / non_linear_filtering.py
Created June 4, 2021 15:04
sinusoid recovery from low SNR signal
import numpy as np
from scipy.signal import firwin, lfilter, butter, medfilt
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
# sampling frequency in Hz
Fs = 8000
// Example program
#include <iostream>
#include <string>
int main()
{
static constexpr size_t N {4};
std::string banner [N] = {"name", "loction", "duration", "genre"};
std::string song1 [N] = {"dilagi", "https://www.youtube.com/watch?v=B3P4zGY6llw", "600", "Qawali"};
std::string song2 [N] = {"Everthing I do", "/home/my-home/everything.mp3", "240", "Pop"};
@fsheikh
fsheikh / QawaliListing
Last active February 18, 2024 17:09
MixedQawaliList
Links in comments
General log dump to replace pastebin
@fsheikh
fsheikh / polymorphicStruct.fidl
Created January 23, 2019 07:06
ABI compatability support in Franca
package commonapi.foobar
interface FooBarInterface {
version { major 0 minor 1 }
broadcast bar {
out {
Boolean reply
}
}