- PostgreSQL shema
- MySQL shema
- Sqlite shema
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
<?php | |
class BinarySearchTree { | |
private $_root; | |
public function __construct() { | |
// setup sentinal node | |
$this->_root = new BinarySearchNode(null); | |
} | |
public function getRoot() { | |
return $this->hasNode() ? $this->_root->right : null; |
Hierarchical data metrics that allows fast read operations on tree like structures.
Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.
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 | |
# Fix for cron incorrect paths | |
HOME='/root' | |
# Sync database1 to database2 | |
SRC_DB='database1' | |
DST_DB='database2' | |
EXCLUDE_TABLES=(table1 table2) |
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
#!/usr/bin/perl | |
# The user this runs as under the collectd exec plugin must | |
# have sudo to run contrack. | |
# | |
# Something like: | |
# | |
# my_user ALL = NOPASSWD: /usr/sbin/conntrack | |
# | |
# contrack must also be in the users path. Example collectd config: | |
# |
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
# Fast reading from the raspberry camera with Python, Numpy, and OpenCV | |
# Allows to process grayscale video up to 124 FPS (tested in Raspberry Zero Wifi with V2.1 camera) | |
# | |
# Made by @CarlosGS in May 2017 | |
# Club de Robotica - Universidad Autonoma de Madrid | |
# http://crm.ii.uam.es/ | |
# License: Public Domain, attribution appreciated | |
import cv2 | |
import numpy as np |
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
############################################################### | |
# File: lightweight_camera_motion.py | |
# Description: Connect to an MJPG stream and compute the | |
# general direction of motion. | |
# The script first crops and downsamples the | |
# JPEG frames using the JPEGtran library, | |
# to allow processing in low power platforms | |
# like the Raspberry Pi. | |
# | |
# Author: Carlos Garcia-Saura (@CarlosGS) - 2018 |
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
############################################################### | |
# File: gps_continuous.py | |
# Description: Connect to a GPSD daemon and print the latest | |
# coordinate datapoints to the console. | |
# | |
# Author: Carlos Garcia-Saura (@CarlosGS) - 2018 | |
# Modified by: Author (email) - year | |
############################################################### | |
import gpsd |
NewerOlder