Skip to content

Instantly share code, notes, and snippets.

View bramz's full-sized avatar

Brock Ramsey bramz

View GitHub Profile
@bramz
bramz / flower.py
Created January 13, 2019 19:54
flower class for data structures and algos book, chapter 2 exercise
"""
Chapter 2
Exercise 2.4
Write a Python class, Flower, that has three instance variables of type str,
int and float, that respectively represent the name of the flower,
its number of petals, and its price. Your class must include a constructor
method that initializes each variable to an appropriate value, and your
class should include methods for setting the value of each type, and
retreiving the value of each type.
@bramz
bramz / chdi.go
Last active August 22, 2018 02:48
Command handling dependency injection
package cmd
import "fmt"
type Cmd struct {
trigger string
handler CmdHandler
}
type CmdHandler interface {

Keybase proof

I hereby claim:

  • I am bramz on github.
  • I am wiredbruh (https://keybase.io/wiredbruh) on keybase.
  • I have a public key whose fingerprint is BF90 09F6 FB93 D780 E10A 0543 0865 2008 BAB4 E25E

To claim this, I am signing this object: