Skip to content

Instantly share code, notes, and snippets.

View maysam's full-sized avatar
🏠
Working from home

Maysam Torabi maysam

🏠
Working from home
View GitHub Profile
@maysam
maysam / Hide and Seek Safari Puzzle Game.py
Created November 19, 2018 17:44
Hide and Seek Safari Puzzle Game Solution
#!/usr/bin/env python
# coding: utf-8
# https://www.amazon.co.uk/Smart-Games-Hide-Safari-Puzzle-x/dp/B000H5V6U6
# https://www.amazon.com/Smart-Tangoes-USA-SG-101/dp/B004TGVIXY
# https://righttolearn.com.sg/collections/iq-games/products/iq-game-animal-puzzle-433
import numpy as np
from itertools import permutations
import collections

Robot Challenge

Description

  • The application is a simulation of a toy robot moving on a square tabletop, of dimensions 5 units x 5 units.
  • There are no other obstructions on the table surface.
  • The robot is free to roam around the surface of the table, but must be prevented from falling to destruction. Any movement that would result in the robot falling from the table must be prevented, however further valid movement commands must still be allowed.
def reverse(str)
str&.reverse
end
@answers = {0 => 0, 1 => 1}
def fibonnaci(n)
return 0 if n < 0
@answers[n] ||= fibonnaci(n-1) + fibonnaci(n-2)
end
@maysam
maysam / yuh.rb
Created February 15, 2025 20:21
yuh report parser
# frozen_string_literal: true
require 'sinatra'
require 'sinatra/reloader' if development?
require 'sqlite3'
require 'pdf-reader'
set :environment, :development
DB_FILE = 'transactions.db'