This file contains 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/sh -e | |
# | |
# rc.local | |
# | |
# This script is executed at the end of each multiuser runlevel. | |
# Make sure that the script will "exit 0" on success or any other | |
# value on error. | |
# | |
# In order to enable or disable this script just change the execution | |
# bits. |
This file contains 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
# encoding: utf-8 | |
import zmq | |
from collections import defaultdict | |
context = zmq.Context() | |
client = context.socket(zmq.ROUTER) | |
client.bind("tcp://*:5556") | |
poll = zmq.Poller() |
This file contains 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
########################### GTEST | |
# Enable ExternalProject CMake module | |
INCLUDE(ExternalProject) | |
# Set default ExternalProject root directory | |
SET_DIRECTORY_PROPERTIES(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/third_party) | |
# Add gtest | |
# http://stackoverflow.com/questions/9689183/cmake-googletest | |
ExternalProject_Add( |
This file contains 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
# from http://stackoverflow.com/questions/4103773/efficient-way-of-having-a-function-only-execute-once-in-a-loop | |
from functools import wraps | |
def run_once(f): | |
"""Runs a function (successfully) only once. | |
The running can be reset by setting the `has_run` attribute to False | |
""" | |
@wraps(f) | |
def wrapper(*args, **kwargs): | |
if not wrapper.has_run: |
This file contains 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 -*- | |
'''Read data acquired by MCA8000A through software "pcma". | |
File extension: .mca''' | |
import re | |
def readmca(fm): | |
sraw=[l.strip() for l in open(fm,'r').readlines()] | |
kidx=[] |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Sat May 3 10:21:21 2014 | |
@author: umb | |
""" | |
import numpy as np | |
class GMM: |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ImportGroup Label="PropertySheets" /> | |
<PropertyGroup Label="UserMacros" /> | |
<PropertyGroup> | |
<_PropertySheetDisplayName>ZMQ_DEBUG</_PropertySheetDisplayName> | |
</PropertyGroup> | |
<ItemDefinitionGroup> | |
<ClCompile> | |
<AdditionalIncludeDirectories>%ZMQ_DIR%\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.provision :shell, :privileged => false, :path => "bootstrap_ubuntu1204.sh" | |
end |
This file contains 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
""" | |
client.py - AsyncIO Server using StreamReader and StreamWriter | |
This will create 200 client connections to a server running server.py | |
It will handshake and run similar to this: | |
Server: HELLO | |
Client: WORLD |
This file contains 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/sh | |
# Combined all static libaries in the current directory into a single static library | |
# It is hardcoded to use the i386, armv7, and armv7s architectures; this can easily be changed via the 'archs' variable at the top | |
# The script takes a single argument, which is the name of the final, combined library to be created. | |
# | |
# For example: | |
# => combine_static_libraries.sh combined-library | |
# | |
# Script by Evan Schoenberg, Regular Rate and Rhythm Software |
OlderNewer