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
diff --git a/da_tracker/middleware.py b/da_tracker/middleware.py | |
index c72451f..7ab3e3e 100644 | |
--- a/da_tracker/middleware.py | |
+++ b/da_tracker/middleware.py | |
@@ -9,8 +9,19 @@ from django.utils.importlib import import_module | |
import time | |
import base64 | |
import re | |
-import urllib2 | |
-import Queue |
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
1780 sudo service openvswitch-controller stop | |
1781 sudo service openvswitch-controller start | |
1786 sudo service openvswitch-switch stop | |
1788 sudo service openvswitch-switch start | |
1789 sudo nm | |
1793 sudo mn --controller=ovsc | |
1803 sudo fuser -k 6633/tcp | |
1804 sudo kill -KILL 24937 | |
1806 netstat -nl | grep 6633 |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <signal.h> | |
#include <netdb.h> | |
#include <string.h> | |
#include <netinet/in.h> | |
#include <X11/X.h> | |
#include <X11/Xlib.h> | |
#include <X11/Intrinsic.h> | |
#include <X11/StringDefs.h> |
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
//we are planning to use filter concatenation on three input videos | |
var filterchain = Filterchain.FilterTo<VideoStream>(new Concat()); | |
//we want our output to be encoded using the following settings: | |
// -c:v libx264 | |
// -b:v 3000k | |
// -s 852x480 | |
// -y | |
var settings = SettingsCollection.ForOutput( | |
new CodecVideo("libx264"), |
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
#include <cstdio> | |
#include <string> | |
class MyIOContext { | |
public: | |
std::string datafile; | |
AVIOContext *ioCtx; | |
uint8_t *buffer; // internal buffer for ffmpeg | |
int bufferSize; | |
FILE *fh; |
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/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
# Remove any existing packages: | |
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
# Get the dependencies (Ubuntu Server or headless users): | |
sudo apt-get update |
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
#!/usr/bin/env python | |
# source: https://github.com/MartSlaaf/PyDaemon | |
import sys | |
import os | |
import time | |
import atexit | |
import signal | |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# source: https://github.com/MartSlaaf/PyDaemon | |
import sys | |
import os | |
import time | |
import atexit | |
from signal import SIGTERM |
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
im1 = 'eNMItpUG.png' | |
im1 | |
im1_path = 'eNMItpUG.png' | |
from PIL import Image | |
im1 = Image.open(im1_path) | |
im1 | |
im1.fromstring() | |
im1.getim | |
im1.getim() | |
im1.tostring() |
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
%module(threads="1") something | |
%{ | |
// Register a callback (called from Python code) | |
// callbackFunc is a Python callable accepting one argument | |
void registerHandler(PyObject *callbackFunc) | |
{ | |
SWIG_PYTHON_THREAD_BEGIN_ALLOW; | |
const bool hasCallback = |