Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary_c-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Izzard, Robert Dr (Maths & Physics)
binary_c-python
Commits
9d4e8f62
Commit
9d4e8f62
authored
5 years ago
by
David Hendriks
Browse files
Options
Downloads
Patches
Plain Diff
formatted code
parent
3c444a1b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
binarycpython/utils/functions.py
+11
-2
11 additions, 2 deletions
binarycpython/utils/functions.py
binarycpython/utils/grid.py
+4
-6
4 additions, 6 deletions
binarycpython/utils/grid.py
with
15 additions
and
8 deletions
binarycpython/utils/functions.py
+
11
−
2
View file @
9d4e8f62
...
...
@@ -7,6 +7,7 @@ from binarycpython.utils.custom_logging_functions import (
create_and_load_logging_function
,
)
def
get_help_all
(
print_help
=
True
,
return_dict
=
False
):
"""
Function that reads out the output of the help_all api call to binary_c
...
...
@@ -78,7 +79,10 @@ def get_help_all(print_help=True, return_dict=False):
}
# make section_dict
section_dict
=
{
"
section_name
"
:
section_name
,
"
parameters
"
:
params_dict
.
copy
()}
section_dict
=
{
"
section_name
"
:
section_name
,
"
parameters
"
:
params_dict
.
copy
(),
}
# Put in the total dict
help_all_dict
[
section_name
]
=
section_dict
.
copy
()
...
...
@@ -338,8 +342,11 @@ def run_system_with_log(**kwargs):
output
=
binary_c_python_api
.
run_binary_with_logfile
(
arg_string
)
return
output
# run_system_with_log()
def
parse_output
(
output
,
selected_header
):
"""
Function that parses output of binary_c:
...
...
@@ -438,4 +445,6 @@ def load_logfile(logfile):
event_list
.
append
(
"
"
.
join
(
split_line
[
9
:]))
print
(
event_list
)
# load_logfile()
\ No newline at end of file
# load_logfile()
This diff is collapsed.
Click to expand it.
binarycpython/utils/grid.py
+
4
−
6
View file @
9d4e8f62
import
binary_c_python_api
from
binarycpython.utils.functions
import
(
get_defaults
,
)
from
binarycpython.utils.functions
import
get_defaults
import
binarycpython
...
...
@@ -11,7 +9,7 @@ class Population(object):
def
__init__
(
self
):
"""
Lots of initialisation
"""
"""
self
.
defaults
=
get_defaults
()
pass
...
...
@@ -23,7 +21,7 @@ class Population(object):
arg_string
=
"
binary_c
"
for
param
in
self
.
defaults
.
keys
():
print
(
param
,
self
.
defaults
[
param
])
if
self
.
defaults
[
param
]
==
''
:
if
self
.
defaults
[
param
]
==
""
:
print
(
self
.
defaults
[
param
])
# arg_string += "{} {} ".format(param, self.defaults[param])
...
...
@@ -38,4 +36,4 @@ test_pop = Population()
# print(test_pop.defaults)
test_pop
.
evolve_single
()
\ No newline at end of file
test_pop
.
evolve_single
()
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