Skip to content

Instantly share code, notes, and snippets.

View sandipan1's full-sized avatar

Sandipan Haldar sandipan1

View GitHub Profile
uv init my-new-project
uv venv --python 3.12
## To add new packages
uv add flask
## To remove packages
uv remove flask
## add or remove packages directly from the pyproject.toml then sync it
function createDomElements(data) {
var parentElement = document.getElementById("mainArea");
parentElement.innerHTML = "";
for (var i = 0; i<data.length; i++) {
var childElement = document.createElement("div");
var grandChildElement1 = document.createElement("span");
grandChildElement1.innerHTML = data[i].title
var grandChildElement2 = document.createElement("span");
@sandipan1
sandipan1 / Mainactivity.java
Created August 28, 2019 11:36
syncing frame and color values
package com.google.mediapipe.apps.hairsegmentationgpu;
import android.graphics.SurfaceTexture;
import android.os.Bundle;
import android.util.Size;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.SeekBar;
@sandipan1
sandipan1 / ColorSliderCalculator.cc
Created August 24, 2019 21:34
adding absl::make_unique
// imports
#include "mediapipe/framework/calculator_framework.h"
#include "mediapipe/framework/port/status.h"
#include "mediapipe/framework/formats/image_frame.h"
#include "mediapipe/framework/port/ret_check.h"
#include <vector>
/*