Coder Social home page Coder Social logo

nbdev_cards's Introduction

nbdev_cards

A deck of cards demo of nbdev basd on ideas from Think Python 2nd Edition by Allen B. Downey

Install

Install using:

pip install nbdev_cards

or:

conda install -c fastai nbdev-cards

How to use

This lib provides a Card class you can use to create, display, and compare playing cards:

Card(suit=1, rank=3)
(3, diamonds)

Suits are numbered according to the list:

suits
['clubs', 'diamonds', 'spade', 'hearts']

Another class this lib provides is Deck

Deck()
(A, clubs); (2, clubs); (3, clubs); (4, clubs); (5, clubs); (6, clubs); (7, clubs); (8, clubs); (9, clubs); (10, clubs); (J, clubs); (Q, clubs); (K, clubs); (A, diamonds); (2, diamonds); (3, diamonds); (4, diamonds); (5, diamonds); (6, diamonds); (7, diamonds); (8, diamonds); (9, diamonds); (10, diamonds); (J, diamonds); (Q, diamonds); (K, diamonds); (A, spades); (2, spades); (3, spades); (4, spades); (5, spades); (6, spades); (7, spades); (8, spades); (9, spades); (10, spades); (J, spades); (Q, spades); (K, spades); (A, hearts); (2, hearts); (3, hearts); (4, hearts); (5, hearts); (6, hearts); (7, hearts); (8, hearts); (9, hearts); (10, hearts); (J, hearts); (Q, hearts); (K, hearts)

nbdev_cards's People

Contributors

prp0x80 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.