Skip to content

Instantly share code, notes, and snippets.

View RomainMaillot13's full-sized avatar

Romain MAILLOT RomainMaillot13

  • Lyon
View GitHub Profile
test
<rjj"rndeii>
efj" ,fdi kef
@RomainMaillot13
RomainMaillot13 / json license plate
Created November 27, 2018 10:48
json license plate
{
"Description": "HONDA ST1300 A",
"RegistrationYear": "2005",
"CarMake": {
"CurrentTextValue": "HONDA"
},
"CarModel": {
"CurrentTextValue": "ST1300 A"
},
"MakeDescription": {
@RomainMaillot13
RomainMaillot13 / direction JSON
Created November 27, 2018 10:29
direction JSON
{
"geocoded_waypoints" : [
{
"geocoder_status" : "OK",
"place_id" : "ChIJRVY_etDX3IARGYLVpoq7f68",
"types" : [
"bus_station",
"transit_station",
"point_of_interest",
"establishment"
@RomainMaillot13
RomainMaillot13 / journey request
Created November 27, 2018 10:24
journey request
https://maps.googleapis.com/maps/api/directions/json?origin=Disneyland&destination=Universal+Studios+Hollywood&key=YOUR_API_KEY
@RomainMaillot13
RomainMaillot13 / connect to google map api
Created November 27, 2018 10:16
connect to google map api
function maPosition(position) {
var infopos = "Position déterminée :\n";
infopos += "Latitude : "+position.coords.latitude +"\n";
infopos += "Longitude: "+position.coords.longitude+"\n";
infopos += "Altitude : "+position.coords.altitude +"\n";
infopos += "Vitesse : "+position.coords.speed +"\n";
document.getElementById("infoposition").innerHTML = infopos;
// Un nouvel objet LatLng pour Google Maps avec les paramètres de position
@RomainMaillot13
RomainMaillot13 / get location
Created November 27, 2018 10:13
get location
<script>
function maPosition(position) {
var infopos = "Position déterminée :\n";
infopos += "Latitude : "+position.coords.latitude +"\n";
infopos += "Longitude: "+position.coords.longitude+"\n";
infopos += "Altitude : "+position.coords.altitude +"\n";
document.getElementById("infoposition").innerHTML = infopos;
}
if(navigator.geolocation)
@RomainMaillot13
RomainMaillot13 / api messenger
Created November 27, 2018 10:07
api messenger
"messaging_type": "<MESSAGING_TYPE>",
"recipient":{
"id":"<PSID>"
},
"message":{
"text":"hello, world!"
}
@RomainMaillot13
RomainMaillot13 / facebook login
Created November 27, 2018 09:48
facebook login
// Add this to the header of your file, e.g. in ViewController.m
// after #import "ViewController.h"
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
// Add this to the body
@implementation ViewController
- (void)viewDidLoad {
@RomainMaillot13
RomainMaillot13 / Algorithm several persons
Created November 2, 2018 13:31
Algorithm several persons
const imageScaleFactor = 0.50;
const flipHorizontal = false;
const outputStride = 16;
// get up to 5 poses
const maxPoseDetections = 5;
// minimum confidence of the root part of a pose
const scoreThreshold = 0.5;
// minimum distance in pixels between the root parts of poses
const nmsRadius = 20;
const imageElement = document.getElementById('cat');
@RomainMaillot13
RomainMaillot13 / Algorithm one person
Created November 2, 2018 13:28
Algorithm one person
const imageScaleFactor = 0.50;
const flipHorizontal = false;
const outputStride = 16;
const imageElement = document.getElementById('cat');
// load the posenet model
const net = await posenet.load();
const pose = await net.estimateSinglePose(imageElement, scaleFactor, flipHorizontal, outputStride);