semvec/pypi-packages huggingface dataset:
2us 0.0.1.post1
Glueing functionals with __.
Requires Python: ~=3.5

# __ (Double Underscores, 2us)
[![PyPI version](https://badge.fury.io/py/2us.svg)](https://badge.fury.io/py/2us)

Glueing functionals by `import __` for python!

## Install
The package is written in pure python, with no dependencies other than the Python language. Just do:

```sh
pip install 2us
```

Requires Python 3.5 or higher.

## Why this?
Python is a great language for creating convenient wrappers around native code and implementing simple, human-friendly functions.
In python, a bunch of builtin higher-order methods (which means that they accept functions as arguments) such as `map`, `filter` are available.
They enable streamed data processing on containers that focus on the processing itself,
in contrast with *noisy code* on traditional command-based languages that is heavily involved in loops.

However, you may occasionally run into the situatiion where you find that there is no standard library functions to implement in-line unpacking of tuples,
adding all numbers in a list by a constant shift, so you will have to write:
```python
map(lambda x: x + 1, some_list)
map(lambda x: x[0], some_list)
```
which seems rather dumb due to the inconvenient definition of lambda functions in python.

## Using __
Start using the package by importing `__`:
```python
import __
```
And then `__` can be used to create convenient functions that are identical to those written with `lambda`. Examples:
```python
assert sum(map(__ + 1, range(1000))) == sum(map(lambda x: x + 1, range(1000)))
assert set(map(__[0], {1: 2, 4: 6}.items())) == {1, 4}
assert functools.reduce(__ + __, range(1000)) == sum(range(1000))
```
Currently there is a drawback: python do not support overriding `__contains__` returning non-boolean values, so the `in` condition should be handled separately.
```python
assert tuple(map(__.is_in([1, 2]), [3, 1, 5, 0, 2])) == (False, True, False, False, True)
assert list(map(__.contains('1'), '13')) == [True, False]
```
p-y 0.0.1
Glueing functionals with __.
Requires Python: ~=3.5

# __ (Double Underscores)
Glueing functionals by `import __` for python!

## Install
The package is written in pure python, with no dependencies other than the Python language. Just do:

```sh
pip install p__y
```

Requires Python 3.5 or higher.

## Why this?
Python is a great language for creating convenient wrappers around native code and implementing simple, human-friendly functions.
In python, a bunch of builtin higher-order methods (which means that they accept functions as arguments) such as `map`, `filter` are available.
They enable streamed data processing on containers that focus on the processing itself,
in contrast with *noisy code* on traditional command-based languages that is heavily involved in loops.

However, you may occasionally run into the situatiion where you find that there is no standard library functions to implement in-line unpacking of tuples,
adding all numbers in a list by a constant shift, so you will have to write:
```python
map(lambda x: x + 1, some_list)
map(lambda x: x[0], some_list)
```
which seems rather dumb due to the inconvenient definition of lambda functions in python.

## Using __
Start using the package by importing `__`:
```python
import __
```
And then `__` can be used to create convenient functions that are identical to those written with `lambda`. Examples:
```python
assert sum(map(__ + 1, range(1000))) == sum(map(lambda x: x + 1, range(1000)))
assert set(map(__[0], {1: 2, 4: 6}.items())) == {1, 4}
assert functools.reduce(__ + __, range(1000)) == sum(range(1000))
```
Currently there is a drawback: python do not support overriding `__contains__` returning non-boolean values, so the `in` condition should be handled separately.
```python
assert tuple(map(__.is_in([1, 2]), [3, 1, 5, 0, 2])) == (False, True, False, False, True)
assert list(map(__.contains('1'), '13')) == [True, False]
```
md-mermaid-ort 0.1.5
Fork of original md_mermaid by Olivier Ruelle, including some fixes with PR awaiting on the upstream
Requires Python: >=3

# md_mermaid

mermaid extension for Python-Markdown to add support for mermaid graph inside markdown file

## Installation

For `pip` installation (only python version >=3.x) :

~~~shell
pip install markdown
pip install md-mermaid-ort
~~~

## Usage

In your python script :

~~~python
import markdown

text = """
# Title

Some text.

​~~~mermaid
graph TB
A --> B
B --> C
​~~~

Some other text.

​~~~mermaid
graph TB
D --> E
E --> F
​~~~
"""

html = markdown.markdown(text, extensions=['md_mermaid'])

print(html)
~~~

Output will result in :

~~~html
<h1>Title</h1>
<p>Some text.</p>
<div class="mermaid">
graph TB
A --> B
B --> C
</div>

<p>Some other text.</p>
<div class="mermaid">
graph TB
D --> E
E --> F
</div>

<script>mermaid.initialize({startOnLoad:true});</script>

~~~

The `<script>...</script>` line appears only once even if there are several graphs in the file.

> Note that the extension name have a '_' not a '-'.

> Attention : don't forget to include in your output html project the two following mermaid files :
>
> * mermaid.css (optional, can be customised)
> * mermaid.min.js (can be download here [here](https://unpkg.com/mermaid@8.1.0/dist/)) 

## Development

### Build and publish a new version on pypi

- Increment the version in `setup.py`
- Build the package:
```
python3 setup.py sdist bdist_wheel
``` 
- Upload the packages on pypi:
```
python3 -m twine upload --repository pypi dist/*
```
- Commit, tag the commit with the version number, and push all that

For the twine upload to work, it needs a `~/.pypirc` file declaring the `pypi` repository:

```ini
[pypi]                                                                                                                                                                                                                                        
  username = __token__
  password = pypi-<AN_ALLOWED_PYPI_TOKEN>
```
AutoChatbot 0.1.1
Package that makes chatbots automatically
Requires Python: >=3.6

# AutoChatBot

## Authors-
* Kritik Seth

### For documentation- either scroll down or [click here](https://kritikseth.github.io/autochatbot_docs)

## clean

### def make_train_dataset(lines, conv_lines):

```
takes input of lines and conversations, returns a list of questions and answers

:type lines: string
:param lines: path were text file of lines is present

:type conv_lines: string
:param conv_lines: path were text file of conversations is present
```

### def clean_train_dataset(text):

```
takes input list of questiond or answers, returns clean list of strings

:type text: text
:param text: list of strings
```

### def make_count_dict(q, a):

```
makes a dictionary of words

:type q: list
:param q: list of questions

:type a: list
:param a: list of answers
```

### def count_rare_words(cd, mincount):

```
counts the number of rare words

:type cd: dictionary
:param cd: count dictionary {word:key}

:type mincount: int
:param mincount: minimum length of a question
```

### def make_word_dict(cd, mincount, tokens={'':0, '':1, '':2, '':3}):

```
makes dictionary, returns mapping of word to key and key to word

:type cd: dictionary
:param cd: count dictionary {word:key}

:type mincount: int
:param mincount: min frequency of word such that it makes it into the word_dict

:type tokens: dictionary
:param tokens: default - {'<PAD>':0, '<SOS>':1, '<EOS>':2, '<UNK>':3}
```

### def add_word_tags(q, a, wd):

```
takes input of {word:key} and adds tags to those words

:type q: list
:param q: list of questions

:type a: list
:param a: list of answers

:type wd: dict
:param wd: mapping of word to key
```

### def make_line_id(q, a, wd):

```
takes input list of questions or answers and word_dict and returns text converted to id

:type q: list
:param q: list of questions

:type a: list
:param a: list of answers

:type wd: dict
:param wd: mapping of word to key
```

### def sort_line_pad(q, a, max_line_length):

```
sorts questions and answers based on their length, returns sorted list of question or answer

:type q: list
:param q: list of questions

:type a: list
:param a: list of answers

:type max_line_length: int
:param max_line_length: maximum length of question or answer
```

## chat

### def make_test_chatbot(dir_path, files_list, ntest):
```
takes input of direcotory of file, list, and number of test cases

:type lines: string
:param lines: path were text file of lines is present

:type conv_lines: string
:param conv_lines: path were text file of lines is present

:type conv_lines: string
:param conv_lines: base path were text file of lines is present
```