Skip to content

Instantly share code, notes, and snippets.

View frank9615's full-sized avatar
👋

Francesco Accardi frank9615

👋
View GitHub Profile
package com.example;
import io.quarkus.runtime.annotations.QuarkusMain;
import io.smallrye.mutiny.Context;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import lombok.extern.slf4j.Slf4j;
import java.io.*;
import java.util.stream.Collectors;
@QuarkusMain
@Slf4j
public class ExampleResource {
public static void main(String[] args) throws IOException {
Multi.createFrom().iterable(Arrays.asList(1,2,3,4))
.onItem()
.call(integer -> {
System.out.println(integer);
if(integer.equals(2)){
@frank9615
frank9615 / install_ros_kinetic_raspian_buster.sh
Last active March 15, 2022 15:40
Install ros kinetic on raspbian buster
#!/bin/bash
# Install ros kinetic on raspian buster
cd ~
wget http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz
tar xvzf boost_1_58_0.tar.gz
mkdir ~/build
cd boost_1_58_0/
sudo ./bootstrap.sh
sudo ./b2 install —prefix="../build"
@frank9615
frank9615 / greenselector.py
Created October 3, 2019 21:25
Detecting colors (Hsv Color Space) - Opencv with Python
# USAGE
# python distance_to_camera.py
# import the necessary packages
from imutils import paths
import numpy as np
import imutils
import cv2
/*
* Calculate SHA1
* @Compile with -lcrypto
* _________________________________________________________________
* |Openssl MacOs install |
* -----------------------------------------------------------------
* |brew install openssl |
* |brew link --force openssl |
* |ln -s /usr/local/opt/openssl/include/openssl /usr/local/include|
* -----------------------------------------------------------------
HEX
2000B420 CONSTANT ARM_TIMER_CNT
: us@ ARM_TIMER_CNT @ ;
: usecs ;
: msecs 1000 * ;
: secs 1000000 * ;
: us us@ + BEGIN DUP us@ - 0<= UNTIL DROP ;
: LEDON 00010000 20200028 ! ;
: LEDOFF 00010000 2020001C ! ;
: BLINK BEGIN LEDON 42 msecs us LEDOFF 42 msecs us 0 UNTIL ;
: LEDON 00010000 20200028 ! ;
: LEDOFF 00010000 2020001C ! ;