Skip to content

Commit

Permalink
Tasks from first 10 days (#3)
Browse files Browse the repository at this point in the history
Some tasks were skipped for speed (the video from day 3 and also the
deployment activity in streamlit clout)

1. **7be6b4c** List of tags updated with inclusion of new tag:
1. **8effc7c** Remove files configured for entire project as a package
since the focus will be on separating the repository in different days
1. **60d5e95** Simple Hello world - Day 2
1. **53f16d3** Code from day 3 - Button and conditions
1. **2eaa55b** Tasks from day 5: several usages of st.write
1. **3643e59** Tasks from day 8: Uses of slider
1. **ba480a9** Tasks from day 9 - Simple line charts from pandas
dataframes
1. **9870d38** Task from day 10: select box
  • Loading branch information
disouzam authored Oct 14, 2024
2 parents 04b94fa + 9870d38 commit 7a0f3ae
Show file tree
Hide file tree
Showing 21 changed files with 6,061 additions and 2 deletions.
9 changes: 9 additions & 0 deletions day10/day10.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import streamlit as st

st.header('st.selectbox')

option = st.selectbox(
'What is your favorite color?',
('Blue', 'Red', 'Green'))

st.write('Your favorite color is ', option)
File renamed without changes.
6 changes: 4 additions & 2 deletions pyproject.toml → day10/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[tool.poetry]
name = "streamlit_30days_learning"
name = "day10"
version = "0.1.0"
description = "A project where I will follow streamlit 30-days challenge"
description = "Tasks from day 10 - Select box"
authors = ["Dickson Souza <[email protected]>"]
license = "MIT"
readme = "README.md"
package-mode = false


[tool.poetry.dependencies]
python = "^3.12"
Expand Down
3 changes: 3 additions & 0 deletions day2/day2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import streamlit as st

st.write('Hello world!')
1,173 changes: 1,173 additions & 0 deletions day2/poetry.lock

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions day2/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.poetry]
name = "day2"
version = "0.1.0"
description = "Activities from day 2"
authors = ["Dickson Souza <[email protected]>"]
license = "MIT"
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.12"
streamlit = "^1.39.0"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
8 changes: 8 additions & 0 deletions day3/day3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import streamlit as st

st.header('st.button')

if st.button('Say hello'):
st.write('Why hello there')
else:
st.write('Goodbye')
1,173 changes: 1,173 additions & 0 deletions day3/poetry.lock

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions day3/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.poetry]
name = "day3"
version = "0.1.0"
description = "Tasks from day 3"
authors = ["Dickson Souza <[email protected]>"]
license = "MIT"
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.12"
streamlit = "^1.39.0"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
35 changes: 35 additions & 0 deletions day5/day5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import numpy as np
import altair as alt
import pandas as pd
import streamlit as st

st.header('st.write')

# Example 1

st.write('Hello, *World!* :sunglasses:')

# Example 2

st.write(1234)

# Example 3

df = pd.DataFrame({
'first column': [1, 2, 3, 4],
'second column': [10, 20, 30, 40]
})
st.write(df)

# Example 4

st.write('Below is a DataFrame:', df, 'Above is a dataframe.')

# Example 5

df2 = pd.DataFrame(
np.random.randn(200, 3),
columns=['a', 'b', 'c'])
c = alt.Chart(df2).mark_circle().encode(
x='a', y='b', size='c', color='c', tooltip=['a', 'b', 'c'])
st.write(c)
1,173 changes: 1,173 additions & 0 deletions day5/poetry.lock

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions day5/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.poetry]
name = "day5"
version = "0.1.0"
description = "Tasks from day 5"
authors = ["Dickson Souza <[email protected]>"]
license = "MIT"
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.12"
streamlit = "^1.39.0"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
39 changes: 39 additions & 0 deletions day8/day8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import streamlit as st
from datetime import time, datetime

st.header('st.slider')

# Example 1

st.subheader('Slider')

age = st.slider('How old are you?', 0, 130, 25)
st.write("I'm ", age, 'years old')

# Example 2

st.subheader('Range slider')

values = st.slider(
'Select a range of values',
0.0, 100.0, (25.0, 75.0))
st.write('Values:', values)

# Example 3

st.subheader('Range time slider')

appointment = st.slider(
"Schedule your appointment:",
value=(time(11, 30), time(12, 45)))
st.write("You're scheduled for:", appointment)

# Example 4

st.subheader('Datetime slider')

start_time = st.slider(
"When do you start?",
value=datetime(2024, 10, 14, 9, 30),
format="MM/DD/YY - hh:mm")
st.write("Start time:", start_time)
1,173 changes: 1,173 additions & 0 deletions day8/poetry.lock

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions day8/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.poetry]
name = "day8"
version = "0.1.0"
description = "Tasks from day 8 - Use of slider"
authors = ["Dickson Souza <[email protected]>"]
license = "MIT"
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.12"
streamlit = "^1.39.0"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
11 changes: 11 additions & 0 deletions day9/day9.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import streamlit as st
import pandas as pd
import numpy as np

st.header('Line chart')

chart_data = pd.DataFrame(
np.random.randn(20, 3),
columns=['a', 'b', 'c'])

st.line_chart(chart_data)
1,173 changes: 1,173 additions & 0 deletions day9/poetry.lock

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions day9/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[tool.poetry]
name = "day9"
version = "0.1.0"
description = "Tasks from day 9 - Line charts"
authors = ["Dickson Souza <[email protected]>"]
license = "MIT"
readme = "README.md"
package-mode = false


[tool.poetry.dependencies]
python = "^3.12"
streamlit = "^1.39.0"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
1 change: 1 addition & 0 deletions list-of-tags.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
04b94faaa2c1410f7506654515fd7b282a72711f refs/tags/Demo-Clones
4c3ff8a200218aa7f33d13c90283a9d584684617 refs/tags/Initial-Setup
Empty file.
Empty file removed tests/__init__.py
Empty file.

0 comments on commit 7a0f3ae

Please sign in to comment.