Skip to content

Instantly share code, notes, and snippets.

@byelipk
byelipk / 1-ml-exercises.md
Last active February 6, 2025 17:02
Machine learning questions and answers

Exercises

1) How would you define Machine Learning?

Machine learning is a way for computer programs to improve their performance on a task over time given more data.

2) Can you name 4 types of problems where it shines?

Machine learning algorithms have had good results on problems such has spam detection in email, cancer diagnosis, fraudulent credit card transactions, and automatically driving vehicles.

3) What is a labeled training set?

A labeled training set is a collection of data where one of the features of the data indicates the class the training example belongs to. A labeled training set is used in supervised learning algorithms.

@byelipk
byelipk / build.sh
Last active March 9, 2017 22:02
Run this file to set up a fresh Ubuntu install ready for deep learning and computer vision
cd ~
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential cmake pkg-config git unzip libcurl3-dev
# Set up GPU support
# 1. Install CUDA: This is a set of drivers for your GPU that allows it to run a low-level programming language for parallel computing.
# 2. Install CuDNN: This is a library of highly optimized primitives for deep learning.
@byelipk
byelipk / .vimrc
Created September 21, 2016 18:28
.vimrc
" Leader
let mapleader = " "
set backspace=2 " Backspace deletes like most programs in insert mode
set nobackup
set nowritebackup
set noswapfile "http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287
set history=50
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
@byelipk
byelipk / get-color-name.js
Last active August 18, 2016 15:39
Takes a hex code as input and returns the name of the color as determined by http://chir.ag/projects/name-that-color/. Runs from the command line. Requires Phantom JS
var page = require('webpage').create();
var system = require('system');
if (system.args.length === 1) {
console.log('Usage: path/to/get-color-name.js "#FA13CC"');
phantom.exit();
}
// NOTE
// Hex code must be 6 chars long with an optional
@byelipk
byelipk / autocomplete-search.js
Created December 9, 2014 22:09
An example async test helper to use while integration testing autocomplete search with a Select2 component in an ember application. This example assumes we are searching for users based on their username.
import Ember from 'ember';
// register custom helper
Ember.Test.registerAsyncHelper('autocompleteSearch', function(app, username) {
// In order for this to work we need to mimic typing
// a username into the input field.
// 1. Let the initial keydown event activate Select2
triggerEvent('input.select2-input', 'keydown');
@byelipk
byelipk / adding-autocomplete-token-test.js
Created December 9, 2014 16:58
An example async test helper to use while integration testing addings tags with a Select2 component in an ember application.
import Ember from 'ember';
import startApp from '../helpers/start-app';
import '../helpers/complete-group-form-part-two';
var App;
module('Acceptance: AddingAutocompleteToken', {
setup: function() {
App = startApp();
},
@byelipk
byelipk / application_route.js
Last active August 29, 2015 14:02
An example of a Bootstrap 3 modal in Ember.js stemming from the example at http://emberjs.com/guides/cookbook/user_interface_and_interaction/using_modal_dialogs/
App.ApplicationRoute = Ember.Route.extend({
actions: {
/*
modalName : The name of a template to render, e.g. 'foo.signinForm'
model : A string or object with the value of a model that will be used to create a new record from the store
*/
openModal: function(modalName, model) {
var model = this.store.createRecord(model),
controller = this.controllerFor(modalName);