Skip to content

Instantly share code, notes, and snippets.

View RayneDance's full-sized avatar

Alexander Jordan RayneDance

  • Cerus Esports
  • Austin, TX
View GitHub Profile
import pygame
from random import randint, shuffle
import math
class GameObj:
def __init__(self):
self.x = 400
self.y = 300
import pyautogui
import time
import keyboard
def inMainMenu() -> bool:
buttons_menuBar = 'MenuBar_buttons.jpg'
location_MENUBAR = None
try:
location_MENUBAR = pyautogui.locateCenterOnScreen(buttons_menuBar, confidence=0.77)
@RayneDance
RayneDance / day9.py
Created August 4, 2023 03:29
Travelling salesman
class Graph:
def __init__(self):
self.nodes = {}
self._last = 0
def __contains__(self, node_name):
if node_name in self.nodes:
return True
return False
$locations = @(
'\\computername\file\location'
)
ForEach ($current in $locations) {
if (Test-Path $current){
cd $current
}
}
maximum_mass = 2000 --export: maxixmum carry load.
container_mass = storage_1.getItemsMass()
container_out = '<div>Mass of containers: '..container_mass..'kg</div>'
local container_graph = function(container_mass)
local percent = math.floor(container_mass/maximum_mass*100)
local result = '<div style="display: table;">Mass load: <table border=1><tr>'
#t9
def to_t9(strng):
thing = 0
for i in strng:
thing += 1
if thing < 1:
return
import win32gui, math
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from time import sleep
import sys
def mousedata():
global greater_value
global distance
class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
seen = {}
for i in range(len(nums)):
lookup = target - nums[i]
if lookup in seen:
result = [seen[lookup], i]
return result
def sudoku2(grid):
for i in range(8):
if not checkRow(grid[i]):
print("Row: " +str(i+1))
return False
hold = []
for j in range(8):
@RayneDance
RayneDance / lp
Last active December 9, 2019 03:08
Revised
def outputwelcomemessage ():
print ("welcome to car zone")
def getvehicletype():
uservehiclechoice= None
print("which type of vehicle would you like to purchase? ")
print("1. car")
print("2. truck")
print("3. suv")