Skip to content

Instantly share code, notes, and snippets.

@sloria sloria/gist:5895673
Last active Dec 19, 2015

What would you like to do?
# Better
class Boiler:
def safety_check(self):
if any([self.temperature > MAX_TEMPERATURE,
self.pressure > MAX_PRESSURE]):
if not self.shutdown():
def alarm(self):
with open(BUZZER_MP3_FILE) as f:
def pressure(self):
pressure_psi = abb_f100.register / F100_FACTOR
return psi_to_pascal(pressure_psi)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.