This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% highlight ruby %} | |
def print_hi(name) | |
puts "Hi, #{name}" | |
end | |
print_hi('Tom') | |
#=> prints 'Hi, Tom' to STDOUT. | |
{% endhighlight %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.co.chrishannam; | |
import com.fazecast.jSerialComm.SerialPort; | |
import java.io.InputStream; | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("Opening serial"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"fmt" | |
"log" | |
"github.com/tarm/serial" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
import json | |
import numbers | |
import socket | |
import logging | |
from cassandra.telemetry.constants import PACKET_MAPPER | |
logging.basicConfig( |