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
Matthias Mayr
limbo
Commits
8a051ca1
Commit
8a051ca1
authored
Aug 25, 2016
by
Jean-Baptiste Mouret
Browse files
ready to try on all files!
parent
827657b6
Changes
5
Hide whitespace changes
Inline
Side-by-side
LICENSE
View file @
8a051ca1
CeCILL-C FREE SOFTWARE LICENSE AGREEMENT
...
...
src/benchmarks/bayesopt/testfunctions.hpp
View file @
8a051ca1
/*
-------------------------------------------------------------------------
This file is part of BayesOpt, an efficient C++ library for
Bayesian optimization.
Copyright (C) 2011-2013 Ruben Martinez-Cantin <rmcantin@unizar.es>
BayesOpt is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
BayesOpt is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with BayesOpt. If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------
*/
#define _USE_MATH_DEFINES
#include
<cmath>
#include
<algorithm>
...
...
waf_tools/license.py
0 → 100644
View file @
8a051ca1
# functions to insert the license in the headers of each cpp/hpp/py/wscript file
# note that we add a pipe (|) on each line so that we can remove the license and
# reinsert it automatically
import
fnmatch
,
re
import
os
,
shutil
,
sys
license
=
'''Copyright Inria May 2015
This project has received funding from the European Research Council (ERC) under
the European Union's Horizon 2020 research and innovation programme (grant
agreement No 637972) - see http://www.resibots.eu
Contributor(s):
- Jean-Baptiste Mouret (jean-baptiste.mouret@inria.fr)
- Antoine Cully (antoinecully@gmail.com)
- Kontantinos Chatzilygeroudis (konstantinos.chatzilygeroudis@inria.fr)
- Federico Allocati (fede.allocati@gmail.com)
- Vaios Papaspyros (b.papaspyros@gmail.com)
This software is a computer program whose purpose is to optimize continuous,
black-box functions. I mainly implements Gaussian processes and the Bayesian
optimization algorithm. Main repository: http://github.com/resibots/limbo
This software is governed by the CeCILL-C license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL-C
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
liability.
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL-C license and that you accept its terms.
'''
def
make_dirlist
(
folder
,
extensions
):
matches
=
[]
for
root
,
dirnames
,
filenames
in
os
.
walk
(
folder
):
for
ext
in
extensions
:
for
filename
in
fnmatch
.
filter
(
filenames
,
'*'
+
ext
):
matches
.
append
(
os
.
path
.
join
(
root
,
filename
))
return
matches
def
insert_header
(
fname
,
prefix
,
license
):
input
=
open
(
fname
,
'r'
)
output
=
open
(
'/tmp/'
+
fname
.
split
(
'/'
)[
-
1
],
'w'
)
for
line
in
license
.
split
(
'
\n
'
):
output
.
write
(
prefix
+
line
+
"
\n
"
)
for
line
in
input
:
if
line
[
0
:
len
(
prefix
)]
!=
prefix
:
output
.
write
(
line
)
output
.
close
()
def
insert
():
# cpp
cpp
=
make_dirlist
(
'src'
,
[
'.hpp'
,
'.cpp'
])
insert_header
(
'src/benchmarks/bayesopt/testfunctions.hpp'
,
"//| "
,
license
)
for
i
in
cpp
:
insert_header
(
i
,
"//| "
,
license
)
py
=
make_dirlist
(
'waf_tools'
,
[
'.py'
])
py
+=
make_dirlist
(
'.'
,
[
'wscript'
])
for
i
in
py
:
insert_header
(
i
,
"#| "
,
license
)
waf_tools/limbo.py
View file @
8a051ca1
...
...
@@ -4,6 +4,7 @@ import subprocess
import
time
import
threading
import
params
import
license
from
waflib.Tools
import
waf_unit_test
json_ok
=
True
...
...
@@ -242,3 +243,5 @@ def output_params(folder):
text_file
=
open
(
"params_"
+
folder
[
4
:]
+
".txt"
,
"w"
)
text_file
.
write
(
output
)
text_file
.
close
()
def
insert_license
():
license
.
insert
()
wscript
View file @
8a051ca1
...
...
@@ -160,6 +160,9 @@ def shutdown(ctx):
if
ctx
.
options
.
local_serial
:
limbo
.
run_local
(
ctx
.
options
.
local_serial
)
def
insert_license
(
ctx
):
limbo
.
insert_license
()
class
BuildExtensiveTestsContext
(
BuildContext
):
cmd
=
'build_extensive_tests'
fun
=
'build_extensive_tests'
...
...
@@ -167,3 +170,7 @@ class BuildExtensiveTestsContext(BuildContext):
class
BuildBenchmark
(
BuildContext
):
cmd
=
'build_benchmark'
fun
=
'build_benchmark'
class
InsertLicense
(
BuildContext
):
cmd
=
'insert_license'
fun
=
'insert_license'
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