<commit_before>Audio Spectrogram Demo
======================

This demo can be built entirely outside of the regular BokehJS build process.

Build & Prereqs
===============

You will still need to follow the Coffeescript installation instructions in the top-level README, i.e. you need to have node, npm, coffeescript, and hem installed.

You will also need PyAudio and Flask installed.  (These come with Anaconda.)

Build the coffeescript:

`$ hem build`

This should create a `static/js/application.js` file.

Running the Demo
================

Run the hem server:
`$ hem server `

Run the python server:
`$ python soundserver.py`

View the web page by visiting http://localhost:5000/ (or http://.  If you want to just see the raw JSON data dump, visit http://localhost:5000/data.  You can keep refreshing on the latter.

Helpful Demo Tips
=================

If you want to suppress all the chatty "HTTP/1.1 200" status codes, dump the output:<commit_msg>update READE for spectrogram<commit_after>Audio Spectrogram Demo
======================

Build & Prereqs
===============

You will still need to follow the installation instructions in the top-level README.md in the bokehjs directory, i.e. you need to have node, npm, coffeescript, and grunt installed.

You will also need PyAudio and Flask installed.  (These come with Anaconda.)

Build the coffeescript:

`$ grunt `deploy-both`

This should create spectrogram.js under the build directory and copy all the supporting files there as well.

Running the Demo
================

Change to the spectrogram demo build directory (relative to the top-level bokehjs directory):

`$ cd build/demo/spectrogram`

Run the python server:

`$ python soundserver.py`

or

`$ python soundserver_threaded.py`

View the web page by visiting http://localhost:5000/. If you want to just see the raw JSON data dump, visit http://localhost:5000/data.  You can keep refreshing on the latter to see it update.

Helpful Demo Tips
=================

If you want to suppress all the chatty "HTTP/1.1 200" status codes, dump the output:
{'fraction_non_alphanumeric': 0.12736077481840194, 'fraction_numerical': 0.012590799031476998, 'mean_word_length': 4.49468085106383, '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': '4111346', 'n_tokens_mistral': 601, 'n_tokens_neox': 573, 'n_words': 273}