Skip to content

Instantly share code, notes, and snippets.

View barucAlmaguer's full-sized avatar
⚛️
Reacting

Baruc barucAlmaguer

⚛️
Reacting
  • valiot.io
  • Monterrey, México
View GitHub Profile
@barucAlmaguer
barucAlmaguer / Matrices.ipynb
Created August 16, 2017 07:10
Ejemplo matrices por Gauss-Jordan
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@barucAlmaguer
barucAlmaguer / Gauss-Siegel.ipynb
Created August 16, 2017 20:12
Analisis numerico - Metodo Gauss Siegel
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@barucAlmaguer
barucAlmaguer / Matrices y tests
Created August 20, 2017 18:50
Libreta de jupyter con clase Matrix basada en lista de listas con métodos de intercambio de filas/columnas
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Metodos de resolucion de matrices"
]
},
{
@barucAlmaguer
barucAlmaguer / filcol.ino
Last active September 23, 2017 23:55
Programilla estructurado v2
int filas [] = {2, 3};
int columnas [] = {8, 9};
void setup() {
//Entradas
for(int i = 0; i < sizeof(columnas); i++)
{
pinMode(columnas[i], INPUT);
}
@barucAlmaguer
barucAlmaguer / xkcd-solver.py
Created August 27, 2018 07:55
Solution to problem proposed in https://xkcd.com/287/ using the cp solver from the or-tools library
# Reference: https://twitter.com/barubaruc/status/1033774083660570628
#
from ortools.constraint_solver import pywrapcp
# constraints
solver = pywrapcp.Solver('Bill')
mixed_fruit = solver.IntVar(0, 7, 'mixed fruit')
french_fries = solver.IntVar(0, 5, 'french fries')
side_salad = solver.IntVar(0, 5, 'side salad')
hot_wings = solver.IntVar(0, 4, 'hot wings')
cheese_sticks = solver.IntVar(0, 3, 'cheese sticks')
@barucAlmaguer
barucAlmaguer / machine.js
Last active November 26, 2019 17:55
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@barucAlmaguer
barucAlmaguer / machine.js
Last active December 13, 2019 17:26
Generated by XState Viz: https://xstate.js.org/viz
const CoilScheduleMachine = Machine({
id: 'CoilSchedule',
initial: 'idle', // ! DEFAULT, others for debugging purposes
context: {
job: null,
presignedUrl: null,
fileContent: null,
// coilPlan: MockPlanData.data.coilPlan // ! Debugging offline purposes
},
states: {
@barucAlmaguer
barucAlmaguer / machine.js
Last active January 11, 2020 17:29
Generated by XState Viz: https://xstate.js.org/viz
const usersMachine = Machine({
id: 'usersMachine',
type: 'parallel',
context: {
users: [],
selectedUser: null,
permissionTypes: null
},
initial: 'viewing_users',
states: {
@barucAlmaguer
barucAlmaguer / machine.js
Created January 15, 2020 23:51
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@barucAlmaguer
barucAlmaguer / machine.js
Created January 17, 2020 19:13
Generated by XState Viz: https://xstate.js.org/viz
const CoilScheduleMachine = Machine({
id: 'CoilSchedule',
context: {
job: {},
csv: [],
balances: [],
startAt: null,
coilsPath: null,
railsPath: null,
errors: [],