Skip to content

Instantly share code, notes, and snippets.

@michhar
michhar / preprocessor.py
Created February 28, 2022 18:35
Preprocessor for use with LogAnomaly (based on logdeep project)
"""
Contributor: Micheleen Harris
Date: Feb. 20, 2022
Original source: https://github.com/donglee-afar/logdeep/issues/3#issuecomment-750028771
Purpose: Map event ids to an encoded semantics vector (specifically for loganomaly method)
Notes:
- Uses the spellpy parser project: https://github.com/nailo2c/spellpy (need to pip install)
- Need the stop words Python file from SpaCy in project folder with this file: https://github.com/explosion/spaCy/blob/master/spacy/lang/en/stop_words.py
- Example below are from Ubuntu system logs (normal and abnormal as deemed by user)
#############################################################################################
# Purpose: Run JupyterLab on Percept (Mariner OS) to train small vision models
# Author: Micheleen Harris
# License: MIT
# Build with: sudo docker build -t <give me some name and tag> -f Dockerfile.jupyterlab .
# Run with: sudo docker run -it --rm -p 8888:8888 -v /home/<linux username>/notebooks:/home/ --privileged <image name with tag>
# Additional file: clean_python.sh, requirements.txt and any Jupyter notebooks you wish
#############################################################################################
ARG BASE_IMAGE=ubuntu:18.04
@michhar
michhar / requirements-gpu-tflite.txt
Last active March 4, 2021 01:52
GPU Python requirements file for https://github.com/hunglc007/tensorflow-yolov4-tflite compatible with Ubuntu 18.04
tensorflow-gpu==2.3.1
opencv-python
lxml
tqdm
absl-py
matplotlib
easydict
pillow
#!/usr/bin/env bash
# This script is intended as an initialization script used in azuredeploy.json
# See documentation here: https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-linux#template-deployment
# see abbreviated notes in README.md
# comments below:
adminUser=$1
@michhar
michhar / Code-of-Conduct-for-Seattle-Artificial-Intelligence-Workshops-Meetup.md
Created June 17, 2019 00:26
Code of Conduct for Seattle Artificial Intelligence Workshops Meetup

Seattle Artificial Intelligence Workshops is dedicated to providing a respectful, harassment-free community for everyone. We do not tolerate harassment or bullying of any community member in any form.

Harassment includes offensive verbal/electronic comments related to personal characteristics or choices, sexual images or comments in public or online spaces, deliberate intimidation, bullying, stalking, following, harassing photography or recording, sustained disruption of talks, IRC chats, electronic meetings, physical meetings or other events, inappropriate physical contact, or unwelcome sexual attention. Participants asked to stop any harassing or bullying behavior are expected to comply immediately.

If a participant engages in harassing behavior, representatives of the community may take reasonable action they deem appropriate, including warning the offender, expulsion from any Seattle Artificial Intelligence Workshops event, or expulsion from mailing lists, IRC chats, discussion boards and other electron

@michhar
michhar / notes_pytorch_maskrcnn_windows.md
Last active June 10, 2021 06:32
Notes on installing pytorch-mask-rcnn
{
"actors": [
"Chris Pratt",
"Bryce Dallas Howard",
"Irrfan Khan",
"Vincent D'Onofrio"
],
"director": [
"Colin Trevorrow"
],
@michhar
michhar / movie001.json
Created January 4, 2017 23:26
Sample movie definition as a json document
{
"actors": [
"Chris Pratt",
"Bryce Dallas Howard",
"Irrfan Khan",
"Vincent D'Onofrio"
],
"director": [
"Colin Trevorrow"
],