Skip to content

Instantly share code, notes, and snippets.

View Red-Eyed's full-sized avatar

Vadym Stupakov Red-Eyed

View GitHub Profile
@Red-Eyed
Red-Eyed / flask_webapp_segmentation.py
Created July 18, 2023 11:06 — forked from deepak-karkala/flask_webapp_segmentation.py
FLASK Webapp for Image Segmentation Model
# FLASK Webapp for Image Segmentation Model
import os, sys, io
sys.path.append(".")
import webapp
from flask import Flask
import flask
import numpy as np
import pandas as pd
@Red-Eyed
Red-Eyed / opencv-opencl-android.md
Created September 13, 2022 12:16 — forked from iago-suarez/opencv-opencl-android.md
Setting Up OpenCL for OpenCV on Android, the full story

Setting Up OpenCL for OpenCV on Android, the full story

The tutorial Use OpenCL in Android camera preview based CV application show us how we can use the Transparent API to dramatically increase the performance of some expensive operations.

The first step in order to be able to execute the tutorial example is to re-compile opencv with the correct flags:

# Export your NDK, it will be looked for OpenCV to compile your project. In my case
export ANDROID_NDK=~/graffter/libs/android-ndk-r10d/

# Download the necessary code
@Red-Eyed
Red-Eyed / dataclass_from_dict.py
Created March 18, 2021 13:55 — forked from gatopeich/dataclass_from_dict.py
Python 3.7 dataclass to/from dict/json
from dataclasses import dataclass, fields as datafields
from ujson import dumps, loads
# Note: ujson seamlessly serializes dataclasses, unlike stdlib's json
@dataclass
class Point:
x: float
y: float
# Shallow dataclass can be rebuilt from dict/json:
@Red-Eyed
Red-Eyed / ffmpeg-compress-mp4
Created January 14, 2021 21:51 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@Red-Eyed
Red-Eyed / google-chrome-flatpak
Created April 26, 2020 12:01 — forked from cho2/google-chrome-flatpak
Google Chrome Flatpak
//eos3
flatpak remote-add --user eos-apps --no-gpg-verify https://ostree.endlessm.com/ostree/eos-apps
flatpak install --user eos-apps com.google.Chrome
git clone git@github.com:endlessm/eos-google-chrome-app.git
cd eos-google-chrome-app
chmod +x eos-google-chrome-app
./eos-google-chrome-app
//master
flatpak remote-add --user --no-gpg-verify chrome http://blog.kukuh.syafaat.id/google-chrome-flatpak-repo-testing/repo
@Red-Eyed
Red-Eyed / print_hex.c
Created April 11, 2017 07:11 — forked from ishchegl/print_hex.c
Print HEX in C
#include <stdio.h>
#include <string.h>
#define MAX_DATA_LEN 1024
static unsigned char hex_string[MAX_DATA_LEN];
static inline char convert_to_printable(char c)
{
return c < 32 || c > 126 ? '.' : c;