Skip to content

Instantly share code, notes, and snippets.

View gaborvecsei's full-sized avatar

Gábor Vecsei gaborvecsei

View GitHub Profile
model = load_model("/random_forest_model.pkl")
try:
sepal_length, sepal_width, petal_length, petal_width = parse_comment_input(args.issue_comment_body)
predicted_class_id = make_prediction(model, sepal_length, sepal_width, petal_length, petal_width)
predicted_class_name = map_class_id_to_name(predicted_class_id)
reply_message = f"Hey @{args.issue_user}!<br>This was your input: {args.issue_comment_body}.<br>The prediction: **{predicted_class_name}**"
except Exception as e:
reply_message = f"Hey @{args.issue_user}! There was a problem with your input. The error: {e}"
FROM python:3.6
# Install python requirements
COPY requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
# Setup Docker entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
name: Demo
on: [issue_comment]
jobs:
my_first_job:
runs-on: ubuntu-latest
name: Just a simple demo job
steps:
- name: Checkout
uses: actions/checkout@master
name: 'Prediction GitHub Action Test'
description: 'This is a sample with which you can run inference on a ML model with a toy dataset'
inputs:
issue_comment_body:
required: true
description: 'This is the Github issue comment message'
issue_number:
required: true
description: 'Number of the Github issue'
issue_user:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gaborvecsei
gaborvecsei / install_opencv_raspberry_pi_3b.sh
Last active January 24, 2023 19:52
Install OpenCV easily on your Raspberry Pi 3 B
mkdir opencv
cd opencv
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get install build-essential cmake pkg-config -y
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev -y
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev -y
sudo apt-get install libxvidcore-dev libx264-dev -y
sudo apt-get install libgtk2.0-dev libgtk-3-dev -y
sudo apt-get install libatlas-base-dev gfortran -y
@gaborvecsei
gaborvecsei / RebotKit_Basic_Info.md
Last active October 10, 2017 08:30
RebotKit basic information sheet for promotional uses

RebotKit basic Info

  • Name/Név: RebotKit
  • Hashtag: #Rebot #RebotKit
  • Webpage/Honlap: rebotkit.net
  • LinkedIn: linkedin.com/company/rebotkit
  • Facebook: https://www.facebook.com/rebotkit
  • Slogan: Don't throw it out, create a Rebot!
  • Promotional Images/Promóciók képek: Contact us via the contact info at our webpage
@gaborvecsei
gaborvecsei / opencv_camera.py
Created September 30, 2017 16:17
OpenCV threaded Camera object for higher FPS and processing
import threading
import cv2
class Camera(object):
"""
Base Camera object
"""
import re
import nltk
import pandas as pd
from nltk.stem.snowball import SnowballStemmer
from sklearn.cluster import DBSCAN
from sklearn.feature_extraction.text import TfidfVectorizer
df = pd.read_csv("data/movie_metadata.csv", header=0)