Skip to content

Instantly share code, notes, and snippets.

Richard-zhang mengzhangjian

Block or report user

Report or block mengzhangjian

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jkjung-avt
jkjung-avt / tegra-cam.py
Last active Sep 6, 2019
Capture and display video from either IP CAM, USB webcam, or the Tegra X2/X1 onboard camera.
View tegra-cam.py
# --------------------------------------------------------
# Camera sample code for Tegra X2/X1
#
# This program could capture and display video from
# IP CAM, USB webcam, or the Tegra onboard camera.
# Refer to the following blog post for how to set up
# and run the code:
# https://jkjung-avt.github.io/tx2-camera-with-python/
#
# Written by JK Jung <jkjung13@gmail.com>
@omimo
omimo / create_hellotensor.py
Last active Sep 2, 2019
A simple example for saving a tensorflow model and preparing it for using on Android
View create_hellotensor.py
# Create a simple TF Graph
# By Omid Alemi - Jan 2017
# Works with TF <r1.0
import tensorflow as tf
I = tf.placeholder(tf.float32, shape=[None,3], name='I') # input
W = tf.Variable(tf.zeros_initializer(shape=[3,2]), dtype=tf.float32, name='W') # weights
b = tf.Variable(tf.zeros_initializer(shape=[2]), dtype=tf.float32, name='b') # biases
O = tf.nn.relu(tf.matmul(I, W) + b, name='O') # activation / output
@soply
soply / disp_multiple_images.py
Last active Sep 15, 2019
Plot multiple images with matplotlib in a single figure. Titles can be given optionally as second argument.
View disp_multiple_images.py
import matplotlib.pyplot as plt
import numpy as np
def show_images(images, cols = 1, titles = None):
"""Display a list of images in a single figure with matplotlib.
Parameters
---------
images: List of np.arrays compatible with plt.imshow.
@mowings
mowings / readme.md
Last active Sep 15, 2019
ffmpeg stream and save video from Dahua 4300s IP Camera
View readme.md

Use ffmpeg to stream video from a dahua 4300s to a file or files

You can use ffmpeg to directly pull frames off of a dahua 4300s at full resolution. May be a good alternative to pricey dvrs which likely cannot record at full resolution, may not work with the camera, or are prohibitevly expensive

Simple Stream to file

Simple stream to file. Full resolution

ffmpeg -loglevel debug -rtsp_transport tcp -i "rtsp://admin:admin@198.175.207.61:554/live" \
-c copy -map 0 foo.mp4
@klb3713
klb3713 / web_test.py
Created Jul 25, 2013
用Python实现的Web服务器的压力测试脚本
View web_test.py
# -*- coding: utf-8 -*-
__author__ = 'klb3713'
import threading, time, httplib
HOST = "127.0.0.1"; #主机地址 例如192.168.1.101
PORT = 8001 #端口
URI = "/api/huohuaId2Url" #相对地址,加参数防止缓存,否则可能会返回304
TOTAL = 0 #总数
SUCC = 0 #响应成功数
FAIL = 0 #响应失败数
You can’t perform that action at this time.