Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NIRS_Workflow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CEFE
PACE
NIRS_Workflow
Commits
9d43144c
Commit
9d43144c
authored
5 months ago
by
DIANE
Browse files
Options
Downloads
Patches
Plain Diff
shared imports
parent
d85bb42a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/shared_imports.py
+59
-0
59 additions, 0 deletions
src/shared_imports.py
with
59 additions
and
0 deletions
src/shared_imports.py
0 → 100644
+
59
−
0
View file @
9d43144c
## Data loading, handling, and preprocessing
import
os
import
sys
import
glob
from
pathlib
import
Path
import
jcamp
import
re
import
csv
import
numpy
as
np
from
pandas
import
DataFrame
,
read_csv
,
concat
,
Series
,
json_normalize
from
datetime
import
datetime
from
shutil
import
rmtree
,
move
,
make_archive
from
hashlib
import
md5
from
typing
import
Optional
,
List
import
scipy
as
sc
### Exploratory data analysis-Dimensionality reduction
from
pandas.api.types
import
is_float_dtype
## Images and plots
from
PIL
import
Image
import
plotly.express
as
px
import
plotly.graph_objects
as
go
import
plotly.io
as
pio
import
matplotlib.pyplot
as
plt
from
matplotlib
import
colors
from
matplotlib.colors
import
Normalize
import
seaborn
as
sns
## Web app construction
import
streamlit
as
st
from
st_pages
import
Page
,
Section
,
show_pages
,
add_page_title
,
hide_pages
from
tempfile
import
NamedTemporaryFile
,
TemporaryDirectory
# help on streamlit input https://docs.streamlit.io/library/api-reference/widgets
#Library for connecting to SQL DB
import
pyodbc
#Library for reading the config file, which is in JSON
import
json
# save models
from
joblib
import
dump
,
load
,
hash
from
hyperopt
import
fmin
,
hp
,
tpe
,
Trials
,
space_eval
,
STATUS_OK
,
anneal
st
.
set_option
(
'
deprecation.showPyplotGlobalUse
'
,
False
)
#########################
css_file
=
Path
(
"
style/
"
)
pages_folder
=
Path
(
"
pages/
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment