Skip to content

Instantly share code, notes, and snippets.

View Jaysmito101's full-sized avatar
๐Ÿ™ƒ

Jaysmito Mukherjee Jaysmito101

๐Ÿ™ƒ
View GitHub Profile
@Jaysmito101
Jaysmito101 / fast_lockfree_queue.hpp
Last active July 27, 2026 13:42
A fast chunked lockfree queue with hazard pointer based memory reclaimation and reuse.
/*
MIT License
Copyright (c) 2026 Jaysmito Mukherjee
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@Jaysmito101
Jaysmito101 / VectorNDim.hpp
Created December 4, 2023 22:11
Vector<N>.hpp
#define KLUX_FORCE_INLINE inline // change according to need
namespace math
{
template <typename T>
concept VectorValueType = std::is_arithmetic_v<T>;
template <Size N, typename ValueTypeT = float>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include <avr/io.h>
#include <util/delay.h>
#define SET_BIT(ptr, bt) \
ptr |= _BV(bt); \
#define UNSET_BIT(ptr, bt) \
ptr &= ~_BV(bt); \
#define TOGGLE_BIT(ptr, bt) \
#include <avr/io.h>
#include <util/delay.h>
#define SET_BIT(ptr, bt) \
ptr |= _BV(bt); \
#define UNSET_BIT(ptr, bt) \
ptr &= ~_BV(bt); \
#define SR_DATA_PIN0 PB2
@Jaysmito101
Jaysmito101 / techpeeks_km0.md
Last active July 1, 2023 05:40
3D Hand Reconstruction using MediaPipe

Brief

This project aims to reconstruct a hand in a 3D viertual world from the video footage from a webcam. This can be used for several purposes like more interactive games, interactions with virtual world with our own hands, etc.

This uses Google's MediaPipe Hand Landmarker for extracting the data about the hand from the image frames of the video footage.

It uses OpenCV to get a direct video feed from the webcam and preprocess it to a bit, then it passes the data to the mediapipe hand landmarker model which gives us the list of detected landmarks, which is then filtered and transformed by a custom a algorithm.

The final positions and labels are then passed to the CGL core for being displayed inside the 3D world!

@Jaysmito101
Jaysmito101 / code.c
Last active June 30, 2023 18:19
Efficient Partitioning of a N-Dimensional Axis Aligned Space into N Subspaces
/*
MIT License
Copyright (c) 2023 Jaysmito Mukherjee (jaysmito101@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
#include <cstdint>
#include <iostream>
#include <algorithm>
// #include "Timer.hpp" [ See : https://gist.github.com/Jaysmito101/bb3d33bba38baa08c9d057e6ff12b3a4 ]
int array_main[4096 * 4096];
int array_copy[4096 * 4096];
@Jaysmito101
Jaysmito101 / Timer.hpp
Created August 14, 2022 06:54
A simple C++ class to time code
#pragma once
#include <chrono>
#include <iostream>
#include <random>
class Timer
{
public:
Timer(std::string name)