Skip to content

Instantly share code, notes, and snippets.

Working on project

Ilia Stukalov Ksen17

Working on project
Block or report user

Report or block Ksen17

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View UIColor+HEX.swift
import UIKit
extension UIColor {
convenience init(hexString: String) {
let hex = hexString.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
var int = UInt32()
Scanner(string: hex).scanHexInt32(&int)
let a, r, g, b: UInt32
switch hex.count {
case 3: // RGB (12-bit)
View MemoryClean.swift
import UIKit
class MyAwesomeClass: NSObject {
var a = "test"
var myClass = MyAwesomeClass()
var pointer = Unmanaged.passUnretained(myClass).toOpaque()
Ksen17 /
Last active Aug 26, 2018
Code for training style transfer model and converting it to Core ML format
import turicreate as tc
#Here you should put path to images which already contains styles
style = tc.load_images('style/')
#Here you should put path to images which is used for train
content = tc.load_images('content/')
#Main function which train model| max_itearation should be find experimentaly
model = tc.style_transfer.create(style, content, max_iterations=50)
#Here you should put path to images which is used for test
test_images = tc.load_images('test/')
You can’t perform that action at this time.