Code Challenge 03 - PyBites Blog Tag Analysis

PyBites, Mon 23 January 2017, Challenges

blog, codechallenges, Counter, github, learning, regex, similarity, tags

This week, each one of you has a homework assignment ... - Tyler Durden (Fight club)

Given our RSS feed what tags does PyBites mostly use and which tags should be merged (based on similarity)?

Example output:

$ python tags.py

* Top 10 tags:
python               10
learning             7
tips                 6
tricks               5
github               5
cleancode            5
best practices       5
pythonic             4
collections          4
beginners            4

* Similar tags:
game                 games
challenge            challenges
generator            generators

Get ready

Start coding by forking our challenges repo:

$ git clone https://github.com/pybites/challenges

If you already forked it sync it:

# assuming using ssh key
$ git remote add upstream git@github.com:pybites/challenges.git 
$ git fetch upstream
# if not on master: 
$ git checkout master 
$ git merge upstream/master

Use one of the templates:

$ cd 03
$ cp tags-help.py tags.py
# or:
$ cp tags-nohelp.py tags.py
# code

# run the unittests (optional)
$ python test_tags.py
...
----------------------------------------------------------------------
Ran 3 tests in 0.155s

OK

Requirements / steps

Good luck!

Remember: there is no best solution, only learning more and better Python.

Enjoy and we're looking forward reviewing on Friday all the cool / creative / Pythonic stuff you come up with.

Have fun!


Again to start coding fork our challenges repo or sync it.


About PyBites Code Challenges

More background in our first challenge article.