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
| <!-- | |
| Example launch file for octomap_server mapping: | |
| Listens to incoming PointCloud2 data and incrementally builds an octomap. | |
| The data is sent out in different representations. | |
| Copy this file into your workspace and adjust as needed, see | |
| www.ros.org/wiki/octomap_server for details | |
| --> | |
| <launch> | |
| <node pkg="tf" type="static_transform_publisher" name="robot_tf" args="0 0 0 0 0 0 base_footprint base_link 100"/> |
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
| def save_geotiff(filepath, image32, width, height): | |
| import numpy | |
| import gdal | |
| driver = gdal.GetDriverByName('GTiff') | |
| ds = driver.Create(filepath, width, height, 1, gdal.GDT_Float32) | |
| tmp = [image32[row*width:(row+1)*width] for row in range(height)] | |
| raster = numpy.asarray(tmp, dtype=numpy.float32) | |
| #scipy.misc.imsave('%s.png'%filepath, raster) | |
| ds.GetRasterBand(1).WriteArray( raster ) |
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
| import bpy | |
| filepath = '/path/to/file.mp3' | |
| # use an Empty here, since appending sound on a moving Cube gets wired (accel?) | |
| bpy.ops.object.select_all(action='DESELECT') | |
| bpy.ops.object.empty_add() | |
| # open sound | |
| bpy.ops.sound.open(filepath=filepath) |
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
| import bpy | |
| filepath = '/home/pkoch/media/music/Alice Russell/06 Lights Went Out.mp3' | |
| # use an Empty here, since appending sound on a moving Cube gets wired (accel?) | |
| bpy.ops.object.select_all(action='DESELECT') | |
| bpy.ops.object.empty_add() | |
| # open sound | |
| bpy.ops.sound.open(filepath=filepath) |
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
| import bpy | |
| # helpers (c/p following in a Blender Text editor, run it, look at your console) | |
| def do_all(): | |
| for obj in bpy.data.objects: | |
| # TODO create object | |
| print_all_logic(obj) | |
| print_properties(obj) |
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
| # usage: blender -P {file} | |
| import os, sys, subprocess | |
| def ext_exec(cmd, python=None): | |
| if not python: | |
| python = 'python%i.%i'%(sys.version_info.major, sys.version_info.minor) | |
| return subprocess.getoutput('%s -c"%s"' % (python, cmd) ) | |
| def fix_python_path(python=None): |
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
| __PKGNAME=gladys | |
| __VERSION=0.1.3 | |
| __IS_WIP_=wip/ | |
| # do not edit following (supposed to be smart) | |
| __DIRNAME=$__PKGNAME-$__VERSION | |
| __ARCHIVE=$__DIRNAME.tar.gz | |
| git tag v$__VERSION |
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
| <!doctype html> | |
| <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" /> | |
| <script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
| <script src="proj4js/dist/proj4.js"></script> | |
| <style> | |
| #map { height: 800px; } | |
| </style> | |
| <body> |
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 morse.builder import * | |
| mana = ATRV('mana') | |
| minnie = ATRV('minnie') | |
| env = Environment('caylus.50cm.blend') | |
| env.set_camera_clip(clip_end=1000) | |
| env.set_camera_speed(50) | |
| env.show_framerate() | |
| env.configure_multinode( |
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 | |
| for grid_size in 100 200 500 1000 2000; do | |
| echo "blender -b -P add_grid.py -- $grid_size" | |
| time blender -b -P add_grid.py -- $grid_size | |
| done | |
| # results: | |
| # https://docs.google.com/spreadsheet/ccc?key=0AmpIySwDLOg8dDFxUlNjZWozRWhqWkF3aXBiQmViYkE |