semvec/pypi-packages huggingface dataset:
path-diag 0.0.1
A utility for validating paths in environment variables and modifying them safely
License: MIT

# Path-diag

A utility for validating paths in environment variables and modifying them safely.

## Prerequisites

* Python 3

## Installation

You can install `path-diag` via `pip`:
```
pip3 install path-diag
```

## Usage

### Diagnose environment variable problems

Check if `$PATH` contains any invalid paths:
```
$ pathdiag
```

`$PATH` is the default variable to check.

You can specify another variable. For example:

```
$ pathdiag --var PYTHONPATH
```

You can also specify an increased verbosity which will also print the paths that are successfully checked:
```
$ pathdiag -v
✓ /usr/local/bin
✓ /usr/bin
✓ /bin
✓ /usr/sbin
✓ /sbin
```

### Safely append/prepend paths to environment variables

You can use the bash functions in order to take advantage of this features by adding the following line on top of your `.bashrc`/`.zshrc` file:
```
source /usr/local/bin/path-diag-functions.sh
```

Then you can use the `safe_append`/`safe_prepend` functions. For example:
```
safe_append "/usr/local/Cellar/node/7.4.0/bin"
safe_prepend "/usr/local/opt/python/libexec/bin"
```

This will add `/usr/local/Cellar/node/7.4.0/bin` at the end of `$PATH` if this path passes the validation checks, and will also add `/usr/local/opt/python/libexec/bin` at the beginning of `$PATH`, again if no errors are identified.

## Contributing

All contributions are welcomed. Make sure your code passes `flake8` checks and that is auto-formatted using [black](https://github.com/ambv/black)
twitter-oauth-ios-django 1.0.3
Create UserSocialAuth of social_django with OAuth login with twitter-kit-ios.
License: MIT

.. image:: https://travis-ci.org/nnsnodnb/twitter-oauth-django.svg?branch=travis
    :target: https://travis-ci.org/nnsnodnb/twitter-oauth-django
.. image:: https://coveralls.io/repos/github/nnsnodnb/twitter-oauth-django/badge.svg?branch=travis
    :target: https://coveralls.io/github/nnsnodnb/twitter-oauth-django?branch=travis
.. image:: https://badge.fury.io/py/twitter-oauth-ios-django.svg
    :target: https://pypi.org/project/twitter-oauth-ios-django
.. image:: https://img.shields.io/pypi/pyversions/twitter-oauth-ios-django.svg
   :target: https://pypi.org/project/twitter-oauth-ios-django
.. image:: https://img.shields.io/pypi/wheel/twitter-oauth-ios-django.svg
   :target: https://pypi.org/project/twitter-oauth-ios-django
.. image:: https://img.shields.io/pypi/format/twitter-oauth-ios-django.svg
   :target: https://pypi.org/project/twitter-oauth-ios-django
.. image:: https://img.shields.io/pypi/l/twitter-oauth-ios-django.svg
   :target: https://pypi.org/project/twitter-oauth-ios-django


twitter-oauth-django
====================

Create UserSocialAuth of social_django with OAuth login with twitter-kit-ios.

Supported python versions
-------------------------

3.4, 3.5, 3.6

Supported django versions
-------------------------

2.0.x

Installation
------------

.. code:: bash

    $ pip install twitter-oauth-ios-django

Add ``twitter_oauth_ios`` into ``INSTALLED_APPS`` in your ``settings.py`` file

.. code:: python

    INSTALLED_APPS = [
        ...,
        'social_django',
        'twitter_oauth_ios',
    ]

Add ``twitter_oauth_ios`` routing in ``urls.py`` file

.. code:: python

    from django.urls import include, path

    urlpatterns = [
        ...,
        path('twitter_oauth/', include('twitter_oauth_ios.urls', namespace='twitter_oauth_ios')),
    ]

Sample request
--------------

.. code:: bash

    $ curl -X PUT http://example.com/twitter_oauth/ \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d \
        "{
            'user_id': 1111111111,
            'oauth_token': '1111111111-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
            'oauth_token_secret': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
            'screen_name': 'sample_screen_name',
            'display_name': 'display_name'
         }",

Dependence libraries
--------------------

* Django
* social-auth-app-django

Author
------

nnsnodnb

LICENSE
-------

Copyright (c) 2018 Yuya Oka Released under the MIT license (see `LICENSE <LICENSE>`__)
webevents 0.1.4
A little Python library for making simple HTML/JS GUI apps
License: MIT
Requires Python: ~=3.6
Keywords: gui html js events eel electron

# Webevents
A little, zero-dependency Python library for making simple HTML/JS GUI apps
## Installation
Note that only Python >= 3.6 is supported
```
pip install webevents
```
## Example: ping-pong
Python sends a number to Javascript, which outputs it out to console, increments it and sends the number back to Python for displaying in terminal. And so on.

We will have the directory structure presented below. Generally speaking, In the "web" folder you can put your HTML/CSS/JS application. "Ping-pong" application will only consist of one "index.html" file.

```
├── example.py
└── web
    └── index.html
```
**index.html:**
```html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Webevents "Ping-pong"</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <script src="webevents.js"></script>
</head>
<body>
  Demonstration in console
  <script>
  webevents.addEventListener("ping", function(number){
    console.log(number);
    webevents.fireEvent("pong", number+1);
  });
  </script>
</body>
</html>
```

**example.py:**
```python
import webbrowser
import webevents

def pong_callback(number):
    print(number)
    snakes_events.fire_event("ping", int(number) + 1)

address = ("localhost", 8080)
snakes_events = webevents.run(address, "web")
snakes_events.add_termination_callback(lambda: print("The end!"))
snakes_events.add_event_listener("pong", pong_callback)

webbrowser.open_new_tab("http://{}:{}".format(*address))

# initial ping
snakes_events.fire_event("ping", 0)

try:
    while True:
        pass
except KeyboardInterrupt:
    snakes_events.terminate()
```

Multiple callbacks are supported. You can remove events with:
+ `remove_event_listener(event_type, callback)` in Python
+ `removeEventListener(event_type, callback)` in JS

In Python you can add termination callbacks with `add_termination_callback(callback)`. It may be useful in multi process applications. Note that there is no need to add termination callbacks if you don't need them.

Usually termination is occurred when user closes the browser page. But you can disable this by passing `timeout=None` in `webevents.run()`. You always can terminate the "webevents" with `webevents.terminate()`.

**Javascript output:**
```
0 2 4 6 8 10 12 ...
```
**Python output:**
```
1 3 5 7 9 11 13 ... The end!
```
patter 0.2.1
Pipe stdout directly to Mattermost channels or users.
License: MIT
Keywords: patter mattermost

# patter

> Pipe stdout directly to [Mattermost](https://mattermost.com/).

![patter demo](https://github.com/Brodan/patter/blob/master/demo.gif)

## Install

```
$ pip install patter
```

Then set the following environment variables based on your Mattermost server's config:
```
MATTERMOST_TEAM_NAME
MATTERMOST_URL
MATTERMOST_USERNAME
MATTERMOST_PASSWORD
MATTERMOST_PORT
```

## Usage

> Send a message to a user.
```
echo "testing" | patter -u some_user
```

> Send a message to a channel.
```
echo "testing" | patter -c town-square
```

> Send a file.
```
patter -c town-square -f some_file.txt
```

## Todo
- [ ] add unit tests via pytest
- [ ] allow message/files that are not UTF-8 to be sent
- [ ] add option of reading from a .patter file instead of using env vars.
- [ ] remove prints and add logging via verbose flag

## Contribute

PRs accepted.

## License

MIT © Christopher Hranj

Notice: This project was developed in part during my 10% time at [Truveris, Inc](https://www.truveris.com/).
asyncio-executor 0.0.4
asyncio-executor
License: MIT
Keywords: asyncio

asyncio-executor
===============================

* version: 0.0.4

* status: dev

* author: hsz

* email: hsz1273327@gmail.com

Desc
--------------------------------

Asyncio executor for running coroutines. This code is from <https://gist.github.com/seglberg/0b4487b57b4fd425c56ad72aba9971be>


keywords:asyncio,executor


Feature
----------------------
* run coroutines asynchronously

Example
-------------------------------

* run coroutines by using `submit`


.. code:: python


    from concurrent.futures import as_completed
    import aiohttp
    from asyncio_executor import AsyncioExecutor

    async def httpget(url):
        async with aiohttp.ClientSession() as session:
            async with session.get(url) as resp:
                html = await resp.text("utf-8")
        return len(html)

    with AsyncioExecutor() as executor:
        to_do = []
        urls = ["https://github.com/","https://docs.aiohttp.org/"]
        for i in urls:
            job = executor.submit(httpget,i)
            to_do.append(job)

        for future in as_completed(to_do):
            res = future.result()



* run coroutines by using map

.. code:: python


    from concurrent.futures import as_completed
    import aiohttp
    from asyncio_executor import AsyncioExecutor

    async def httpget(url):
        async with aiohttp.ClientSession() as session:
            async with session.get(url) as resp:
                html = await resp.text("utf-8")
        return len(html)

    with AsyncioExecutor() as executor:
        result = []
        urls = ["https://github.com/", "https://docs.aiohttp.org/"]
        for i in executor.map(httpget, urls):
            result.append(i)


* run functions by using submit


.. code:: python


    from concurrent.futures import as_completed
    import requests as rq
    from asyncio_executor import AsyncioExecutor

    def httpsync(url):
        req = rq.get(url)
        return len(req.text)

    with AsyncioExecutor() as executor:
        to_do = []
        urls = ["https://github.com/", "https://docs.aiohttp.org/"]
        for i in urls:
            job = executor.submit(httpsync, i)
            to_do.append(job)

        for future in as_completed(to_do):
            res = future.result()
            print(res)

* run functions by using map

.. code:: python


    from concurrent.futures import as_completed
    import requests as rq
    from asyncio_executor import AsyncioExecutor

    def httpsync(url):
        req = rq.get(url)
        return len(req.text)

    with AsyncioExecutor() as executor:

        result = []
        urls = ["https://github.com/", "https://docs.aiohttp.org/"]
        for i in executor.map(httpsync, urls):
            result.append(i)
    print(result)



Install
--------------------------------

- ``python -m pip install asyncio-executor``



Limitations
------------------------------

* only support python 3.5+