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 PyQt5.QtWidgets import QSlider | |
class DoubleSlider(QSlider): | |
def __init__(self, *args, **kwargs): | |
super().__init__(*args, **kwargs) | |
self.decimals = 5 | |
self._max_int = 10 ** self.decimals | |
super().setMinimum(0) |
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
Script started on Wed Jul 12 11:53:45 2017 | |
]0;rishabh@robotik-dev-1: ~/host/repositories[01;32mrishabh@container robotik-dev-1[00m:[01;34m~/host/repositories[00m$ candump can0 | |
can0 000 [2] 82 03 | |
can0 703 [1] 00 | |
can0 603 [8] 2B 17 10 00 64 00 00 00 | |
can0 583 [8] 60 17 10 00 00 00 00 00 | |
can0 703 [1] 7F | |
can0 603 [8] 40 00 18 01 00 00 00 00 | |
can0 583 [8] 43 00 18 01 83 01 00 00 | |
can0 603 [8] 23 00 18 01 83 01 00 80 |
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 numpy import linalg as la | |
def nearestPD(A): | |
"""Find the nearest positive-definite matrix to input | |
A Python/Numpy port of John D'Errico's `nearestSPD` MATLAB code [1], which | |
credits [2]. | |
[1] https://www.mathworks.com/matlabcentral/fileexchange/42885-nearestspd |
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
''' | |
This script saves each topic in a bagfile as a csv. | |
Accepts a filename as an optional argument. Operates on all bagfiles in current directory if no argument provided | |
Usage1 (for one bag file): | |
python bag2csv.py filename.bag | |
Usage 2 (for all bag files in current directory): | |
python bag2csv.py |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
import roslib | |
roslib.load_manifest("sensor_msgs") | |
roslib.load_manifest("message_filters") | |
roslib.load_manifest("rxtools") | |
import rospy | |
import rxtools | |
import rxtools.rosplot | |
import sys |
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/python3 | |
# | |
# usage: python3 docker_descendants.py <image_id> ... | |
import sys | |
from subprocess import check_output | |
def main(images): | |
image_ids = set(images) |
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 | |
# | |
# Example of how to parse short/long options with 'getopt' | |
# | |
# getopt recognize the params and put unrecognize params after '--', so '--' is a very important flag for latter work. | |
# -o for options like: -v -h -n -s | |
# --long for options like: --verbose --dry-run --help --stack-szie | |
# and which options followed by a ':' will have format like -s 3, --stack-size 4 or -s=3 --stack-size=4 | |
# -n: name of the shell script |
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 | |
# | |
# a simple way to parse shell script arguments | |
# | |
# please edit and use to your hearts content | |
# | |
ENVIRONMENT="dev" |
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: |
NewerOlder