Skip to content

Instantly share code, notes, and snippets.

Avatar

Giovanni Murru giomurru

View GitHub Profile
@giomurru
giomurru / LandmarksBBox.swift
Created Jul 5, 2021
VNFaceObservation: Computes the landmarks normalized on the smallest bounding box which includes all of the landmarks.
View LandmarksBBox.swift
extension VNFaceObservation {
func landmarksBBox(_ imageSize: CGSize) -> (bbox: CGRect, landmarks: [CGPoint]) {
guard let allPoints = self.landmarks?.allPoints?.pointsInImage(imageSize: imageSize),
allPoints.count > 0 else { return (CGRect.zero, []) }
var maxX : CGFloat = -CGFloat.greatestFiniteMagnitude
var minX : CGFloat = CGFloat.greatestFiniteMagnitude
var maxY = maxX
var minY = minX
@giomurru
giomurru / steps_to_deploy_website_through_git.txt
Last active Mar 4, 2021
steps to deploy website through git
View steps_to_deploy_website_through_git.txt
# steps to deploy website through git
# login via ssh to your website
# create a folder where you want to store your bare repository
mkdir -p /home/username/gitrepos/myrepository.git
cd /home/username/gitrepos/myrepository.git
git init --bare