semvec/pypi-packages huggingface dataset:
coolered 0.1.0
A better dslackw/colored
Keywords: development color terminal text codes ascii colored coolered color-terminal

# Disclaimer - This shit ain't done
# Coolered
## A better [dslackw/colored](https://github.com/dslackw/colored)
I read the readme of dslackw/colored for Python, and thought it was too complicated. This will be an interface so simple you memorize it immediately.

## Example
```
# Colors
color('red', 'This is red')
color('blue', 'This is blue')
color('yellow', 'This is yellow')

# Backgrounds
color('red', "This is red with a blue background", bg='blue')
color('blue', "This is blue with a yellow background", bg='yellow')


# That's it
```

## Color reference chart

## Installation
```
pip install coolered
```
## Uninstallation
```
pip uninstall coolered
```
py-quiz 0.3
Python based Quiz game.
Keywords: pyquiz tkinter

PyQuiz
PyQuiz is an interactive quiz game built with Python. The aim was to create and application and learn the basics of python GUI programming with TKinter. As I explored Tkinter more, I thought of developing this simplest game.

The PyQuiz opens up with multiple choice questions and increments your score with 5 as you answer correctly in the game and reduces 5 points for every incorrect answer. It also asks you for your confirmation while exiting the application.

Installation

To install PyQuiz! to your system,

`pip install py-quiz`

To run PyQuiz! just fire the command `py-quiz` in your terminal.

Things To-Do:
* ~~Create basic application~~
* ~~Add score counter~~
* ~~Add questions from JSON file.~~
* ~~Create a `pip` installer package~~
* ~~Confirm quit option~~
* Resize Window as per question length. ( If somebody can help me with this, it'll be great!)

Info

PyQuiz is maintained at https://github.com/abhijitnathwani/PyQuiz/
Any questions/suggestions are welcome. Feel free to drop an email: abhijit[dot]nathwani[at]gmail[dot]com or raise and issue with the repo.
bigcode-fetcher 0.1.2
Tool to search and fetch code from GitHub

# bigcode-fetcher

A utility to search and fetch code from GitHub.
This tool was build to easily create datasets for repository analysis.

The tool works in two phases, `search` finds repositories using the GitHub API,
and saves the result in a JSON file. `download` fetch all the repositories
inside the JSON file.

## Install

This tool can be installed by running

```
pip install bigcode-fetcher
```

or by fetching this repository and running

```
pip install .
```

in this directory.

## Usage

### `search` command

By default, the utility searches for repositories fulfilling the following conditions

* `size` between 1M and 100M
* `stars` count > 10
* non-viral `license` (MIT,Apache-2.0,MPL-2.0,BSD-2-Clause,BSD-3-Clause,BSD-4-Clause,MS-PL)

and retrieves the first 100 projects, ordered by number of stars.

To avoid API rate limiting, an access token can be provided either with the `--token`
CLI argument or with the `GITHUB_TOKEN` environment variable.

See the help to see all the options:

```
bigcode-fetcher search -h
```

#### Example

Search for all Apache commons projects written in Java

```
mkdir -p apache-common-projects
bigcode-fetcher search --language Java --user apache --stars '>0' --keyword commons --max-repos 500 -o apache-common-projects/apache-commons.json
```

### `download` command

This commands will simply `git clone` all the repositories in the
`JSON` generated by the `search` command.

To reduce the download size, only the latest revision is fetched by default (i.e. `git clone --depth 1`). This can be disabled by passing in the `--full` flag.

`USERNAME/REPO` will be fetched in `OUTPUT_DIR/USERNAME/REPO`, where
`OUTPUT_DIR` is set by the `--output` option.

The command will ignore the project if the directory already exists,
so running the command multiple times is safe, and recommended to make
sure all repositories have been fetched.

See the help for more information:

```
bigcode-fetcher download -h
```

#### Example

Download all the Apache commons project generated above

```
mkdir -p apache-common-projects/repositories
bigcode-fetcher download -i apache-common-projects/apache-commons.json -o apache-common-projects/repositories
```
lead_pipe 0.2.1
piping between functions in Python
Keywords: piping

lead_pipe
=========

.. image:: https://img.shields.io/circleci/project/github/brettbeatty/lead_pipe.svg
    :target: https://circleci.com/gh/brettbeatty/lead_pipe

.. image:: https://img.shields.io/github/license/brettbeatty/lead_pipe.svg
    :target: https://github.com/brettbeatty/lead_pipe/blob/master/LICENSE

.. image:: https://img.shields.io/codecov/c/github/brettbeatty/lead_pipe.svg
    :target: https://codecov.io/gh/brettbeatty/lead_pipe

.. image:: https://img.shields.io/pypi/v/lead_pipe.svg
    :target: https://pypi.org/project/lead_pipe/

Lead Pipe allows values to be piped from one function to the next without nesting the calls. For example, the following blocks of code are equivalent.

.. code-block:: python

    a = foo(bar(baz(8, 2), a=3), 4)

.. code-block:: python

    from lead_pipe import Pipe
    a = ~Pipe(8)(baz, 2)(bar, a=3)(foo, 4)

Basic Use
---------
Creating a Pipe
^^^^^^^^^^^^^^^
Pipelines begin with a base value passed to the Pipe constructor.

.. code-block:: python

    >>> from lead_pipe import Pipe
    >>> Pipe(3)
    Pipe(3)
    >>> Pipe('a')
    Pipe('a')

Piping Results
^^^^^^^^^^^^^^
Each instance of Pipe is callable and takes any number of arguments (at least one). The first argument is a function that gets called with the pipeline's value followed by the additional arguments and keyword arguments, if any.

.. code-block:: python

    >>> Pipe(3)(lambda x: x + 0.5)(lambda x: x ** 2)(int)('{} - {x} + {}'.format, 1, x=8)(eval)
    Pipe(5)

Obtaining Result
^^^^^^^^^^^^^^^^
Once your pipeline is finished, you can retrieve the result with the tilde (~) operator or through the pipe's 'value' attribute.

.. code-block:: python

    >>> ~Pipe(11)
    11
    >>> Pipe('foo').value
    'foo'
    >>> ~Pipe(2)(pow, 3)(str)
    '8'

Advanced Features
-----------------
Intermediate Pipes
^^^^^^^^^^^^^^^^^^
Since each step along the pipeline is its own instance of Pipe, an intermediate pipe can be saved to pipe to multiple functions.

.. code-block:: python

    >>> p = Pipe(4)(range)(zip, range(2, 6))
    >>> p
    Pipe([(0, 2), (1, 3), (2, 4), (3, 5)])
    >>> p(dict).value[2]
    4
    >>> ~p(lambda x: x[1][1])
    3

Apply
^^^^^
Sometimes a function may return another function rather than a value to be piped to another function. Apply is a helper function that continues the pipeline with the function returned.

.. code-block:: python

    >>> from lead_pipe import apply
    >>> ~Pipe('{} foo{a} {}'.format)(apply, 'bar', 'baz', a=3)
    'bar foo3 baz'

Reflect
^^^^^^^
Sometimes one may want to call a member function of a value in the pipeline. One way would be to pipe the value to getattr then to apply, but the reflect function is the combination of the two.

.. code-block:: python

    >>> from lead_pipe import reflect
    >>> ~Pipe({'a': 1, 'b': 2})(reflect, 'get', 'a')
    1

In this specific example, one could pipe the dictionary to dict.get, but reflect is more general.
matchstick 0.1.1
Pattern matching in Python
Keywords: pattern

Matchstick: pattern matching in Python
======================================

.. image:: https://img.shields.io/circleci/project/github/brettbeatty/hand_grenade.svg
    :target: https://circleci.com/gh/brettbeatty/hand_grenade

.. image:: https://img.shields.io/github/license/brettbeatty/hand_grenade.svg
    :target: https://github.com/brettbeatty/hand_grenade/blob/master/LICENSE

.. image:: https://img.shields.io/codecov/c/github/brettbeatty/hand_grenade.svg
    :target: https://codecov.io/gh/brettbeatty/hand_grenade

.. image:: https://img.shields.io/pypi/v/hand_grenade.svg
    :target: https://pypi.org/project/hand_grenade/

Matchstick provides a decorator that allows for the overloading of Python functions.

.. code-block:: python

    >>> from matchstick import when
    >>> @when('x >= 0')
    ... def f(x):
    ...     return x
    ...
    >>> @when('x < 0')
    ... def f(x):
    ...     return -x
    ...
    >>> f(3)
    3
    >>> f(-2)
    2
    >>> f('a')
    'a'

Basic Use
---------
Conditions
^^^^^^^^^^
The match decorator takes a condition as a string. When the decorated function gets called, overloaded functions (grouped by module and qualified name) are checked in the order they are defined. Each condition is evaluated with the arguments passed to the function (including default parameter values, where applicable). If the condition evaluates truthy, the corresponding function is called. If the condition evaluates falsy or raises an exception, the corresponding function is passed over.

.. code-block:: python

    >>> @when('x[2] == 5')
    ... def f(x):
    ...     return sum(x)
    ...
    >>> @when('len(x) > 3')
    ... def f(x):
    ...     return x[3:]
    ...
    >>> @when('True')
    ... def f(x):
    ...     return x
    ...
    >>> f([3, 4, 5, 6])
    18
    >>> f([0, 1, 2, 3])
    [3]
    >>> f('abcd')
    'd'
    >>> f({})
    {}

NoMatchException
^^^^^^^^^^^^^^^^
If none of the conditions for a function evaluate truthy, a *matchstick.NoMatchException* is raised.
livingbio-django-hashedfilenamestorage 2.1
A Django storage backend that names files by hash value.

``django-hashedfilenamestorage``
================================

A Django storage backend that names files by hash value.

By default, ``django.core.files.storage.FileSystemStorage`` deals with
conflicting filenames by appending an underscore to the file. For
instance, if you try to create ``hello.txt`` when it already exists,
it will rename it as ``hello_.txt``.

``django-hashedfilenamestorage`` creates hashed filenames, so if you
try to create ``hello.txt`` with the content ``Hello world!``, it will
save it as ``d3486ae9136e7856bc42212385ea797094475802.txt``. Directory
names and extensions are preserved, only the root filename is
changed. This reduces the number of duplicates stored in the
underlying backend, and implies that these files can be served from a
static cache that never expires.

Installing
----------

The easiest way to install ``django-hashedfilenamestorage`` is to use
**pip**::

    pip install django-hashedfilenamestorage


Quick Start
-----------

In your Django ``settings`` file:

* Set ``DEFAULT_FILE_STORAGE`` to
  ``'django_hashedfilenamestorage.storage.HashedFilenameFileSystemStorage'``

This gives you hashed filenames, backed on Django's
``FileSystemStorage`` storage class.


``HashedFilenameMetaStorage``
-----------------------------

You can define a new underlying storage class by using
``HashedFilenameMetaStorage`` to wrap it::

    from django.core.files.storage import get_storage_class

    from django_hashedfilenamestorage.storage import HashedFilenameMetaStorage

    HashedFilenameMyStorage = HashedFilenameMetaStorage(
        storage_class=get_storage_class('myapp.storage.MyStorage'),
    )


Hashing algorithm
-----------------

HashedFilenameMetaStorage is meant to generate duplicate filenames for
files with identical contents. To do this, it reads the contents of
the file and generates a SHA-1 hash of them.

Filenames have their extensions preserved, so it is possible to have
duplicate contents on the filesystem, but it is important to help
serve files with their proper content types.