Skip to content

Instantly share code, notes, and snippets.

View PatrickHoward's full-sized avatar
🍎
Signing those binary files for fruity computer use

Patrick M. Howard PatrickHoward

🍎
Signing those binary files for fruity computer use
View GitHub Profile
@PatrickHoward
PatrickHoward / calorie_counter.rs
Created December 9, 2019 00:17
A quick reimplementation of a calorie counter program written in C++ now in Rust.
use std::io;
fn main() {
const KILO_PER_POUND:f32 = 2.2;
const CALORIE_BURN_RATE:f32 = 0.0175;
println!("Input your weight in pounds: ");
let mut weight_in_pounds = String::new();
@PatrickHoward
PatrickHoward / bfs.cpp
Last active February 28, 2020 18:28
Breadth for search algorithm for graphs.
// An implementation of BFS used for pathfinding on a graph in which all weights of a graph are of "1"
// Written by Patrick M. Howard
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
struct Node;
@PatrickHoward
PatrickHoward / dnd.rb
Created July 27, 2015 03:57
Dungeons & Dragons Dice Roller
$new_line ="--" * 20
class Dnd
def initialize(die, times)
@die = die
@times = times
@dnd = {"d4" => 4, "d6" => 6, "d10" => 10, "d20" => 20, "d40" => 40}
end
def roll_dice()