Skip to content

Instantly share code, notes, and snippets.

View toniesteves's full-sized avatar

Toni Esteves toniesteves

View GitHub Profile
def plot(self,run_results,with_alarm = True, positions = None):
"""
Plot the results of given by the run
Parameters
----------
run_results : dict
results given by the 'run' method
with_alarm : bool
(default = True) If True, alarms are plotted.
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestRegressor
from sklearn.linear_model import LinearRegression, Lasso, Ridge
from sklearn.neighbors import KNeighborsRegressor
from sklearn.neural_network import MLPRegressor
from sklearn.tree import DecisionTreeRegressor
from sklearn.model_selection import train_test_split, GridSearchCV, cross_val_score, cross_val_predict, KFold
import xgboost as xgb
We can't make this file beautiful and searchable because it's too large.
ID,League,Date,HomeTeam,AwayTeam,B365H,B365D,B365A,BWH,BWD,BWA,IWH,IWD,IWA,LBH,LBD,LBA,PSH,PSD,PSA,WHH,WHD,WHA,VCH,VCD,VCA,BbMx>2.5,BbAv>2.5,BbMx<2.5,BbAv<2.5,Year,HS,HST,HF,HC,HY,HR,AS,AST,AF,AC,AY,AR,Result
GER310812#0,Germany,31/08/12,Mainz,Greuther Furth,0.5555555555555556,0.2857142857142857,0.2222222222222222,0.53475935828877,0.2857142857142857,0.2309468822170901,0.5555555555555556,0.29411764705882354,0.25,0.5464480874316939,0.2857142857142857,0.2309468822170901,0.5376344086021505,0.27027027027027023,0.2127659574468085,0.5464480874316939,0.2857142857142857,0.2309468822170901,0.5405405405405405,0.27027027027027023,0.2173913043478261,2.09,1.98,1.94,1.83,2013,[8.0],[3.0],[13.0],[8.0],[2.0],[0.0],[8.0],[3.0],[13.0],[8.0],[2.0],[0.0],0
{
"volumes":[
{
"DataInformacao":"31/01/1990",
"Fonte":"ANA",
"Volume":"518.39",
"VolumePercentual":96.8
},
{
"DataInformacao":"28/02/1990",
@toniesteves
toniesteves / data.csv
Last active September 12, 2019 11:29
Calculo1 LPT P1 IC Calculo2 cra
8.7 10 9 9.1 8.4 8.47764705882353
7 7 7.7 7 6.2 6.8517241379310345
8.6 9.8 7.9 9.6 8.7 9.090588235294119
7.8 8.3 6.8 8.2 8 7.283516483516483
5.2 9.3 5 8.5 5 7.205747126436782
6.1 9.2 9.1 9.3 5.6 7.808235294117647
6.3 9.6 8.3 8.6 6.7 8.858823529411765
7.5 8.9 7.5 7.9 5 6.158823529411765
6.6 9 5 7.9 5 6.7305882352941175
version: 2
jobs:
build:
parallelism: 3
docker:
- image: circleci/ruby:2.4-node
environment:
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
BUNDLE_PATH: vendor/bundle
@toniesteves
toniesteves / artists_releases_spec.rb
Created February 11, 2018 00:42 — forked from stuliston/artists_releases_spec.rb
Testing HABTM with rspec and factory girl
require 'spec_helper'
describe "Artists to releases relationship" do
before(:all) do
@kanye = FactoryGirl.create(:artist, :name => 'Kanye West')
@jz = FactoryGirl.create(:artist, :name => 'Jay Z')
@watch_the_throne = FactoryGirl.create(:release, :name => 'Watch the Throne')
@dropout = FactoryGirl.create(:release, :name => 'The College Dropout')
end
[
{
"name": "Imóveis",
"subcategories": [
{
"name": "Apartamentos",
"kinds": [
{
"name": "Padrão"
},
@toniesteves
toniesteves / alias_matchers.md
Created August 22, 2017 13:51 — forked from JunichiIto/alias_matchers.md
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@toniesteves
toniesteves / album_spec.rb
Created March 20, 2017 17:41 — forked from IPrism/album_spec.rb
Example for testing mongoid assocications with Rspec
require 'spec_helper'
describe Album do
before(:all) do
@album = Factory.build(:album)
@website = @album.website
end
it "should be valid" do
@album.should be_valid
end