diff --git a/git_push.sh b/git_push.sh new file mode 100755 index 0000000..4da2191 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Promp the user for input +echo "Enter a commit comment:" +read user_command + +# Check if the input is empty +if [ -z "$user_command" ]; then + echo "Error: No comment entered." + exit 1 +fi + +# Run the command provided by the user +eval "sudo git add ." +eval "sudo git commit -m \"$user_command\"" +eval "sudo git push -u origin main" diff --git a/main.py b/main.py index e69de29..9196575 100644 --- a/main.py +++ b/main.py @@ -0,0 +1,36 @@ +import heapq + +# A* Algorithm Class +class AStar: + def __init__(self, grid, start, end): + # Grid + self.grid = grid + + # Positions + self.start = start + self.end = end + + self.open_list = [] + heapq.heappush(self.open_list, (0, start)) # (priority, node) + +def print_grid(grid, path=None): + if path: + for (x, y) in path: + if (x, y) != start and (x, y) != end: + grid[x][y] = "*" + for row in grid: + print(" ".join(str(cell)) for cell in row) + +# Define a 5x5 grid (0 = false, 1 = obstacle) +grid = [ + [0, 1, 0, 0, 0], + [0, 1, 0, 1, 0], + [0, 0, 0, 1, 0], + [0, 1, 1, 0, 0], + [0, 0, 0, 0, 0] +] + +start = (0, 0) +start = (4, 4) + +