Skip to content

Instantly share code, notes, and snippets.

View steve21124's full-sized avatar

Steve steve21124

  • san francisco
View GitHub Profile

How to install dlib v19.9 or newer (w/ python bindings) from github on macOS and Ubuntu

Pre-reqs:

  • Have Python 3 installed. On macOS, this could be installed from homebrew or even via standard Python 3.6 downloaded installer from https://www.python.org/download. On Linux, just use your package manager.
  • On macOS:
    • Install XCode from the Mac App Store (or install the XCode command line utils).
    • Have homebrew installed
  • On Linux:
import the necessary packages
from PIL import Image
import turicreate as tc
import progressbar
import glob
import os
def pil_to_tc(pilImage):
# grab the PIL image dimensions, convert the data into a byte
# array, and then build the turicreate image
from flask_api import FlaskAPI
from flask import Flask, request, json, jsonify
import datetime
from datetime import datetime
import turicreate as tc
import pandas as pd
import requests
import os
from flask import Flask, request, redirect, url_for
from werkzeug.utils import secure_filename
import Foundation
import UIKit
import DataSources
import EasyPeasy
protocol ModelNew {
var title: String { get }
}
import Foundation
import UIKit
import DataSources
import EasyPeasy
protocol ModelNew {
var title: String { get }
}
import Foundation
import UIKit
import DataSources
import EasyPeasy
protocol ModelNew {
var title: String { get }
}
import Foundation
import UIKit
import DataSources
protocol ModelNew {
var title: String { get }
}
struct ModelM : ModelNew, Diffable {
import UIKit
import DataSources
protocol Model {
var title: String { get }
}
struct ModelM : Model, Diffable {
var diffIdentifier: AnyHashable {
import UIKit
import DataSources
protocol Model {
var title: String { get }
}
struct ModelM : Model, Diffable {
var diffIdentifier: AnyHashable {
import UIKit
import DataSources
class ViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
var collectionView: UICollectionView = {
let layout = UICollectionViewFlowLayout()
layout.sectionInset = .zero
layout.minimumLineSpacing = 0
layout.minimumInteritemSpacing = 0