Skip to content

Instantly share code, notes, and snippets.

View mats-claassen's full-sized avatar

Mathias Claassen mats-claassen

View GitHub Profile
@mats-claassen
mats-claassen / UserInfoCell.swift
Last active September 29, 2021 13:39
Example of an Eureka custom row
//
// UserInfoCell.swift
//
// Created by Mathias Claassen on 30/8/16.
// Copyright © 2016 Xmartlabs. All rights reserved.
//
import Foundation
import Eureka
@mats-claassen
mats-claassen / MyPickerRow
Created September 12, 2016 14:04
A custom picker row for Eureka to select a time (hours, minutes and seconds)
public struct Time: Equatable {
var hours: Int
var minutes: Int
var seconds: Int
}
public func ==(lhs: Time, rhs: Time) -> Bool {
return lhs.hours == rhs.hours && lhs.minutes == rhs.minutes && lhs.seconds == rhs.seconds
}
@mats-claassen
mats-claassen / convert_mnist.py
Last active July 29, 2023 21:51
Source code used in the blog at [blog.xmartlabs.com]
import numpy as np
import tensorflow as tf
from PIL import Image
from tensorflow import keras
import coremltools
import tfcoreml as tf_converter
import tensorflow.keras.backend as K
import datetime
import os
from tensorflow.python.framework import graph_io