Skip to content

Instantly share code, notes, and snippets.

HWiNFO64 Version 4.50-2400
STYX ----------------------------------------------------------------------
[Current Computer]
Computer Name: STYX
Computer Description: STYX
Computer Brand Name: LENOVO Lenovo Z50-70
[Operating System]
Operating System: Microsoft Windows 8.1 Professional with Media Center (x64) Build 9600
@HackToHell
HackToHell / main.py
Created May 1, 2019 12:20
Simple Mi Air Purifier 2 prometheus exporter
import os
from prometheus_client.core import GaugeMetricFamily, REGISTRY
from miio.airpurifier import AirPurifier
from prometheus_client.metrics_core import CounterMetricFamily
from prometheus_client.twisted import MetricsResource
from twisted.web.server import Site
from twisted.web.resource import Resource
from twisted.internet import reactor
@HackToHell
HackToHell / export.py
Created September 17, 2016 04:56
Phabricator Phriction documentation exporter script
import pandas as pd
import os
from sqlalchemy import *
engine = create_engine('mysql://root:test@127.0.0.1/test') #Change me to the phriction database
df=pd.read_sql('select * from phriction_content',engine)
def get(x):
x=x.iloc[0]