semvec/pypi-packages huggingface dataset:
pypinn 1.0.1
pinn implementation using torch.
License: MIT
Keywords: python,pinn,pypinn,windows,mac,linux


## 1 Introduction
Physical Information Neural Network implemented using pytorch, Mainly to facilitate the solution of ordinary differential equations.

## 2 External dependencies for pypinn
torch, numpy, and tqdm.

## 3 Usage

### 3.1 step 1 
Define a class that inherits from `pypinn.Pinn`, such as `Net`. Write the equation to be solved in the `get_f` function of `Net`. Here is an example:
```python
import pypinn
import torch
import torch.nn as nn

class Net(pypinn.Pinn):
    def __init__(self, input_size: int, hidden_sizes: list, output_size: int, seed=0):
        super().__init__(input_size, hidden_sizes, output_size, seed)

    def get_f(self,x):
        y, dy = self.get_y_and_dy(x)
        f1 = dy[0]-y[1]
        f2 = dy[1]-(-y[1]-(2+torch.sin(x))*y[0])
        f3 = self.forward(torch.tensor([[0.0]])) - torch.tensor([[0,1]])
        return f1,f2,f3
```
The above example is used to solve a system of equations:
$$
\begin{cases}
    \frac{\mathrm{d}y_1}{\mathrm{d}x} = y_2,\\
    \frac{\mathrm{d}y_2}{\mathrm{d}x} = -y_2-(2+\sin x)y_1,\\
    y_1(0)=0,y_2(0)=1.
\end{cases}
$$

Tips: ` dy[0], dy[1] ` represent $\frac{dy_1}{dx}, \frac{dy_2}{dx}$, ` y[0], y[1]` represent $y_1, y_2$. The number of equations can theoretically be arbitrarily large.

### 3.2 step 2
Instantiate the class we defined, for example, set the number of input neurons to 1, the hidden layer to 20*20, and the number of output neurons to 2: `mdl = Net(1,[20,20],2)`.

### 3.3 step 3
Configure the training data, loss function, optimizer, learning rate, number of iterations, and then use `mdl.train(**settings)` to train.
```python
settings={
    'x': torch.linspace(0,6,301,requires_grad=True).view(-1,1),
    'loss_fn': nn.MSELoss(),
    'optimizer': torch.optim.Adam,
    'lr': 1e-3,
    'epochs': 5000
}
mdl.train(**settings)
```

### 3.4 step 4
After the model is trained, it can be visualized. Here is a simple example:
```python
import matplotlib.pyplot as plt
t = torch.linspace(0,6,500).view(-1,1)
plt.plot(t,mdl.predict(t))
plt.show()
```



## Update log
`1.0.1` More detailed instructions have been added
`1.0.0` first updata
ultralight 2.2.0
Ultra Light Fast Generic Face Detector 👨‍👩‍👧‍👦🖼
License: MIT
Keywords: face detection ai ultra light

# Ultra Light

Ultra Light Fast Generic Face Detector 👨‍👩‍👧‍👦🖼

![sample](samples/sample_detected.jpg)

Very fast and quality face detector. Can use CPU, GPU and MPS (Apple M1 ML) providers.
Work via ONNX model


## Installation

```bash
pip install ultralight
```


## Usage sample

```python
import cv2
from ultralight import UltraLightDetector
from ultralight.utils import draw_faces

image = cv2.imread('sample.jpg')

detector = UltraLightDetector()
boxes, scores = detector.detect_one(image)
print(f'Found {len(boxes)} face(s)')
# >>> Found 14 face(s)

draw_faces(image, boxes, scores)
cv2.imshow('result', image)
cv2.waitKey(0)
```

This sample can be found [here](samples/sample.py)


## Reference

[GitHub repository of original detector](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB)

[ArXiv paper of original detector](https://arxiv.org/pdf/1905.00641.pdf)


## More

PyPI: https://pypi.org/project/ultralight

Repository: https://github.com/abionics/UltraLight

Developer: Alex Ermolaev (Abionics)

Email: abionics.dev@gmail.com

License: MIT (see LICENSE.txt)
DMARCReporting 0.3.0
Simple tool to extract error reports from DMARC files
License: MIT
Requires Python: >=3.8

# DMARCReporting ![Build Status](https://github.com/mozaicworks/DMARCReporting/actions/workflows/build.yml/badge.svg?event=push)

This is a simple tool that displays the errors from a bunch of DMARC reports. It's meant to simplify the job of figuring out DMARC errors.

This is very much a work in progress, use only for tests! Feedback and pull requests are welcome.

## Install

```bash
pip install DMARCReporting
```

## How to use

* Download all zipped DMARC reports to a `samples` folder
* Execute:
  
  ```bash
  DMARCReporting /path/to/reports
  ```

The tool processes the files one by one:

* unarchives the file on the fly
* parses the DMARC report
* if any DMARC rejection or quarantine or a failing SPF and/or DKIM authentication and/or alignment happens, a report is displayed on the console together with the DMARC report file name.

An example report looks as follows:

```plain
report.xml.gz
Source IP      Source Host                     Payload From (From:)    Envelop From (MAIL FROM)    DMARC    DKIM Align    DKIM Auth    SPF Align    SPF Auth    File
-------------  ------------------------------  ----------------------  --------------------------  -------  ------------  -----------  -----------  ----------  ------
80.96.161.193  Unknown host                    bellous.com             bellous.com                 none     pass          pass         fail         fail        report.xml.gz
208.90.221.45  208-90-221-45.static.flhsi.com  bellous.com             calendar.yambo.com          none     pass          pass         fail         pass        report.xml.gz
80.96.161.193  Unknown host                    disicious.com           disicious.com               none     pass          pass         fail         fail        report.xml.zip
208.90.221.45  208-90-221-45.static.flhsi.com  disicious.com           calendar.trumbee.com        none     pass          pass         fail         pass        report.xml.zip
```

## Run tests

```bash
make install-dev
make test
```

## Development Notes

This tool was started by [Alex Bolboaca](https://twitter.com/alexboly), with a clear goal: allow easier processing DMARC reports received by email. Alternate tools exist, but they are meant for enterprises, meaning they are either expensive or use a lot of infrastructure.

The main goal is to see a report of email failures to allow investigation. Therefore, this tool should be minimalistic, extracting the minimum necessary information and requiring a minimum infrastructure.

While it's possible to deploy it as a cloud function through a later development of a Docker container, it should also allow running it locally after obtaining the DMARC zipped reports in some way.

The current version has been developed mostly by [Thierry de Pauw](https://mastodon.social/@tdpauw), so all thanks should go to him :).
gemini-pro-cli 1.1
This package contains implementation of the application enabling Gemini Pro usage on command-line interface (CLI).
License: MIT

# gemini-pro-cli

This application allows users to use Gemini Pro on command-line interface (CLI).

# Source Code

The source code for the Gemini Pro CLI application is available in 
https://github.com/GlobalCreativeApkDev/gemini-pro-cli/blob/master/main.py.

# Installation

```
pip install gemini-pro-cli
```

# How to Use the Application?

Pre-requisites:
1. [Python](https://www.python.org/downloads/) installed in your device.
2. .env file in the same directory as <GEMINI_PRO_CLI_DIRECTORY> and has the value of GENAI_API_KEY.

First, open a Terminal or Command Prompt window and run the following command.

```
python3 <GEMINI_PRO_CLI_DIRECTORY>/main.py
```

**Note:** Replace <GEMINI_PRO_CLI_DIRECTORY> with the path to the directory of the application gemini-pro-cli.

Then, the application will start with something looking like in the screenshot below.

![Application](images/Application.png)

You will then be asked to input the following values.

1. Temperature - between 0 and 1 inclusive
2. Top P - between 0 and 1 inclusive
3. Top K - at least 1
4. Max output tokens - at least 1

The following screenshot shows what is displayed after inputting the mentioned values.

![Main Menu](images/Main%20Menu.png)

Next, you will have two choices:

1. Enter a non-empty prompt to receive a response from the AI.
2. Enter an empty prompt to exit the application.

Below is an example of what happens when you entered a non-empty prompt.

![AI](images/AI.png)