semvec/pypi-packages huggingface dataset:
recurse-tree-process 0.0.2
A functional util for generic recursive tree processing
Requires Python: >=3

# A Functional util for recursive tree processing

### Usage
```python
from tree_utils.fs_recursion import RecursionStrategy, ProcessingFunctions, fs_tree_recursion, TreeNodeFunctions, get_children_paths
from tree_utils.tree_recursion import ProcessingFunctions, RecursionStrategy, TreeNodeFunctions

def example_extract_file_paths(root_dir_path: str, options={}, mode=RecursionStrategy.ANY):

    tree_node_functions: TreeNodeFunctions = TreeNodeFunctions()

    def process_file(path: str):
        logging.debug(f"Processing file: {path}")

        print(path)

        # Return the path as the desired content extracted from the node
        return path

    def process_dir(dir_path: str, children_paths: list[str], children_processing_results: list[str]):
        # The paths we returned in 'process_file' are collected and passed to the 'process_dir' function as the children_processing_results

        logging.debug(f"Processing dir: {dir_path}")
        return children_processing_results

    tree_node_functions.is_leaf = os.path.isfile
    tree_node_functions.is_node = os.path.isdir
    tree_node_functions.get_children_ids = get_children_paths
    tree_node_functions.process_leaf = process_file
    tree_node_functions.process_node = process_dir

    return fs_tree_recursion(root_dir_path, tree_node_functions, options, mode=mode)

example_extract_file_paths('/some/path')
```
render-engine-pagefind 2024.1.1b1
PageFind theme and plugin that adds page find to your site.

# PageFind

PageFind theme and plugin that adds page find to your site.

## How to use this theme

1. Install the theme

   ```python
   pip install render_engine_pagefind
   ```

2. Import the theme into your project

   ```python
   from render_engine import Site
   from render_engine_pagefind import PageFind

   app = Site()
   app.register_theme(PageFind)
   ```
jupytorg 0.2.5
Convert org-mode files to Jupyter Notebooks
Requires Python: >=3.11,<4.0

# Org to IPYNB

## Preamble

It should be remembered that the use of the operating system known as "Emacs" is prohibited by the Geneva Conventions and makes any user liable to a crime against humanity.

Indeed, this ignominy, whose violence and horror remain indescribable to us, is still far too widely used within the Linux community. There are many other tools available, such as ed, vim, nano... How can its use be justified, especially if it is shameless?

We are appalled and dumbfounded by this aberration. It is this service to humanity that has motivated us in this project. It's to save those who suffer from this evil. It is for you. You, who have desperately sought a solution. You, who have been desperate to get out of this trap. You, who represent that flickering glimmer of hope for a better future.

Résiste !
Prouve que tu existes !
Cherche ton bonheur partout, va,
refuse ce monde égoïste !
Résiste.
Suis ton cœur qui insiste !
Ce monde n'est pas le tien, viens, 
bats-toi, signe et persiste !
Résiste !

![image](https://i.imgflip.com/8df8x2.jpg)

## Requirements
- pandoc
- jupyter notebook

```bash
pip3 install jupyter jupyter-c-kernel jupyterlab notebook
``` 
then 
```bash
install_c_kernel --user
```
- gcc
    - OpenMP

You can test whether everything works using this command and this :
```bash
gcc -fopenmp code_block.c -o codeblock
./code_block
```
```c
// OpenMP header
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
 
int main(int argc, char* argv[])
{
    int nthreads, tid;
 
    // Begin of parallel region
    #pragma omp parallel private(nthreads, tid)
    {
        // Getting thread number
        tid = omp_get_thread_num();
        printf("Welcome to GFG from thread = %d\n",
               tid);
 
        if (tid == 0) {
 
            // Only master thread does this
            nthreads = omp_get_num_threads();
            printf("Number of threads = %d\n",
                   nthreads);
        }
    }
}
```

## Principle

We take a `.org` file and convert it to `html` and a `json` using `pandoc <filename>.org -o out.html` and `pandoc <filename>.org -o out.json`.
Then we parse those intermediate renderings to extract the bits of code and generate a usable `json IPYNB`.

## Usage
```text
Usage: jupytorg src=input_file_path (optional type=code_block_language dest=output_file_path)
    input_file_path : the path to input the file
    output_file_path : the path to output the file (default is output_file.ipynb)
```
Example with a `newcourse.org` file:
```bash
jupytorg src=~/Documents/2A/OpenMP/newcourse.org dest=~/Documents/2A/OpenMP/newcourse.ipynb
```
It reads the `.org` file in the specified folder and drops the coonverted jupyter notebook into the same folder. All that remains is to open it with VSCode.
file-size 0.0.1
It's a simple python package to calculate the file size.
Requires Python: >=3.0

# file-size-package

English(US):

This simple Python package project was born from a curiosity to know the file size in each unit of measurement (B, KB, MB, GB, etc.). Futhermore, I was learning about how to create the Python package.

Português(BR):

Este simples projeto de pacote Python nasceu de uma curiosidade em saber o tamanho do arquivo em cada unidade de medida (B, KB, MB, GB, etc.). Além disso, eu estava aprendendo sobre como criar um pacote Python.

## Installation

Você pode instalar o pacote via pip:

```bash
pip install file-size
```

## Usage

```python
from file_size.size import file_size

file_size(file_path)
```

## Author
Kauã Fabricio

## License
[MIT](https://choosealicense.com/licenses/mit)
file-size-package 0.0.1
It's a simple python package to calculate the file size.
Requires Python: >=3.0

# file_size_package

English(US):

This simple Python package project was born from a curiosity to know the file size in each unit of measurement (B, KB, MB, GB, etc.). Futhermore, I was learning about how to create the Python package.

Português(BR):

Este simples projeto de pacote Python nasceu de uma curiosidade em saber o tamanho do arquivo em cada unidade de medida (B, KB, MB, GB, etc.). Além disso, eu estava aprendendo sobre como criar um pacote Python.

## Installation

Você pode instalar o pacote via pip:

```bash
pip install file_size_package
```

## Usage

```python
from file_size.size import file_size

file_size(file_path)
```

## Author
Kauã Fabricio

## License
[MIT](https://choosealicense.com/licenses/mit)
unix-socket-server 0.0.5
A single-threaded server for serving in-memory files via Unix sockets.
Requires Python: >=3.4

# Unix Socket Server
A single-threaded server for serving in-memory files via Unix sockets. No Requirements. just clone this repo and copy ```unix_socket_server``` module to the root of your project or install package using pip:
```bash
pip install unix-socket-server
```

## Problem
Imagine that we have a in-memory file in our Python application and we want to share this file with other apps or tools on the same host without writing it to disk.

## Solution
A lightweight solution to this problem is to use Unix socket communication for file sharing.


## Examples:

Use a context manager that automatically manages the server lifecycle:
```python
from unix_socket_server import UnixSocketServerContext

with UnixSocketServerContext(b'hello world', '/tmp/file.sock') as server:
    """
        do stuff
    """
```

Or you can create and start the server manually.
```python
server = UnixSocketServer(b'Hello World')
server.listen('/tmp/stream.socket')
```

```UnixSocketServer``` writes file to response stream by default . but if your client needs http protocol you can use http handler like example below:
```python
from unix_socket_server import UnixSocketServerContext
with open('./file-exmaple.txt', 'rb') as f:
    """
    UnixSocketServer also accepts readable io objects
    """
    with UnixSocketServerContext(f, '/tmp/file.sock', handler='http') as server:
        """
            do stuff
            dummy example:
                transport = httpx.HTTPTransport(uds=server.uri)
                client = httpx.Client(transport=transport)
                response = client.get('http://any_path/')
                assert response.status_code == 200
        """
```
example-package-andrewlayer 0.0.1
A small example package
Requires Python: >=3.8


# Make sure you have upgraded version of pip
Windows
```
py -m pip install --upgrade pip
```

Linux/MAC OS
```
python3 -m pip install --upgrade pip
```

## Create a project with the following structure
```
packaging_tutorial/
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.cfg
├── src/
│   └── example_package/
│       ├── __init__.py
│       └── example.py
└── tests/
touch LICENSE
touch pyproject.toml
touch setup.cfg
mkdir src/mypackage
touch src/mypackage/__init__.py
touch src/mypackage/main.py
mkdir tests
```

## pyproject.toml 

This file tells tools like pip and build how to create your project

```
[build-system]
requires = [
    "setuptools>=42",
    "wheel"
]
build-backend = "setuptools.build_meta"
```
build-system.requires gives a list of packages that are needed to build your package. Listing something here will only make it available during the build, not after it is installed.

build-system.build-backend is the name of Python object that will be used to perform the build. If you were to use a different build system, such as flit or poetry, those would go here, and the configuration details would be completely different than the setuptools configuration described below.


# Setup.cfg setup
Using setup.cfg is a best practice, but you could have a dynamic setup file using setup.py

```
[metadata]
name = example-pkg-YOUR-USERNAME-HERE
version = 0.0.1
author = Example Author
author_email = author@example.com
description = A small example package
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/pypa/sampleproject
project_urls =
    Bug Tracker = https://github.com/pypa/sampleproject/issues
classifiers =
    Programming Language :: Python :: 3
    License :: OSI Approved :: MIT License
    Operating System :: OS Independent

[options]
package_dir =
    = src
packages = find:
python_requires = >=3.6

[options.packages.find]
where = src

```
# Running the build
### Make sure your build tool is up to date
Windows
```
py -m pip install --upgrade build
```
Linux/MAC OS
```
python3 -m pip install --upgrade build
```


### Create the build
```
py -m build
```













### References
https://packaging.python.org/tutorials/packaging-projects/
BrainFunctionPlus 1.2.0
BrainFunction++ is an addon and fixup of BrainFunction, which is based on BrainFuck.
Requires Python: >=3.6


# BrainFunctionPlus
BrainFunction++ is an addon and fixup of BrainFunction, which is based on BrainFuck. It can do many things and is still being worked on, but is currently in a bug-free state.

### What the heck is a BrainFuck?
[BrainFuck](https://en.wikipedia.org/wiki/Brainfuck) is an esoteric programming language created by Urban Müller in 1993. It was created to be a very simple language: you are given an infinite array of zeroes and 8 commands to modify them, including very basic I/O. There are Plenty of BrainFuck interpreters, even one made in BrainFuck itself!

### So then, what is BrainFunction?
[BrainFunction](https://github.com/ryanfox/brainfunction) is an esoteric programming language created by ryanfox in 2016. It was created to simply add functions to BrainFuck. While it did technically work, some of the code caused the language to act weird and unpredictable that I'm pretty sure was not intended.

### So what is this?
This is an esoteric programming lanuage created by CreateSource in 2024. It was created with intuitiveness in mind, I hope you find it as natural as I do

##### Quick Note: This is a _score-computing interpreter_, therefore, programs that use negative indexes cannot be used.

# Commands
This is a list of commands that you can currently use in BrainFunction++

| Command     | Description |
| ----------- | ----------- |
| `>`         | Moves the pointer right 1 |
| `<`         | Moves the pointer left 1  |
| `+`         | Increment pointer cell |
| `-`         | Decrement pointer cell |
| `,`         | Take number/character input |
| `.`         | Output memory cell as a Unicode character |
| `[]`        | Loop through until the cell at the end of the loop is 0 |
| `#`         | Switch between None (default), 8bit, 16bit, 32bit, and 64bit rollover modes |
| `v`         | Jump down 1 line |
| `^`         | Jump up 1 line |
| `&v`        | Call line below |
| `&^`        | Call line above |
| `*v`        | Jumps down the current memory cell's value amount of lines |
| `*^`        | Jumps up the current memory cell's value amount of lines |
| `*<`        | Jumps left the current memory cell's value amount of lines |
| `*>`        | Jumps right the current memory cell's value amount of lines |
| `:`         | Double the amount at the current memory cell |
| `/`         | Half the amount at the current memory cell, rounded down |
| `$v`        | Calls the current memory cell's value amount of lines below |
| `$^`        | Calls the current memory cell's value amount of lines above |
| `;`         | Returns from a call. END OF LINES ARE NOT RETURNS |
| `"`         | Comment, anything after is ignored. This also applies to semicolons |

 ##### All jumps and calls reset the character position to 0

 Thank you for using BrainFunction++! If you want to check out my other projects, you can find them [here](https://abnormalhare.github.io/)
autohell 0.1.1
Automatically controls your monitor's brightness
Requires Python: >=3.11

# autohell

[![PyPI - Version](https://img.shields.io/pypi/v/autohell.svg)](https://pypi.org/project/autohell)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/autohell.svg)](https://pypi.org/project/autohell)

-----

`autohell` controls your monitor's brightness ("hell" means bright in German) automatically.
For now, it keeps your monitor at 60% brightness during the day, and then slowly dims your
monitor starting at 7 PM and ends at 5% brightness at 9:30 PM. Why these values? Because I like
them. These values are currently not configurable. PR's welcome :)

If you change your monitors brightness at any time through any other means, autohell will stop
doing anything for 3 hours (or until you restart it).

## Installation

I recommend using [pipx](https://github.com/pypa/pipx) to install
Python executables:

```console
pipx install autohell
```

*Note*: `autohell` currently does not have any UI, if you run the executable from pipx, 
it will just run in the background. You have to use your task manager to stop it.

## License

`autohell` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
pytransport 2.0.2
Convert TRANSPORT models and load TRANSPORT output.
Requires Python: >=3.6

# pyTransport

A python package containing both utilities for processing and analysing TRANSPORT output.

## Authors

W. Shields

Currently maintained and developed by:

* Will Shields          <william.shields@rhul.ac.uk>
* Jochem Snuverink      <jochem.snuverink@psi.ch>

## Setup

From within the pybdsim root directory:

$ make install

or for development:

$ make develop


```python
$ python
>>> import pytransport
>>> a = pytransport.Reader.GetOptics("FOR002.DAT")
>>> plot(a.S(), a.Sigma_X())
```