semvec/pypi-packages huggingface dataset:
right-triangle 0.2.0
Simple Python package that can be used to do calculations with right-angled triangles
License: MIT
Requires Python: ~=3.8

##############
Right Triangle
##############

Simple Python package that can be used to do calculations with
right-angled triangles.

Installation
============

Use pip to install right-triangle.

.. code-block:: shell

    pip install right-triangle


Usage
=====

The RightTriangle class
-----------------------

A RightTriangle instance is a representation of a right-angled triangle.

It has 6 attributes:

* side_a - first leg, the length of the side opposed to angle_a
* side_b - second leg, the length of the side opposed to angle_b
* side_c - the length of the hypotenuse of the triangle
* angle_a - first acute angle, the angle opposed to side_a, measured in degrees
* angle_b - second acute angle, the angle opposed to side_b, measured in degrees
* angle_c - the right angle, always 90 degrees

You can instantiate a RightTriangle with one of the following information:

* The lengths of any two sides of the triangle
* One angle (in degrees) and the length of one side of the triangle

You can use either a specialised factory method (.from_*)
or the universal one (.make) to construct an instance.

During the instantiation the other attributes are calculated and become
accessible.

.. code-block:: python

    >>> from right_triangle import RightTriangle
    >>> rt1 = RightTriangle.from_side_a_and_side_b(3, 4)
    >>> rt2 = RightTriangle.make(side_a=3, side_b=4)
    >>> rt1.side_c
    5.0
    >>> rt2.side_c
    5.0

Functions
---------

The module also provides some functions. You can use them to calculate some
attributes of a right triangle without actually instantiating a *RightTriangle*
object.

.. code-block:: python

    >>> import right_triangle
    >>> right_triangle.calculate_hypotenuse_from_legs(3, 4)
    5.0
    >>> right_triangle.calculate_acute_angles_from_legs(3, 4)
    (36.86989764584402, 53.13010235415598)
    >>> right_triangle.calculate_leg_from_other_leg_and_hypotenuse(3, 5)
    4.0
    >>> right_triangle.calculate_leg_from_hypotenuse_and_opposed_angle(5, 36.8699)
    3.000000164351089
    >>> right_triangle.calculate_leg_from_other_leg_and_adjacent_angle(4, 53.1301)
    3.000000256798589
tf-word2vec 1.0.7
Word2Vec implentation with Tensorflow Estimators and Datasets
License: MIT
Keywords: word2vec,word embeddings,tensorflow,estimators,datasets

# Word2Vec

[![GitHub release][release-image]][release-url]
[![PyPI release][pypi-image]][pypi-url]
[![Build][travis-image]][travis-url]
[![MIT License][license-image]][license-url]

This is a re-implementation of Word2Vec relying on Tensorflow
[Estimators](https://www.tensorflow.org/guide/estimators) and
[Datasets](https://www.tensorflow.org/guide/datasets_for_estimators).

Works with python >= 3.6 and Tensorflow v2.0.

## Install
via pip:
```shell
pip3 install tf-word2vec
```
or, after a git clone:
```shell
python3 setup.py install
```

## Get data
You can download a sample of the English Wikipedia here:
```shell
wget http://129.194.21.122/~kabbach/enwiki.20190120.sample10.0.balanced.txt.7z
```

## Train Word2Vec
```shell
w2v train \
  --data /absolute/path/to/enwiki.20190120.sample10.0.balanced.txt \
  --outputdir /absolute/path/to/word2vec/models \
  --alpha 0.025 \
  --neg 5 \
  --window 2 \
  --epochs 5 \
  --size 300 \
  --min-count 50 \
  --sample 1e-5 \
  --train-mode skipgram \
  --t-num-threads 20 \
  --p-num-threads 25 \
  --keep-checkpoint-max 3 \
  --batch 1 \
  --shuffling-buffer-size 10000 \
  --save-summary-steps 10000 \
  --save-checkpoints-steps 100000 \
  --log-step-count-steps 10000
```

[release-image]:https://img.shields.io/github/release/akb89/word2vec.svg?style=flat-square
[release-url]:https://github.com/akb89/word2vec/releases/latest
[pypi-image]:https://img.shields.io/pypi/v/tf-word2vec.svg?style=flat-square
[pypi-url]:https://pypi.org/project/tf-word2vec/
[travis-image]:https://img.shields.io/travis/akb89/word2vec.svg?style=flat-square
[travis-url]:https://travis-ci.org/akb89/word2vec
[license-image]:http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
[license-url]:LICENSE.txt