Skip to content
View bswck's full-sized avatar
😃
😃

Sponsors

@jaraco
@pawamoy

Sponsoring

@Secrus

Block or report bswck

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
bswck/README.md

about

I'm a software developer and programming teacher.

education

As a technical trainer I mainly focus on Python and Git, but am happy to explain whatever else is in the way.

Feel free to reach me out via e-mail ([email protected]) especially if:

  • you are a beginner willing to learn how to think like a programmer
  • you are a professional willing to get deep understanding of particular concepts in Python

I conduct lessons in English and Polish, as preferred.

metaprogramming

I'm making a library called injection:

from functools import partial
from random import randint

from injection import inject

roll: int
inject("roll", into=locals(), factory=partial(randint, 1, 6))

print(roll, type(roll) is int)  # 6 True
print(roll, type(roll) is int)  # 4 True
print(roll, type(roll) is int)  # 3 True

# you never know what the value of roll will be!
from __future__ import annotations

from injection.contrib import lazy_imports, type_imports

with lazy_imports():
    import pandas as pd

with type_imports():
    from _typeshed import StrPath  # never imported, typing.Any at runtime

def read_data(path: StrPath) -> pd.DataFrame:
    return pd.read_csv(path, sep=";")  # pandas only imported now

Pinned Loading

  1. injection injection Public

    Create Python variables on the fly.

    Python 85