Skip to content

Instantly share code, notes, and snippets.

View plusangel's full-sized avatar
😁
happy coding!

angelos plastropoulos plusangel

😁
happy coding!
View GitHub Profile
@plusangel
plusangel / fashion_mnist_nn.py
Last active July 15, 2023 13:26
fashion mnist neural network approach
# To load the mnist data
from keras.datasets import fashion_mnist
from tensorflow.keras.models import Sequential
# importing various types of hidden layers
from tensorflow.keras.layers import Conv2D, MaxPooling2D,\
Dense, Flatten, Softmax
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.losses import SparseCategoricalCrossentropy
@plusangel
plusangel / pm_ad.md
Last active July 23, 2022 18:23
Predictive maintenance & anomaly detection

LSTM for Predictive Maintenance on Pump Sensor Data - link

Time series analysis to explain the thought process in a predictive maintenance case -- almost done--

Time Series Anomaly Detection with PyFBAD - link

An End-to-End Unsupervised Outlier Detection

Time Series Forecasting With Prophet in Python - link

The Prophet library is an open-source library designed for making forecasts for univariate time series datasets and another example here

@plusangel
plusangel / adding_new_packages.md
Created June 1, 2022 19:07
Add additional packages to ROS noetic in rPi4

Let's say that we are in rPi4 we have installed ROS noetic following this guide and we want to add a couple of new packages. In our case we have selected ros_comm package. Imagine that we want to add teleop_twist_keyboard.

cd ros_catkin_ws/
source devel_isolated/setup.bash
rosinstall_generator ros_comm teleop_twist_keyboard --rosdistro noetic --deps --wet-only --tar > noetic-custom_ros.rosinstall
wstool merge -t src noetic-custom_ros.rosinstall
wstool update -t src
rosdep install -y --from-paths src --ignore-src --rosdistro noetic -r --os=debian:buster
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/noetic
@plusangel
plusangel / CMakeLists.txt
Created January 2, 2022 15:54
RAII example in modern C++ (example b)
cmake_minimum_required(VERSION 3.0.0)
project(raii_examples VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_executable(raii_2 raii_2.cpp)
@plusangel
plusangel / CMakeLists.txt
Created January 2, 2022 15:53
RAII in modern C++ (example a)
cmake_minimum_required(VERSION 3.0.0)
project(raii_examples VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_executable(raii_1 raii_1.cpp)
@plusangel
plusangel / ros_qt_app.py
Created October 31, 2021 19:18
rospylib qt app
import sys
from time import sleep
from PySide2.QtCore import Qt, QObject, QThread, Signal, Slot
from PySide2.QtWidgets import (
QApplication,
QLabel,
QMainWindow,
QPushButton,
QVBoxLayout,
@plusangel
plusangel / CMakeLists.txt
Created October 31, 2020 19:04
CMake dependent options
project(cmake_recipe01 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
# set(USE_LIBRARY OFF)
option(USE_LIBRARY "Compile sources into a library" OFF)
message(STATUS "Compile sources into a library? ${USE_LIBRARY}")
include(CMakeDependentOption)
cmake_dependent_option(
@plusangel
plusangel / CMakeLists.txt
Created October 31, 2020 11:25
CMake using conditionals
cmake_minimum_required(VERSION 3.17)
project(cmake_recipe01 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
set(USE_LIBRARY ON)
message(STATUS "Compile sources into library? ${USE_LIBRARY}")
set(BUILD_SHARED_LIBS OFF)
list(APPEND _sources Message.h Message.cpp)
@plusangel
plusangel / notes.txt
Last active October 3, 2020 19:17
Byobu: basic shortcuts
byobu new -s embedded-cookbook
byobu list-sessions
byobu attach-session -t embedded-cookbook
byobu kill-session -t embedded-cookbook
F6 will detach your current Byobu session
F2 creates new windows within the current session.
F3 and F4 scroll left and right through the windows list.
F8 renames the current open window in the list
@plusangel
plusangel / CMakeLists.txt
Created June 13, 2020 18:02
Extensible factory template
cmake_minimum_required(VERSION 3.16)
project(factory_methods)
set(CMAKE_CXX_STANDARD 17)
add_library(shape_factory shape_factory.cpp)
add_executable(factory_method main.cpp)
target_link_libraries(factory_method shape_factory)