semvec/pypi-packages huggingface dataset:
module_name 0.5.1
Simple Module to resolve module namespace
License: MIT

module\_name
============

Simple module to make it easy to run python files with ``-m`` flag.

The benefits of running with ``-m`` is that your relative imports will
work. Running a python file as a script doesn't understand that it is
part of a package.

::

    usage: py-module-name [-h] [-f] [-d] path

    positional arguments:
      path         path to python file

    optional arguments:
      -h, --help   show this help message and exit
      -f, --flag   Will output -m flag if path is importable
      -d, --debug  Debug

Examples
--------

::

    > py-module-name module_name/resolve.py
    module_name.resolve

    > py-module-name -f module_name/resolve.py
    -m 'module_name.resolve'

    > py-module-name -f /tmp/not_package/standalone.py
    '/tmp/not_package/standalone.py'

The ``-f`` flag is useful for use with scripting. I use it from my
``.vimrc`` to run files I am editing.

.vimrc
------

::

    autocmd FileType python map <buffer> <S-r> :w<CR>:!tmux send-keys -t :.{bottom-right} "\%time \%run `py-module-name -f %:p`" enter<CR><CR>
tmc 1.0.2
TestMyCode client
License: MIT

tmc.py `docs`_
==============

``tmc.py`` is a commandline client for working with a `TestMyCode
server`_. It aims to have all of the features of `tmc-netbeans`_.

installation
------------

Requires ``Python 3.2`` + and ``pip`` / ``virtualenv``. If you have root access

::

    sudo pip3 install tmc

otherwise

::

    curl -L https://rawgit.com/JuhaniImberg/tmc.py/master/tmcpy-inst.sh | bash

If you are running a Windows OS, please install `curses`_ for Python.

If you want to try out the git version you can do so by cloning this repository,
activating your virtualenv and ``./setup.py install``.

tutorial / usage
----------------

`See here`_

version numbers
---------------

`SemVer`_ will be adopted starting with the 1.0.0 release.

license
-------

MIT, see ``LICENSE``

.. _docs: https://JuhaniImberg.github.io/tmc.py/
.. _TestMyCode server: https://github.com/testmycode/tmc-server
.. _tmc-netbeans: https://github.com/testmycode/tmc-netbeans
.. _See here: https://JuhaniImberg.github.io/tmc.py/tutorial.html
.. _curses: http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses
.. _SemVer: http://semver.org/
pip-pop 0.1.1
pip-pop manages your requirements files.
License: MIT

pip-pop
=======

Working with lots of ``requirements.txt`` files can be a bit annoying.
Have no fear, **pip-pop** is here!

(work in progress)

Planned Commands
----------------

``$ pip-diff [--fresh | --stale] <reqfile> <reqfile>``

Generates a diff between two given requirements files. Lists either stale or fresh packages.

``$ pip-grep <reqfile> <package>...``

Takes a requirements file, and searches for the specified package (or packages) within it.
Essential when working with included files.


Possible Future Commands
------------------------

- Install with blacklisting support (wsgiref, distribute, setuptools).
critbot 0.1.19
Sending critical errors to syslog, slack, email, {your_plugin}.
License: MIT

Install::

    pip install critbot

Add to "config.py" file::

    import critbot.plugins.syslog
    import critbot.plugins.slack
    import critbot.plugins.email
    from critbot import crit_defaults
    import logging

    crit_defaults.subject = 'MyService host:port CRIT'

    crit_defaults.plugins = [
        critbot.plugins.syslog.plugin(),
        critbot.plugins.slack.plugin(
            token='Get it from https://my.slack.com/services/new/bot',
            channel='#general', # '@private' or '#channel'
            users='', # '@user1 @user2 @userN'
        ),
        critbot.plugins.email.plugin(
            to='Name1 <user1@example.com>, Name2 <user2@example.com>',
            user='critbot@example.com', # Add more config if not GMail.
            password='pa$$word',
        ),
    ]

    crit_defaults.crit_in_crit = logging.getLogger('critbot').critical

Check other config options and their defaults, e.g. "seconds_per_notification=60" and "spam=False":

* https://github.com/denis-ryzhkov/critbot/blob/master/critbot/core.py#L23 - "crit_defaults"

* https://github.com/denis-ryzhkov/critbot/blob/master/critbot/core.py#L38 - "crit"

* https://github.com/denis-ryzhkov/critbot/blob/master/critbot/plugins/syslog.py#L17

* https://github.com/denis-ryzhkov/critbot/blob/master/critbot/plugins/slack.py#L14

* https://github.com/denis-ryzhkov/critbot/blob/master/critbot/plugins/email.py#L14

Use "crit" in other files of your project::

    from my_project import config
    from critbot import crit

    try:
        1/0
    except Exception:
        crit()
        # More processing if needed.

    try:
        1/0
    except Exception:
        crit(also='test2')

    if True:
        crit('test3')

If you are using http://supervisord.org/  
then you can monitor stderr, EXITED and FATAL states with::

    [eventlistener:critvisor]
    command=critvisor /path/to/config.py
    events=PROCESS_LOG_STDERR,PROCESS_STATE_EXITED,PROCESS_STATE_FATAL

    [program:my_program]
    stderr_events_enabled=true

    Optional "crit_defaults.skip_stderrs" list allows to avoid some "safe" crits.
    Optional "crit_defaults.max_stderr_crit_length" allows to save e.g. Slack from being broken.

If you want to convert stderr of your small scripts to crits::

    stdcrit /path/to/config.py /path/to/script.py arg...

To stop spam from multiple processes on the same host::

    crit_defaults.stop_spam_file.enabled = True
    # "crit_defaults.stop_spam_file.path" defaults to "/run/lock/critbot" - RAM, no disk IO.

To stop spam from multiple hosts::

    apt-get install libmemcached-dev zlib1g-dev
    pip install pylibmc
    crit_defaults.mc.enabled = True

    And either "apt-get install memcached"
    or update "crit_defaults.mc.servers" list.

Please fork https://github.com/denis-ryzhkov/critbot
and create pull requests with new plugins inside.
django-polls_1_10 0.1
A simple Django app to conduct Web-based polls. (For django 1.10)
License: MIT
Keywords: sample setuptools development django polls app tutorial example

=====
Polls
=====

Polls is a simple Django app to conduct Web-based polls. For each
question, visitors can choose between a fixed number of answers.

Detailed documentation is in the "docs" directory.

Quick start
-----------

1. Add "polls" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...
        'polls',
    ]

2. Include the polls URLconf in your project urls.py like this::

    url(r'^polls/', include('polls.urls')),

3. Run `python manage.py migrate` to create the polls models.

4. Start the development server and visit http://127.0.0.1:8000/admin/
   to create a poll (you'll need the Admin app enabled).

5. Visit http://127.0.0.1:8000/polls/ to participate in the poll.