Skip to content

Instantly share code, notes, and snippets.

View zored's full-sized avatar
🏠
Working from home

Robert Akhmerov zored

🏠
Working from home
View GitHub Profile
@learncodeacademy
learncodeacademy / iris-tensorflow-js.js
Last active July 20, 2023 04:20
Solving Iris with Tensorflow.js and Iris JSON dataset
View iris-tensorflow-js.js
import * as tf from "@tensorflow/tfjs"
import "@tensorflow/tfjs-node"
import iris from "./iris.json"
import irisTesting from "./iris-testing.json"
// convert/setup our data
const trainingData = tf.tensor2d(iris.map(item => [
item.sepal_length, item.sepal_width, item.petal_length, item.petal_width,
]))
const outputData = tf.tensor2d(iris.map(item => [
@nikita-graf
nikita-graf / decode-electron-crash-reporter-dump.md
Last active September 6, 2023 10:33
How to decode Electron crash dump
View decode-electron-crash-reporter-dump.md

Here are steps to decode Electron crashReporter dump on macOS:

  1. Download and install breakpad
  2. Download *-symbols.zip for your Electron release
  3. Setup a simple express app:
const app = require('express')();
const path = require('path');
const fs = require('fs');
const multer = require('multer');
@pfmoore
pfmoore / factorio-recipe-parser.lua
Last active September 10, 2021 15:42
Parse the Factorio recipe files to create a CSV of recipes
View factorio-recipe-parser.lua
data = {}
data["extend"] = function (data, t)
for n, recipe in ipairs(t) do
for i, component in ipairs(recipe["ingredients"]) do
cname = component[1] or component["name"]
camt = component[2] or component["amount"]
print('"' .. recipe["name"] .. '","' .. cname .. '",' .. camt)
end
end
end