semvec/pypi-packages huggingface dataset:
syjson 2.1.6
A library for manage jsons files as dicts
Requires Python: >=3.6

# SyJson - Sync variables to a json file in a simple way

### What this library do?

This library make simple create a json file and read/write directly from this. This can be very useful and easy to use when we need to create small files such as a settings file, avoiding to write and read this manualy.

### How to Install

You can install this library using PyPi (pip)

###### Linux / Windows / MacOs

```bash
pip3 install syjson
```

### How to use

At first you can import SyJson class writing:

```python
from syjson import SyJson
```

now we can use this class for create/read a json file
pretty:int=None, bson:bool=False, cache:bool = True
```python
synced_json = SyJson(
    "file.json",           #Path of the json file
    create_file = True,    #If the file does not exists,
                           #this will automatically create that file
    pretty = None,         #If setted to a number, the file will have an
                           #indentation of 'pretty' spaces
    cache = True,          #The file is readed only the first time with this option set to
                           #True, if your file have to be modified during the execution set this to false
                           #(Useful for debugging)
    encoding = "utf-8"     #JSON file encoding
)
```

This library use orjson for load and dump json files

---

There are some particular function added for particular use

#### --> synced_json.var()

With var function we can read from file the informations and we get a normal python object, so this python object have to be synced in a next step

#### --> synced_json.sync( value )

With sync function you can assign a variable and sync these informations in the target file

All SyJson object have these functionalityes

---

In Synced dicts there is an additional function that can be usefull in a lot of situation

#### --> synced_json.create( key, default_value )

This function create a pair of key and value if that key is not used in the json file and return the synced object, instead this function will simply return the synced object without overriding existing values.

---

Can bypass the use of sync function when you assign a value to a synced array of a synced dict in the json

```python
f = SyJson("/path/to/file.json")

f["dict"] = {"num":0}
f["list"] = [1]

#Some operation that you can do without using sync function
f["dict"]["num"] = 1
f["dict"].keys()
f["dict"].values()
f["dict"].items()

f["list"][0] = 0
f["list"].append(1)
f["list"].pop()
f["list"].index(0)
```

---

### By DomySh - <a href="mailto::me@domysh.com">me@domysh.com</a>

### --> <a href="https://domysh.com">https://domysh.com</a> <--

---
it-drf-utils 0.2.3
Django-API-Utils是基于Django编写后端API的一些组件和工具，致力于努力探究 Django 最佳实践。
Requires Python: >=3.2

# 项目说明

Django-API-Utils是基于Django编写后端API的一些组件和工具，致力于努力探究 Django 最佳实践。

目前基于 [ITM-0011](https://github.com/ITStudioOUC/ITM/blob/main/documents/ITM-0011.txt) 中的规范编写，仍待完善和在实践中优化。

# 环境依赖

目前已在 Django 3 下测试可以成功运行。

环境要求：

`Django >= 3.2`, `djangorestframework >= 3.12` , `djangorestframework-simplejwt >= 5.0.0`
（如果不使用认证组件，将auth.py删除即可，不必安装此模块）

# 初始化项目

1. 下载本项目源码，将utils文件夹拖到项目根目录下

   下载本项目源码可以使用git工具、直接在Github上Download ZIP、或者下载发布的release包。

2. 新建`apps`目录，将项目内的app放入apps文件夹内。

3. 在`settings.py`文件内，新增apps目录到`BASE_DIR`

   ```python
   ...
   BASE_DIR = Path(__file__).resolve().parent.parent
   # 新增下面这一行
   sys.path.insert(0, os.path.join(BASE_DIR, 'apps'))
   ...
   ```

4. 在根路由文件`urls.py`下初始化`Router Build`

   ```python
   from utils.router_builder import RouterBuilder
   router = RouterBuilder()
   urlpatterns = [
       path("api/", include(router.urls)),
       path("api/", include(router.url_patterns)),
   ]
   ```

5. （非必需）在项目根目录下新建`config.json`文件，将项目的一些配置信息和敏感信息写到json文件中，并在`settings.py`中读取

   ```python
   import json
   
   # Configuration File
   with open('./conf.json', 'r') as f:
       config = json.load(f)
   
   SECRET_KEY = config.get('SECRET_KEY','')
   
   MYSQL_DB_NAME = config.get('MYSQL_DB_NAME','')
   MYSQL_DB_USER = config.get('MYSQL_DB_USER','')
   MYSQL_DB_PASSWORD = config.get('MYSQL_DB_PASSWORD','')
   ```

   *这样的好处在于，避免将敏感信息暴露到Git服务器上。*

初始化完后，项目的目录树大概是这样的：

```
.
├── apps
│   ├── __init__.py
│   └── <app_name>
│       ├── __init__.py
│       ├── admin.py
│       ├── apps.py
│       ├── migrations
│       │   └── __init__.py
│       ├── models.py
│       ├── serializers.py
│       ├── tests.py
│       └── views.py
├── <project_name>
│   ├── __init__.py
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── .gitignore
├── manage.py
└── config.json[可选]
```

# 使用教程

更多详细信息请参考[在线文档](https://itstudioouc.github.io/Django-API-Utils/)
pyapes 0.2.13
Python Awesome Partial differential Equation Solver
Requires Python: >=3.10,<3.12


# pyapes: PYthon Awesome Partial differential Equation Solver (general purpose finite difference PDE solver)

![python](http://ForTheBadge.com/images/badges/made-with-python.svg)

## Description

`pyapes` is designed to solve various engineering problems in rectangular grid.

The goal of `pyapes` (should be/have) is

- Cross-platform
  - Both tested on Mac and Linux (Arch)
  - Windows support is under testing
- GPU acceleration in a structured grid with [PyTorch](https://pytorch.org)
  - Use of `torch.Tensor`. User can choose either `torch.device("cpu")` or `torch.device("cuda")`.
- Generically expressed (OpenFOAM-like, human-readable formulation)

## Installation

We recommend to use `poetry` to manage/install all dependencies.

- From `git`

  ```bash
  git clone git@gitlab.ethz.ch:kchung/pyapes.git
  cd pyapes
  poetry install
  ```

- From `pypi`

  ```bash
  python3 -m pip install pyapes
  # or
  poetry add pyapes
  ```

## Dependencies

- Core dependency
  - `python >= 3.10`
    - As of 19.02.2023, `torch` does not support 3.11 properly (for the official release). Therefore, stick to `python3.10`.
  - `torch >= 1.10.0`
- Dependencies from my personal projects
  - `pymyplot` (plotting tools)
  - `pymytools` (misc. tools including data I/O, logging, etc.)

## Implemented Features

- CPU/GPU(CUDA) computation using `torch`
- (OpenFOAM like) generically expressed solver

  ```python
    >>> solver.set_eq(fdm.laplacian(1.0, var) == rhs)
    >>> solver.solve()
  ```

- FDM Discretizations
  - Spatial: `Grad`, `Laplacian`, `Div`
    - Supports flux limiter `upwind` for the `Div` operator
  - Temporal: `Ddt`
- Boundary conditions:
  - Supports `Dirichlet`, `Neumann`, `Periodic`, and `Symmetry`
- Demo cases in `jupter` notebooks

## Examples

Check our [demos files](demos/)

## Todos

- Boundary conditions
  - [ ] Inflow/Outflow
- Need different derivative order at the cell face
  - Additional features
    - [ ] High order time discretization
    - [ ] Immersed body BC
    - [ ] Higher order flux limiters (`quick`)
- Testing and validation
  - [ ] `Ddt` class (implementation is tested but haven't validated with practical test cases)
- Working on demo files
  - [x] The Poisson equation
  - [x] The advection-diffusion equation
  - [ ] The Burgers' equation
  - [ ] The Navier-Stokes equation at low Reynolds numbers
  - [ ] The Black-Scholes equation