|
| 1 | +import requests |
1 | 2 | import streamlit as st
|
2 | 3 | import numpy as np
|
3 | 4 | import pandas as pd
|
|
8 | 9 | image_path = 'https://raw.githubusercontent.com/Normando1945/Simple-Python-Matlab-JavaSript-Functions-Collection/main/fun_SPEC_NEC/logo_TorreFuerte.png'
|
9 | 10 | st.image(image_path, use_column_width=True)
|
10 | 11 |
|
11 |
| - |
12 |
| - |
13 | 12 | # Título de la aplicación
|
14 | 13 | st.markdown("<h4 style='text-align: center;'>Simple App: Seismic Response Spectrum [Normative Ecuadorian Spectrum]</h4>", unsafe_allow_html=True)
|
15 | 14 |
|
16 | 15 |
|
17 |
| -st.markdown( |
| 16 | +def get_github_profile_views(username): |
| 17 | + url = f"https://api.github.com/users/{username}" |
| 18 | + response = requests.get(url) |
| 19 | + if response.status_code == 200: |
| 20 | + data = response.json() |
| 21 | + return data['followers'] # Example of available data |
| 22 | + else: |
| 23 | + return None |
| 24 | + |
| 25 | +username = "Normando1945" |
| 26 | +profile_views = get_github_profile_views(username) |
| 27 | + |
| 28 | +coll1, coll2 = st.columns([4, 1]) |
| 29 | + |
| 30 | +coll1.markdown( |
18 | 31 | """
|
19 |
| - * Author: [Msc. Ing. Carlos Andrés Celi Sánchez](https://fragrant-knight-4af.notion.site/Main-Page-5c5f007b3f3f4c76a604960d9dbffca7?pvs=4) |
20 |
| - * Course: Structural Dynamics |
| 32 | + * Author: [Msc. Ing. Carlos Andrés Celi Sánchez](https://fragrant-knight-4af.notion.site/Main-Page-5c5f007b3f3f4c76a604960d9dbffca7?pvs=4) |
| 33 | + * Course: Structural Dynamics |
21 | 34 | """
|
22 | 35 | )
|
23 | 36 |
|
24 |
| -st.markdown('* You can find me on : [](https://fragrant-knight-4af.notion.site/Main-Page-5c5f007b3f3f4c76a604960d9dbffca7?pvs=4)[](https://github.com/Normando1945)[](https://www.researchgate.net/profile/Carlos-Celi)[](https://scholar.google.com.ec/citations?hl=es&user=yR4Gz7kAAAAJ)') |
| 37 | +if profile_views is not None: |
| 38 | + coll2.metric(label='GitHub Followers', value=profile_views) |
| 39 | +else: |
| 40 | + coll2.metric(label='GitHub Followers', value="N/A") |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +st.markdown('You can find me on : [](https://fragrant-knight-4af.notion.site/Main-Page-5c5f007b3f3f4c76a604960d9dbffca7?pvs=4)[](https://github.com/Normando1945)[](https://www.researchgate.net/profile/Carlos-Celi)[](https://scholar.google.com.ec/citations?hl=es&user=yR4Gz7kAAAAJ)') |
25 | 45 |
|
26 | 46 | st.markdown('This simple app performs spectral calculations using the NEC-SE-DS-2015 Ecuadorian Code. It computes the Elastic and Inelastic Acceleration Response Spectra for a range of structural periods and visualizes the results.')
|
27 | 47 |
|
| 48 | +with st.expander("**Click to read more**"): |
| 49 | + j1, j2 = st.columns([1, 2]) |
| 50 | + with j1: |
| 51 | + image_path = 'https://raw.githubusercontent.com/Normando1945/Simple-Python-Matlab-JavaSript-Functions-Collection/main/fun_SPEC_NEC/Chapter1_portada.gif' |
| 52 | + st.image(image_path, use_column_width=True) |
| 53 | + |
| 54 | + st.markdown( |
| 55 | + """ |
| 56 | + <div style="text-align: center;"> |
| 57 | + <a href="https://cceli.neocities.org"> Online Book, Chapter 1</b></a> |
| 58 | + </div> |
| 59 | + """, |
| 60 | + unsafe_allow_html=True |
| 61 | + ) |
| 62 | + |
| 63 | + with j2: |
| 64 | + st.markdown( |
| 65 | + ''' |
| 66 | + **General Overview** |
| 67 | + |
| 68 | + Welcome to this presentation of the draft for the opening chapter of my upcoming book, titled **"Structural Engineering: Dynamics, Seismic Solution, and AI Integration."** This chapter delves into the intricate realm of undergraduate structural dynamics. This endeavor is not meant to mirror the exhaustive details laid out in some of the field's seminal literature. If you're familiar with works from esteemed authors such as **Chopra**, **Mario Paz**, **Cloth & Penzien**, among others, you'll be aware of the profound depth and rigor they bring to the underlying concepts and mathematical foundations of structural dynamics. Rather than merely echoing their profound insights, this book and the initial chapter provided here chart a distinctive course. |
| 69 | +
|
| 70 | + The chief aim is to distill intricate theoretical mathematics into more accessible discrete mathematical frameworks, offering clear outlines of pivotal concepts in dynamic structures. This proves indispensable for students traversing the expansive realm of structural dynamics. By intertwining essential theories with illustrative **Python code samples**, readers will unlock understanding of the fundamental mechanics underpinning both single-degree-of-freedom **SDOF** and multi-degree-of-freedom **MDOF** dynamic systems. The focus remains unwaveringly on applications within structural engineering, positioning this as a prized asset for those immersing themselves in the field. It's vital to understand that this draft of the initial chapter isn't designed to serve as an isolated guide. Instead, it acts in tandem with conventional educational tools, reinforcing the bedrock knowledge students garner in academic settings. For a nuanced and comprehensive grasp of the domain, turning to the venerable tomes of dedicated structural dynamics literature is imperative. When combined with in-depth classroom learning, the revelations from such extensive studies will unquestionably refine a scholar's proficiency. I invite you to join me on this illuminating expedition, and I hope it lays the foundation for your scholastic and professional achievements in structural dynamics. |
| 71 | + |
| 72 | + ''', unsafe_allow_html=True |
| 73 | + ) |
| 74 | + |
28 | 75 | st.markdown("#### **Parameters**")
|
29 | 76 |
|
30 | 77 |
|
|
105 | 152 |
|
106 | 153 | st.markdown("##### **Response Spectra [Elastic and Inelastic]**")
|
107 | 154 | st.write(Resul)
|
| 155 | + |
108 | 156 | def display_footer():
|
109 | 157 | footer = """
|
110 | 158 | <style>
|
@@ -144,5 +192,3 @@ def display_footer():
|
144 | 192 | st.markdown(footer, unsafe_allow_html=True)
|
145 | 193 |
|
146 | 194 | display_footer()
|
147 |
| - |
148 |
| - |
|
0 commit comments