Skip to main content

A library for building, manipulating, and calculating with FRPs and their kinds, and an executable application for sampling large collections of FRPs of an arbitrary kind. This is primarily designed for instructional purposes in the teaching of probability theory and statistical modeling.

Project description

frplib

PyPI - Version PyPI - Python Version


frplib is a library and application that provides a platform for instruction on probability theory and statistics. It was written and designed for use in my class Stat 218 Probability Theory for Computer Scientists. The ideas represented by this library are described in detail in the draft chapter in docs.

Table of Contents

Installation

Python installation is a prerequisite

frplib requires a modern Python installation to be installed, with pip included. Versions 3.9+ will work, though 3.10+ is recommended. You can download and install Python from here, though your system may have a package manager (like homebrew, apt, yum) that makes this even more convenient.

On Ubuntu linux, the following worked for me to get both Python and pip:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11
sudo apt install python3.11-distutils
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11

Installing frplib

Once Python is installed, it should be sufficient to enter the following command at a terminal/shell/powershell prompt:

pip install frplib

This will install the library and install the frp script from the terminal command line. On Mac OS and Linux, these scripts were installed in /usr/local/bin, which should be available automatically. On Windows, the location seems to depend on how you installed Python. Try entering the command frp --help at the terminal prompt; if this displays information about the market and playground subcommands, then you are ready to go. See the next subsection if you are having trouble with this on Windows.

Because we will be updating the library frequently, you will need to update your installation at times. This can be done with a single command:

pip install --upgrade frplib

Finding the Scripts on Windows

While the scripts are not strictly necessary (see below), they are convenient. If your system is not finding the scripts, you can forgo using them (there are alternatives) or find the scripts and add them to the search list that the system uses to find executable apps. Results may vary among powershell, wsl, and git-bash. The latter two should be easier, and the comments here focus on powershell, which seems to be more popular among windows user.

In powershell (running as admin), you can enter the command

where python

to find the folder in which python is installed. Substitute that path for [python-folder] in

python [python-folder]\Tools\scripts\win_add2path.py

and restart your powershell/terminal. The scripts should now be available.

Running frp

The simplest way to run the app is to enter either frp market or frp playground at the terminal command line prompt. You can get overview help by entering frp --help. Further help is available from within the app. Use the help. command in the market and info() in the playground.

The previous paragraph assumes that the scripts are available. If not, you can run the commnds with

python -m frplib market
python -m frplib playground
python -m frplib --help

These work identically to the scripts and are just longer to type.

If you need to check your version to make sure you are up to date, enter one of

frp --version
python -m frplib --version

at the terminal prompt.

Quick Start

There are two main sub-commands:

  • frp market allows one to run demos simulating large batches of FRPs of arbitrary kind and to simulate the purchase of these batches to determine risk-neutral prices.

  • frp playground is an enhanced Python REPL with frplib tools preloaded and special outputs, behaviours, and options to allow hands-on modeling with FRPs and kinds.

More Coming Soon...

Cookbook

The frplib Cookbook offers guidance on common tasks.

An frplib Cheatsheet is also available.

User Guide

The best current guide to using frplib are the extensive discussion and examples in Chapter 0.

More Coming Soon...

License

frplib is distributed under the terms of the GNU Affero General Public License license.

Copyright (C) Christopher R. Genovese

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

frplib-0.2.7.tar.gz (3.7 MB view details)

Uploaded Source

Built Distribution

frplib-0.2.7-py3-none-any.whl (971.8 kB view details)

Uploaded Python 3

File details

Details for the file frplib-0.2.7.tar.gz.

File metadata

  • Download URL: frplib-0.2.7.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for frplib-0.2.7.tar.gz
Algorithm Hash digest
SHA256 bdaa9bdc0b4a08b6e9cbf4a221f26ffb049360767f782d47b9c981839f4c897e
MD5 2632c387627d23eaf6ca509a8536617a
BLAKE2b-256 edf2104dc2517d5002a335bf74e0993c05d8949cd63a7cb870677c4c298c5c69

See more details on using hashes here.

File details

Details for the file frplib-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: frplib-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 971.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for frplib-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1b534010d79936ea6337c1a4bcf0c123d866aa06d7dde8cacd079a8d8fc05933
MD5 668d5d6a028ea8cf54ed670d19c349ae
BLAKE2b-256 dac6722ff7179ee1303451d1f1aebcb20eba282ac4338f1ca8c5791357076ce8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page