semvec/pypi-packages huggingface dataset:
riichiroyale-cmiller548 0.0.6
Singleplayer Riichi Mahjong Game
Requires Python: >=3.6

# Riichi Royale
*Team "The One Cow" for Fall 2020 Performant Programming in Python*

## Getting Started
This getting start guide assumes you are running either Arch Linux or Ubuntu (whether standalone or within WSL).

Install the following dependencies:

- `git`

- `cmake`

- `clang` (or [clang-10](https://packages.ubuntu.com/bionic/clang-10) if on Ubuntu < 20.04LTS)

Clone the repository:

```
git clone git@github.com:HartleyAHartley/RiichiRoyale.git
```

Run the following commands within the project directory:
```
# Install python dependencies locally
pip install --user -r requirements.txt

# Create build directory for cmake
mkdir build/

# Bootstrap CMake Environment
cmake -S . -B build

# Or bootstrap CMake with tool building enabled
cmake -S . -B build -DPACKAGE_TOOLS=ON

# Or, if wanting to use Clang

C=clang CXX=clang++ cmake -S . -B build

# Build Project
cmake --build build

# Run Project
python main.py
```

## Testing and Documentation

The python test suite is located in `test/` and can be run with `python test`

The C++ test suite is located in `cxxtests/` and can be run with `make -C build check`

## Good Resources

[DocDevs Mirror of Pygame Documentation](https://devdocs.io/pygame/): Standard Pygame API Docs. Pygame has a ratelimiter on their website of 50 visits per hour, which is very annoying while developing.

[Pygame Example Projects](https://github.com/ternus/pygame-examples): Great showing of how everything in pygame pieces together.

[Pybind11 Docs](https://pybind11.readthedocs.io/en/latest/): The documentation for pybind11, which is what we use for building the C++ python module.
nanobt 0.1.1
A quickly backtesting library for inversion strategies
Requires Python: >=3.6

# Package nanobt (v 0.1.0)

A quickly backtesting library for inversion strategies

## Install package

```
pip install nanobt
```

# Data as pd.DataFrame

Columns required = ['datetime', 'open', 'high', 'low', 'close', 'volume']

Column 'datetime' must be datetime object.

# Code example


```python

from nanobt.backtesting import Backtesting
from nanobt.trades import TradeHistory, SideOrder
import pandas as pd

INIT_PORTFOLIO = 1000
class BuyAndHoldStrategy(Backtesting):
    def next(self):
        if not self.position:
            self.entry(SideOrder.BUY)

data = pd.read_csv('./data/binance_BTCUSDT_5m.csv')
data['datetime'] = pd.to_datetime(data['time'], unit='s')
data = data.drop(columns=['time'])

strategy = BuyAndHoldStrategy()
strategy.setdata(data)
trades = strategy.run()

th = TradeHistory(trades=trades)
print("Init Portfolio: ", INIT_PORTFOLIO)
print("Buy and Hold Strategy: ", th.study(cash=INIT_PORTFOLIO, sizer=1, commision=0.04, show_plot=False))


```