Skip to content

Instantly share code, notes, and snippets.

View alexsosn's full-sized avatar

Alex Sosnovshchenko alexsosn

View GitHub Profile
@otmb
otmb / README.md
Last active May 10, 2021 14:29
MLMultiArray to Double Array

Sample Data

Get cat.bin

Xcode Resources Add cat.bin

resources.png

Playground

import CoreML
@schickling
schickling / UIImageFixedOrientationExtension.swift
Last active February 4, 2024 15:00
Extension to fix orientation of an UIImage (Sets orientation to portrait)
extension UIImage {
func fixedOrientation() -> UIImage {
if imageOrientation == UIImageOrientation.Up {
return self
}
var transform: CGAffineTransform = CGAffineTransformIdentity
@kylefox
kylefox / color.m
Created January 27, 2012 17:45
Generate a random color (UIColor) in Objective-C
/*
Distributed under The MIT License:
http://opensource.org/licenses/mit-license.php
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