Skip to content

Instantly share code, notes, and snippets.

View awesmubarak's full-sized avatar

Awes Mubarak awesmubarak

View GitHub Profile

Word Combination Challenge

You are given an input string in the format "target_word: subword1, subword2, ... subwordN" where:

  1. The target word appears before the colon
  2. After the colon is a comma-separated string of subwords

Write a function that determines if the subwords can be combined in any order to create the target word. If possible, return the combination with all vowels removed.

ROS 2 Simple Calculator - Minimal Version

Step 1: Create workspace and package

mkdir -p ~/ros2_simple_calc/src
cd ~/ros2_simple_calc/src
ros2 pkg create simple_calc_pkg --build-type ament_python --dependencies rclpy std_msgs

colcon build
Salted__?þØAÛÂTêLÏòbƒ~‘ÏtG´°ø§G¡’Óƕb2wInõ—†Ù¡Þc.ønÔË'p$‰àøs

Testing

This is what a simple python test would look like:

def add_numbers(a, b):
    return a + b

def test_add_numbers():
 assert add_numbers(2, 2) == 4
  1. Design a system where a robot moves forward in a straight line until it detects an obstacle within 0.5 meters, then stops. Inputs: distance sensor data. Outputs: motor commands.
  2. Design a system that tracks items entering and leaving a space (like a fridge). Inputs: door sensor, weight sensors on shelves, barcode/RFID readings. Outputs: current inventory list, alerts for low items.
  3. Design a robot that maintains a constant distance (2 meters) behind another moving robot. Inputs: visual tracking data of leader position, own velocity. Outputs: motor commands to maintain distance.
  4. Design a system where a robot maps a room's dimensions while avoiding obstacles. Inputs: LIDAR/depth sensor data, wheel odometry. Outputs: 2D room map, movement commands.
  5. Design a robot that monitors a traffic light and crosses when green. Inputs: camera feed of traffic light, distance sensor data. Outputs: movement commands, current state (waiting/crossing).
  6. Design a system where a robot arm picks up cubes from a defin

ROS 2 Simple Calculator - Minimal Version

Step 1: Create workspace and package

mkdir -p ~/ros2_simple_calc/src
cd ~/ros2_simple_calc/src
ros2 pkg create simple_calc_pkg --build-type ament_python --dependencies rclpy std_msgs

colcon build
@awesmubarak
awesmubarak / list.md
Created November 25, 2024 17:09 — forked from ih2502mk/list.md
Quantopian Lectures Saved

Introduction

  1. Recap
  2. Why this exact problem

High-level problem description

  • Create a grid
  • User defines a start point, an end point, and obstacles
  • A 'Robot' Traverses the grid and pathfinds it's way to the end

Logging in

  1. Restart you computer
  2. During Boot-up, select 'Kali Linux'
  3. Use the following credentials:
USERNAME: student
PASSWORD: Lecturer