Come back
Dear Devil, I come back…
╭∩╮( •̀_•́ )╭∩╮
Don’t tempt me again!
ideas
- change: write only from monday to friday
- change: after 30th days do weekly update live, top staff from weekend, summary week
- step by step
achievements
- come back after weekend of playing games
- flying on broom it’s awesome!
- tried new demo games on Steam
learnings
- databricks: architecture overview
- https://docs.databricks.com/en/getting-started/overview.html
- pandas - data types, performance impact
- todo: double check If you don’t have good types in pandas could impact performance
- df.as_type
- to_numeric
- categories type in pandas
- python
- more: * in function when want to have key arguments
- more: remember diffrence between argument vs parameter
- more: good practices for functions: not use flag arguments
- functool
- partial
- https://docs.python.org/3/library/functools.html#functools.partial
- example:
from functools import partial
basetwo = partial(int, base=2)
print(basetwo('10010')) # 18
- typing
- callable
- functions – or other callable objects – can be annotated using collections.abc.Callable or typing.Callable.
- Callable[[int], str] signifies a function that takes a single parameter of type int and returns a str.
- https://docs.python.org/3/library/typing.html#annotating-callable-objects
- callable
- Protocol
- Protocol classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing)
- https://docs.python.org/3/library/typing.html#typing.Protocol
- example:
class Proto(Protocol):
def meth(self) -> int:
pass
class C:
def meth(self) -> int:
return 0
def func(x: Proto) -> int:
return x.meth()
func(C()) # Passes static type check
inspirations
- mostly learn from Arjan Codes & docs
- https://www.youtube.com/watch?v=uVy23GEehpc&ab_channel=ArjanCodes
- https://www.youtube.com/watch?v=yatgY4NpZXE&t=62s&ab_channel=ArjanCodes
- https://www.youtube.com/watch?v=lX9UQp2NwTk&t=1021s&ab_channel=ArjanCodes
Thanks for reading this ❤️
Fuck,
KK