partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
ClusterClient.stats
The Cluster Stats API allows to retrieve statistics from a cluster wide perspective. The API returns basic index metrics and information about the current nodes that form the cluster. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html>`_ :arg node_id: A ...
elasticsearch/client/cluster.py
def stats(self, node_id=None, params=None): """ The Cluster Stats API allows to retrieve statistics from a cluster wide perspective. The API returns basic index metrics and information about the current nodes that form the cluster. `<http://www.elastic.co/guide/en/elasticsearch/r...
def stats(self, node_id=None, params=None): """ The Cluster Stats API allows to retrieve statistics from a cluster wide perspective. The API returns basic index metrics and information about the current nodes that form the cluster. `<http://www.elastic.co/guide/en/elasticsearch/r...
[ "The", "Cluster", "Stats", "API", "allows", "to", "retrieve", "statistics", "from", "a", "cluster", "wide", "perspective", ".", "The", "API", "returns", "basic", "index", "metrics", "and", "information", "about", "the", "current", "nodes", "that", "form", "the...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cluster.py#L80-L97
[ "def", "stats", "(", "self", ",", "node_id", "=", "None", ",", "params", "=", "None", ")", ":", "url", "=", "'/_cluster/stats'", "if", "node_id", ":", "url", "=", "_make_path", "(", "'_cluster/stats/nodes'", ",", "node_id", ")", "return", "self", ".", "t...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
ClusterClient.reroute
Explicitly execute a cluster reroute allocation command including specific commands. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html>`_ :arg body: The definition of `commands` to perform (`move`, `cancel`, `allocate`) :arg dry_run: Simulate the ...
elasticsearch/client/cluster.py
def reroute(self, body=None, params=None): """ Explicitly execute a cluster reroute allocation command including specific commands. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html>`_ :arg body: The definition of `commands` to perform (`move`, `cance...
def reroute(self, body=None, params=None): """ Explicitly execute a cluster reroute allocation command including specific commands. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html>`_ :arg body: The definition of `commands` to perform (`move`, `cance...
[ "Explicitly", "execute", "a", "cluster", "reroute", "allocation", "command", "including", "specific", "commands", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/",...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cluster.py#L101-L121
[ "def", "reroute", "(", "self", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "'POST'", ",", "'/_cluster/reroute'", ",", "params", "=", "params", ",", "body", "=", "body", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
ClusterClient.put_settings
Update cluster wide specific settings. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html>`_ :arg body: The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). :arg flat_settings: Return settings in...
elasticsearch/client/cluster.py
def put_settings(self, body=None, params=None): """ Update cluster wide specific settings. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html>`_ :arg body: The settings to be updated. Can be either `transient` or `persistent` (survi...
def put_settings(self, body=None, params=None): """ Update cluster wide specific settings. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html>`_ :arg body: The settings to be updated. Can be either `transient` or `persistent` (survi...
[ "Update", "cluster", "wide", "specific", "settings", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "cluster", "-", "update", "-", "settings", ".", "html", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cluster.py#L141-L154
[ "def", "put_settings", "(", "self", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "'PUT'", ",", "'/_cluster/settings'", ",", "params", "=", "params", ",", "body", "=", "bo...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
ClusterClient.allocation_explain
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html>`_ :arg body: The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' :arg include_disk_info: Return information about disk usage and shard si...
elasticsearch/client/cluster.py
def allocation_explain(self, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html>`_ :arg body: The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' :arg inclu...
def allocation_explain(self, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html>`_ :arg body: The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' :arg inclu...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "cluster", "-", "allocation", "-", "explain", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/cluster.py#L157-L169
[ "def", "allocation_explain", "(", "self", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "'GET'", ",", "'/_cluster/allocation/explain'", ",", "params", "=", "params", ",", "bod...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MigrationClient.deprecations
`<http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html>`_ :arg index: Index pattern
elasticsearch/client/xpack/migration.py
def deprecations(self, index=None, params=None): """ `<http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html>`_ :arg index: Index pattern """ return self.transport.perform_request( "GET", _make_path(index, "_migration", "deprecations"), para...
def deprecations(self, index=None, params=None): """ `<http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html>`_ :arg index: Index pattern """ return self.transport.perform_request( "GET", _make_path(index, "_migration", "deprecations"), para...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "migration", "/", "current", "/", "migration", "-", "api", "-", "deprecation", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/migration.py#L6-L14
[ "def", "deprecations", "(", "self", ",", "index", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "index", ",", "\"_migration\"", ",", "\"deprecations\"", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
ConnectionPool.get_connection
Return a connection from the pool using the `ConnectionSelector` instance. It tries to resurrect eligible connections, forces a resurrection when no connections are availible and passes the list of live connections to the selector instance to choose from. Returns a connection i...
elasticsearch/connection_pool.py
def get_connection(self): """ Return a connection from the pool using the `ConnectionSelector` instance. It tries to resurrect eligible connections, forces a resurrection when no connections are availible and passes the list of live connections to the selector instance t...
def get_connection(self): """ Return a connection from the pool using the `ConnectionSelector` instance. It tries to resurrect eligible connections, forces a resurrection when no connections are availible and passes the list of live connections to the selector instance t...
[ "Return", "a", "connection", "from", "the", "pool", "using", "the", "ConnectionSelector", "instance", "." ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/connection_pool.py#L206-L229
[ "def", "get_connection", "(", "self", ")", ":", "self", ".", "resurrect", "(", ")", "connections", "=", "self", ".", "connections", "[", ":", "]", "# no live nodes, resurrect one by force and return it", "if", "not", "connections", ":", "return", "self", ".", "r...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
CcrClient.follow
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html>`_ :arg index: The name of the follower index :arg body: The name of the leader index and other optional ccr related parameters :arg wait_for_active_shards: Sets the number of shard copies that mus...
elasticsearch/client/xpack/ccr.py
def follow(self, index, body, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html>`_ :arg index: The name of the follower index :arg body: The name of the leader index and other optional ccr related parameters :arg ...
def follow(self, index, body, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html>`_ :arg index: The name of the follower index :arg body: The name of the leader index and other optional ccr related parameters :arg ...
[ "<https", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ccr", "-", "put", "-", "follow", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L19-L37
[ "def", "follow", "(", "self", ",", "index", ",", "body", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "index", ",", "body", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a re...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
CcrClient.follow_info
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html>`_ :arg index: A comma-separated list of index patterns; use `_all` to perform the operation on all indices
elasticsearch/client/xpack/ccr.py
def follow_info(self, index=None, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html>`_ :arg index: A comma-separated list of index patterns; use `_all` to perform the operation on all indices """ return self....
def follow_info(self, index=None, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html>`_ :arg index: A comma-separated list of index patterns; use `_all` to perform the operation on all indices """ return self....
[ "<https", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ccr", "-", "get", "-", "follow", "-", "info", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L40-L49
[ "def", "follow_info", "(", "self", ",", "index", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "index", ",", "\"_ccr\"", ",", "\"info\"", ")", ",", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
CcrClient.follow_stats
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html>`_ :arg index: A comma-separated list of index patterns; use `_all` to perform the operation on all indices
elasticsearch/client/xpack/ccr.py
def follow_stats(self, index, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html>`_ :arg index: A comma-separated list of index patterns; use `_all` to perform the operation on all indices """ if index in SKI...
def follow_stats(self, index, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html>`_ :arg index: A comma-separated list of index patterns; use `_all` to perform the operation on all indices """ if index in SKI...
[ "<https", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ccr", "-", "get", "-", "follow", "-", "stats", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L52-L63
[ "def", "follow_stats", "(", "self", ",", "index", ",", "params", "=", "None", ")", ":", "if", "index", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'index'.\"", ")", "return", "self", ".", "transport", ".", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
CcrClient.get_auto_follow_pattern
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html>`_ :arg name: The name of the auto follow pattern.
elasticsearch/client/xpack/ccr.py
def get_auto_follow_pattern(self, name=None, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html>`_ :arg name: The name of the auto follow pattern. """ return self.transport.perform_request( "GET", _mak...
def get_auto_follow_pattern(self, name=None, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html>`_ :arg name: The name of the auto follow pattern. """ return self.transport.perform_request( "GET", _mak...
[ "<https", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ccr", "-", "get", "-", "auto", "-", "follow", "-", "pattern", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L88-L96
[ "def", "get_auto_follow_pattern", "(", "self", ",", "name", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "\"_ccr\"", ",", "\"auto_follow\"", ",", "name"...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
CcrClient.put_auto_follow_pattern
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html>`_ :arg name: The name of the auto follow pattern. :arg body: The specification of the auto follow pattern
elasticsearch/client/xpack/ccr.py
def put_auto_follow_pattern(self, name, body, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html>`_ :arg name: The name of the auto follow pattern. :arg body: The specification of the auto follow pattern """ ...
def put_auto_follow_pattern(self, name, body, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html>`_ :arg name: The name of the auto follow pattern. :arg body: The specification of the auto follow pattern """ ...
[ "<https", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ccr", "-", "put", "-", "auto", "-", "follow", "-", "pattern", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L113-L125
[ "def", "put_auto_follow_pattern", "(", "self", ",", "name", ",", "body", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "name", ",", "body", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
CcrClient.resume_follow
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html>`_ :arg index: The name of the follow index to resume following. :arg body: The name of the leader index and other optional ccr related parameters
elasticsearch/client/xpack/ccr.py
def resume_follow(self, index, body=None, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html>`_ :arg index: The name of the follow index to resume following. :arg body: The name of the leader index and other optional ccr relat...
def resume_follow(self, index, body=None, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html>`_ :arg index: The name of the follow index to resume following. :arg body: The name of the leader index and other optional ccr relat...
[ "<https", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ccr", "-", "post", "-", "resume", "-", "follow", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ccr.py#L128-L140
[ "def", "resume_follow", "(", "self", ",", "index", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "if", "index", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'index'.\"", ")", "return", "se...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IngestClient.get_pipeline
`<https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest.html>`_ :arg id: Comma separated list of pipeline ids. Wildcards supported :arg master_timeout: Explicit operation timeout for connection to master node
elasticsearch/client/ingest.py
def get_pipeline(self, id=None, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest.html>`_ :arg id: Comma separated list of pipeline ids. Wildcards supported :arg master_timeout: Explicit operation timeout for connection to master node ...
def get_pipeline(self, id=None, params=None): """ `<https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest.html>`_ :arg id: Comma separated list of pipeline ids. Wildcards supported :arg master_timeout: Explicit operation timeout for connection to master node ...
[ "<https", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "plugins", "/", "current", "/", "ingest", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/ingest.py#L5-L14
[ "def", "get_pipeline", "(", "self", ",", "id", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "'GET'", ",", "_make_path", "(", "'_ingest'", ",", "'pipeline'", ",", "id", ")", ",", "pa...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.delete_calendar_event
`<>`_ :arg calendar_id: The ID of the calendar to modify :arg event_id: The ID of the event to remove from the calendar
elasticsearch/client/xpack/ml.py
def delete_calendar_event(self, calendar_id, event_id, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar to modify :arg event_id: The ID of the event to remove from the calendar """ for param in (calendar_id, event_id): if param in SKIP_IN_PATH...
def delete_calendar_event(self, calendar_id, event_id, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar to modify :arg event_id: The ID of the event to remove from the calendar """ for param in (calendar_id, event_id): if param in SKIP_IN_PATH...
[ "<", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L44-L58
[ "def", "delete_calendar_event", "(", "self", ",", "calendar_id", ",", "event_id", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "calendar_id", ",", "event_id", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.delete_filter
`<>`_ :arg filter_id: The ID of the filter to delete
elasticsearch/client/xpack/ml.py
def delete_filter(self, filter_id, params=None): """ `<>`_ :arg filter_id: The ID of the filter to delete """ if filter_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'filter_id'.") return self.transport.perform_request( ...
def delete_filter(self, filter_id, params=None): """ `<>`_ :arg filter_id: The ID of the filter to delete """ if filter_id in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'filter_id'.") return self.transport.perform_request( ...
[ "<", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L103-L113
[ "def", "delete_filter", "(", "self", ",", "filter_id", ",", "params", "=", "None", ")", ":", "if", "filter_id", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'filter_id'.\"", ")", "return", "self", ".", "transpo...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.delete_forecast
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html>`_ :arg job_id: The ID of the job from which to delete forecasts :arg forecast_id: The ID of the forecast to delete, can be comma delimited list. Leaving blank implies `_all` :arg allow_no_forec...
elasticsearch/client/xpack/ml.py
def delete_forecast(self, job_id, forecast_id=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html>`_ :arg job_id: The ID of the job from which to delete forecasts :arg forecast_id: The ID of the forecast to delete, can be comm...
def delete_forecast(self, job_id, forecast_id=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html>`_ :arg job_id: The ID of the job from which to delete forecasts :arg forecast_id: The ID of the forecast to delete, can be comm...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "delete", "-", "forecast", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L116-L134
[ "def", "delete_forecast", "(", "self", ",", "job_id", ",", "forecast_id", "=", "None", ",", "params", "=", "None", ")", ":", "if", "job_id", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'job_id'.\"", ")", "re...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.delete_job
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html>`_ :arg job_id: The ID of the job to delete :arg force: True if the job should be forcefully deleted, default False :arg wait_for_completion: Should this request wait until the operation has complete...
elasticsearch/client/xpack/ml.py
def delete_job(self, job_id, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html>`_ :arg job_id: The ID of the job to delete :arg force: True if the job should be forcefully deleted, default False :arg wait_for_completion: Should...
def delete_job(self, job_id, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html>`_ :arg job_id: The ID of the job to delete :arg force: True if the job should be forcefully deleted, default False :arg wait_for_completion: Should...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "delete", "-", "job", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L137-L150
[ "def", "delete_job", "(", "self", ",", "job_id", ",", "params", "=", "None", ")", ":", "if", "job_id", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'job_id'.\"", ")", "return", "self", ".", "transport", ".", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.delete_model_snapshot
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html>`_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to delete
elasticsearch/client/xpack/ml.py
def delete_model_snapshot(self, job_id, snapshot_id, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html>`_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to delete """ for param in ...
def delete_model_snapshot(self, job_id, snapshot_id, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html>`_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to delete """ for param in ...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "delete", "-", "snapshot", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L153-L169
[ "def", "delete_model_snapshot", "(", "self", ",", "job_id", ",", "snapshot_id", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "job_id", ",", "snapshot_id", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.find_file_structure
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-file-structure.html>`_ :arg body: The contents of the file to be analyzed :arg charset: Optional parameter to specify the character set of the file :arg column_names: Optional parameter containing a comma separated ...
elasticsearch/client/xpack/ml.py
def find_file_structure(self, body, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-file-structure.html>`_ :arg body: The contents of the file to be analyzed :arg charset: Optional parameter to specify the character set of the file ...
def find_file_structure(self, body, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-file-structure.html>`_ :arg body: The contents of the file to be analyzed :arg charset: Optional parameter to specify the character set of the file ...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "file", "-", "structure", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L186-L228
[ "def", "find_file_structure", "(", "self", ",", "body", ",", "params", "=", "None", ")", ":", "if", "body", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'body'.\"", ")", "return", "self", ".", "transport", "....
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.flush_job
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html>`_ :arg job_id: The name of the job to flush :arg body: Flush parameters :arg advance_time: Advances time to the given value generating results and updating the model for the advanced interval ...
elasticsearch/client/xpack/ml.py
def flush_job(self, job_id, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html>`_ :arg job_id: The name of the job to flush :arg body: Flush parameters :arg advance_time: Advances time to the given value generating res...
def flush_job(self, job_id, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html>`_ :arg job_id: The name of the job to flush :arg body: Flush parameters :arg advance_time: Advances time to the given value generating res...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "flush", "-", "job", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L231-L255
[ "def", "flush_job", "(", "self", ",", "job_id", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "if", "job_id", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'job_id'.\"", ")", "return", "sel...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.get_buckets
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html>`_ :arg job_id: ID of the job to get bucket results from :arg timestamp: The timestamp of the desired single bucket result :arg body: Bucket selection details if not provided in URI :arg anomaly_score: F...
elasticsearch/client/xpack/ml.py
def get_buckets(self, job_id, timestamp=None, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html>`_ :arg job_id: ID of the job to get bucket results from :arg timestamp: The timestamp of the desired single bucket result ...
def get_buckets(self, job_id, timestamp=None, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html>`_ :arg job_id: ID of the job to get bucket results from :arg timestamp: The timestamp of the desired single bucket result ...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "get", "-", "bucket", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L286-L312
[ "def", "get_buckets", "(", "self", ",", "job_id", ",", "timestamp", "=", "None", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "if", "job_id", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argumen...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.get_calendar_events
`<>`_ :arg calendar_id: The ID of the calendar containing the events :arg end: Get events before this time :arg from_: Skips a number of events :arg job_id: Get events for the job. When this option is used calendar_id must be '_all' :arg size: Specifies a max number ...
elasticsearch/client/xpack/ml.py
def get_calendar_events(self, calendar_id, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar containing the events :arg end: Get events before this time :arg from_: Skips a number of events :arg job_id: Get events for the job. When this option is used ...
def get_calendar_events(self, calendar_id, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar containing the events :arg end: Get events before this time :arg from_: Skips a number of events :arg job_id: Get events for the job. When this option is used ...
[ "<", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L315-L333
[ "def", "get_calendar_events", "(", "self", ",", "calendar_id", ",", "params", "=", "None", ")", ":", "if", "calendar_id", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'calendar_id'.\"", ")", "return", "self", "."...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.get_calendars
`<>`_ :arg calendar_id: The ID of the calendar to fetch :arg body: The from and size parameters optionally sent in the body :arg from_: skips a number of calendars :arg size: specifies a max number of calendars to get
elasticsearch/client/xpack/ml.py
def get_calendars(self, calendar_id=None, body=None, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar to fetch :arg body: The from and size parameters optionally sent in the body :arg from_: skips a number of calendars :arg size: specifies a max number of...
def get_calendars(self, calendar_id=None, body=None, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar to fetch :arg body: The from and size parameters optionally sent in the body :arg from_: skips a number of calendars :arg size: specifies a max number of...
[ "<", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L336-L347
[ "def", "get_calendars", "(", "self", ",", "calendar_id", "=", "None", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "\"_ml\"", ",", "\"c...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.get_categories
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html>`_ :arg job_id: The name of the job :arg category_id: The identifier of the category definition of interest :arg body: Category selection details if not provided in URI :arg from_: skips a number of ca...
elasticsearch/client/xpack/ml.py
def get_categories(self, job_id, category_id=None, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html>`_ :arg job_id: The name of the job :arg category_id: The identifier of the category definition of interest :arg ...
def get_categories(self, job_id, category_id=None, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html>`_ :arg job_id: The name of the job :arg category_id: The identifier of the category definition of interest :arg ...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "get", "-", "category", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L350-L369
[ "def", "get_categories", "(", "self", ",", "job_id", ",", "category_id", "=", "None", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "if", "job_id", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required ar...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.get_datafeed_stats
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html>`_ :arg datafeed_id: The ID of the datafeeds stats to fetch :arg allow_no_datafeeds: Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no ...
elasticsearch/client/xpack/ml.py
def get_datafeed_stats(self, datafeed_id=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html>`_ :arg datafeed_id: The ID of the datafeeds stats to fetch :arg allow_no_datafeeds: Whether to ignore if a wildcard expression ...
def get_datafeed_stats(self, datafeed_id=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html>`_ :arg datafeed_id: The ID of the datafeeds stats to fetch :arg allow_no_datafeeds: Whether to ignore if a wildcard expression ...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "get", "-", "datafeed", "-", "stats", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L372-L383
[ "def", "get_datafeed_stats", "(", "self", ",", "datafeed_id", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "\"_ml\"", ",", "\"datafeeds\"", ",", "datafe...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.get_datafeeds
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html>`_ :arg datafeed_id: The ID of the datafeeds to fetch :arg allow_no_datafeeds: Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds...
elasticsearch/client/xpack/ml.py
def get_datafeeds(self, datafeed_id=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html>`_ :arg datafeed_id: The ID of the datafeeds to fetch :arg allow_no_datafeeds: Whether to ignore if a wildcard expression matches...
def get_datafeeds(self, datafeed_id=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html>`_ :arg datafeed_id: The ID of the datafeeds to fetch :arg allow_no_datafeeds: Whether to ignore if a wildcard expression matches...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "get", "-", "datafeed", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L386-L397
[ "def", "get_datafeeds", "(", "self", ",", "datafeed_id", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "\"_ml\"", ",", "\"datafeeds\"", ",", "datafeed_id...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.get_filters
`<>`_ :arg filter_id: The ID of the filter to fetch :arg from_: skips a number of filters :arg size: specifies a max number of filters to get
elasticsearch/client/xpack/ml.py
def get_filters(self, filter_id=None, params=None): """ `<>`_ :arg filter_id: The ID of the filter to fetch :arg from_: skips a number of filters :arg size: specifies a max number of filters to get """ return self.transport.perform_request( "GET", _ma...
def get_filters(self, filter_id=None, params=None): """ `<>`_ :arg filter_id: The ID of the filter to fetch :arg from_: skips a number of filters :arg size: specifies a max number of filters to get """ return self.transport.perform_request( "GET", _ma...
[ "<", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L400-L410
[ "def", "get_filters", "(", "self", ",", "filter_id", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "\"_ml\"", ",", "\"filters\"", ",", "filter_id", ")"...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.get_job_stats
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html>`_ :arg job_id: The ID of the jobs stats to fetch :arg allow_no_jobs: Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specifi...
elasticsearch/client/xpack/ml.py
def get_job_stats(self, job_id=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html>`_ :arg job_id: The ID of the jobs stats to fetch :arg allow_no_jobs: Whether to ignore if a wildcard expression matches no jobs. (Th...
def get_job_stats(self, job_id=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html>`_ :arg job_id: The ID of the jobs stats to fetch :arg allow_no_jobs: Whether to ignore if a wildcard expression matches no jobs. (Th...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "get", "-", "job", "-", "stats", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L448-L461
[ "def", "get_job_stats", "(", "self", ",", "job_id", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "\"_ml\"", ",", "\"anomaly_detectors\"", ",", "job_id",...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.get_jobs
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html>`_ :arg job_id: The ID of the jobs to fetch :arg allow_no_jobs: Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
elasticsearch/client/xpack/ml.py
def get_jobs(self, job_id=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html>`_ :arg job_id: The ID of the jobs to fetch :arg allow_no_jobs: Whether to ignore if a wildcard expression matches no jobs. (This includes `_all...
def get_jobs(self, job_id=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html>`_ :arg job_id: The ID of the jobs to fetch :arg allow_no_jobs: Whether to ignore if a wildcard expression matches no jobs. (This includes `_all...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "get", "-", "job", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L464-L475
[ "def", "get_jobs", "(", "self", ",", "job_id", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "\"_ml\"", ",", "\"anomaly_detectors\"", ",", "job_id", ")...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.get_model_snapshots
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html>`_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to fetch :arg body: Model snapshot selection criteria :arg desc: True if the results should be sorted in descending o...
elasticsearch/client/xpack/ml.py
def get_model_snapshots(self, job_id, snapshot_id=None, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html>`_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to fetch :arg body: Mode...
def get_model_snapshots(self, job_id, snapshot_id=None, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html>`_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to fetch :arg body: Mode...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "get", "-", "snapshot", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L478-L502
[ "def", "get_model_snapshots", "(", "self", ",", "job_id", ",", "snapshot_id", "=", "None", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "if", "job_id", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a requir...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.post_calendar_events
`<>`_ :arg calendar_id: The ID of the calendar to modify :arg body: A list of events
elasticsearch/client/xpack/ml.py
def post_calendar_events(self, calendar_id, body, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar to modify :arg body: A list of events """ for param in (calendar_id, body): if param in SKIP_IN_PATH: raise ValueError("Empty va...
def post_calendar_events(self, calendar_id, body, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar to modify :arg body: A list of events """ for param in (calendar_id, body): if param in SKIP_IN_PATH: raise ValueError("Empty va...
[ "<", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L601-L616
[ "def", "post_calendar_events", "(", "self", ",", "calendar_id", ",", "body", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "calendar_id", ",", "body", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"E...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.post_data
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html>`_ :arg job_id: The name of the job receiving the data :arg body: The data to process :arg reset_end: Optional parameter to specify the end of the bucket resetting range :arg reset_start: Opti...
elasticsearch/client/xpack/ml.py
def post_data(self, job_id, body, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html>`_ :arg job_id: The name of the job receiving the data :arg body: The data to process :arg reset_end: Optional parameter to specify the end of t...
def post_data(self, job_id, body, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html>`_ :arg job_id: The name of the job receiving the data :arg body: The data to process :arg reset_end: Optional parameter to specify the end of t...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "post", "-", "data", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L619-L638
[ "def", "post_data", "(", "self", ",", "job_id", ",", "body", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "job_id", ",", "body", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.preview_datafeed
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html>`_ :arg datafeed_id: The ID of the datafeed to preview
elasticsearch/client/xpack/ml.py
def preview_datafeed(self, datafeed_id, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html>`_ :arg datafeed_id: The ID of the datafeed to preview """ if datafeed_id in SKIP_IN_PATH: raise ValueError( ...
def preview_datafeed(self, datafeed_id, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html>`_ :arg datafeed_id: The ID of the datafeed to preview """ if datafeed_id in SKIP_IN_PATH: raise ValueError( ...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "preview", "-", "datafeed", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L641-L655
[ "def", "preview_datafeed", "(", "self", ",", "datafeed_id", ",", "params", "=", "None", ")", ":", "if", "datafeed_id", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'datafeed_id'.\"", ")", "return", "self", ".", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.put_calendar
`<>`_ :arg calendar_id: The ID of the calendar to create :arg body: The calendar details
elasticsearch/client/xpack/ml.py
def put_calendar(self, calendar_id, body=None, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar to create :arg body: The calendar details """ if calendar_id in SKIP_IN_PATH: raise ValueError( "Empty value passed for a required ...
def put_calendar(self, calendar_id, body=None, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar to create :arg body: The calendar details """ if calendar_id in SKIP_IN_PATH: raise ValueError( "Empty value passed for a required ...
[ "<", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L658-L671
[ "def", "put_calendar", "(", "self", ",", "calendar_id", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "if", "calendar_id", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'calendar_id'.\"", ")", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.put_calendar_job
`<>`_ :arg calendar_id: The ID of the calendar to modify :arg job_id: The ID of the job to add to the calendar
elasticsearch/client/xpack/ml.py
def put_calendar_job(self, calendar_id, job_id, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar to modify :arg job_id: The ID of the job to add to the calendar """ for param in (calendar_id, job_id): if param in SKIP_IN_PATH: ...
def put_calendar_job(self, calendar_id, job_id, params=None): """ `<>`_ :arg calendar_id: The ID of the calendar to modify :arg job_id: The ID of the job to add to the calendar """ for param in (calendar_id, job_id): if param in SKIP_IN_PATH: ...
[ "<", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L674-L688
[ "def", "put_calendar_job", "(", "self", ",", "calendar_id", ",", "job_id", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "calendar_id", ",", "job_id", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"E...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.start_datafeed
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html>`_ :arg datafeed_id: The ID of the datafeed to start :arg body: The start datafeed parameters :arg end: The end time when the datafeed should stop. When not set, the datafeed continues in real ti...
elasticsearch/client/xpack/ml.py
def start_datafeed(self, datafeed_id, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html>`_ :arg datafeed_id: The ID of the datafeed to start :arg body: The start datafeed parameters :arg end: The end time when th...
def start_datafeed(self, datafeed_id, body=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html>`_ :arg datafeed_id: The ID of the datafeed to start :arg body: The start datafeed parameters :arg end: The end time when th...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "start", "-", "datafeed", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L781-L802
[ "def", "start_datafeed", "(", "self", ",", "datafeed_id", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "if", "datafeed_id", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'datafeed_id'.\"", ")"...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.update_datafeed
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html>`_ :arg datafeed_id: The ID of the datafeed to update :arg body: The datafeed update settings
elasticsearch/client/xpack/ml.py
def update_datafeed(self, datafeed_id, body, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html>`_ :arg datafeed_id: The ID of the datafeed to update :arg body: The datafeed update settings """ for param in (datafee...
def update_datafeed(self, datafeed_id, body, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html>`_ :arg datafeed_id: The ID of the datafeed to update :arg body: The datafeed update settings """ for param in (datafee...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "update", "-", "datafeed", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L826-L841
[ "def", "update_datafeed", "(", "self", ",", "datafeed_id", ",", "body", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "datafeed_id", ",", "body", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.update_filter
`<>`_ :arg filter_id: The ID of the filter to update :arg body: The filter update
elasticsearch/client/xpack/ml.py
def update_filter(self, filter_id, body, params=None): """ `<>`_ :arg filter_id: The ID of the filter to update :arg body: The filter update """ for param in (filter_id, body): if param in SKIP_IN_PATH: raise ValueError("Empty value passed for...
def update_filter(self, filter_id, body, params=None): """ `<>`_ :arg filter_id: The ID of the filter to update :arg body: The filter update """ for param in (filter_id, body): if param in SKIP_IN_PATH: raise ValueError("Empty value passed for...
[ "<", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L844-L859
[ "def", "update_filter", "(", "self", ",", "filter_id", ",", "body", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "filter_id", ",", "body", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.update_model_snapshot
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html>`_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to update :arg body: The model snapshot properties to update
elasticsearch/client/xpack/ml.py
def update_model_snapshot(self, job_id, snapshot_id, body, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html>`_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to update :arg body: The mode...
def update_model_snapshot(self, job_id, snapshot_id, body, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html>`_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to update :arg body: The mode...
[ "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "ml", "-", "update", "-", "snapshot", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L880-L903
[ "def", "update_model_snapshot", "(", "self", ",", "job_id", ",", "snapshot_id", ",", "body", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "job_id", ",", "snapshot_id", ",", "body", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.validate
`<>`_ :arg body: The job config
elasticsearch/client/xpack/ml.py
def validate(self, body, params=None): """ `<>`_ :arg body: The job config """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") return self.transport.perform_request( "POST", "/_ml/anomaly_detectors/_...
def validate(self, body, params=None): """ `<>`_ :arg body: The job config """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") return self.transport.perform_request( "POST", "/_ml/anomaly_detectors/_...
[ "<", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L906-L916
[ "def", "validate", "(", "self", ",", "body", ",", "params", "=", "None", ")", ":", "if", "body", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'body'.\"", ")", "return", "self", ".", "transport", ".", "perfo...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
MlClient.validate_detector
`<>`_ :arg body: The detector
elasticsearch/client/xpack/ml.py
def validate_detector(self, body, params=None): """ `<>`_ :arg body: The detector """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") return self.transport.perform_request( "POST", "/_ml/...
def validate_detector(self, body, params=None): """ `<>`_ :arg body: The detector """ if body in SKIP_IN_PATH: raise ValueError("Empty value passed for a required argument 'body'.") return self.transport.perform_request( "POST", "/_ml/...
[ "<", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/xpack/ml.py#L919-L932
[ "def", "validate_detector", "(", "self", ",", "body", ",", "params", "=", "None", ")", ":", "if", "body", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'body'.\"", ")", "return", "self", ".", "transport", ".",...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.analyze
Perform the analysis process on a text and return the tokens breakdown of the text. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html>`_ :arg index: The name of the index to scope the operation :arg body: Define analyzer/tokenizer parameters and the text on w...
elasticsearch/client/indices.py
def analyze(self, index=None, body=None, params=None): """ Perform the analysis process on a text and return the tokens breakdown of the text. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html>`_ :arg index: The name of the index to scope the operatio...
def analyze(self, index=None, body=None, params=None): """ Perform the analysis process on a text and return the tokens breakdown of the text. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html>`_ :arg index: The name of the index to scope the operatio...
[ "Perform", "the", "analysis", "process", "on", "a", "text", "and", "return", "the", "tokens", "breakdown", "of", "the", "text", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L6-L21
[ "def", "analyze", "(", "self", ",", "index", "=", "None", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "index", ",", "\"_analyze\"", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.refresh
Explicitly refresh one or more index, making all operations performed since the last refresh available for search. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty string t...
elasticsearch/client/indices.py
def refresh(self, index=None, params=None): """ Explicitly refresh one or more index, making all operations performed since the last refresh available for search. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html>`_ :arg index: A comma-separat...
def refresh(self, index=None, params=None): """ Explicitly refresh one or more index, making all operations performed since the last refresh available for search. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html>`_ :arg index: A comma-separat...
[ "Explicitly", "refresh", "one", "or", "more", "index", "making", "all", "operations", "performed", "since", "the", "last", "refresh", "available", "for", "search", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L24-L43
[ "def", "refresh", "(", "self", ",", "index", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"POST\"", ",", "_make_path", "(", "index", ",", "\"_refresh\"", ")", ",", "params", "=", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.flush
Explicitly flush one or more indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty string for all indices :arg allow_no_indices: Whether to ignore if a wildcard indices ...
elasticsearch/client/indices.py
def flush(self, index=None, params=None): """ Explicitly flush one or more indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty string for all indices :a...
def flush(self, index=None, params=None): """ Explicitly flush one or more indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty string for all indices :a...
[ "Explicitly", "flush", "one", "or", "more", "indices", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", "flush", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L52-L79
[ "def", "flush", "(", "self", ",", "index", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"POST\"", ",", "_make_path", "(", "index", ",", "\"_flush\"", ")", ",", "params", "=", "par...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.get
The get index API allows to retrieve information about one or more indexes. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html>`_ :arg index: A comma-separated list of index names :arg allow_no_indices: Ignore if a wildcard expression resolves to no ...
elasticsearch/client/indices.py
def get(self, index, feature=None, params=None): """ The get index API allows to retrieve information about one or more indexes. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html>`_ :arg index: A comma-separated list of index names :arg allo...
def get(self, index, feature=None, params=None): """ The get index API allows to retrieve information about one or more indexes. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html>`_ :arg index: A comma-separated list of index names :arg allo...
[ "The", "get", "index", "API", "allows", "to", "retrieve", "information", "about", "one", "or", "more", "indexes", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L113-L137
[ "def", "get", "(", "self", ",", "index", ",", "feature", "=", "None", ",", "params", "=", "None", ")", ":", "if", "index", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'index'.\"", ")", "return", "self", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.exists_type
Check if a type/types exists in an index/indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-types-exists.html>`_ :arg index: A comma-separated list of index names; use `_all` to check the types across all indices :arg doc_type: A comma-separated list o...
elasticsearch/client/indices.py
def exists_type(self, index, doc_type, params=None): """ Check if a type/types exists in an index/indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-types-exists.html>`_ :arg index: A comma-separated list of index names; use `_all` to check the...
def exists_type(self, index, doc_type, params=None): """ Check if a type/types exists in an index/indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-types-exists.html>`_ :arg index: A comma-separated list of index names; use `_all` to check the...
[ "Check", "if", "a", "type", "/", "types", "exists", "in", "an", "index", "/", "indices", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L260-L284
[ "def", "exists_type", "(", "self", ",", "index", ",", "doc_type", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "index", ",", "doc_type", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value pa...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.get_mapping
Retrieve mapping definition of index or index/type. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html>`_ :arg index: A comma-separated list of index names :arg doc_type: A comma-separated list of document types :arg allow_no_indices: Whether to ig...
elasticsearch/client/indices.py
def get_mapping(self, index=None, doc_type=None, params=None): """ Retrieve mapping definition of index or index/type. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html>`_ :arg index: A comma-separated list of index names :arg doc_type: A ...
def get_mapping(self, index=None, doc_type=None, params=None): """ Retrieve mapping definition of index or index/type. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html>`_ :arg index: A comma-separated list of index names :arg doc_type: A ...
[ "Retrieve", "mapping", "definition", "of", "index", "or", "index", "/", "type", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", "get", "-",...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L331-L353
[ "def", "get_mapping", "(", "self", ",", "index", "=", "None", ",", "doc_type", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "index", ",", "\"_mappin...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.get_field_mapping
Retrieve mapping definition of a specific field. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html>`_ :arg fields: A comma-separated list of fields :arg index: A comma-separated list of index names :arg doc_type: A comma-separated list of do...
elasticsearch/client/indices.py
def get_field_mapping(self, fields, index=None, doc_type=None, params=None): """ Retrieve mapping definition of a specific field. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html>`_ :arg fields: A comma-separated list of fields :arg...
def get_field_mapping(self, fields, index=None, doc_type=None, params=None): """ Retrieve mapping definition of a specific field. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html>`_ :arg fields: A comma-separated list of fields :arg...
[ "Retrieve", "mapping", "definition", "of", "a", "specific", "field", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", "get", "-", "field", "...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L363-L392
[ "def", "get_field_mapping", "(", "self", ",", "fields", ",", "index", "=", "None", ",", "doc_type", "=", "None", ",", "params", "=", "None", ")", ":", "if", "fields", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required a...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.put_alias
Create an alias for a specific index/indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all ind...
elasticsearch/client/indices.py
def put_alias(self, index, name, body=None, params=None): """ Create an alias for a specific index/indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names the alias should point to (s...
def put_alias(self, index, name, body=None, params=None): """ Create an alias for a specific index/indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names the alias should point to (s...
[ "Create", "an", "alias", "for", "a", "specific", "index", "/", "indices", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", "aliases", ".", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L395-L413
[ "def", "put_alias", "(", "self", ",", "index", ",", "name", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "index", ",", "name", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.exists_alias
Return a boolean indicating whether given alias exists. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names to filter aliases :arg name: A comma-separated list of alias names to return :arg allow_no_i...
elasticsearch/client/indices.py
def exists_alias(self, index=None, name=None, params=None): """ Return a boolean indicating whether given alias exists. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names to filter aliases :a...
def exists_alias(self, index=None, name=None, params=None): """ Return a boolean indicating whether given alias exists. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names to filter aliases :a...
[ "Return", "a", "boolean", "indicating", "whether", "given", "alias", "exists", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", "aliases", "."...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L416-L436
[ "def", "exists_alias", "(", "self", ",", "index", "=", "None", ",", "name", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"HEAD\"", ",", "_make_path", "(", "index", ",", "\"_alias\""...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.get_alias
Retrieve a specified alias. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names to filter aliases :arg name: A comma-separated list of alias names to return :arg allow_no_indices: Whether to ignore if...
elasticsearch/client/indices.py
def get_alias(self, index=None, name=None, params=None): """ Retrieve a specified alias. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names to filter aliases :arg name: A comma-separated list...
def get_alias(self, index=None, name=None, params=None): """ Retrieve a specified alias. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names to filter aliases :arg name: A comma-separated list...
[ "Retrieve", "a", "specified", "alias", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", "aliases", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L439-L459
[ "def", "get_alias", "(", "self", ",", "index", "=", "None", ",", "name", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "index", ",", "\"_alias\"", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.update_aliases
Update specified aliases. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg body: The definition of `actions` to perform :arg master_timeout: Specify timeout for connection to master :arg request_timeout: Request timeout
elasticsearch/client/indices.py
def update_aliases(self, body, params=None): """ Update specified aliases. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg body: The definition of `actions` to perform :arg master_timeout: Specify timeout for connection to master ...
def update_aliases(self, body, params=None): """ Update specified aliases. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg body: The definition of `actions` to perform :arg master_timeout: Specify timeout for connection to master ...
[ "Update", "specified", "aliases", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", "aliases", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L462-L475
[ "def", "update_aliases", "(", "self", ",", "body", ",", "params", "=", "None", ")", ":", "if", "body", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'body'.\"", ")", "return", "self", ".", "transport", ".", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.delete_alias
Delete specific alias. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names (supports wildcards); use `_all` for all indices :arg name: A comma-separated list of aliases to delete (supports ...
elasticsearch/client/indices.py
def delete_alias(self, index, name, params=None): """ Delete specific alias. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names (supports wildcards); use `_all` for all indices :a...
def delete_alias(self, index, name, params=None): """ Delete specific alias. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>`_ :arg index: A comma-separated list of index names (supports wildcards); use `_all` for all indices :a...
[ "Delete", "specific", "alias", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", "aliases", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L478-L496
[ "def", "delete_alias", "(", "self", ",", "index", ",", "name", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "index", ",", "name", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed fo...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.get_template
Retrieve an index template by its name. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>`_ :arg name: The name of the template :arg flat_settings: Return settings in flat format (default: false) :arg local: Return local information, do not retriev...
elasticsearch/client/indices.py
def get_template(self, name=None, params=None): """ Retrieve an index template by its name. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>`_ :arg name: The name of the template :arg flat_settings: Return settings in flat format (default:...
def get_template(self, name=None, params=None): """ Retrieve an index template by its name. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>`_ :arg name: The name of the template :arg flat_settings: Return settings in flat format (default:...
[ "Retrieve", "an", "index", "template", "by", "its", "name", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", "templates", ".", "html", ">", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L551-L567
[ "def", "get_template", "(", "self", ",", "name", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "\"_template\"", ",", "name", ")", ",", "params", "=",...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.get_settings
Retrieve settings for one or more (or all) indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices :arg name: The name...
elasticsearch/client/indices.py
def get_settings(self, index=None, name=None, params=None): """ Retrieve settings for one or more (or all) indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty ...
def get_settings(self, index=None, name=None, params=None): """ Retrieve settings for one or more (or all) indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty ...
[ "Retrieve", "settings", "for", "one", "or", "more", "(", "or", "all", ")", "indices", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", "ge...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L593-L617
[ "def", "get_settings", "(", "self", ",", "index", "=", "None", ",", "name", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "index", ",", "\"_settings\...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.stats
Retrieve statistics on different operations happening on an index. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices :arg metric...
elasticsearch/client/indices.py
def stats(self, index=None, metric=None, params=None): """ Retrieve statistics on different operations happening on an index. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty ...
def stats(self, index=None, metric=None, params=None): """ Retrieve statistics on different operations happening on an index. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty ...
[ "Retrieve", "statistics", "on", "different", "operations", "happening", "on", "an", "index", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L664-L690
[ "def", "stats", "(", "self", ",", "index", "=", "None", ",", "metric", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "index", ",", "\"_stats\"", ",...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.clear_cache
Clear either all caches or specific cached associated with one ore more indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html>`_ :arg index: A comma-separated list of index name to limit the operation :arg allow_no_indices: Whether to ignore if a wild...
elasticsearch/client/indices.py
def clear_cache(self, index=None, params=None): """ Clear either all caches or specific cached associated with one ore more indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html>`_ :arg index: A comma-separated list of index name to limit the ...
def clear_cache(self, index=None, params=None): """ Clear either all caches or specific cached associated with one ore more indices. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html>`_ :arg index: A comma-separated list of index name to limit the ...
[ "Clear", "either", "all", "caches", "or", "specific", "cached", "associated", "with", "one", "ore", "more", "indices", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "curre...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L790-L815
[ "def", "clear_cache", "(", "self", ",", "index", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"POST\"", ",", "_make_path", "(", "index", ",", "\"_cache\"", ",", "\"clear\"", ")", ",...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.upgrade
Upgrade one or more indices to the latest format through an API. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices :arg allow_...
elasticsearch/client/indices.py
def upgrade(self, index=None, params=None): """ Upgrade one or more indices to the latest format through an API. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty st...
def upgrade(self, index=None, params=None): """ Upgrade one or more indices to the latest format through an API. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty st...
[ "Upgrade", "one", "or", "more", "indices", "to", "the", "latest", "format", "through", "an", "API", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indice...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L843-L865
[ "def", "upgrade", "(", "self", ",", "index", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"POST\"", ",", "_make_path", "(", "index", ",", "\"_upgrade\"", ")", ",", "params", "=", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.get_upgrade
Monitor how much of one or more index is upgraded. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices :arg allow_no_indices: Wh...
elasticsearch/client/indices.py
def get_upgrade(self, index=None, params=None): """ Monitor how much of one or more index is upgraded. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty string to pe...
def get_upgrade(self, index=None, params=None): """ Monitor how much of one or more index is upgraded. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty string to pe...
[ "Monitor", "how", "much", "of", "one", "or", "more", "index", "is", "upgraded", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "indices", "-", "upgrade", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L868-L886
[ "def", "get_upgrade", "(", "self", ",", "index", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "index", ",", "\"_upgrade\"", ")", ",", "params", "=",...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.flush_synced
Perform a normal flush, then add a generated unique marker (sync_id) to all shards. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html>`_ :arg index: A comma-separated list of index names; use `_all` or empty string for all indices :arg allow_...
elasticsearch/client/indices.py
def flush_synced(self, index=None, params=None): """ Perform a normal flush, then add a generated unique marker (sync_id) to all shards. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html>`_ :arg index: A comma-separated list of index names; use `...
def flush_synced(self, index=None, params=None): """ Perform a normal flush, then add a generated unique marker (sync_id) to all shards. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html>`_ :arg index: A comma-separated list of index names; use `...
[ "Perform", "a", "normal", "flush", "then", "add", "a", "generated", "unique", "marker", "(", "sync_id", ")", "to", "all", "shards", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "referenc...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L889-L907
[ "def", "flush_synced", "(", "self", ",", "index", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"POST\"", ",", "_make_path", "(", "index", ",", "\"_flush\"", ",", "\"synced\"", ")", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.shard_stores
Provides store information for shard copies of indices. Store information reports on which nodes shard copies exist, the shard copy version, indicating how recent they are, and any exceptions encountered while opening the shard index or from earlier engine failure. `<http://www.elastic.c...
elasticsearch/client/indices.py
def shard_stores(self, index=None, params=None): """ Provides store information for shard copies of indices. Store information reports on which nodes shard copies exist, the shard copy version, indicating how recent they are, and any exceptions encountered while opening the shard...
def shard_stores(self, index=None, params=None): """ Provides store information for shard copies of indices. Store information reports on which nodes shard copies exist, the shard copy version, indicating how recent they are, and any exceptions encountered while opening the shard...
[ "Provides", "store", "information", "for", "shard", "copies", "of", "indices", ".", "Store", "information", "reports", "on", "which", "nodes", "shard", "copies", "exist", "the", "shard", "copy", "version", "indicating", "how", "recent", "they", "are", "and", "...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L916-L941
[ "def", "shard_stores", "(", "self", ",", "index", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"GET\"", ",", "_make_path", "(", "index", ",", "\"_shard_stores\"", ")", ",", "params", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.forcemerge
The force merge API allows to force merging of one or more indices through an API. The merge relates to the number of segments a Lucene index holds within each shard. The force merge operation allows to reduce the number of segments by merging them. This call will block until the merge ...
elasticsearch/client/indices.py
def forcemerge(self, index=None, params=None): """ The force merge API allows to force merging of one or more indices through an API. The merge relates to the number of segments a Lucene index holds within each shard. The force merge operation allows to reduce the number of segme...
def forcemerge(self, index=None, params=None): """ The force merge API allows to force merging of one or more indices through an API. The merge relates to the number of segments a Lucene index holds within each shard. The force merge operation allows to reduce the number of segme...
[ "The", "force", "merge", "API", "allows", "to", "force", "merging", "of", "one", "or", "more", "indices", "through", "an", "API", ".", "The", "merge", "relates", "to", "the", "number", "of", "segments", "a", "Lucene", "index", "holds", "within", "each", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L953-L985
[ "def", "forcemerge", "(", "self", ",", "index", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "\"POST\"", ",", "_make_path", "(", "index", ",", "\"_forcemerge\"", ")", ",", "params", "...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.shrink
The shrink index API allows you to shrink an existing index into a new index with fewer primary shards. The number of primary shards in the target index must be a factor of the shards in the source index. For example an index with 8 primary shards can be shrunk into 4, 2 or 1 primary sha...
elasticsearch/client/indices.py
def shrink(self, index, target, body=None, params=None): """ The shrink index API allows you to shrink an existing index into a new index with fewer primary shards. The number of primary shards in the target index must be a factor of the shards in the source index. For example an...
def shrink(self, index, target, body=None, params=None): """ The shrink index API allows you to shrink an existing index into a new index with fewer primary shards. The number of primary shards in the target index must be a factor of the shards in the source index. For example an...
[ "The", "shrink", "index", "API", "allows", "you", "to", "shrink", "an", "existing", "index", "into", "a", "new", "index", "with", "fewer", "primary", "shards", ".", "The", "number", "of", "primary", "shards", "in", "the", "target", "index", "must", "be", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L988-L1015
[ "def", "shrink", "(", "self", ",", "index", ",", "target", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "index", ",", "target", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
IndicesClient.rollover
The rollover index API rolls an alias over to a new index when the existing index is considered to be too large or too old. The API accepts a single alias name and a list of conditions. The alias must point to a single index only. If the index satisfies the specified conditions then a n...
elasticsearch/client/indices.py
def rollover(self, alias, new_index=None, body=None, params=None): """ The rollover index API rolls an alias over to a new index when the existing index is considered to be too large or too old. The API accepts a single alias name and a list of conditions. The alias must point t...
def rollover(self, alias, new_index=None, body=None, params=None): """ The rollover index API rolls an alias over to a new index when the existing index is considered to be too large or too old. The API accepts a single alias name and a list of conditions. The alias must point t...
[ "The", "rollover", "index", "API", "rolls", "an", "alias", "over", "to", "a", "new", "index", "when", "the", "existing", "index", "is", "considered", "to", "be", "too", "large", "or", "too", "old", "." ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/indices.py#L1024-L1052
[ "def", "rollover", "(", "self", ",", "alias", ",", "new_index", "=", "None", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "if", "alias", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'al...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
SnapshotClient.get
Retrieve information about a snapshot. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A repository name :arg snapshot: A comma-separated list of snapshot names :arg ignore_unavailable: Whether to ignore unavailable snapshots, ...
elasticsearch/client/snapshot.py
def get(self, repository, snapshot, params=None): """ Retrieve information about a snapshot. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A repository name :arg snapshot: A comma-separated list of snapshot names ...
def get(self, repository, snapshot, params=None): """ Retrieve information about a snapshot. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A repository name :arg snapshot: A comma-separated list of snapshot names ...
[ "Retrieve", "information", "about", "a", "snapshot", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "modules", "-", "snapshots", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L42-L60
[ "def", "get", "(", "self", ",", "repository", ",", "snapshot", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "repository", ",", "snapshot", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
SnapshotClient.delete_repository
Removes a shared file system repository. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A comma-separated list of repository names :arg master_timeout: Explicit operation timeout for connection to master node :arg ...
elasticsearch/client/snapshot.py
def delete_repository(self, repository, params=None): """ Removes a shared file system repository. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A comma-separated list of repository names :arg master_timeout: Explicit...
def delete_repository(self, repository, params=None): """ Removes a shared file system repository. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A comma-separated list of repository names :arg master_timeout: Explicit...
[ "Removes", "a", "shared", "file", "system", "repository", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "modules", "-", "snapshots", ".", "html", ">", "_...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L63-L76
[ "def", "delete_repository", "(", "self", ",", "repository", ",", "params", "=", "None", ")", ":", "if", "repository", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty value passed for a required argument 'repository'.\"", ")", "return", "self", ".", "...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
SnapshotClient.get_repository
Return information about registered repositories. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A comma-separated list of repository names :arg local: Return local information, do not retrieve the state from master node (...
elasticsearch/client/snapshot.py
def get_repository(self, repository=None, params=None): """ Return information about registered repositories. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A comma-separated list of repository names :arg local: Return...
def get_repository(self, repository=None, params=None): """ Return information about registered repositories. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A comma-separated list of repository names :arg local: Return...
[ "Return", "information", "about", "registered", "repositories", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "modules", "-", "snapshots", ".", "html", ">", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L79-L91
[ "def", "get_repository", "(", "self", ",", "repository", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "'GET'", ",", "_make_path", "(", "'_snapshot'", ",", "repository", ")", ",", "param...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
SnapshotClient.create_repository
Registers a shared file system repository. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A repository name :arg body: The repository definition :arg master_timeout: Explicit operation timeout for connection to master ...
elasticsearch/client/snapshot.py
def create_repository(self, repository, body, params=None): """ Registers a shared file system repository. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A repository name :arg body: The repository definition :...
def create_repository(self, repository, body, params=None): """ Registers a shared file system repository. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A repository name :arg body: The repository definition :...
[ "Registers", "a", "shared", "file", "system", "repository", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "modules", "-", "snapshots", ".", "html", ">", ...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L94-L110
[ "def", "create_repository", "(", "self", ",", "repository", ",", "body", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "repository", ",", "body", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", "ValueError", "(", "\"Empty ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
SnapshotClient.restore
Restore a snapshot. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A repository name :arg snapshot: A snapshot name :arg body: Details of what to restore :arg master_timeout: Explicit operation timeout for connection t...
elasticsearch/client/snapshot.py
def restore(self, repository, snapshot, body=None, params=None): """ Restore a snapshot. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A repository name :arg snapshot: A snapshot name :arg body: Details of wha...
def restore(self, repository, snapshot, body=None, params=None): """ Restore a snapshot. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A repository name :arg snapshot: A snapshot name :arg body: Details of wha...
[ "Restore", "a", "snapshot", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "modules", "-", "snapshots", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L113-L130
[ "def", "restore", "(", "self", ",", "repository", ",", "snapshot", ",", "body", "=", "None", ",", "params", "=", "None", ")", ":", "for", "param", "in", "(", "repository", ",", "snapshot", ")", ":", "if", "param", "in", "SKIP_IN_PATH", ":", "raise", ...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
SnapshotClient.status
Return information about all currently running snapshots. By specifying a repository name, it's possible to limit the results to a particular repository. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html>`_ :arg repository: A repository name ...
elasticsearch/client/snapshot.py
def status(self, repository=None, snapshot=None, params=None): """ Return information about all currently running snapshots. By specifying a repository name, it's possible to limit the results to a particular repository. `<http://www.elastic.co/guide/en/elasticsearch/reference/cu...
def status(self, repository=None, snapshot=None, params=None): """ Return information about all currently running snapshots. By specifying a repository name, it's possible to limit the results to a particular repository. `<http://www.elastic.co/guide/en/elasticsearch/reference/cu...
[ "Return", "information", "about", "all", "currently", "running", "snapshots", ".", "By", "specifying", "a", "repository", "name", "it", "s", "possible", "to", "limit", "the", "results", "to", "a", "particular", "repository", ".", "<http", ":", "//", "www", "...
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/snapshot.py#L133-L148
[ "def", "status", "(", "self", ",", "repository", "=", "None", ",", "snapshot", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "'GET'", ",", "_make_path", "(", "'_snapshot'", ",", "repos...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
_escape
Escape a single value of a URL string or a query parameter. If it is a list or tuple, turn it into a comma-separated string first.
elasticsearch/client/utils.py
def _escape(value): """ Escape a single value of a URL string or a query parameter. If it is a list or tuple, turn it into a comma-separated string first. """ # make sequences into comma-separated stings if isinstance(value, (list, tuple)): value = ",".join(value) # dates and datet...
def _escape(value): """ Escape a single value of a URL string or a query parameter. If it is a list or tuple, turn it into a comma-separated string first. """ # make sequences into comma-separated stings if isinstance(value, (list, tuple)): value = ",".join(value) # dates and datet...
[ "Escape", "a", "single", "value", "of", "a", "URL", "string", "or", "a", "query", "parameter", ".", "If", "it", "is", "a", "list", "or", "tuple", "turn", "it", "into", "a", "comma", "-", "separated", "string", "first", "." ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/utils.py#L12-L41
[ "def", "_escape", "(", "value", ")", ":", "# make sequences into comma-separated stings", "if", "isinstance", "(", "value", ",", "(", "list", ",", "tuple", ")", ")", ":", "value", "=", "\",\"", ".", "join", "(", "value", ")", "# dates and datetimes into isoforma...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
_make_path
Create a URL string from parts, omit all `None` values and empty strings. Convert lists and tuples to comma separated values.
elasticsearch/client/utils.py
def _make_path(*parts): """ Create a URL string from parts, omit all `None` values and empty strings. Convert lists and tuples to comma separated values. """ # TODO: maybe only allow some parts to be lists/tuples ? return "/" + "/".join( # preserve ',' and '*' in url for nicer URLs in lo...
def _make_path(*parts): """ Create a URL string from parts, omit all `None` values and empty strings. Convert lists and tuples to comma separated values. """ # TODO: maybe only allow some parts to be lists/tuples ? return "/" + "/".join( # preserve ',' and '*' in url for nicer URLs in lo...
[ "Create", "a", "URL", "string", "from", "parts", "omit", "all", "None", "values", "and", "empty", "strings", ".", "Convert", "lists", "and", "tuples", "to", "comma", "separated", "values", "." ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/utils.py#L44-L55
[ "def", "_make_path", "(", "*", "parts", ")", ":", "# TODO: maybe only allow some parts to be lists/tuples ?", "return", "\"/\"", "+", "\"/\"", ".", "join", "(", "# preserve ',' and '*' in url for nicer URLs in logs", "quote_plus", "(", "_escape", "(", "p", ")", ",", "b\...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
query_params
Decorator that pops all accepted parameters from method's kwargs and puts them in the params argument.
elasticsearch/client/utils.py
def query_params(*es_query_params): """ Decorator that pops all accepted parameters from method's kwargs and puts them in the params argument. """ def _wrapper(func): @wraps(func) def _wrapped(*args, **kwargs): params = {} if "params" in kwargs: ...
def query_params(*es_query_params): """ Decorator that pops all accepted parameters from method's kwargs and puts them in the params argument. """ def _wrapper(func): @wraps(func) def _wrapped(*args, **kwargs): params = {} if "params" in kwargs: ...
[ "Decorator", "that", "pops", "all", "accepted", "parameters", "from", "method", "s", "kwargs", "and", "puts", "them", "in", "the", "params", "argument", "." ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/utils.py#L62-L88
[ "def", "query_params", "(", "*", "es_query_params", ")", ":", "def", "_wrapper", "(", "func", ")", ":", "@", "wraps", "(", "func", ")", "def", "_wrapped", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "params", "=", "{", "}", "if", "\"params...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
TasksClient.get
Retrieve information for a particular task. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html>`_ :arg task_id: Return the task with specified id (node_id:task_number) :arg wait_for_completion: Wait for the matching tasks to complete (default: false) ...
elasticsearch/client/tasks.py
def get(self, task_id=None, params=None): """ Retrieve information for a particular task. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html>`_ :arg task_id: Return the task with specified id (node_id:task_number) :arg wait_for_completion: Wait for the m...
def get(self, task_id=None, params=None): """ Retrieve information for a particular task. `<http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html>`_ :arg task_id: Return the task with specified id (node_id:task_number) :arg wait_for_completion: Wait for the m...
[ "Retrieve", "information", "for", "a", "particular", "task", ".", "<http", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "tasks", ".", "html", ">", "_" ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/elasticsearch/client/tasks.py#L48-L59
[ "def", "get", "(", "self", ",", "task_id", "=", "None", ",", "params", "=", "None", ")", ":", "return", "self", ".", "transport", ".", "perform_request", "(", "'GET'", ",", "_make_path", "(", "'_tasks'", ",", "task_id", ")", ",", "params", "=", "params...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
print_hits
Simple utility function to print results of a search query.
example/queries.py
def print_hits(results): " Simple utility function to print results of a search query. " print_search_stats(results) for hit in results['hits']['hits']: # get created date for a repo and fallback to authored_date for a commit created_at = parse_date(hit['_source'].get('created_at', hit['_sou...
def print_hits(results): " Simple utility function to print results of a search query. " print_search_stats(results) for hit in results['hits']['hits']: # get created date for a repo and fallback to authored_date for a commit created_at = parse_date(hit['_source'].get('created_at', hit['_sou...
[ "Simple", "utility", "function", "to", "print", "results", "of", "a", "search", "query", "." ]
elastic/elasticsearch-py
python
https://github.com/elastic/elasticsearch-py/blob/2aab285c8f506f3863cbdaba3c90a685c510ba00/example/queries.py#L14-L26
[ "def", "print_hits", "(", "results", ")", ":", "print_search_stats", "(", "results", ")", "for", "hit", "in", "results", "[", "'hits'", "]", "[", "'hits'", "]", ":", "# get created date for a repo and fallback to authored_date for a commit", "created_at", "=", "parse_...
2aab285c8f506f3863cbdaba3c90a685c510ba00
train
BayesianOptimizationHandler.post
Deal with incoming requests.
examples/async_optimization.py
def post(self): """Deal with incoming requests.""" body = tornado.escape.json_decode(self.request.body) try: self._bo.register( params=body["params"], target=body["target"], ) print("BO has registered: {} points.".format(len(se...
def post(self): """Deal with incoming requests.""" body = tornado.escape.json_decode(self.request.body) try: self._bo.register( params=body["params"], target=body["target"], ) print("BO has registered: {} points.".format(len(se...
[ "Deal", "with", "incoming", "requests", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/examples/async_optimization.py#L42-L57
[ "def", "post", "(", "self", ")", ":", "body", "=", "tornado", ".", "escape", ".", "json_decode", "(", "self", ".", "request", ".", "body", ")", "try", ":", "self", ".", "_bo", ".", "register", "(", "params", "=", "body", "[", "\"params\"", "]", ","...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
BayesianOptimization.register
Expect observation with known target
bayes_opt/bayesian_optimization.py
def register(self, params, target): """Expect observation with known target""" self._space.register(params, target) self.dispatch(Events.OPTMIZATION_STEP)
def register(self, params, target): """Expect observation with known target""" self._space.register(params, target) self.dispatch(Events.OPTMIZATION_STEP)
[ "Expect", "observation", "with", "known", "target" ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/bayesian_optimization.py#L102-L105
[ "def", "register", "(", "self", ",", "params", ",", "target", ")", ":", "self", ".", "_space", ".", "register", "(", "params", ",", "target", ")", "self", ".", "dispatch", "(", "Events", ".", "OPTMIZATION_STEP", ")" ]
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
BayesianOptimization.probe
Probe target of x
bayes_opt/bayesian_optimization.py
def probe(self, params, lazy=True): """Probe target of x""" if lazy: self._queue.add(params) else: self._space.probe(params) self.dispatch(Events.OPTMIZATION_STEP)
def probe(self, params, lazy=True): """Probe target of x""" if lazy: self._queue.add(params) else: self._space.probe(params) self.dispatch(Events.OPTMIZATION_STEP)
[ "Probe", "target", "of", "x" ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/bayesian_optimization.py#L107-L113
[ "def", "probe", "(", "self", ",", "params", ",", "lazy", "=", "True", ")", ":", "if", "lazy", ":", "self", ".", "_queue", ".", "add", "(", "params", ")", "else", ":", "self", ".", "_space", ".", "probe", "(", "params", ")", "self", ".", "dispatch...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
BayesianOptimization.suggest
Most promissing point to probe next
bayes_opt/bayesian_optimization.py
def suggest(self, utility_function): """Most promissing point to probe next""" if len(self._space) == 0: return self._space.array_to_params(self._space.random_sample()) # Sklearn's GP throws a large number of warnings at times, but # we don't really need to see them here. ...
def suggest(self, utility_function): """Most promissing point to probe next""" if len(self._space) == 0: return self._space.array_to_params(self._space.random_sample()) # Sklearn's GP throws a large number of warnings at times, but # we don't really need to see them here. ...
[ "Most", "promissing", "point", "to", "probe", "next" ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/bayesian_optimization.py#L115-L135
[ "def", "suggest", "(", "self", ",", "utility_function", ")", ":", "if", "len", "(", "self", ".", "_space", ")", "==", "0", ":", "return", "self", ".", "_space", ".", "array_to_params", "(", "self", ".", "_space", ".", "random_sample", "(", ")", ")", ...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
BayesianOptimization._prime_queue
Make sure there's something in the queue at the very beginning.
bayes_opt/bayesian_optimization.py
def _prime_queue(self, init_points): """Make sure there's something in the queue at the very beginning.""" if self._queue.empty and self._space.empty: init_points = max(init_points, 1) for _ in range(init_points): self._queue.add(self._space.random_sample())
def _prime_queue(self, init_points): """Make sure there's something in the queue at the very beginning.""" if self._queue.empty and self._space.empty: init_points = max(init_points, 1) for _ in range(init_points): self._queue.add(self._space.random_sample())
[ "Make", "sure", "there", "s", "something", "in", "the", "queue", "at", "the", "very", "beginning", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/bayesian_optimization.py#L137-L143
[ "def", "_prime_queue", "(", "self", ",", "init_points", ")", ":", "if", "self", ".", "_queue", ".", "empty", "and", "self", ".", "_space", ".", "empty", ":", "init_points", "=", "max", "(", "init_points", ",", "1", ")", "for", "_", "in", "range", "("...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
BayesianOptimization.maximize
Mazimize your function
bayes_opt/bayesian_optimization.py
def maximize(self, init_points=5, n_iter=25, acq='ucb', kappa=2.576, xi=0.0, **gp_params): """Mazimize your function""" self._prime_subscriptions() self.dispatch(Events.OPTMIZATION_START) ...
def maximize(self, init_points=5, n_iter=25, acq='ucb', kappa=2.576, xi=0.0, **gp_params): """Mazimize your function""" self._prime_subscriptions() self.dispatch(Events.OPTMIZATION_START) ...
[ "Mazimize", "your", "function" ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/bayesian_optimization.py#L152-L176
[ "def", "maximize", "(", "self", ",", "init_points", "=", "5", ",", "n_iter", "=", "25", ",", "acq", "=", "'ucb'", ",", "kappa", "=", "2.576", ",", "xi", "=", "0.0", ",", "*", "*", "gp_params", ")", ":", "self", ".", "_prime_subscriptions", "(", ")"...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
TargetSpace.register
Append a point and its target value to the known data. Parameters ---------- x : ndarray a single point, with len(x) == self.dim y : float target function value Raises ------ KeyError: if the point is not unique Note...
bayes_opt/target_space.py
def register(self, params, target): """ Append a point and its target value to the known data. Parameters ---------- x : ndarray a single point, with len(x) == self.dim y : float target function value Raises ------ KeyErr...
def register(self, params, target): """ Append a point and its target value to the known data. Parameters ---------- x : ndarray a single point, with len(x) == self.dim y : float target function value Raises ------ KeyErr...
[ "Append", "a", "point", "and", "its", "target", "value", "to", "the", "known", "data", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/target_space.py#L126-L167
[ "def", "register", "(", "self", ",", "params", ",", "target", ")", ":", "x", "=", "self", ".", "_as_array", "(", "params", ")", "if", "x", "in", "self", ":", "raise", "KeyError", "(", "'Data point {} is not unique'", ".", "format", "(", "x", ")", ")", ...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
TargetSpace.probe
Evaulates a single point x, to obtain the value y and then records them as observations. Notes ----- If x has been previously seen returns a cached value of y. Parameters ---------- x : ndarray a single point, with len(x) == self.dim Returns...
bayes_opt/target_space.py
def probe(self, params): """ Evaulates a single point x, to obtain the value y and then records them as observations. Notes ----- If x has been previously seen returns a cached value of y. Parameters ---------- x : ndarray a single po...
def probe(self, params): """ Evaulates a single point x, to obtain the value y and then records them as observations. Notes ----- If x has been previously seen returns a cached value of y. Parameters ---------- x : ndarray a single po...
[ "Evaulates", "a", "single", "point", "x", "to", "obtain", "the", "value", "y", "and", "then", "records", "them", "as", "observations", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/target_space.py#L169-L196
[ "def", "probe", "(", "self", ",", "params", ")", ":", "x", "=", "self", ".", "_as_array", "(", "params", ")", "try", ":", "target", "=", "self", ".", "_cache", "[", "_hashable", "(", "x", ")", "]", "except", "KeyError", ":", "params", "=", "dict", ...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
TargetSpace.random_sample
Creates random points within the bounds of the space. Returns ---------- data: ndarray [num x dim] array points with dimensions corresponding to `self._keys` Example ------- >>> target_func = lambda p1, p2: p1 + p2 >>> pbounds = {'p1': (0, 1), 'p2': ...
bayes_opt/target_space.py
def random_sample(self): """ Creates random points within the bounds of the space. Returns ---------- data: ndarray [num x dim] array points with dimensions corresponding to `self._keys` Example ------- >>> target_func = lambda p1, p2: p1 + p...
def random_sample(self): """ Creates random points within the bounds of the space. Returns ---------- data: ndarray [num x dim] array points with dimensions corresponding to `self._keys` Example ------- >>> target_func = lambda p1, p2: p1 + p...
[ "Creates", "random", "points", "within", "the", "bounds", "of", "the", "space", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/target_space.py#L198-L219
[ "def", "random_sample", "(", "self", ")", ":", "# TODO: support integer, category, and basic scipy.optimize constraints", "data", "=", "np", ".", "empty", "(", "(", "1", ",", "self", ".", "dim", ")", ")", "for", "col", ",", "(", "lower", ",", "upper", ")", "...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
TargetSpace.max
Get maximum target value found and corresponding parametes.
bayes_opt/target_space.py
def max(self): """Get maximum target value found and corresponding parametes.""" try: res = { 'target': self.target.max(), 'params': dict( zip(self.keys, self.params[self.target.argmax()]) ) } except Valu...
def max(self): """Get maximum target value found and corresponding parametes.""" try: res = { 'target': self.target.max(), 'params': dict( zip(self.keys, self.params[self.target.argmax()]) ) } except Valu...
[ "Get", "maximum", "target", "value", "found", "and", "corresponding", "parametes", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/target_space.py#L221-L232
[ "def", "max", "(", "self", ")", ":", "try", ":", "res", "=", "{", "'target'", ":", "self", ".", "target", ".", "max", "(", ")", ",", "'params'", ":", "dict", "(", "zip", "(", "self", ".", "keys", ",", "self", ".", "params", "[", "self", ".", ...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
TargetSpace.res
Get all target values found and corresponding parametes.
bayes_opt/target_space.py
def res(self): """Get all target values found and corresponding parametes.""" params = [dict(zip(self.keys, p)) for p in self.params] return [ {"target": target, "params": param} for target, param in zip(self.target, params) ]
def res(self): """Get all target values found and corresponding parametes.""" params = [dict(zip(self.keys, p)) for p in self.params] return [ {"target": target, "params": param} for target, param in zip(self.target, params) ]
[ "Get", "all", "target", "values", "found", "and", "corresponding", "parametes", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/target_space.py#L234-L241
[ "def", "res", "(", "self", ")", ":", "params", "=", "[", "dict", "(", "zip", "(", "self", ".", "keys", ",", "p", ")", ")", "for", "p", "in", "self", ".", "params", "]", "return", "[", "{", "\"target\"", ":", "target", ",", "\"params\"", ":", "p...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
TargetSpace.set_bounds
A method that allows changing the lower and upper searching bounds Parameters ---------- new_bounds : dict A dictionary with the parameter name and its new bounds
bayes_opt/target_space.py
def set_bounds(self, new_bounds): """ A method that allows changing the lower and upper searching bounds Parameters ---------- new_bounds : dict A dictionary with the parameter name and its new bounds """ for row, key in enumerate(self.keys): ...
def set_bounds(self, new_bounds): """ A method that allows changing the lower and upper searching bounds Parameters ---------- new_bounds : dict A dictionary with the parameter name and its new bounds """ for row, key in enumerate(self.keys): ...
[ "A", "method", "that", "allows", "changing", "the", "lower", "and", "upper", "searching", "bounds" ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/target_space.py#L243-L254
[ "def", "set_bounds", "(", "self", ",", "new_bounds", ")", ":", "for", "row", ",", "key", "in", "enumerate", "(", "self", ".", "keys", ")", ":", "if", "key", "in", "new_bounds", ":", "self", ".", "_bounds", "[", "row", "]", "=", "new_bounds", "[", "...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
get_data
Synthetic binary classification dataset.
examples/sklearn_example.py
def get_data(): """Synthetic binary classification dataset.""" data, targets = make_classification( n_samples=1000, n_features=45, n_informative=12, n_redundant=7, random_state=134985745, ) return data, targets
def get_data(): """Synthetic binary classification dataset.""" data, targets = make_classification( n_samples=1000, n_features=45, n_informative=12, n_redundant=7, random_state=134985745, ) return data, targets
[ "Synthetic", "binary", "classification", "dataset", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/examples/sklearn_example.py#L9-L18
[ "def", "get_data", "(", ")", ":", "data", ",", "targets", "=", "make_classification", "(", "n_samples", "=", "1000", ",", "n_features", "=", "45", ",", "n_informative", "=", "12", ",", "n_redundant", "=", "7", ",", "random_state", "=", "134985745", ",", ...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
svc_cv
SVC cross validation. This function will instantiate a SVC classifier with parameters C and gamma. Combined with data and targets this will in turn be used to perform cross validation. The result of cross validation is returned. Our goal is to find combinations of C and gamma that maximizes the roc_au...
examples/sklearn_example.py
def svc_cv(C, gamma, data, targets): """SVC cross validation. This function will instantiate a SVC classifier with parameters C and gamma. Combined with data and targets this will in turn be used to perform cross validation. The result of cross validation is returned. Our goal is to find combinati...
def svc_cv(C, gamma, data, targets): """SVC cross validation. This function will instantiate a SVC classifier with parameters C and gamma. Combined with data and targets this will in turn be used to perform cross validation. The result of cross validation is returned. Our goal is to find combinati...
[ "SVC", "cross", "validation", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/examples/sklearn_example.py#L21-L33
[ "def", "svc_cv", "(", "C", ",", "gamma", ",", "data", ",", "targets", ")", ":", "estimator", "=", "SVC", "(", "C", "=", "C", ",", "gamma", "=", "gamma", ",", "random_state", "=", "2", ")", "cval", "=", "cross_val_score", "(", "estimator", ",", "dat...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
rfc_cv
Random Forest cross validation. This function will instantiate a random forest classifier with parameters n_estimators, min_samples_split, and max_features. Combined with data and targets this will in turn be used to perform cross validation. The result of cross validation is returned. Our goal is...
examples/sklearn_example.py
def rfc_cv(n_estimators, min_samples_split, max_features, data, targets): """Random Forest cross validation. This function will instantiate a random forest classifier with parameters n_estimators, min_samples_split, and max_features. Combined with data and targets this will in turn be used to perform c...
def rfc_cv(n_estimators, min_samples_split, max_features, data, targets): """Random Forest cross validation. This function will instantiate a random forest classifier with parameters n_estimators, min_samples_split, and max_features. Combined with data and targets this will in turn be used to perform c...
[ "Random", "Forest", "cross", "validation", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/examples/sklearn_example.py#L36-L55
[ "def", "rfc_cv", "(", "n_estimators", ",", "min_samples_split", ",", "max_features", ",", "data", ",", "targets", ")", ":", "estimator", "=", "RFC", "(", "n_estimators", "=", "n_estimators", ",", "min_samples_split", "=", "min_samples_split", ",", "max_features", ...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
optimize_svc
Apply Bayesian Optimization to SVC parameters.
examples/sklearn_example.py
def optimize_svc(data, targets): """Apply Bayesian Optimization to SVC parameters.""" def svc_crossval(expC, expGamma): """Wrapper of SVC cross validation. Notice how we transform between regular and log scale. While this is not technically necessary, it greatly improves the performance...
def optimize_svc(data, targets): """Apply Bayesian Optimization to SVC parameters.""" def svc_crossval(expC, expGamma): """Wrapper of SVC cross validation. Notice how we transform between regular and log scale. While this is not technically necessary, it greatly improves the performance...
[ "Apply", "Bayesian", "Optimization", "to", "SVC", "parameters", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/examples/sklearn_example.py#L58-L79
[ "def", "optimize_svc", "(", "data", ",", "targets", ")", ":", "def", "svc_crossval", "(", "expC", ",", "expGamma", ")", ":", "\"\"\"Wrapper of SVC cross validation.\n\n Notice how we transform between regular and log scale. While this\n is not technically necessary, it ...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
optimize_rfc
Apply Bayesian Optimization to Random Forest parameters.
examples/sklearn_example.py
def optimize_rfc(data, targets): """Apply Bayesian Optimization to Random Forest parameters.""" def rfc_crossval(n_estimators, min_samples_split, max_features): """Wrapper of RandomForest cross validation. Notice how we ensure n_estimators and min_samples_split are casted to integer bef...
def optimize_rfc(data, targets): """Apply Bayesian Optimization to Random Forest parameters.""" def rfc_crossval(n_estimators, min_samples_split, max_features): """Wrapper of RandomForest cross validation. Notice how we ensure n_estimators and min_samples_split are casted to integer bef...
[ "Apply", "Bayesian", "Optimization", "to", "Random", "Forest", "parameters", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/examples/sklearn_example.py#L82-L112
[ "def", "optimize_rfc", "(", "data", ",", "targets", ")", ":", "def", "rfc_crossval", "(", "n_estimators", ",", "min_samples_split", ",", "max_features", ")", ":", "\"\"\"Wrapper of RandomForest cross validation.\n\n Notice how we ensure n_estimators and min_samples_split a...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
acq_max
A function to find the maximum of the acquisition function It uses a combination of random sampling (cheap) and the 'L-BFGS-B' optimization method. First by sampling `n_warmup` (1e5) points at random, and then running L-BFGS-B from `n_iter` (250) random starting points. Parameters ---------- :...
bayes_opt/util.py
def acq_max(ac, gp, y_max, bounds, random_state, n_warmup=100000, n_iter=250): """ A function to find the maximum of the acquisition function It uses a combination of random sampling (cheap) and the 'L-BFGS-B' optimization method. First by sampling `n_warmup` (1e5) points at random, and then runnin...
def acq_max(ac, gp, y_max, bounds, random_state, n_warmup=100000, n_iter=250): """ A function to find the maximum of the acquisition function It uses a combination of random sampling (cheap) and the 'L-BFGS-B' optimization method. First by sampling `n_warmup` (1e5) points at random, and then runnin...
[ "A", "function", "to", "find", "the", "maximum", "of", "the", "acquisition", "function" ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/util.py#L7-L71
[ "def", "acq_max", "(", "ac", ",", "gp", ",", "y_max", ",", "bounds", ",", "random_state", ",", "n_warmup", "=", "100000", ",", "n_iter", "=", "250", ")", ":", "# Warm up with random points", "x_tries", "=", "random_state", ".", "uniform", "(", "bounds", "[...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
load_logs
Load previous ...
bayes_opt/util.py
def load_logs(optimizer, logs): """Load previous ... """ import json if isinstance(logs, str): logs = [logs] for log in logs: with open(log, "r") as j: while True: try: iteration = next(j) except StopIteration: ...
def load_logs(optimizer, logs): """Load previous ... """ import json if isinstance(logs, str): logs = [logs] for log in logs: with open(log, "r") as j: while True: try: iteration = next(j) except StopIteration: ...
[ "Load", "previous", "..." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/util.py#L130-L156
[ "def", "load_logs", "(", "optimizer", ",", "logs", ")", ":", "import", "json", "if", "isinstance", "(", "logs", ",", "str", ")", ":", "logs", "=", "[", "logs", "]", "for", "log", "in", "logs", ":", "with", "open", "(", "log", ",", "\"r\"", ")", "...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
ensure_rng
Creates a random number generator based on an optional seed. This can be an integer or another random state for a seeded rng, or None for an unseeded rng.
bayes_opt/util.py
def ensure_rng(random_state=None): """ Creates a random number generator based on an optional seed. This can be an integer or another random state for a seeded rng, or None for an unseeded rng. """ if random_state is None: random_state = np.random.RandomState() elif isinstance(rando...
def ensure_rng(random_state=None): """ Creates a random number generator based on an optional seed. This can be an integer or another random state for a seeded rng, or None for an unseeded rng. """ if random_state is None: random_state = np.random.RandomState() elif isinstance(rando...
[ "Creates", "a", "random", "number", "generator", "based", "on", "an", "optional", "seed", ".", "This", "can", "be", "an", "integer", "or", "another", "random", "state", "for", "a", "seeded", "rng", "or", "None", "for", "an", "unseeded", "rng", "." ]
fmfn/BayesianOptimization
python
https://github.com/fmfn/BayesianOptimization/blob/8ce2292895137477963cf1bafa4e71fa20b2ce49/bayes_opt/util.py#L159-L171
[ "def", "ensure_rng", "(", "random_state", "=", "None", ")", ":", "if", "random_state", "is", "None", ":", "random_state", "=", "np", ".", "random", ".", "RandomState", "(", ")", "elif", "isinstance", "(", "random_state", ",", "int", ")", ":", "random_state...
8ce2292895137477963cf1bafa4e71fa20b2ce49
train
expand_abbreviations
Expand abbreviations in a template name. :param template: The project template name. :param abbreviations: Abbreviation definitions.
cookiecutter/repository.py
def expand_abbreviations(template, abbreviations): """Expand abbreviations in a template name. :param template: The project template name. :param abbreviations: Abbreviation definitions. """ if template in abbreviations: return abbreviations[template] # Split on colon. If there is no c...
def expand_abbreviations(template, abbreviations): """Expand abbreviations in a template name. :param template: The project template name. :param abbreviations: Abbreviation definitions. """ if template in abbreviations: return abbreviations[template] # Split on colon. If there is no c...
[ "Expand", "abbreviations", "in", "a", "template", "name", "." ]
audreyr/cookiecutter
python
https://github.com/audreyr/cookiecutter/blob/3bc7b987e4ae9dcee996ae0b00375c1325b8d866/cookiecutter/repository.py#L32-L47
[ "def", "expand_abbreviations", "(", "template", ",", "abbreviations", ")", ":", "if", "template", "in", "abbreviations", ":", "return", "abbreviations", "[", "template", "]", "# Split on colon. If there is no colon, rest will be empty", "# and prefix will be the whole template"...
3bc7b987e4ae9dcee996ae0b00375c1325b8d866
train
repository_has_cookiecutter_json
Determine if `repo_directory` contains a `cookiecutter.json` file. :param repo_directory: The candidate repository directory. :return: True if the `repo_directory` is valid, else False.
cookiecutter/repository.py
def repository_has_cookiecutter_json(repo_directory): """Determine if `repo_directory` contains a `cookiecutter.json` file. :param repo_directory: The candidate repository directory. :return: True if the `repo_directory` is valid, else False. """ repo_directory_exists = os.path.isdir(repo_directory...
def repository_has_cookiecutter_json(repo_directory): """Determine if `repo_directory` contains a `cookiecutter.json` file. :param repo_directory: The candidate repository directory. :return: True if the `repo_directory` is valid, else False. """ repo_directory_exists = os.path.isdir(repo_directory...
[ "Determine", "if", "repo_directory", "contains", "a", "cookiecutter", ".", "json", "file", "." ]
audreyr/cookiecutter
python
https://github.com/audreyr/cookiecutter/blob/3bc7b987e4ae9dcee996ae0b00375c1325b8d866/cookiecutter/repository.py#L50-L61
[ "def", "repository_has_cookiecutter_json", "(", "repo_directory", ")", ":", "repo_directory_exists", "=", "os", ".", "path", ".", "isdir", "(", "repo_directory", ")", "repo_config_exists", "=", "os", ".", "path", ".", "isfile", "(", "os", ".", "path", ".", "jo...
3bc7b987e4ae9dcee996ae0b00375c1325b8d866
train
determine_repo_dir
Locate the repository directory from a template reference. Applies repository abbreviations to the template reference. If the template refers to a repository URL, clone it. If the template is a path to a local repository, use it. :param template: A directory containing a project template directory, ...
cookiecutter/repository.py
def determine_repo_dir(template, abbreviations, clone_to_dir, checkout, no_input, password=None): """ Locate the repository directory from a template reference. Applies repository abbreviations to the template reference. If the template refers to a repository URL, clone it. I...
def determine_repo_dir(template, abbreviations, clone_to_dir, checkout, no_input, password=None): """ Locate the repository directory from a template reference. Applies repository abbreviations to the template reference. If the template refers to a repository URL, clone it. I...
[ "Locate", "the", "repository", "directory", "from", "a", "template", "reference", "." ]
audreyr/cookiecutter
python
https://github.com/audreyr/cookiecutter/blob/3bc7b987e4ae9dcee996ae0b00375c1325b8d866/cookiecutter/repository.py#L64-L124
[ "def", "determine_repo_dir", "(", "template", ",", "abbreviations", ",", "clone_to_dir", ",", "checkout", ",", "no_input", ",", "password", "=", "None", ")", ":", "template", "=", "expand_abbreviations", "(", "template", ",", "abbreviations", ")", "if", "is_zip_...
3bc7b987e4ae9dcee996ae0b00375c1325b8d866
train
find_template
Determine which child directory of `repo_dir` is the project template. :param repo_dir: Local directory of newly cloned repo. :returns project_template: Relative path to project template.
cookiecutter/find.py
def find_template(repo_dir): """Determine which child directory of `repo_dir` is the project template. :param repo_dir: Local directory of newly cloned repo. :returns project_template: Relative path to project template. """ logger.debug('Searching {} for the project template.'.format(repo_dir)) ...
def find_template(repo_dir): """Determine which child directory of `repo_dir` is the project template. :param repo_dir: Local directory of newly cloned repo. :returns project_template: Relative path to project template. """ logger.debug('Searching {} for the project template.'.format(repo_dir)) ...
[ "Determine", "which", "child", "directory", "of", "repo_dir", "is", "the", "project", "template", "." ]
audreyr/cookiecutter
python
https://github.com/audreyr/cookiecutter/blob/3bc7b987e4ae9dcee996ae0b00375c1325b8d866/cookiecutter/find.py#L13-L36
[ "def", "find_template", "(", "repo_dir", ")", ":", "logger", ".", "debug", "(", "'Searching {} for the project template.'", ".", "format", "(", "repo_dir", ")", ")", "repo_dir_contents", "=", "os", ".", "listdir", "(", "repo_dir", ")", "project_template", "=", "...
3bc7b987e4ae9dcee996ae0b00375c1325b8d866
train
is_copy_only_path
Check whether the given `path` should only be copied and not rendered. Returns True if `path` matches a pattern in the given `context` dict, otherwise False. :param path: A file-system path referring to a file or dir that should be rendered or just copied. :param context: cookiecutter context.
cookiecutter/generate.py
def is_copy_only_path(path, context): """Check whether the given `path` should only be copied and not rendered. Returns True if `path` matches a pattern in the given `context` dict, otherwise False. :param path: A file-system path referring to a file or dir that should be rendered or just copi...
def is_copy_only_path(path, context): """Check whether the given `path` should only be copied and not rendered. Returns True if `path` matches a pattern in the given `context` dict, otherwise False. :param path: A file-system path referring to a file or dir that should be rendered or just copi...
[ "Check", "whether", "the", "given", "path", "should", "only", "be", "copied", "and", "not", "rendered", "." ]
audreyr/cookiecutter
python
https://github.com/audreyr/cookiecutter/blob/3bc7b987e4ae9dcee996ae0b00375c1325b8d866/cookiecutter/generate.py#L33-L50
[ "def", "is_copy_only_path", "(", "path", ",", "context", ")", ":", "try", ":", "for", "dont_render", "in", "context", "[", "'cookiecutter'", "]", "[", "'_copy_without_render'", "]", ":", "if", "fnmatch", ".", "fnmatch", "(", "path", ",", "dont_render", ")", ...
3bc7b987e4ae9dcee996ae0b00375c1325b8d866