Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/community/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Meet-ups

We have an active global meet up group that meets virtually once a month.
We have an active global meetup group that meets virtually once a month.

You can [sign up for the group here](https://www.meetup.com/global-hamilton-open-source-user-group-meetup/).

Expand All @@ -9,16 +9,16 @@ The below will be out of date. Please [see our youtube](https://www.youtube.com/


### August 2024
-[Recording](https://youtu.be/3LREcaewZbo?feature=shared)
- [Recording](https://youtu.be/3LREcaewZbo?feature=shared)

### June 2024
-[Recording](https://youtu.be/SsrIIM1ed4w?feature=shared)
- [Recording](https://youtu.be/SsrIIM1ed4w?feature=shared)

### April 2024
-[Recording](https://youtu.be/_-yXfnBtrlg?feature=shared)
- [Recording](https://youtu.be/_-yXfnBtrlg?feature=shared)

### March 2024
-[Recording](https://youtu.be/IJByeN41xHs?feature=shared).
- [Recording](https://youtu.be/IJByeN41xHs?feature=shared)

### February 2024
- [Recording](https://www.youtube.com/watch?v=ks672Lm0CJo).
Expand Down
4 changes: 2 additions & 2 deletions docs/how-tos/pre-commit-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def B(A: int) -> float: ...
def C(A: int, B: float) -> None: ...

# driver code
dr = driver.Builder().with_mdoules(my_module).build()
dr = driver.Builder().with_modules(my_module).build()
dr.validate_execution(final_vars=["C"]) # <- success
```

Expand All @@ -92,7 +92,7 @@ def B(X: int) -> float: ...
def C(A: int, B: float) -> None: ...

# driver code
dr = driver.Builder().with_mdoules(my_module).build()
dr = driver.Builder().with_modules(my_module).build()
dr.validate_execution(final_vars=["C"]) # <- failure. missing `A`
```

Expand Down
6 changes: 3 additions & 3 deletions docs/integrations/streamlit.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if __name__ == "__main__":
> ⚠ This example is illustratory and real applications quickly get more complex.

### 2. Cache and state management
When the user interacts with the app, Streamlit reruns your entire Python code to update what's displayed on screen ([reference](https://docs.streamlit.io/get-started/fundamentals/main-concepts#data-flow)). By default, no data is preserved between updates and all computations need to be executed again. Your application suffer slow downs if you handle large dataframes or load machine learning models in memory for instance. To overcome this limitation, Streamlit allows to [cache expensive operations](https://docs.streamlit.io/library/advanced-features/caching) via the decorators `@streamlit.cache_data` and `@streamlit.cache_resource` and [store state variables](https://docs.streamlit.io/library/api-reference/session-state) between reruns in the global dictionary `streamlit.session_state` or via `key` attributes of input widget. State management becomes particularly important when building a [multipage app](https://docs.streamlit.io/get-started/tutorials/create-a-multipage-app) where each page is defined in a separate Python file and can't commmunicate by default.
When the user interacts with the app, Streamlit reruns your entire Python code to update what's displayed on screen ([reference](https://docs.streamlit.io/get-started/fundamentals/main-concepts#data-flow)). By default, no data is preserved between updates and all computations need to be executed again. Your application suffer slow downs if you handle large dataframes or load machine learning models in memory for instance. To overcome this limitation, Streamlit allows to [cache expensive operations](https://docs.streamlit.io/library/advanced-features/caching) via the decorators `@streamlit.cache_data` and `@streamlit.cache_resource` and [store state variables](https://docs.streamlit.io/library/api-reference/session-state) between reruns in the global dictionary `streamlit.session_state` or via `key` attributes of input widget. State management becomes particularly important when building a [multipage app](https://docs.streamlit.io/get-started/tutorials/create-a-multipage-app) where each page is defined in a separate Python file and can't communicate by default.

```python
import pandas as pd
Expand All @@ -54,14 +54,14 @@ def app():

# load_dataframe() will only run the first time
df = load_dataframe(path="...")
st.dataframes(df)
st.dataframe(df)

# If favorite flavor is known, display it.
if st.session_state("favorite"):
st.write(f"Your favorite ice cream is: {st.session_state['favorite']}")
# Ask for the favorite ice cream until an answer is given.
else:
st.text_inputs(
st.text_input(
"What's your favorite ice cream flavor?",
key="favorite", # key to st.session_state
)
Expand Down
Loading