pip install jaeger-clientfrom jaeger_client import Tracer, SpanContext, Config
# Replace these with your actual configuration
SERVICE_NAME = "your-application-name"
COLLECTOR_HOST = "localhost"| from flask import Flask, request | |
| from graphene import ObjectType, String, Schema, List, Field | |
| ''' | |
| Pre-requesities: python3 -m pip install graphene flask | |
| USAGE: open Postman and create new QraphQL request then paste this url: http://localhost:5000/graphql and these Queries ... |
pip install jaeger-clientfrom jaeger_client import Tracer, SpanContext, Config
# Replace these with your actual configuration
SERVICE_NAME = "your-application-name"
COLLECTOR_HOST = "localhost"import pika
import json
# Connect to RabbitMQ
connection = pika.BlockingConnection(
pika.ConnectionParameters('localhost', 5672)
)
channel = connection.channel()| docker pull docker.elastic.co/elasticsearch/elasticsearch:7.17.15 | |
| docker pull docker.elastic.co/kibana/kibana:7.17.15 | |
| docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.17.15 | |
| docker run -d --name kibana --link elasticsearch:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:7.17.15 |
| sudo yum install rpm-build rpmdevtools | |
| rpmdev-setuptree | |
| cd /root | |
| mkdir -p rpmbuild/sources/lama_git-1.0 rpmbuild/SPECS | |
| cd rpmbuild/sources/lama_git-1.0 | |
| printf " | |
| #!/bin/bash | |
| git add . | |
| git commit -m \"updated code\" |
| sudo raspi-config | |
| sudo reboot | |
| lsmod | grep spi | |
| sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install -y python3-dev python3-pip && sudo pip install spidev mfrc522 && mkdir ~/pi-rfid && cd ~/pi-rfid | |
| printf " | |
| import RPi.GPIO as GPIO | |
| from mfrc522 import SimpleMFRC522 | |
| reader = SimpleMFRC522() |
print kernels for each video device
udevadm info --attribute-walk --name=/dev/video5 | grep "KERNELS"sudo nano /etc/udev/rules.d/99-custom-camera.rulesadd the following rules
| Useful Links: | |
| - http://stackoverflow.com/questions/25941171/how-to-get-gstreamer1-0-working-with-v4l2-raspicam-driver | |
| - http://raspberrypi.stackexchange.com/questions/26675/modern-way-to-stream-h-264-from-the-raspberry-cam | |
| - http://stackoverflow.com/questions/13154983/gstreamer-rtp-stream-to-vlc | |
| - http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/rtp/README | |
| - http://archpi.dabase.com/#sending-and-receiving-pi-camera-video-over-the-network | |
| - http://emmanuelgranatello.blogspot.de/2013/10/raspberry-pi-gstreamer-streaming-h264.html | |
| - http://stackoverflow.com/questions/15712983/why-rtp-streaming-of-a-avi-video-file-fails-to-be-received |
| # take one picture and save it into file | |
| raspistill -o test.jpg | |
| # record a video for 10 seconds in the h264 codec | |
| raspivid -o test.h264 -t 10000 | |
| # GStreamer | |
| gst-launch-1.0 -e -v v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=480,framerate=10/1 ! videoconvert ! x264enc tune=zerolatency ! rtph264pay config-interval=1 pt=96 ! udpsink host=192.168.3.6 port=5006 sync=false | |
| gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-raw,width=640,height=480' ! x264enc tune=zerolatency ! 'video/x-h264,stream-format=byte-stream' ! h264parse ! rtph264pay ! udpsink host=192.168.3.6 port=5006 | |
| # the below is the one that worked |
| mvn archetype:generate | |
| -DgroupId=com.example | |
| -DartifactId=demo | |
| -DarchetypeArtifactId=maven-archetype-quickstart | |
| -DarchetypeVersion=1.4 | |
| -DinteractiveMode=false |