Skip to content

Instantly share code, notes, and snippets.

View amattu2's full-sized avatar

Alec M amattu2

View GitHub Profile
@amattu2
amattu2 / obd2-codes.js
Last active December 24, 2020 02:35
This is a Javascript Object (json) representing generic automotive OBD-II codes and their descriptions. Scraped from a unknown website, parsed by me.
/*
This is a simple JavaScript parsing of generic automotive OBD-2 codes. This is just a generic description, so not all codes will be accurate per manufacturer.
Codes Ranges:
PXXXX (P0000-P1917)
CXXXX (C1091-C1963)
BXXXX (B1200-B2606)
UXXXX (U1900-A few)
Eg: console.log(OBDs["P303"]) // 'Cylinder 3 Misfire Detected'
@amattu2
amattu2 / username-pass-io.c
Created December 17, 2020 14:28
A simple ANSI-C I/O demonstration. Reads a username and password from stdin, performs tab/newline replacement on the username/password.
/*
ANSI-C C90: -std=c99 -c -Wall -ansi -pedantic-errors -fstack-protector-all -Werror -Wshadow
Build: gcc username-pass-io.c -o io.o
*/
/*
Produced 2020
By https://amattu.com/links/github
Copy Alec M.
@amattu2
amattu2 / read-file.c
Created December 20, 2020 14:42
Read the specified file into the console (stdout).
/*
Produced 2020
By https://amattu.com/links/github
Copy Alec M.
License GNU Affero General Public License v3.0
*/
/*
Description:
- Read the specified file into the console
@amattu2
amattu2 / multiple-label-classification-reviews.py
Last active December 24, 2020 12:15
Generate a Sklearn model from resturant reviews, and evaluate user input against the multilabel-classification model. Code heavily borrowed from https://www.geeksforgeeks.org/an-introduction-to-multilabel-classification/
"""
Produced 2020
By https://amattu.com/links/github
Copy Alec M.
"""
"""
Original Author
https://www.geeksforgeeks.org/an-introduction-to-multilabel-classification/
"""
@amattu2
amattu2 / multiple-label-classification-appointments.py
Last active December 24, 2020 02:31
Generate a Sklearn multiple-label classification model off of Automotive service appointments. The dataset was built from a proprietary dataset that was anonymized.
"""
Labels automotive appointment description/comments
based on a trained multi-label classification model
Expected CSV structure:
ID|Tech|Service|Comments|mechanical|bodywork|diagnostic|suspension|engine|exhaust|electrical|brakes|tires
Structre notes:
ID, Tech, Service - Irrelevent, used during transcription
Comments - Used to generate the model
@amattu2
amattu2 / 2019_Model_Structure.sql
Last active December 24, 2020 12:10
This is a simple machine learning model trainer UI kit. I used it to clean/setup multi-label classification model datasets. Based off of HTML5/CSS3, JavaScript (ES6), PHP (>= ~6.0)
-- phpMyAdmin SQL Dump
-- version 4.9.7deb1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 24, 2020 at 07:08 AM
-- Server version: 8.0.22-0ubuntu0.20.10.2
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@amattu2
amattu2 / action-prompt.html
Created February 4, 2021 21:19
A "action prompt" design, made to popover content and request an action.
<!-- Alec M., 2021 -->
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Action Prompt Design</title>
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<style>
/* Variables */
:root {
@amattu2
amattu2 / popover-sidebar.html
Created February 4, 2021 21:28
A popover content sidebar designed to overlay prompt-style content on the side of the screen.
<!DOCTYPE html>
<!-- Alec M., 2021 -->
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Popover Sidebar</title>
<style>
html,
body {
margin: 0;
@amattu2
amattu2 / notification-prompt.html
Created February 4, 2021 21:32
This is a small HTML snippet of a notification-style actionable popup.
<!DOCTYPE html>
<!-- Alec M., 2021 -->
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Upcoming Notification</title>
<style>
body, HTML {
background: #f2f5f7;
margin: 0;
@amattu2
amattu2 / offline.html
Created February 4, 2021 21:36
A basic internet connectivity loss notice. Designed to overlay full screen content in the event of a user losing internet connection on your webapp.
<html>
<!-- Alec M., 2021 -->
<head>
<title>Offline Example</title>
<style>
/* Standard Items */
html, body {
margin: 0;
padding: 0;
font-family: sans-serif;