semvec/pypi-packages huggingface dataset:
chocochip 0.0.1
A package to provide you Chocochip cookies

# Chocochip
This is my first repository that will be published to PyPI

## Goal 1: Publishing to PyPI
### Creating project structure
1. Clone the Github repository locally.
2. Create a subfolder with the same name as the package. We will refer this as primary subfolder.
3. Create a file named __init__.py inside the primary subfolder
4. Inside the primary subfolder create a python file with the same name as the package name.
5. Create a file named requirements_dev.txt

### Adding requirements
1. First of all identify the latest versions of pip and wheel and add them to the requirements_dev.txt
2. Now install it using `pip install -r requirements_dev.txt`

### Adding first function
1. Now add code to your main python file. In my case its `chocochip.py`
2. Here is my code snippet
```python
def give_me_a_cookie(name: str):
    """This function gives a cookie to the person who calls it

    Args:
        name (str): Name of the person

    Returns:
        str: Name of the person
    """
    print(f'Hi {name}! Here is your cookie again and again')
    return name
```
### Add setup.py file
Here is my template
```python
from setuptools import setup, find_packages

with open("README.md", "r") as readme_file:
    readme = readme_file.read()

setup(
    name="chocochip",
    version="0.0.1",
    author="Vignesh Baskaran",
    author_email="vignesh.sbaskaran@gmail.com",
    description="A package to provide you Chocochip cookies",
    long_description=readme,
    long_description_content_type="text/markdown",
    url="https://github.com/VigneshBaskar/chocochip",
    packages=find_packages(),
    classifiers=[
        "Programming Language :: Python :: 3.7",
        "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
    ],
)
```

### Install twine
1. Find the latest version of twine on PyPI
2. Add it to the requirements_dev.txt and install it using `pip install -r requirements_dev.txt`

### Commiting and Pushing the code to Github
1. Add and commit the modified files until now. In my case they are:
    1. README.md
    2. requirements_dev.txt
    3. chocochip/__init__.py
    4. chocochip/chocochip.py
    5. setup.py
2. Push the files to remote branch


## References:
1. https://towardsdatascience.com/build-your-first-open-source-python-project-53471c9942a7
2. https://stackoverflow.com/a/33685899/6882624
ecolors 0.0.2
Colors for the printing functions
Keywords: python,colors

"ecolors" gives you many optionas and colors to color your print function in python!
>>>ecolors.red
ecolors.purple
ecolors.blue
ecolors.red
ecolors.cyan
ecolors.green
ecolors.yellow
ecolors.bold
ecolors.underline
ecolors.deafult
sentence-similarity 1.0.0
Package to calculate the similarity score of two sentences
Requires Python: >=3.6

# Sentence Similarity
Package to calculate the similarity score between two sentences
## Examples
### Using Transformers
```python
from sentence_similarity import sentence_similarity
sentence_a = "paris is a beautiful city"
sentence_b = "paris is a grogeous city"
```
#### Supported Models
You can access some of the official model through the `sentence_similarity` class. However, you can directly type the HuggingFace's model name such as `bert-base-uncased` or `distilbert-base-uncased` when instantiating a `sentence_similarity`.

> See all the available models at [huggingface.co/models](https://huggingface.co/transformers/pretrained_models.html).
```python
model=sentence_similarity(model_name='distilbert-base-uncased',embedding_type='cls_token_embedding')
```
BERT is bidirectional, the [CLS] is encoded including all representative information of all tokens through the multi-layer encoding procedure. The representation of [CLS] is individual in different sentences. 
Set embedding_type to `cls_token_embedding`, To compute the similarity score between two sentences based on [CLS] token. 
> paper link (https://arxiv.org/pdf/1810.04805.pdf)

```python
score=model.get_score(sentence_a,sentence_b,metric="cosine")
print(score)
```
Available metric are euclidean, manhattan, minkowski, cosine score.

### Using Sentence Transformers
```python
from sentence_similarity import sentence_similarity
sentence_a = "paris is a beautiful city"
sentence_b = "paris is a grogeous city"
```
#### Supported Models
You can access all the pretrained models of `Sentence-Transformers`

> See all the available models at [sbert/models](https://www.sbert.net/docs/pretrained_models.html#sentence-embedding-models).
```python
model=sentence_similarity(model_name='distilbert-base-uncased',embedding_type='sentence_embedding')
```
Sentence-BERT (SBERT), a modification of the pretrained BERT network that use siamese and triplet network structures to derive semantically meaningful sentence embeddings that can be compared using cosine-similarity.
Set embedding_type to `sentence_embedding` (default embedding_type), To compute the similarity score between two sentences based on sbert. 
> paper link (https://arxiv.org/pdf/1908.10084.pdf)
```python
score=model.get_score(sentence_a,sentence_b,metric="cosine")
print(score)
```
Available metric are euclidean, manhattan, minkowski, cosine score.
reina 0.0.6
A Causal Inference library for Big Data.
Requires Python: >=3.6

# Reina

## About Reina
ReInA (Reasoning In AI) is a causal inference platform aimed at estimating heterogeneous treatment effects in observational data. There are various open-source projects that provide convenient causal inference methods, but the current out-of-box packages are limited to local memory for computation. Hence, this project integrates Apache Spark with various machine learning (ML) powered causal inference frameworks, enabling causal analysis on big-data.

## Installation
    $ pip install reina
    
## Quick Start
    import reina
    from pyspark.sql import SparkSession

    # Initialize spark session
    spark = SparkSession \
                .builder \
                .appName('Meta-Learner-Spark') \
                .getOrCreate()
    
    # Read data locally (without cluster) or from a distributed storage (e.g., Hadoop HDFS, AWS S3) 
    data = spark.read \
          .format("csv") \
          .load("your_data.csv") \
    
    # Set up necessary parameters (parameters will vary depending on the method used)
    treatment = ['name_of_treatment']
    outcome = 'name_of_outcome'
    
    # Setup and fit model
    causal_model = reina.iv.TwoStageLeastSquares(data=data, treatment=treatment, outcome=outcome)
    causal_model.fit(data=data, treatments=treatment, outcome=outcome,...)
    
    # Get heterogeneous treatment effect
    cate, ate = causal_model.effect()
    print(cate)
    print(ate)
    
Please refer to example notebooks and [full documentation](https://qyu-ai.github.io/Reina/) for more detailed toy demonstrations.

## Contribution Guidelines
If you wish to contribute, please refer to our [contribution guidelines](./CONTRIBUTING.md).

Any contributions are greatly welcomed and appreciated.

## References
aimslib 0.4.1
A library for working with AIMS
Requires Python: >=3.7

# aimslib #

This is a refactor from various different projects to move the functionality of
extracting information from AIMS servers into a common library. It is built and
tested against easyJet AIMS servers. It will likely need adapting to work with
AIMS servers run by other airlines.

## Example code ###
```python
import json
import sys

from aimslib.access.connect import connect, logout
from  aimslib.access.cache import TripCache, CrewlistCache
from aimslib.common.types import NoTripDetails
import aimslib.access.brief_roster as Roster

#put your own values in here
CACHE_DIR = "/SUITABLE/LOCATION/FOR/CACHE/"
ECREW_LOGIN_PAGE = "https://ECREW/LOGIN/PAGE"
USERNAME = "YOUR_USERNAME"
PASSWORD = "YOUR_PASSWORD"


def heartbeat():
    sys.stderr.write('.')
    sys.stderr.flush()

#connect to AIMS
post_func = connect(ECREW_LOGIN_PAGE, USERNAME, PASSWORD, heartbeat)

#build a sparse duty list from the current brief roster and the two before
sparse_dutylist = []
for roster in Roster.retrieve(post_func, -2):
    sparse_dutylist.extend(Roster.duties(Roster.parse(roster)))

#build an expanded duty list using trip pages
expanded_dutylist = []
trip_cache = TripCache(CACHE_DIR + "aimslib.tripcache", post_func)
last_id = None
for duty in sorted(sparse_dutylist):
    if duty.trip_id == last_id: continue #sparse_dutylist may contain duplicates
    last_id = duty.trip_id
    if duty.start is None:
        try:
            expanded_dutylist.extend(trip_cache.trip(duty.trip_id))
        except NoTripDetails:
            print("Trip details not found for: ", duty.trip_id, file=sys.stderr)
    else:
        expanded_dutylist.append(duty)
trip_cache.store()

#build crewlist map
crew_cache = CrewlistCache(CACHE_DIR + "aimslib.clcache", post_func)
crewlist_map = {}
for duty in expanded_dutylist:
    if duty.sectors:
        for sector in duty.sectors:
            if not sector.crewlist_id: continue
            crewlist = crew_cache.crewlist(sector.crewlist_id)
            crewlist_map[sector.crewlist_id] = crewlist
crew_cache.store()

#dump objects as json
print(json.dumps(
    (expanded_dutylist, crewlist_map),
    default=lambda o: str(o),
    indent=2))

#cleanup
logout(post_func)

```