This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdio.h" | |
#include "sonar.h" | |
int main() { | |
float symbol[] = { 0.13545444218373617, 0.06881865114264074, 0.1435361586761664, 0.1748921999328592, 0.021482698616699204, 0.05181458327897204, 0.19727342985895033, 0.07068028111428455, 0.10442642349850652, 0.07397413931047846, 0.050278495886241045, 0.06736349405231731, 3.8110146724237617, 2.1771302499993337, -1.830551718201271, -1.619008391744408, 0.5797330871737123, 0.46868678568291017, -0.2979215770842604, 0.6410885473557744 }; | |
int xclass = eml_net_predict(&sonar, symbol, 20); | |
printf("Predicted class: %d\n", xclass); | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def hough_circ(grad, radius, eps=0.1): | |
"""Performs Hough-Transformation for fixed size circles | |
Parameters | |
---------- | |
grad: numpy.matrix | |
Binary image after canny |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# The script configures simultaneous AP and Managed Mode Wifi on Raspberry Pi Zero W (should also work on Raspberry Pi 3) | |
# Usage: curl https://gist.githubusercontent.com/lukicdarkoo/6b92d182d37d0a10400060d8344f86e4/raw | sh -s WifiSSID WifiPass APSSID APPass | |
# Licence: GPLv3 | |
# Author: Darko Lukic <[email protected]> | |
# Special thanks to: https://albeec13.github.io/2017/09/26/raspberry-pi-zero-w-simultaneous-ap-and-managed-mode-wifi/ | |
MAC_ADDRESS="$(cat /sys/class/net/wlan0/address)" | |
CLIENT_SSID="${1}" | |
CLIENT_PASSPHRASE="${2}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: curl https://gist.githubusercontent.com/lukicdarkoo/e33e00c6780ad0215d3932b810a10e46/raw | sh | |
echo "In case of any issues please consult cosmicpi.org for help, or contact us via Facebook " | |
echo "--- Expand the file system ---" | |
sudo resize2fs /dev/mmcblk0p2 | |
echo "--- Update OS ---" | |
sudo apt -y update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let startTime = process.hrtime(); | |
if (centerPoint.getDistance(Mep.Position.getPosition()) < this.config.hazardObstacleDistance) { | |
let target = this._targetQueue.getTargetBack(); | |
if (target !== null) { | |
let line = new Line(Mep.Position.getPosition(), target.getPoint()); | |
if (line.isIntersectWithPolygon(polygon) === true) { | |
// this.emit('pathObstacleDetected', true); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Starts a YouTube video only when it is visible on screen. If user stops the video | |
* it will not be played again. | |
* | |
* @example | |
* <iframe id="video-intro" width="100%" height="380px" src="https://www.youtube.com/embed/ZyOuAHrKX2c?rel=0&controls=0&showinfo=0&enablejsapi=1" frameborder="0"></iframe> | |
* <script> | |
* new SmartVideoPlayer('video-intro'); | |
* </script> | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage `curl https://gist.githubusercontent.com/lukicdarkoo/1a448da0903e0a21fc77979b9e24c3b9/raw/99ae53ef92c4c1ca85e0e992e7b62098f74036b1/kinetic-ubuntu.sh | sh` | |
# Make ROS packages available | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
wget http://packages.ros.org/ros.key -O - | sudo apt-key add - | |
sudo apt update | |
# Install ROS | |
sudo apt install -y ros-kinetic-desktop-full |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The script allows fast performance comparison of Node.js interpreter (different version on different architectures). | |
* `curl https://gist.githubusercontent.com/lukicdarkoo/810dcac696ddd6fcc956fb6a5fdd9693/raw | node` | |
*/ | |
// Functions | |
function calc(val) { | |
return { | |
'cos': Math.cos(val), | |
'sin': Math.sin(val) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Use following command to run the script: | |
# $ curl https://gist.githubusercontent.com/lukicdarkoo/3ff2af3f739ee8ead98da950747a3db9/raw/a998c45fde127ee58808f55db3cd53b6ceded88d/music.sh | sh | |
# | |
# Created by Darko Lukic <[email protected]> | |
DEVICE=/dev/sdb | |