Skip to content

Instantly share code, notes, and snippets.

View awesomebytes's full-sized avatar

Sam Pfeiffer awesomebytes

View GitHub Profile
parameter_dict = {'dialog': [
{
'int_param': {
'type': 'int',
'text': 'Integer parameter',
'current_value': 5,
'min_value': 0,
'max_value': 10,
}
},
@awesomebytes
awesomebytes / HTTPWebSocketsHandler.py
Created January 8, 2016 10:21 — forked from SevenW/HTTPWebSocketsHandler.py
HTTPWebSocketsHandler extends SimpleHTTPServer with WebSockets enabling the use of HTTP and WebSockets throught the same port
'''
The MIT License (MIT)
Copyright (C) 2014, 2015 Seven Watt <info@sevenwatt.com>
<http://www.sevenwatt.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 01/11/15
@author: sampfeiffer
delete_spammer_comments.py
You need selenium:
#!/bin/bash
path=$1
if [ ! $# -eq 1 ]; then
echo "Usage is $0 path_to_workspace_src"
exit -1
fi
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 15/01/15
@author: Sammy Pfeiffer
# Software License Agreement (BSD License)
#
# Copyright (c) 2016, PAL Robotics, S.L.
# All rights reserved.
@awesomebytes
awesomebytes / terminal_print_colors.py
Last active January 15, 2016 16:53
Color codes for printing in terminal
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDCOLOR = '\033[0m'
print BLUE + "blue text " + GREEN + "green text" + ENDCOLOR
print YELLOW + "orange text " + RED + "red text" + ENDCOLOR
@awesomebytes
awesomebytes / choose_hsv_realtime_topic.py
Created January 15, 2016 20:01
GUI for choosing hsv ranges in a topic so you can get a single color in an image for further processing
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 7/29/15
@author: sampfeiffer
choose_hsv_realtime.py contains...
"""
@awesomebytes
awesomebytes / joint_states_group_grabber.py
Created January 19, 2016 11:59
Tool to grab the latest joint states for groups of joints
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Jan 13 19:06:55 2014
@author: Sam Pfeiffer
Subscribe to joint states and get the joint positions for a group printed nicely in screen or
import from this file to get joint names and values of a group using getNamesAndMsgList
for any tool you need
@awesomebytes
awesomebytes / python_development_environment.md
Last active December 25, 2024 11:34
My development environment, how to install it

Python development environment (with ROS!)

Install pip

The package manager of python packages is called pip.

sudo apt-get install python-pip

If you need a pip package as a debian you can use Victor's debian from pip.

Install ipython

[ 2056.404562] [drm] stuck on render ring
[ 2056.407972] [drm] GPU HANG: ecode 9:0:0x87cafff2, in chrome [3189], reason: Ring hung, action: reset
[ 2056.407974] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
[ 2056.407976] [drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel
[ 2056.407977] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
[ 2056.407978] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
[ 2056.407979] [drm] GPU crash dump saved to /sys/class/drm/card0/error
[ 2056.410627] drm/i915: Resetting chip after gpu hang
[ 2058.392267] [drm] RC6 on