Skip to content

Instantly share code, notes, and snippets.

View symisc's full-sized avatar

PixLab | Symisc Systems symisc

View GitHub Profile
@symisc
symisc / faceio_change_pin_code.py
Last active November 18, 2023 03:10
Change the PIN Code of a given Facial ID on a FACEIO application - Refer to: https://faceio.net/rest-api#setfacialidpincode for additional information
import requests
import json
# Change the PIN Code of a given Facial ID on a FACEIO application
# Refer to: https://faceio.net/rest-api#setfacialidpincode for the official documentation & expected parameters
req = requests.post('https://api.faceio.net/setfacialidpincode',json={
"fid": "FACIAL_ID", # Target Facial ID to change the PIN code for
"pin": "1234", # New PIN Code for this user. Must be a numeric STRING!
"key": "FACEIO_APP_API_KEY" # Your FACEIO Application API Key. Retrieve this key from the Application Manager on the console at: https://console.faceio.net
})
@symisc
symisc / gaussian_blur_image.c
Last active July 24, 2023 03:45
Apply Gaussian Blur Filter to a given RGB image using the SOD Embedded Computer Vision Library - https://sod.pixlab.io
/*
* Programming introduction with the SOD Embedded Image Processing API.
* Copyright (C) PixLab | Symisc Systems, https://sod.pixlab.io
*/
/*
* Compile this file together with the SOD embedded source code to generate
* the executable. For example:
*
* gcc sod.c gaussian_blur_image.c -lm -Ofast -march=native -Wall -std=c99 -o sod_img_proc
*
@symisc
symisc / malaysia_mykad_id_scanner_api.py
Created July 17, 2023 03:40
Python Code Sample for Scanning Malaysian ID Card (MyKAD) using the PixLab DOCSCAN API - Extract Face, and all ID Fields - https://pixlab.io/cmd?id=docscan
import requests
import json
# Scan government issued ID card from Malaysia (MyKAD, MyKID)., extract the user face and parse all fields.
#
# Usage sample of the ID card scanner from PixLab.
#
# In this sample, we shall scan ID Card from Malaysia (MyKAD);
# therefore we will extract the user's face, date of birth, full name, address,
# and religion if available.
@symisc
symisc / malaysia_mykad_id_scanner_api.php
Last active July 17, 2023 03:56
Scan Malaysia ID Card (MyKAD) using the PixLab DOCSCAN API - Extract Face, and all ID Fields - https://pixlab.io/cmd?id=docscan
<?php
/*
* Usage sample of the ID card scanner from PixLab. In this sample, we shall scan
* ID Card from Malaysia (MyKAD); therefore we will extract the user's face, date of birth,
* full name, address, and religion if available.
*/
/*
* PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github
* https://github.com/symisc/pixlab-php
*/
@symisc
symisc / tiny_dream_boilerplate.cpp
Last active August 30, 2023 00:15
Tiny Dream C++ Integration Boilerplate - Refer to https://pixlab.io/tiny-dream for the official documentation
/*
* Tiny Dream Integration Boilerplate.
*
* Compile this file together with the Tiny Dream header (tinydream.hpp) to generate
* the executable. Example of heavy optimized compilation under g++:
*
* g++ -o tinydream boileplate.cpp -funsafe-math-optimizations -Ofast -flto=auto -funroll-all-loops -pipe -march=native -std=c++17 -Wall -Wextra `pkg-config --cflags --libs ncnn` -lstdc++ -pthread -Wl -flto -fopt-info-vec-optimized
*
* To run the program simply type:
*
@s-macke
s-macke / gpt-4-tokens.txt
Last active February 23, 2024 17:58
All 100k GPT-4 Tokens. New lines are replaced with \n and carriage returns with \r. The index of the token is (index=line-1). The list is extracted using https://github.com/openai/tiktoken
!
"
#
$
%
&
'
(
)
*
@symisc
symisc / check_facial_id.py
Last active January 3, 2023 02:13
Perform authenticity check of a given Facial ID - Refer to the FACEIO documentation at https://faceio.net/rest-api for additional information
import requests
import json
# Perform authenticity check of a given Facial ID.
# In other words, make sure the supplied Facial ID is valid & registered on this FACEIO application.
# Refer to https://faceio.net/rest-api for additional information
req = requests.get('https://api.faceio.net/checkfacialid',params={
"fid":"FACIAL_ID", # Target Facial ID being checked
"key": "FACEIO_APP_API_KEY" # Your FACEIO Application API Key. Retrieve this key from the Application Manager on the console at: https://console.faceio.net
})
@hrishiksh
hrishiksh / App.css
Created July 28, 2022 08:23
FaceIO reactjs gist
*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
section {
@symisc
symisc / faceio_integration_boilerplate.html
Last active October 4, 2023 02:36
Enroll & Authenticate (Recognize) your website users via Face Recognition. This HTML boilerplate should serve as a reference when implementing FACEIO on your website for the first time - Visit https://faceio.net/integration-guide for the official documentation.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FACEIO Integration Boilerplate</title>
<style>
.container {
text-align: center;
}
@symisc
symisc / scan_us_driver_license_id.php
Last active June 14, 2022 02:47
Scan a US Driving License image document from any of the U.S 50 states via the PixLab /docscan API endpoint. Crop the user's face and extract all fields - https://pixlab.io/cmd?id=docscan&type=usdl
<?php
/*
* Usage sample of the US Driver's License card scanner, API endpoint from PixLab - https://pixlab.io/cmd?id=docscan.
*/
/*
* PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github
* https://github.com/symisc/pixlab-php
*/
require_once "pixlab.php";
# Given a submitted/uploaded, US Driver License image document from any of the 50 US state