semvec/pypi-packages huggingface dataset:
py-snake 0.0.2
CLI Snake game.
Requires Python: >=2.7
Keywords: snake game python cli command line

Snake
-----
An interactive CLI Snake game, tested on Python 2.7 and 3.6 Posix environments.

![Applications list view](https://github.com/jakehadar/py-snake/blob/master/screenshots/screenshot@half.png)

Installation
------------
Install from PyPi using
[pip](http://www.pip-installer.org/en/latest/), a package manager for
Python.

``` {.sourceCode .bash}
 pip install py-snake
```

Or clone the repo and install using setuptools.

``` {.sourceCode .bash}
 cd path/to/repo
 python setup.py develop
```

Usage
-----
Start a new game by running `snake` from from command line. Optionally pass `--help` flag for more info.

``` {.sourceCode .bash}
$ snake --help
usage: snake [-h] [--width WIDTH] [--height HEIGHT] [--speed SPEED]
             [--food FOOD]

Snake game for CLI

optional arguments:
  -h, --help       show this help message and exit
  --width WIDTH    Frame width
  --height HEIGHT  Frame height
  --speed SPEED    Snake speed (fps)
  --food FOOD      Number of food pieces available
```


Uninstallation
--------------
Uninstall Snake completely using pip.

``` {.sourceCode .bash}
 pip uninstall py-snake
```
scrapy-warcio 0.0.8
Scrapy WARC I/O

Scrapy Warcio
=============

A Web Archive
[WARC](https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.0/)
I/O module for Scrapy

[![travis-ci](https://travis-ci.com/internetarchive/scrapy-warcio.svg?branch=master)](https://travis-ci.com/internetarchive/scrapy-warcio)


Install
-------

```shell
$ pip install scrapy-warcio
```


Usage
-----

1. Create a project and spider:<br>
   https://docs.scrapy.org/en/latest/intro/tutorial.html

```
$ scrapy startproject <project>
$ cd <project>
$ scrapy genspider <spider> example.com
```

2. Copy and edit `scrapy_warcio` distributed `settings.yml` with your
   configuration settings:

```yaml
---
warc_spec: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.0/
max_warc_size: 10000000000  # 10GB

collection: ~ # collection name
description: ~ # collection description
operator: ~ # operator email address
robots: ~  # robots policy (obey or ignore)
user_agent: ~ # your user-agent
warc_prefix: ~ # WARC filename prefix
warc_dest: ~ # WARC files destination
...
```

3. Export `SCRAPY_WARCIO_SETTINGS=/path/to/settings.yml`

4. Add `WarcioDownloaderMiddleware` (distributed as `middlewares.py`)
   to your `<project>/<project>/middlewares.py`:

```python
import scrapy_warcio


class WarcioDownloaderMiddleware:

    def __init__(self):
        self.warcio = scrapy_warcio.ScrapyWarcIo()

    def process_request(self, request, spider):
        request.meta['WARC-Date'] = scrapy_warcio.warc_date()
        return None

    def process_response(self, request, response, spider):
        self.warcio.write(response, request)
        return response
```

5. Enable `WarcioDownloaderMiddleware` in `<project>/<project>/settings.py`:

```
DOWNLOADER_MIDDLEWARES = {
    '<project>.middlewares.WarcioDownloaderMiddleware': 543,
}
```

6. Validate your warcs with `internetarchive/warctools`:

```shell
$ warcvalid WARC.warc.gz
```

7. Upload your WARC(s) to your favorite web archive!


Help
----

```shell
$ pydoc scrapy_warcio
```

or

```python
>>> help(scrapy_warcio)
```


TODO
----

Making this a Scrapy extension may make it more useful:<br>
https://docs.scrapy.org/en/latest/topics/extensions.html


@internetarchive