Skip to content

Instantly share code, notes, and snippets.

if ! ping -Q 1 -c 1 -t 60 google.com; then
echo warning: lost network connection >>/var/log/syslog
service network-manager restart
fi
@atch841
atch841 / array_grad.py
Last active October 21, 2018 05:30
tf.extract_image_patches gradients operation for variable size inputs for tensorflow 1.10.0
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@atch841
atch841 / opencv_to_rtsp.md
Last active August 9, 2018 16:24
An Easy way to output opencv mat as rtsp on ubuntu using gstreamer rtsp server

An Easy way to output opencv mat as rtsp on ubuntu using gstreamer rtsp server

Installation

  1. Download the latest version of gstreamer and gstreamer plugins from https://gstreamer.freedesktop.org/src/ (1.14.2 for example)
wget https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.14.2.tar.xz
wget https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.14.2.tar.xz
wget https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.14.2.tar.xz
wget https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.14.2.tar.xz