semvec/pypi-packages huggingface dataset:
scottbrian-locking 2.1.1
Exclusive and shared locking
Requires Python: ~=3.12
Keywords: lock, blocking

==================
scottbrian-locking
==================

Intro
=====

The SELock is a shared/exclusive lock that you can use to coordinate
read and write access to a resource in a multithreaded application.

:Example: use SELock to coordinate access to a resource

>>> from scottbrian_locking import se_lock as sel
>>> a_lock = sel.SELock()
>>> # Get lock in exclusive mode
>>> with sel.SELockExcl(a_lock):
...     msg = 'lock obtained exclusive'
>>> print(msg)
lock obtained exclusive

>>> # Get lock in shared mode
>>> with sel.SELockShare(a_lock):
...     msg = 'lock obtained shared'
>>> print(msg)
lock obtained shared


.. image:: https://img.shields.io/badge/security-bandit-yellow.svg
    :target: https://github.com/PyCQA/bandit
    :alt: Security Status

.. image:: https://readthedocs.org/projects/pip/badge/?version=stable
    :target: https://pip.pypa.io/en/stable/?badge=stable
    :alt: Documentation Status


Installation
============

Windows:

``pip install scottbrian-locking``


Development setup
=================

See tox.ini

Release History
===============

* 1.0.0
    * Initial release

* 1.1.0
    * Add RELockObtain context manager
    * support python 3.11

* 2.0.0
    * Add obtain_tf to context manager
    * Add allow_recursive_obtain
    * Delete setup.cfg
    * Make consistent log and error messages
    * Support python 3.12
    * Drop support for python < 3.12

* 2.0.1
    * Fix documentation
        * change docs/source/index.rst
        * change docs/requirements.txt
        * change readthedoc.yml

* 2.0.2
    * Fix verify_lock to refresh lock_info
    * Fix thread name in release granted log message

* 2.1.0
    * Support python 3.13

* 2.1.1
    * Support tox parallel


Meta
====

Scott Tuttle

Distributed under the MIT license. See ``LICENSE`` for more information.


Contributing
============

1. Fork it (<https://github.com/yourname/yourproject/fork>)
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request
pinn-kit 0.1.5
A toolkit for Physics-Informed Neural Networks
Requires Python: >=3.9

# PINN-kit

A toolkit for Physics-Informed Neural Networks (PINNs). This package provides tools and utilities for implementing and training physics-informed neural networks for solving differential equations.

## Features

- Easy-to-use interface for defining physics-informed neural networks
- Support for various types of differential equations
- Flexible domain handling utilities for arbitrary input variables
- Advanced meshgrid functionality for multi-dimensional problems
- Training and evaluation tools

## Installation

PINN-kit supports macOS, Linux, and Windows. You can install it using pip, which will also automatically install all required dependencies, including torch.

### Create a Virtual Environment (Recommended)

It is recommended to use a virtual environment with Python 3.12 to avoid dependency conflicts.

#### macOS & Linux

```bash
python3.12 -m venv venv
source venv/bin/activate
```

#### Windows

Open Command Prompt or PowerShell and run:

```bash
python3.12 -m venv venv
venv\Scripts\activate
```

### Install PINN-kit

#### macOS & Linux

```bash
pip install pinn-kit
```

#### Windows

Open Command Prompt or PowerShell and run:

```bash
pip install pinn-kit
```

> **Note:** There is no need to install torch separately; it will be installed automatically with pinn-kit.

## PINN-kit is easy to use

```python
from pinn_kit import PINN, Domain, convert_to_meshgrid
import numpy as np

# Create a domain with flexible variable definition
domain = Domain([
    ('x', -1, 1),  # x-coordinate bounds
    ('y', -1, 1),  # y-coordinate bounds
    ('t', 0, 1)    # time bounds
])

# Sample points using various strategies
x_arr, y_arr, t_arr = domain.sample_points(
    num_samples=1000,
    sampler="lhs_classic"  # Latin Hypercube Sampling
)

# Create meshgrid from 1D arrays (new flexible interface)
x_1d = np.linspace(-1, 1, 50)
y_1d = np.linspace(-1, 1, 50)
t_1d = np.linspace(0, 1, 10)
xx, yy, tt = convert_to_meshgrid([x_1d, y_1d, t_1d])

# Initialize a PINN
pinn = PINN([3, 20, 20, 1])  # 3 inputs, 2 hidden layers, 1 output

# Define the loss terms
def loss():
    return loss_function

# Train the network
pinn.train_model([x_arr, y_arr, t_arr], loss_list, num_epochs=1000)
```

## Documentation

For detailed documentation, please visit [our documentation page](https://github.com/shivani/PINN-kit).

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
django-l10n-extensions-updated 1.0.10
Extend Django with L10N features

# Django L10N extensions
Django L10N extensions adds some useful L10N extensions to the Django framework. This version has been updated for Django 3 and 4 compatibility.

The project is maintained on [gitHub](https://github.com/iamjonmiller/django-l10n-extensions) derived from the out of date [original package](https://github.com/ceasaro/django-l10n-extensions).

[Read the docs](http://django-l10n-extensions.readthedocs.io)
xkcd-parser 0.0.6a0
A library/cli tool to parse all comics' json from xkcd.com
Requires Python: >=3.8

# XKCD Parser
A library/cli tool to parse all comics' json from [xkcd.com](https://xkcd.com)

## Download dump
https://aqendo.github.io/xkcd-parser/parsed.json
## Automatic deployment
You can generate JSON dump by yourself and you can download `parsed.json` file from `gh_pages` repo or directly from [Github Pages Link]
(https://aqendo.github.io/xkcd-parser/parsed.json). This repository has CI/CD configured to automatically update that file periodically.
## CLI Tool Usage
```
usage: xkcd_parser [-h] json_file

A library/cli tool to parse all comics' json from xkcd.com

positional arguments:
  json_file   The JSON file of already scraped comics' info. If exists, will be updated with new comics (if any)

options:
  -h, --help  show this help message and exit

Try not to overload xkcd.com servers by overusing this script. Please!
```
## Using it as a library
```python
import xkcd_parser

# if `is_cli` is set to True, then it will print if it didn't find any new comics
xkcd_parser.update_xkcd_comics_info("path/to/file/comics.json", is_cli=False)
```
## License
```
XKCD Parser - A library/cli tool to parse all comics' json from xkcd.com
MIT License

Copyright (c) 2025 Sergey Sitnikov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```