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 math | |
from sensor_msgs.msg import CameraInfo | |
def calculate_fov(camera_info: CameraInfo): | |
""" | |
Calculate the horizontal and vertical Field of View (FOV) from a CameraInfo message. | |
Parameters: | |
camera_info (CameraInfo): ROS2 CameraInfo message containing intrinsic camera parameters. |
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
def clamp(value, min_value, max_value): | |
return max(min_value, min(max_value, value)) |
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
""" | |
Écrivez une fonction Python dont le nom commence par « triangle ». | |
Cette fonction prend un paramètre : le nombre de lignes à écrire. | |
Si le nombre de lignes est pair, la fonction ne doit rien afficher. | |
Sinon elle doit afficher un triangle composé d'étoiles précédées par des espaces. | |
Par exemple, si le nombre de lignes vaut 5, il faut afficher : |
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
package main | |
import ( | |
"fmt" | |
"net/smtp" | |
"strconv" | |
) | |
func SmtpAuthentification(username string, pwd string, host string) smtp.Auth { | |
return (smtp.PlainAuth("", username, pwd, host)) |
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
package main | |
import ( | |
"text/template" | |
"fmt" | |
"bytes" | |
"time" | |
"strconv" | |
) |
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
sudo apt install zsh | |
chsh -s /usr/bin/zsh | |
exit | |
gnome-terminal -e echo $SHELL | |
if [$SHELL = "/usr/bin/zsh"] | |
then |
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
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 | |
sudo apt update | |
sudo apt install ros-melodic-desktop-full | |
sudo rosdep init |