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 bash | |
# https://software.intel.com/en-us/articles/performance-tools-for-software-developers-building-hdf5-with-intel-compilers | |
## PREREQS | |
# 1) szip 2.1 | |
export CC=icc | |
export CXX=icpc | |
export FC=ifort | |
export CFLAGS='-O3 -xHost -ip' | |
export CXXFLAGS='-O3 -xHost -ip' |
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
//* The Ros object, wrapping a web socket connection to rosbridge. | |
var ros = new ROSLIB.Ros({ | |
url: 'ws://localhost:9090' // url to your rosbridge server | |
}); | |
//* A topic for messaging. | |
var exampleTopic = new ROSLIB.Topic({ | |
ros: ros, | |
name: '/com/endpoint/example', // use a sensible namespace | |
messageType: 'std_msgs/String' |
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
""" Simple IPC benchmark test | |
Test throughput of 512 KB messages sent between two python processes using: | |
- multiprocessing pipe | |
- zeroMQ PUSH/PULL | |
- zeroMQ DEALER/DEALER | |
Result: |
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/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 |
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
""" | |
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 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
# -*- 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 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
<?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 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Sat May 3 10:21:21 2014 | |
@author: umb | |
""" | |
import numpy as np | |
class GMM: |
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 -*- | |
'''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 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
# 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: |