Skip to content

Instantly share code, notes, and snippets.

View alexrhogue's full-sized avatar

Alex R Hogue alexrhogue

View GitHub Profile
import tf from '@tensorflow/tfjs';
import fs from 'fs';
const training = JSON.parse(fs.readFileSync('./data/training.json', { encoding: 'utf8'}));
const raw_data = training.data
const inputs = raw_data.map(d => d[0].reduce((p, c) => [...p, ...c], []))
const labels = raw_data.map(d => d[1].length === 0 ? [-1,-1,-1] : d[1]);
const inputTensor = tf.tensor2d(inputs, [inputs.length, 48]);
const NUM_CARD_PROP_OPTIONS = 3;
const NUM_CARD_PROPS = 4
const BOARD_SIZE = 12;
const SET_SIZE = 3;
export const getCardProp = () => Math.floor(Math.random() * NUM_CARD_PROP_OPTIONS)
export const getCard = () => new Array(NUM_CARD_PROPS).fill().map(getCardProp)
export const getBoard = () => new Array(BOARD_SIZE).fill().map(getCard)
export const combinations = (arr = [], len) => {
@alexrhogue
alexrhogue / Hello Remix 2
Created March 1, 2021 01:26
Created from Remix Form!
With Fancy
@alexrhogue
alexrhogue / Hello Remix
Created March 1, 2021 01:22
Created from Remix Form!
Did this work!?
@alexrhogue
alexrhogue / keybase.md
Last active August 11, 2020 21:31
keybase.md

Keybase proof

I hereby claim:

  • I am alexrhogue on github.
  • I am alexrhogue (https://keybase.io/alexrhogue) on keybase.
  • I have a public key ASDxTxa_z4ONqySIkAuW2MYoBhe26KCtbXrIweZ6qKvgqwo

To claim this, I am signing this object: