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
test
MeasurementTimeseriesObservation._parse_result
Parse the result element of the observation type
owslib/swe/observation/waterml2.py
def _parse_result(self): ''' Parse the result element of the observation type ''' if self.result is not None: result = self.result.find(nspv( "wml2:MeasurementTimeseries")) self.result = MeasurementTimeseries(result)
def _parse_result(self): ''' Parse the result element of the observation type ''' if self.result is not None: result = self.result.find(nspv( "wml2:MeasurementTimeseries")) self.result = MeasurementTimeseries(result)
[ "Parse", "the", "result", "element", "of", "the", "observation", "type" ]
geopython/OWSLib
python
https://github.com/geopython/OWSLib/blob/96d47842401a129f1e86fa9f66dccef5a5a6872c/owslib/swe/observation/waterml2.py#L36-L41
[ "def", "_parse_result", "(", "self", ")", ":", "if", "self", ".", "result", "is", "not", "None", ":", "result", "=", "self", ".", "result", ".", "find", "(", "nspv", "(", "\"wml2:MeasurementTimeseries\"", ")", ")", "self", ".", "result", "=", "Measuremen...
96d47842401a129f1e86fa9f66dccef5a5a6872c
test
WebFeatureService_3_0_0.conformance
implements Requirement 5 (/req/core/conformance-op) @returns: conformance object
owslib/feature/wfs300.py
def conformance(self): """ implements Requirement 5 (/req/core/conformance-op) @returns: conformance object """ url = self._build_url('conformance') LOGGER.debug('Request: {}'.format(url)) response = requests.get(url, headers=REQUEST_HEADERS).json() retu...
def conformance(self): """ implements Requirement 5 (/req/core/conformance-op) @returns: conformance object """ url = self._build_url('conformance') LOGGER.debug('Request: {}'.format(url)) response = requests.get(url, headers=REQUEST_HEADERS).json() retu...
[ "implements", "Requirement", "5", "(", "/", "req", "/", "core", "/", "conformance", "-", "op", ")" ]
geopython/OWSLib
python
https://github.com/geopython/OWSLib/blob/96d47842401a129f1e86fa9f66dccef5a5a6872c/owslib/feature/wfs300.py#L61-L71
[ "def", "conformance", "(", "self", ")", ":", "url", "=", "self", ".", "_build_url", "(", "'conformance'", ")", "LOGGER", ".", "debug", "(", "'Request: {}'", ".", "format", "(", "url", ")", ")", "response", "=", "requests", ".", "get", "(", "url", ",", ...
96d47842401a129f1e86fa9f66dccef5a5a6872c
test
WebFeatureService_3_0_0.collection
implements Requirement 15 (/req/core/sfc-md-op) @type collection_name: string @param collection_name: name of collection @returns: feature collection metadata
owslib/feature/wfs300.py
def collection(self, collection_name): """ implements Requirement 15 (/req/core/sfc-md-op) @type collection_name: string @param collection_name: name of collection @returns: feature collection metadata """ path = 'collections/{}'.format(collection_name) ...
def collection(self, collection_name): """ implements Requirement 15 (/req/core/sfc-md-op) @type collection_name: string @param collection_name: name of collection @returns: feature collection metadata """ path = 'collections/{}'.format(collection_name) ...
[ "implements", "Requirement", "15", "(", "/", "req", "/", "core", "/", "sfc", "-", "md", "-", "op", ")" ]
geopython/OWSLib
python
https://github.com/geopython/OWSLib/blob/96d47842401a129f1e86fa9f66dccef5a5a6872c/owslib/feature/wfs300.py#L85-L99
[ "def", "collection", "(", "self", ",", "collection_name", ")", ":", "path", "=", "'collections/{}'", ".", "format", "(", "collection_name", ")", "url", "=", "self", ".", "_build_url", "(", "path", ")", "LOGGER", ".", "debug", "(", "'Request: {}'", ".", "fo...
96d47842401a129f1e86fa9f66dccef5a5a6872c
test
WebFeatureService_3_0_0.collection_items
implements Requirement 17 (/req/core/fc-op) @type collection_name: string @param collection_name: name of collection @type bbox: list @param bbox: list of minx,miny,maxx,maxy @type time: string @param time: time extent or time instant @type limit: int @pa...
owslib/feature/wfs300.py
def collection_items(self, collection_name, **kwargs): """ implements Requirement 17 (/req/core/fc-op) @type collection_name: string @param collection_name: name of collection @type bbox: list @param bbox: list of minx,miny,maxx,maxy @type time: string @p...
def collection_items(self, collection_name, **kwargs): """ implements Requirement 17 (/req/core/fc-op) @type collection_name: string @param collection_name: name of collection @type bbox: list @param bbox: list of minx,miny,maxx,maxy @type time: string @p...
[ "implements", "Requirement", "17", "(", "/", "req", "/", "core", "/", "fc", "-", "op", ")" ]
geopython/OWSLib
python
https://github.com/geopython/OWSLib/blob/96d47842401a129f1e86fa9f66dccef5a5a6872c/owslib/feature/wfs300.py#L101-L127
[ "def", "collection_items", "(", "self", ",", "collection_name", ",", "*", "*", "kwargs", ")", ":", "if", "'bbox'", "in", "kwargs", ":", "kwargs", "[", "'bbox'", "]", "=", "','", ".", "join", "(", "kwargs", "[", "'bbox'", "]", ")", "path", "=", "'coll...
96d47842401a129f1e86fa9f66dccef5a5a6872c
test
WebFeatureService_3_0_0._build_url
helper function to build a WFS 3.0 URL @type path: string @param path: path of WFS URL @returns: fully constructed URL path
owslib/feature/wfs300.py
def _build_url(self, path=None): """ helper function to build a WFS 3.0 URL @type path: string @param path: path of WFS URL @returns: fully constructed URL path """ url = self.url if self.url_query_string is not None: LOGGER.debug('base URL ...
def _build_url(self, path=None): """ helper function to build a WFS 3.0 URL @type path: string @param path: path of WFS URL @returns: fully constructed URL path """ url = self.url if self.url_query_string is not None: LOGGER.debug('base URL ...
[ "helper", "function", "to", "build", "a", "WFS", "3", ".", "0", "URL" ]
geopython/OWSLib
python
https://github.com/geopython/OWSLib/blob/96d47842401a129f1e86fa9f66dccef5a5a6872c/owslib/feature/wfs300.py#L147-L166
[ "def", "_build_url", "(", "self", ",", "path", "=", "None", ")", ":", "url", "=", "self", ".", "url", "if", "self", ".", "url_query_string", "is", "not", "None", ":", "LOGGER", ".", "debug", "(", "'base URL has a query string'", ")", "url", "=", "urljoin...
96d47842401a129f1e86fa9f66dccef5a5a6872c
test
get_schema
Parses DescribeFeatureType response and creates schema compatible with :class:`fiona` :param str url: url of the service :param str version: version of the service :param str typename: name of the layer :param int timeout: request timeout
owslib/feature/schema.py
def get_schema(url, typename, version='1.0.0', timeout=30, username=None, password=None): """Parses DescribeFeatureType response and creates schema compatible with :class:`fiona` :param str url: url of the service :param str version: version of the service :param str typename: name of the layer ...
def get_schema(url, typename, version='1.0.0', timeout=30, username=None, password=None): """Parses DescribeFeatureType response and creates schema compatible with :class:`fiona` :param str url: url of the service :param str version: version of the service :param str typename: name of the layer ...
[ "Parses", "DescribeFeatureType", "response", "and", "creates", "schema", "compatible", "with", ":", "class", ":", "fiona" ]
geopython/OWSLib
python
https://github.com/geopython/OWSLib/blob/96d47842401a129f1e86fa9f66dccef5a5a6872c/owslib/feature/schema.py#L29-L52
[ "def", "get_schema", "(", "url", ",", "typename", ",", "version", "=", "'1.0.0'", ",", "timeout", "=", "30", ",", "username", "=", "None", ",", "password", "=", "None", ")", ":", "url", "=", "_get_describefeaturetype_url", "(", "url", ",", "version", ","...
96d47842401a129f1e86fa9f66dccef5a5a6872c
test
_get_elements
Get attribute elements
owslib/feature/schema.py
def _get_elements(complex_type, root): """Get attribute elements """ found_elements = [] element = findall(root, '{%s}complexType' % XS_NAMESPACE, attribute_name='name', attribute_value=complex_type)[0] found_elements = findall(element, '{%s}element' % XS_NAMESPACE) retu...
def _get_elements(complex_type, root): """Get attribute elements """ found_elements = [] element = findall(root, '{%s}complexType' % XS_NAMESPACE, attribute_name='name', attribute_value=complex_type)[0] found_elements = findall(element, '{%s}element' % XS_NAMESPACE) retu...
[ "Get", "attribute", "elements" ]
geopython/OWSLib
python
https://github.com/geopython/OWSLib/blob/96d47842401a129f1e86fa9f66dccef5a5a6872c/owslib/feature/schema.py#L55-L64
[ "def", "_get_elements", "(", "complex_type", ",", "root", ")", ":", "found_elements", "=", "[", "]", "element", "=", "findall", "(", "root", ",", "'{%s}complexType'", "%", "XS_NAMESPACE", ",", "attribute_name", "=", "'name'", ",", "attribute_value", "=", "comp...
96d47842401a129f1e86fa9f66dccef5a5a6872c
test
_construct_schema
Consruct fiona schema based on given elements :param list Element: list of elements :param dict nsmap: namespace map :return dict: schema
owslib/feature/schema.py
def _construct_schema(elements, nsmap): """Consruct fiona schema based on given elements :param list Element: list of elements :param dict nsmap: namespace map :return dict: schema """ schema = { 'properties': {}, 'geometry': None } schema_key = None gml_key = Non...
def _construct_schema(elements, nsmap): """Consruct fiona schema based on given elements :param list Element: list of elements :param dict nsmap: namespace map :return dict: schema """ schema = { 'properties': {}, 'geometry': None } schema_key = None gml_key = Non...
[ "Consruct", "fiona", "schema", "based", "on", "given", "elements" ]
geopython/OWSLib
python
https://github.com/geopython/OWSLib/blob/96d47842401a129f1e86fa9f66dccef5a5a6872c/owslib/feature/schema.py#L66-L121
[ "def", "_construct_schema", "(", "elements", ",", "nsmap", ")", ":", "schema", "=", "{", "'properties'", ":", "{", "}", ",", "'geometry'", ":", "None", "}", "schema_key", "=", "None", "gml_key", "=", "None", "# if nsmap is defined, use it", "if", "nsmap", ":...
96d47842401a129f1e86fa9f66dccef5a5a6872c
test
_get_describefeaturetype_url
Get url for describefeaturetype request :return str: url
owslib/feature/schema.py
def _get_describefeaturetype_url(url, version, typename): """Get url for describefeaturetype request :return str: url """ query_string = [] if url.find('?') != -1: query_string = cgi.parse_qsl(url.split('?')[1]) params = [x[0] for x in query_string] if 'service' not in params: ...
def _get_describefeaturetype_url(url, version, typename): """Get url for describefeaturetype request :return str: url """ query_string = [] if url.find('?') != -1: query_string = cgi.parse_qsl(url.split('?')[1]) params = [x[0] for x in query_string] if 'service' not in params: ...
[ "Get", "url", "for", "describefeaturetype", "request" ]
geopython/OWSLib
python
https://github.com/geopython/OWSLib/blob/96d47842401a129f1e86fa9f66dccef5a5a6872c/owslib/feature/schema.py#L123-L145
[ "def", "_get_describefeaturetype_url", "(", "url", ",", "version", ",", "typename", ")", ":", "query_string", "=", "[", "]", "if", "url", ".", "find", "(", "'?'", ")", "!=", "-", "1", ":", "query_string", "=", "cgi", ".", "parse_qsl", "(", "url", ".", ...
96d47842401a129f1e86fa9f66dccef5a5a6872c
test
complex_input_with_reference
use ComplexDataInput with a reference to a document
examples/wps-birdhouse.py
def complex_input_with_reference(): """ use ComplexDataInput with a reference to a document """ print("\ncomplex_input_with_reference ...") wps = WebProcessingService('http://localhost:8094/wps', verbose=verbose) processid = 'wordcount' textdoc = ComplexDataInput("http://www.gutenberg...
def complex_input_with_reference(): """ use ComplexDataInput with a reference to a document """ print("\ncomplex_input_with_reference ...") wps = WebProcessingService('http://localhost:8094/wps', verbose=verbose) processid = 'wordcount' textdoc = ComplexDataInput("http://www.gutenberg...
[ "use", "ComplexDataInput", "with", "a", "reference", "to", "a", "document" ]
geopython/OWSLib
python
https://github.com/geopython/OWSLib/blob/96d47842401a129f1e86fa9f66dccef5a5a6872c/examples/wps-birdhouse.py#L39-L63
[ "def", "complex_input_with_reference", "(", ")", ":", "print", "(", "\"\\ncomplex_input_with_reference ...\"", ")", "wps", "=", "WebProcessingService", "(", "'http://localhost:8094/wps'", ",", "verbose", "=", "verbose", ")", "processid", "=", "'wordcount'", "textdoc", "...
96d47842401a129f1e86fa9f66dccef5a5a6872c
test
Genres.movie_list
Get the list of Movie genres. Args: language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/genres.py
def movie_list(self, **kwargs): """ Get the list of Movie genres. Args: language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('movie_list') response = self._GET(...
def movie_list(self, **kwargs): """ Get the list of Movie genres. Args: language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('movie_list') response = self._GET(...
[ "Get", "the", "list", "of", "Movie", "genres", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/genres.py#L34-L48
[ "def", "movie_list", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'movie_list'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "resp...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Genres.tv_list
Get the list of TV genres. Args: language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/genres.py
def tv_list(self, **kwargs): """ Get the list of TV genres. Args: language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('tv_list') response = self._GET(path, kwa...
def tv_list(self, **kwargs): """ Get the list of TV genres. Args: language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('tv_list') response = self._GET(path, kwa...
[ "Get", "the", "list", "of", "TV", "genres", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/genres.py#L50-L64
[ "def", "tv_list", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'tv_list'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response",...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Genres.movies
Get the list of movies for a particular genre by id. By default, only movies with 10 or more votes are included. Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639-1 code. include_all_movies: (optional) Toggle the inclusion of all movies ...
tmdbsimple/genres.py
def movies(self, **kwargs): """ Get the list of movies for a particular genre by id. By default, only movies with 10 or more votes are included. Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639-1 code. include_all_movies: (...
def movies(self, **kwargs): """ Get the list of movies for a particular genre by id. By default, only movies with 10 or more votes are included. Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639-1 code. include_all_movies: (...
[ "Get", "the", "list", "of", "movies", "for", "a", "particular", "genre", "by", "id", ".", "By", "default", "only", "movies", "with", "10", "or", "more", "votes", "are", "included", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/genres.py#L66-L87
[ "def", "movies", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'movies'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response"...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.info
Get the basic movie information for a specific movie id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API.
tmdbsimple/movies.py
def info(self, **kwargs): """ Get the basic movie information for a specific movie id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned fr...
def info(self, **kwargs): """ Get the basic movie information for a specific movie id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned fr...
[ "Get", "the", "basic", "movie", "information", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L53-L68
[ "def", "info", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'info'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.alternative_titles
Get the alternative titles for a specific movie id. Args: country: (optional) ISO 3166-1 code. append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API.
tmdbsimple/movies.py
def alternative_titles(self, **kwargs): """ Get the alternative titles for a specific movie id. Args: country: (optional) ISO 3166-1 code. append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON re...
def alternative_titles(self, **kwargs): """ Get the alternative titles for a specific movie id. Args: country: (optional) ISO 3166-1 code. append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON re...
[ "Get", "the", "alternative", "titles", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L70-L85
[ "def", "alternative_titles", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'alternative_titles'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_valu...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.credits
Get the cast and crew information for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API.
tmdbsimple/movies.py
def credits(self, **kwargs): """ Get the cast and crew information for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. """ path = self....
def credits(self, **kwargs): """ Get the cast and crew information for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. """ path = self....
[ "Get", "the", "cast", "and", "crew", "information", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L87-L101
[ "def", "credits", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'credits'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "respons...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.external_ids
Get the external ids for a specific movie id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API.
tmdbsimple/movies.py
def external_ids(self, **kwargs): """ Get the external ids for a specific movie id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from ...
def external_ids(self, **kwargs): """ Get the external ids for a specific movie id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from ...
[ "Get", "the", "external", "ids", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L103-L118
[ "def", "external_ids", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'external_ids'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.images
Get the images (posters and backdrops) for a specific movie id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. include_image_language: (optional) Comma separated, a valid ISO 69...
tmdbsimple/movies.py
def images(self, **kwargs): """ Get the images (posters and backdrops) for a specific movie id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. include_image_language: (optional) Comma separated, a ...
def images(self, **kwargs): """ Get the images (posters and backdrops) for a specific movie id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. include_image_language: (optional) Comma separated, a ...
[ "Get", "the", "images", "(", "posters", "and", "backdrops", ")", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L120-L137
[ "def", "images", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'images'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response"...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.keywords
Get the plot keywords for a specific movie id. Returns: A dict representation of the JSON returned from the API.
tmdbsimple/movies.py
def keywords(self): """ Get the plot keywords for a specific movie id. Returns: A dict representation of the JSON returned from the API. """ path = self._get_id_path('keywords') response = self._GET(path) self._set_attrs_to_values(response) r...
def keywords(self): """ Get the plot keywords for a specific movie id. Returns: A dict representation of the JSON returned from the API. """ path = self._get_id_path('keywords') response = self._GET(path) self._set_attrs_to_values(response) r...
[ "Get", "the", "plot", "keywords", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L139-L150
[ "def", "keywords", "(", "self", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'keywords'", ")", "response", "=", "self", ".", "_GET", "(", "path", ")", "self", ".", "_set_attrs_to_values", "(", "response", ")", "return", "response" ]
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.recommendations
Get a list of recommended movies for a movie. Args: language: (optional) ISO 639-1 code. page: (optional) Minimum value of 1. Expected value is an integer. Returns: A dict representation of the JSON returned from the API.
tmdbsimple/movies.py
def recommendations(self, **kwargs): """ Get a list of recommended movies for a movie. Args: language: (optional) ISO 639-1 code. page: (optional) Minimum value of 1. Expected value is an integer. Returns: A dict representation of the JSON returned ...
def recommendations(self, **kwargs): """ Get a list of recommended movies for a movie. Args: language: (optional) ISO 639-1 code. page: (optional) Minimum value of 1. Expected value is an integer. Returns: A dict representation of the JSON returned ...
[ "Get", "a", "list", "of", "recommended", "movies", "for", "a", "movie", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L152-L167
[ "def", "recommendations", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'recommendations'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.release_dates
Get the release dates and certification for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API.
tmdbsimple/movies.py
def release_dates(self, **kwargs): """ Get the release dates and certification for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. """ ...
def release_dates(self, **kwargs): """ Get the release dates and certification for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. """ ...
[ "Get", "the", "release", "dates", "and", "certification", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L169-L183
[ "def", "release_dates", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'release_dates'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "("...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.releases
Get the release date and certification information by country for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API.
tmdbsimple/movies.py
def releases(self, **kwargs): """ Get the release date and certification information by country for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the ...
def releases(self, **kwargs): """ Get the release date and certification information by country for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the ...
[ "Get", "the", "release", "date", "and", "certification", "information", "by", "country", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L185-L200
[ "def", "releases", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'releases'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "respo...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.videos
Get the videos (trailers, teasers, clips, etc...) for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API.
tmdbsimple/movies.py
def videos(self, **kwargs): """ Get the videos (trailers, teasers, clips, etc...) for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. "...
def videos(self, **kwargs): """ Get the videos (trailers, teasers, clips, etc...) for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. "...
[ "Get", "the", "videos", "(", "trailers", "teasers", "clips", "etc", "...", ")", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L202-L217
[ "def", "videos", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'videos'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response"...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.translations
Get the translations for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API.
tmdbsimple/movies.py
def translations(self, **kwargs): """ Get the translations for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. """ path = self._get_id_...
def translations(self, **kwargs): """ Get the translations for a specific movie id. Args: append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. """ path = self._get_id_...
[ "Get", "the", "translations", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L219-L233
[ "def", "translations", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'translations'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.similar_movies
Get the similar movies for a specific movie id. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. Returns: A dict representatio...
tmdbsimple/movies.py
def similar_movies(self, **kwargs): """ Get the similar movies for a specific movie id. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie me...
def similar_movies(self, **kwargs): """ Get the similar movies for a specific movie id. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie me...
[ "Get", "the", "similar", "movies", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L235-L251
[ "def", "similar_movies", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'similar_movies'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.reviews
Get the reviews for a particular movie id. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of ...
tmdbsimple/movies.py
def reviews(self, **kwargs): """ Get the reviews for a particular movie id. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. ...
def reviews(self, **kwargs): """ Get the reviews for a particular movie id. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any movie method. ...
[ "Get", "the", "reviews", "for", "a", "particular", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L253-L269
[ "def", "reviews", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'reviews'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "respons...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.changes
Get the changes for a specific movie id. Changes are grouped by key, and ordered by date in descending order. By default, only the last 24 hours of changes are returned. The maximum number of days that can be returned in a single request is 14. The language is present on fields that are...
tmdbsimple/movies.py
def changes(self, **kwargs): """ Get the changes for a specific movie id. Changes are grouped by key, and ordered by date in descending order. By default, only the last 24 hours of changes are returned. The maximum number of days that can be returned in a single request is 14. ...
def changes(self, **kwargs): """ Get the changes for a specific movie id. Changes are grouped by key, and ordered by date in descending order. By default, only the last 24 hours of changes are returned. The maximum number of days that can be returned in a single request is 14. ...
[ "Get", "the", "changes", "for", "a", "specific", "movie", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L289-L309
[ "def", "changes", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'changes'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "respons...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.upcoming
Get the list of upcoming movies. This list refreshes every day. The maximum number of items this list will include is 100. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. Returns: A dict represen...
tmdbsimple/movies.py
def upcoming(self, **kwargs): """ Get the list of upcoming movies. This list refreshes every day. The maximum number of items this list will include is 100. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 c...
def upcoming(self, **kwargs): """ Get the list of upcoming movies. This list refreshes every day. The maximum number of items this list will include is 100. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 c...
[ "Get", "the", "list", "of", "upcoming", "movies", ".", "This", "list", "refreshes", "every", "day", ".", "The", "maximum", "number", "of", "items", "this", "list", "will", "include", "is", "100", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L324-L340
[ "def", "upcoming", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'upcoming'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.now_playing
Get the list of movies playing in theatres. This list refreshes every day. The maximum number of items this list will include is 100. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. Returns: A di...
tmdbsimple/movies.py
def now_playing(self, **kwargs): """ Get the list of movies playing in theatres. This list refreshes every day. The maximum number of items this list will include is 100. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optiona...
def now_playing(self, **kwargs): """ Get the list of movies playing in theatres. This list refreshes every day. The maximum number of items this list will include is 100. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optiona...
[ "Get", "the", "list", "of", "movies", "playing", "in", "theatres", ".", "This", "list", "refreshes", "every", "day", ".", "The", "maximum", "number", "of", "items", "this", "list", "will", "include", "is", "100", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L342-L358
[ "def", "now_playing", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'now_playing'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "re...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.popular
Get the list of popular movies on The Movie Database. This list refreshes every day. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. Returns: A dict representation of the JSON returned from the A...
tmdbsimple/movies.py
def popular(self, **kwargs): """ Get the list of popular movies on The Movie Database. This list refreshes every day. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. Returns: A di...
def popular(self, **kwargs): """ Get the list of popular movies on The Movie Database. This list refreshes every day. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. Returns: A di...
[ "Get", "the", "list", "of", "popular", "movies", "on", "The", "Movie", "Database", ".", "This", "list", "refreshes", "every", "day", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L360-L376
[ "def", "popular", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'popular'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response",...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.top_rated
Get the list of top rated movies. By default, this list will only include movies that have 10 or more votes. This list refreshes every day. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. Returns: ...
tmdbsimple/movies.py
def top_rated(self, **kwargs): """ Get the list of top rated movies. By default, this list will only include movies that have 10 or more votes. This list refreshes every day. Args: page: (optional) Minimum value of 1. Expected value is an integer. langua...
def top_rated(self, **kwargs): """ Get the list of top rated movies. By default, this list will only include movies that have 10 or more votes. This list refreshes every day. Args: page: (optional) Minimum value of 1. Expected value is an integer. langua...
[ "Get", "the", "list", "of", "top", "rated", "movies", ".", "By", "default", "this", "list", "will", "only", "include", "movies", "that", "have", "10", "or", "more", "votes", ".", "This", "list", "refreshes", "every", "day", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L378-L395
[ "def", "top_rated", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'top_rated'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "respon...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.account_states
This method lets users get the status of whether or not the movie has been rated or added to their favourite or watch lists. A valid session id is required. Args: session_id: see Authentication. Returns: A dict representation of the JSON returned from the API.
tmdbsimple/movies.py
def account_states(self, **kwargs): """ This method lets users get the status of whether or not the movie has been rated or added to their favourite or watch lists. A valid session id is required. Args: session_id: see Authentication. Returns: A ...
def account_states(self, **kwargs): """ This method lets users get the status of whether or not the movie has been rated or added to their favourite or watch lists. A valid session id is required. Args: session_id: see Authentication. Returns: A ...
[ "This", "method", "lets", "users", "get", "the", "status", "of", "whether", "or", "not", "the", "movie", "has", "been", "rated", "or", "added", "to", "their", "favourite", "or", "watch", "lists", ".", "A", "valid", "session", "id", "is", "required", "." ...
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L397-L413
[ "def", "account_states", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'account_states'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Movies.rating
This method lets users rate a movie. A valid session id or guest session id is required. Args: session_id: see Authentication. guest_session_id: see Authentication. value: Rating value. Returns: A dict representation of the JSON returned from the...
tmdbsimple/movies.py
def rating(self, **kwargs): """ This method lets users rate a movie. A valid session id or guest session id is required. Args: session_id: see Authentication. guest_session_id: see Authentication. value: Rating value. Returns: A d...
def rating(self, **kwargs): """ This method lets users rate a movie. A valid session id or guest session id is required. Args: session_id: see Authentication. guest_session_id: see Authentication. value: Rating value. Returns: A d...
[ "This", "method", "lets", "users", "rate", "a", "movie", ".", "A", "valid", "session", "id", "or", "guest", "session", "id", "is", "required", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/movies.py#L415-L436
[ "def", "rating", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'rating'", ")", "payload", "=", "{", "'value'", ":", "kwargs", ".", "pop", "(", "'value'", ",", "None", ")", ",", "}", "response", "=",...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
People.movie_credits
Get the movie credits for a specific person id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any person method. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/people.py
def movie_credits(self, **kwargs): """ Get the movie credits for a specific person id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any person method. Returns: A dict respresentation of the JSON returned ...
def movie_credits(self, **kwargs): """ Get the movie credits for a specific person id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any person method. Returns: A dict respresentation of the JSON returned ...
[ "Get", "the", "movie", "credits", "for", "a", "specific", "person", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/people.py#L56-L71
[ "def", "movie_credits", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'movie_credits'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "("...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
People.tv_credits
Get the TV credits for a specific person id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any person method. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/people.py
def tv_credits(self, **kwargs): """ Get the TV credits for a specific person id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any person method. Returns: A dict respresentation of the JSON returned from t...
def tv_credits(self, **kwargs): """ Get the TV credits for a specific person id. Args: language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any person method. Returns: A dict respresentation of the JSON returned from t...
[ "Get", "the", "TV", "credits", "for", "a", "specific", "person", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/people.py#L73-L88
[ "def", "tv_credits", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'tv_credits'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "r...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
People.combined_credits
Get the combined (movie and TV) credits for a specific person id. To get the expanded details for each TV record, call the /credit method with the provided credit_id. This will provide details about which episode and/or season the credit is for. Args: language: (optional)...
tmdbsimple/people.py
def combined_credits(self, **kwargs): """ Get the combined (movie and TV) credits for a specific person id. To get the expanded details for each TV record, call the /credit method with the provided credit_id. This will provide details about which episode and/or season the cred...
def combined_credits(self, **kwargs): """ Get the combined (movie and TV) credits for a specific person id. To get the expanded details for each TV record, call the /credit method with the provided credit_id. This will provide details about which episode and/or season the cred...
[ "Get", "the", "combined", "(", "movie", "and", "TV", ")", "credits", "for", "a", "specific", "person", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/people.py#L90-L109
[ "def", "combined_credits", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'combined_credits'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values",...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Credits.info
Get the detailed information about a particular credit record. This is currently only supported with the new credit model found in TV. These ids can be found from any TV credit response as well as the tv_credits and combined_credits methods for people. The episodes object returns a l...
tmdbsimple/people.py
def info(self, **kwargs): """ Get the detailed information about a particular credit record. This is currently only supported with the new credit model found in TV. These ids can be found from any TV credit response as well as the tv_credits and combined_credits methods for pe...
def info(self, **kwargs): """ Get the detailed information about a particular credit record. This is currently only supported with the new credit model found in TV. These ids can be found from any TV credit response as well as the tv_credits and combined_credits methods for pe...
[ "Get", "the", "detailed", "information", "about", "a", "particular", "credit", "record", ".", "This", "is", "currently", "only", "supported", "with", "the", "new", "credit", "model", "found", "in", "TV", ".", "These", "ids", "can", "be", "found", "from", "...
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/people.py#L204-L227
[ "def", "info", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_credit_id_path", "(", "'info'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "respon...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Discover.tv
Discover TV shows by different types of data like average rating, number of votes, genres, the network they aired on and air dates. Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639-1 code. sort_by: (optional) Available options are 'vote_a...
tmdbsimple/discover.py
def tv(self, **kwargs): """ Discover TV shows by different types of data like average rating, number of votes, genres, the network they aired on and air dates. Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639-1 code. sort_...
def tv(self, **kwargs): """ Discover TV shows by different types of data like average rating, number of votes, genres, the network they aired on and air dates. Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639-1 code. sort_...
[ "Discover", "TV", "shows", "by", "different", "types", "of", "data", "like", "average", "rating", "number", "of", "votes", "genres", "the", "network", "they", "aired", "on", "and", "air", "dates", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/discover.py#L94-L147
[ "def", "tv", "(", "self", ",", "*", "*", "kwargs", ")", ":", "# Periods are not allowed in keyword arguments but several API ", "# arguments contain periods. See both usages in tests/test_discover.py.", "for", "param", "in", "kwargs", ":", "if", "'_lte'", "in", "param", ":"...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Configuration.info
Get the system wide configuration info. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/configuration.py
def info(self, **kwargs): """ Get the system wide configuration info. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('info') response = self._GET(path, kwargs) self._set_attrs_to_values(response) ...
def info(self, **kwargs): """ Get the system wide configuration info. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('info') response = self._GET(path, kwargs) self._set_attrs_to_values(response) ...
[ "Get", "the", "system", "wide", "configuration", "info", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/configuration.py#L30-L41
[ "def", "info", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'info'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response", ")"...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Certifications.list
Get the list of supported certifications for movies. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/configuration.py
def list(self, **kwargs): """ Get the list of supported certifications for movies. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('movie_list') response = self._GET(path, kwargs) self._set_attrs_to_values...
def list(self, **kwargs): """ Get the list of supported certifications for movies. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('movie_list') response = self._GET(path, kwargs) self._set_attrs_to_values...
[ "Get", "the", "list", "of", "supported", "certifications", "for", "movies", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/configuration.py#L55-L66
[ "def", "list", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'movie_list'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response",...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Account.info
Get the basic information for an account. Call this method first, before calling other Account methods. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/account.py
def info(self, **kwargs): """ Get the basic information for an account. Call this method first, before calling other Account methods. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('info') kwargs.update({...
def info(self, **kwargs): """ Get the basic information for an account. Call this method first, before calling other Account methods. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('info') kwargs.update({...
[ "Get", "the", "basic", "information", "for", "an", "account", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/account.py#L43-L58
[ "def", "info", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'info'", ")", "kwargs", ".", "update", "(", "{", "'session_id'", ":", "self", ".", "session_id", "}", ")", "response", "=", "self", ".", "_G...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Account.watchlist_movies
Get the list of movies on an account watchlist. Args: page: (optional) Minimum 1, maximum 1000. sort_by: (optional) 'created_at.asc' | 'created_at.desc' language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the AP...
tmdbsimple/account.py
def watchlist_movies(self, **kwargs): """ Get the list of movies on an account watchlist. Args: page: (optional) Minimum 1, maximum 1000. sort_by: (optional) 'created_at.asc' | 'created_at.desc' language: (optional) ISO 639-1 code. Returns: ...
def watchlist_movies(self, **kwargs): """ Get the list of movies on an account watchlist. Args: page: (optional) Minimum 1, maximum 1000. sort_by: (optional) 'created_at.asc' | 'created_at.desc' language: (optional) ISO 639-1 code. Returns: ...
[ "Get", "the", "list", "of", "movies", "on", "an", "account", "watchlist", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/account.py#L179-L196
[ "def", "watchlist_movies", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'watchlist_movies'", ")", "kwargs", ".", "update", "(", "{", "'session_id'", ":", "self", ".", "session_id", "}", ")", "response", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Authentication.token_new
Generate a valid request token for user based authentication. A request token is required to ask the user for permission to access their account. After obtaining the request_token, either: (1) Direct your user to: https://www.themoviedb.org/authenticate/REQUEST_TOKEN ...
tmdbsimple/account.py
def token_new(self, **kwargs): """ Generate a valid request token for user based authentication. A request token is required to ask the user for permission to access their account. After obtaining the request_token, either: (1) Direct your user to: https...
def token_new(self, **kwargs): """ Generate a valid request token for user based authentication. A request token is required to ask the user for permission to access their account. After obtaining the request_token, either: (1) Direct your user to: https...
[ "Generate", "a", "valid", "request", "token", "for", "user", "based", "authentication", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/account.py#L257-L277
[ "def", "token_new", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'token_new'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "respon...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Authentication.token_validate_with_login
Authenticate a user with a TMDb username and password. The user must have a verified email address and be registered on TMDb. Args: request_token: The token you generated for the user to approve. username: The user's username on TMDb. password: The user's password o...
tmdbsimple/account.py
def token_validate_with_login(self, **kwargs): """ Authenticate a user with a TMDb username and password. The user must have a verified email address and be registered on TMDb. Args: request_token: The token you generated for the user to approve. username: The u...
def token_validate_with_login(self, **kwargs): """ Authenticate a user with a TMDb username and password. The user must have a verified email address and be registered on TMDb. Args: request_token: The token you generated for the user to approve. username: The u...
[ "Authenticate", "a", "user", "with", "a", "TMDb", "username", "and", "password", ".", "The", "user", "must", "have", "a", "verified", "email", "address", "and", "be", "registered", "on", "TMDb", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/account.py#L279-L296
[ "def", "token_validate_with_login", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'token_validate_with_login'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_at...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Authentication.session_new
Generate a session id for user based authentication. A session id is required in order to use any of the write methods. Args: request_token: The token you generated for the user to approve. The token needs to be approved before being us...
tmdbsimple/account.py
def session_new(self, **kwargs): """ Generate a session id for user based authentication. A session id is required in order to use any of the write methods. Args: request_token: The token you generated for the user to approve. The token needs to b...
def session_new(self, **kwargs): """ Generate a session id for user based authentication. A session id is required in order to use any of the write methods. Args: request_token: The token you generated for the user to approve. The token needs to b...
[ "Generate", "a", "session", "id", "for", "user", "based", "authentication", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/account.py#L298-L316
[ "def", "session_new", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'session_new'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "re...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Authentication.guest_session_new
Generate a guest session id. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/account.py
def guest_session_new(self, **kwargs): """ Generate a guest session id. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('guest_session_new') response = self._GET(path, kwargs) self._set_attrs_to_values(res...
def guest_session_new(self, **kwargs): """ Generate a guest session id. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_path('guest_session_new') response = self._GET(path, kwargs) self._set_attrs_to_values(res...
[ "Generate", "a", "guest", "session", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/account.py#L318-L329
[ "def", "guest_session_new", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'guest_session_new'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
GuestSessions.rated_movies
Get a list of rated moview for a specific guest session id. Args: page: (optional) Minimum 1, maximum 1000. sort_by: (optional) 'created_at.asc' | 'created_at.desc' language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned...
tmdbsimple/account.py
def rated_movies(self, **kwargs): """ Get a list of rated moview for a specific guest session id. Args: page: (optional) Minimum 1, maximum 1000. sort_by: (optional) 'created_at.asc' | 'created_at.desc' language: (optional) ISO 639-1 code. Returns: ...
def rated_movies(self, **kwargs): """ Get a list of rated moview for a specific guest session id. Args: page: (optional) Minimum 1, maximum 1000. sort_by: (optional) 'created_at.asc' | 'created_at.desc' language: (optional) ISO 639-1 code. Returns: ...
[ "Get", "a", "list", "of", "rated", "moview", "for", "a", "specific", "guest", "session", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/account.py#L346-L362
[ "def", "rated_movies", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_guest_session_id_path", "(", "'rated_movies'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_va...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Lists.item_status
Check to see if a movie id is already added to a list. Args: movie_id: The id of the movie. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/account.py
def item_status(self, **kwargs): """ Check to see if a movie id is already added to a list. Args: movie_id: The id of the movie. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_id_path('item_status') ...
def item_status(self, **kwargs): """ Check to see if a movie id is already added to a list. Args: movie_id: The id of the movie. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_id_path('item_status') ...
[ "Check", "to", "see", "if", "a", "movie", "id", "is", "already", "added", "to", "a", "list", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/account.py#L399-L413
[ "def", "item_status", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'item_status'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Lists.create_list
Create a new list. A valid session id is required. Args: name: Name of the list. description: Description of the list. language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/account.py
def create_list(self, **kwargs): """ Create a new list. A valid session id is required. Args: name: Name of the list. description: Description of the list. language: (optional) ISO 639-1 code. Returns: A dict respresentation of t...
def create_list(self, **kwargs): """ Create a new list. A valid session id is required. Args: name: Name of the list. description: Description of the list. language: (optional) ISO 639-1 code. Returns: A dict respresentation of t...
[ "Create", "a", "new", "list", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/account.py#L415-L441
[ "def", "create_list", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'create_list'", ")", "kwargs", ".", "update", "(", "{", "'session_id'", ":", "self", ".", "session_id", "}", ")", "payload", "=", "{", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Lists.remove_item
Delete movies from a list that the user created. A valid session id is required. Args: media_id: A movie id. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/account.py
def remove_item(self, **kwargs): """ Delete movies from a list that the user created. A valid session id is required. Args: media_id: A movie id. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_id_...
def remove_item(self, **kwargs): """ Delete movies from a list that the user created. A valid session id is required. Args: media_id: A movie id. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_id_...
[ "Delete", "movies", "from", "a", "list", "that", "the", "user", "created", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/account.py#L466-L487
[ "def", "remove_item", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'remove_item'", ")", "kwargs", ".", "update", "(", "{", "'session_id'", ":", "self", ".", "session_id", "}", ")", "payload", "=", "{",...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Lists.clear_list
Clears all of the items within a list. This is an irreversible action and should be treated with caution. A valid session id is required. Args: confirm: True (do it) | False (don't do it) Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/account.py
def clear_list(self, **kwargs): """ Clears all of the items within a list. This is an irreversible action and should be treated with caution. A valid session id is required. Args: confirm: True (do it) | False (don't do it) Returns: A dict respr...
def clear_list(self, **kwargs): """ Clears all of the items within a list. This is an irreversible action and should be treated with caution. A valid session id is required. Args: confirm: True (do it) | False (don't do it) Returns: A dict respr...
[ "Clears", "all", "of", "the", "items", "within", "a", "list", ".", "This", "is", "an", "irreversible", "action", "and", "should", "be", "treated", "with", "caution", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/account.py#L489-L509
[ "def", "clear_list", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'clear'", ")", "kwargs", ".", "update", "(", "{", "'session_id'", ":", "self", ".", "session_id", "}", ")", "payload", "=", "{", "}",...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV.content_ratings
Get the content ratings for a TV Series. Args: language: (optional) ISO 639 code. append_to_response: (optional) Comma separated, any collection method. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/tv.py
def content_ratings(self, **kwargs): """ Get the content ratings for a TV Series. Args: language: (optional) ISO 639 code. append_to_response: (optional) Comma separated, any collection method. Returns: A dict resprese...
def content_ratings(self, **kwargs): """ Get the content ratings for a TV Series. Args: language: (optional) ISO 639 code. append_to_response: (optional) Comma separated, any collection method. Returns: A dict resprese...
[ "Get", "the", "content", "ratings", "for", "a", "TV", "Series", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L83-L99
[ "def", "content_ratings", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'content_ratings'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV.similar
Get the similar TV series for a specific TV series id. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any TV method. Returns: A dict respresen...
tmdbsimple/tv.py
def similar(self, **kwargs): """ Get the similar TV series for a specific TV series id. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any TV metho...
def similar(self, **kwargs): """ Get the similar TV series for a specific TV series id. Args: page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. append_to_response: (optional) Comma separated, any TV metho...
[ "Get", "the", "similar", "TV", "series", "for", "a", "specific", "TV", "series", "id", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L177-L193
[ "def", "similar", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_id_path", "(", "'similar'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "respons...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV.on_the_air
Get the list of TV shows that are currently on the air. This query looks for any TV show that has an episode with an air date in the next 7 days. Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639 code. Returns: A dict respr...
tmdbsimple/tv.py
def on_the_air(self, **kwargs): """ Get the list of TV shows that are currently on the air. This query looks for any TV show that has an episode with an air date in the next 7 days. Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO ...
def on_the_air(self, **kwargs): """ Get the list of TV shows that are currently on the air. This query looks for any TV show that has an episode with an air date in the next 7 days. Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO ...
[ "Get", "the", "list", "of", "TV", "shows", "that", "are", "currently", "on", "the", "air", ".", "This", "query", "looks", "for", "any", "TV", "show", "that", "has", "an", "episode", "with", "an", "air", "date", "in", "the", "next", "7", "days", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L260-L277
[ "def", "on_the_air", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'on_the_air'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "resp...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV.airing_today
Get the list of TV shows that air today. Without a specified timezone, this query defaults to EST (Eastern Time UTC-05:00). Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639 code. timezone: (optional) Valid value from the list of timezones....
tmdbsimple/tv.py
def airing_today(self, **kwargs): """ Get the list of TV shows that air today. Without a specified timezone, this query defaults to EST (Eastern Time UTC-05:00). Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639 code. timezo...
def airing_today(self, **kwargs): """ Get the list of TV shows that air today. Without a specified timezone, this query defaults to EST (Eastern Time UTC-05:00). Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639 code. timezo...
[ "Get", "the", "list", "of", "TV", "shows", "that", "air", "today", ".", "Without", "a", "specified", "timezone", "this", "query", "defaults", "to", "EST", "(", "Eastern", "Time", "UTC", "-", "05", ":", "00", ")", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L279-L296
[ "def", "airing_today", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'airing_today'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV_Seasons.info
Get the primary information about a TV season by its season number. Args: language: (optional) ISO 639 code. append_to_response: (optional) Comma separated, any TV series method. Returns: A dict respresentation of the JSON returned fr...
tmdbsimple/tv.py
def info(self, **kwargs): """ Get the primary information about a TV season by its season number. Args: language: (optional) ISO 639 code. append_to_response: (optional) Comma separated, any TV series method. Returns: ...
def info(self, **kwargs): """ Get the primary information about a TV season by its season number. Args: language: (optional) ISO 639 code. append_to_response: (optional) Comma separated, any TV series method. Returns: ...
[ "Get", "the", "primary", "information", "about", "a", "TV", "season", "by", "its", "season", "number", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L355-L371
[ "def", "info", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_series_id_season_number_path", "(", "'info'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV_Seasons.credits
Get the cast & crew credits for a TV season by season number. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/tv.py
def credits(self, **kwargs): """ Get the cast & crew credits for a TV season by season number. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_series_id_season_number_path('credits') response = self._GET(path, kwargs) ...
def credits(self, **kwargs): """ Get the cast & crew credits for a TV season by season number. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_series_id_season_number_path('credits') response = self._GET(path, kwargs) ...
[ "Get", "the", "cast", "&", "crew", "credits", "for", "a", "TV", "season", "by", "season", "number", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L373-L384
[ "def", "credits", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_series_id_season_number_path", "(", "'credits'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_value...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV_Seasons.external_ids
Get the external ids that we have stored for a TV season by season number. Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/tv.py
def external_ids(self, **kwargs): """ Get the external ids that we have stored for a TV season by season number. Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API. """ path = self._...
def external_ids(self, **kwargs): """ Get the external ids that we have stored for a TV season by season number. Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API. """ path = self._...
[ "Get", "the", "external", "ids", "that", "we", "have", "stored", "for", "a", "TV", "season", "by", "season", "number", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L386-L401
[ "def", "external_ids", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_series_id_season_number_path", "(", "'external_ids'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attr...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV_Seasons.images
Get the images (posters) that we have stored for a TV season by season number. Args: language: (optional) ISO 639 code. include_image_language: (optional) Comma separated, a valid ISO 69-1. Returns: A dict respresentation ...
tmdbsimple/tv.py
def images(self, **kwargs): """ Get the images (posters) that we have stored for a TV season by season number. Args: language: (optional) ISO 639 code. include_image_language: (optional) Comma separated, a valid ISO 69-1. ...
def images(self, **kwargs): """ Get the images (posters) that we have stored for a TV season by season number. Args: language: (optional) ISO 639 code. include_image_language: (optional) Comma separated, a valid ISO 69-1. ...
[ "Get", "the", "images", "(", "posters", ")", "that", "we", "have", "stored", "for", "a", "TV", "season", "by", "season", "number", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L403-L420
[ "def", "images", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_series_id_season_number_path", "(", "'images'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values"...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV_Seasons.videos
Get the videos that have been added to a TV season (trailers, teasers, etc...). Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/tv.py
def videos(self, **kwargs): """ Get the videos that have been added to a TV season (trailers, teasers, etc...). Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API. """ path = self._g...
def videos(self, **kwargs): """ Get the videos that have been added to a TV season (trailers, teasers, etc...). Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API. """ path = self._g...
[ "Get", "the", "videos", "that", "have", "been", "added", "to", "a", "TV", "season", "(", "trailers", "teasers", "etc", "...", ")", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L422-L437
[ "def", "videos", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_series_id_season_number_path", "(", "'videos'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values"...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV_Episodes.info
Get the primary information about a TV episode by combination of a season and episode number. Args: language: (optional) ISO 639 code. append_to_response: (optional) Comma separated, any TV series method. Returns: A dict respr...
tmdbsimple/tv.py
def info(self, **kwargs): """ Get the primary information about a TV episode by combination of a season and episode number. Args: language: (optional) ISO 639 code. append_to_response: (optional) Comma separated, any TV series meth...
def info(self, **kwargs): """ Get the primary information about a TV episode by combination of a season and episode number. Args: language: (optional) ISO 639 code. append_to_response: (optional) Comma separated, any TV series meth...
[ "Get", "the", "primary", "information", "about", "a", "TV", "episode", "by", "combination", "of", "a", "season", "and", "episode", "number", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L462-L479
[ "def", "info", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_series_id_season_number_episode_number_path", "(", "'info'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV_Episodes.credits
Get the TV episode credits by combination of season and episode number. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/tv.py
def credits(self, **kwargs): """ Get the TV episode credits by combination of season and episode number. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_series_id_season_number_episode_number_path('credits') response =...
def credits(self, **kwargs): """ Get the TV episode credits by combination of season and episode number. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get_series_id_season_number_episode_number_path('credits') response =...
[ "Get", "the", "TV", "episode", "credits", "by", "combination", "of", "season", "and", "episode", "number", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L481-L492
[ "def", "credits", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_series_id_season_number_episode_number_path", "(", "'credits'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV_Episodes.external_ids
Get the external ids for a TV episode by combination of a season and episode number. Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/tv.py
def external_ids(self, **kwargs): """ Get the external ids for a TV episode by combination of a season and episode number. Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API. """ pat...
def external_ids(self, **kwargs): """ Get the external ids for a TV episode by combination of a season and episode number. Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API. """ pat...
[ "Get", "the", "external", "ids", "for", "a", "TV", "episode", "by", "combination", "of", "a", "season", "and", "episode", "number", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L494-L510
[ "def", "external_ids", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_series_id_season_number_episode_number_path", "(", "'external_ids'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", "....
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV_Episodes.images
Get the images (episode stills) for a TV episode by combination of a season and episode number. Since episode stills don't have a language, this call will always return all images. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/tv.py
def images(self, **kwargs): """ Get the images (episode stills) for a TV episode by combination of a season and episode number. Since episode stills don't have a language, this call will always return all images. Returns: A dict respresentation of the JSON returned f...
def images(self, **kwargs): """ Get the images (episode stills) for a TV episode by combination of a season and episode number. Since episode stills don't have a language, this call will always return all images. Returns: A dict respresentation of the JSON returned f...
[ "Get", "the", "images", "(", "episode", "stills", ")", "for", "a", "TV", "episode", "by", "combination", "of", "a", "season", "and", "episode", "number", ".", "Since", "episode", "stills", "don", "t", "have", "a", "language", "this", "call", "will", "alw...
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L512-L525
[ "def", "images", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_series_id_season_number_episode_number_path", "(", "'images'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_a...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TV_Episodes.videos
Get the videos that have been added to a TV episode (teasers, clips, etc...). Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/tv.py
def videos(self, **kwargs): """ Get the videos that have been added to a TV episode (teasers, clips, etc...). Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get...
def videos(self, **kwargs): """ Get the videos that have been added to a TV episode (teasers, clips, etc...). Args: language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API. """ path = self._get...
[ "Get", "the", "videos", "that", "have", "been", "added", "to", "a", "TV", "episode", "(", "teasers", "clips", "etc", "...", ")", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/tv.py#L550-L565
[ "def", "videos", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_series_id_season_number_episode_number_path", "(", "'videos'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_a...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
TMDB._set_attrs_to_values
Set attributes to dictionary values. - e.g. >>> import tmdbsimple as tmdb >>> movie = tmdb.Movies(103332) >>> response = movie.info() >>> movie.title # instead of response['title']
tmdbsimple/base.py
def _set_attrs_to_values(self, response={}): """ Set attributes to dictionary values. - e.g. >>> import tmdbsimple as tmdb >>> movie = tmdb.Movies(103332) >>> response = movie.info() >>> movie.title # instead of response['title'] """ if isinstanc...
def _set_attrs_to_values(self, response={}): """ Set attributes to dictionary values. - e.g. >>> import tmdbsimple as tmdb >>> movie = tmdb.Movies(103332) >>> response = movie.info() >>> movie.title # instead of response['title'] """ if isinstanc...
[ "Set", "attributes", "to", "dictionary", "values", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/base.py#L93-L106
[ "def", "_set_attrs_to_values", "(", "self", ",", "response", "=", "{", "}", ")", ":", "if", "isinstance", "(", "response", ",", "dict", ")", ":", "for", "key", "in", "response", ".", "keys", "(", ")", ":", "if", "not", "hasattr", "(", "self", ",", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Search.movie
Search for movies by title. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. include_adult: (optional) Toggle the inclusion of adult titles. Expect...
tmdbsimple/search.py
def movie(self, **kwargs): """ Search for movies by title. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. include_adult: (optional) Toggle the inclusion of a...
def movie(self, **kwargs): """ Search for movies by title. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. include_adult: (optional) Toggle the inclusion of a...
[ "Search", "for", "movies", "by", "title", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/search.py#L33-L61
[ "def", "movie", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'movie'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response", "...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Search.collection
Search for collections by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/search.py
def collection(self, **kwargs): """ Search for collections by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. Returns: A dict respresentation o...
def collection(self, **kwargs): """ Search for collections by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. Returns: A dict respresentation o...
[ "Search", "for", "collections", "by", "name", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/search.py#L63-L79
[ "def", "collection", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'collection'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "resp...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Search.tv
Search for TV shows by title. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. first_air_date_year: (optional) Filter the results to only match ...
tmdbsimple/search.py
def tv(self, **kwargs): """ Search for TV shows by title. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. first_air_date_year: (optional) Filter the results t...
def tv(self, **kwargs): """ Search for TV shows by title. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. first_air_date_year: (optional) Filter the results t...
[ "Search", "for", "TV", "shows", "by", "title", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/search.py#L81-L105
[ "def", "tv", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'tv'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response", ")", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Search.person
Search for people by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. include_adult: (optional) Toggle the inclusion of adult titles. Expected value is True or False. search_type...
tmdbsimple/search.py
def person(self, **kwargs): """ Search for people by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. include_adult: (optional) Toggle the inclusion of adult titles. Expected...
def person(self, **kwargs): """ Search for people by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. include_adult: (optional) Toggle the inclusion of adult titles. Expected...
[ "Search", "for", "people", "by", "name", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/search.py#L107-L130
[ "def", "person", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'person'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response", ...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Search.company
Search for companies by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/search.py
def company(self, **kwargs): """ Search for companies by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. Returns: A dict respresentation of the JSON returned from the API. """ ...
def company(self, **kwargs): """ Search for companies by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. Returns: A dict respresentation of the JSON returned from the API. """ ...
[ "Search", "for", "companies", "by", "name", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/search.py#L132-L147
[ "def", "company", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'company'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response",...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Search.keyword
Search for keywords by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. Returns: A dict respresentation of the JSON returned from the API.
tmdbsimple/search.py
def keyword(self, **kwargs): """ Search for keywords by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. Returns: A dict respresentation of the JSON returned from the API. """ p...
def keyword(self, **kwargs): """ Search for keywords by name. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. Returns: A dict respresentation of the JSON returned from the API. """ p...
[ "Search", "for", "keywords", "by", "name", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/search.py#L149-L164
[ "def", "keyword", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'keyword'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response",...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
Search.multi
Search the movie, tv show and person collections with a single query. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. include_adult: (optional) Toggle the inclusion of adult ...
tmdbsimple/search.py
def multi(self, **kwargs): """ Search the movie, tv show and person collections with a single query. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. include_a...
def multi(self, **kwargs): """ Search the movie, tv show and person collections with a single query. Args: query: CGI escpaed string. page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. include_a...
[ "Search", "the", "movie", "tv", "show", "and", "person", "collections", "with", "a", "single", "query", "." ]
celiao/tmdbsimple
python
https://github.com/celiao/tmdbsimple/blob/ff17893110c99771d6398a62c35d36dd9735f4b9/tmdbsimple/search.py#L166-L184
[ "def", "multi", "(", "self", ",", "*", "*", "kwargs", ")", ":", "path", "=", "self", ".", "_get_path", "(", "'multi'", ")", "response", "=", "self", ".", "_GET", "(", "path", ",", "kwargs", ")", "self", ".", "_set_attrs_to_values", "(", "response", "...
ff17893110c99771d6398a62c35d36dd9735f4b9
test
normalize
Normalize and tokenize text. This is lifted from NIST mteval-v11a.pl.
bleualign/score.py
def normalize(s): '''Normalize and tokenize text. This is lifted from NIST mteval-v11a.pl.''' # Added to bypass NIST-style pre-processing of hyp and ref files -- wade if (nonorm): return s.split() try: s.split() except: s = " ".join(s) # language-independent part: for...
def normalize(s): '''Normalize and tokenize text. This is lifted from NIST mteval-v11a.pl.''' # Added to bypass NIST-style pre-processing of hyp and ref files -- wade if (nonorm): return s.split() try: s.split() except: s = " ".join(s) # language-independent part: for...
[ "Normalize", "and", "tokenize", "text", ".", "This", "is", "lifted", "from", "NIST", "mteval", "-", "v11a", ".", "pl", "." ]
rsennrich/Bleualign
python
https://github.com/rsennrich/Bleualign/blob/1de181dcc3257d885a2b981f751c0220c0e8958f/bleualign/score.py#L47-L64
[ "def", "normalize", "(", "s", ")", ":", "# Added to bypass NIST-style pre-processing of hyp and ref files -- wade", "if", "(", "nonorm", ")", ":", "return", "s", ".", "split", "(", ")", "try", ":", "s", ".", "split", "(", ")", "except", ":", "s", "=", "\" \"...
1de181dcc3257d885a2b981f751c0220c0e8958f
test
cook_refs
Takes a list of reference sentences for a single segment and returns an object that encapsulates everything that BLEU needs to know about them.
bleualign/score.py
def cook_refs(refs, n=4): '''Takes a list of reference sentences for a single segment and returns an object that encapsulates everything that BLEU needs to know about them.''' refs = [normalize(ref) for ref in refs] maxcounts = {} for ref in refs: counts = count_ngrams(ref, n) ...
def cook_refs(refs, n=4): '''Takes a list of reference sentences for a single segment and returns an object that encapsulates everything that BLEU needs to know about them.''' refs = [normalize(ref) for ref in refs] maxcounts = {} for ref in refs: counts = count_ngrams(ref, n) ...
[ "Takes", "a", "list", "of", "reference", "sentences", "for", "a", "single", "segment", "and", "returns", "an", "object", "that", "encapsulates", "everything", "that", "BLEU", "needs", "to", "know", "about", "them", "." ]
rsennrich/Bleualign
python
https://github.com/rsennrich/Bleualign/blob/1de181dcc3257d885a2b981f751c0220c0e8958f/bleualign/score.py#L74-L85
[ "def", "cook_refs", "(", "refs", ",", "n", "=", "4", ")", ":", "refs", "=", "[", "normalize", "(", "ref", ")", "for", "ref", "in", "refs", "]", "maxcounts", "=", "{", "}", "for", "ref", "in", "refs", ":", "counts", "=", "count_ngrams", "(", "ref"...
1de181dcc3257d885a2b981f751c0220c0e8958f
test
cook_ref_set
Takes a reference sentences for a single segment and returns an object that encapsulates everything that BLEU needs to know about them. Also provides a set cause bleualign wants it
bleualign/score.py
def cook_ref_set(ref, n=4): '''Takes a reference sentences for a single segment and returns an object that encapsulates everything that BLEU needs to know about them. Also provides a set cause bleualign wants it''' ref = normalize(ref) counts = count_ngrams(ref, n) return (len(ref), counts, fro...
def cook_ref_set(ref, n=4): '''Takes a reference sentences for a single segment and returns an object that encapsulates everything that BLEU needs to know about them. Also provides a set cause bleualign wants it''' ref = normalize(ref) counts = count_ngrams(ref, n) return (len(ref), counts, fro...
[ "Takes", "a", "reference", "sentences", "for", "a", "single", "segment", "and", "returns", "an", "object", "that", "encapsulates", "everything", "that", "BLEU", "needs", "to", "know", "about", "them", ".", "Also", "provides", "a", "set", "cause", "bleualign", ...
rsennrich/Bleualign
python
https://github.com/rsennrich/Bleualign/blob/1de181dcc3257d885a2b981f751c0220c0e8958f/bleualign/score.py#L87-L93
[ "def", "cook_ref_set", "(", "ref", ",", "n", "=", "4", ")", ":", "ref", "=", "normalize", "(", "ref", ")", "counts", "=", "count_ngrams", "(", "ref", ",", "n", ")", "return", "(", "len", "(", "ref", ")", ",", "counts", ",", "frozenset", "(", "cou...
1de181dcc3257d885a2b981f751c0220c0e8958f
test
erfcc
Complementary error function.
bleualign/gale_church.py
def erfcc(x): """Complementary error function.""" z = abs(x) t = 1 / (1 + 0.5 * z) r = t * math.exp(-z * z - 1.26551223 + t * (1.00002368 + t * (.37409196 + t * (.09678418 + t * (-.18628806 + t...
def erfcc(x): """Complementary error function.""" z = abs(x) t = 1 / (1 + 0.5 * z) r = t * math.exp(-z * z - 1.26551223 + t * (1.00002368 + t * (.37409196 + t * (.09678418 + t * (-.18628806 + t...
[ "Complementary", "error", "function", "." ]
rsennrich/Bleualign
python
https://github.com/rsennrich/Bleualign/blob/1de181dcc3257d885a2b981f751c0220c0e8958f/bleualign/gale_church.py#L10-L27
[ "def", "erfcc", "(", "x", ")", ":", "z", "=", "abs", "(", "x", ")", "t", "=", "1", "/", "(", "1", "+", "0.5", "*", "z", ")", "r", "=", "t", "*", "math", ".", "exp", "(", "-", "z", "*", "z", "-", "1.26551223", "+", "t", "*", "(", "1.00...
1de181dcc3257d885a2b981f751c0220c0e8958f
test
align_probability
Returns the probability of the two sentences C{source_sentences[i]}, C{target_sentences[j]} being aligned with a specific C{alignment}. @param i: The offset of the source sentence. @param j: The offset of the target sentence. @param source_sentences: The list of source sentence lengths. @param targ...
bleualign/gale_church.py
def align_probability(i, j, source_sentences, target_sentences, alignment, params): """Returns the probability of the two sentences C{source_sentences[i]}, C{target_sentences[j]} being aligned with a specific C{alignment}. @param i: The offset of the source sentence. @param j: The offset of the target ...
def align_probability(i, j, source_sentences, target_sentences, alignment, params): """Returns the probability of the two sentences C{source_sentences[i]}, C{target_sentences[j]} being aligned with a specific C{alignment}. @param i: The offset of the source sentence. @param j: The offset of the target ...
[ "Returns", "the", "probability", "of", "the", "two", "sentences", "C", "{", "source_sentences", "[", "i", "]", "}", "C", "{", "target_sentences", "[", "j", "]", "}", "being", "aligned", "with", "a", "specific", "C", "{", "alignment", "}", "." ]
rsennrich/Bleualign
python
https://github.com/rsennrich/Bleualign/blob/1de181dcc3257d885a2b981f751c0220c0e8958f/bleualign/gale_church.py#L71-L94
[ "def", "align_probability", "(", "i", ",", "j", ",", "source_sentences", ",", "target_sentences", ",", "alignment", ",", "params", ")", ":", "l_s", "=", "sum", "(", "source_sentences", "[", "i", "-", "offset", "]", "for", "offset", "in", "range", "(", "a...
1de181dcc3257d885a2b981f751c0220c0e8958f
test
align_blocks
Creates the sentence alignment of two blocks of texts (usually paragraphs). @param source_sentences: The list of source sentence lengths. @param target_sentences: The list of target sentence lengths. @param params: the sentence alignment parameters. @return: The sentence alignments, a list of index pa...
bleualign/gale_church.py
def align_blocks(source_sentences, target_sentences, params = LanguageIndependent): """Creates the sentence alignment of two blocks of texts (usually paragraphs). @param source_sentences: The list of source sentence lengths. @param target_sentences: The list of target sentence lengths. @param params: t...
def align_blocks(source_sentences, target_sentences, params = LanguageIndependent): """Creates the sentence alignment of two blocks of texts (usually paragraphs). @param source_sentences: The list of source sentence lengths. @param target_sentences: The list of target sentence lengths. @param params: t...
[ "Creates", "the", "sentence", "alignment", "of", "two", "blocks", "of", "texts", "(", "usually", "paragraphs", ")", "." ]
rsennrich/Bleualign
python
https://github.com/rsennrich/Bleualign/blob/1de181dcc3257d885a2b981f751c0220c0e8958f/bleualign/gale_church.py#L97-L146
[ "def", "align_blocks", "(", "source_sentences", ",", "target_sentences", ",", "params", "=", "LanguageIndependent", ")", ":", "alignment_types", "=", "list", "(", "params", ".", "PRIORS", ".", "keys", "(", ")", ")", "# there are always three rows in the history (with ...
1de181dcc3257d885a2b981f751c0220c0e8958f
test
align_texts
Creates the sentence alignment of two texts. Texts can consist of several blocks. Block boundaries cannot be crossed by sentence alignment links. Each block consists of a list that contains the lengths (in characters) of the sentences in this block. @param source_blocks: The list of blocks ...
bleualign/gale_church.py
def align_texts(source_blocks, target_blocks, params = LanguageIndependent): """Creates the sentence alignment of two texts. Texts can consist of several blocks. Block boundaries cannot be crossed by sentence alignment links. Each block consists of a list that contains the lengths (in characters) of...
def align_texts(source_blocks, target_blocks, params = LanguageIndependent): """Creates the sentence alignment of two texts. Texts can consist of several blocks. Block boundaries cannot be crossed by sentence alignment links. Each block consists of a list that contains the lengths (in characters) of...
[ "Creates", "the", "sentence", "alignment", "of", "two", "texts", "." ]
rsennrich/Bleualign
python
https://github.com/rsennrich/Bleualign/blob/1de181dcc3257d885a2b981f751c0220c0e8958f/bleualign/gale_church.py#L149-L168
[ "def", "align_texts", "(", "source_blocks", ",", "target_blocks", ",", "params", "=", "LanguageIndependent", ")", ":", "if", "len", "(", "source_blocks", ")", "!=", "len", "(", "target_blocks", ")", ":", "raise", "ValueError", "(", "\"Source and target texts do no...
1de181dcc3257d885a2b981f751c0220c0e8958f
test
split_at
Splits an iterator C{it} at values of C{split_value}. Each instance of C{split_value} is swallowed. The iterator produces subiterators which need to be consumed fully before the next subiterator can be used.
bleualign/gale_church.py
def split_at(it, split_value): """Splits an iterator C{it} at values of C{split_value}. Each instance of C{split_value} is swallowed. The iterator produces subiterators which need to be consumed fully before the next subiterator can be used. """ def _chunk_iterator(first): v = first ...
def split_at(it, split_value): """Splits an iterator C{it} at values of C{split_value}. Each instance of C{split_value} is swallowed. The iterator produces subiterators which need to be consumed fully before the next subiterator can be used. """ def _chunk_iterator(first): v = first ...
[ "Splits", "an", "iterator", "C", "{", "it", "}", "at", "values", "of", "C", "{", "split_value", "}", "." ]
rsennrich/Bleualign
python
https://github.com/rsennrich/Bleualign/blob/1de181dcc3257d885a2b981f751c0220c0e8958f/bleualign/gale_church.py#L171-L185
[ "def", "split_at", "(", "it", ",", "split_value", ")", ":", "def", "_chunk_iterator", "(", "first", ")", ":", "v", "=", "first", "while", "v", "!=", "split_value", ":", "yield", "v", "v", "=", "next", "(", "it", ")", "while", "True", ":", "yield", ...
1de181dcc3257d885a2b981f751c0220c0e8958f
test
parse_token_stream
Parses a stream of tokens and splits it into sentences (using C{soft_delimiter} tokens) and blocks (using C{hard_delimiter} tokens) for use with the L{align_texts} function.
bleualign/gale_church.py
def parse_token_stream(stream, soft_delimiter, hard_delimiter): """Parses a stream of tokens and splits it into sentences (using C{soft_delimiter} tokens) and blocks (using C{hard_delimiter} tokens) for use with the L{align_texts} function. """ return [ [sum(len(token) for token in sentence_it)...
def parse_token_stream(stream, soft_delimiter, hard_delimiter): """Parses a stream of tokens and splits it into sentences (using C{soft_delimiter} tokens) and blocks (using C{hard_delimiter} tokens) for use with the L{align_texts} function. """ return [ [sum(len(token) for token in sentence_it)...
[ "Parses", "a", "stream", "of", "tokens", "and", "splits", "it", "into", "sentences", "(", "using", "C", "{", "soft_delimiter", "}", "tokens", ")", "and", "blocks", "(", "using", "C", "{", "hard_delimiter", "}", "tokens", ")", "for", "use", "with", "the",...
rsennrich/Bleualign
python
https://github.com/rsennrich/Bleualign/blob/1de181dcc3257d885a2b981f751c0220c0e8958f/bleualign/gale_church.py#L188-L195
[ "def", "parse_token_stream", "(", "stream", ",", "soft_delimiter", ",", "hard_delimiter", ")", ":", "return", "[", "[", "sum", "(", "len", "(", "token", ")", "for", "token", "in", "sentence_it", ")", "for", "sentence_it", "in", "split_at", "(", "block_it", ...
1de181dcc3257d885a2b981f751c0220c0e8958f
test
get_descriptors_from_module
r"""[DEPRECATED] Get descriptors from module. Parameters: mdl(module): module to search Returns: [Descriptor]
mordred/_base/calculator.py
def get_descriptors_from_module(mdl, submodule=False): r"""[DEPRECATED] Get descriptors from module. Parameters: mdl(module): module to search Returns: [Descriptor] """ warnings.warn("use get_descriptors_in_module", DeprecationWarning) __all__ = getattr(mdl, "__all__", None) ...
def get_descriptors_from_module(mdl, submodule=False): r"""[DEPRECATED] Get descriptors from module. Parameters: mdl(module): module to search Returns: [Descriptor] """ warnings.warn("use get_descriptors_in_module", DeprecationWarning) __all__ = getattr(mdl, "__all__", None) ...
[ "r", "[", "DEPRECATED", "]", "Get", "descriptors", "from", "module", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/calculator.py#L385-L419
[ "def", "get_descriptors_from_module", "(", "mdl", ",", "submodule", "=", "False", ")", ":", "warnings", ".", "warn", "(", "\"use get_descriptors_in_module\"", ",", "DeprecationWarning", ")", "__all__", "=", "getattr", "(", "mdl", ",", "\"__all__\"", ",", "None", ...
2848b088fd7b6735590242b5e22573babc724f10
test
get_descriptors_in_module
r"""Get descriptors in module. Parameters: mdl(module): module to search submodule(bool): search recursively Returns: Iterator[Descriptor]
mordred/_base/calculator.py
def get_descriptors_in_module(mdl, submodule=True): r"""Get descriptors in module. Parameters: mdl(module): module to search submodule(bool): search recursively Returns: Iterator[Descriptor] """ __all__ = getattr(mdl, "__all__", None) if __all__ is None: __all_...
def get_descriptors_in_module(mdl, submodule=True): r"""Get descriptors in module. Parameters: mdl(module): module to search submodule(bool): search recursively Returns: Iterator[Descriptor] """ __all__ = getattr(mdl, "__all__", None) if __all__ is None: __all_...
[ "r", "Get", "descriptors", "in", "module", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/calculator.py#L422-L450
[ "def", "get_descriptors_in_module", "(", "mdl", ",", "submodule", "=", "True", ")", ":", "__all__", "=", "getattr", "(", "mdl", ",", "\"__all__\"", ",", "None", ")", "if", "__all__", "is", "None", ":", "__all__", "=", "dir", "(", "mdl", ")", "all_values"...
2848b088fd7b6735590242b5e22573babc724f10
test
Calculator.register_json
Register Descriptors from json descriptor objects. Parameters: obj(list or dict): descriptors to register
mordred/_base/calculator.py
def register_json(self, obj): """Register Descriptors from json descriptor objects. Parameters: obj(list or dict): descriptors to register """ if not isinstance(obj, list): obj = [obj] self.register(Descriptor.from_json(j) for j in obj)
def register_json(self, obj): """Register Descriptors from json descriptor objects. Parameters: obj(list or dict): descriptors to register """ if not isinstance(obj, list): obj = [obj] self.register(Descriptor.from_json(j) for j in obj)
[ "Register", "Descriptors", "from", "json", "descriptor", "objects", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/calculator.py#L60-L70
[ "def", "register_json", "(", "self", ",", "obj", ")", ":", "if", "not", "isinstance", "(", "obj", ",", "list", ")", ":", "obj", "=", "[", "obj", "]", "self", ".", "register", "(", "Descriptor", ".", "from_json", "(", "j", ")", "for", "j", "in", "...
2848b088fd7b6735590242b5e22573babc724f10
test
Calculator.register
r"""Register descriptors. Descriptor-like: * Descriptor instance: self * Descriptor class: use Descriptor.preset() method * module: use Descriptor-likes in module * Iterable: use Descriptor-likes in Iterable Parameters: desc(Descriptor-like):...
mordred/_base/calculator.py
def register(self, desc, version=None, ignore_3D=False): r"""Register descriptors. Descriptor-like: * Descriptor instance: self * Descriptor class: use Descriptor.preset() method * module: use Descriptor-likes in module * Iterable: use Descriptor-likes in...
def register(self, desc, version=None, ignore_3D=False): r"""Register descriptors. Descriptor-like: * Descriptor instance: self * Descriptor class: use Descriptor.preset() method * module: use Descriptor-likes in module * Iterable: use Descriptor-likes in...
[ "r", "Register", "descriptors", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/calculator.py#L158-L177
[ "def", "register", "(", "self", ",", "desc", ",", "version", "=", "None", ",", "ignore_3D", "=", "False", ")", ":", "if", "version", "is", "None", ":", "version", "=", "__version__", "version", "=", "StrictVersion", "(", "version", ")", "return", "self",...
2848b088fd7b6735590242b5e22573babc724f10
test
Calculator.echo
Output message. Parameters: s(str): message to output file(file-like): output to end(str): end mark of message Return: None
mordred/_base/calculator.py
def echo(self, s, file=sys.stdout, end="\n"): """Output message. Parameters: s(str): message to output file(file-like): output to end(str): end mark of message Return: None """ p = getattr(self, "_progress_bar", None) if ...
def echo(self, s, file=sys.stdout, end="\n"): """Output message. Parameters: s(str): message to output file(file-like): output to end(str): end mark of message Return: None """ p = getattr(self, "_progress_bar", None) if ...
[ "Output", "message", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/calculator.py#L314-L331
[ "def", "echo", "(", "self", ",", "s", ",", "file", "=", "sys", ".", "stdout", ",", "end", "=", "\"\\n\"", ")", ":", "p", "=", "getattr", "(", "self", ",", "\"_progress_bar\"", ",", "None", ")", "if", "p", "is", "not", "None", ":", "p", ".", "wr...
2848b088fd7b6735590242b5e22573babc724f10
test
Calculator.map
r"""Calculate descriptors over mols. Parameters: mols(Iterable[rdkit.Mol]): moleculars nproc(int): number of process to use. default: multiprocessing.cpu_count() nmols(int): number of all mols to use in progress-bar. default: mols.__len__() quiet(bool): don't ...
mordred/_base/calculator.py
def map(self, mols, nproc=None, nmols=None, quiet=False, ipynb=False, id=-1): r"""Calculate descriptors over mols. Parameters: mols(Iterable[rdkit.Mol]): moleculars nproc(int): number of process to use. default: multiprocessing.cpu_count() nmols(int): number of all...
def map(self, mols, nproc=None, nmols=None, quiet=False, ipynb=False, id=-1): r"""Calculate descriptors over mols. Parameters: mols(Iterable[rdkit.Mol]): moleculars nproc(int): number of process to use. default: multiprocessing.cpu_count() nmols(int): number of all...
[ "r", "Calculate", "descriptors", "over", "mols", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/calculator.py#L333-L362
[ "def", "map", "(", "self", ",", "mols", ",", "nproc", "=", "None", ",", "nmols", "=", "None", ",", "quiet", "=", "False", ",", "ipynb", "=", "False", ",", "id", "=", "-", "1", ")", ":", "if", "nproc", "is", "None", ":", "nproc", "=", "cpu_count...
2848b088fd7b6735590242b5e22573babc724f10
test
Calculator.pandas
r"""Calculate descriptors over mols. Returns: pandas.DataFrame
mordred/_base/calculator.py
def pandas(self, mols, nproc=None, nmols=None, quiet=False, ipynb=False, id=-1): r"""Calculate descriptors over mols. Returns: pandas.DataFrame """ from .pandas_module import MordredDataFrame, Series if isinstance(mols, Series): index = mols.index ...
def pandas(self, mols, nproc=None, nmols=None, quiet=False, ipynb=False, id=-1): r"""Calculate descriptors over mols. Returns: pandas.DataFrame """ from .pandas_module import MordredDataFrame, Series if isinstance(mols, Series): index = mols.index ...
[ "r", "Calculate", "descriptors", "over", "mols", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/calculator.py#L364-L382
[ "def", "pandas", "(", "self", ",", "mols", ",", "nproc", "=", "None", ",", "nmols", "=", "None", ",", "quiet", "=", "False", ",", "ipynb", "=", "False", ",", "id", "=", "-", "1", ")", ":", "from", ".", "pandas_module", "import", "MordredDataFrame", ...
2848b088fd7b6735590242b5e22573babc724f10
test
is_descriptor_class
r"""Check calculatable descriptor class or not. Returns: bool
mordred/_base/descriptor.py
def is_descriptor_class(desc, include_abstract=False): r"""Check calculatable descriptor class or not. Returns: bool """ return ( isinstance(desc, type) and issubclass(desc, Descriptor) and (True if include_abstract else not inspect.isabstract(desc)) )
def is_descriptor_class(desc, include_abstract=False): r"""Check calculatable descriptor class or not. Returns: bool """ return ( isinstance(desc, type) and issubclass(desc, Descriptor) and (True if include_abstract else not inspect.isabstract(desc)) )
[ "r", "Check", "calculatable", "descriptor", "class", "or", "not", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/descriptor.py#L266-L277
[ "def", "is_descriptor_class", "(", "desc", ",", "include_abstract", "=", "False", ")", ":", "return", "(", "isinstance", "(", "desc", ",", "type", ")", "and", "issubclass", "(", "desc", ",", "Descriptor", ")", "and", "(", "True", "if", "include_abstract", ...
2848b088fd7b6735590242b5e22573babc724f10
test
Descriptor.to_json
Convert to json serializable dictionary. Returns: dict: dictionary of descriptor
mordred/_base/descriptor.py
def to_json(self): """Convert to json serializable dictionary. Returns: dict: dictionary of descriptor """ d, ps = self._to_json() if len(ps) == 0: return {"name": d} else: return {"name": d, "args": ps}
def to_json(self): """Convert to json serializable dictionary. Returns: dict: dictionary of descriptor """ d, ps = self._to_json() if len(ps) == 0: return {"name": d} else: return {"name": d, "args": ps}
[ "Convert", "to", "json", "serializable", "dictionary", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/descriptor.py#L94-L105
[ "def", "to_json", "(", "self", ")", ":", "d", ",", "ps", "=", "self", ".", "_to_json", "(", ")", "if", "len", "(", "ps", ")", "==", "0", ":", "return", "{", "\"name\"", ":", "d", "}", "else", ":", "return", "{", "\"name\"", ":", "d", ",", "\"...
2848b088fd7b6735590242b5e22573babc724f10
test
Descriptor.coord
Get 3D coordinate. Returns: numpy.array[3, N]: coordinate matrix
mordred/_base/descriptor.py
def coord(self): """Get 3D coordinate. Returns: numpy.array[3, N]: coordinate matrix """ if not self.require_3D: self.fail(AttributeError("use 3D coordinate in 2D descriptor")) return self._context.get_coord(self)
def coord(self): """Get 3D coordinate. Returns: numpy.array[3, N]: coordinate matrix """ if not self.require_3D: self.fail(AttributeError("use 3D coordinate in 2D descriptor")) return self._context.get_coord(self)
[ "Get", "3D", "coordinate", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/descriptor.py#L186-L196
[ "def", "coord", "(", "self", ")", ":", "if", "not", "self", ".", "require_3D", ":", "self", ".", "fail", "(", "AttributeError", "(", "\"use 3D coordinate in 2D descriptor\"", ")", ")", "return", "self", ".", "_context", ".", "get_coord", "(", "self", ")" ]
2848b088fd7b6735590242b5e22573babc724f10
test
Descriptor.rethrow_zerodiv
[contextmanager] treat zero div as known exception.
mordred/_base/descriptor.py
def rethrow_zerodiv(self): """[contextmanager] treat zero div as known exception.""" with np.errstate(divide="raise", invalid="raise"): try: yield except (FloatingPointError, ZeroDivisionError) as e: self.fail(ZeroDivisionError(*e.args))
def rethrow_zerodiv(self): """[contextmanager] treat zero div as known exception.""" with np.errstate(divide="raise", invalid="raise"): try: yield except (FloatingPointError, ZeroDivisionError) as e: self.fail(ZeroDivisionError(*e.args))
[ "[", "contextmanager", "]", "treat", "zero", "div", "as", "known", "exception", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/descriptor.py#L217-L223
[ "def", "rethrow_zerodiv", "(", "self", ")", ":", "with", "np", ".", "errstate", "(", "divide", "=", "\"raise\"", ",", "invalid", "=", "\"raise\"", ")", ":", "try", ":", "yield", "except", "(", "FloatingPointError", ",", "ZeroDivisionError", ")", "as", "e",...
2848b088fd7b6735590242b5e22573babc724f10
test
SurfaceArea.atomic_sa
r"""Calculate atomic surface area. :type i: int :param i: atom index :rtype: float
mordred/surface_area/_sasa.py
def atomic_sa(self, i): r"""Calculate atomic surface area. :type i: int :param i: atom index :rtype: float """ sa = 4.0 * np.pi * self.rads2[i] neighbors = self.neighbors.get(i) if neighbors is None: return sa XYZi = self.xyzs[i, n...
def atomic_sa(self, i): r"""Calculate atomic surface area. :type i: int :param i: atom index :rtype: float """ sa = 4.0 * np.pi * self.rads2[i] neighbors = self.neighbors.get(i) if neighbors is None: return sa XYZi = self.xyzs[i, n...
[ "r", "Calculate", "atomic", "surface", "area", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/surface_area/_sasa.py#L58-L85
[ "def", "atomic_sa", "(", "self", ",", "i", ")", ":", "sa", "=", "4.0", "*", "np", ".", "pi", "*", "self", ".", "rads2", "[", "i", "]", "neighbors", "=", "self", ".", "neighbors", ".", "get", "(", "i", ")", "if", "neighbors", "is", "None", ":", ...
2848b088fd7b6735590242b5e22573babc724f10
test
SurfaceArea.surface_area
r"""Calculate all atomic surface area. :rtype: [float]
mordred/surface_area/_sasa.py
def surface_area(self): r"""Calculate all atomic surface area. :rtype: [float] """ return [self.atomic_sa(i) for i in range(len(self.rads))]
def surface_area(self): r"""Calculate all atomic surface area. :rtype: [float] """ return [self.atomic_sa(i) for i in range(len(self.rads))]
[ "r", "Calculate", "all", "atomic", "surface", "area", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/surface_area/_sasa.py#L87-L92
[ "def", "surface_area", "(", "self", ")", ":", "return", "[", "self", ".", "atomic_sa", "(", "i", ")", "for", "i", "in", "range", "(", "len", "(", "self", ".", "rads", ")", ")", "]" ]
2848b088fd7b6735590242b5e22573babc724f10
test
SurfaceArea.from_mol
r"""Construct SurfaceArea from rdkit Mol type. :type mol: rdkit.Chem.Mol :param mol: input molecule :type conformer: int :param conformer: conformer id :type solvent_radius: float :param solvent_radius: solvent radius :type level: int :param level: mes...
mordred/surface_area/_sasa.py
def from_mol(cls, mol, conformer=-1, solvent_radius=1.4, level=4): r"""Construct SurfaceArea from rdkit Mol type. :type mol: rdkit.Chem.Mol :param mol: input molecule :type conformer: int :param conformer: conformer id :type solvent_radius: float :param solvent...
def from_mol(cls, mol, conformer=-1, solvent_radius=1.4, level=4): r"""Construct SurfaceArea from rdkit Mol type. :type mol: rdkit.Chem.Mol :param mol: input molecule :type conformer: int :param conformer: conformer id :type solvent_radius: float :param solvent...
[ "r", "Construct", "SurfaceArea", "from", "rdkit", "Mol", "type", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/surface_area/_sasa.py#L95-L118
[ "def", "from_mol", "(", "cls", ",", "mol", ",", "conformer", "=", "-", "1", ",", "solvent_radius", "=", "1.4", ",", "level", "=", "4", ")", ":", "rs", "=", "atoms_to_numpy", "(", "lambda", "a", ":", "vdw_radii", "[", "a", ".", "GetAtomicNum", "(", ...
2848b088fd7b6735590242b5e22573babc724f10
test
_Descriptor_from_json
Create Descriptor instance from json dict. Parameters: obj(dict): descriptor dict Returns: Descriptor: descriptor
mordred/_base/__init__.py
def _Descriptor_from_json(self, obj): """Create Descriptor instance from json dict. Parameters: obj(dict): descriptor dict Returns: Descriptor: descriptor """ descs = getattr(self, "_all_descriptors", None) if descs is None: from mordred import descriptors des...
def _Descriptor_from_json(self, obj): """Create Descriptor instance from json dict. Parameters: obj(dict): descriptor dict Returns: Descriptor: descriptor """ descs = getattr(self, "_all_descriptors", None) if descs is None: from mordred import descriptors des...
[ "Create", "Descriptor", "instance", "from", "json", "dict", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/__init__.py#L68-L89
[ "def", "_Descriptor_from_json", "(", "self", ",", "obj", ")", ":", "descs", "=", "getattr", "(", "self", ",", "\"_all_descriptors\"", ",", "None", ")", "if", "descs", "is", "None", ":", "from", "mordred", "import", "descriptors", "descs", "=", "{", "cls", ...
2848b088fd7b6735590242b5e22573babc724f10
test
Result.fill_missing
r"""Replace missing value to "value". Parameters: value: value that missing value is replaced Returns: Result
mordred/_base/result.py
def fill_missing(self, value=np.nan): r"""Replace missing value to "value". Parameters: value: value that missing value is replaced Returns: Result """ return self.__class__( self.mol, [(value if is_missing(v) else v) for v in se...
def fill_missing(self, value=np.nan): r"""Replace missing value to "value". Parameters: value: value that missing value is replaced Returns: Result """ return self.__class__( self.mol, [(value if is_missing(v) else v) for v in se...
[ "r", "Replace", "missing", "value", "to", "value", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/result.py#L33-L47
[ "def", "fill_missing", "(", "self", ",", "value", "=", "np", ".", "nan", ")", ":", "return", "self", ".", "__class__", "(", "self", ".", "mol", ",", "[", "(", "value", "if", "is_missing", "(", "v", ")", "else", "v", ")", "for", "v", "in", "self",...
2848b088fd7b6735590242b5e22573babc724f10
test
Result.drop_missing
r"""Delete missing value. Returns: Result
mordred/_base/result.py
def drop_missing(self): r"""Delete missing value. Returns: Result """ newvalues = [] newdescs = [] for d, v in self.items(): if not is_missing(v): newvalues.append(v) newdescs.append(d) return self.__class...
def drop_missing(self): r"""Delete missing value. Returns: Result """ newvalues = [] newdescs = [] for d, v in self.items(): if not is_missing(v): newvalues.append(v) newdescs.append(d) return self.__class...
[ "r", "Delete", "missing", "value", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/result.py#L49-L63
[ "def", "drop_missing", "(", "self", ")", ":", "newvalues", "=", "[", "]", "newdescs", "=", "[", "]", "for", "d", ",", "v", "in", "self", ".", "items", "(", ")", ":", "if", "not", "is_missing", "(", "v", ")", ":", "newvalues", ".", "append", "(", ...
2848b088fd7b6735590242b5e22573babc724f10
test
Result.items
r"""Get items. Returns: Iterable[(Descriptor, value)]
mordred/_base/result.py
def items(self): r"""Get items. Returns: Iterable[(Descriptor, value)] """ return ((k, v) for k, v in zip(self.keys(), self.values()))
def items(self): r"""Get items. Returns: Iterable[(Descriptor, value)] """ return ((k, v) for k, v in zip(self.keys(), self.values()))
[ "r", "Get", "items", "." ]
mordred-descriptor/mordred
python
https://github.com/mordred-descriptor/mordred/blob/2848b088fd7b6735590242b5e22573babc724f10/mordred/_base/result.py#L65-L72
[ "def", "items", "(", "self", ")", ":", "return", "(", "(", "k", ",", "v", ")", "for", "k", ",", "v", "in", "zip", "(", "self", ".", "keys", "(", ")", ",", "self", ".", "values", "(", ")", ")", ")" ]
2848b088fd7b6735590242b5e22573babc724f10