Skip to content

Instantly share code, notes, and snippets.

@greghelton
greghelton / TestStoreForward.java
Created December 26, 2011 19:17
Java: JUnit test Using Apache HTTPComponents
package us.greg;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
@n3wtron
n3wtron / simple_mjpeg_streamer_http_server
Last active July 8, 2024 17:49
Simple Python Motion Jpeg (mjpeg server) from webcam. Using: OpenCV,BaseHTTPServer
#!/usr/bin/python
'''
Author: Igor Maculan - [email protected]
A Simple mjpg stream http server
'''
import cv2
import Image
import threading
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
from SocketServer import ThreadingMixIn
@liviaerxin
liviaerxin / gstreamer_empty_plugin_test_case.py
Last active July 8, 2024 13:55
Install Gst Python Binding
#!/usr/bin/python3
#-*- coding: utf-8 -*-
import logging
import timeit
import traceback
import time
import gi
gi.require_version('Gst', '1.0')