Skip to content

Instantly share code, notes, and snippets.

View afandiyusuf's full-sized avatar

yusuf afandi afandiyusuf

View GitHub Profile
@peterjpxie
peterjpxie / flask_server_v2.py
Created October 19, 2019 06:04
flask_server_v2.py
from flask import Flask, request
import re, json
from face_util import compare_faces, face_rec
app = Flask(__name__)
@app.route('/face_match', methods=['POST'])
def face_match():
if request.method == 'POST':
# check if the post request has the file part
@Windastella
Windastella / http_request.gd
Last active December 12, 2019 06:54
A HTTP Request class with Async using Thread suitable for REST API implementation
# Modified from http://codetuto.com/2015/05/using-httpclient-in-godot/
# Added POST and Optional Header Perimeter
extends Node
var reqlist = []
class request:
var t
var params
var finished = false
@ProGM
ProGM / FloodFill.cs
Last active December 29, 2022 03:13
A simple Flood Fill implementation for Unity3D C# for video games. https://elfgames.com/2016/12/14/identify-unwanted-maze-solutions-using-flood-fill-with-unity3d/
// Copyright (c) 2022 Piero Dotti, Elf Games
//
// 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 furnished to do so, subject to the following
// conditions:
@mcorrigan
mcorrigan / POST Request with File Resource
Last active October 10, 2022 10:42
Creating a POST request using file handlers for file content
<?php
# base code found here: http://stackoverflow.com/questions/3085990/post-a-file-string-using-curl-in-php
$delimiter = '----WebKitFormBoundary'.uniqid();
$data = create_post($delimiter, array(
'bingo' => 'yes'
), array(
'file' => array(
'filename' => 'data.txt',