semvec/pypi-packages huggingface dataset:
gitea-github-sync 0.2.0
Syncs your gitea instance with your Github account
License: MIT
Requires Python: <4.0.0,>=3.8.1

[![Supported Python Versions](https://img.shields.io/pypi/pyversions/gitea-github-sync/0.1.0)](https://pypi.org/project/gitea-github-sync/) [![PyPI version](https://badge.fury.io/py/gitea-github-sync.svg)](https://badge.fury.io/py/gitea-github-sync)

[![codecov](https://img.shields.io/codecov/c/github/Muscaw/gitea-github-sync?label=codecov&logo=codecov)](https://codecov.io/gh/Muscaw/gitea-github-sync) ![PyPI - Downloads](https://img.shields.io/pypi/dm/gitea-github-sync)

# gitea-github-sync

gitea-github-sync provides a simple CLI to sync Github repositories to your Gitea instance.

## Installation

```
pip install gitea-github-sync
```

If you are interested in using a pre-packaged docker image, please look at the [Docker Readme](docs/docker/README.md)

## Setup
Create a file in `$HOME/.config/gitea-github-sync/config.yml` with the following template and fill up the missing values:

```yaml
gitea_api_url: https://<your-gitea-instance>/api/v1
gitea_token: <your-gitea-token>
github_token: <your-github-token>
```

### Creating a Gitea token
Go to https://\<your-local-gitea-instance\>/user/settings/applications and generate a new token.

### Creating a Github token

Go to https://github.com/settings/tokens/new and create a token with the following values set:
- Note: this is a note to help you understand how the token is used.
- Expiration: No expiration
- repo: Select all of repo

![Screenshot of token configuration](docs/readme/github_token_permission.png)

#### Github token limitation
Github allows you to create _Personal access tokens_. These tokens now exist in two different flavors:
- Fine-grained tokens
- Classic tokens

Both work with gitea-github-sync, but given that Gitea does not allow the modification of the access token through the API, a **non-expiring** token must be used which limits the usage to Classic tokens.

## Usage

`gitea-github-sync --help` Shows the help

`gitea-github-sync list-all-gitea-repositories` Lists all available Gitea repositories in your account

`gitea-github-sync list-all-github-repositories` Lists all available Github repositories in your account

`gitea-github-sync migrate-repo FULL_REPO_NAME` Migrates one repo from Github to Gitea

`gitea-github-sync sync` Migrates all repos not present in Gitea from Github

## Automate gitea-github-sync execution

There are multiple ways to automate the execution of gitea-github-sync. One of them is using cron:

First, execute `crontab -e` to open the cron configuration file in edit mode.

Then add the following line:
```
0 12 * * * gitea-github-sync sync
```

This will execute the sync operation every day at twelve.

## Limitations

When using the migration feature of Gitea, a Github token must be passed for Gitea to continuously pull the new changes from Github.

The token used by gitea-github-sync to list repositories is the same that is used by Gitea for continuous monitoring. Updating the value of this token is unfortunately not possible through the API as of now.
nagios-historian 0.7.3
nagios historian plugin
License: MIT

Title1
======

Checks historian tags and samples.

`VERSION  <nagios_historian/VERSION>`__

Install
=======

Linux::

    sudo pip3 install nagios_historian --upgrade

Also is possible to use::

    sudo python3 -m pip install nagios_historian --upgrade

On windows with python3.5::

    pip install nagios_historian --upgrade

For proxies add::

    --proxy='http://user:passw@server:port'

Usage
=====

Use the command line::

    > nagios_historian --help
      usage: nagios_historian [-h] [-u [URL]] [-e [EXTRA_ARGS]]

        optional arguments:
        -h, --help            show this help message and exit
        -u [URL], --url [URL]
                              url to check 
		--client_id
                              oauth2 client_id example client id: user01
		--client_secret
                              oauth2 client_secret client password
		--auth_url
                              oauth2 auth_url example: https://login.microsoftonline.com/company.onmicrosoft.com/oauth2/v2.0/token
		--tags
                              tags names of historian

		--instance
                              instance name of historian
		--oauth2
                              Flag to use or not token for oauth2 before creating the request, used to check published services that uses azure oauth2
        -e [EXTRA_ARGS], --extra_args [EXTRA_ARGS]
                              extra args


Example usage
=============

Example use:

    > nagios_historian -u "https://xxx/yyy/currentvalue?tagNames=" --client_id "admin1234" --client_secret "pass1234" --auth_url "https://xxxx/oauth/token" --oauth2 --tags "TAG1;TAG2;TAG3" --instance "INSTANCE"


Nagios config
=============

Example command::

    define command{
        command_name  check_nagios_historian
        command_line  /usr/local/bin/nagios_historian -u "$ARG1$" --client_id "$ARG2$" --client_secret "$ARG3$" --auth_url "$ARG4$" --oauth2 --tags "$ARG5$"  --instance "$ARG6$" --extra_args='$ARG6$'
    }

Example service::

    define service {
            host_name                       SERVERX
            service_description             service_name
            check_command                   check_nagios_historian!http://url/path!admin123!pass1234!http://authurl/oauth2!Tags!Instance
            use				                generic-service
            notes                           some useful notes
    }

You can use ansible role that already has the installation and command: https://github.com/CoffeeITWorks/ansible_nagios4_server_plugins

TODO
====

* Use hash passwords
* Add Unit tests?
wifind 0.2.1
Wi-Fi indoor positioning system
License: MIT

# wifind

[![Publish to PyPI](https://github.com/micheledinelli/wifind/actions/workflows/publish-to-pypi.yaml/badge.svg)](https://github.com/micheledinelli/wifind/actions/workflows/publish-to-pypi.yaml) [![pypi version](https://img.shields.io/pypi/v/wifind)](https://pypi.org/project/wifind/) [![pypi downloads](https://img.shields.io/pypi/dw/wifind)](https://pypi.org/project/wifind/)

`wifind` is a cli tool that performs wifi fingerprinting and detect your position based on access points around you.

## Installation

```sh
pip install wifind
```

## Usage

```sh
# learn current location labelling it as kitchen
wifind learn -r kitchen

# print saved locations
wifind rooms
# ['kitchen', 'bedroom']

# predicts current location
wifind predict
# kitchen

wifind --watch
# 2024-06-08 12:31:24 - kitchen
# 2024-06-08 12:31:27 - bedroom
# 2024-06-08 12:31:31 - bedroom
# 2024-06-08 12:31:35 - bedroom

wifind predict -p
# {'kitchen': 0.68, 'bedroom': 0.32}

# clears data
wifind clear
```

## Acknowledgments

Inspired by amazing work of [`whereami`](https://github.com/kootenpv/whereami)