Skip to content

Instantly share code, notes, and snippets.

View miff's full-sized avatar
🏠
Working from home

Milan miff Djordjevic miff

🏠
Working from home
View GitHub Profile
// Don't forget to add to the project:
// 1. DeepLabV3 - https://developer.apple.com/machine-learning/models/
// 2. CoreMLHelpers - https://github.com/hollance/CoreMLHelpers
enum RemoveBackroundResult {
case background
case finalImage
}
extension UIImage {
from flask import Flask
from flask_restful import Api, Resource, reqparse
app = Flask(__name__)
api = Api(app)
users = [
{
"name": "Nicholas",
"age": 42,
@miff
miff / ioslocaleidentifiers.csv
Created September 10, 2018 08:49 — forked from jacobbubu/ioslocaleidentifiers.csv
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
@miff
miff / createGIF
Created February 21, 2018 11:41 — forked from darcwader/createGIF
Create GIF from UIImages in Swift
import CoreGraphics
import ImageIO
import MobileCoreServices
func createGIF(with images: [UIImage], loopCount: Int = 0, frameDelay: Double, callback: (dataURL: NSURL?, error: NSError?) -> ()) {
let fileProperties = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFLoopCount as String: loopCount]]
let frameProperties = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFDelayTime as String: frameDelay]]
let documentsDirectory = NSTemporaryDirectory()
let url = NSURL(fileURLWithPath: documentsDirectory).URLByAppendingPathComponent("animated.gif")