<commit_before># Earthquake Converter

Pulls live earthquake data from the [US Geological Survey site](http://earthquake.usgs.gov/) and sends information about each event to connected serial devices.

![:)](http://i.imgur.com/e5YmLI3.gif)

## Installation on Raspberry Pi B+

1. Download [ResinOS](https://resinos.io/#downloads) for Raspberry Pi 1.
2. Extract and install ResinOS image on micro SD card.
3. Connect Raspberry Pi to network and power.
4. Install the [resin device toolbox](https://github.com/resin-os/resin-device-toolbox) (`npm install -g resin-device-toolbox`).
5. Run `rdt push` in the root of this repo and select your Raspberry Pi when prompted.

## Serial Protocol

When earthquakes occur the time, magnitude, latitude, and longitude will be written to the first serial port found, in that order. The values will be floats separated by a single space and terminated with a newline.

For an example of parsing this data with an Arduino take a look at the earthquake-light firmware in the examples directory.<commit_msg>Smaller GIF<commit_after># Earthquake Converter

Pulls live earthquake data from the [US Geological Survey site](http://earthquake.usgs.gov/) and sends information about each event to connected serial devices.

![:)](http://i.imgur.com/1DbNcsf.gif)

## Installation on Raspberry Pi B+

1. Download [ResinOS](https://resinos.io/#downloads) for Raspberry Pi 1.
2. Extract and install ResinOS image on micro SD card.
3. Connect Raspberry Pi to network and power.
4. Install the [resin device toolbox](https://github.com/resin-os/resin-device-toolbox) (`npm install -g resin-device-toolbox`).
5. Run `rdt push` in the root of this repo and select your Raspberry Pi when prompted.

## Serial Protocol

When earthquakes occur the time, magnitude, latitude, and longitude will be written to the first serial port found, in that order. The values will be floats separated by a single space and terminated with a newline.

For an example of parsing this data with an Arduino take a look at the earthquake-light firmware in the examples directory.
{'fraction_non_alphanumeric': 0.08092485549132948, 'fraction_numerical': 0.0072254335260115606, 'mean_word_length': 4.46578947368421, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '278267', 'n_tokens_mistral': 614, 'n_tokens_neox': 567, 'n_words': 280}