Skip to content

Instantly share code, notes, and snippets.

View eberlitz's full-sized avatar

Eduardo Eidelwein Berlitz eberlitz

View GitHub Profile
@eberlitz
eberlitz / node-npm-install.sh
Last active December 18, 2015 21:18
Installation script for node.js and npm.
mkdir node-latest
cd node-latest
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
mkdir ~/.local
./configure --prefix=~/.local
make install
echo 'export PATH=~/.local/bin:${PATH}' >> ~/.bashrc
. ~/.bashrc
curl https://npmjs.org/install.sh | npm_config_prefix=~/.local sh install.sh
@eberlitz
eberlitz / ActionScript
Created September 23, 2013 18:39
Paradigmas
Trabalho GA - Linguagens de programação
=======================================
Definição
----------
Identificar as principais características de duas linguagens de programação (Pascal e ActionScript).
### Caracteristicas
- Histórico da linguagem;
@eberlitz
eberlitz / TGA_MD
Created September 29, 2013 17:36
MD_ML_TGA.md
[TOC]
Trabalho GA
===========
Preparação dos dados
----------------------
1. Junção dos arquivos **census-income.data** e **census-income.test** através do seguinte comando unix:
@eberlitz
eberlitz / MVVM
Created November 16, 2013 18:05
Model View ViewModel - MVVM
#Model View ViewModel - MVVM
##O que é?
**Model View ViewModel (MVVM)** é um padrão de projeto usado no desenvolvimento de softwares, foi originado pela *Microsoft* como uma especialização do padrão *Model View Presenter (MVP)* e asemelha-se em alguns aspectos com o *Model View Controller (MVC)*. Seu foco é a implementação de UI em plataformas com suporte a programação orientada a eventos como o *Windows Presentation Foundation (WPF)* e o *Silverlight* na plataforma .NET. Visa estabelecer uma clara separação do *desenvolvimento de UI* do *back end/lógica de negócio*. Este conceito acabou se tornando possível em HTML5 através de frameworks como *AngularJS* e *KnockoutJS*, e no Java atavés do *ZK Framework*.
##Responsabilidades e características
### Model
@eberlitz
eberlitz / SVM.md
Last active July 5, 2021 23:27
Title2

Support Vector Machines (SVM)

Support Vector Machine (SVM) é um classificador formalmente definido pela separação de um hiperplano. Em outras palavras, dado um prévio conjunto de dados já classificado (aprendizado supervisionado), o algoritmo retorna um hiperplano ideal que categoriza novos exemplos.

Considere o seguinte problema:

Para um conjunto de pontos 2D que pertencem a duas classes distintas, encontre uma linha reta que separe os pontos de acordo com sua classe.

@eberlitz
eberlitz / APIKeyAuthentication.cs
Created March 21, 2014 19:50
Custom OWIN Middleware Sample
#region API KEY Authentication
public static class APIKeyDefaults
{
public const string AuthenticationType = "Apikey";
}
public class APIKeyAuthenticationOptions : AuthenticationOptions
{
/// <summary>
/// Creates an instance of API Key authentication options with default values.
@eberlitz
eberlitz / designer.html
Last active August 29, 2015 14:06
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-pages/core-pages.html">
<polymer-element name="my-element">
@eberlitz
eberlitz / ng-watchers-list.js
Created June 27, 2016 17:34
Ordered list of angular watchers in a page.
function humanReadableWatchExpression (fn) {
if (fn == null) {
return null;
}
if (fn.exp) {
fn = fn.exp;
} else if (fn.name) {
fn = fn.name;
}
return fn.toString();
function humanReadableWatchExpression (fn) {
if (fn == null) {
return null;
}
if (fn.exp) {
fn = fn.exp;
} else if (fn.name) {
fn = fn.name;
}
return fn.toString();
@eberlitz
eberlitz / unwind.js
Created August 5, 2016 16:39
Underscore Unwind like MongoDB operation
_.mixin({
unwind: function(arr, field) {
return _.flatten(_.map(arr, function(o) {
return _.map(o[field], function(val) {
var cloned = _.clone(o);
cloned[field] = val;
return cloned;
});
}));
}