Run with Python:
pip-2.7 install cffi PYTHON=python2.7 sh go.sh
Run with PyPy:
pip-pypy install cffi PYTHON=pypy sh go.sh
How to create a 4MB FreeDOS boot disk for eg, doing a motherboard bios upgrade. | |
Originally from http://www.linuxinsight.com/how-to-flash-motherboard-bios-from-linux-no-dos-windows-no-floppy-drive.html | |
The following is a brief outline of how I created a 4MB CD boot image to update the bios on a motherboard I have been considering buying. | |
I do not have this motherboard, but I have tested the bootable CD up to the point of actually flashing the bios. | |
FWIW, my computer runs PATA / IDE HDs and optical drives. Not SATA. | |
Adjust accordingly to your distro, hardware, etc. | |
I'm human, and make typos on occasion. So double check your input. |
main(){write(1,"hello\n",6);} |
/** | |
* setup JQuery's AJAX methods to setup CSRF token in the request before sending it off. | |
* http://stackoverflow.com/questions/5100539/django-csrf-check-failing-with-an-ajax-post-request | |
*/ | |
function getCookie(name) | |
{ | |
var cookieValue = null; | |
if (document.cookie && document.cookie != '') { | |
var cookies = document.cookie.split(';'); |
# Find the Libnotify libraries | |
# This module will find the libnotify library, and do some | |
# sanity checking (making sure things compile, version checking, | |
# dependancy checking, etc). Libnotify requires the GTK Library (GTK2 or GTK3) and glib Library (GLIB2) | |
# This requires cmake => 2.8 to work correctly | |
# @Author: Jacob "HACKhalo2" Litewski | |
# @Version: 1.0 |
<mjpeg url="videoUrl"></mjpeg> |
# Ensure we're in a virtualenv. | |
if [ "$VIRTUAL_ENV" == "" ] | |
then | |
echo "ERROR: not in a virtual environment." | |
exit -1 | |
fi | |
# Setup variables. | |
CACHE="/tmp/install-pygtk-$$" |
Run with Python:
pip-2.7 install cffi PYTHON=python2.7 sh go.sh
Run with PyPy:
pip-pypy install cffi PYTHON=pypy sh go.sh
#!/bin/bash | |
# play YUV444 FULL HD file | |
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \ | |
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \ | |
videoconvert ! \ | |
autovideosink | |
# play YUV422 FULL HD file | |
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \ |
cmake_minimum_required(VERSION 2.8.11) | |
project(VtkFboInQtQuick) | |
set(CMAKE_INCLUDE_CURRENT_DIR ON) | |
set(CMAKE_AUTOMOC ON) | |
find_package(VTK REQUIRED) | |
include(${VTK_USE_FILE}) |
Cython has two major benefits:
Cython gains most of it's benefit from statically typing arguments. However, statically typing is not required, in fact, regular python code is valid cython (but don't expect much of a speed up). By incrementally adding more type information, the code can speed up by several factors. This gist just provides a very basic usage of cython.