Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
docs.it4i.cz
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Ciz
docs.it4i.cz
Commits
ff5885e8
Commit
ff5885e8
authored
8 years ago
by
David Hrbáč
Browse files
Options
Downloads
Patches
Plain Diff
Enable UV to modules matrix
parent
2b2b0950
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cluster_modules.py
+4
-1
4 additions, 1 deletion
cluster_modules.py
docs.it4i/modules-matrix.md
+80
-79
80 additions, 79 deletions
docs.it4i/modules-matrix.md
get_cvs.sh
+1
-1
1 addition, 1 deletion
get_cvs.sh
module_matrix.py
+16
-0
16 additions, 0 deletions
module_matrix.py
with
101 additions
and
81 deletions
cluster_modules.py
+
4
−
1
View file @
ff5885e8
...
...
@@ -14,9 +14,10 @@ def get_data(filename):
your_list
=
[]
your_list
+=
get_data
(
'
modules-anselm.csv
'
)
your_list
+=
get_data
(
'
modules-salomon.csv
'
)
your_list
+=
get_data
(
'
modules-salomon-uv.csv
'
)
#print your_list
a
=
[[
"
python/2.8.1
"
,
1
],[
"
python/2.9.1
"
,
2
],[
"
python/2.8.1
"
,
4
],[
"
python/3.0.1
"
,
4
]]
#
a=[["python/2.8.1",1],["python/2.9.1",2],["python/2.8.1",4],["python/3.0.1",4]]
counts
=
dict
()
for
i
in
your_list
:
#print i[0]
...
...
@@ -45,7 +46,9 @@ clusters = ''
prev
=
''
for
m
,
i
in
sorted
(
counts
.
items
()):
#print m
split
=
m
.
split
(
'
/
'
)
#print split
if
len
(
split
)
>
1
:
a
=
split
[
0
]
b
=
split
[
1
]
...
...
This diff is collapsed.
Click to expand it.
docs.it4i/modules-matrix.md
+
80
−
79
View file @
ff5885e8
This diff is collapsed.
Click to expand it.
get_cvs.sh
+
1
−
1
View file @
ff5885e8
#!/bin/bash
curl
-s
https://code.it4i.cz/hrb33/modules-anselm/raw/master/anselm.csv
-o
modules-anselm.csv
curl
-s
https://code.it4i.cz/hrb33/modules-salomon/raw/master/salomon.csv
-o
modules-salomon.csv
#
curl -s https://code.it4i.cz/hrb33/modules-salomon/raw/master/salomon-uv.csv -o modules-salomon-uv.csv
curl
-s
https://code.it4i.cz/hrb33/modules-salomon/raw/master/salomon-uv.csv
-o
modules-salomon-uv.csv
This diff is collapsed.
Click to expand it.
module_matrix.py
0 → 100755
+
16
−
0
View file @
ff5885e8
import
csv
def
get_data
(
filename
):
'''
function to read the data form the input csv file to use in the analysis
'''
reader
=
[]
# Just in case the file open fails
with
open
(
filename
,
'
rb
'
)
as
f
:
reader
=
csv
.
reader
(
f
,
delimiter
=
'
,
'
)
#returns all the data from the csv file in list form
#f.close() # May need to close the file when done
return
list
(
reader
)
# only return the reader when you have finished.
your_list
=
[]
your_list
+=
get_data
(
'
modules-anselm.csv
'
)
your_list
+=
get_data
(
'
modules-salomon.csv
'
)
#your_list += get_data('modules-salomon-uv.csv')
print
your_list
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