- download Ubuntu system .iso file.
- prepare a usb key (better usb3 for speed, will be formatted but the storage space can be easily recovered)
- use rufus to unpack the iso file to the usb key
- branch the usb key to the computer
- restart, then press
F12
, - turn off the secure boot option
- get
.deb
package. (using e.g.apt-get download (package_name)
) - unpack package with
ar x *.deb
- unpack binary with
tar xvzf data.tar.gz
- run
usr/bin/(binary_name)
and hope everything works :)
Summarized based on this answer in askubuntu
This file contains 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
# get number of tests and iterate through each tests | |
## Python 3 | |
t = int(input().strip()) | |
for _ in range(t): | |
## Python 2 | |
t = int(input().strip()) | |
for _ in range(t): | |
This file contains 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
# tested with python 2 + matplotlib 2.0.0 | |
from mpl_toolkits.mplot3d import axes3d | |
import matplotlib.pyplot as plt | |
import numpy as np | |
def getMaxXYZ(vec3ds): | |
mx, my, mz = vec3ds[0] | |
for (x, y, z) in vec3ds: | |
mx, my, mz = (max(x, mx), max(y, my), max(z, mz)) |
printenv | grep ROS
source /opt/ros/<distro>/setup.bash
(for Bash, don't use sth else like setup.sh
!)
mkdir <path_to>/<workspace_name>/src
This file contains 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
function gsync() { | |
echo "*** Synchronizing current repo ***" | |
echo | |
echo "=== adding all ..." | |
git add . | |
echo | |
echo "=== committing all ..." | |
git commit -a -m "$1" | |
echo | |
echo "=== pulling ..." |
This file contains 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
import json | |
def json2js(jsonfilepath, functionname='getData'): | |
"""function converting json file to javascript file: json_data -> json_data.js | |
:param jsonfilepath: path to json file | |
:param functionname: name of javascript function which will return the data | |
:return None |