semvec/pypi-packages huggingface dataset:
nhl-logo-scraper 1.1.0
Scrape logos for all NHL teams
License: MIT
Keywords: cli

================
NHL Logo Scraper
================

.. image:: https://badge.fury.io/py/nhl-logo-scraper.svg
    :target: https://badge.fury.io/py/nhl-logo-scraper

.. image:: https://codecov.io/gh/blindman/nhl-logo-scraper/branch/master/graph/badge.svg
  :target: https://codecov.io/gh/blindman/nhl-logo-scraper

.. image:: https://travis-ci.org/blindman/nhl-logo-scraper.svg?branch=master
    :target: https://travis-ci.org/blindman/nhl-logo-scraper

*Scrapes logos for all NHL teams, leagues, and networks*

Contents
========

.. contents::


Usage
=====

First clone the project.

::

    $ git clone https://github.com/blindman/nhl-logo-scraper.git

Once you've cloned the project, run the following commands to get the utility working in your terminal.

::

    $ pip install .
    $ nhlscraper --help

Scrape

::

    $ nhlscraper scrape [--output=DIR] [--format EXTENSIONS] [--archive]

--output=DIR            The directory to dump all of the files [default: ./output]

--format EXTENSIONS     Image output formats (svg and/or png) [default: svg]

--archive               Archive any previous logos that were downloaded [default: True]

--debug                 Allow debugging logs through

Clean

::

    $ nhlscraper clean [--dir=DIR] [--category CATEGORIES] [--full]

--dir=DIR               The directory that the files live in [default: ./output]

--category CATEGORIES   Categories to remove all files (league, network, team)

--full                  Clean all files created by this tool (includes archives)

--debug                 Allow debugging logs through

Other

::

    $ nhlscraper -h | --help

::

    $ nhlscraper --version


Contributing
============

Assuming you've cloned the project and created a virtualenv, run the following command to work with the code.

    $ virtualenv --python python3 venv
    $ source venv/bin/activate
    $ pip install -e .[test]

To test the code, run the following command.

    $ python setup.py test

Notes
=====

This is a fork of my old `imageDownloader`__ repository which did the same thing but as a bash script and for the previous version of nhl.com

__ https://github.com/blindman/imageDownloader

You may have noticed that `nhl.com`__ is requested and parsed to find ::code`nhl-logos.css` instead of retrieving the css file directly. This is because (I believe) the path to that file could potentially change. The current path is ::code::`.../builds/.../f0683b50089da6c16c1df297a9a74ce08e79b94b_1507226889/.../nhl-logos.css` and since the big chunk in the middle looks like a unique identifier I am going to assume it will change. I am looking to implement some sort of caching so it doesn't make a request every time.

__ https://www.nhl.com/


License
=======

MIT © [Jon Heller](https://github.com/blindman)
knapsack_python 0.1.3
Solves a variety of knapsack problems
License: MIT

|Build Status|

knapsack\_python: Solves a variety of knapsack problems
=======================================================

This package is a collection of solutions to various knapsack problems.
In particular, it has solutions to:

-  the 01 knapsack problem,
-  the 01 multi-knapsack problem (MKP),

and potentially more in the future. A good introduction to these sorts
of problems can be found on Wikipedia
(`here <https://en.wikipedia.org/wiki/Knapsack_problem>`__ and
`here <https://en.wikipedia.org/wiki/List_of_knapsack_problems>`__).
Additionally, it contains functions I've found useful in my work. One
such function is ``assign_all``, which assigns all items to one or more
knapsacks while trying to adhere as best as possible to the capacities
of each knapsack. Most of the solutions are a direct translation of the
solutions given in Silvano Martello and Paolo Toth excellent book
`*Knapsack Problems: Algorithms and Computer
Implementations* <http://epubs.siam.org/doi/abs/10.1137/1035174>`__.

The implementations of these solutions are all written in C++ and
wrapped in Cython for use in Python.

Quickstart
----------

Installation
~~~~~~~~~~~~

-  pip install knapsack\_python

or

-  git clone https://github.com/python\_knapsack
-  cd python\_knapsack
-  python setup.py install

Use
~~~

All functions live in the ``knapsack_python`` module.

Example
-------

Dependencies
------------

-  numpy

TODOs
-----

-  More comprehensive documentation
-  Implement other knapsack-related problems such as:

   -  0-1 Knapsack Problem (really a special case of MKP)
   -  Multiple-Choice Knapsack Problem
   -  Bounded/Unbounded Knapsack Problem
   -  Change-Making Problem
   -  Generalized Assignment Problem

.. |Build Status| image:: https://travis-ci.org/jhetherly/python_knapsack.svg?branch=master
   :target: https://travis-ci.org/jhetherly/python_knapsack

0.1.0
=====

-  Initial release with implementations of:

   -  The ``MTHM`` algorithm for solving the multi-knapsack problem
   -  A function to force assignment of all items while trying to
      respect the knapsacks' capacities as much as possible