semvec/pypi-packages huggingface dataset:
triangular-grid-merge 1.0.0
Easy generate, read, merge and print tecplot triangular grids.

# triangle-grid-merge

## Why this project is useful

1. It helps to generate finite element triangular grid in tecplot format (.dat).

2. It's easy to read such a grid from tecplot (.dat) file.

3. Works for a multizone grids.

4. Able to merge multizone grids and write them as a single grid.

**The main advantage is that with tgm it's easy to read tecplot (.dat) format with multizone triangular grid inside and
connect zones basing on the coordinates of the nodes.**

## Quickstart

To **create** a grid
```
from triangular_grid_merge.grid import Grid
```
In order to initialize the grid with elements use:
```
grid.init(4, 5, (0, 60), (0, 100))
```
The code above creates a grid with 4 points by x-axis and 5 point by y-axis.
The points are distributed inside the rectangular given by the 2 points - `(x1, x2) (y1, y2)`

The area is devided according to the number of points by each axis.

To **print** the grid inside the tgm's grids directory, use
```
from triangular_grid_merge.tecplot import print_tecplot
print_tecplot(grid, 'name.dat')
```
If the grid is multizone you can print it as a single zone giving:
```
print_tecplot(grid, 'name.dat', merge=True)
```
![threezones](docs/threezones.png)
![threezones](docs/singlezone.png)


To **read** a grid. use
```
from triangular_grid_merge.tecplot import read_tecplot
read_tecplot(grid, 'name.dat')
```

## Details

Triangular grid is the one where each face is set by three nodes. 
It consists of nodes, faces and edges.
![grid_view](docs/grid_view.png)
honeybee 0.1.0a4
An artificial bee colony implementation in Python
Keywords: abc artificial bee colony optimization

# Honeybee

An artificial bee colony implementation in Python

## Installation

To install with `pip`:

    pip install honeybee

## Usage

To use, first install the package as above, then define a function that you
wish to optimize. This can be a simple mathematical formula, or something that
calls a complicated model training routine. The important thing is that it
depends on hyperparameters that can be passed to the function, and returns a
fitness measure that will be maximized by the algorithm:

```python
def my_func(**params):
    """ Implements Rastrigin's function of two inputs. """
    x = [v for v in params.values()]
    return 20 + sum([a**2 - 10*cos(2*np.pi*a) for a in x])
```    

Next define the ranges of parameters over which you wish to optimize:

```python
params = {'x1': (-5.12, 5.12),
          'x2': (-5.12, 5.12)}
```          

Finally, initialize the colony and fit the objective function:

```python
my_colony = Colony(my_func, params, num_bees=10)
my_colony.fit()
```
html5validate 0.0.2
Pure Python Basic HTML validatation library - for CI, django tests, etc.  Based on HTML5lib
Keywords: html5,validation,web,lint

HTML5Validate
========================

.. image:: https://travis-ci.org/danthedeckie/html5validate.svg?branch=master
   :target: https://travis-ci.org/danthedeckie/html5validate
   :alt: Build Status

.. image:: https://coveralls.io/repos/github/danthedeckie/html5validate/badge.svg?branch=master
   :target: https://coveralls.io/r/danthedeckie/html5validate?branch=master
   :alt: Coverage Status

.. image:: https://badge.fury.io/py/html5validate.svg
   :target: https://badge.fury.io/py/html5validate
   :alt: PyPI Version

HTML5 text validation, provided by HTML5lib.  Designed to integrate easily in
django or other web development environments, to ensure templates actually render
as intented, without dangling tags, or other nonsense.

Currently just uses HTML5lib's parsing and linting, which is enough for me
right now - it would be nice to have some more comprehensive checking, and
possibly even write some valid-attribute checking - although that's a BIG
project.

Usage:
------

.. code-block:: python

   >>> from html5validate import validate
   >>> validate('<!doctype html><html><body><h1>Hi World!</h1></body></html>')
   None
   >>> validate('<!doctype html><html><body><h1>Hi World!</body></html>')
   Traceback (most recent call last):
   ...
   html5lib.html5parser.ParseError: Expected closing tag. Unexpected end of file.


So.  You run 'validate' on some text, and it either returns None, or throws
some kind of error at you.

With Django in tests:
---------------------

.. code-block:: python

   from django.test import TestCase
   from html5validate import validate

   class TestIndexViewValid(TestCase):
      def test_basic_index(self):
         validate(self.client.get(reverse('index'), follow=True))


Status:
-------

Very Early - I just pulled this out of some django view testing code in one of
my other projects, as it seemed more sensible to have it as a stand-alone
library that could be unit-tested and stuff, and I can use again easily.

Initial basic tests are here - but it should really have a LOT of tests written.

Roadmap:
--------

- Write a bunch of tests to see how strict it really is.
- Write some extra tree walkers and checkers to look for valid tags, and throw
  some decent exceptions, and have customisability, specify what tags users
  want, etc.
simil 0.0.2
CLI for semantic string similarity

# Semantic String Similarity CLI

`simil` is a CLI interface to [`spacy`](https://spacy.io)'s string similarity engine. It uses the `en_vectors_web_lg` dataset to compare strings for their English semantic similarity. Given two words, phrases, or sentences, `simil` will tell you how similar their meanings are.

## Installation

First install `simil` itself:
```bash
$ pip3 install --user -U simil
```

Now install one of spacy's web_vector models:

```
$ python3 -m spacy download en_vectors_web_lg
```

You can choose between `en_vectors_web_lg`, `en_core_web_lg`, and `en_core_web_md`, (`en_core_web_sm` don't include word vectors at all, and can't be used with `simil`.) `simil` will use the largest model that you have installed, with preference for the `vectors` model over a `core` model.

I suggest using the large vectors model (`en_vectors_web_lg`), but you might want to use a smaller model in order to save on disk space or memory usage.

## Usage:
```bash
$ sim first_file.txt second_file.txt # compare two files
$ sim -s "first string" "second string" # compare two strings
```

The output is a number between 0 and 1, representing how similar the two strings are.

## Details:

`simil` uses Spacy's word vector models trained with [`GLoVe`](https://nlp.stanford.edu/projects/glove/), such as [`en_vectors_web_lg`](https://spacy.io/models/en#en_vectors_web_lg).

This can be a large dataset, which makes for long startup times. So `simil` spins off a process in the background to hold the model, and works under a client-server model with it. This means that if you run `simil` a number of times in a row, only the first run is slow.

This background process does take up a fair bit of memory, typically around 2GB (for the `en_vectors_web_lg` model). After 10 minutes of inactivity it will automatically be killed, in order not to take up memory indefinitely. You can change the length of this timeout with the `--timeout` flag.