Python Functions and Tricks Cheat Sheet

Python cheat sheets are the 80/20 principle applied to coding: learn 80% of the language features in 20% of the time.Download and pin this cheat sheet to your wall until you feel confident using all these tricks. Download PDF for Printing

Try It Yourself:

Exercise: Modify each function and play with the output!

Here’s the code for copy&paste:

# 1. map(func, iter)
m = map(lambda x: x[0], [‘red’, ‘green’, ‘blue’])
print(list(m))
# [‘r’, ‘g’, ‘b’]

# 2. map(func, i1, …,ik)
l1 = [0, 2, 2]
l2 = [‘apple’, ‘orange’, ‘banana’]
m = map(lambda x, y: str(x) + ‘ ‘ + str(y) + ‘s’, l1, l2)
print(list(m))
# [‘0 apples’, ‘2 oranges’, ‘2 bananas’]

#

Continue reading the original article

[Collection] 15 Mind-Blowing Machine Learning Cheat Sheets to Pin to Your Toilet Wall

Want to learn how machines learn? Start with cheat sheets!

This article compiles for you the 15 best cheat sheets in the web that help you get started with machine learning. If you’re short on time, here are the 15 direct PDF links (open in a new tab):

Supervised Learning (Afshine Amidi)Unsupervised Learning (Afshine Amidi)Deep Learning (Afshine Amidi)Machine Learning Tips and Tricks (Afshine Amidi)Probabilities and Statistics (Afshine Amidi)Linear Algebra and Calculus (Afshine Amidi)Comprehensive Stanford Master Cheat Sheet (Afshine Amidi)Data Science Cheat Sheet (Datacamp)Keras Cheat Sheet (Datacamp)Deep Learning with Keras Cheat Sheet (RStudio)Visual Guide to Neural Network Infrastructures (Asimov Institute)Skicit-Learn Python Cheat

Continue reading the original article