Skip to content

Instantly share code, notes, and snippets.

View shoaibmehedi7's full-sized avatar
:octocat:
Working from home

MD Shoaib Mehedi shoaibmehedi7

:octocat:
Working from home
View GitHub Profile
{
"name": "comp-companymgmt-api",
"version": "1.0.0",
"description": "comp-companymgmt-api",
"author": "SnR apps Team",
"dependencies": {
"@aws-crypto/client-node": "^2.3.0",
"aws-sdk": "^2.814.0",
"body-parser": "^1.19.0",
"body-parser-for-serverless": "^1.0.1",
const axios = require("axios");
const config = {
method: "get",
headers: {
Authorization: `Bearer AAAAAAAAAAAAAAAAAAAAAFJ0hAEAAAAAXNjzqQw7w%2FJPWGGKViqnkDB%2Bo4U%3DUd44SKeDV31IDrOfzA7OE1Q2PvqdFO3U0i5DD08L4fjMkAI0qN`,
},
};
let startTimeInUTC = new Date("2022-10-10T00:00:00.000Z").getTime();
const utcTime = new Date().getTime();
import axios from 'axios';
import { getCsrfToken, getSession } from 'next-auth/react';
class Service {
service: any;
constructor() {
const service = axios.create({
headers: {
'Content-Type': 'application/json',
authorization: `Bearer ${getSession().then((session: any) => session.accessToken)}`,
import axios from "axios";
import { baseUrl } from "../contants/Endpoints";
import jwt_decode from "jwt-decode";
import { noAuthAxios } from './axiosWrapperOpen';
import { asyncLocalStorage } from "./asyncLocalStorage";
export const authAxios = axios.create({
baseURL: baseUrl,
headers: {
Authorization: {
import cv2
import mediapipe as mp
#Face Mesh
mp_face_mesh = mp.solutions.face_mesh
face_mesh = mp_face_mesh.FaceMesh()
#Image
import cv2
import mediapipe as mp
import time
cap = cv2.VideoCapture("/home/python/OpenCV/faceMash/mesh.mp4")
presentTime = 0
mpDraw = mp.solutions.drawing_utils
# centroidtracker.py
from scipy.spatial import distance as dist
from collections import OrderedDict
import numpy as np
def update(self, rects):
if len(rects) == 0:
for objectID in list(self.disappeared.keys()):
self.disappeared[objectID] += 1
if self.disappeared[objectID] > self.maxDisappeared:
self.deregister(objectID)
def deregister(self, objectID):
del self.objects[objectID]
del self.disappeared[objectID]
del self.bbox[objectID]
def register(self, centroid, inputRect):
self.objects[self.nextObjectID] = centroid
self.bbox[self.nextObjectID] = inputRect
self.disappeared[self.nextObjectID] = 0
self.nextObjectID += 1