Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SoHPC-Selection
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Beckmann
SoHPC-Selection
Commits
6cc38678
Commit
6cc38678
authored
Apr 27, 2021
by
Andreas Beckmann
Browse files
Options
Downloads
Patches
Plain Diff
make the scripts understand 2021 data
parent
90c27a19
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+2
-1
2 additions, 1 deletion
.gitignore
create-evaluation-files.py
+8
-6
8 additions, 6 deletions
create-evaluation-files.py
prepare-selection.sh
+14
-5
14 additions, 5 deletions
prepare-selection.sh
with
24 additions
and
12 deletions
.gitignore
+
2
−
1
View file @
6cc38678
# personal data
/Application_Form
/registrations*.csv
/submissions-638.csv
/reviews*.csv
/submissions*.csv
# generated
/Selection
...
...
This diff is collapsed.
Click to expand it.
create-evaluation-files.py
+
8
−
6
View file @
6cc38678
...
...
@@ -3,8 +3,8 @@
# in current directory. Creates evaluation.html and reviews/
#
# cd Selection
# usage: python3 ../create-evaluation-files
-multi
.py \
# ../registrations.csv ../
submissions-638
.csv [../assign-*.csv]
# usage: python3 ../create-evaluation-files.py \
# ../registrations.csv ../
reviews
.csv [../assign-*.csv]
#
# Some --- columns needs to be renamed in evaluation-results.csv
# First column --- to -o-
...
...
@@ -525,7 +525,7 @@ for row in eval_data['rows']:
dic
=
dict
(
zip
(
eval_data
[
'
header
'
],
row
))
# print(dic)
userID
=
int
(
dic
[
"
Applicant number
"
])
userID
=
int
(
dic
[
"
Applicant number
"
]
.
replace
(
"
#
"
,
""
)
)
reviewerName
=
dic
[
"
Signature
"
].
replace
(
"
"
,
"
_
"
)
filename
=
"
reviews/{0:03}_{1}.html
"
.
format
(
userID
,
reviewerName
)
...
...
@@ -588,7 +588,7 @@ for row in eval_data['rows']:
for
i
in
range
(
0
,
len
(
eval_data
[
'
header
'
])):
# loop over header to preserve key order
key
=
eval_data
[
'
header
'
][
i
]
value
=
row
[
i
].
strip
()
value
=
row
[
i
].
strip
()
.
replace
(
"
#
"
,
""
)
#print(key, "|" + value + "|")
# replace value for all keys in row
html_fld
=
key
.
replace
(
"
"
,
"
_
"
).
upper
()
...
...
@@ -682,8 +682,10 @@ for row in eval_data['rows']:
# for fldName in ['First Choice', 'Second Choice', 'Third Choice']:
#for fldName in ['1', '2', '3']:
for
fldName
in
[
'
Choice 1
'
,
'
Choice 2
'
,
'
Choice 3
'
]:
choice
=
fldName
.
split
(
"
"
)[
1
].
strip
()
#for fldName in ['Choice 1', 'Choice 2', 'Choice 3']:
# choice = fldName.split(" ")[1].strip()
for
fldName
in
[
'
1.
'
,
'
2.
'
,
'
3.
'
]:
choice
=
fldName
[
0
:
1
]
# get all three projects and first add all user's first choice, then second and then third choice
for
id
in
user_data
:
# loop over all users and extract projects and prepare arrays
...
...
This diff is collapsed.
Click to expand it.
prepare-selection.sh
+
14
−
5
View file @
6cc38678
...
...
@@ -5,12 +5,21 @@ if [ ! -d Application_Form ]; then
echo
"Missing 'Application_Form' directory"
exit
1
fi
for
f
in
registrations.csv reviews.csv
do
if
[
!
-f
$f
]
;
then
echo
"Missing
$f
"
exit
1
fi
done
rm
-rf
Selection
mkdir
Selection
cd
Selection
python3 ../create-evaluation-files.py ../registrations.csv ../
submissions-638
.csv ../assign-[0-2].csv
python3 ../create-evaluation-files.py ../registrations.csv ../
reviews
.csv ../assign-[0-2].csv
cd
..
mv
Selection/students.csv
.
perl sohpc-assign.pl slots-round1.csv weights-pref.csv students.csv project-preferences.csv
>
select
-round1-by-pref
.txt
perl sohpc-assign.pl slots-round2-1-2.csv weights-pref.csv students.csv project-preferences.csv |
grep
-v
.1:
>
select
-round2-by-pref-1-2
.txt
perl sohpc-assign.pl slots-round2-1-5.csv weights-pref.csv students.csv project-preferences.csv |
grep
-v
.1:
>
select
-round2-by-pref-1-5
.txt
...
...
@@ -20,9 +29,9 @@ perl sohpc-assign.pl slots.csv weights-score.csv students.csv project-preference
awk
'{ if ($2 == "slots,") { $3 = $3 + 1 }; print $0 }'
project-preferences.csv
>
project-preferences-reserves.csv
perl sohpc-assign.pl slots-reserves-2-5.csv weights-pref.csv students.csv project-preferences-reserves.csv
>
select
-reserves-by-pref-2-5
.txt
for
i
in
$(
seq
2001 2024
)
;
do
grep
^
$i
select
-reserves-by-pref-2-5
.txt |
tail
-n
1
;
done
>
select
-reserves
.txt
mkdir
Selection/scripts
cp
prepare-selection.sh create-evaluation-files.py evaluation-detail-format.html
submissions-638.csv
registrations.csv Selection/scripts
cp
prepare-selection.sh create-evaluation-files.py evaluation-detail-format.html registration
s.csv review
s.csv Selection/scripts
cp
sohpc-assign.pl slots
*
.csv weights
*
.csv students.csv project-preferences.csv
select*
.txt assign-
*
.csv Selection/scripts
echo
zip
-r
Selection Selection
# submissions-638.csv: David Henty's #24 renamed to #34, Duplicate #15 on line 151 removed
# registrations.csv: Keys 1,2,3 changed to Choice 1, Choice 2, Choice 3
rm
-f
Selection.zip
zip
-q
-r
Selection Selection
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