Skip to content

Instantly share code, notes, and snippets.

View reicolina's full-sized avatar

Rei Colina reicolina

View GitHub Profile
@reicolina
reicolina / ml-learning-material.md
Last active January 19, 2018 06:31
A Machine Learning Reference Material Guide

Machine Learning Reference Material Guide

Math Theory

Linear Argebra:

In ML, Linear Algebra comes up everywhere. Topics such as Principal Component Analysis (PCA), Singular Value Decomposition (SVD), Eigendecomposition of a matrix, LU Decomposition, QR Decomposition/Factorization, Symmetric Matrices, Orthogonalization & Orthonormalization, Matrix Operations, Projections, Eigenvalues & Eigenvectors, Vector Spaces and Norms are needed for understanding the optimization methods used for machine learning.

  • Deep Learning Book, Chapter 2: Linear Algebra. A quick review of the linear algebra concepts relevant to machine learning. https://goo.gl/O5vgpm
  • A First Course in Linear Model Theory by Nalini Ravishanker and Dipak Dey. Textbook introducing linear algebra in a statistical context. https://goo.gl/2A4Wi5

Probability Theory and Statistics:

@reicolina
reicolina / amplify4selling-contact-import.py
Last active October 13, 2017 21:58
Hootsuite Amplify for Selling Contact Import Script
# ___ ,_, ___
# (o,o) (o,o) ,,,(o,o),,,
# {`"'} {`"'} ';:`-':;'
# -"-"- -"-"- -"-"-
#
# AMPLIFY FOR SELLING: CONTACT IMPORT SCRIPT
# ==========================================
# 1.- Obtain CSV file(s) from your data source.
# 2.- Save the CSV file in the same folder as this script.
# 3.- Replace the HOOTSUITE_MEMBER_ID, AMPLIFY_API_KEY, CRM_MAPPING_URL
@reicolina
reicolina / SR_ED.py
Last active February 21, 2017 22:57
A Python script that extracts SR&ED (Scientific Research and Experimental Development Tax Incentive Program) data from a Jira generated JSON file. See http://www.cra-arc.gc.ca/txcrdt/sred-rsde/menu-eng.html for details on SR&ED. It gathers "Start Date", "Resolution Date" and "# of People" and calculates the "Person Weeks" for each Jira Story.
# \\Y|M|
# ~~..'~
# ( \ )
# \ =/
# _\/_
# / -_
# < \
# \^-_-^\ \ iii
# <\v =======uu==>
# SR&ED DATA GENERATOR
@reicolina
reicolina / get-query-string-value.md
Last active July 12, 2016 16:32
A Javascript method to get a query string value from a given URL

The following Javascript method takes a query parameter and the URL it belongs too, and it returns the value associated with that query parameter.

function getQueryStringValue(param, url) {
  if (!url) {
      // handle null or undefined
  	return null;
  }
  var regex = new RegExp("[?&]" + param + "(=([^&#]*)|&|#|$)");
  var results = regex.exec(url);
@reicolina
reicolina / technical-papers-reading-list.md
Last active June 9, 2016 15:01
Techinal Papers Reading List

This is a list of technical papers that I have either read or added to my to-read list. These papers are categorized by topic in no particular order:

Artificial Intelligence

Machine Learning

@reicolina
reicolina / cla-assistant.md
Last active November 8, 2021 08:52
GIthub Inegration with CLA Assistant

Integrating your Github repo with CLA Assistant (https://cla-assistant.io/) to handle Contributor License Agreements (CLA) signing.

Visual Demo:

Setup Instructions:

  • Go to https://cla-assistant.io/ and sign in with Github. Make sure that you also Grant access to your organization (if applicable)
@reicolina
reicolina / input-field-losing-focus.md
Last active November 10, 2015 23:26
AngularJS: Losing focus on fields inside a ng-repeat

I was recently presented with a bug, where an input field inside a list controlled by a ng-repeat kept losing focus everytime the data in the scope changed in the background.

The ng-repeat in question was written like this: ng-repeat="message in messages", and we had a service fetching messages every 10 seconds that did something like: scope.messages = messages

This totally makes sense, and technically there is nothing wrong with it, however, by design, ng-repeat triggers itself when the data being wathed (in this case messages) gets replaced with a new array. This "DOM refresh" could make input fields in the list to lose focus, and even worst, this could represent a huge performance hit when dealing with long arrays of data.

The solution? You can now add a track by $index to your ng-repeat:

ng-repeat="message in messages" track by $index

@reicolina
reicolina / outloolk-email-design.md
Last active November 10, 2015 19:27
Email Design: Images not showing on Outlook 2007, 2010, and 2013

Internet Explorer has a security setting that, when enabled, prevents Outlook from displaying images with a secure URL. (Image URLs starting with "http" will display, not URLs that start with "https".)

If Outlook 2007, 2010, or 2013 displays some - but not all - images, you may need to change the setting in your Internet Explorer web browser or desktop software.

To change the setting in Internet Explorer:

  1. Open Internet Explorer.
  2. Go to Tools > Internet Options.
  3. Click the Advanced tab.
  4. Scroll down to the Security settings list, then uncheck the "Do not save encrypted pages to disk" option.
@reicolina
reicolina / angular-two-dots.md
Last active May 10, 2017 21:53
AngularJS and why you need one or more “dots”

In Angular, it is recommended to add objects to a scope instead of primitive values (always having one or more “dots” when accessing your models)

The reason is: prototypical inheritance. As you know, Javascript is different from classical OOP; inheritance is done in a prototypical matter. Angular follows this pattern in a way that scopes inherit prototypically from their parent scopes.

When implemented incorrectly, two-way data binding breaks if you have two or more nested elements that use separate controllers that point to the same model. Here is why:

Imagine you have two nested elements:

@reicolina
reicolina / flus-vs-redux-others.md
Last active April 25, 2016 03:08
Flux-Utils, Redux or Both?

A year ago, it was really hard to move away from writing Flux components in pure vanilla Javascript. The reason? there was a lot of Flux implementations (libraries) out there, but all of them were too young to be trusted in a production environment.

Within the last couple of months, Engineers at Facebook; the creators of Flux, have publicly endorsed one library: Redux, as well as their own Flux library, which includes new store classes that you can extend in order to implement your own ones without the boilerplate caused by Flux implementations written in vanilla Javascript.

So, which one to use? Well, it depends. Redux will require quite a refactor of your current flux application, specially if you already have several stores in place. This is because Redux advocates for having only one master store, instead of several ones. Also, The classic Flux dispatcher is now gone in Redux, and you will need to digest new concepts such as Reducers (for handling actions) and Middleware (for async API calls).

However,