This file contains hidden or 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
| void detectMotion(AVPixelFormat format, AVFrame *pFrame) | |
| { | |
| static bool firstRun = true; | |
| static cv::Mat lastImage; | |
| static double _area = 0; | |
| static double area = 0; | |
| static int frameProcessed = 0; | |
| vector<vector<cv::Point> > cnts; | |
| cv::Mat origin; | |
| avcvhelpers::frame2mat(format, pFrame, origin); |
This file contains hidden or 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
| /*# 1- Identify the UART interface, GPIO pins and Alternate Function #########*/ | |
| /* For example: | |
| * B-L475E-IOT01A: | |
| * PB6 ------> USART1_TX | |
| * PB7 ------> USART1_RX | |
| * | |
| * NUCLEO-L476RG: | |
| * PA2 ------> USART2_TX | |
| * PA3 ------> USART2_RX | |
| * |
This file contains hidden or 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 | |
| gst-launch-1.0 -v \ | |
| rtpbin name=rtpbin \ | |
| udpsrc caps="application/x-rtp,media=video,clock-rate=90000,encoding-name=H264" port=5004 \ | |
| ! rtpbin.recv_rtp_sink_0 \ | |
| rtpbin. \ | |
| ! rtph264depay ! h264parse \ | |
| ! avdec_h264 ! videoconvert \ | |
| ! ximagesink |
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 hidden or 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
| from keras import backend as K, initializers, regularizers, constraints | |
| from keras.engine.topology import Layer | |
| def dot_product(x, kernel): | |
| """ | |
| Wrapper for dot product operation, in order to be compatible with both | |
| Theano and Tensorflow | |
| Args: |
This file contains hidden or 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
| # replace PAPERTRAIL_HOSTNAME and PAPERTRAIL_PORT | |
| # see http://help.papertrailapp.com/ for additional PHP syslog options | |
| function send_remote_syslog($message, $component = "web", $program = "next_big_thing") { | |
| $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); | |
| foreach(explode("\n", $message) as $line) { | |
| $syslog_message = "<22>" . date('M d H:i:s ') . $program . ' ' . $component . ': ' . $line; | |
| socket_sendto($sock, $syslog_message, strlen($syslog_message), 0, PAPERTRAIL_HOSTNAME, PAPERTRAIL_PORT); | |
| } | |
| socket_close($sock); |
This file contains hidden or 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
| from gensim import models | |
| sentence = models.doc2vec.LabeledSentence( | |
| words=[u'so`bme', u'words', u'here'], tags=["SENT_0"]) | |
| sentence1 = models.doc2vec.LabeledSentence( | |
| words=[u'here', u'we', u'go'], tags=["SENT_1"]) | |
| sentences = [sentence, sentence1] | |
| class LabeledLineSentence(object): |
This file contains hidden or 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
| from gensim import models | |
| sentence = models.doc2vec.LabeledSentence( | |
| words=[u'so`bme', u'words', u'here'], tags=["SENT_0"]) | |
| sentence1 = models.doc2vec.LabeledSentence( | |
| words=[u'here', u'we', u'go'], tags=["SENT_1"]) | |
| sentences = [sentence, sentence1] | |
| class LabeledLineSentence(object): |
This file contains hidden or 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
| # Kernel sysctl configuration file for Red Hat Linux | |
| # | |
| # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and | |
| # sysctl.conf(5) for more details. | |
| # Controls source route verification | |
| net.ipv4.conf.default.rp_filter = 1 | |
| # Do not accept source routing | |
| net.ipv4.conf.default.accept_source_route = 0 |
This file contains hidden or 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
| ### KERNEL TUNING ### | |
| # Increase size of file handles and inode cache | |
| fs.file-max = 2097152 | |
| # Do less swapping | |
| vm.swappiness = 10 | |
| vm.dirty_ratio = 60 | |
| vm.dirty_background_ratio = 2 |