Skip to content

Instantly share code, notes, and snippets.

How do I start the fastai class label cleaner?

You can start it by executing

import ipywidgets
from fastai.vision.widgets import ImageClassifierCleaner
cleaner = ImageClassifierCleaner(learn)
cleaner

How do I start the fastai class label cleaner?

You can start it by executing

import ipywidgets
from fastai.vision.widgets import ImageClassifierCleaner
cleaner = ImageClassifierCleaner(learn)
cleaner
# How do I start the fastai class label cleaner?
You can start it by executing
```
import ipywidgets
from fastai.vision.widgets import ImageClassifierCleaner
cleaner = ImageClassifierCleaner(learn)
cleaner
```
@tom-doerr
tom-doerr / solution.md
Created December 29, 2020 20:58
ROS rqt visualizer "Error opening file"

Problem:

I'm getting the following error message when trying to start the visualizer with the rosbag filename as a command line argument:

[FATAL] [1609275200.354480416]: Error opening file: routes_bags/route_11_406/failure_0.bag
WARNING: CPU random generator seem to be failing, disable hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[replayer-3] process has died [pid 428, exit code 1, cmd /opt/ros/noetic/lib/rosbag/play routes_bags/route_11_406/failure_0.bag __name:=replayer __log:=/root/.ros/log/e1c32564-4a17-11eb-9849-0242ac110003/replayer-3.log].
log file: /root/.ros/log/e1c32564-4a17-11eb-9849-0242ac110003/replayer-3*.log
[rqt_gui-2] process has finished cleanly
@tom-doerr
tom-doerr / start_container.sh
Created November 22, 2020 18:42
Starts and kills the docker container when memory is low
#!/bin/bash
CONTAINER_NAME="commonroad_container"
MIN_FREE_GB=2
SLEEP_TIME_MEMORY_CHECK=0.1
trap 'kill $pid_to_kill_exit; exit' INT
kill_low_memory() {
while true
@tom-doerr
tom-doerr / answer.md
Last active October 16, 2020 12:30
Can I use any docker image for vast.ai?

Yes, just use the image option when using the vast cli. Example:

vast create instance 660127 --image tomdoerr/commonroad-search --disk 10
@tom-doerr
tom-doerr / config.toml
Last active August 26, 2020 21:59
Nvidia config.toml with disabled cgroups for GPU access in rootless docker (`/etc/nvidia-container-runtime/config.toml`)
disable-require = false
#swarm-resource = "DOCKER_RESOURCE_GPU"
[nvidia-container-cli]
no-cgroups = true
#root = "/run/nvidia/driver"
#path = "/usr/bin/nvidia-container-cli"
environment = []
#debug = "/var/log/nvidia-container-toolkit.log"
#ldcache = "/etc/ld.so.cache"
@tom-doerr
tom-doerr / gist:41184ec7bcaf5f61d128d306361a8e79
Created March 3, 2020 19:20
Bash function that activates a Python virtual environment and creates the environment if it doesn't yet exist
ve() {
if [[ ! $VIRTUAL_ENV ]]
then
if [ ! -d venv ]
then
virtualenv --no-site-packages venv
fi
source venv/bin/activate
else
deactivate
@tom-doerr
tom-doerr / LICENSE
Created January 17, 2020 10:47
This license applies to all public gists on https://gist.github.com/tom-doerr
MIT License
Copyright (c) 2020 Tom Dörr
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: