Code Challenge 11 - Generators for Fun and Profit

Posted by PyBites on Mon 20 March 2017 in Challenges • Tagged with codechallenges, learning, generators, unix, newquote • 2 min read

A new week, a new 'bite' of Python coding! After last week's article on generators we will get you to practice a bit more with them in our new challenge. Good luck and have fun.


Continue reading

Generators are Awesome, Learning by Example

Posted by Julian on Fri 17 March 2017 in Concepts • Tagged with python, tips, code, pybites, generators, iteration, yield • 5 min read

Learn what a Generator is and check out some different examples.


Continue reading

Code Challenge 09 - The With Statement and Context Managers

Posted by PyBites on Mon 06 March 2017 in Challenges • Tagged with codechallenges, learning, with, contextlib, contextmanagers, decorators, generators • 1 min read

A new week, more coding! This week we have a free form exercise. This week you will implement your own Context Manager (= support with on your object).


Continue reading

5 tips to speed up your Python code

Posted by Bob on Tue 21 February 2017 in Best practices • Tagged with performance, data structures, pythonic, generators, map, builtin, algorithms, regex, patterns • 5 min read

In this post I will give you 5 tips to speed up your code.


Continue reading

Code Challenge 01 - Word Values Part I - Review

Posted by PyBites on Fri 13 January 2017 in Challenges • Tagged with codechallenges, code review, HN, github, learning, max, generators, scrabble, refactoring • 5 min read

Wow! We have been amazed by the great response on github and HN. It's Friday so we review the code challenge of this week. We describe our learning and a possible solution. We will also digest comments left on the Monday post.


Continue reading

5 cool things you can do with itertools

Posted by Bob on Thu 12 January 2017 in Modules • Tagged with iterators, itertools, tricks, generators, game, notebooks, permutations • 2 min read

Itertools is a very useful module. In this short post I show some 5 examples how you can use it. Some of this stuff might be useful in next week's challenge ...


Continue reading

3.6 new features

Posted by Bob on Sat 31 December 2016 in News • Tagged with 3.6, features, release, asyncio, formatting, typing, dicts, secrets, generators, readability • 3 min read

Finally got a chance to look into Python 3.6's new features. In this post some highlights and pointers.


Continue reading

How to create a nice-looking HTML page of your Kindle book highlights (notes)

Posted by Bob on Tue 27 December 2016 in Tools • Tagged with kindle, Template strings, json, html, books, bookcision, generators • 2 min read

In this post I share a simple script to convert Bookcision JSON into a HTML page for your blog.


Continue reading