Skip to content

Instantly share code, notes, and snippets.

/*
Copyright (c) 2012, Broadcom Europe Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
// TESTED ON nightly-build ver 0.8 (of_v20130813) in Visual Studio 2012 - Win64
// MAKE APP ALWAYS ON TOP
HWND AppWindow = GetActiveWindow();
SetWindowPos(AppWindow, HWND_TOPMOST, NULL, NULL, NULL, NULL, SWP_NOMOVE | SWP_NOSIZE);
// DISABLE FUNCTION DESCRIBED ABOVE
HWND AppWindow = GetActiveWindow();
From this: https://github.com/raspberrypi/linux/issues/1285#issuecomment-182264729
That is, add:
dtparam=watchdog=on
to the end of /boot/config.txt
$ ls -l /dev/wat*
crw------- 1 root root 10, 130 May 20 01:28 /dev/watchdog
crw------- 1 root root 253, 0 May 20 01:28 /dev/watchdog0
@natxopedreira
natxopedreira / piWatchdog.h
Last active September 27, 2017 19:33
clase para rpi watchdog
#ifndef rpiWatchdog_h
#define rpiWatchdog_h
#include <linux/watchdog.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
class piWatchdog
{
//
// s3Threaded.h
// AWS
//
// Created by Natxo Pedreira gonzalez on 31/5/18.
//
//
#ifndef AWS_s3Threaded_h
#define AWS_s3Threaded_h
https://github.com/williamFalcon/tensorflow-gpu-install-ubuntu-16.04
http://blog.nitishmutha.com/tensorflow/2017/01/22/TensorFlow-with-gpu-for-windows.html
https://medium.com/@taylordenouden/installing-tensorflow-gpu-on-ubuntu-18-04-89a142325138
python style.py --style styles\Staryy.jpg --checkpoint-dir models\starry --content-weight 1.5e1 --checkpoint-iterations 1000 --batch-size 3
from facelib import facerec
import cv2
import time
face_detector = facerec.SSDFaceDetector(tpu=True)
landmark_detector = facerec.LandmarkDetector(name='mobilenet_int8_tpu')
feature_extractor = facerec.FeatureExtractor(name='mobilenet_int8_tpu')
pipeline = facerec.Pipeline(face_detector, landmark_detector, feature_extractor)
@natxopedreira
natxopedreira / openvino install from source
Last active May 27, 2020 15:29
add paths of a fresh compiled openvino from source
export PYTHONPATH="/home/pi/openvino/bin/armv7l/Release/lib/python_api/python3.7/:$PYTHONPATH"
#export PYTHONPATH="/home/pi/openvino/inference-engine/temp/opencv_4.3.0_debian9arm/python/python3:$PYTHONPATH"
export LD_LIBRARY_PATH="/home/pi/openvino/inference-engine/temp/opencv_4.3.0_debian9arm/opencv/lib/:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/home/pi/openvino/bin/armv7l/Release/lib/:$LD_LIBRARY_PATH"
export PYTHONPATH=/home/pi/opencv_install/lib/python2.7/dist-packages/:$PYTHONPATH
export PYTHONPATH=/home/pi/opencv_install/lib/python3.7/dist-packages/:$PYTHONPATH
export LD_LIBRARY_PATH=/home/pi/opencv_install/lib/:$LD_LIBRARY_PATH
@natxopedreira
natxopedreira / openvino build
Created May 20, 2020 22:10
my notes on how to build from source
FROM debian:buster
USER root
RUN dpkg --add-architecture armhf && \
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
crossbuild-essential-armhf \
cmake \