semvec/pypi-packages huggingface dataset:
SimpleUpload 0.1.0
A HTTP Server for upload file.
License: MIT

SimpleUpload
=============

A HTTP Server for upload file.

安装
----

.. code-block::

    pip install SimpleUpload


配置文件
--------

使用环境变量指定配置文件的位置::

    export SIMPLE_UPLOAD_SETTINGS="{path}/simple_upload.cfg"


配置项
-------

==============  =====================================================
RANDOM_KEY      配置随机字符串，对应着提交的r字段，用于防止非法访问
CLIENT_PREFIX   本地文件路径的前缀
SERVER_PREFIX   服务器文件路径的前缀
==============  =====================================================

运行
----

可以使用unicorn运行，安装unicorn::

    pip install unicorn

启动::

    gunicorn -b :8000 http_upload.server:app


上传文件
--------

以HTTPie为例::

    http -f POST yldev.lankaifa.com:8000 r={your random string} path={local path} f@{local_path}

Virtual Studio Code
--------------------

可以结合vscode的插件Run on Save 或者Save and Run达到自动上传的目的

vscode的Save And Run插件的一个配置示例::

    "saveAndRun": {
        "commands": [
            {
                "match": "^/home/ubuntu/",
                "cmd": "http -f POST ip:port r=r参数 path=${file} f@${file}"
            }
        ]
    }
taskdb 0.0.1
Task DB
License: MIT
Keywords: sneaker bot development

taskdb
======

TaskDB runs common methods in a single thread

Motivation
----------

Threads sometimes need to run compute-heavy or network-heavy methods
that are expected to return a similar output. Webcrawlers and bots
acting on those crawlers may wish to decrease network load by limiting
requests to a single thread. TaskDB allows multiple threads to ask for
the result of a common function without requiring each thread to execute
the function.

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

Install this package through pip:

::

    $ pip install taskdb

Basic Usage
-----------

.. code:: python

    from taskdb import TaskDB

    def some_intesive_method(some_argument, some_other_argument):
        # Do something

    task_db = TaskDB()
    result = task_db.monitor('SOME_TASK_ID', some_intensive_method, (15, 20))
    print(result)
parseit 1.0.1
Simple parser that creates ASTs
License: MIT
Requires Python: >=2.7

ParseIt
=======

A simple parsing tool in 200 lines of python

Give it a grammar and tokens, and it’ll give you back an ast.

Inputs
------

Use the ``parse()`` function to parse text. The ``tokens`` parameter is
a dictionary of token names to compiled regular expressions. Prefixing a
token with ``%`` will ignore it. Token names must be uppercase.

The ``rules`` parameter is a dictionary of names to lists of rules, and
the ``start`` parameter is what node to start parsing first. ``postlex``
and ``postparse`` and post-processing functions. The default will:

-  after lexing remove all tokens that start with a ``%``
-  after parsing flatten all nodes with 1 child

Rules
~~~~~

A rule is a list of rulesegments. A rulesegment can be a string, which
means parse that TOKEN/rule_name. A list rule segement is a group, the
last item in it can be one of the following:

-  ``?``: this group is optional
-  ``+``: match at least one of this group, and possibly more
-  ``*``: match any number of this group, including zero

An example rule looks like this:

.. code:: python

    [["NUM", "?"], ["var", "*"]]

The rule dictionary is a dictionary of rule_names to lists of these
rules, each one being a possibility, like this:

.. code:: python

    {
        "multi_poly": [
            ["LPAREN", "polynomial", "RPAREN", "LPAREN", "polynomial", "RPAREN"],
            ["NUM", "LPAREN", "polynomial", "RPAREN"],
            ["polynomial"]
        ]
    }

Output
------

The tree format of ParseIt is very simple: for rule instances (nodes)
you have a tuple with the first value being the node name, and the
second being its children.

Tokens are represented as a tuple of: the token name, the token content,
and its position in the stream

``treeify``
-----------

There is also a module called treeify in the package that (if pydot is
installed) allows you to create a graphical representation of the
generated trees.

Example
-------

``example.py`` has an example grammar and code to convert the generated
tree into a pydot
task-runner 0.0.1
TaskRunner
License: MIT
Keywords: sneaker bot development

task-runner
===========

taskrunner runs your methods until they stop failing.

Motivation
----------

taskrunner is a crude way to force your methods to complete. This is
particularly useful when functions can be expected to throw exceptions
but shouldn’t stop execution. Effectively, taskrunner catches all
exceptions and makes sure that the result is not in a list of excluded
return values.

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

taskrunner is available via pip:

::

    $ pip install taskrunner

Usage
-----

.. code:: python

    from taskrunner import TaskRunner

    def some_function_that_may_throw(some_argument, another_argument):
        # Do something

    task_runner = TaskRunner()
    result = task_runner.run_until_complete(target=some_function_that_may_throw, args=('123','456'))
    print(result) # Hopefully something useful