semvec/pypi-packages huggingface dataset:
intersection.py 2.1.0
A simple API Wrapper for IC
License: MIT
Keywords: api

# intersection.py

An easy to use API wrapper with some basic functionality you would expect an API wrapper to have.

## Key Features

- User, Map, Comment and Highscore classes with their corresponding features.
- Functions used to get said objects from different sources.
- It's not really optimized but should work just fine.

## Installing

You can either use pip or copy the github repository.

pip (replace "version" with the version you want to download or alternatively just don't specify it.):
```sh
pip install intersection.py==version
```

### Required packages
The only other package this API wrapper requires is `requests`. In order to download it run this command:
```sh
pip install requests
```

## Quick example
```py
import intersection

my_user = intersection.user.get_details_for_user(userId=2452411)
print(my_user.name)

my_maps = my_user.get_user_maps()

for map in my_maps:
    print(map.name)

    comment = map.get_comments(limit=1)
    if len(comment):
        print("Latest comment: " + comment[0].comment)

    if map.gameModeGroup == 2:
        highscore = map.get_highscores(count=1)
        print("Highscore: " + highscore[0].score)
```
### JSON example
```py
from intersection.ext import url

my_user = url.get_details_for_user(userId=2452411)
print(my_user["name"])

my_maps = url.list_maps_by_user(userId=my_user["objectId"])

for map in my_maps:
    print(map["name"])

    comment = url.list_comments_on_map(mapId=map["objectId"], limit=1)
    if len(comment):
        print("Latest comment: " + comment[0]["comment"])

    if map["gameModeGroup"] == 2:
        highscore = url.list_high_scores_on_map(mapId=map["objectId"], count=1)
        print("Highscore: " + highscore[0]["score"])
```

## External links

- [PYPI Page (pip installation)](https://pypi.org/project/intersection.py/)
- [JavaScript version](https://github.com/RanggaGultom/ic-api) made by [RanggaGultom](https://github.com/RanggaGultom)
- [Github Repository](https://github.com/Feeeeddmmmeee/intersection.py)
itacovidlib 0.1.3
Python library for COVID-19 infections and vaccinations in Italy data retrieval and analysis
License: MIT
Keywords: COVID-19 infection vaccination Italy

# Italian COVID Library (itacovidlib)
![Italian COVID Library logo](https://github.com/FedericoCorchia/Italian_COVID_Library/blob/main/logo.png)

A Python library for COVID-19 infections and vaccinations in Italy data retrieval and analysis.

## Installing Italian COVID Library
You can install this library directly from PyPi:

`pip install itacovidlib`

You can also just clone this repository and use it as a normal Python package:

`git clone https://github.com/FedericoCorchia/itacovidlib`

## Requirements
Functioning of Italian COVID Library requires the following:
- Python (3.8.1 or higher)
- numpy
- pandas (1.2.0 or higher)
- geopandas (0.7.0 or higher)
- requests
- epyestim
- setuptools

## Usage
Instructions on using Italian COVID Library, also including practical examples:

[Italian COVID Library Tutorial](https://github.com/FedericoCorchia/Italian_COVID_Library/blob/main/Tutorial.ipynb)

## Data Sources
For data on COVID-19 cases in Italy: [pcm-dpc/COVID-19](https://github.com/pcm-dpc/COVID-19) - "COVID-19 Italia - Monitoraggio situazione" by Dipartimento della Protezione Civile

For data on vaccinations in Italy: [italia/covid19-opendata-vaccini](https://github.com/italia/covid19-opendata-vaccini) - "Open Data su consegna e somministrazione dei vaccini anti COVID-19 in Italia - Commissario straordinario per l'emergenza Covid-19", by Commissario straordinario per l'emergenza Covid-19 - Presidenza del Consiglio dei Ministri

Both are released under **Creative Commons - Attribution 4.0 International (CC BY 4.0)** [Full license](https://creativecommons.org/licenses/by/4.0/legalcode) - [Summary](https://creativecommons.org/licenses/by/4.0/deed.en)

For .geojson files with Italian regions and provinces: [datajournalism-it/regioni-con-trento-bolzano.geojson](https://gist.github.com/datajournalism-it/f1abb68e718b54f6a0fe) and [datajournalism-it/province.geojson](https://gist.github.com/datajournalism-it/212e7134625fbee6f9f7) by Datajournalism.it

Downloader functions provide the original data as they are without any modification apart from translating them into English and optimising their presentation.

## Further project details
This is a programming project for the Software and Computing for Nuclear and Subnuclear Physics course, Master Course in Nuclear and Subnuclear Physics, University of Bologna.
info-nce-pytorch 0.1.4
PyTorch implementation of the InfoNCE loss for self-supervised learning.
License: MIT

InfoNCE
==============================

PyTorch implementation of the InfoNCE loss from `"Representation Learning with Contrastive Predictive Coding" <https://arxiv.org/abs/1807.03748>`__.
In contrastive learning, we want to learn how to map high dimensional data to a lower dimensional embedding space.
This mapping should place semantically similar samples close together in the embedding space, whilst placing semantically distinct samples further apart.
The InfoNCE loss function can be used for the purpose of contrastive learning.


This package is `available on PyPI <https://pypi.org/project/info-nce-pytorch/>`__ and can be installed via:

.. code::

    pip install info-nce-pytorch


Example usage
-------------

Can be used without explicit negative keys, whereby each sample is compared with the other samples in the batch.

.. code:: python

    loss = InfoNCE()
    batch_size, embedding_size = 32, 128
    query = torch.randn(batch_size, embedding_size)
    positive_key = torch.randn(batch_size, embedding_size)
    output = loss(query, positive_key)

Can be used with negative keys, whereby every combination between query and negative key is compared.

.. code:: python

    loss = InfoNCE(negative_mode='unpaired') # negative_mode='unpaired' is the default value
    batch_size, num_negative, embedding_size = 32, 48, 128
    query = torch.randn(batch_size, embedding_size)
    positive_key = torch.randn(batch_size, embedding_size)
    negative_keys = torch.randn(num_negative, embedding_size)
    output = loss(query, positive_key, negative_keys)


Can be used with negative keys, whereby each query sample is compared with only the negative keys it is paired with.

.. code:: python

    loss = InfoNCE(negative_mode='paired')
    batch_size, num_negative, embedding_size = 32, 6, 128
    query = torch.randn(batch_size, embedding_size)
    positive_key = torch.randn(batch_size, embedding_size)
    negative_keys = torch.randn(batch_size, num_negative, embedding_size)
    output = loss(query, positive_key, negative_keys)






Loss graph
----------
Suppose we have some initial mean vectors ``µ_q``, ``µ_p``, ``µ_n`` and a covariance matrix ``Σ = I/10``, then we can plot the value of the InfoNCE loss by sampling from distributions with interpolated mean vectors.
Given interpolation weights ``α`` and ``β``, we define the distribution ``Q ~ N(µ_q, Σ)`` for the query samples, the distribution  ``P_α ~ N(αµ_q + (1-α)µ_p, Σ)`` for the positive samples
and the distribution ``N_β ~ N(βµ_q + (1-β)µ_n, Σ)`` for the negative samples.
Shown below is the value of the loss with inputs sampled from the distributions defined above for different values of ``α`` and ``β``.


.. image:: https://raw.githubusercontent.com/RElbers/info-nce-pytorch/main/imgs/loss.png
opencli3 0.0.10.dev25
Generate client based on OpenAPI Specification and wrap it in a command line interface
License: MIT

# OpenCLI
![Build Status](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiR2ZJNFp4S243bmNBVW13VGRuQkNndGRuVVRiK2tzSDhGRkcyQ1BhRWdCZXlnaGI0T2E5MlJ0dElzbjFqNEY5ZHFZcDdKYS9JT0h1SmVLdjF3Q1RDUnVZPSIsIml2UGFyYW1ldGVyU3BlYyI6Im9sdXhWQnh5K2FoMWI5NnYiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)

A CLI for every service which exposes a OpenAPI (Swagger) specification endpoint.

From the OpenAPI Specification project:

> The goal of The OpenAPI Specification is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.

## Demo

![Alt Text](https://github.com/privcloud-com/open-cli/blob/master/demo.gif)
![Alt Text](https://github.com/privcloud-com/open-cli/blob/master/demo_table.gif)
![Alt Text](https://github.com/privcloud-com/open-cli/blob/master/demo_profile.gif)

## Docker

To start a CLI session run:

    docker run -it privcloudcom/open-cli3 -s <swagger-spec-url>

e.g:

    docker run -it privcloudcom/open-cli3 -s http://petstore.swagger.io/v3/swagger.json


## CLI session

To start a CLI session run:

    open-cli3 -s <swagger-spec-url>

e.g:

    open-cli3 -s https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore-expanded.json

Running CLI session will automatically create config file at path ```~/.open-cli3-config/config.cfg```

To use profile config pass profile flag with desired profile name:

    open-cli3 --profile <profile_name>

e.g.:

    open-cli3 --profile profile1

This will work only if you specify profile in your open-cli3 config file: path ```~/.open-cli3-config/config.cfg```.
Example of config file: 

```config.cfg

[profile1]
endpoint = <endpoint>
access_token = <access_token>

``` 

To get data without running CLI session, please specify ```-c``` flag. It will automatically execute specified command
and return result data. Example: 
    
    open-cli3 -s <swagger-spec-url> -c 'auth:login --body.email=<user_email> --body.password=<user_password>'

or 
    
    open-cli3 --profile profile1 -c 'auth:login --body.email=<user_email> --body.password=<user_password>'

). 

If a profile name (```--profile``` flag) and swagger url (```-s``` flag) are provided (example: 
    
    open-cli3 -s <swagger-spec-url> --profile profile1
    
), the profile will take precedence. If such profile does not exist CLI will automatically create config file for the 
profile.

If you want to measure the request and response total time you should use ```--print-request-time``` flag. Example:

    open-cli3 -s <swagger-spec-url> --print-request-time true
   
For help run:

    open-cli3 -h

Credits
-------
This project relies on OpenApi3 [openapi3](https://github.com/Dorthu/openapi3) project & on Jonathan Slenders [python-prompt-toolkit](https://github.com/jonathanslenders/python-prompt-toolkit).
discord.pyc 2.0.1
Unofficial copy of a Python wrapper for the Discord API(Original by Rapptz)
License: MIT
Requires Python: >=3.8.0

# discord.pyc(opy)
## Unofficial copy of an API wrapper for Discord written in Python.


## Why this?
[Original](https://github.com/Rapptz/discord.py) by [Rapptz](https://github.com/Rapptz) was archived by owner.  
But I want to use original discord.py and I decided to create fork.

## Install
```sh
pip install --upgrade discord.pyc
```

## Usage
Same as [discord.py](https://github.com/Rapptz/discord.py)