This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Benner.Corporativo.Contabilizacao.Models; | |
| using Benner.Messaging; | |
| using Benner.Messaging.Core; | |
| using Microsoft.AspNetCore.Mvc; | |
| namespace Benner.Corporativo.Contabilizacao.Producer.Controller | |
| { | |
| [Route("api/contabilizacao")] | |
| [ApiController] | |
| public class ContabilizacaoController : MessagingController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Benner.Corporativo.Contabilizacao.Models; | |
| using Benner.Listener; | |
| using System; | |
| namespace Benner.Corporativo.Contabilizacao.Consumer | |
| { | |
| public class ContabilizacaoConsumer : EnterpriseIntegrationConsumerBase | |
| { | |
| public override IEnterpriseIntegrationSettings Settings => new EnterpriseIntegrationSettings() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Utilizando biblioteca scikit-learn no python | |
| y = ax + b | |
| a = 1.92 = a inclinação da linha de tendência. | |
| b = -7.39 = o ponto onde a linha de tendência atinge o eixo y. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| from sklearn import linear_model | |
| #carregando dados hipotéticos, para fins didáticos apenas | |
| dataframe = pd.DataFrame() | |
| dataframe['x'] = [5.1, 5.5, 5.9, 6.5, 6.8, 7.6, 8.3, 8.5, 9.1, 9.5] # horas de estudo | |
| dataframe['y'] = [2.0, 2.9, 4.0, 5.9, 6.0, 6.9, 8.0, 9.0, 9.9, 11.0] # pontuaçao alcançada | |
| x_values = dataframe[['x']] | |
| y_values = dataframe[['y']] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Implementando fórmula manualmente no C# | |
| y = ax + b | |
| a = 1,92 = a inclinação da linha de tendência. | |
| b = -7,39 = o ponto onde a linha de tendência atinge o eixo y. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void Main(string[] args) | |
| { | |
| // carregando dados hipotéticos, para fins didáticos apenas | |
| double[] xValues = { 5.1, 5.5, 5.9, 6.5, 6.8, 7.6, 8.3, 8.5, 9.1, 9.5 }; // horas de estudo | |
| double[] yValues = { 2.0, 2.9, 4.0, 5.9, 6.0, 6.9, 8.0, 9.0, 9.9, 11.0 }; // pontuaçao alcançada | |
| // encontrando a média do valor das variáveis independentes (eixo x) e dependentes (eixo y) | |
| double xMedia = 0; | |
| double yMedia = 0; | |
| for (int index = 0; index < xValues.Length; index++) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Tentativa-002 - consegui a média de 70.29 mph | |
| // a few things don't have var in front of them - they update already existing variables the game needs | |
| lanesSide = 1; | |
| patchesAhead = 30; | |
| patchesBehind = 8; | |
| trainIterations = 75000; | |
| var num_inputs = (lanesSide * 2 + 1) * (patchesAhead + patchesBehind); | |
| var num_actions = 5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Tentativa-001 - consegui a média de 54.32 mph com este | |
| // a few things don't have var in front of them - they update already existing variables the game needs | |
| lanesSide = 2; | |
| patchesAhead = 50; | |
| patchesBehind = 10; | |
| trainIterations = 50000; | |
| var num_inputs = (lanesSide * 2 + 1) * (patchesAhead + patchesBehind); | |
| var num_actions = 5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%@ ServiceHost Language="C#" Service="SampleService" Factory="SampleFactory" %> |