semvec/pypi-packages huggingface dataset:
prob-book 0.2
Interactive terminal and jupyter notebook kernel for probability calculations

# Prob Book [![Build Status](https://travis-ci.com/TomJamesGray/prob-book.svg?branch=master)](https://travis-ci.com/TomJamesGray/prob-book)
Interactive python shell and jupyter notebook kernel
to calculate probabilities for common statisitcal
distributions. Documentation can be found in the [Github wiki](https://github.com/TomJamesGray/prob-book/wiki)

![Image of prob book's jupyter notebook kernel plotting the
standard normal distribution](jupyter_eg.png)

Currently the distributions implemented and the functions to define them are:
* Normal - `N`
* Exponential - `Exp`
* Binomial - `B`
* Poisson - `Po`
* Geometric - `Geo`

## Installation
```
pip install prob-book
# Then to install the jupyter kernel run
python -m prob_book.install-kernel
```

## Use
To run the terminal version run the command `prob-book`

To use the jupyter kernel you can:
* Start the notebook server by running `jupyter notebook` then select "Prob Book"
from the new notebook menu
* Run `jupyter console --kernel prob_book`

## Examples
Create a standard normal distribution named X and compute P(X<2)
```
>>> X~N(0,1)
>>> P(X<2)
0.97725
```
---
Create a binomial distribution with 10 trials and a success probability
of 0.3, then compute the probability there are 4 or fewer successes
```
>>> Y~B(10,0.3)
>>> P(Y<=4)
0.849732
```

## TODO
* Implement help function for distributions, eg Help(Exp) will tell you the
parameters for the Exponential dist
YahooFinanceDataLoader 0.1.0
Allows to download YahooFinance stock data to your local disk.
Requires Python: ~=3.6
Keywords: Yahoo Finance stock price csv

# YahooFinanceDataLoader

YahooFinanceDataLoader allows to download historical quotes data in bulk
from the YahooFinance website. The downloaded data is in csv format.

## API

#### Implemented methods:  
- download_bulk_data  
- get_assets_from_csv


**download_bulk_data** ( assetsList, start_date, end_date, interval, data_directory, maxNThreads=20, nTrials=3 )

Method description: downloads stocks historical data from YahooFinance in csv format.

**Return Value**: a list of symbols for which download has failed

###### Parameters:
- assetsList - list of assets, for example ['AAPL', 'MSFT', 'NVDA']
- start_date - start date for your download ('yyyy-mm-dd'), for example '2019-01-01'
- end_date - end date for your download ('yyyy-mm-dd'), for example '2019-01-31'
- interval - download interval, '1d' for daily, '1wk' for weekly, '1mo'
- data_directory - directory location to save downloaded data

###### Optional parameters:
- maxNThreads - maximum number of threads to use for data download, 
		the default value is 20.
- nTrials - number of trials to be used for download, the default
		value is 3. Explanation: due to connectivity issues your download may fail, 
		and it is worth trying to re-send your download request.

###### Example:

```python
from YahooFinanceDataLoader import download_bulk_data

assetsList = ['AAPL', 'ADBE', 'AMZN', 'CSCO', 'FB', 'GOOGL', 'FAKE'] 
start_date = '2018-01-01'
end_date = '2018-01-31'
interval = '1d'
data_directory = '/home/user_name/stock_price_data'
maxNThreads = 20
nTrials = 3

failed_downloads = download_bulk_data(assetsList, start_date, end_date, interval, 
					data_directory, maxNThreads, nTrials)
print('Failed downloads: ', failed_downloads)
```

**get_assets_from_csv** ( csv_file, field_list = ['Symbol', 'Company'] )


Method description: reads assets from the csv file and returns a list of assets.
	csv file has to have a header, and the column containing stock symbols has
	to be named 'Symbol'

**Return Value**: a list of asset symbols read from the csv file

###### Parameters:
- csv_file - path to the csv file containing assets data

###### Optional parameters:
- field_list - a list containing csv file header names, 
      for example ['Symbol', 'Company']

###### Example:

```python
from YahooFinanceDataLoader import download_bulk_data

assetsList = get_assets_from_csv('/home/user_name/assets.csv', ['Symbol', 'Company'])
start_date = '2018-01-01'
end_date = '2018-01-31'
interval = '1d'
data_directory = '/home/user_name/stock_price_data'
maxNThreads = 20
nTrials = 3

failed_downloads = download_bulk_data(assetsList, start_date, end_date, interval, 
					data_directory, maxNThreads, nTrials)
print('Failed downloads: ', failed_downloads)
```