Jan Giacomelli Profile picture
Tech lead & co-founder @typlessAPI | Author @testdrivenio Tweets about Python, software engineering, TDD DMs open
Jan 11, 2021 6 tweets 2 min read
🤔 Lambda functions in Python

What are they? Where to use them? How to use them?

🧵Let's find out👇 1️⃣ Lambda function has its origin in A. Curch's idea of lambda calculus.

en.wikipedia.org/wiki/Lambda_ca…

In Python it consists of:
keyword - lambda
bound variable - x
body - x + 1 (always single expression)

It's also referred to as Anonymous function
Jan 9, 2021 5 tweets 1 min read
This week I covered:

Data classes
Generators
Decorators
Dunder methods

Which Python topic you'd like to see next? 👇 Data classes

Jan 7, 2021 13 tweets 4 min read
🤔 Python decorators

What are they? How do you use them?

🧵 Let's find out 👇 1️⃣ Decorator is a function or a class that wraps another function or class modifying its behavior.

So how does that work?

The first thing to know is that everything in Python is an object - functions too
Jan 6, 2021 9 tweets 3 min read
🤔 Python generators

What are they? How to use them?

#Python

🧵Let's find out 👇 1️⃣ Python generators are lazy iterators delivering the next value when their .next() is called.

They are created by using the yield keyword

next() can be called explicitly or implicitly inside for loop

They can be finite or infinite
Jan 5, 2021 9 tweets 3 min read
🤔 Python data classes

What are they? How to use them?

🧵Let's find out👇 1️⃣ There's really nothing special about the class: the dataclass decorator adds generated methods
- __init__
- __repr__
- __eq__

to the class and returns the same class it was given.
Dec 29, 2020 9 tweets 4 min read
Are you confused about pytest's fixtures?

Do you struggle to understand them?

#100daysOfCode #pytest #Python

🧵This one is for you👇 1️⃣ pytest's fixtures are functions decorated with "pytest.fixture" decorator

They can return value or produce side effects like creating/removing a database.

They can be located inside conftest.py or inside the test file.
Dec 1, 2020 12 tweets 3 min read
Don't know where and how to start with ML?

#100daysOfMLCode #100daysOfCode

🧵This is my journey so far👇 1️⃣ I started with ML during my master's degree.

I decided to try to build a model of my guitar amplifier.

I started with this course:

udemy.com/course/machine…
Nov 30, 2020 8 tweets 2 min read
☁️ AWS is a great choice for a startup

Here are some reasons why

#100daysOfCode #100daysOfMLCode #AWS

🧵👇 1️⃣ Free tier

Most of the services offer free tier for first 12 months since registration.

There are enough free resources per month that you're able to build MVP for almost free.
Nov 29, 2020 8 tweets 2 min read
Don't know how to land your first tech job?

It's not easy but it's possible

🧵This is how I did it👇

#100daysOfCode #100daysOfMLCode It was starting my master's at university in electrical engineering.

For some reason, I decided to try to get a job as a software engineer to increase my income.

I knew how to program in Matlab & C. It was enough to pass exams but not enough to build a project from scratch.
Nov 24, 2020 14 tweets 3 min read
🤷‍♂️You've learned basics of Python and you don't know what to do next?

How to go from "hello world" to real applications?

🧵 This one is for you👇

#100daysOfCode #100DaysOfMLCode #Python 1️⃣ Build expense tracker CLI app.

Each expense should have following attributes:
* title (string)
* amount (float)
* created_at (date)
* tags (list of strings)

Store expenses in TXT file.

Cover: Add expense, list expenses, get expense, edit expense, delete expense
Nov 23, 2020 7 tweets 2 min read
Python is a great choice for the main backend programming language in a startup

Here are some reasons why

#100daysOfCode #100daysOfMLCode #Python #Startup

🧵👇 1️⃣ Easy to write & easy to read

It reads and writes almost like the English language. You need a small amount of code to get a job done. You'll probably rewrite it at least 3 times.