semvec/pypi-packages huggingface dataset:
xitorch 0.5.1
Differentiable scientific computing library
License: MIT
Requires Python: >=3.8.1,<3.12
Keywords: project,library,linear-algebra,autograd,functionals

# `xitorch`: differentiable scientific computing library

![Build](https://img.shields.io/github/workflow/status/xitorch/xitorch/CI)
[![Docs](https://img.shields.io/readthedocs/xitorch)](https://xitorch.readthedocs.io/)
[![Code coverage](https://img.shields.io/codecov/c/github/xitorch/xitorch)](https://codecov.io/gh/xitorch/xitorch)

`xitorch` is a PyTorch-based library of differentiable functions and functionals that
can be widely used in scientific computing applications as well as deep learning.

The documentation can be found at: https://xitorch.readthedocs.io/

## Example

Finding root of a function:

```python
import torch
from xitorch.optimize import rootfinder

def func1(y, A):  # example function
    return torch.tanh(A @ y + 0.1) + y / 2.0

# set up the parameters and the initial guess
A = torch.tensor([[1.1, 0.4], [0.3, 0.8]]).requires_grad_()
y0 = torch.zeros((2, 1))  # zeros as the initial guess

# finding a root
yroot = rootfinder(func1, y0, params=(A,))

# calculate the derivatives
dydA, = torch.autograd.grad(yroot.sum(), (A,), create_graph=True)
grad2A, = torch.autograd.grad(dydA.sum(), (A,), create_graph=True)
```

## Modules

* [`linalg`](xitorch/linalg/): Linear algebra and sparse linear algebra module
* [`optimize`](xitorch/optimize/): Optimization and root finder module
* [`integrate`](xitorch/integrate/): Quadrature and integration module
* [`interpolate`](xitorch/interpolate/): Interpolation

## Requirements

* python >=3.8.1,<3.12
* pytorch 1.13.1 or higher (install [here](https://pytorch.org/))

## Getting started

After fulfilling all the requirements, type the commands below to install `xitorch`

    python -m pip install xitorch

Or to install from GitHub:

    python -m pip install git+https://github.com/xitorch/xitorch.git

Finally, if you want to make an editable install from source:

    git clone https://github.com/xitorch/xitorch.git
    cd xitorch
    python -m pip install -e .

Note that the last option is only available per [PEP 660](https://peps.python.org/pep-0660/), so you will require [pip >= 23.1](https://pip.pypa.io/en/stable/news/#v21-3)
    
## Used in

* Differentiable Quantum Chemistry (DQC): https://dqc.readthedocs.io/

## Gallery

Neural mirror design ([example 01](examples/01-mirror-design/)):

![neural mirror design](examples/01-mirror-design/images/mirror.gif)

Initial velocity optimization in molecular dynamics ([example 02](examples/02-molecular-dynamics/)):

![molecular dynamics](examples/02-molecular-dynamics/images/md.gif)
lunation 0.0.3
python package for lunar information
License: MIT

# lunation
lunation is a python library for lunar and solar information

<br>
<h1>Lunar Usage:</h1>:
<br>

```python

    
    from lunation.main import myMoon
    # create instance of myMoon
    moon = myMoon()
    
    # functions
    phase = moon.get_lunar_phase() # returns lunar phase
    age = moon.get_lunar_age() # returns lunar age
    percent = moon.get_lunar_age_percent() # returns percent of lunar age
```
The library can also be used to calculate distance from the sun
<br>
<h1> Solar Usage: </h1>

```python

    
    from lunation.sun import Sun
    # instance of Sun
    sun = Sun()
    distance = sun.solardistance() # returns solar distance in astronomical units
```
adjsoned 0.0.4
Loads required properties/config from a json file to a Python runtime object
License: MIT

# Adjsoned
This Python library can help you easily load your program's configuration/properties
from a json file to a Python runtime object making key-value data accessible via
python's "." syntax—as these key-value pairs were fields of this object.

### Installation
```
pip install adjsoned
```

### Get started
Instantiate a FileJsonProperties object giving it your config file's path and it will just work:

```Python
from adjsoned import FileJsonProperties


properties = FileJsonProperties(filepath="examples/some_properties.json")

# We can now access key-value/arrays data stored in our JSON file the following way:
# (NB: the ROOT element of your JSON file MUST be a DICT!)

if properties.debug_mode:
    print("We're in debug mode!")
    print("P.S. Properties told me that :)")

# 'properties' is an instance of FileJsonProperties (as well as JsonProperties — a parent class)
# 'properties.app_version' is also a JsonProperties instance, so we can access its fields like that:
print(properties.app_version.code)  # prints '4.1.2'

# arrays are interpreted as regular Python lists, you can just normally iterate through them:
for section in properties.project_settings.ignored_sections:
    print("Ignoring section", section)

# if an array element is a dictionary, it gets interpreted as a JsonProperties object as well:
print(properties.messages[1].title)  # prints: 'Hello again.'
```

The JSON file used in this example:
```json
{
  "debugMode": true,

  "appVersion": {
    "code": "4.1.2",
    "build": 2
  },

  "projectSettings": {
    "frameRate": 60,
    "ignoredSections": [2, 6, 9]
  },

  "messages": [
    {
      "title": "Hello!",
      "description": "This is the first message."
    },
    {
      "title": "Hello again.",
      "description": "This is the second one. Nice to see you again!"
    }
  ]
}
```
schema-transpose 0.1.0
A python library
License: MIT

# Schema Transpose

This library and CLI converts JSON Schema Documents into other languages. It can work with JSON Schema or Pydantic files as a source.


## Usage

This needs to be installed in the same virtual environment as the Models that it is converting. Once installed a CLI tool, `schema_transpose`, will be available in the environment.

For example, to generate a variables file for the RDS ParameterValidation class-

```shell
robert@Roberts-MacBook-Pro terraform-aws-core % schema_transpose modules.rds.validation.parameters:ParameterValidation
```

The command will output the following to stdout:

```hcl
variable "type" {
  type = string
  default = null
}

variable "pit_identifier" {
  type = string
  default = null
}

variable "tags" {
  type = map(any)
  default = {}
}

variable "name" {
  type = string
  validation {
    # Automatically Generated from Rule: minlength
    condition     = length(var.name) >= 1
    error_message = "Field should not be less than 1 characters"
  }
  validation {
    # Automatically Generated from Rule: maxlength
    condition     = length(var.name) <= 63
    error_message = "Field should not be larger than 63 characters"
  }
  validation {
    # Automatically Generated from Rule: pattern
    condition     = length(regexall("^(?!.*--)[a-zA-Z][A-Za-z0-9.-]+(?<!-)$", var.name)) > 0
    error_message = "Field does not match regex pattern ^(?!.*--)[a-zA-Z][A-Za-z0-9.-]+(?<!-)$"
  }
}

variable "vpc_name" {
  type = string
}

variable "engine" {
  type = string
  validation {
    # Automatically Generated from Rule: minlength
    condition     = length(var.engine) >= 1
    error_message = "Field should not be less than 1 characters"
  }
}

variable "engine_version" {
  type = string
  validation {
    # Automatically Generated from Rule: minlength
    condition     = length(var.engine_version) >= 1
    error_message = "Field should not be less than 1 characters"
  }
}

variable "is_public" {
  type = bool
  default = false
}
```