semvec/pypi-packages huggingface dataset:
MicroTranslator 1.0.3
A lightweight, simple to use wrapper for the Microsoft translate API.
Requires Python: >=3.6

# Microsoft Translate Wrapper
A lightweight, simple to use wrapper for the microsoft translate API that simply does the API call and returns the raw, unmanipulated result.

## Why Should I Use This?
It saves you time whilst adding no more code to your project than necessary

## Installation
Just run `pip install MicroTranslator` in your command prompt of choice (Eg. Windows CMD or Powershell)

## Setup
```python
from microtranslator import Translator

tr = Translator(client_key="key")
```

## Translate
```python
tr.translate("Hello World!", "de")
# [{'detectedLanguage': {'language': 'en', 'score': 1.0}, 'translations': [{'text': 'Hallo Welt!', 'to': 'de'}]}]
```

## Detect
```python
tr.detect("Hallo Welt!")
#[{'language': 'de', 'score': 1.0, 'isTranslationSupported': True, 'isTransliterationSupported': False}]
```

## Dictionary
```python
tr.dictionary("test", "it", "en")
# text, to lang, from lang

# [{'normalizedTarget': 'fuoco', 'displayTarget': 'fuoco', 'posTag': 'OTHER', 'confidence': 0.8043, 'prefixWord': '', 'backTranslations': 
#   [{'normalizedText': 'fire', 'displayText': 'fire', 'numExamples': 1, 'frequencyCount': 33741}, 
#    {'normalizedText': 'firing', 'displayText': 'firing', 'numExamples': 0, 'frequencyCount': 559}
#   ]
# }]
# etc...
```

## Languages
```python
tr.languages()

# {'af': {'name': 'Afrikaans', 'nativeName': 'Afrikaans', 'dir': 'ltr'}, 
#   'am': {'name': 'Amharic', 'nativeName': 'አማርኛ', 'dir': 'ltr'}}
# etc...
```

## See it in the wild
[View my discord bot](https://jakebot.co.uk) which uses this exact package for all the free translations!

## Have something to contribute?
Go ahead and make a pull request! I should always be around to review them!

## Issues?
[Make an issue!](https://github.com/OliMations/MicroTranslator/issues)
Try to add as much detail as possible, including screenshots and tracebacks are super useful
mpilock 1.1.0
Synchronize read/write access to resources shared between MPI processes.
Keywords: mpi pool mpipool zwembad

[![codecov](https://codecov.io/gh/Helveg/mpilock/branch/main/graph/badge.svg?token=WQ1U6UNPGA)](https://codecov.io/gh/Helveg/mpilock)

# About

`mpilock` offers a `WindowController` class with a high-level API for parallel access to
resources. The `WindowController` can be used to synchronize MPI processes during `read`,
`write` or `single_write` operations on shared resources.

Read operations happen in parallel while write operations will lock the resource and
prevent any new read or write operations and will wait for all existing read operations to
finish. After the write operation completes the lock is released and other operations can
resume.

The `WindowController` does not contain any logic to control the resources, it only locks
and synchronizes the MPI processes. Once the operation permission is obtained it's up to
the user to perform the reading/writing to the resources.

The `sync` method is a factory for `WindowController`s and can simplify creation of
`WindowController`s.

# Example usage

```python
from mpilock import sync
from h5py import File

# Create a default WindowController on `COMM_WORLD` with the master on rank 0
ctrl = sync()

# Fencing is the preferred idiom to fence anyone that isn't writing out of
# the writer's code block, and afterwards share a resource
with ctrl.single_write() as fence:
  # Makes anyone without access long jump to the end of the with statement
  fence.guard()
  resource = h5py.File("hello.world", "w")
  # Put a resource to be collected by other processes
  fence.share(resource)
resource = fence.collect()

try:
  # Acquire a parallel read lock, guarantees noone writes while you're reading.
  with ctrl.read():
    data = resource["/my_data"][()]
  # Acquire a write lock, will block all reading and writing.
  with ctrl.write():
    resource.create_dataset(lock.rank, data=data)
finally:
  with ctrl.single_write() as fence:
    fence.guard()
    resource.close()

# The window controller itself needs to be closed as well (is done atexit)
ctrl.close()
```
math-magic 0.0.1
For basic math calculations
Requires Python: >=3.7

# math magic

Do basic math operations.

## Instructions

1. Install:

```
pip install math-magic
```

2. Compute LCM and GCD:

```python
from math_magic import basic_math

# compute GCD
gcd_result = basic_math.compute_gcd(24,16)
# compute LCM
lcm_result = basic_math.compute_lcm(24,16)

```