Hamza Salhi commited on
Commit
12b6218
1 Parent(s): eaca605

Upload 10 files

Browse files
055CF2A4-98DC-488C-B5A6-15CC02C9974E.png ADDED
49640CBC-E71B-4565-9307-0558A8B916B4.jpeg ADDED
Auth.json_ ADDED
@@ -0,0 +1 @@
 
 
1
+ {"installed":{"client_id":"226746911104-h2ogum9q42n0ih9mg0bnca07jhrm7d1f.apps.googleusercontent.com","project_id":"quickstart-1611804547671","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"5C8mhGnvivz821Jl1NhLmVuL","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}
Procfile ADDED
@@ -0,0 +1 @@
 
 
1
+ web: sh setup.sh && streamlit run pdac2021.py
README.md CHANGED
@@ -1,13 +1,2 @@
1
- ---
2
- title: PDAC2024
3
- emoji: 🐨
4
- colorFrom: purple
5
- colorTo: pink
6
- sdk: streamlit
7
- sdk_version: 1.31.0
8
- app_file: app.py
9
- pinned: false
10
- license: apache-2.0
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+ # PDAC2021_res_est_course [![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://share.streamlit.io/seanhoran/pdac2021_res_est_course/main/pdac2021.py)
2
+ Collection of Resource Estimation Exercises for the PDAC 2021 Resource Estimation Fundamentals Short Course
 
 
 
 
 
 
 
 
 
 
 
__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ import PDAC2021_res_est_course.db_ex
funcs.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ def get_text_block(fname):
2
+ # this is how to read a block of text:
3
+ path = "..//pdac2021_res_est_course_link2//text_blocks"
4
+ f = open(path + "//" + fname, "r")
5
+ # and then write it to the app
6
+ return f.read();
7
+
pdac2021.py ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import exercises.about_course as about_course
3
+ import exercises.capping_ex as capping_ex
4
+ import exercises.variograms as variograms
5
+ import exercises.cut_off as cut_off
6
+ import exercises.block_modelling as block_modelling
7
+ import exercises.geo_interp as geo_interp
8
+ import exercises.reporting as reporting
9
+ import exercises.interp as interp
10
+
11
+ max_width = 1200
12
+
13
+ padding_top = 0
14
+ padding_right = 0
15
+ padding_left = 0
16
+ padding_bottom = 0
17
+ COLOR = '#180c52'
18
+ BACKGROUND_COLOR = 'white'
19
+
20
+ st.markdown(
21
+ f"""
22
+ <style>
23
+ .reportview-container .main .block-container{{
24
+ max-width: {max_width}px;
25
+ padding-top: {padding_top}rem;
26
+ padding-right: {padding_right}rem;
27
+ padding-left: {padding_left}rem;
28
+ padding-bottom: {padding_bottom}rem;
29
+ }}
30
+ .reportview-container .main {{
31
+ color: {COLOR};
32
+ background-color: {BACKGROUND_COLOR};
33
+ }}
34
+ </style>
35
+ """,
36
+ unsafe_allow_html=True,
37
+ )
38
+
39
+
40
+ st.sidebar.image("..//pdac2021_res_est_course_link2//055CF2A4-98DC-488C-B5A6-15CC02C9974E.png", width=100)
41
+
42
+ # Capping Exercise - interactive
43
+ # Compositing - Q&A
44
+ # Variograms - interactive
45
+ # Interpolation - interactive
46
+ # Compositing - Q&A
47
+
48
+ radio_options = ["01 About the Course",
49
+ "02 Geological Interp",
50
+ "03 Capping",
51
+ "04 Variograms",
52
+ "05 Interpolation",
53
+ "06 Cut-Off Grade",
54
+ "07 Reporting/Classification"]
55
+
56
+ exercise=st.sidebar.radio("",
57
+ options=radio_options,
58
+ index=0,
59
+ key=None)
60
+
61
+ if exercise == radio_options[0]:
62
+ about_course.about_course()
63
+ if exercise == radio_options[1]:
64
+ st.write("Page available during nominated exercise session")
65
+ # geo_interp.geo_interp()
66
+ if exercise == radio_options[2]:
67
+ st.write("Page available during nominated exercise session")
68
+ # capping_ex.capping_ex()
69
+ if exercise == radio_options[3]:
70
+ st.write("Page available during nominated exercise session")
71
+ # variograms.variograms()
72
+ if exercise == radio_options[4]:
73
+ # block_modelling.block_modelling()
74
+ st.write("Page available during nominated exercise session")
75
+ # interp.block_modelling()
76
+ if exercise == radio_options[5]:
77
+ st.write("Page available during nominated exercise session")
78
+ # cut_off.cut_off()
79
+ if exercise == radio_options[6]:
80
+ # st.write("Page available during nominated exercise session")
81
+ reporting.reporting()
requirements.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ SQLAlchemy==1.3.1
2
+ plotly==4.12.0
3
+ matplotlib==3.0.3
4
+ pandas==1.1.0
5
+ scikit_learn==0.24.1
6
+ scipy==1.5.4
7
+ streamlit==0.77.0
8
+ numpy==1.16.6
setup.sh ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ mkdir -p ~/.streamlit
2
+
3
+ echo "[server]
4
+ headless = true
5
+ port = $PORT
6
+ enableCORS = false
7
+ " > ~/.streamlit/config.toml