Skip to content

Instantly share code, notes, and snippets.

View samuelcaldas's full-sized avatar
💭
hi 🙂

Samuel Caldas samuelcaldas

💭
hi 🙂
View GitHub Profile
@samuelcaldas
samuelcaldas / build.prop
Created March 13, 2025 22:45
amlogic tv box build.prop
# begin common build properties
# autogenerated by build/make/tools/buildinfo_common.sh
ro.system.build.date=Tue Jul 13 18:16:54 CST 2021
ro.system.build.date.utc=1626171414
ro.system.build.fingerprint=google/walleye/walleye:10/QP1A.191105.004/5908170:user/release-keys
ro.system.build.id=QP1A.191105.004
ro.system.build.tags=test-keys
ro.system.build.type=eng
ro.system.build.version.incremental=eng.akrd6.20210713.181958
@samuelcaldas
samuelcaldas / docker-compose.yml
Last active December 10, 2024 21:28
whatsapp-stack
version: "3.9"
services:
postgres:
image: postgres:14
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=SenhaSeguraAqui
- POSTGRES_DB=n8ndb
@samuelcaldas
samuelcaldas / AddonTest.cs
Created July 4, 2023 08:31
An exemple for testing ninjatrader addons
using NinjaTrader.Cbi;
using NinjaTrader.UnitTest;
using System;
using System.Linq;
namespace NinjaTrader.NinjaScript.AddOns
{
public class AddonTests : TestCase
{
private const string InstrumentName = "MES 09-23";
@samuelcaldas
samuelcaldas / GymSharp.cs
Last active May 7, 2023 08:06
This class represents a gym environment that can be interacted with in C# using Python.NET. It uses the Python.Runtime library to create an instance of a gym environment and exposes methods to perform actions, get observations, reset the environment, render it, and close it. The ObservationDimensions and NumActions properties return the dimensio…
using Python.Runtime;
using System;
using System.Collections.Generic;
namespace GymSharp
{
public class Env : IDisposable
{
private dynamic env;
private PyObject pyEnv;
@samuelcaldas
samuelcaldas / perceptruino.ino
Last active April 9, 2023 03:37
Este código é um exemplo de como implementar um Perceptron simples usando um Arduino e um LED endereçável.
/*
PerceptrUINO - Perceptron com Arduino
Samuel Oliveira Caldas
Como utilizar o PerceptrUINO:
- Conecte o Arduino a uma fonte de energia
- O LED piscará azul, verde e vermelho 3 vezes e ficará branco indicando está pronto para ser utilizado
- Para treinar a rede, pressione e segure um dos três botões de entrada enquanto o LED estiver piscando
- Pressione o botão "Certo" ou "Errado" para indicar se a cor do LED é a cor esperada para aquele botão
- Faça isso algumas vezes para que a rede aprenda
#region Using declarations
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
#region Using Statements
using NinjaTrader.Gui;
using NinjaTrader.Gui.Tools;
using System;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Xml.Linq;
#endregion
#region Using declarations
using System;
using System.Windows;
using System.Windows.Controls;
using NinjaTrader.Gui;
using NinjaTrader.Gui.Tools;
using NinjaTrader.NinjaScript;
#endregion
namespace NinjaTrader.NinjaScript.AddOns
@samuelcaldas
samuelcaldas / ppo_cartpole.py
Created November 6, 2021 03:18
Implementation of a Proximal Policy Optimization agent for the CartPole-v0 environment.
"""
Title: Proximal Policy Optimization
Author: [Ilias Chrysovergis](https://twitter.com/iliachry)
Date created: 2021/06/24
Last modified: 2021/06/24
Description: Implementation of a Proximal Policy Optimization agent for the CartPole-v0 environment.
"""
"""
## Introduction
@samuelcaldas
samuelcaldas / KerasA2C.cs
Created March 18, 2021 04:31 — forked from alexhiggins732/KerasA2C.cs
Keras Actor Critic in TensorFlow.net
using System;
using System.Collections.Generic;
using NumSharp;
using Tensorflow.Keras.Layers;
using Tensorflow.Keras.Losses;
using Tensorflow.Keras.Optimizers;
using Tensorflow.Keras.Utils;
using static Tensorflow.Binding;
using static Tensorflow.KerasApi;