Add lessons page and members page

This commit is contained in:
BuffTechTalk
2024-09-10 22:31:13 -05:00
parent 64f8a64965
commit b8ddd50ae0
24 changed files with 213 additions and 26 deletions

13
app.py
View File

@@ -2,12 +2,22 @@ import streamlit as st
import webpages as pg
from webpages.navigation import navigation_bar as nv
st.set_page_config(page_title="BuffTeks Student Organization",
page_icon="./images/BuffTeksLogo.png",
layout = "centered"
)
page_label = nv()
# block for main pages
if page_label == "Homepage":
pg.home()
elif page_label == "Outstanding Members":
pg.outstanding_members()
elif page_label == "BuffTeks Project":
pg.project()
@@ -27,6 +37,9 @@ elif page_label == "Lesson1":
pg.pythonx_lesson1()
elif page_label == "Lesson2":
pg.pythonx_lesson2()
elif page_label == "Lesson3":
pg.pythonx_lesson3()
# block for testing page
elif page_label == "Testing":

BIN
images/CL1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
images/CL2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
images/CL3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
images/StudentDarrian.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
images/lesson3-api.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

View File

@@ -8,4 +8,5 @@ from .reference import reference
from .pythonx_lessons_pages.pythonx_homepage import pythonx_homepage
from .pythonx_lessons_pages.pythonx_lesson1 import pythonx_lesson1
from .pythonx_lessons_pages.pythonx_lesson2 import pythonx_lesson2
from .pythonx_lessons_pages.pythonx_lesson3 import pythonx_lesson3
from .pythonx_lessons_pages.pythonx_lesson3 import pythonx_lesson3
from .outstanding_members import outstanding_members

View File

@@ -60,8 +60,8 @@
}
.faculty img {
height: 300px;
width: 200px;
height: 210px;
width: 140px;
margin-right: 1rem;
}
@@ -69,6 +69,19 @@
flex: 1;
}
.faculty-container {
margin-top: 20px;
display: flex;
justify-content: space-between;
align-items: flex-start; /* Align items at the top */
}
.faculty {
flex: 1;
margin: 0 10px; /* Add spacing between the two faculty members */
}
.join {
text-align: center;
margin-top: 2rem;
@@ -112,29 +125,31 @@
<section>
<h2>Faculty Advisors</h2>
<div class="faculty">
<img src="https://www.wtamu.edu/_files/images/academics/college-business/headshots/zhang-carl-22.png" alt="Dr. Carl Zhang">
<div class="faculty-info">
<strong>Dr. Carl Zhang</strong><br>
CC 208D<br>
<a href="mailto:czhang@wtamu.edu">czhang@wtamu.edu</a>
<div class="faculty-container">
<div class="faculty">
<img src="https://www.wtamu.edu/_files/images/academics/college-business/headshots/zhang-carl-22.png" alt="Dr. Carl Zhang">
<div class="faculty-info">
<strong>Dr. Carl Zhang</strong><br>
<!-- CC 208D<br> -->
<a href="mailto:czhang@wtamu.edu">czhang@wtamu.edu</a>
</div>
</div>
<div class="faculty">
<img src="https://www.wtamu.edu/_files/images/academics/college-business/headshots/babb-jeffry-22.png" alt="Dr. Jeffry Babb">
<div class="faculty-info">
<strong>Dr. Jeffry Babb</strong><br>
BuffTeks Founder<br>
<!-- CC 214E<br>
<a href="mailto:jbabb@wtamu.edu">jbabb@wtamu.edu</a> -->
</div>
</div>
</div>
<div class="faculty">
<img src="https://www.wtamu.edu/_files/images/academics/college-business/headshots/babb-jeffry-22.png" alt="Dr. Jeffry Babb">
<div class="faculty-info">
<strong>Dr. Jeffry Babb</strong><br>
CC 214E<br>
<a href="mailto:jbabb@wtamu.edu">jbabb@wtamu.edu</a>
</div>
</div>
</section>
<div class="join">
<h2>Join Us</h2>
<p>Please fill out the form below to register as a BuffTeks member.</p>

View File

@@ -3,4 +3,5 @@ import streamlit as st
def event():
st.title("BuffTeks Event")
st.title("BuffTeks Event")
st.write("Under Construction")

View File

@@ -13,6 +13,7 @@ def navigation_bar():
page_label = sac.menu([
sac.MenuItem('Homepage', icon='house'),
sac.MenuItem('Outstanding Members', icon='bi bi-trophy'),
sac.MenuItem('BuffTeks Project', icon='bi bi-laptop'),
sac.MenuItem('BuffTeks Event', icon='calendar-event'),
sac.MenuItem('BuffTeks Classroom', icon='book', children=[

View File

@@ -0,0 +1,20 @@
import streamlit as st
def outstanding_members():
st.title('Outstanding Members')
st.write("Under Construction")
# stu1_img, stu1_text = st.columns(2)
# with stu1_img:
# st.image("./images/StudentDarrian.jpg",width= 300 )
# with stu1_text:
# st.header("Darrian Lambert")
# st.subheader("Senior Undergraduate in Computer Information Systems (CIS)")
# st.markdown("""
# "_Bufftek has been a fantastic experience for me. It gave me the opportunity to apply the skills Ive learned in class to real-world problems and work alongside others to develop effective software solutions. Through this, I gained hands-on experience with skills that are difficult to practice on your own._
# _Some key areas of growth include working with other developers on the same project, managing tasks and branches to avoid conflicting changes, and testing and reviewing pull requests to ensure high-quality merges. I also learned how to collaborate with team members to choose the best technologies for each project and pitch a piece of software using a prototype to stakeholders._
# _The problems I faced throughout the project ranged from finding solutions to everyday inconveniences like finding parking, to developing software for community support. This gave me practice in every phase of developing software from early research and planning, to designing the structure of the application, to building the application, to further refinement and improvement on the application. Overall, its been a great experience that Id recommend to anyone wanting to get into software development or similar fields after graduation._"
# """)

View File

@@ -11,7 +11,37 @@ def project():
st.divider()
# Project Gallery
st.subheader("Project Gallery")
st.header("Project Gallery")
st.divider()
st.image("./images/CommunityLinkLogo.svg")
st.markdown("""
### Main Contributors:
- Darrian Lambert, Kim Sundblom, and Jessica Zoll
### Introduction:
- The Community Link project is dedicated to efficiently organizing, tracking, and distributing hard goods and monetary contributions in support of non-profit organizations.
### Key Features:
- Streamlined Donation Processes: A user-friendly platform designed to simplify and manage donations.
- Operational Efficiency: Helping non-profits improve efficiency through automated tracking and organization of resources.
- Effective Resource Allocation: Ensuring donations are properly distributed to meet community needs.
### Goal:
- Develop software that enables non-profits to track donations, coordinate volunteer efforts, and ensure effective resource distribution.
- Support non-profit organizations in maximizing their impact on the local communities they serve
- Apply CIS skills to address real challenges, enhancing your portfolio and gaining invaluable professional experience.
- Work alongside a diverse team of peers and faculty, broadening knowledge and skills through collaboration.
""")
st.divider()
st.image("./images/CL3.jpg")
st.divider()
st.image("./images/CL2.jpg")
st.divider()
st.image("./images/CL1.jpg")

View File

@@ -1,5 +1,40 @@
import streamlit as st
from webpages import code_editor as ce
from wordcloud import WordCloud
import matplotlib.pyplot as plt
def pythonx_lesson2():
st.title("Lesson 2: Create WordClouds in Python")
st.header(":one: What is WordClouds")
st.markdown("""
A word cloud (also known as a tag cloud) is a visual representation of the frequency of words in a given text. The more frequently a word appears in the text, the larger it appears in the word cloud. It is often used as a way to visualize and analyze large amounts of text data, such as social media posts, news articles, and books.
""")
st.image("./images/lesson2-wordcloud.png")
st.markdown("""
Typically, a word cloud is created by taking a piece of text and analyzing the **frequency** of each word. The words are then arranged in a visual format, such as a cloud shape, with the most frequent words appearing in the largest font size. The words are often arranged in random positions within the cloud, with the exception of a few words which are positioned in the center or given emphasis.
""")
st.header(":two: Using wordcloud Package to generate wordcloud image")
st.markdown("""
In this example we will learn how to use external package in Python to complete task in a easy way.
A Python package is a collection of related code files (called modules) that we can use to help with specific tasks, like math, working with data, or creating graphics. These files are organized in folders, making it easier to manage and reuse the code. We can install a package and then use its functions in wer own Python programs. Popular Python packages include NumPy, pandas, and matplotlib.
""")
st.markdown("""
We can put this text into the textbox, then click Analyze, it will generate a wordcloud image for the input text.
```
Python is a programming language that lets you work quickly and integrate systems more effectively. Python is powerful and easy to learn.
```
""")
text = st.text_area("Please input text to analyze")
if st.button("Analyze"):
# Create a WordCloud object
wordcloud = WordCloud(width=800, height=400, background_color='white').generate(text)
fig, ax = plt.subplots()
ax.imshow(wordcloud, interpolation='bilinear')
plt.axis("off")
st.pyplot(fig)

View File

@@ -1,6 +1,77 @@
from datetime import date, datetime
import streamlit as st
import yfinance as yf
import plotly.express as px
from webpages import code_editor as ce
def pythonx_lesson3():
st.title("Lesson 3: Create WordClouds in Python")
st.title("Lesson 3: Collecting Stock Data Through API")
st.header(":one: What is API")
st.markdown(
"""
API stands for **Application Programming Interface**. It is a set of protocols, routines, and tools for building software and applications. An API defines the way by which an external client can request services and access data from an operating system, library, or application. It provides a communication interface for two or more systems to exchange data and interact with each other. APIs are commonly used to enable developers to create new applications and services that integrate with existing systems or to extract data from websites and services for use in other applications.
""")
st.image("./images/lesson3-api.png")
st.header(":two: Using yfinance Library(Package) to Extract Stock Data")
st.markdown("""
[yfinance](https://github.com/ranaroussi/yfinance) is a Python library that allows you to easily download and analyze financial data from Yahoo Finance.
It provides a convenient way to access stock market data and perform various operations with it such as
- retrieving historical data
- getting real-time data
- obtaining financial ratios and metrics, and more.
It provides a simple and efficient way to work with stock data in Python, without the need to manually scrape data from websites or manually download data from financial sources.
""")
st.header(":three: Application Demo")
# print text formatted by HTML
st.markdown(
"<h1 style='text-align:center; color:red;'> Sample Stock Price App. </h1>",
unsafe_allow_html=True)
st.write(
'We will use the code learned from previous lecture to build an online application for tracing stock price'
)
# print text in markdown
st.markdown("## **Check Stock Information**")
# a list of stock names
stock_names = ['MSFT', 'AAPL', 'AMZN', 'GOOGL']
# select a stock to check
target_stock = st.selectbox('Select a stock to check', options=stock_names)
st.markdown("## **Check Stock Price History**")
# start date of the stock infomation, default is the first day of year 2024
start_date = st.date_input('Start Date', datetime(2024, 1, 1))
# end date of the stock infomation, default is date of today
end_date = st.date_input("End Date")
# get today date
today = date.today()
if st.button('Submit'):
# check valid date
if start_date > today or end_date > today:
st.write("## **Please select a valid date period.**")
else:
# download the stock data based on stock name, start/end date
data = yf.download(target_stock, start_date, end_date)
# show a progress bar
with st.spinner(text='In progress'):
fig = px.line(data,
x=data.index,
y=['Open', 'High', 'Low', 'Close'],
title=target_stock + " Stock Price",
labels={
"value": "Stock Price ($)",
"variable": "Price Type"
})
st.write(fig)
st.success('Done')