Skip to content
{{ message }}

Instantly share code, notes, and snippets.

# J. Erik jerik

Created Jun 20, 2020
View show-faults.py
 # https://stackoverflow.com/q/62478289/1933185 ini_list = [('G 05', 'Over-Speed', '1.63'), ('Load 23A_UF', 'Over-Voltage', '11.37'), ('Load 21A_UF', '11.38'), ('Load 08A_UF', '11.38'), ('Load 07A_UF', '11.38'), ('Load 12A_UF', '11.38'), ('Load 24A_UF', '11.38'), ('Load 15A_UF', '11.38'), ('Load 16A_UF', '11.38'), ('Load 04A_UF', '11.38'), ('Load 03A_UF', '11.38'), ('Load 18A_UF', '11.38'), ('Load 25A_UF', '11.38'), ('Load 27A_UF', '11.39'), ('Load 26A_UF', '11.39'), ('G 05', 'Over-Speed', '1.63'), ('G 05', 'Over-Voltage', '1.63'), ('NSG_2', 'OverVoltage', '2.72'), ('G 01', 'Out of Step', '2.72')] reasons = {'sum_of_reasons': 0} for item in ini_list: reason = lambda x: 'No Reason Given' if len(x) == 2 else x[1] add_fault(reason(item), reasons) {print('%s: %s this is %.2f' % (k, reasons[k], reasons[k]/reasons['sum_of_reasons'])) for k in reasons} def add_fault(fault, reasons):
Created Apr 26, 2017 — forked from tomysmile/mac-php-composer-setup.md
Setup PHP Composer using Brew
View mac-php-composer-setup.md
Created Feb 11, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
 // Use Gists to store code you would like to remember later on console.log(window); // log the "window" object to the console
Last active Feb 24, 2016
Get started with kibana4
View Get-started-with-kibana4.md

# Get started with kibana4

Short tutorial how to get started with kibana on OSX for rookies (like me at this topic)

# Install (on *nix flavours)

• elasitcsearch
• kibana4

# Fireup

on the shell start `bin/elasticsearch` and `bin/kibana`

You can’t perform that action at this time.