semvec/pypi-packages huggingface dataset:
smallteacher 0.0.1
Research codebase for teacher-student based semi-supervised object detection in agricultural settings
Requires Python: >=3.8

# SSOD for Agriculture

This is intended to be a starting point for researching and deploying semi-supervised object detection models for agriculture.

This is achieved by exposing a [PyTorch Lightning](https://pytorch-lightning.readthedocs.io/en/stable/) module which trains a teacher-student model, given labelled and unlabelled data:

```python
from smallteacher.models import SemiSupervised

model = SemiSupervised(
    model_base="SSD",
    num_classes=2,
)
```
PyTorch torchvision detection models should be drop in replaceable to this pipeline; we currently support Faster R-CNN, Retinanet, YOLO and SSD models.

Given a **Labelled Dataset**, which returns tuples of images and annotations (as expected by any torchvision detection model), and an **Unlabelled Dataset** (which returns only unlabelled images), users can construct a DataModule which can be used to train this model:

```python
from smallteacher.data import DataModule

datamodule = DataModule(
    labelled_train_ds,
    labelled_val_ds,
    labelled_test_ds
)
datamodule.add_unlabelled_data(unlabelled_ds)
```

An example of this code being applied to a [semi-supervised dataset](https://github.com/SmallRobotCompany/smallssd) is available in the [`smallSSD`](smallSSD) folder.

### Installation

`smallteacher` can be installed with the following command:

```bash
pip install smallteacher
```

### License
`smallteacher` has a [Creative Commons Attribution-NonCommercial 4.0 International](https://github.com/smallrobotcompany/smallteacher/blob/main/LICENSE) license.
pyrsc 1.2.0
job handler in Python

# pyrsc: triggers task when enough resources are available
[![PyPI Latest Release](https://img.shields.io/pypi/v/pandas.svg)](https://pypi.org/project/diclass/)

## What is it?

**pyrsc** Sometime we need to run a job or function in Python when enough resources are available. For example, you are running several machine learning models to train in parallel. But you want to avoid running them all at once becuase they utilize cpu and memory resources a lot.

## Example


```python
from pyrsc import watch
from joblib import delayed, Parallel
```

I am trying to run several foo function at once, but I need them to run when at least 16 cores (`n_cores`) are utilized less than 5% (`max_perc`), if not recheck after 0.001 second (`sleep_interval`). In total if it fails to after 10 attempts (`max_attempts`), it has to raise an exception.


```python
@watch(max_attempts=10, cpu=5, n_cores=16, sleep_interval=0.001)
def foo(x):
    print(x)
    
jobs = [delayed(foo)(i) for i in range(10)]
Parallel(n_jobs=32)(jobs);
```

    not enough resource is available to submit the job. Waiting for 0.001 seconds
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    0
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    1
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    2
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    3
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    4
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    5
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    6
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    not enough resource is available to submit the job. Waiting for 0.001 secondsnot enough resource is available to submit the job. Waiting for 0.001 seconds
    
    7
    8
    not enough resource is available to submit the job. Waiting for 0.001 seconds
    9


Lets see what if we set `max_perc=100`


```python
@watch(max_attempts=10, cpu=50, n_cores=1, sleep_interval=0.001)
def foo(x):
    print(x)
    
jobs = [delayed(foo)(i) for i in range(10)]
Parallel(n_jobs=32)(jobs);
```

    0
    4
    2
    3
    1
    5
    6
    7
    8
    9


In future release I will add the ability to manage also memory and virtual memory. Also total cpu usage will be implemented to avoid a job to run once resource requirments are not available.


```python

```
Excel-Trans 1.22.1
Excel Translate
Keywords: python,numpy,excel,Excel-Trans


# Excel_Trans 2022



Developed by Quvonchbek Bobojonov (c) 2022



## Examples of How To Use (Buggy Alpha Version)



### install

```terminal

pip install excel-trans==1.22.1

```



### Uzbek Translate



```python



from Excel_Trans import Translator



trans = Translator()



#Uzbek Translate



trans.UzbekTranslate(file='test.xlsx', to_variant='latin', save_file='test1.xlsx')



# get supported variants



print(trans.variant())



```



### Global Translate

```python



from Excel_Trans import Translator

trans = Translator()



#Global Translate



trans.GlobalTranslate(file='test.xlsx', target='ru', save_file='test1.xlsx')



#get supported languages



trans.get_supported_languages(as_dict=True)



```
RandomListOrDictGenerator 1.0.0
Generate random list/dictionary
Keywords: python,list,dictionnary,generator,string


# Python-random-dictionnary-list-generator

Class to generate random list or dictionnary in python





-  This object is used to automatically generate a list or a dictionary according to the size you specify.

    -   This size is defined at the instantiation of the object.

    -   By default, it generates a list or a dictionary of 5 elements.

    -   You can also specify the size of the list or dictionary when calling the method.

    -   You can also specify the size of keys/values when instantiating or calling the object

        



    -   examples : 

        -   #Instantiation with default parameters

            rd_ld = RandomListOrDictionnary(size=5, key_length=3, values_length=5)

            

        -   #We can specify the size

            my_list = rd_ld.createRandomDictionnary(3)

            my_dict = rd_ld.createRandomList(3)
sap2012 0.0.1
Python package implementing the SAP2012 domestic building energy calculations
Requires Python: >=3.6

# sap2012
SAP2012 energy calculation method in Python.

## Introduction

SAP2012 is the Standard Assessment Procedure 2012, the UK Government's energy calculation method for the building regulation compliance for new dwellings. 

SAP2012 is developed and published by the Building Research Establishment: https://www.bregroup.com/sap/standard-assessment-procedure-sap-2012/.

This Python package contains the calculation methods and data in the SAP2012 methodology. It allows the user to specify the inputs needed for a SAP calculation and then to run a SAP calculation based on these inputs.

## Documentation

Full documentation is available on ReadTheDocs here: https://sap2012.readthedocs.io/en/latest/

## Installation

Available on PyPi. Download using the command `pip install sap2012`.

If using the Anaconda distribution, this command can be run using the Anaconda prompt.

## Approach

The package is designed to represent the SAP calculation method as simply as possible, to allow for flexibility and customisation. 

Each section of the SAP2012 calculation method is a separate Python function which takes the input data as a series of arguments and returns the calculation results. For example, the method for calculating ventilation rates is given in the *ventilation_rates.py* module.

A complete SAP calculation is run using the *calculate_worksheet* function.

## Quick Example

This example runs a complete SAP2012 calculation using the inputs as stored in the ['inputs.json'](https://github.com/building-energy/sap2012/blob/master/notebooks/docs/inputs.json) file. The example prints the model outputs of the 'SAP_rating' section of the calculations.

```python
from sap2012 import calculate_worksheet
import json
with open('inputs.json') as f:
    inputs=json.load(f)
result=calculate_worksheet(inputs)
print(result['SAP_rating'])
```

```
{'energy_cost_factor': 1.7754795340546146, 'SAP_rating_value': 75.23206049993813}
```

## Issues & feature requests?

Please raise them on the [GitHub Issues page](https://github.com/building-energy/sap2012/issues).

## Contributions

All contributions welcome. Please send your [pull requests](https://github.com/building-energy/sap2012/pulls).

## Contacts

https://www.lboro.ac.uk/departments/abce/staff/steven-firth/
minetext 0.6.0
Python client for MINE system
Requires Python: >=3.7

# minetext

[MINE][2] is a collaboration project between the
[Niedersächsische Staats- und Universitätsbibliothek Göttingen (SUB)][3] and the
[Gesellschaft für wissenschaftliche Datenverarbeitung Göttingen (GWDG)][4] with the goal to offer a convenient platform
for text analysis.

`minetext` is a Python package, which facilitates the interaction between Python clients and the MINE system. For other
clients, [REST API][5] of MINE is the way to go.

**Note**: `minetext` only works on Python version `>=3.7`.

To install it, simply run

```shell
$ pip install minetext
```

## Examples

### Simple search

```python
from minetext import EsRequest, Mine

es_request = EsRequest(search_term='biology')
mine = Mine(es_request)

response = mine.search()

for hit in response:
    print(hit.meta.score, hit.mine.dc_title)
```

The example above shows us how to search in MINE. It is done in 3 steps:

1. Line 3: create an instance of the [EsRequest](https://mine.pages-ce.gwdg.de/mine-python/es_request.html) class with
   the query set to `biology`.
2. Line 4: create an instance of the [Mine](https://mine.pages-ce.gwdg.de/mine-python/mine.html) class. Since all
   operations are done via this instance,
   creating this instance is the first required step to interact with the MINE system.
3. Line 6: search for the word `biology` in MINE. To access the result, simply loop through the `response`, as shown
   in line 8.

### Get full-text

```python
from minetext import EsRequest, Mine

# Search for all documents which have full-text
es_request = EsRequest(search_term='_exists_:content')

mine = Mine(es_request)
mine.login()

response = mine.search()

for hit in response:
    print(hit.content)
```

To access the full-text, authentication is required. It is done by calling the `login` method of the `Mine` class,
as shown in the example above on line 7. The full-text, if existed, will be accessible via `hit.content`. The syntax of
the `search_term` is the [query string syntax][6].

For consecutive runs, the credentials is re-used so that users do not have to log in for every run. For more details,
please check the [Authentication][7] section.

**Note**: the `response` object is an instance of the `Response` class from the [`elasticsearch-dsl`][8] package

For more information, please refer to the [full documentation][1].

[1]: https://mine.pages-ce.gwdg.de/mine-python/

[2]: https://mine-graph.de/

[3]: https://www.sub.uni-goettingen.de/

[4]: https://www.gwdg.de/

[5]: https://api.mine-graph.de/docs

[6]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax

[7]: https://mine.pages-ce.gwdg.de/mine-python/mine.html#authentication

[8]: https://elasticsearch-dsl.readthedocs.io/en/latest/index.html
pd2slack 0.66
Syncs PD On-call to Slack User Group

# pd2Slack
[![PyPI version](https://badge.fury.io/py/pd2slack.svg)](https://badge.fury.io/py/pd2slack)

This python project will automatically sync on call PagerDuty services to Slack User Groups.

For example if you have an on call schedule such as: 
<p align="center">
  <img src="https://raw.githubusercontent.com/sidpremkumar/pd2slack/master/.github/src/pagerDutySchedule.jpeg" />
</p>

It will automatically create a slack user group as follows
<p align="center">
  <img src="https://raw.githubusercontent.com/sidpremkumar/pd2slack/master/.github/src/slackUserGroup.jpeg" />
</p>

With "Sidhartha Premkumar" as the sole member of @backend-oncall. 

The mapping is done via email matching, this assumes the pager duty email matches the slack email. 

## Running

To run, all you have to do is:
```
> pip3 install pd2slack
> pd2slack -slackApiKey {SLACK_API_KEY} -pdApiKey {PD_API_KEY} -config {PATH_TO_CONFIG}
```

We also support environment variable, for example:
```
> export SLACK_API_KEY=123
> export PD_API_KEY=123
> pd2Slack
```

## Deploying

You can deploy this program by running the process `pd2Slack` on a schedule (based on how often you want to update). A cron might be the best way to deploy

*Slack token permissions:* You will need the following permissions on your slack token:

* `users:read.email`
* `users:read`
* `usergroups:write`
* `usergroups:read`

## Custom Slack UserGroup Name

You can optionally pass `-configPath` to the command that points to a config (see `exampleConfig.json`). This mapping will be used to only sync PagerDuty schedules with the name as a key in `serviceMapping` with the slackGroup that is the corresponding value. 

In the example config we will only attempt to sync pager duty schedules with the name `Backend Pd Name` with the slack alias `@slackAliasToUse-oncall`.
process-image 0.0.3
Image Processing Package using skimage
Requires Python: >=3.8

# image_processing

Description.
The package process-image is used to:
    Processing:
        - Histogram matching
        - Strutural similarity
        - Resize image
    Utils:
        - Read image
        - save image
        - Plot image
        - Plot result
        - Plot histogram

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install package_name

```bash
pip install process-image 
```

## Author

Thiago Drummond Rabello

## License

[MIT](https://choosealicense.com/licenses/mit/)