Search is not available for this dataset
repo
stringlengths
2
152
file
stringlengths
15
239
code
stringlengths
0
58.4M
file_length
int64
0
58.4M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
364 values
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-03.html
<html> <head> <title>SL.P.10.R.23.SL062003-03</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>police Pakistan terrorism Osama Bin Laden year attacks India </a> </body> </html>
207
19.8
100
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-04.html
<html> <head> <title>SL.P.10.R.23.SL062003-04</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>thousand one two India Osama Bin Laden earthquake Osama </a> </body> </html>
202
19.3
95
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-05.html
<html> <head> <title>SL.P.10.R.23.SL062003-05</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>team India Vajpayee (India's prime minister) Pakistan government police people people gathering, function </a> </body> </html>
251
24.2
144
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-06.html
<html> <head> <title>SL.P.10.R.23.SL062003-06</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>people earthquake building India space Columbia police Kashmir team </a> </body> </html>
213
20.4
106
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-07.html
<html> <head> <title>SL.P.10.R.23.SL062003-07</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>Vajpayee (India's prime minister) year war government police Prime Minister India team </a> </body> </html>
232
22.3
125
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-08.html
<html> <head> <title>SL.P.10.R.23.SL062003-08</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>point army rate police two weapon one Saddam Hussain </a> </body> </html>
198
18.9
91
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-09.html
<html> <head> <title>SL.P.10.R.23.SL062003-09</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>point rate nations one two earthquake Arab/Billion thousand five </a> </body> </html>
210
20.1
103
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-10.html
<html> <head> <title>SL.P.10.R.23.SL062003-10</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>court company thousand fame one Enron two program share_market </a> </body> </html>
208
19.9
101
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-11.html
<html> <head> <title>SL.P.10.R.23.SL062003-11</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>election test, inspection commission test, exam, inspection missile World Bank ship, plane poll, election party </a> </body> </html>
257
24.8
150
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-12.html
<html> <head> <title>SL.P.10.R.23.SL062003-12</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>India atomic Pakistan North_Korea World Bank Korea north plane, aircraft </a> </body> </html>
218
20.9
111
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-13.html
<html> <head> <title>SL.P.10.R.23.SL062003-13</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>Singh (common Indian last name) BJP (Bhartiya Janata Party - a political party in India) victory prize, award festival party election Congress political party in India, US Congress Modi (name) </a...
338
32.9
231
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-14.html
<html> <head> <title>SL.P.10.R.23.SL062003-14</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>World Bank India bank destroyed meeting/summit financial currency minister both countries </a> </body> </html>
235
22.6
128
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-15.html
<html> <head> <title>SL.P.10.R.23.SL062003-15</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>gathering, function nation, country violence people police army gas festival Dollar </a> </body> </html>
229
22
122
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-16.html
<html> <head> <title>SL.P.10.R.23.SL062003-16</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>minister government Jammu & Kashmir BJP (Bhartiya Janata Party - a political party in India) India party Singh (common Indian last name) mobile World Bank </a> </body> </html>
300
29.1
193
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-17.html
<html> <head> <title>SL.P.10.R.23.SL062003-17</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>Kashmir Vajpayee (India's prime minister) Pakistan Jammu & Kashmir Congress political party in India, US Congress Sayeed (name) states India </a> </body> </html>
286
27.7
179
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-18.html
<html> <head> <title>SL.P.10.R.23.SL062003-18</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>ship space satellite China India flight Columbia ban water </a> </body> </html>
204
19.5
97
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-19.html
<html> <head> <title>SL.P.10.R.23.SL062003-19</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>army accident plane, aircraft rail fame one border share_market security </a> </body> </html>
218
20.9
111
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-20.html
<html> <head> <title>SL.P.10.R.23.SL062003-20</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>effort report number, count Me/In, Inside, within Tamil disease information, knowledge government Kashmir </a> </body> </html>
251
24.2
144
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-21.html
<html> <head> <title>SL.P.10.R.23.SL062003-21</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>police India talk use Kashmir more explosion two work </a> </body> </html>
199
19
92
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-22.html
<html> <head> <title>SL.P.10.R.23.SL062003-22</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>Pakistan police Vajpayee (India's prime minister) India government Prime Minister Qaeda ["Al-Qaeda"] cup European </a> </body> </html>
259
25
152
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-23.html
<html> <head> <title>SL.P.10.R.23.SL062003-23</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>Me/In, Inside, within President India ship nations space effort nineteen thousand </a> </body> </html>
227
21.8
120
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-24.html
<html> <head> <title>SL.P.10.R.23.SL062003-24</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>police accident ear poll, election nation, country Pakistan people people weapons </a> </body> </html>
227
21.8
120
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.23.SL062003-25.html
<html> <head> <title>SL.P.10.R.23.SL062003-25</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>both countries Jammu & Kashmir population, people both Kashmir Pakistan Sayeed (name) Vajpayee (India's prime minister) India </a> </body> </html>
271
26.2
164
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-01.html
<html> <head> <title>SL.P.10.R.24.SL062003-01</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>world countries is fact is that developed countries put pressure on that they should be </a> </body> </html>
233
22.4
126
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-02.html
<html> <head> <title>SL.P.10.R.24.SL062003-02</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>indonesian city of bali in in bomb blast accused india began to be averted </a> </body> </html>
220
21.1
113
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-03.html
<html> <head> <title>SL.P.10.R.24.SL062003-03</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>terrorist attack measures should be more effective policy american foreign minister everyone knows that indian parliament attack </a> </body> </html>
274
26.5
167
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-04.html
<html> <head> <title>SL.P.10.R.24.SL062003-04</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>india and rest of world for good and evil struggle because living </a> </body> </html>
211
20.2
104
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-05.html
<html> <head> <title>SL.P.10.R.24.SL062003-05</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>agra remains of agra summit in general pervez musharraf was to chair idea </a> </body> </html>
219
21
112
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-06.html
<html> <head> <title>SL.P.10.R.24.SL062003-06</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>gujarat earthquake tremble raised land unsafe buildings were earth </a> </body> </html>
212
20.3
105
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-07.html
<html> <head> <title>SL.P.10.R.24.SL062003-07</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>in past year in running affairs of vajpayee remain clear less to people </a> </body> </html>
217
20.8
110
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-08.html
<html> <head> <title>SL.P.10.R.24.SL062003-08</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>2.1 iraqi army 1 11:28 7.1 american forces around covered with offence to control he for iraqi army </a> </body> </html>
245
23.6
138
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-09.html
<html> <head> <title>SL.P.10.R.24.SL062003-09</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>UTC 16:35 4.1 in america indian companies to work not to be given to make proposal </a> </body> </html>
228
21.9
121
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-10.html
<html> <head> <title>SL.P.10.R.24.SL062003-10</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>securities scam in harshad mehta and three others to 5 @-@ 5 years </a> </body> </html>
212
20.3
105
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-11.html
<html> <head> <title>SL.P.10.R.24.SL062003-11</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>defense minister threat </a> </body> </html>
169
16
62
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-12.html
<html> <head> <title>SL.P.10.R.24.SL062003-12</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>india from neighbouring countries to maintain friendly relations in favour </a> </body> </html>
220
21.1
113
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-13.html
<html> <head> <title>SL.P.10.R.24.SL062003-13</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>manmohan not drums new delhi 31 august capital new delhi there was not @-@ revolution murdabad ' slogans and not </a> </body> </html>
258
24.9
151
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-14.html
<html> <head> <title>SL.P.10.R.24.SL062003-14</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>world bank president james by india ' s economic development appreciation visit yashwant sinha accepted invitation </a> </body> </html>
260
25.1
153
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-15.html
<html> <head> <title>SL.P.10.R.24.SL062003-15</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>g @-@ 8 summit violence june 2 as leading countries 8 summit all over continued </a> </body> </html>
225
21.6
118
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-16.html
<html> <head> <title>SL.P.10.R.24.SL062003-16</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>professional lack will not be allowed to be june 2 central human resources minister said </a> </body> </html>
234
22.5
127
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-17.html
<html> <head> <title>SL.P.10.R.24.SL062003-17</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>vajpayee sonia s visit to new zeal in kashmir june is atmosphere </a> </body> </html>
210
20.1
103
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-18.html
<html> <head> <title>SL.P.10.R.24.SL062003-18</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>poll of india journey of right way june 2 indian space kasturirangan will be sent </a> </body> </html>
227
21.8
120
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-19.html
<html> <head> <title>SL.P.10.R.24.SL062003-19</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>military in to take stock june 2 rajasthan border jaisalmer district in stock yesterday began </a> </body> </html>
239
23
132
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-20.html
<html> <head> <title>SL.P.10.R.24.SL062003-20</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>government project ' tiger ' successful project june 2 environment and forests of ministry </a> </body> </html>
236
22.7
129
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-21.html
<html> <head> <title>SL.P.10.R.24.SL062003-21</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>crime </a> </body> </html>
151
14.2
44
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-22.html
<html> <head> <title>SL.P.10.R.24.SL062003-22</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>india pakistan deeds to answer capable of </a> </body> </html>
187
17.8
80
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-23.html
<html> <head> <title>SL.P.10.R.24.SL062003-23</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>sun enrich nation to make plan kanchipuram june 19 </a> </body> </html>
196
18.7
89
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-24.html
<html> <head> <title>SL.P.10.R.24.SL062003-24</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>roadways bus and impact </a> </body> </html>
169
16
62
html
pyrouge
pyrouge-master/pyrouge/tests/data/systems/SL.P.10.R.24.SL062003-25.html
<html> <head> <title>SL.P.10.R.24.SL062003-25</title> </head> <body bgcolor="white"> <a name="1">[1]</a> <a href="#1" id=1>india and pakistan in kashmir can become medium @-@ mooftee srinagar june 20 </a> </body> </html>
222
21.3
115
html
pyrouge
pyrouge-master/pyrouge/utils/__init__.py
0
0
0
py
pyrouge
pyrouge-master/pyrouge/utils/argparsers.py
import argparse io_parser = argparse.ArgumentParser(add_help=False) io_parser.add_argument( '-i', '--input-files-dir', help="Path of the directory containing the files to be converted.", type=str, action="store", dest="input_dir", required=True ) io_parser.add_argument( '-o', '--output-files-di...
2,832
31.94186
78
py
pyrouge
pyrouge-master/pyrouge/utils/file_utils.py
from __future__ import print_function, unicode_literals, division import os import re import codecs import xml.etree.ElementTree as et from pyrouge.utils import log class DirectoryProcessor: @staticmethod def process(input_dir, output_dir, function): """ Apply function to all files in input...
2,644
29.056818
77
py
pyrouge
pyrouge-master/pyrouge/utils/log.py
import logging def get_console_logger(name, level=logging.INFO): logFormatter = logging.Formatter( "%(asctime)s [%(threadName)-12.12s] [%(levelname)-5.5s] %(message)s") logger = logging.getLogger(name) if not logger.handlers: logger.setLevel(level) ch = logging.StreamHandler() ...
503
27
78
py
pyrouge
pyrouge-master/pyrouge/utils/sentence_splitter.py
from __future__ import print_function, unicode_literals, division from pyrouge.utils import log from pyrouge.utils.string_utils import cleanup from pyrouge.utils.file_utils import DirectoryProcessor class PunktSentenceSplitter: """ Splits sentences using the NLTK Punkt sentence tokenizer. If installed, P...
2,062
37.924528
78
py
pyrouge
pyrouge-master/pyrouge/utils/string_utils.py
from __future__ import print_function, unicode_literals, division import re def remove_newlines(s): p = re.compile("[\n|\r\n|\n\r]") s = re.sub(p, " ", s) s = remove_extraneous_whitespace(s) return s def remove_extraneous_whitespace(s): p = re.compile("(\s+)") s = re.sub(p, " ", s) retu...
373
16.809524
65
py
null
cmaes-main/README.md
# CMA-ES [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](./LICENSE) [![PyPI - Downloads](https://img.shields.io/pypi/dw/cmaes)](https://pypistats.org/packages/cmaes) Lightweight Covariance Matrix Adaptation Evolution Strategy (CMA-ES) [1] implementation. ![visualize-...
16,767
39.114833
451
md
null
cmaes-main/fuzzing.py
import sys import atheris import hypothesis.extra.numpy as npst from hypothesis import given, strategies as st from cmaes import CMA @given(data=st.data()) def test_cma_tell(data): dim = data.draw(st.integers(min_value=2, max_value=100)) mean = data.draw(npst.arrays(dtype=float, shape=dim)) sigma = data....
1,033
26.210526
76
py
null
cmaes-main/setup.py
from setuptools import setup if __name__ == "__main__": setup()
69
13
28
py
null
cmaes-main/.github/ISSUE_TEMPLATE/bug_report.md
--- name: "Bug report" about: Create a bug report to improve cmaes title: "" labels: bug assignees: '' --- # Bug reports *Please file a bug report here.* ## Expected Behavior *Please describe the behavior you are expecting* ## Current Behavior and Steps to Reproduce *What is the current behavior? Please provide ...
566
19.25
150
md
null
cmaes-main/.github/ISSUE_TEMPLATE/feature_request.md
--- name: "Feature request" about: Suggest an idea for new features in cmaes. title: "" labels: enhancement assignees: '' --- # Feature Request *Please write your suggestion here.*
185
12.285714
49
md
null
cmaes-main/.github/workflows/examples.yml
name: Run examples on: pull_request: paths: - '.github/workflows/examples.yml' - 'examples/**.py' - 'cmaes/**.py' jobs: examples: runs-on: ubuntu-latest strategy: matrix: python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v2 ...
1,624
30.25
61
yml
null
cmaes-main/.github/workflows/pypi-publish.yml
name: Publish distributions to TestPyPI and PyPI on: push: tags: - v*.*.* jobs: build-n-publish: name: Build and publish Python distributions to TestPyPI and PyPI runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v4 w...
1,425
25.90566
95
yml
null
cmaes-main/.github/workflows/tests.yml
name: Run tests and linters on: pull_request: paths: - '.github/workflows/tests.yml' - 'pyproject.toml' - '**.py' jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v4 with: pyth...
1,211
26.545455
79
yml
null
cmaes-main/benchmark/README.md
# Continuous benchmarking using kurobako and GitHub Actions Benchmark scripts are built on [kurobako](https://github.com/sile/kurobako). See [Introduction to Kurobako: A Benchmark Tool for Hyperparameter Optimization Algorithms](https://medium.com/optuna/kurobako-a2e3f7b760c7) for more details. ## How to run benchmar...
1,578
35.72093
158
md
null
cmaes-main/benchmark/optuna_solver.py
import argparse import optuna import warnings from kurobako import solver from kurobako.solver.optuna import OptunaSolverFactory warnings.filterwarnings( "ignore", category=optuna.exceptions.ExperimentalWarning, module="optuna.samplers._cmaes", ) parser = argparse.ArgumentParser() parser.add_argument( ...
5,019
31.597403
88
py
null
cmaes-main/benchmark/problem_himmelblau.py
from kurobako import problem from kurobako.problem import Problem from typing import List from typing import Optional class HimmelblauEvaluator(problem.Evaluator): def __init__(self, params: List[Optional[float]]): self._x1, self._x2 = params self._current_step = 0 def evaluate(self, next_st...
1,400
27.02
62
py
null
cmaes-main/benchmark/problem_rastrigin.py
import sys import numpy as np from kurobako import problem from kurobako.problem import Problem from typing import List from typing import Optional class RastriginEvaluator(problem.Evaluator): def __init__(self, params: List[Optional[float]]): self.n = len(params) self.x = np.array(params, dtype...
1,537
26.464286
81
py
null
cmaes-main/benchmark/problem_rosenbrock.py
from kurobako import problem from kurobako.problem import Problem from typing import List from typing import Optional class RosenbrockEvaluator(problem.Evaluator): """ See https://www.sfu.ca/~ssurjano/rosen.html """ def __init__(self, params: List[Optional[float]]): self._x1, self._x2 = para...
1,428
26.480769
73
py
null
cmaes-main/benchmark/problem_six_hump_camel.py
from kurobako import problem from kurobako.problem import Problem from typing import List from typing import Optional class SixHumpCamelEvaluator(problem.Evaluator): """ See https://www.sfu.ca/~ssurjano/camel6.html """ def __init__(self, params: List[Optional[float]]): self._x1, self._x2 = p...
1,564
26.946429
73
py
null
cmaes-main/benchmark/runner.sh
#!/bin/sh set -e KUROBAKO=${KUROBAKO:-kurobako} DIR=$(cd $(dirname $0); pwd) REPEATS=${REPEATS:-5} BUDGET=${BUDGET:-300} SEED=${SEED:-1} DIM=${DIM:-2} SURROGATE_ROOT=${SURROGATE_ROOT:-$(dirname $DIR)/tmp/surrogate-models} WARM_START=${WARM_START:-0} usage() { cat <<EOF $(basename ${0}) is an entrypoint to run be...
3,429
34
137
sh
null
cmaes-main/cmaes/__init__.py
from ._cma import CMA # NOQA from ._sepcma import SepCMA # NOQA from ._warm_start import get_warm_start_mgd # NOQA from ._cmawm import CMAwM # NOQA from ._xnes import XNES # NOQA from ._dxnesic import DXNESIC # NOQA __version__ = "0.9.1"
245
26.333333
51
py
null
cmaes-main/cmaes/_cma.py
from __future__ import annotations import math import numpy as np from typing import Any from typing import cast from typing import Optional _EPS = 1e-8 _MEAN_MAX = 1e32 _SIGMA_MAX = 1e32 class CMA: """CMA-ES stochastic optimizer class with ask-and-tell interface. Example: .. code:: ...
18,928
33.106306
96
py
null
cmaes-main/cmaes/_cmawm.py
from __future__ import annotations import functools import numpy as np from typing import cast from typing import Optional from cmaes import CMA from cmaes._cma import _is_valid_bounds try: from scipy import stats chi2_ppf = functools.partial(stats.chi2.ppf, df=1) norm_cdf = stats.norm.cdf except Impo...
13,077
35.530726
98
py
null
cmaes-main/cmaes/_dxnesic.py
from __future__ import annotations import math import sys import numpy as np from typing import cast from typing import Optional _EPS = 1e-8 _MEAN_MAX = 1e32 _SIGMA_MAX = 1e32 class DXNESIC: """DX-NES-IC stochastic optimizer class with ask-and-tell interface. Example: .. code:: impo...
14,612
31.187225
96
py
null
cmaes-main/cmaes/_sepcma.py
from __future__ import annotations import math import numpy as np from typing import Any from typing import cast from typing import Optional _EPS = 1e-8 _MEAN_MAX = 1e32 _SIGMA_MAX = 1e32 class SepCMA: """Separable CMA-ES stochastic optimizer class with ask-and-tell interface. Example: .. code::...
12,013
31.646739
96
py
null
cmaes-main/cmaes/_stats.py
import math import numpy as np @np.vectorize def norm_cdf(x: float, loc: float = 0.0, scale: float = 1.0) -> float: x = (x - loc) / scale x = x / 2**0.5 z = abs(x) if z < 1 / 2**0.5: y = 0.5 + 0.5 * math.erf(x) else: y = 0.5 * math.erfc(z) if x > 0: y = 1.0 - y...
1,001
20.319149
70
py
null
cmaes-main/cmaes/_warm_start.py
from __future__ import annotations import math import numpy as np def get_warm_start_mgd( source_solutions: list[tuple[np.ndarray, float]], gamma: float = 0.1, alpha: float = 0.1, ) -> tuple[np.ndarray, float, np.ndarray]: """Estimates a promising distribution of the source task, then returns a m...
2,483
30.05
84
py
null
cmaes-main/cmaes/_xnes.py
from __future__ import annotations import math import numpy as np from typing import cast from typing import Optional _EPS = 1e-8 _MEAN_MAX = 1e32 _SIGMA_MAX = 1e32 class XNES: """xNES stochastic optimizer class with ask-and-tell interface. Example: .. code:: import numpy as np ...
9,031
30.58042
96
py
null
cmaes-main/cmaes/cma.py
import warnings from ._cma import CMA __all__ = ["CMA"] warnings.warn( "This module is deprecated. Please import CMA class from the " "package root (ex: from cmaes import CMA).", FutureWarning, )
211
16.666667
66
py
null
cmaes-main/examples/bipop_cmaes.py
import math import numpy as np from cmaes import CMA def ackley(x1, x2): return ( -20 * math.exp(-0.2 * math.sqrt(0.5 * (x1**2 + x2**2))) - math.exp(0.5 * (math.cos(2 * math.pi * x1) + math.cos(2 * math.pi * x2))) + math.e + 20 ) def main(): seed = 0 rng = np.random.R...
2,457
30.922078
83
py
null
cmaes-main/examples/cmaes_with_margin_binary.py
import numpy as np from cmaes import CMAwM def ellipsoid_onemax(x, n_zdim): n = len(x) n_rdim = n - n_zdim r = 10 if len(x) < 2: raise ValueError("dimension must be greater one") ellipsoid = sum([(1000 ** (i / (n_rdim - 1)) * x[i]) ** 2 for i in range(n_rdim)]) onemax = n_zdim - (0.0 <...
1,357
27.291667
86
py
null
cmaes-main/examples/cmaes_with_margin_integer.py
import numpy as np from cmaes import CMAwM def ellipsoid_int(x, _): n = len(x) if len(x) < 2: raise ValueError("dimension must be greater one") return sum([(1000 ** (i / (n - 1)) * x[i]) ** 2 for i in range(n)]) def main(): integer_dim, continuous_dim = 10, 10 dim = integer_dim + continu...
1,219
26.727273
83
py
null
cmaes-main/examples/ellipsoid_function.py
import numpy as np from cmaes import CMA def ellipsoid(x): n = len(x) if len(x) < 2: raise ValueError("dimension must be greater one") return sum([(1000 ** (i / (n - 1)) * x[i]) ** 2 for i in range(n)]) def main(): dim = 40 optimizer = CMA(mean=3 * np.ones(dim), sigma=2.0) print(" ev...
815
21.666667
71
py
null
cmaes-main/examples/ipop_cmaes.py
import math import numpy as np from cmaes import CMA def ackley(x1, x2): return ( -20 * math.exp(-0.2 * math.sqrt(0.5 * (x1**2 + x2**2))) - math.exp(0.5 * (math.cos(2 * math.pi * x1) + math.cos(2 * math.pi * x2))) + math.e + 20 ) def main(): seed = 0 rng = np.random.R...
1,672
28.875
83
py
null
cmaes-main/examples/optuna_sampler.py
import optuna def objective(trial: optuna.Trial): x1 = trial.suggest_float("x1", -4, 4) x2 = trial.suggest_float("x2", -4, 4) return (x1 - 3) ** 2 + (10 * (x2 + 2)) ** 2 def main(): optuna.logging.set_verbosity(optuna.logging.INFO) study = optuna.create_study(sampler=optuna.samplers.CmaEsSampler...
430
22.944444
71
py
null
cmaes-main/examples/quadratic_function.py
import numpy as np from cmaes import CMA def quadratic(x1, x2): return (x1 - 3) ** 2 + (10 * (x2 + 2)) ** 2 def main(): optimizer = CMA(mean=np.zeros(2), sigma=1.3) print(" g f(x1,x2) x1 x2 ") print("=== ========== ====== ======") while True: solutions = [] for _...
741
22.1875
59
py
null
cmaes-main/examples/sepcma_ellipsoid_function.py
import numpy as np from cmaes import SepCMA def ellipsoid(x): n = len(x) if len(x) < 2: raise ValueError("dimension must be greater one") return sum([(1000 ** (i / (n - 1)) * x[i]) ** 2 for i in range(n)]) def main(): dim = 40 optimizer = SepCMA(mean=3 * np.ones(dim), sigma=2.0) prin...
821
21.833333
71
py
null
cmaes-main/examples/ws_cma_es.py
import numpy as np from cmaes import CMA, get_warm_start_mgd def source_task(x1: float, x2: float) -> float: b = 0.4 return (x1 - b) ** 2 + (x2 - b) ** 2 def target_task(x1: float, x2: float) -> float: b = 0.6 return (x1 - b) ** 2 + (x2 - b) ** 2 def main() -> None: # Generate solutions from a...
1,314
25.3
61
py
null
cmaes-main/tests/__init__.py
0
0
0
py
null
cmaes-main/tests/test_boundary.py
import numpy as np from unittest import TestCase from cmaes import CMA, SepCMA CMA_CLASSES = [CMA, SepCMA] class TestCMABoundary(TestCase): def test_valid_dimension(self): for CmaClass in CMA_CLASSES: with self.subTest(f"Class: {CmaClass.__name__}"): CmaClass( ...
2,117
38.962264
88
py
null
cmaes-main/tests/test_cmawm.py
import warnings import numpy as np from numpy.testing import assert_almost_equal from unittest import TestCase from cmaes import CMA, CMAwM class TestCMAwM(TestCase): def test_no_discrete_spaces(self): mean = np.zeros(2) bounds = np.array([[-10, 10], [-10, 10]]) steps = np.array([0, 0]) ...
1,229
33.166667
77
py
null
cmaes-main/tests/test_compress_symmetric.py
import numpy as np from unittest import TestCase from cmaes._cma import _decompress_symmetric, _compress_symmetric class TestCompressSymmetric(TestCase): def test_compress_symmetric_odd(self): sym2d = np.array([[1, 2], [2, 3]]) actual = _compress_symmetric(sym2d) expected = np.array([1, 2,...
1,137
36.933333
65
py
null
cmaes-main/tests/test_fuzzing.py
import hypothesis.extra.numpy as npst import unittest from hypothesis import given, strategies as st from cmaes import CMA, SepCMA class TestFuzzing(unittest.TestCase): @given( data=st.data(), ) def test_cma_tell(self, data): dim = data.draw(st.integers(min_value=2, max_value=100)) ...
2,051
31.0625
80
py
null
cmaes-main/tests/test_stats.py
import math from unittest import TestCase from cmaes import _stats # Test Cases in this file is generated by SciPy v1.9.3 class TestNormCDF(TestCase): def test_standard_normal_distribution(self): self.assertAlmostEqual(_stats.norm_cdf(-30), 4.906713927147907e-198, places=205) self.assertAlmostEqu...
1,486
38.131579
88
py
null
cmaes-main/tests/test_termination_criterion.py
import numpy as np from unittest import TestCase from cmaes import CMA class TestTerminationCriterion(TestCase): def test_stop_if_objective_values_are_not_changed(self): optimizer = CMA(mean=np.zeros(2), sigma=1.3) popsize = optimizer.population_size rng = np.random.RandomState(seed=1) ...
906
32.592593
75
py
null
cmaes-main/tests/test_warm_start.py
import numpy as np from unittest import TestCase from cmaes import CMA, get_warm_start_mgd class TestWarmStartCMA(TestCase): def test_dimension(self): optimizer = CMA(mean=np.zeros(10), sigma=1.3) source_solutions = [(optimizer.ask(), 0.0) for _ in range(100)] ws_mean, ws_sigma, ws_cov = g...
400
29.846154
72
py
null
cmaes-main/tools/cmaes_visualizer.py
""" Usage: cmaes_visualizer.py OPTIONS Optional arguments: -h, --help show this help message and exit --function {quadratic,himmelblau,rosenbrock,six-hump-camel} --seed SEED --frames FRAMES --interval INTERVAL --pop-per-frame POP_PER_FRAME --restart-strategy {ipop,bipop} Example: python3 ...
8,221
26.315615
88
py
null
cmaes-main/tools/optuna_profile.py
import argparse import cProfile import logging import pstats import optuna parser = argparse.ArgumentParser() parser.add_argument("--storage", choices=["memory", "sqlite"], default="memory") parser.add_argument("--params", type=int, default=100) parser.add_argument("--trials", type=int, default=1000) args = parser.par...
1,103
25.285714
80
py
null
cmaes-main/tools/ws_cmaes_visualizer.py
""" Usage: python3 tools/ws_cmaes_visualizer.py OPTIONS Optional arguments: -h, --help show this help message and exit --function {quadratic,himmelblau,rosenbrock,six-hump-camel,sphere,rot-ellipsoid} --seed SEED --alpha ALPHA --gamma GAMMA --frames FRAMES --interval INTERVAL --pop-per-fram...
7,172
23.233108
99
py
OLED
OLED-master/README.md
# OLED: Online Learning of Event Definitions ``OLED`` is an online ('single-pass') Inductive Logic Programming system for learning logical theories from data streams. It has been designed having in mind the construction of knowledge bases for event recognition applications, in the form of domain-specific axioms in th...
5,667
59.946237
603
md
OLED
OLED-master/install-scripts/install.sh
#!/usr/bin/env bash # Link logger source logger.sh # Installing useful packages log_info "Installing various packages." sudo apt-get install bison re2c scons gcc libtbb-dev python2.7-dev lua5.2-dev wget # Check if external dependencies directory exists if [ ! -d ../external_dependencies ]; then # Create install...
2,420
33.098592
162
sh