# UCL API ![build](https://img.shields.io/github/actions/workflow/status/uclapi/uclapi/workflow.yml?label=build) ![staging](https://img.shields.io/github/actions/workflow/status/uclapi/uclapi/workflow.yml?label=staging) [![codecov](https://codecov.io/gh/uclapi/uclapi/branch/master/graph/badge.svg)](https://codecov.io/gh/uclapi/uclapi)

## What is the UCL API?
UCL API started as a **student-built** platform for **student developers** to improve the **student experience** of everyone at UCL. We now also have our own end-user facing applications in addition to this, such as UCL Assistant, our rival app to UCL GO.

### Our Goal
Create a ridiculously simple, documentation first, and comprehensive API around UCL's digital services and establish an ecosystem of third party UCL apps and services that use the API. Find out more at our [website](https://uclapi.com) or if you feel brave try [staging](https://staging.ninja).

### Interested in helping build it?
Read on more to find out how to setup and build the API. From here you can start writing your own changes and submitting them. See our [Contribution Guide](CONTRIBUTING.md) to learn more about how you can contribute.

## Setup in 10 Minutes
For this setup to work you need to have docker, git, python (3.7), and node + pnpm installed. If you would like the old setup guide (without docker) that can be found [here](README_SETUP.md), it also contains some advanced information for maintainers. This guide has been tested to work on Windows (we recommend PowerShell Core), Linux, and MacOS.

Clone uclapi to a local directory:
```bash
git clone https://github.com/uclapi/uclapi.git
cd uclapi
```

Then start the development docker compose file:
```bash
docker-compose -f docker-compose-dev.yml up
```

And setup the frontend:
```bash
cd uclapi-frontend
pnpm install
pnpm start
```

And setup your Python virtual environment & Django (you may need to write `python` instead of `python3`):
```bash
cd backend/uclapi
cp .env.docker.example .env
python3 -m venv ./venv

# For unix:
source ./venv/bin/activate
# For windows:
./venv/Scripts/activate

# Then
pip install -r requirements.txt

# Finally, start the Django web server:
cd backend/uclapi
python3 manage.py runserver
```

### Give it a go!
If those commands work you should be able to navigate to `http://localhost:8000/dashboard` in your browser, which will let you log in via Azure AD. If so, then you're up and running!

## Testing
We're an amazing project, so obviously we have tests :sparkles:. Make sure you have the requirements installed in your virtual environment (and you have activated it) , `cd` into `backend/uclapi` and then run :
`python manage.py test --settings=uclapi.settings_mocked`

## Linting
We have a pre-commit hook set up that runs [eslint](https://eslint.org/) on all staged JS files, [stylelint](https://github.com/stylelint/stylelint) on all staged scss files, and [autopep8](https://github.com/hhatto/autopep8) & [flake8](http://flake8.pycqa.org/en/latest/) on all staged Python files. This automatically fixes style issues and stops the commit if there are any obvious problems (e.g. failure to define variable).

## Documentation
As well as the user-facing documentation we also now ship our own internal Documentation which aims to help developers contribute to our code. To make it simply run ```make html``` while in the backend directory. You can then navigate to the build directory and open up index.html in your favourite browser to view the documentation. It can also be built in pdf, latex and a few other formats.


> [!WARNING]
> Version 5 introduces critical breaking changes with, among others, the _move to SI units_. We recommended to pin your dependencies to `magpylib>=4.5<5` until you are ready to migrate to the latest version! ([see details](https://github.com/magpylib/magpylib/discussions/647))

---

Magpylib is an **open-source Python package** for calculating static **magnetic fields** of magnets, currents, and other sources. It uses **analytical expressions**, solutions to macroscopic magnetostatic problems, implemented in **vectorized** form which makes the computation **extremely fast** and leverages the open-source Python ecosystem for spectacular visualizations!

# Installation

Install from PyPI using **pip**
```
pip install magpylib
```
Install from conda forge using **conda**
```
conda install -c conda-forge magpylib
```
Magpylib supports _Python3.10+_ and relies on common scientific computation libraries _NumPy_, _Scipy_, _Matplotlib_ and _Plotly_. Optionally, _Pyvista_ is recommended as graphical backend.

# Resources

 - Check out our **[Documentation](https://magpylib.readthedocs.io/en/latest)** for detailed information.
 - Please abide by our **[Code of Conduct](https://github.com/magpylib/magpylib/blob/main/CODE_OF_CONDUCT.md)**.
 - Contribute through **[Discussions](https://github.com/magpylib/magpylib/discussions)** and coding by following the **[Contribution Guide](https://github.com/magpylib/magpylib/blob/main/CONTRIBUTING.md)**. The Git project **[Issues](https://github.com/magpylib/magpylib/issues)** give an up-to-date list of potential enhancements and planned milestones. Propose new ones.
 - A **[Youtube video](https://www.youtube.com/watch?v=LeUx6cM1vcs)** introduction to Magpylib v4.0.0 within the **[GSC network](https://www.internationalcollaboration.org/).**
- An **[open-access paper](https://www.sciencedirect.com/science/article/pii/S2352711020300170)** from the year 2020 describes v2 of this library with most basic concepts still intact in later versions.

# Quickstart

Here is an example on how to use Magpylib.

```python
import magpylib as magpy

# Create a Cuboid magnet with sides 1,2 and 3 cm respectively, and a polarization
# of 1000 mT pointing in x-direction.
cube = magpy.magnet.Cuboid(
    polarization=(1, 0, 0),  # in SI Units (T)
    dimension=(0.01, 0.02, 0.03),  # in SI Units (m)
)

# By default, the magnet position is (0,0,0) and its orientation is the unit
# rotation (given by a scipy rotation object), which corresponds to magnet sided
# parallel to global coordinate axes.
print(cube.position)  # --> [0. 0. 0.]
print(cube.orientation.as_rotvec())  # --> [0. 0. 0.]

# Manipulate object position and orientation through the respective attributes,
# or by using the powerful `move` and `rotate` methods.
cube.move((0, 0, -0.02))# in SI Units (m)
cube.rotate_from_angax(angle=45, axis="z")
print(cube.position)  # --> [0. 0. -0.02]
print(cube.orientation.as_rotvec(degrees=True))  # --> [0. 0. 45.]

# Compute the magnetic B-field in units of T at a set of observer positions. Magpylib
# makes use of vectorized computation. Hand over all field computation instances,
# e.g. different observer positions, at one function call. Avoid Python loops !!!
observers = [(0, 0, 0), (0.01, 0, 0), (0.02, 0, 0)]  # in SI Units (m)
B = magpy.getB(cube, observers)
print(B.round(2))  # --> [[-0.09 -0.09  0.  ]
#                         [ 0.   -0.04  0.08]
#                         [ 0.02 -0.01  0.03]]  # in SI Units (T)

# Sensors are observer objects that can have their own position and orientation.
# Compute the H-field in units of A/m.
sensor = magpy.Sensor(position=(0, 0, 0))
sensor.rotate_from_angax(angle=45, axis=(1, 1, 1))
H = magpy.getH(cube, sensor)
print(H.round())  # --> [-94537. -35642. -14085.]  # in SI Units (A/m)

# Position and orientation attributes of Magpylib objects can be vectors of
# multiple positions/orientations referred to as "paths". When computing the
# magnetic field of an object with a path, it is computed at every path index.
cube.position = [(0, 0, -.02), (1, 0, -.02), (2, 0, -.02)]  # in SI Units (m)
B = cube.getB(sensor)
print(B.round(2))  # --> [[-0.12 -0.04 -0.02]
#                         [ 0.   -0.    0.  ]
#                         [ 0.   -0.    0.  ]] # in SI Units (T)

# When several objects are involved and things are getting complex, make use of
# the `show` function to view your system through Matplotlib, Plotly or Pyvista backends.
magpy.show(cube, sensor, backend="pyvista")
```

More details and other important features are described in detail in the **[Documentation](https://magpylib.readthedocs.io/en/latest)**. Key features are:

- **Collections**: Group multiple objects for common manipulation
- **Complex shapes**: Create magnets with arbitrary shapes
- **Graphics**: Styling options, graphic backends, animations, and 3D models
- **CustomSource**: Integrate your own field implementation
- **Direct interface**: Bypass the object oriented interface (max speed)

# How can I cite this library ?

We would be happy if you give us credit for our efforts. A valid bibtex entry for the [2020 open-access paper](https://www.sciencedirect.com/science/article/pii/S2352711020300170) would be

```
@article{ortner2020magpylib,
  title={Magpylib: A free Python package for magnetic field computation},
  author={Ortner, Michael and Bandeira, Lucas Gabriel Coliado},
  journal={SoftwareX},
  volume={11},
  pages={100466},
  year={2020},
  publisher={Elsevier}
}
```

A valid software citation could be

```
@software{magpylib,
    author = {{Michael-Ortner et al.}},
    title = {magpylib},
    url = {https://magpylib.readthedocs.io/en/latest/},
    version = {5.1.0dev},
    date = {2023-06-25},
}
```


# Virtool

Virtool is a web-based application for diagnosing pathogen infections using high-throughput sequencing.

[![ci](https://github.com/virtool/virtool/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/virtool/virtool/actions/workflows/ci.yml)

Website: https://www.virtool.ca

## Getting Started

See the [Virtool documentation](https://www.virtool.ca/docs/legacy/manual/start/installation/) to get started with the latest
version of Virtool 4.0.0.

## About Versions

Virtool is currently undergoing a major transformation into a cloud-native application. This will mean Virtool can scale
work across multiple hosts and run natively in Kubernetes and public cloud providers.

For current users and administrators:

1. **Virtool 4.0.0 series should be used for now**.
2. Virtool 4.0.0 series will continue to receive bug and security fixes for the forseeable future.
3. Virtool 5.0.0 will comprise multiple containerized services that need to run together. A deployment
and migration guide will be provided.

## Tests

In the source directory root:

1. Start the required backing services in Docker.
   ```
   docker compose -f tests/docker-compose.yml -p virtool-test up -d
   ```

2. Run the test suite:
   ```
   poetry run pytest
   ```

### Multiplexing

The test suite works with `pytest-xdist`.

```
poetry run pytest -n 4
```

This will use multiple Python processes to run the tests in parallel.

### Snapshots

We use [Syrupy](https://github.com/tophat/syrupy) for snapshot testing.

Snapshots are used for tests where we want to assert that an object (eg. database record, Pydantic object, API response)
has an expected shape and set of values.

If snapshots need to be updated:
```
poetry run pytest <path_to_test_file> --su
```

You can be even more specific by specifying the test class or function:
```
poetry run pytest <path_to_test_file>::<class_or_function>
```

**Always be specific about what snapshots you are updating**. Don't blindly update a ton of snapshot files just to make your tests pass.

## Commits

All commits must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0) specification.

These standardized commit messages are used to automatically publish releases using [`semantic-release`](https://semantic-release.gitbook.io/semantic-release)
after commits are merged to `main` from successful PRs.

**Example**

```text
feat: add API support for assigning labels to existing samples
```

Descriptive bodies and footers are required where necessary to describe the impact of the commit. Use bullets where appropriate.

Additional Requirements
1. **Write in the imperative**. For example, _"fix bug"_, not _"fixed bug"_ or _"fixes bug"_.
2. **Don't refer to issues or code reviews**. For example, don't write something like this: _"make style changes requested in review"_.
Instead, _"update styles to improve accessibility"_.
3. **Commits are not your personal journal**. For example, don't write something like this: _"got server running again"_
or _"oops. fixed my code smell"_.

From Tim Pope: [A Note About Git Commit Messages](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)


 PyElastica

[![Build_status][badge-travis]][link-travis] [![CI][badge-CI]][link-CI] [![Documentation Status][badge-docs-status]][link-docs-status] [![codecov][badge-codecov]][link-codecov] [![Downloads][badge-pepy-download-count]][link-pepy-download-count] [![DOI][badge-doi]][link-doi] [![Binder][badge-binder]][link-binder] [![Gitter][badge-gitter]][link-gitter]

PyElastica is the python implementation of **Elastica**: an *open-source* project for simulating assemblies of slender, one-dimensional structures using Cosserat Rod theory.

[![gallery][link-readme-gallary]][link-project-website]

Visit [www.cosseratrods.org][link-project-website] for more information and learn about Elastica and Cosserat rod theory.

## How to Start
[![PyPI version][badge-pypi]][link-pypi] [![Documentation Status][badge-docs-status]][link-docs-status]

PyElastica is compatible with Python 3.10 - 3.11.

~~~bash
$ pip install pyelastica
~~~

With this you get a minimal version with very little dependencies.

All options:
- `examples`: installs dependencies to run example cases,
found under the folder [`examples`](https://github.com/GazzolaLab/PyElastica/tree/master/examples).
- `docs`: packages to build documentation

Options can be combined e.g.
```bash
$ pip install "pyelastica[examples,docs]"
```

For plotting videos, ffmpeg has to be installed:
```bash
$ conda install -c conda-forge ffmpeg
```

Documentation of PyElastica is available [here][link-docs-website].

If you want to simulate magnetic Cosserat rods interacting with external magnetic environments you can install the derived package using

```bash
$ pip install magneto_pyelastica
```

Details can be found [here](https://github.com/armantekinalp/MagnetoPyElastica).

## Citation

We ask that any publications which use Elastica cite as following:

```
@software{arman_tekinalp_2024_10883271,
  author       = {Arman Tekinalp and
                  Seung Hyun Kim and
                  Yashraj Bhosale and
                  Tejaswin Parthasarathy and
                  Noel Naughton and
                  Ali Albazroun and
                  Rahul Joon and
                  Songyuan Cui and
                  Ilia Nasiriziba and
                  Maximilian Stölzle and
                  Chia-Hsien (Cathy) Shih and
                  Mattia Gazzola},
  title        = {GazzolaLab/PyElastica: v0.3.2},
  month        = mar,
  year         = 2024,
  publisher    = {Zenodo},
  version      = {v0.3.2},
  doi          = {10.5281/zenodo.10883271},
  url          = {https://doi.org/10.5281/zenodo.10883271}
}
```

References

- Gazzola, Dudte, McCormick, Mahadevan, Forward and inverse problems in the mechanics of soft filaments, Royal Society Open Science, 2018. doi: [10.1098/rsos.171628](https://doi.org/10.1098/rsos.171628)
- Zhang, Chan, Parthasarathy, Gazzola, Modeling and simulation of complex dynamic musculoskeletal architectures, Nature Communications, 2019. doi: [10.1038/s41467-019-12759-5](https://doi.org/10.1038/s41467-019-12759-5)

## List of publications and submissions
- [Soft, slender and active structures in fluids: embedding Cosserat rods in vortex methods](https://doi.org/10.48550/arXiv.2401.09506) (UIUC 2024)
- [Neural models and algorithms for sensorimotor control of an octopus arm](https://doi.org/10.48550/arXiv.2402.01074)(UIUC 2024)
- [On the mechanical origins of waving, coiling and skewing in Arabidopsis thaliana roots](https://www.pnas.org/doi/10.1073/pnas.2312761121) (Tel Aviv University, UIUC 2024) (PNAS)
- [Topology, dynamics, and control of an octopus-analog muscular hydrostat](https://arxiv.org/abs/2304.08413) (UIUC, 2023)
- [Hierarchical control and learning of a foraging CyberOctopus](https://onlinelibrary.wiley.com/doi/full/10.1002/aisy.202300088) (UIUC, 2023) (Advanced Intelligent Systems)
- [Energy-shaping control of a muscular octopus arm moving in three dimensions](https://royalsocietypublishing.org/doi/full/10.1098/rspa.2022.0593) (UIUC, 2023) (Proceedings of the Royal Society A 2023)
- [A sensory feedback control law for octopus arm movements](https://ieeexplore.ieee.org/abstract/document/9993021/) (UIUC, 2022) (IEEE CDC 2022)
- [Control-oriented modeling of bend propagation in an octopus arm](https://ieeexplore.ieee.org/abstract/document/9867689/) (UIUC, 2021) (IEEE ACC 2022)
- [A physics-informed, vision-based method to reconstruct all deformation modes in slender bodies](https://arxiv.org/abs/2109.08372) (UIUC, 2021) (IEEE ICRA 2022) [code](https://github.com/GazzolaLab/BR2-vision-based-smoothing)
- [Optimal control of a soft CyberOctopus arm](https://ieeexplore.ieee.org/document/9483284) (UIUC, 2021) (IEEE ACC 2021)
- [Elastica: A compliant mechanics environment for soft robotic control](https://ieeexplore.ieee.org/document/9369003) (UIUC, 2021) (IEEE RA-L 2021)
- [Controlling a CyberOctopus soft arm with muscle-like actuation](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9683318) (UIUC, 2020) (IEEE CDC 2021)
- [Energy shaping control of a CyberOctopus soft arm](https://ieeexplore.ieee.org/document/9304408) (UIUC, 2020) (IEEE CDC 2020)

## Tutorials
[![Binder][badge-binder-tutorial]][link-binder]

We have created several Jupyter notebooks and Python scripts to help users get started with PyElastica. The Jupyter notebooks are available on Binder, allowing you to try out some of the tutorials without having to install PyElastica.

We have also included an example script for visualizing PyElastica simulations using POVray. This script is located in the examples folder ([`examples/Visualization`](examples/Visualization)).

## Contribution

If you would like to participate, please read our [contribution guideline](CONTRIBUTING.md)

PyElastica is developed by the [Gazzola Lab][link-lab-website] at the University of Illinois Urbana-Champaign.

## Senior Developers ✨
_Names arranged alphabetically_
- Ali Albazroun
- Arman Tekinalp
- Chia-Hsien Shih (Cathy)
- Fan Kiat Chan
- Ilia Nasiriziba
- Noel Naughton
- [Seung Hyun Kim](https://github.com/skim0119)
- Songyuan Cui
- Tejaswin Parthasarathy (Teja)
- Xiaotian Zhang
- [Yashraj Bhosale](https://github.com/bhosale2)

[//]: # (Collection of URLs.)

[link-readme-gallary]: https://github.com/skim0119/PyElastica/blob/assets_logo/assets/alpha_gallery.gif

[link-project-website]: https://cosseratrods.org
[link-lab-website]: http://mattia-lab.com/
[link-docs-website]: https://docs.cosseratrods.org/

[badge-pypi]: https://badge.fury.io/py/pyelastica.svg
[badge-travis]: https://travis-ci.com/GazzolaLab/PyElastica.svg?branch=master
[badge-CI]: https://github.com/GazzolaLab/PyElastica/workflows/CI/badge.svg
[badge-docs-status]: https://readthedocs.org/projects/pyelastica/badge/?version=latest
[badge-binder]: https://mybinder.org/badge_logo.svg
[badge-pepy-download-count]: https://pepy.tech/badge/pyelastica
[badge-codecov]: https://codecov.io/gh/GazzolaLab/PyElastica/branch/master/graph/badge.svg
[badge-gitter]: https://badges.gitter.im/PyElastica/community.svg
[badge-doi]: https://zenodo.org/badge/254172891.svg
[link-pypi]: https://badge.fury.io/py/pyelastica
[link-travis]: https://travis-ci.com/github/GazzolaLab/PyElastica
[link-CI]: https://github.com/GazzolaLab/PyElastica/actions
[link-docs-status]: https://docs.cosseratrods.org/en/latest/?badge=latest
[link-pepy-download-count]: https://pepy.tech/project/pyelastica
[link-codecov]: https://codecov.io/gh/GazzolaLab/PyElastica

[badge-binder-tutorial]: https://img.shields.io/badge/Launch-PyElastica%20Tutorials-579ACA.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1Xid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k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC
[link-binder]: https://mybinder.org/v2/gh/GazzolaLab/PyElastica/master?filepath=examples%2FBinder%2F0_PyElastica_Tutorials_Overview.ipynb
[link-gitter]: https://gitter.im/PyElastica/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[link-doi]: https://zenodo.org/badge/latestdoi/254172891


=============================================
ISOFIT - Imaging Spectrometer Optimal FITting
=============================================

Welcome to ISOFIT 3x.  This is a major update to the ISOFIT codebase, and is not backwards compatible with ISOFIT 2x.
To view the previous version of ISOFIT, please see `dev_2x <https://github.com/isofit/isofit/tree/dev_2x>`__. Updates
and performance enhancements are still underway, but testing and feedback are encouraged! A list of new 3x features is
compiled below.

ISOFIT contains a set of routines and utilities for fitting surface, atmosphere and instrument models to imaging
spectrometer data. It is written primarily in Python, with JSON format configuration files and some dependencies on
widely-available numerical and scientific libraries such as scipy, numpy, and scikit-learn. It is designed for maximum
flexibility, so that users can swap in and evaluate model components based on different radiative transfer models (RTMs)
and various statistical descriptions of surface, instrument, and atmosphere. It can run on individual radiance spectra
in text format, or imaging spectrometer data cubes.

* Please check the documentation_ for installation and usage instructions and in depth information.

* There are three main branches:

 * `main <https://github.com/isofit/isofit/tree/main>`__ (in-line with the current release)
 * `dev <https://github.com/isofit/isofit/tree/dev>`__ (for activate development of ISOFIT 3x)
 * `dev_2x <https://github.com/isofit/isofit/tree/dev_2x>`__ (archived version of ISOFIT 2x)

* Information on how to **cite the ISOFIT Python package** can be found in the
  `CITATION <https://github.com/isofit/isofit/blob/dev/CITATION.cff>`__ file.

License
-------
Free software: Apache License v2

All images contained in any (sub-)directory of this repository are licensed under the CC0 license which can be found
`here <https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt>`__.

Major ISOFIT 3x features
------------------------

* new handling of look-up-tables (LUTs), including the option to provide custom prebuilt LUTs
* centralized radiative transfer physics for more flexible development and experimentation
* test coverage for major functionality
* click command line utilities, including download of external data and example files
* a more flexible isofit.ini file used to discover various paths such as tests, data, and examples
* instructions for dev environment setup and a collection of setup scripts
* numpy implementation of the sRTMnet emulator (removes tensorflow dependency)

Basic features
--------------

* utilities for fitting surface, atmosphere and instrument models to imaging spectrometer data
* a selection of radiative transfer models (RTMs) incl. MODTRAN and 6S
* sRTMnet emulator for MODTRAN 6 by coupling a neural network with a surrogate RTM (6S v2.1)
* various statistical descriptions of surface, instrument, and atmosphere
* application to both individual radiance spectra and imaging spectrometer data cubes
* custom instrument models to handle new sensors
* observation uncertainties to account for model discrepancy errors
* prior distribution based on background knowledge of the state vector

Status
------

|badge1| |badge2| |badge3| |badge4| |badge5| |badge6| |badge7| |badge8|

.. |badge1| image:: https://img.shields.io/static/v1?label=Documentation&message=readthedocs&color=blue
    :target: https://isofit.readthedocs.io/en/latest/index.html

.. |badge2| image:: https://readthedocs.org/projects/pip/badge/?version=stable
    :target: https://pip.pypa.io/en/stable/?badge=stable

.. |badge3| image:: https://img.shields.io/pypi/v/isofit.svg
    :target: https://pypi.python.org/pypi/isofit

.. |badge4| image:: https://img.shields.io/conda/vn/conda-forge/isofit.svg
    :target: https://anaconda.org/conda-forge/isofit

.. |badge5| image:: https://img.shields.io/pypi/l/isofit.svg
    :target: https://github.com/isofit/isofit/blob/master/LICENSE

.. |badge6| image:: https://img.shields.io/pypi/pyversions/isofit.svg
    :target: https://img.shields.io/pypi/pyversions/isofit.svg

.. |badge7| image:: https://img.shields.io/pypi/dm/isofit.svg
    :target: https://pypi.python.org/pypi/isofit

.. |badge8| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.6908949.svg
   :target: https://doi.org/10.5281/zenodo.6908949

.. _documentation: https://isofit.readthedocs.io/en/latest/index.html


## Introduction

`fastapi-pagination` is a Python library designed to simplify pagination in FastAPI applications.
It provides a set of utility functions and data models to help you paginate your database queries
and return paginated responses to your clients.

With `fastapi-pagination`, you can easily define pagination parameters in your FastAPI endpoint functions,
and use them to generate paginated responses that include the requested subset of your data.
The library supports a variety of pagination strategies, including cursor-based pagination and page-based pagination.

`fastapi-pagination` is built on top of the popular `fastapi` library, and it works with a wide range
of SQL and NoSQL databases frameworks. It also supports async/await syntax and is compatible with Python 3.8 and higher.

Features:
* Simplifies pagination in FastAPI applications.
* Supports a variety of pagination strategies, including cursor-based pagination and page-based pagination
* Works with a wide range of SQL and NoSQL databases frameworks, including `SQLAlchemy`, `Tortoise ORM`, and `PyMongo`.
* Supports async/await syntax.
* Compatible with Python 3.8 and higher.

----

For more information on how to use fastapi-pagination, please refer to the
[official documentation](https://uriyyo-fastapi-pagination.netlify.app/).

---

## Installation

```bash
pip install fastapi-pagination
```

## Quickstart

All you need to do is to use `Page` class as a return type for your endpoint and call `paginate` function
on data you want to paginate.

```py
from fastapi import FastAPI
from pydantic import BaseModel, Field

# import all you need from fastapi-pagination
from fastapi_pagination import Page, add_pagination, paginate

app = FastAPI()  # create FastAPI app

class UserOut(BaseModel):  # define your model
    name: str = Field(..., example="Steve")
    surname: str = Field(..., example="Rogers")

users = [  # create some data
    # ...
]

@app.get('/users')
async def get_users() -> Page[UserOut]:  # use Page[UserOut] as return type annotation
    return paginate(users)  # use paginate function to paginate your data

add_pagination(app)  # important! add pagination to your app
```

Please, be careful when you work with databases, because default `paginate` will require to load all data in memory.

For instance, if you use `SQLAlchemy` you can use `paginate` from `fastapi_pagination.ext.sqlalchemy` module.

```py
from sqlalchemy import select
from fastapi_pagination.ext.sqlalchemy import paginate

@app.get('/users')
def get_users(db: Session = Depends(get_db)) -> Page[UserOut]:
    return paginate(db, select(User).order_by(User.created_at))
```

---

Code from `Quickstart` will generate OpenAPI schema as bellow:


# django-bootstrap 4

[![CI](https://github.com/zostera/django-bootstrap4/workflows/CI/badge.svg?branch=main)](https://github.com/zostera/django-bootstrap4/actions?workflow=CI)
[![Coverage Status](https://coveralls.io/repos/github/zostera/django-bootstrap4/badge.svg?branch=main)](https://coveralls.io/github/zostera/django-bootstrap4?branch=main)
[![Latest PyPI version](https://img.shields.io/pypi/v/django-bootstrap4.svg)](https://pypi.python.org/pypi/django-bootstrap4)

Bootstrap 4 for Django.

## Goal

The goal of this project is to seamlessly blend Django and Bootstrap 4.

## Requirements

This package requires a combination of Python and Django that is currently supported.

See "Supported Versions" on https://www.djangoproject.com/download/.

## Documentation

The full documentation is at https://django-bootstrap4.readthedocs.io/

## Installation

1. Install using pip:

```bash
pip install django-bootstrap4
```

   Alternatively, you can install download or clone this repo and call ``pip install -e .``.

2. Add to `INSTALLED_APPS` in your `settings.py`:

```python
INSTALLED_APPS = (
  # ...
  "bootstrap4",
  # ...
)
```

3. In your templates, load the `bootstrap4` library and use the `bootstrap_*` tags. See example below.

## Example template

```jinja
{% load bootstrap4 %}

{# Display a form #}

<form action="/url/to/submit/" method="post" class="form">
    {% csrf_token %}
    {% bootstrap_form form %}
    {% buttons %}
        <button type="submit" class="btn btn-primary">Submit</button>
    {% endbuttons %}
</form>
```

## Example

An example application app is provided in `example`. You can run it with `make example`.

## Bugs and suggestions

If you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.

https://github.com/zostera/django-bootstrap4/issues

## License

You can use this under BSD-3-Clause. See [LICENSE](LICENSE) file for details.

## Author

Developed and maintained by [Zostera](https://zostera.nl).

Original author: [Dylan Verheul](https://github.com/dyve).

Thanks to everybody that has contributed pull requests, ideas, issues, comments and kind words.

Please see [AUTHORS](AUTHORS) for a list of contributors.


# Chaquopy: the Python SDK for Android

Chaquopy provides everything you need to include Python components in an Android app,
including:

* Full integration with Android Studio's standard Gradle build system.
* Simple APIs for calling Python code from Java/Kotlin, and vice versa.
* A wide range of third-party Python packages, including SciPy, OpenCV, TensorFlow and many
  more.

To get started, see the [documentation](https://chaquo.com/chaquopy/doc/current/).

## Repository layout

This repository contains the following components:

* `product/gradle-plugin` contains the Chaquopy Gradle plugin.
* `product/runtime` contains the Chaquopy runtime libraries.
* `target` contains build scripts for Python and its supporting libraries.
* `server/pypi` contains build scripts for third-party Python packages.

## Build

For build instructions, see the README files in each subdirectory. All build outputs
are stored in the `maven` directory.

To use this repository to build an app, edit the `repositories` block in your
`settings.gradle` or `build.gradle` file to [declare your
repository](https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:declaring_multiple_repositories)
before `mavenCentral`. Either an HTTP URL or a local path can be used.


# Compiler Explorer Infrastructure

A whole bag of scripts and AWS config to run [Compiler Explorer](https://gcc.godbolt.org).

Of most use to the casual observer is probably the code in `bin/ce_install` - a tool to install the
Compiler Explorer compilers to `/opt/compiler-explorer`. In particular, the open source compilers can be
installed by anyone by running:

```bash
$ make ce  # this installs python modules etc
$ ./bin/ce_install install compilers
```

This will grab all the open source compilers and put them in `/opt/compiler-explorer` (which must be writable by
the current user).  To get the beta and nightly-built latest compilers, add the parameter `--enable nightly` to the command.

To list installation candidates, use `./bin/ce_install list`. A single installation can be installed by name.

More info can be found [here](https://github.com/compiler-explorer/infra/blob/main/docs/installing_compilers.md)

# Built compilers

Status page to our daily built compilers https://compiler-explorer.github.io/compiler-workflows/build-status