Skip to content

Instantly share code, notes, and snippets.

View jeremyfix's full-sized avatar

Jeremy Fix jeremyfix

View GitHub Profile

Test

.. ifnotslides::

   A section
@jeremyfix
jeremyfix / Anafi4K with_front_cam - docker run
Created May 18, 2019 06:45
Parrot-sphinx within docker container, Anafi4K, experiments 18/05/2019
sh15:fix_jer$ make run-anafi4k
#sudo xhost +
docker run -it --rm --privileged --runtime=nvidia \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--network host \
-e NVIDIA_PATH=/usr/lib/nvidia-410 \
-v /usr/lib/nvidia-410:/usr/lib/nvidia-410:ro \
@jeremyfix
jeremyfix / Bebop2 sphinx in docker container
Last active May 18, 2019 06:55
Bebop2 experiments with parrot sphinx within a container
sh15:fix_jer$ make run-bebop2
#sudo xhost +
docker run -it --rm --privileged --runtime=nvidia \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--network host \
-e NVIDIA_PATH=/usr/lib/nvidia-410 \
-v /usr/lib/nvidia-410:/usr/lib/nvidia-410:ro \
-v /tmp:/tmp \
@jeremyfix
jeremyfix / load_digits.py
Created May 21, 2019 11:51
digits loader
# Data from : http://www.metz.supelec.fr//metz/personnel/frezza/ApprentissageNumerique/TP-MachineLearning/dig_app_text.cb
# Data are said to be provided UCI Machine Learning Repository ... but I did not find the dataset on the repository..
import numpy as np
digit_idx = 0
header = 5
width = 28
height = 28
num_digits = 4000
filename = 'dig_app_text.cb'
@jeremyfix
jeremyfix / Makefile
Last active May 28, 2019 10:08
Get a free port in a Makefile
$(eval PORT = $(shell ./get_free_port.sh))
testbidule:
@echo "I found a free port number : " $(PORT)
@jeremyfix
jeremyfix / make_att_faces_npy.py
Created June 23, 2019 19:59
Downloading and processing AT&T face dataset in python
# coding: utf-8
# Downloading and processing the AT&T face dataset
import requests
import tempfile
import os
import glob
import shutil
import pathlib
@jeremyfix
jeremyfix / Installation procedure CPU only
Created July 2, 2019 15:33
deep-visualization-toolbox on ubuntu 18.04
############################# Compilation of caffe
git clone https://github.com/BVLC/caffe.git
cd caffe
git remote add yosinski https://github.com/yosinski/caffe.git
git fetch --all
git checkout --track -b deconv-deep-vis-toolbox yosinski/deconv-deep-vis-toolbox
sudo apt install libgflags-dev libgoogle-glog-dev libhdf5-dev libleveldb-dev liblmdb-dev libsnappy-dev libatlas3-base libatlas-base-dev
@jeremyfix
jeremyfix / 60-hlds-laser.rules
Created July 11, 2019 11:54
udev rules for Robotis LDS-01 LIDAR
# On precise, for some reason, USER and GROUP are getting ignored.
# So setting mode = 0666 for now.
SUBSYSTEM=="tty", ATTRS{idVendor}=="05e3", ATTRS{idProduct}=="0610", MODE:="0666", GROUP:="dialout", SYMLINK+="LDS01"
@jeremyfix
jeremyfix / Ubuntu 18.04 Youbot installation
Last active April 14, 2021 14:26
The instructions to build the drivers and ROS nodes for youbot for ROS melodic
# Ubuntu 18.04 installation
Proceed with a minimal installation of ubuntu 18.04, follow https://help.ubuntu.com/community/Installation/MinimalCD
# ROS installation
Follow http://wiki.ros.org/melodic/Installation
# Network configuration in console mode
@jeremyfix
jeremyfix / Pushing to PyPi with your ssh key
Last active November 29, 2020 21:17
Accessing your pypi credentials within a gpg encrypted file to push to PyPi with your ssh key
# We suppose the PyPi username and password are stored as the last 2 lines of the file pypi.gpg given below
# then from within your python package directory, you would do :
# login@machine:~$ python3 setup.py sdist
# login@machine:~$ pypi-push
# File pypi-push (with +x permissions)
#!/bin/bash
TWINE_USERNAME=`gpg --decrypt --no-comments ~/.password-store/pypi.gpg 2> /dev/null | tail -n +2 | head -1`
TWINE_PASSWORD=`gpg --decrypt --no-comments ~/.password-store/pypi.gpg 2> /dev/null | tail -n +2 | tail -1`