Skip to content

Instantly share code, notes, and snippets.

View imann24's full-sized avatar

Isaiah Mann imann24

View GitHub Profile
@imann24
imann24 / calendar_print.py
Created April 23, 2022 01:55
Prints a calendar similar to `date` function
# you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")
DAY_HEADERS = "Su Mo Tu We Th Fr Sa"
DAYS_IN_ROW = 7
def solution(numberOfDays, startDay):
cal_lines = [DAY_HEADERS]
curr_line = []
for i in range(0, startDay):

Keybase proof

I hereby claim:

  • I am imann24 on github.
  • I am imann24 (https://keybase.io/imann24) on keybase.
  • I have a public key ASDWME_h74m46Z1DqrRBKpP0TpfYjhDrNGnEtoNG3XXhgAo

To claim this, I am signing this object:

[Serializable]
public class SerializedRandom
{
int place;
int seed;
Random rand;
public SerializedRandom(int seed, int place)
{
this.place = place;
this.seed = seed;
@imann24
imann24 / trim_arr.rb
Last active September 9, 2017 20:49
Trim a 2D array on a particular interval. Helper method for game of Mash
data = [["Mansion", "House", "Shack", "Apartment"], ["Dave", "Tom", "Mark", "Joey"]]
interval = 2
def trim(array, interval)
running = true
interval_counter = 1
inner_pointer = 0
outer_pointer = 0
flags = Array.new(array.length, false)
while(running)
// AUTHOR: Muriel Brunet
var currentImage;
var captionText;
function openModal(imgID){
currentImage = imgID; //define the current image as the one that was clicked to open modal window
// Get the modal
var modal = document.getElementById('myModal');
/*
* Author(s): Isaiah Mann
* Description: Used to control the audio in the game
* Is a Singleton (only one instance can exist at once)
* Attached to a GameObject that stores all AudioSources and AudioListeners for the game
* Dependencies: AudioFile, AudioLoader, AudioList, AudioUtil, RandomizedQueue<AudioFile>
*/
using UnityEngine;
using System;
using System.Collections;
/*
* Author(s): Isaiah Mann
* Description: Used to control the audio in the game
* Is a Singleton (only one instance can exist at once)
* Attached to a GameObject that stores all AudioSources and AudioListeners for the game
* Dependencies: AudioFile, AudioLoader, AudioList, AudioUtil, RandomizedQueue<AudioFile>
*/
using UnityEngine;
using System;
using System.Collections;
/**
* @description Sets the active state if the hittest is successful
* @param {int} x The x position of the hittest
* @param {int} y The y position of the hittest
* @param {Matrix} transformMatrix The transform matrix affecting the drawing of the map
* @returns {Boolean}
*/
VisualMap.prototype.hitTest = function (x, y, transformMatrix) {
x = parseInt(x);
y = parseInt(y);
;; Definitions for shooter agents.
(ns pucks.agents.blue-grunt
(:use [pucks globals util vec2D maneuvers]
[pucks.agents active]
[clojure.set]))
(defn blue-grunt-proposals [p]
(let
[enemies (concat (filter #(= (:mobile %) true) (filter :red-grunt (:sensed p)))
(filter #(= (:mobile %) true) (filter :red-medic (:sensed p))))
class BasicFiles
attr_accessor :name
attr_accessor :content
def initialize (name, filePath)
@name = name;
@content = File.read(filePath).split("");
end
def print ()
puts @content