<commit_before>extern crate hs100;

use hs100::SmartPlug;

const HOST: &'static str = "192.168.0.37:9999";

fn main() {
    let api = SmartPlug::new(HOST);

    let resp = api.sysinfo();
    println!("[sysinfo]: {}\n", resp);

    let resp = api.meterinfo();
    println!("[meterinfo]: {}", resp);
}
<commit_msg>add more examples<commit_after>extern crate hs100;

use hs100::SmartPlug;

const HOST: &'static str = "192.168.0.37:9999";

fn main() {
    let api = SmartPlug::new(HOST);

    let resp = api.sysinfo();
    println!("[sysinfo]: {}\n", resp);

    let resp = api.meterinfo();
    println!("[meterinfo]: {}\n", resp);

    let resp = api.dailystats(7, 2017);
    println!("[dailystats]: {}", resp);

    //
    // Avoid these if the HS100 is plugged to your computer :)
    //

    // let resp = api.off();
    // let resp = api.on();
}

{'fraction_non_alphanumeric': 0.19716646989374262, 'fraction_numerical': 0.05430932703659976, 'mean_word_length': 3.076923076923077, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6569604', 'n_tokens_mistral': 356, 'n_tokens_neox': 298, 'n_words': 77}