<commit_before>var tessel = require('tessel');
var ambientPort = tessel.port('a');

// Import the ambient library and use designated port
require('../').use(ambientPort, function(err, ambient) {

  // If there was a problem
  if (err) {
    // Report it and return
    return console.log("Error initializing:", err);
  }

 // Get a stream of light data
  ambient.on('light', function(data) {
    console.log("Got some  light: ", data);
  });

  // Get a stream of sound level data
  ambient.on('sound', function(data) {

    console.log("Got some  sound: ", data);
  });

  // Set trigger levels
  // The trigger value is a float between zero to 1
  ambient.setLightTrigger(0.15);

  ambient.on('light-trigger', function(data) {
    console.log("Our light trigger was hit:", data); 
    
    // Clear the trigger so it stops firing
    ambient.clearLightTrigger();
  });


  // Set a sound level trigger
  // The trigger is a float between 0 and 1
  // Basically any sound will trip this trigger
  ambient.setSoundTrigger(0.001);

  ambient.on('sound-trigger', function(data) {
    
    console.log("Something happened with sound: ", data);
    
    // Clear it
    ambient.clearSoundTrigger();
  });
});

setInterval(function() {}, 200);<commit_msg>renamed ambient example to fit convention<commit_after>var tessel = require('tessel');
var ambientPort = tessel.port('a');

// Import the ambient library and use designated port
require('../').use(ambientPort, function(err, ambient) {

  // If there was a problem
  if (err) {
    // Report it and return
    return console.log("Error initializing:", err);
  }

 // Get a stream of light data
  ambient.on('light', function(data) {
    console.log("Got some  light: ", data);
  });

  // Get a stream of sound level data
  ambient.on('sound', function(data) {

    console.log("Got some  sound: ", data);
  });

  // Set trigger levels
  // The trigger value is a float between zero to 1
  ambient.setLightTrigger(0.15);

  ambient.on('light-trigger', function(data) {
    console.log("Our light trigger was hit:", data);

    // Clear the trigger so it stops firing
    ambient.clearLightTrigger();
  });


  // Set a sound level trigger
  // The trigger is a float between 0 and 1
  // Basically any sound will trip this trigger
  ambient.setSoundTrigger(0.001);

  ambient.on('sound-trigger', function(data) {

    console.log("Something happened with sound: ", data);

    // Clear it
    ambient.clearSoundTrigger();
  });
});

setInterval(function() {}, 200);
{'fraction_non_alphanumeric': 0.13757455268389662, 'fraction_numerical': 0.010337972166998012, 'mean_word_length': 3.1863560732113143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '2188455', 'n_tokens_mistral': 796, 'n_tokens_neox': 736, 'n_words': 246}