Python CHEAT sheet

👇🧵 Highlights and download

1. Base Types

For calculations
✔️ int + float

For program flow
✔️ bool

For text and data
✔️ str + bytes

👇🧵
2. Data Structures

Most common
✔️ list + dict

Common indirect use
✔️ tuple

👇🧵
3. Variable Assignment

Highlights
✔️ a = b = c = 0 # same value
✔️ a, b = b, c # swap values

👇🧵
4. Conversions

Trick:
"one two three" -> "one-two-three"
👇
'-'.join("one two three".split())

👇🧵
5. Conditional Statement

Check if in list:
if item in ['foo', 'bar']:
# item is foo or bar
else:
# item not foo or bar

👇🧵
6. Boolean Logic

Priority is NOT, then AND, then OR

Example:
True or False and False -> TRUE

👇🧵
7. Display and Input

f-string example

name = Python
age = 2023 - 1991
print(f'{name} is {age} years old')

👇🧵
The full cheat sheet includes
✔️ loops
✔️ files
✔️ sequences
✔️ list + dict operations
✔️ string operations
...and much more

https://t.co/8HH5vMpBSy

More from Learn Python With Rune

Top 10 Data Science Projects with Python

✔️ 10 Datasets
✔️ 10 Projects with solution

👇🧵

1️⃣ Project: Detecting Spam

✔️ Big email dataset
✔️ 35.000+ spam and ham messages
✔️ Learn how to filter

https://t.co/wvNSeFSbmr

Solution 👇🧵

1️⃣ Solution: Detecting Spam

✔️ How to build a spam filter
✔️ Using Scikit-learn
✔️ Naive-Bayes and

2️⃣ Project: Music Recommendation

✔️ Million Song Dataset
✔️ Metadata for a million songs

https://t.co/QgdSdIYnVV

Solution 👇🧵

2️⃣ Solution: Music Recommendation

✔️ Using Tableau
✔️ Collaborative-filtering engine
✔️ Similar to YouTube
Want to learn Django?

Check out these 8 free resources.

see 👇🧵

Get started with Django

Covers
- Installing and creating first project
- Working with templates
- Authentication frameworks
...and much more

More resources

Django Admin Cookbook

How to do things with Django admin
- Create two admin sites
- Bulk and custom actions
- Working with permissions
...and much more

https://t.co/NM0Nby5NwB

More 👇🧵


Django ORM cookbook

How to do things using Django ORM
- How to do OR/AND queries in ORM
- CRUD with ORM
- Database modelling
...and much more

https://t.co/tYjdbiYpWU

More 👇🧵


Building APIs with Django and Django Rest Framework

Learn about
- Simple API with pure Django
- Serializing and Deserializing data
- Access control
...and much more

https://t.co/gQTDxiG3wX

More 👇🧵

More from All

How can we use language supervision to learn better visual representations for robotics?

Introducing Voltron: Language-Driven Representation Learning for Robotics!

Paper: https://t.co/gIsRPtSjKz
Models: https://t.co/NOB3cpATYG
Evaluation: https://t.co/aOzQu95J8z

🧵👇(1 / 12)


Videos of humans performing everyday tasks (Something-Something-v2, Ego4D) offer a rich and diverse resource for learning representations for robotic manipulation.

Yet, an underused part of these datasets are the rich, natural language annotations accompanying each video. (2/12)

The Voltron framework offers a simple way to use language supervision to shape representation learning, building off of prior work in representations for robotics like MVP (
https://t.co/Pb0mk9hb4i) and R3M (https://t.co/o2Fkc3fP0e).

The secret is *balance* (3/12)

Starting with a masked autoencoder over frames from these video clips, make a choice:

1) Condition on language and improve our ability to reconstruct the scene.

2) Generate language given the visual representation and improve our ability to describe what's happening. (4/12)

By trading off *conditioning* and *generation* we show that we can learn 1) better representations than prior methods, and 2) explicitly shape the balance of low and high-level features captured.

Why is the ability to shape this balance important? (5/12)

You May Also Like

Хајде да направимо мали осврт на случај Мика Алексић .

Алексић је жртва енглеске освете преко Оливере Иванчић .
Мика је одбио да снима филм о блаћењу Срба и мењању историје Срба , иза целокупног пројекта стоји дипломатски кор Британаца у Београду и Оливера Иванчић


Оливера Илинчић је иначе мајка једне од његових ученица .
Која је претила да ће се осветити .

Мика се налази у притвору због наводних оптужби глумице Милене Радуловић да ју је наводно силовао човек од 70 година , са три бајпаса и извађеном простатом пре пет година

Иста персона је и обезбедила финансије за филм преко Беча а филм је требао да се бави животом Десанке Максимовић .
А сетите се и ко је иницирао да се Десанка Максимовић избаци из уџбеника и школства у Србији .

И тако уместо романсиране верзије Десанке Максимовић утицај Британаца

У Србији стави на пиједестал и да се Британци у Србији позитивно афирмишу како би се на тај начин усмерила будућност али и мењао ток историје .
Зато Мика са гнушањем и поносно одбија да снима такав филм тада и почиње хајка и претње која потиче из британских дипломатских кругова

Најгоре од свега што је то Мика Алексић изговорио у присуству високих дипломатских представника , а одговор је био да се све неће на томе завршити и да ће га то скупо коштати .
Нашта им је Мика рекао да је он свој живот проживео и да могу да му раде шта хоће и силно их извређао