Skip to content

Instantly share code, notes, and snippets.

View Caaz's full-sized avatar

Daniel Cavazos Caaz

View GitHub Profile
@Caaz
Caaz / MLP.py
Created December 9, 2022 22:34
Generic Multi Layered Perceptron, via chatGPT
class MultiLayeredPerceptron:
def __init__(self, *layers):
self.layers = layers
def forward(self, input):
# Perform a forward pass through the layers of the network
for layer in self.layers:
output = layer.forward(input)
input = output
return output
const {MessageEmbed, WebhookClient} = require('discord.js');
const TTAPI = require('ttapi');
const secrets = require('./secrets.json');
const turntable = new TTAPI(secrets.AUTH, secrets.USERID, secrets.room_id);
const webhook = new WebhookClient({id: secrets.webhook_id, token: secrets.webhook_token});
turntable.on('ready', _ => {
turntable.roomRegister(secrets.room_id);
<?xml version="1.0" encoding="utf-8" ?><Defs><BodyDef><defName>Typhon_Mimic</defName><label>typhon mimic</label><corePart><def>TyphonThorax</def><height>Middle</height><depth>Outside</depth><groups><li>Torso</li></groups><parts><li><def>Eye</def><customLabel>left eye</customLabel><coverage>0.12</coverage></li><li><def>Eye</def><customLabel>right eye</customLabel><coverage>0.12</coverage></li><li><def>Heart</def><coverage>0.03</coverage><depth>Inside</depth></li><li><def>TyphonMimicLeg</def><customLabel>front left leg</customLabel><coverage>0.07</coverage><height>Bottom</height><groups><li>FrontLeftLeg</li></groups></li><li><def>TyphonMimicLeg</def><customLabel>front right leg</customLabel><coverage>0.07</coverage><height>Bottom</height><groups><li>FrontRightLeg</li></groups></li><li><def>TyphonMimicLeg</def><customLabel>rear left leg</customLabel><coverage>0.07</coverage><height>Bottom</height></li><li><def>TyphonMimicLeg</def><customLabel>rear right leg</customLabel><coverage>0.07</coverage><height>Bottom</h
Version: 1
Name: 2022
Mods:
- Id: brrainz.harmony
Name: Harmony
- Id: me.samboycoding.betterloading
Name: BetterLoading
- Id: ludeon.rimworld
Name: Core
- Id: trinity.runtimegcupdated
Version: 1
Name: All the Things
Mods:
- Id: brrainz.harmony
Name: Harmony
- Id: ludeon.rimworld
Name: Core
- Id: ludeon.rimworld.ideology
Name: Ideology
- Id: ludeon.rimworld.royalty
@Caaz
Caaz / test.java
Last active March 24, 2021 23:40
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Tester implements Runnable {
private JFrame createFrame() {
JFrame frame = new JFrame();
frame.setBounds(100, 100, 817, 553);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
c1 = 0; // coordinate 1
c2 = 1 / 2; // coordinate 2
c3 = (1 + sqrt(5)) / 4; // coordinate 3; phi / 2
function icosahedron_faces() = [
[ 0, 1, 5], // right rear
[ 0, 4, 1], // right front
[ 0, 5, 10], // top rear right
[ 0, 8, 4], // top front right
[ 0, 10, 8], // top right
[ 1, 4, 9], // bottom front right
Version: 1
Name: B
Mods:
- Id: Core
Name: Core
- Id: 1684944322
Name: Startup impact
- Id: ModManager
Name: Mod Manager
- Id: HugsLib
Version: 1
Name: B
Mods:
- Id: Core
Name: Core
- Id: ModManager
Name: Mod Manager
- Id: HugsLib
Name: HugsLib
- Id: JecsTools-1.1.0.15
@Caaz
Caaz / mlp.lua
Created September 18, 2018 21:56
Multi Layered Perceptron
_mlp = _{
new = function(t,a)
merge(t,{
learning_rate = 0.5,
},a)
-- inputs is a thing
t.hidden_layer = _neuron_layer{count=t.hidden}
t.output_layer = _neuron_layer{count=t.outputs}
-- initialize neuron layers with weights