Bite 3. Word Values
Find the dictionary word with the highest value using Scrabble rules. There are three tasks to complete for this Bite: Finish β¦
|
3.10
freebie
max
Scrabble
sum
|
3.83β¬β¬β¬β¬
|
0
|
Bite 4. Top 10 PyBites tags
In this Bite you will find the top ten tags found in the PyBites blog XML feed (e.g. Python, Flask, Django, β¦
|
3.10
Counter
xml
|
4.81β¬β¬β¬β¬β¬
|
0
|
Bite 6. PyBites Die Hard
Given a listing of files for our community branch, determine: - Who opened the most pull requests (excluding PyBites)? - β¦
|
3.10
Counter
file processing
generators
namedtuple
|
5.44β¬β¬β¬β¬β¬
|
0
|
Bite 7. Parsing dates from logs
In this Bite we will look at this short server log, finding the first and last system shutdown events: INFO 2014-07-03T23:27:51 β¦
|
3.10
datetime
file processing
|
5.72β¬β¬β¬β¬β¬β¬
|
0
|
Bite 9. Palindromes
Write a function to determine if a word or phrase is a palindrome. Then write a second function to receive β¦
|
3.10
algorithms
list comprehensions
max
reverse
|
4.35β¬β¬β¬β¬
|
0
|
Bite 10. Practice exceptions
In this Bite you'll learn to catch and raise Python exceptions. Write a simple division function meeting the following requirements: β¦
|
3.10
exception handling
raise
|
2.92β¬β¬β¬
|
0
|
Bite 12. Write a user validation function
Create a function that takes a username and checks for a valid user: 1. The username is in USERS 2. The β¦
|
3.10
classes
exception handling
namedtuple
|
4.43β¬β¬β¬β¬
|
0
|
Bite 13. Convert dict to namedtuple/json
Write a function to convert the given blog dict to a namedtuple Write a second function to convert the resulting β¦
|
3.10
dict
json
namedtuple
|
3.64β¬β¬β¬β¬
|
0
|
Bite 14. Generate a table of n sequences
Write a function that receives one or more sequences. The sequences are already defined for you. The function should return β¦
|
3.10
generators
zip
|
5.0β¬β¬β¬β¬β¬
|
0
|
Bite 17. Form teams from a group of friends
Write a function called friends_teams that takes a list of friends, a team_size (type int, default=2) and order_does_matter (type bool, β¦
|
3.10
itertools
|
3.55β¬β¬β¬β¬
|
0
|
Bite 18. Find the most common word
Write a function that returns the most common (non stop)word in this Harry Potter text. Make sure you convert to β¦
|
3.10
Counter
data analysis
list comprehensions
|
5.1β¬β¬β¬β¬β¬
|
0
|
Bite 22. Write a decorator with argument
Write a decorator called make_html that wraps text inside one or more html tags. As shown in the tests decorating β¦
|
3.10
decorators
|
5.68β¬β¬β¬β¬β¬β¬
|
0
|
Bite 25. No promo twice, keep state in a class
In this bite a real world scenario: PyBites has a growing set of Bites and gives away promos. They choose β¦
|
3.10
classes
exception handling
properties
|
5.58β¬β¬β¬β¬β¬β¬
|
0
|
Bite 27. Parse omdb movie json data
Working with APIs is very common these days and lucky for us they increasingly return JSON (over XML). We saved β¦
|
3.10
APIs
glob
json
movie data
|
4.57β¬β¬β¬β¬β¬
|
0
|
Bite 28. Converting date strings to datetimes
In this Bite you are provided with a list of publish dates of all our PyBites blog posts. They are β¦
|
3.10
Counter
datetime
findall
|
4.09β¬β¬β¬β¬
|
0
|
Bite 30. Movie data analysis
In this Bite we are going to parse a csv movie dataset to identify the directors with the highest rated β¦
|
3.10
data analysis
defaultdict
freebie
mean
movie data
namedtuple
sorting
|
5.86β¬β¬β¬β¬β¬β¬
|
0
|
Bite 33. Transpose a data structure
Sometimes you need to restructure a nested data structure. For example you can convert a dict in a list of β¦
|
3.10
dict
zip
|
4.6β¬β¬β¬β¬β¬
|
0
|
Bite 35. Having fun with heapq
In this Bite you are provided with 3 data structures: a list of ints, a list of datetimes, and a β¦
|
3.10
datetime
heapq
|
2.82β¬β¬β¬
|
0
|
Bite 36. Having fun with *args and **kwargs
Write a function called get_profile that takes: a required name, a required age, one or more optional sports (args), one β¦
|
3.10
args
function arguments
kwargs
|
2.56β¬β¬β¬
|
0
|
Bite 39. Calculate the total duration of a course
In this Bite you read in a text file with course times (MM:SS) per video. You extract these and calculate β¦
|
3.10
datetime
findall
numbers
timedelta
|
4.3β¬β¬β¬β¬
|
0
|
Bite 41. Write a login_required decorator
If you worked with Flask or Django you must have seen routes being decorated to enforce authentication. In this Bite β¦
|
3.10
decorators
functools
|
3.71β¬β¬β¬β¬
|
0
|
Bite 47. Write a new password field validator
You know these Create a new password forms? They do a lot of checks to make sure you make a β¦
|
3.10
re
string module
|
3.55β¬β¬β¬β¬
|
0
|
Bite 48. Make a bar chart of new Safari books
Some time ago we made a little Slack bot to post new titles added to Safari to Slack. And luckily β¦
|
3.10
bar chart
data analysis
|
5.09β¬β¬β¬β¬β¬
|
0
|
Bite 49. Scrape Packt's html with BeautifulSoup
In this Bite you will parse Packt's free learning ebook site extracting the html for the daily free ebook: As β¦
|
3.10
beautifulsoup
namedtuple
requests
|
5.25β¬β¬β¬β¬β¬
|
0
|
Bite 51. When does Python 2 die on Planet Miller?
Imagine you landed on Planet Miller (from the movie Interstellar) where 1 hour takes 7 Earth years (known as the β¦
|
3.10
datetime
|
3.5β¬β¬β¬β¬
|
0
|
Bite 57. Create a simple calculator that receives command line arguments
In this Bite you write a simple calculator that can perform additions (add), subtractions (sub), multiplications (mul) and divisions (div). β¦
|
3.10
argparse
functools
reduce
|
6.56β¬β¬β¬β¬β¬β¬β¬
|
0
|
Bite 59. Create a multiplication table class of variable length
Danny does not like rote learning (nor do we!). He is asked to remember multiplication tables of considerable size π β¦
|
3.10
classes
dunder methods
exception handling
numbers
|
4.33β¬β¬β¬β¬
|
0
|
Bite 60. Create a deck of Uno cards
In this Bite you will create a deck of Uno cards. Here is the equipment requirement as described here - β¦
|
3.10
list
list comprehensions
namedtuple
|
3.6β¬β¬β¬β¬
|
0
|
Bite 62. Data structures matter - speed up your Python code
In this Bite we provide you with 5 functions which you have to try to make faster. Some require different β¦
|
3.10
data structures
performance
|
4.0β¬β¬β¬β¬
|
0
|
Bite 65. Get all valid dictionary words for a draw of letters
This Bite focusses on the use of itertools. To that extend you complete get_possible_dict_words and _get_permutations_draw to get all valid β¦
|
3.10
itertools
Scrabble
set
|
6.65β¬β¬β¬β¬β¬β¬β¬
|
0
|
Bite 70. Create your own iterator
In this Bite you make an iterator called EggCreator by implementing the __iter__ and __next__ dunder methods (as dictated by β¦
|
iterators
random
|
3.43β¬β¬β¬
|
0
|
Bite 71. Keep state in a class + make its instance callable
In this Bite you write a small class to keep track of the max score in a game. When called β¦
|
3.10
classes
dunder methods
|
2.67β¬β¬β¬
|
0
|
Bite 72. Retrieve the right Ninja Belt based on score
As you have probably seen on the dashboard you can now gain Ninja Belts based on the amount of points β¦
|
3.10
itertools
OrderedDict
|
4.2β¬β¬β¬β¬
|
0
|
Bite 73. Organize a meeting between timezones (pytz)
Help PyBites community friends find a reasonable common time to meet! Complete the function below receiving a UTC datetime and β¦
|
3.10
pytz
timezones
|
5.88β¬β¬β¬β¬β¬β¬
|
0
|
Bite 78. Find programmers with common languages
Similar as last Bite we do another comparison of sequences exercise. Here is the deal: you are in charge of β¦
|
3.10
set
set operations
|
2.89β¬β¬β¬
|
0
|
Bite 79. Parse a csv file and create a bar chart
We played a bit with the Slack API today and wow: our PyBites community is super international! We really enjoy β¦
|
3.10
bar chart
community
csv
requests
|
5.0β¬β¬β¬β¬β¬
|
0
|
Bite 81. Filter and order tweets by polarity values
In this Bite we collected some random tweets and populated a list of namedtuples of text and a polarity rating β¦
|
3.10
namedtuple
TextBlob
Twitter
|
2.67β¬β¬β¬
|
0
|
Bite 82. Define a Score Enum and customize it adding methods
Starting Python 3.4 there is support for enumerations (not to confuse with the enumerate builtin). You can define a class β¦
|
3.10
classmethod
enum
__str__
|
3.17β¬β¬β¬
|
0
|
Bite 84. Flatten lists recursively (Droste Bite)
Complete flatten that takes a list of lists (which can have lists ad infinitum) and flatten them into a one β¦
|
3.10
list
recursion
|
4.38β¬β¬β¬β¬
|
0
|
Bite 86. Create a RGB-to-Hex converter
Designer Mary wants to convert her CSS from statements like background-color: rgb(128, 128, 0); to: background-color: #808000;. Don't worry, you β¦
|
3.10
string formatting
|
2.75β¬β¬β¬
|
0
|
Bite 87. Convert Decimal to Roman Numerals
Complete romanize that takes a decimal number and converts it to its Roman Numeral equivalent. If a non int or β¦
|
3.10
numbers
OrderedDict
|
3.83β¬β¬β¬β¬
|
0
|
Bite 89. Playing with lists and dicts
In this Bite you are presented with a us_state_abbrev dict and a states list. Complete the four methods in the β¦
|
3.10
data structures
dict
list
|
3.54β¬β¬β¬β¬
|
0
|
Bite 90. What South Park characters talk most?
Did we already tell you we love the collections module? In this Bite we combine its defaultdict and Counter data β¦
|
3.10
Counter
csv
data analysis
defaultdict
requests
|
8.0β¬β¬β¬β¬β¬β¬β¬β¬
|
0
|
Bite 92. Humanize a datetime
In this Bite you will convert a timedelta object into something readable. We know: there are modules to do it, β¦
|
3.10
datetime
namedtuple
|
5.44β¬β¬β¬β¬β¬
|
0
|
Bite 95. Subclass the dict built-in
In this Bite you will subclass the dict built-in to support a birthday dictionary. This dictionary takes names as keys β¦
|
3.10
classes
inheritance
|
4.5β¬β¬β¬β¬
|
0
|
Bite 97. BeautifulSoup II - scrape US holidays
In this Bite we use BeautifulSoup to scrape US holidays from OfficeHolidays to make a lookup of holidays per month. β¦
|
3.10
beautifulsoup
defaultdict
dict
|
4.94β¬β¬β¬β¬β¬
|
0
|
Bite 99. Write an infinite sequence generator
Write a generator that produces the sequence [1, 'A', 2, 'B', 3, 'C', ... 'X', 25, 'Y', 26, 'Z'] infinitely. β¦
|
3.10
generators
itertools
string module
zip
|
3.67β¬β¬β¬β¬
|
0
|
Bite 111. Use the ipinfo API to lookup IP country
In this Bite you will use the requests library to make a GET request to the ipinfo service. Use IPINFO_URL β¦
|
3.10
APIs
json
mock.patch
requests
|
1.9β¬β¬
|
0
|
Bite 113. Filter words with non-ascii characters
In this Bite you extract words from a text that contain non-ascii characters. So Fichier non trouvé would return a β¦
|
3.10
all
ascii
ord
unicode
|
2.78β¬β¬β¬
|
0
|
Bite 114. Implement a Color class with staticmethod
As the new junior developer, you have been charged with enhancing the Color class. Your task will be to implement β¦
|
3.10
hex
__repr__
staticmethod
__str__
string module
|
6.33β¬β¬β¬β¬β¬β¬
|
0
|
Bite 116. List and filter files in a directory
In this Bite you complete get_files that receives a dirname and size_in_kb (note kb, not bytes). There are two things β¦
|
3.10
generators
glob
os module
|
3.0β¬β¬β¬
|
0
|
Bite 118. List exercise: return first occurrence indices of duplicated words
In this Bite you are presented with a list of words. Loop through them and find all the words that β¦
|
3.10
counting
list comprehensions
set
|
2.3β¬β¬
|
0
|
Bite 119. Xmas tree generator
In this Bite you complete generate_xmas_tree that takes a rows arg (= height of the tree). For each row you β¦
|
3.10
default args
join
range
string formatting
|
2.17β¬β¬
|
0
|
Bite 120. Write a numbers validation decorator
Let's get some more practice with decorators ... in this Bite you will write a decorator that checks if input β¦
|
3.10
decorators
|
3.0β¬β¬β¬
|
0
|
Bite 122. Check if two words are anagrams
An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using β¦
|
3.10
anagram
string matching
|
2.5β¬β¬
|
0
|
Bite 123. Find the user with most friends
In this Bite you are presented with a users dict of keys=id's and values=usernames and a friendships list of user β¦
|
3.10
defaultdict
looping
sorting
tuples
|
4.67β¬β¬β¬β¬β¬
|
0
|
Bite 125. Get the most recommended books
The Tim Ferriss Show is full of wisdom and inspiration. It can also quickly fill up your book shelves because β¦
|
3.10
beautifulsoup
Counter
default args
list comprehensions
requests
|
5.85β¬β¬β¬β¬β¬β¬
|
0
|
Bite 127. Return the right ordinal suffix for a number
In this Bite you complete a function that takes an int and returns it appended with the right suffix: 1 β¦
|
3.10
dict
modulo
numbers
string manipulation
|
2.0β¬β¬
|
0
|
Bite 129. Analyze Stock Data
In this Bite we will answer some questions about stocks, using some JSON data obtained from the awesome Mockeroo fake β¦
|
3.10
counting
data analysis
json
requests
sorting
string manipulation
|
4.25β¬β¬β¬β¬
|
0
|
Bite 132. Find the word with the most vowels
Finish the get_word_max_vowels function below that takes a text string as its input argument and returns a tuple of the β¦
|
3.10
counting
lambda
list comprehensions
string matching
|
2.43β¬β¬
|
0
|
Bite 135. Sort a list of book objects
In this Bite you are going to look at a list of Book namedtuples and sort them by various criteria. β¦
|
3.10
attrgetter
datetime
lambda
list
namedtuple
operator
sorting
|
2.12β¬β¬
|
0
|
Bite 137. Gourmets' Nightmare
Many gourmets struggle to find the perfect pairing of wines and cheeses. A number of considerations are relevant, each of β¦
|
3.10
Counter
intersection
operator
sorting
|
7.5β¬β¬β¬β¬β¬β¬β¬β¬
|
0
|
Bite 138. OOP fun at the Zoo
Finish the Animal class below adding one or more class variables and a classmethod so that the following code: dog β¦
|
3.10
classes
classmethod
itertools
__str__
|
5.15β¬β¬β¬β¬β¬
|
0
|
Bite 140. PyBites First Pandas Bite
This is a Pandas proof-of-concept Bite. We just added the library to our platform! For this Bite you find out β¦
|
3.10
csv
data analysis
pandas
|
5.75β¬β¬β¬β¬β¬β¬
|
0
|
Bite 141. Primitive date format inferrer
Complete the get_dates method given the following: a listing of date strings in unknown date format and an enum class β¦
|
3.10
classmethod
datetime
enum
exception handling
|
6.67β¬β¬β¬β¬β¬β¬β¬
|
0
|
Bite 142. Exception Handling: Calculate the Winning Player
Complete the two functions below: calculate_score takes a list of dice roll scores and returns the total score only taking β¦
|
3.10
exception handling
namedtuple
numbers
|
1.67β¬β¬
|
0
|
Bite 144. Calculate the Number of Months Passed
Some more fun working with dates! In this Bite you will calculate the number of months between the fixed START_DATE β¦
|
3.10
datetime
dateutil
exception handling
|
3.86β¬β¬β¬β¬
|
0
|
Bite 146. Rhombus generator
In this Bite you make a generator of rhombus shapes. You will complete gen_rhombus that when called like this: gen β¦
|
3.10
format
f-strings
string formatting
|
1.86β¬β¬
|
0
|
Bite 147. 100 WEEKDays of Code Date Range
Doing a #100DaysOfCode can be challenging, and some of it is because you dedicate to do it on workdays AND β¦
|
3.10
datetime
dateutil
|
3.86β¬β¬β¬β¬
|
0
|
Bite 148. Print Car Data Grouped by Manufacturer
In this Bite you are presented with a list of car (manufacturer, model) tuples. Group the data by manufacturer printing β¦
|
3.10
data structures
itertools
operator
sorting
|
2.8β¬β¬β¬
|
0
|
Bite 150. Turn messy CSV into JSON
At the 1 year mark of our platform here is Bite 150! In this Bite you are presented with some β¦
|
3.10
csv
json
pandas
re
string manipulation
|
4.88β¬β¬β¬β¬β¬
|
0
|
Bite 151. Contemporary Composers
You are given a list of operas and a list of composers. For two given composers find operas (where one β¦
|
3.10
datetime
dict
exception handling
generators
namedtuple
|
4.38β¬β¬β¬β¬
|
0
|
Bite 154. Write your own Data Class
As you might have noticed we are now on Python 3.7 so time for a Bite on data classes which β¦
|
3.10
dataclasses
data structures
hashable
sorting
type hinting
|
3.1β¬β¬β¬
|
0
|
Bite 155. Split a string by spaces or quoted text
Another text manipulation Bite. Code split_words_and_quoted_text that takes a text string and splits it by space, except words that are β¦
|
3.10
split
string manipulation
|
4.22β¬β¬β¬β¬
|
0
|
Bite 156. Make an index of story characters
You know the index at the end of a book where you look up which pages people and terms occur? β¦
|
3.10
collections
defaultdict
enumerate
sorting
string matching
|
5.64β¬β¬β¬β¬β¬β¬
|
0
|
Bite 157. Filter out accented characters
Another unicode Bite. Given some non-English text with accents (á, é, í, used in Spanish for example), extract the accented β¦
|
3.10
string matching
unicode
|
3.25β¬β¬β¬
|
0
|
Bite 159. Create a simple calculator
In this Bite you will create a simple calculator. It takes a string of num1 operator num2 which you convert β¦
|
3.10
exception handling
numbers
operator
|
2.57β¬β¬β¬
|
0
|
Bite 162. Vertically align output of counters
In this Bite you are tasked with "physically" aligning the number of comments on a webpage. For some reason you β¦
|
3.10
string formatting
|
1.89β¬β¬
|
0
|
Bite 163. Which packages were upgraded?
In this Bite you compare a list of packages (aka requirement.txt) from before vs. after (pip) upgrade. Check the TESTS β¦
|
3.10
comparison
dict
numbers
string manipulation
|
3.71β¬β¬β¬β¬
|
0
|
Bite 166. Complete a tox ini file parser class
The INI file format is an informal standard for configuration files for some platforms or software. (Wikipedia). In this Bite β¦
|
3.10
classes
configparser
properties
string matching
string parsing
tox
|
6.31β¬β¬β¬β¬β¬β¬
|
0
|
Bite 173. Set up future notifications
Let's do another datetime processing Bite. Complete add_todo below that converts time units to future timestamps. Here is how it β¦
|
3.10
datetime
findall
f-strings
timedelta
|
4.83β¬β¬β¬β¬β¬
|
0
|
Bite 175. Find missing dates
Complete get_misssing_dates that takes an (unordered) sequence of datetime.date objects. It should determine what the start and end date of β¦
|
3.10
datetime
dateutil
pandas
|
3.0β¬β¬β¬
|
0
|
Bite 178. Parse PyBites blog git commit log
In this Bite we want to figure out how active we've been on our blog. To start our data analysis β¦
|
3.10
Counter
data analysis
datetime
dateutil
string parsing
|
5.75β¬β¬β¬β¬β¬β¬
|
0
|
Bite 182. Parse a bunch of quotes from HTML
Let's get some inspiration. Below you find the simplified HTML of Richard Branson's My top 10 quotes on living life β¦
|
3.10
dict
regular expressions
string manipulation
string parsing
|
3.62β¬β¬β¬β¬
|
0
|
Bite 184. Analyze some Bite stats data
In this Bite we will look at some Bite stats logs (usernames have been anonymized!): $ head -5 bite_output_log.txt bite,user,completed β¦
|
3.10
Counter
csv
data analysis
set
|
4.0β¬β¬β¬β¬
|
0
|
Bite 185. Create a simple spelling suggester
In this Bite you will write a simple spelling corrector. Complete suggest_word that receives a misspelled word argument and returns β¦
|
3.10
difflib
SequenceMatcher
string matching
|
3.12β¬β¬β¬
|
0
|
Bite 186. Calculate number of books to have read at date ...
For this Bite you are asked to start working on a reading goal feature for PyBites My Reading List. Code β¦
|
3.10
datetime
dateutil
exception handling
|
4.0β¬β¬β¬β¬
|
0
|
Bite 187. Actor/actress age at movie release
Ever wondered how old an actor/actress was in a particular movie? In this Bite you will write some code to β¦
|
3.10
dataclasses
dateutil
f-strings
|
2.75β¬β¬β¬
|
0
|
Bite 190. Parse income distribution from Latin America XML
In this Bite you are going to parse some Latin American countries in xml, specifically the output of api.worldbank.org/V2/country?region=LCN which β¦
|
3.10
data analysis
defaultdict
xml
|
5.0β¬β¬β¬β¬β¬
|
0
|
Bite 191. Starwars character with highest BMI
In this Bite you will parse a multiline string of SWAPI Starwars characters. Calculate the BMI of each character returning β¦
|
3.10
max
operator
string manipulation
tuple unpacking
|
1.78β¬β¬
|
0
|
Bite 193. Most upvoted StackOverflow Python questions
In this Bite you parse a copy of StackOverflow Python questions which we cached here Retrieve + parse this URL β¦
|
3.10
beautifulsoup
requests
sorting
string matching
web scraping
|
5.4β¬β¬β¬β¬β¬
|
0
|
Bite 194. Add caching to a Fibonacci function
In this Bite you will learn about memoization: In computing, memoization or memoisation is an optimization technique used primarily to β¦
|
3.10
cache
fibonacci
functools
performance
|
2.75β¬β¬β¬
|
0
|
Bite 195. Analyze NBA Data with sqlite3
In this Bite you are going to use sqlite3! We loaded some NBA data into a players DB table: Complete β¦
|
3.10
data analysis
databases
SQL
sqlite3
|
5.0β¬β¬β¬β¬β¬
|
0
|
Bite 197. What date is Mother's Day celebrated?
It's the 12th of May 2019 when we write this so happy Mother's Day! In many countries this special day β¦
|
3.10
datetime
dateutil
|
2.0β¬β¬
|
0
|
Bite 199. Multiple inheritance (__mro__)
Implement the following class structure: print(Child.__mro__): (<class '__main__.Child'>, <class '__main__.Father'>, <class '__main__.Mother'>, <class '__main__.Person'>, <class 'object'>) Each class has the β¦
|
3.10
classes
inheritance
__mro__
multiple inheritance
|
2.27β¬β¬
|
0
|
Bite 201. Call a Cisco Nexus 9k device
Cisco Nexus 9k devices is one of the first network equipment with comprehensive API programmatic access from Cisco. API capabilities β¦
|
3.10
networking
requests
|
9.0β¬β¬β¬β¬β¬β¬β¬β¬β¬
|
0
|
Bite 202. Analyze some Bite stats data - part II
In this Bite you will analyze complexity levels of our first 200 Bites of Py exercises. We loaded this CSV β¦
|
3.10
csv
data analysis
sorting
|
4.0β¬β¬β¬β¬
|
0
|
Bite 203. Type hinting practice
It's time for some type hinting! For this bite, you have been provided a very simple Employee class object. I β¦
|
3.10
classes
dataclasses
type hinting
|
1.88β¬β¬
|
0
|
Bite 205. Female speakers @ Pycon US
After our Code Challenge 62 / Alicante PyDay last week, we thought it would be nice to branch off a β¦
|
3.10
beautifulsoup
counting
data wrangling
gender_guesser
|
4.3β¬β¬β¬β¬
|
0
|
Bite 206. Calculate and evenly split the bill
Three old friends Bob, Mary, and Alice meet at PyCon and decide to go out to dinner together. They have β¦
|
3.10
Decimal
numbers
rounding
|
7.64β¬β¬β¬β¬β¬β¬β¬β¬
|
0
|
Bite 212. Suppressing exceptions
Ever wanted to suppress an exception? Check out Python's contextlib module. In this Bite you refactor sum_numbers which has some β¦
|
3.10
context managers
exception handling
|
2.82β¬β¬β¬
|
0
|
Bite 217. Capture stdout
Sometimes you need to capture stdout in your script. Python makes it easy with contextlib's redirect_stdout. In this Bite you β¦
|
3.10
context managers
StringIO
|
3.43β¬β¬β¬
|
0
|
Bite 219. Bite notification planner
Another real world use case. When we added notifications to our learning paths, we gave the user the option to β¦
|
3.10
datetime
generators
|
3.17β¬β¬β¬
|
0
|
Bite 221. Parse best selling lists using the NY Times API
In this Bite you are going to parse NY Times Best Seller Lists using The New York Times Developer Network. β¦
|
3.10
APIs
json
mock
requests
|
4.71β¬β¬β¬β¬β¬
|
0
|
Bite 222. Split an iterable in groups of size n
In this Bite you will complete the group function that receives an iterable and splits it up in n groups. β¦
|
3.10
generators
iterators
itertools
looping
|
3.0β¬β¬β¬
|
0
|
Bite 223. Unix file permissions
Each file and directory in Unix has its permissions broken down into owner, group and other (world) attributes, see here. β¦
|
3.10
dict
list comprehensions
string manipulation
|
2.33β¬β¬
|
0
|
Bite 226. Get top titles from news.python.sc
There is a new Python news aggregator in town! Check it out here. In this Bite you will parse it! β¦
|
3.10
beautifulsoup
namedtuple
news
requests
sorting
string parsing
web scraping
|
4.89β¬β¬β¬β¬β¬
|
0
|
Bite 227. Convert Warcraft json data to csv
In this Bite we are going to convert some Warcraft Mount JSON data to csv. Here are the steps to β¦
|
3.10
csv
exception handling
json
|
5.6β¬β¬β¬β¬β¬β¬
|
0
|
Bite 228. Create a Gravatar URL
In this Bite you will generate a Gravatar URL, e.g. https://www.gravatar.com/avatar/5b13356d467af88631503c27a3d0e0cf?s=200&r=g&d=robohash. In this URL 5b13356d467af88631503c27a3d0e0cf is a hash of a β¦
|
3.10
gravatar
hashlib
string formatting
|
2.8β¬β¬β¬
|
0
|
Bite 230. Thumbs up for operator overloading
In this Bite we learn a bit of operator overloading. Finish the Thumbs class that returns an amount of thumbs β¦
|
3.10
classes
dunder methods
emojis
exception handling
operator overloading
|
3.14β¬β¬β¬
|
0
|
Bite 232. Analyze gold prices
In this Bite you will analyze how the price of gold evolved over the years 1950-2018. We loaded the gold β¦
|
3.10
comparison
data analysis
looping
pandas
sorting
string parsing
|
3.86β¬β¬β¬β¬
|
0
|
Bite 233. Make a zipfile of the latest log files
You added some monitoring the other day writing log files to a directory. In this Bite you will zip up β¦
|
3.10
datetime
os module
pathlib
zipfile
|
5.17β¬β¬β¬β¬β¬
|
0
|
Bite 234. Capitalize sentences
In this Bite you are going to capitalize sentences in a block of lowercased text. Correct grammar dictates that each β¦
|
3.10
regular expressions
string manipulation
string matching
string parsing
|
3.86β¬β¬β¬β¬
|
0
|
Bite 235. Which Bite has the fastest tests?
In this Bite you will parse a pytest output summary, calculating the Bite that has the fastest average tests. Log β¦
|
3.10
sorting
string parsing
type casting
|
5.44β¬β¬β¬β¬β¬
|
0
|
Bite 236. User experience matters! Suggest matching files
We love it when CLI or web apps take the extra mile to be more user friendly. In this Bite β¦
|
3.10
difflib
files
pathlib
|
4.17β¬β¬β¬β¬
|
0
|
Bite 239. Test FizzBuzz
In our second Test Bite you will write tests for FizzBuzz. Refer to the "Code to Test" tab, then start β¦
|
3.7
fizzbuzz
pytest
|
3.1β¬β¬β¬
|
0
|
Bite 243. Test code that parses JSON and IP ranges
Another Test Bite, we β€οΈthem π- today you will write tests for IPv4Network (ipaddress module) and dataclass objects πͺ. Check β¦
|
3.7
dataclasses
ipaddress
json
pytest
|
5.57β¬β¬β¬β¬β¬β¬
|
0
|
Bite 244. Make mutpy's output more digestible
Another real world scenario. When we started using MutPy for our test Bites, we quickly learned that the verbose output β¦
|
3.10
data wrangling
looping
mutpy
string matching
string parsing
|
4.14β¬β¬β¬β¬
|
0
|
Bite 245. Xmas Tree 2.0
In this Bite you have to complete generate_improved_xmas_tree that takes a rows arg (= number of rows with leafs). For β¦
|
3.10
range
string formatting
|
3.0β¬β¬β¬
|
0
|
Bite 247. Mocking a standard library function
In this Bite you will mock out a function of the standard library, more specifically random.sample. We wrote a small β¦
|
3.7
mock.patch
pytest
random
|
7.7β¬β¬β¬β¬β¬β¬β¬β¬
|
0
|
Bite 253. More Pandas Series Practice
In Bite 251 and Bite 252 we looked at creating some simple pandas Series and then we looked at how β¦
|
3.10
math
pandas
series
statistics
|
5.8β¬β¬β¬β¬β¬β¬
|
0
|
Bite 255. Codon Usage
The genetic code of all organisms uses a 3 base (codon), 4 letter encoding (A, G, C or T/U) to β¦
|
3.10
bioinformatics
collections
textwrap
|
7.22β¬β¬β¬β¬β¬β¬β¬
|
0
|
Bite 256. Scrape PyCon events
In this Bite, we want you to scrape PyCon 2019 data. The provided source via _get_pycon_data contains data for years β¦
|
3.10
beautifulsoup
data analysis
json
namedtuple
pycon
requests
web scraping
|
5.0β¬β¬β¬β¬β¬
|
0
|
Bite 258. What the flux?
One of the benefits of accounting is being able to see the financial position of a company at a point β¦
|
3.10
finance
math
pandas
|
3.8β¬β¬β¬β¬
|
0
|
Bite 259. Reverse complement
In the majority of organisms, the genetic code is encoded in a double helical DNA with each of both strands β¦
|
3.10
bioinformatics
string manipulation
translate
|
4.25β¬β¬β¬β¬
|
0
|
Bite 261. Visit all PyCons in Europe
In Bite 256 you scraped data on 2019 PyCons. Now it's time to go there! In this Bite you enrich β¦
|
3.10
data analysis
dataclasses
itertools
math
|
4.8β¬β¬β¬β¬β¬
|
0
|
Bite 263. Count the number of islands in a grid
You are tasked with counting the amount of islands in a 2D matrix / grid. Islands are represented by 1s, β¦
|
3.10
algorithms
looping
string
|
7.0β¬β¬β¬β¬β¬β¬β¬
|
0
|
Bite 264. Clamy Fernet
In this bite, you are going to get familiar with symmetrical encryption using the cryptography module and its Fernet class. β¦
|
3.8
cryptography
dataclasses
encode
encryption
fernet
typing
|
7.5β¬β¬β¬β¬β¬β¬β¬β¬
|
0
|
Bite 265. Optimal fund raising
Here is another classic algorithm problem wrapped in a Bite. Enjoy! A mayor in a remote mountain village faced an β¦
|
3.10
algorithms
looping
math
|
5.0β¬β¬β¬β¬β¬
|
0
|