semvec/pypi-packages huggingface dataset:
tutorial-hypermodern-python-winand 0.1.0
The hypermodern Python project
License: MIT
Requires Python: >=3.8.1,<4.0.0
Keywords: hypermodern

# tutorial-hypermodern-python-winand
[![Tests](https://github.com/Winand/tutorial-hypermodern-python-winand/workflows/Tests/badge.svg)](https://github.com/Winand/tutorial-hypermodern-python-winand/actions?workflow=Tests)
[![Codecov](https://codecov.io/gh/Winand/tutorial-hypermodern-python-winand/branch/master/graph/badge.svg)](https://codecov.io/gh/Winand/tutorial-hypermodern-python-winand)

Hypermodern Python tutorial series

## Links
* https://cjolowicz.github.io/posts/hypermodern-python-01-setup
* https://github.com/cjolowicz/hypermodern-python
* https://winand.notion.site/Hypermodern-Python-38cf6036f64447a19d527293de373415 (ru)
save-load-vars 0.11
Save and load vars, functions ...
License: MIT
Keywords: pickle,dill


# Save and load vars, functions, objects ...


### How to save the global vars (or any other variable)
```python
# Create a file

import pandas as pd
from save_load_vars import save_vars_pkl

df = pd.read_csv(
    "https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv"
)


def myfunction(x):
    return str(x) + "bbbb"


myfunction2 = lambda k: myfunction(k)
partofframe = df.Name.copy()[:50]

# Save the global vars 
save_vars_pkl(g=globals(), folder=f"f:\\pklsavetest", interface="dill", protocol=None)

```


### How to load the saved data
```python
from save_load_vars import load_vars_pkl


load_vars_pkl(folder=f'f:\\pklsavetest',
              name=__name__,interface='dill')

print(df)
print(myfunction(44))
print(partofframe)
print(df.Cabin.apply(myfunction2))
```


### How to create global variables from a dict
```python
from save_load_vars import globals_from_dict
didi={
    'a':'bobo',
    'b':'bobao',
    'c': [4,3,3]
}
globals_from_dict(didi,__name__)
print(a)
print(b)
print(c)
```