semvec/pypi-packages huggingface dataset:
search-wikt 0.0.5
A simple command-line tool for searching Wiktionary.
Requires Python: >=3.7
Keywords: CLI,Wiktionary,dictionary,etymology

### Search Wiktionary

A simple command-line tool for searching English Wiktionary using Wiktionary Parser ([click](https://github.com/Suyash458/WiktionaryParser)).

Wiktionary definitions are licensed under CC BY-SA 4.0. Visit wiktionary at wiktionary.org ([click](wiktionary.org)).

This project is currently a work in progress.
#### Installation
To install, type:
```
pip install search_wikt
```
To run the program, type:
```
py -m search_wikt apricot --language English
```
or any other word or language you'd like to search. Run `py -m search_wikt -h` or `--help` for a more detailed explanation.

Alternatively, to clone the repository type:
```
git clone https://github.com/lauramvx/search_wikt
```
then `cd` to the project directory and run:
```
py src\search_wikt\__main__.py apricot --language English
```
##### Examples
```
py -m search_wikt hunig -l "Old English"
```

```
hunig
From Proto-West Germanic *hunag, from Proto-Germanic *hunagą. Cognate with Old Frisian hunig, Old Saxon honeg, and Old High German honag; also Old Norse hunang, from the alternative form *hunangą.

IPA: /ˈxu.nij/, [ˈhu.nij]
noun
huniġ n
honey
```
```
py -m search_wikt ac -l "Old English" -ex
```
```
ac 1
From Proto-Germanic *aiks.

IPA: /ɑːk/
IPA: /ɑk/
noun
āc f
oak (wood or tree)
(poetic) an oaken ship
(masculine) the runic character ᚪ (/a/)
ac 2
From Proto-Germanic *ak.

IPA: /ɑːk/
IPA: /ɑk/
conjunction
ac
but
but instead: in this sense ac should sometimes be translated as "but," but most often it is best left untranslated


Sēo æx forġiett, ac þæt trēow ġeman.The axe forgets, but  the tree remembers.
The axe forgets, but  the tree remembers.
Ne ġēotaþ wē tēaras, ac blōd.We don't shed tears, we shed blood.
We don't shed tears, we shed blood.
Nōn egō, sed tū: “Nā iċ, ac þū.” Nōn bōs est, sed equus: “Nis hit nā oxa, ac is hors.”Non ego, sed tu: “Not me, you.” Non bos est, sed equus: “It's not an ox, it's a horse.”
Non ego, sed tu: “Not me, you.” Non bos est, sed equus: “It's not an ox, it's a horse.”
```
himanshu-test 50.0.0
Python sdk for airstack apis
Requires Python: >=3.6

# airstack-python-sdk

The Airstack Python SDK is a library that allows Python developers to integrate Airstack's blockchain functionalities into their applications. With this SDK, developers can perform various tasks, such as querying and fetching data from smart contracts, displaying NFT assets.

# Installation

`pip3 install airstack`

# Getting started
To use the SDK you will need airstack api-key, which you can find in your profile setting section in airstack web, once you have it you can initialise the Airstackclient with the api-key.
```python
from airstack.execute_query import AirstackClient

api_client = AirstackClient(api_key='api-key')

```

# Methods
## execute_query
The execute query method query the data and return the data in asynchronous, it returns query_response which has below data
- `query_response.data`: data returned by the query
- `query_response.status_code`: status code of the query response
- `query_response.error`: any error that occurred while loading the query

### Example
```python
from airstack.execute_query import AirstackClient

api_client = AirstackClient(api_key='api-key')

execute_query_client = api_client.create_execute_query_object(query=query, variables=variables)

query_response = await execute_query_client.execute_query()
```

## execute_paginated_query
**Note:** pagination methods only works with queries that has support for pagination, and the query passed to method must have a cursor as argument for it to work.

The `execute_paginated_query` method provides a simple way to paginate the data returned by a query. It works the same as the `execute_query` method, it returns query_response which has below data:

- `query_response.data`: data returned by the query
- `query_response.status_code`: status code of the query response
- `query_response.error`: any error that occurred while loading the query
- `query_response.has_next_page`: a boolean indicating whether there is another page of data after the current page
- `query_response.has_prev_page`: a boolean indicating whether there is another page of data before the current page
- `query_response.get_next_page`: a function that can be called to fetch the next page of data
- `query_response.get_prev_page`: a function that can be called to fetch the previous page of data

### Example
```python
from airstack.execute_query import AirstackClient

api_client = AirstackClient(api_key='api-key')

execute_query_client = api_client.create_execute_query_object(query=query, variables=variables)

query_response = await execute_query_client.execute_paginated_query()

if query_response.has_next_page:
    next_page_response = await query_response.get_next_page

if next_page_response.has_prev_page:
    prev_page_response = await query_response.get_prev_page
```
trumpy 0.1.2
TRUMPY: Tracing and Reverse Understanding Memory in Pytorch

# TRUMPY: Tracing and Reverse Understanding Memory in Pytorch

Analyze how much memory is used for calculating the backward propagation (excluding parameters and gradients). This function works by tracing the computation graph used for backward propagation.

The fascinating thing is that it works in both GPU and CPU. Therefore, you can **first run the code in CPU to estimate the memory usage, which will then be a decent estimation of memory consumption in GPU**!

# Install

`pip install trumpy` or clone this repository and build it yourself.

# Usage

The core function is just one-line: `from trumpy import memory_for_backward; saved_memory = memory_for_backward(net, loss)`. You just pass the network and the calculated loss to this function, and it will give you how much memory (in bytes) is needed for backward propagation.

Example usage is in `tests/test.py`.

```python
import torch
from torchvision.models.resnet import resnet50

# define device and models
device = torch.device('cpu')
net = resnet50().to(device)
input = torch.rand(16, 3, 224, 224).to(device)

# if gpu is available, record current memory
if device != torch.device('cpu'):
    current_memory = torch.cuda.memory_allocated()

# define loss function
loss = net(input).sum() # loss is the starting point of the backward computation graph
from trumpy import memory_for_backward
# calculate the memory used for backward
saved_memory = memory_for_backward(net, loss)
print(f'estimated memory usage for backward related tensors in {device}: {saved_memory / 1024 ** 3} GB')

# check how much memory pytorch holds
if device != torch.device('cpu'):
    import gc
    gc.collect()
    saved_memory = torch.cuda.memory_allocated() - current_memory
    print(f'ground-truth memory usage for backward related tensors in gpu: {saved_memory / 1024 ** 3} GB')
```

You should see something like:
```
estimated memory usage for backward related tensors in cpu: 1.2881765365600586 GB
```

After turning on the GPU (setting `device = torch.device('cuda:0')`):
```
estimated memory usage for backward related tensors in cuda:0: 1.2881765365600586 GB
ground-truth memory usage for backward related tensors in gpu: 1.28438138961792 GB
```

You see that the estimated memory usage in `CPU` is very similar with the actual memory usage in `GPU`!
latinisation 0.0.1
Latinisation of different alphabets.
Requires Python: >=3.7

# Latinisation API

The APU to latinise non latin strings. For now, it only supports Armenian, but it will soon expand to other langugages too.

## Instructions

1. Install:

```bash
pip install latinisation
```

2. Latinise Armenian text:

```python
from latinisation import armenian

armenian.armenian_latinisation(some_input)
```

## Example of a program that uses the latinisation API:

```python
from latinisation import armenian

# Ask the user to input a sting of Armenian letters
some_input = input("Input some Armenian letters: ")

# Convert the user inputed sting to a string of latin letters using the API
armenian.armenian_latinisation(some_input)

# Print out the latinised version of the inputed string 
print(some_input)
```