semvec/pypi-packages huggingface dataset:
advanced-input 0.2.2
IO Extention
Requires Python: >=3.7

# Advanced Input

Advanced input for python, where you can read in just one character or have inputs priority ordered.

## Usage

```py
from advanced-input import get_advanced_input, PriorityOrder
from threading import Thread
from time import sleep

input_handler = get_advanced_input()

def thread_one():
    user_input = input_handler.input(priority=PriorityOrder.High)
    print(user_input)

def main():
    backgroundThread = Thread(target=thread_one)
    backgroundThread.start()
    sleep(.1)
    input_handler.read("Press any character to exit...", PriorityOrder.Low)
    input_handler.stop()
```

This will result in a user input for `thread_one` being created before the `main` function's exit will be available. Normally, this would result in the program exiting, before accepting the user input of `thread_one`. With this, thread one will be in a higher priority than `main`, and that will be the first to be served the user's input. Additionally, `Read()` returns when one character is pressed.

If there are multiple inputs with the same priority, it will return them in a first come last serve method.

## Windows quirks

Due to how Windows works with new line (\r\n), on Windows it is not possible to read the "Carriage Return" (\r) character. It will always return "Line Feed" (\n) instead.
Due to how Windows console works, the default (utf-8) encoding input will not work with some special character. For it to work, please specify the encoding of your system.
quadplots 1.0.3
Create animations of simple numerical integration methods.
Requires Python: >=3.10
Keywords: Simpson's Rule, Trapezoidal rule, Riemann Sum, Visualization, Graph, Quadrature

# quadplots

The `quadplots` program is an educational utility to create visualizations of basic quadrature methods. The current methods supported are Riemann sum (left, right, mid, max, min), Trapezoid rule, and Simpson's rule.

## Usage

Basic usage of quadplots only requires an expression you want to graph (must be valid python), and the start and end points.

```
quadplots "x**2 - 3*x + 1" -2 3 
```

![](https://github.com/CopOnTheRun/quadplots/raw/main/images/basic_example.svg)

By default quadplots will graph a riemann sum with n=10 and use the midpoint method, but you can easily change these options.

```
quadplots "x**2 - 3*x + 1" -2 3 --method min --partitions 5
```


![](https://github.com/CopOnTheRun/quadplots/raw/main/images/min_example.svg)

You can also change the type of quadrature method used

```
quadplots "x**3 - 8*x + 7" -2 3 --method min --partitions 4 --quad-type simpson 
```
![](https://github.com/CopOnTheRun/quadplots/raw/main/images/simpson_example.svg)

If you want, instead of python functions, you can write latex by adding the `--latex` flag to the command.

```
quadplots "\exp{-x^{2}}" -2 4 --partitions 4 --quad_type simpson --latex
```
![](https://github.com/CopOnTheRun/quadplots/raw/main/images/latex_example.svg)

Finally, if you wish to animate the plot, you can pass `--animate` with a list of partitions you would like to see at each frame.

```
quadplots "\exp{-x^{2}}" -2 4 --partitions 4 --quad_type simpson --latex --animate 2 4 6 10 100
```
![](https://github.com/CopOnTheRun/quadplots/raw/main/images/animation_example.gif)