Skip to content

Instantly share code, notes, and snippets.

@kdaun
kdaun / install_cartographer_local.sh
Last active November 8, 2022 19:03 — forked from l1va/install_cartographer_proto_locally.sh
Cartographer install script depending on a local protobuf install
# Install wstool and rosdep.
sudo apt-get update
sudo apt-get install -y python-wstool python-rosdep ninja-build
# Create a new workspace in 'catkin_ws'.
mkdir cartographer_ws
cd cartographer_ws
wstool init src
# Merge the cartographer_ros.rosinstall file and fetch code for dependencies.
@lucasw
lucasw / usb_cameras_with_ros.md
Last active February 21, 2023 23:24
USB/V4L/UVC Cameras with ROS

USB 'web' cameras vs. ethernet and network cameras

Cost and feature/performance trade-offs

Built-in laptop camera

$ lsusb
Bus 002 Device 004: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
@matt3o
matt3o / rqt_smach_kinetic.md
Last active February 13, 2020 02:14
Running rqt_smach (smach_viewer) with ROS Kinetic

Running rqt_smach (smach_viewer) with ROS Kinetic

Hello everyone!

As we needed Smach for an university project I decided to take a look in porting rqt_smach / smach_viewer to ROS Kinetic. Some things may still be broken but at least it is working at all!

NOTE: This is kind of work in progress - I'd love to get any feedback and will merge updates if you want to contribute any fixes! I will try to get into contact with jbohren but for the most recent issues and pull requests he was not willing to cooperate - that's surely one of the reasons why there is no kinetic support so far

This file is based on the instructions made by @jbohren in this file: rqt_smach.md - which is hard to find on the internet.

@karpathy
karpathy / min-char-rnn.py
Last active November 19, 2024 06:12
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@patik
patik / how-to-squash-commits-in-git.md
Last active May 30, 2024 07:59
How to squash commits in git

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@emiller
emiller / git-mv-with-history
Last active October 15, 2024 14:08
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@douglas
douglas / update_git_repos.sh
Created October 14, 2011 15:04
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@bortzmeyer
bortzmeyer / gist:1284249
Created October 13, 2011 13:42
The only simple way to do SSH in Python today is to use subprocess + OpenSSH...
#!/usr/bin/python
# All SSH libraries for Python are junk (2011-10-13).
# Too low-level (libssh2), too buggy (paramiko), too complicated
# (both), too poor in features (no use of the agent, for instance)
# Here is the right solution today:
import subprocess
import sys