Skip to content

Instantly share code, notes, and snippets.

Chris Hannam chrishannam

Block or report user

Report or block chrishannam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .pre-commit-config.yaml
- repo: https://github.com/FalconSocial/pre-commit-python-sorter
rev: master
hooks:
- id: python-import-sorter
args: ['--silent-overwrite']
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.720
hooks:
- id: mypy
@chrishannam
chrishannam / fans.py
Created Mar 6, 2019
Read sensor data from python
View fans.py
""" Takes output from "sensors" command and writes it to
a file by default. Can also connect to Redis and Influxdb
"""
#!/usr/bin/python
import subprocess
import json
from datetime import datetime
from traceback import print_exc
View gist:a490cdd765967d7c548a858d092473c5
{% highlight ruby %}
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}
You can’t perform that action at this time.