<commit_before>BBC micro:bit MicroPython Editor for Browsers
=============================================

This project is an editor that targets the MicroPython
(http://micropython.org) version of the Python programming language
(http://python.org/). Code written with this editor is expected to run on the
BBC's micro:bit device (https://en.wikipedia.org/wiki/Micro_Bit).

Developer Setup
---------------

This editor works with any modern web browser.

Assuming you have Python 3 installed you can serve the editor like this::

    $ ./show.sh
    http://localhost:8000/editor.html
    Serving HTTP on 0.0.0.0 port 8000 ...

As the script tells us, point your browser to http://localhost:8000/editor.html.

It's also possible to run the editor directly from the file system like this,
for example::

    $ firefox editor.html

Or by double-clicking on the ``editor.html`` file from your file manager.

**IMPORTANT**: When the editor is run from the file system, the "sharing"
button is hidden. Because of security reasons, many local browsers won't allow
it to function correctly unless the editor is properly served from a network
domain rather than directly from the file system.

Tests
+++++

Simply point your browser to the ``tests.html`` file.<commit_msg>Update getting started directions for new flask app<commit_after>BBC micro:bit MicroPython Editor for Browsers
=============================================

This project is an editor that targets the MicroPython
(http://micropython.org) version of the Python programming language
(http://python.org/). Code written with this editor is expected to run on the
BBC's micro:bit device (https://en.wikipedia.org/wiki/Micro_Bit).

Developer Setup
---------------

This editor works with any modern web browser. These instructions assume that you have Python 3 installed and you're using some kind of UNIX-y system. If you're on Windows, no fear, all of this is acheivable, you'll just have to tweak the commands slightly.

Virtual Environment
+++++++++++++++++++

We're going to create a virtual environment for the Python code to live in. This environment will keep the work you do on this project separate from the rest of your projects. This can be really handy when you have several projects on your computer that all want to use slightly different versions of libraries::

    $ pyvenv venv
    (venv) $ source venv/bin/activate
    (venv) $ pip install -r requirements.txt

Running the Code
++++++++++++++++

Easy peasy::

    (venv) $ python app.py

Then visit http://localhost:5000 to see the editor.

Tests
+++++

Simply point your browser to the ``tests.html`` file.
{'fraction_non_alphanumeric': 0.1236722306525038, 'fraction_numerical': 0.00834597875569044, 'mean_word_length': 4.100580270793037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5640127', 'n_tokens_mistral': 703, 'n_tokens_neox': 644, 'n_words': 343}