Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
What's happening?

Viktor Malyi vmalyi

💭
What's happening?
View GitHub Profile
@vmalyi
vmalyi / autoworkout_oss.html
Last active Mar 29, 2018
autoworkout_oss.html
View autoworkout_oss.html
<h1>Open Source Licenses – AutoWorkout app</h1>
<h2>PureLayout</h2>
<p>Copyright (c) 2014-2015 Tyler Fox</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), 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 permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN A
View autoworkout_privacy_policy.html
<h1>PRIVACY POLICY MODEL FOR AUTOWORKOUT APPLICATION</h1>
<p><br />This privacy policy governs your use of the software application AutoWorkout (&ldquo;Application&rdquo;) for mobile devices that was created by Viktor Malyi ("Developer").</p>
<h2><br />User Provided Information</h2>
<p>The Application obtains the username, wrist the user is wearing the Apple Watch on. You are not required to enter this information and are allowed to use the Application without any limitations without providing it.</p>
<h2><br />Usage of User Provided Information</h2>
<p>The information provided by you will be used for analyzing the usage patterns of the Application.</p>
<h2><br />Automatically Collected Information</h2>
<p>In addition, the Application may collect certain information automatically, including, but not limited to, accelerometer data, the type of mobile device you use, your mobile devices unique device ID, the IP address of your mobile device, your mobile operating system.</p>
<h2><br />Usage of Automatically Col
@vmalyi
vmalyi / Run or Walk (Part 4): Showing the "walk" or "run" image based on model's prediction
Created Nov 12, 2017
Run or Walk (Part 4): Import Keras Neural Network to iOS app with Core ML
View Run or Walk (Part 4): Showing the "walk" or "run" image based on model's prediction
class PredictionViewController: UIViewController,
...
try! Classifier().makePrediction(inputData) == 0 ? showWalkImage() : showRunImage()
@vmalyi
vmalyi / Run or Walk (Part 4): Use imported Core ML model to make predictions
Created Nov 12, 2017
Run or Walk (Part 4): Import Keras Neural Network to iOS app with Core ML
View Run or Walk (Part 4): Use imported Core ML model to make predictions
import Foundation
import CoreML
enum ClassifierError : Error {
case RuntimeError(String)
}
class Classifier: NSObject {
let model = accel_x_model()
@vmalyi
vmalyi / Run or Walk (Part 4): Converting Keras model to Core ML
Last active Nov 12, 2017
Run or Walk (Part 4): Import Keras Neural Network to iOS app with Core ML
View Run or Walk (Part 4): Converting Keras model to Core ML
from keras.models import model_from_json
import coremltools
import os
with open(os.path.join(KERAS_MODEL_FOLDER, model), 'r') as f:
loaded_model_json = f.read()
keras_model = model_from_json(loaded_model_json)
keras_model.load_weights(os.path.join(KERAS_MODEL_WEIGHTS_FOLDER, weights))
@vmalyi
vmalyi / Run or Walk (Part 4) - Saving the model's weights
Last active Nov 12, 2017
Run or Walk (Part 4): Import Keras Neural Network to iOS app with Core ML
View Run or Walk (Part 4) - Saving the model's weights
...
# save model's weights to disk
model.save_weights("model_weights.h5")
@vmalyi
vmalyi / Run or Walk (Part 4) - Saving the model
Last active Nov 12, 2017
Run or Walk (Part 4): Import Keras Neural Network to iOS app with Core ML
View Run or Walk (Part 4) - Saving the model
...
model.fit(X, Y, epochs=NUMBER_OF_EPOCHS, batch_size=BATCH_SIZE)
...
# serialize model to JSON
model_json = model.to_json()
# save JSON to the disk
with open("saved_model.json", "w") as json_file:
json_file.write(model_json)
@vmalyi
vmalyi / ideal_workout_privacy_policy.html
Last active Oct 17, 2017
ideal workout privacy policy
View ideal_workout_privacy_policy.html
<h1>PRIVACY POLICY MODEL FOR IDEAL WORKOUT APPLICATION</h1>
<p><br />This privacy policy governs your use of the software application Ideal Workout (&ldquo;Application&rdquo;) for mobile devices that was created by Viktor Malyi ("Developer").</p>
<h2><br />User Provided Information</h2>
<p>The Application obtains the username, wrist the user is wearing the Apple Watch on. You are not required to enter this information and are allowed to use the Application without any limitations without providing it.</p>
<h2><br />Usage of User Provided Information</h2>
<p>The information provided by you will be used for analyzing the usage patterns of the Application.</p>
<h2><br />Automatically Collected Information</h2>
<p>In addition, the Application may collect certain information automatically, including, but not limited to, accelerometer data, the type of mobile device you use, your mobile devices unique device ID, the IP address of your mobile device, your mobile operating system.</p>
<h2><br />Usage of Automatically
View gist:696dcdf3d5face8cd2e6f2ca555b8944
[color]
ui = auto
[core]
excludesfile = /Users/malyi/.gitignore_global
autocrlf = input
[user]
name = Viktor Malyi
email = v.stratus@gmail.com
[alias]