Skip to content

Instantly share code, notes, and snippets.

View pmendonca's full-sized avatar
🖖
so it goes...

Paulo Mendonça pmendonca

🖖
so it goes...
View GitHub Profile
# stack title
Describe why your stack was created. _Eg: This stacks is responsible for handle conferences callbacks from twilio._
## Endpoints
Short description try to explain why this set of functions should exist.
Function List:
@pmendonca
pmendonca / twilio.js
Last active April 24, 2019 17:25
Twilio Jest Mock
const mockConferences = () => ({
participants: () => (
{ update: () => Promise.resolve({}) }
)
})
mockConferences.list = () => Promise.resolve([])
module.exports = class Twilio {
@pmendonca
pmendonca / Basic Scikit Linear Regression
Last active February 7, 2018 12:02
Very basic sckit linear regression example
from sklearn import datasets
from sklearn.model_selection import cross_val_predict
from sklearn import linear_model
import matplotlib.pyplot as plt
import numpy as np
from sklearn.metrics import r2_score
import pandas as pd
# Scrubbing
# lista com os meses do ano Jan-Dez
@pmendonca
pmendonca / rsquared.js
Last active May 26, 2021 02:56
Linear Regression - Getting R Squared in javascript
/**
*
* @param {Function} predict
* @param {Array} data
* @returns {Object}
*/
function getRSquared(predict, data) {
var yAxis = data;
var rPrediction = [];