Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bibliovid
scrappers
Commits
0907e22c
Commit
0907e22c
authored
Jun 15, 2020
by
Benoit Favre
Browse files
set repeatable random seed
parent
ce7b4d8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
split_json_random.py
View file @
0907e22c
...
...
@@ -14,6 +14,8 @@ items = json.loads(sys.stdin.read())
num_test
=
int
(
float
(
sys
.
argv
[
3
])
*
len
(
items
))
num_valid
=
int
(
float
(
sys
.
argv
[
4
])
*
len
(
items
))
random
.
seed
(
12345
)
for
n
in
range
(
num_folds
):
random
.
shuffle
(
items
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment