<commit_before># ieeg
*A simple Python API for IEEG.org*

**Authors: <NAME>, <NAME>, <NAME>, University of Pennsylvania**

This package allow users to stream data from the IEEG.org platform to their local Python environment.  An early iteration was developed in 2015, and it was substantially updated in 2019 to add greater functionality and to make it compatible with "modern" Python versions.  

Supported environments:
* Python 2.7+
* Python 3.6+

## Getting Started

First, be sure you have signed up at [IEEG.org](www.ieeg.org) so you have an active account and password.

Install the dependencies:
```
pip install requests numpy pandas deprecation pennprov
```

You may then run:
```
python read_sample.py myid mypassword
```

where `myid` is your IEEG.org username (you can put it in double-quotes if it has a space) and `mypassword` is your IEEG.org password (again, in double-quotes if you have a space in it).

You'll see that the sample program makes a connection to IEEG.org, fetches details on the channels associated with a given dataset, and fetches and dumps some data.

*Optional*: To install the libraries from this repository into your Python path, you can:

```
python setup.py build
python setup.py install
```  

## Major Functionality

### Session (ieeg.auth)

* `open_dataset`(name):  fetches the metadata for an IEEG dataset, by its unique ID.  Returns a `TimeSeriesDetails` object.<commit_msg>Add note about running example programs.<commit_after># ieeg
*A simple Python API for IEEG.org*

**Authors: <NAME>, <NAME>, <NAME>, University of Pennsylvania**

This package allow users to stream data from the IEEG.org platform to their local Python environment.  An early iteration was developed in 2015, and it was substantially updated in 2019 to add greater functionality and to make it compatible with "modern" Python versions.  

Supported environments:
* Python 2.7+
* Python 3.6+

## Getting Started

First, be sure you have signed up at [IEEG.org](www.ieeg.org) so you have an active account and password.

Install the dependencies:
```
pip install requests numpy pandas deprecation pennprov
```

You may then run:
```
python read_sample.py myid mypassword
```

where `myid` is your IEEG.org username (you can put it in double-quotes if it has a space) and `mypassword` is your IEEG.org password (again, in double-quotes if you have a space in it).

You'll see that the sample program makes a connection to IEEG.org, fetches details on the channels associated with a given dataset, and fetches and dumps some data.

*Optional*: To install the libraries from this repository into your Python path, you can:

```
python setup.py build
python setup.py install
```  
You will need to install the library to run the programs in the `example` directory.

## Major Functionality

### Session (ieeg.auth)

* `open_dataset`(name):  fetches the metadata for an IEEG dataset, by its unique ID.  Returns a `TimeSeriesDetails` object.
{'fraction_non_alphanumeric': 0.07661016949152542, 'fraction_numerical': 0.008135593220338983, 'mean_word_length': 4.51588785046729, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2783117', 'n_tokens_mistral': 858, 'n_tokens_neox': 805, 'n_words': 421}