body_hash
stringlengths
64
64
body
stringlengths
23
109k
docstring
stringlengths
1
57k
path
stringlengths
4
198
name
stringlengths
1
115
repository_name
stringlengths
7
111
repository_stars
float64
0
191k
lang
stringclasses
1 value
body_without_docstring
stringlengths
14
108k
unified
stringlengths
45
133k
8f311820e1356d3db5c2383b545da208d0eeeb17cd5414ca2a770a48de4577ca
def getAdapterType(): '\n Name of the registred Adapter\n ' return 'dc.Reddit.InboundAdapter'
Name of the registred Adapter
src/python/reddit/bs.py
getAdapterType
grongierisc/iris-python-interoperability-template
0
python
def getAdapterType(): '\n \n ' return 'dc.Reddit.InboundAdapter'
def getAdapterType(): '\n \n ' return 'dc.Reddit.InboundAdapter'<|docstring|>Name of the registred Adapter<|endoftext|>
0e5bb894821f8b441e564b0047f1c64c7bd838c64e16d19b9ba0d9bf93e9dcf8
def getAdapterType(): '\n Name of the registred Adapter\n ' return 'Python.RedditInboundAdapter'
Name of the registred Adapter
src/python/reddit/bs.py
getAdapterType
grongierisc/iris-python-interoperability-template
0
python
def getAdapterType(): '\n \n ' return 'Python.RedditInboundAdapter'
def getAdapterType(): '\n \n ' return 'Python.RedditInboundAdapter'<|docstring|>Name of the registred Adapter<|endoftext|>
b7814bb1552a33692706c79102d0d8e1f5aa5f74b51f329f68341e8217c3a633
def __init__(self, size=0, position=(0, 0)): ' instantiation of square with size & position ' self.size = size self.position = position
instantiation of square with size & position
0x06-python-classes/6-square.py
__init__
JRodriguez9510/holbertonschool-higher_level_programming-2
1
python
def __init__(self, size=0, position=(0, 0)): ' ' self.size = size self.position = position
def __init__(self, size=0, position=(0, 0)): ' ' self.size = size self.position = position<|docstring|>instantiation of square with size & position<|endoftext|>
b2951cfe5501c0cf5df5c708d1b15c1dd2c8e491b7d2c18e6fe642d65f432743
@property def size(self): ' returns size variable of Square class instance ' return self.__size
returns size variable of Square class instance
0x06-python-classes/6-square.py
size
JRodriguez9510/holbertonschool-higher_level_programming-2
1
python
@property def size(self): ' ' return self.__size
@property def size(self): ' ' return self.__size<|docstring|>returns size variable of Square class instance<|endoftext|>
acaef25bc72542f0eef4fea8971142ecfa29ae0f6be018b0fc3101ac90da1dca
@size.setter def size(self, value): ' sets size variable of Square class instance ' if (type(value) != int): raise TypeError('size must be an integer') if (value < 0): raise ValueError('size must be >= 0') self.__size = value
sets size variable of Square class instance
0x06-python-classes/6-square.py
size
JRodriguez9510/holbertonschool-higher_level_programming-2
1
python
@size.setter def size(self, value): ' ' if (type(value) != int): raise TypeError('size must be an integer') if (value < 0): raise ValueError('size must be >= 0') self.__size = value
@size.setter def size(self, value): ' ' if (type(value) != int): raise TypeError('size must be an integer') if (value < 0): raise ValueError('size must be >= 0') self.__size = value<|docstring|>sets size variable of Square class instance<|endoftext|>
f3838c64e9f8d8b4bba92fb8a6c07ee48ed374073e425ad0d4b9f52bd8e9c203
@property def position(self): ' returns position variable of Square class instance ' return self.__position
returns position variable of Square class instance
0x06-python-classes/6-square.py
position
JRodriguez9510/holbertonschool-higher_level_programming-2
1
python
@property def position(self): ' ' return self.__position
@property def position(self): ' ' return self.__position<|docstring|>returns position variable of Square class instance<|endoftext|>
382b4b56d47714d41649ae624ff2599ba6adf616fdf3daf1fd426004a51cd462
@position.setter def position(self, value): ' sets position variable of Square class instance ' if ((type(value) != tuple) or (len(value) != 2) or (type(value[0]) != int) or (value[0] < 0) or (type(value[1]) != int) or (value[1] < 0)): raise TypeError('position must be a tuple of 2 positive integers') ...
sets position variable of Square class instance
0x06-python-classes/6-square.py
position
JRodriguez9510/holbertonschool-higher_level_programming-2
1
python
@position.setter def position(self, value): ' ' if ((type(value) != tuple) or (len(value) != 2) or (type(value[0]) != int) or (value[0] < 0) or (type(value[1]) != int) or (value[1] < 0)): raise TypeError('position must be a tuple of 2 positive integers') self.__position = value
@position.setter def position(self, value): ' ' if ((type(value) != tuple) or (len(value) != 2) or (type(value[0]) != int) or (value[0] < 0) or (type(value[1]) != int) or (value[1] < 0)): raise TypeError('position must be a tuple of 2 positive integers') self.__position = value<|docstring|>sets pos...
2f6010a2670a0ad3bdcb1da460fa5e3ed752e1aa883a096a0770ed1ee7c14cdc
def area(self): ' returns area of a square ' return (self.__size ** 2)
returns area of a square
0x06-python-classes/6-square.py
area
JRodriguez9510/holbertonschool-higher_level_programming-2
1
python
def area(self): ' ' return (self.__size ** 2)
def area(self): ' ' return (self.__size ** 2)<|docstring|>returns area of a square<|endoftext|>
5bdef824352c4a71ca04e28ab4a01530f6a429c21e5c3070b00e6cdeed4d30f8
def my_print(self): " prints a square of '#' " if (self.__size == 0): print() elif self.__position: for i in range(self.__position[1]): print() for i in range(self.__size): print((' ' * self.__position[0]), end='') print(('#' * self.__size)) el...
prints a square of '#'
0x06-python-classes/6-square.py
my_print
JRodriguez9510/holbertonschool-higher_level_programming-2
1
python
def my_print(self): " " if (self.__size == 0): print() elif self.__position: for i in range(self.__position[1]): print() for i in range(self.__size): print((' ' * self.__position[0]), end=) print(('#' * self.__size)) else: for i in ran...
def my_print(self): " " if (self.__size == 0): print() elif self.__position: for i in range(self.__position[1]): print() for i in range(self.__size): print((' ' * self.__position[0]), end=) print(('#' * self.__size)) else: for i in ran...
a133e93528f835bcd5aa6c4355a53159c1e3f4fea44f1d665e41aa65cc2f20cd
def _isIterable(maybeIterable): 'Is the argument an iterable object? Taken from the Python Cookbook, recipe 1.12' try: iter(maybeIterable) except: return False else: return True
Is the argument an iterable object? Taken from the Python Cookbook, recipe 1.12
python/codapython.py
_isIterable
ruimaranhao/coda
1
python
def _isIterable(maybeIterable): try: iter(maybeIterable) except: return False else: return True
def _isIterable(maybeIterable): try: iter(maybeIterable) except: return False else: return True<|docstring|>Is the argument an iterable object? Taken from the Python Cookbook, recipe 1.12<|endoftext|>
c0d336392865474ce48d791c1caac4d6d3161d8f792e37b945eb76112dd90541
def _traverse_path(cursor, path, start=0): '\n _traverse_path() traverses the specified path until\n an array with variable indices is encountered or the\n end of the path is reached. It checks field availability\n for records and index ranges for arrays. An exception is\n thrown when a check fails.\...
_traverse_path() traverses the specified path until an array with variable indices is encountered or the end of the path is reached. It checks field availability for records and index ranges for arrays. An exception is thrown when a check fails.
python/codapython.py
_traverse_path
ruimaranhao/coda
1
python
def _traverse_path(cursor, path, start=0): '\n _traverse_path() traverses the specified path until\n an array with variable indices is encountered or the\n end of the path is reached. It checks field availability\n for records and index ranges for arrays. An exception is\n thrown when a check fails.\...
def _traverse_path(cursor, path, start=0): '\n _traverse_path() traverses the specified path until\n an array with variable indices is encountered or the\n end of the path is reached. It checks field availability\n for records and index ranges for arrays. An exception is\n thrown when a check fails.\...
9f1c7f08934de8a158ea5ec55ca3b2a0e7024fff0ef5136c3b8608a915c15055
def _fetch_intermediate_array(cursor, path, pathIndex=0): '\n _fetch_intermediate_array calls _traverse_path() to traverse the path\n until the end is reached or an intermediate array is encountered.\n if the end of the path is reached, then we need to fetch everything\n from that point on (i.e. the who...
_fetch_intermediate_array calls _traverse_path() to traverse the path until the end is reached or an intermediate array is encountered. if the end of the path is reached, then we need to fetch everything from that point on (i.e. the whole subtree). in this case _fetch_subtree() is called. otherwise _fetch_intermediate_...
python/codapython.py
_fetch_intermediate_array
ruimaranhao/coda
1
python
def _fetch_intermediate_array(cursor, path, pathIndex=0): '\n _fetch_intermediate_array calls _traverse_path() to traverse the path\n until the end is reached or an intermediate array is encountered.\n if the end of the path is reached, then we need to fetch everything\n from that point on (i.e. the who...
def _fetch_intermediate_array(cursor, path, pathIndex=0): '\n _fetch_intermediate_array calls _traverse_path() to traverse the path\n until the end is reached or an intermediate array is encountered.\n if the end of the path is reached, then we need to fetch everything\n from that point on (i.e. the who...
6e2762f25d65571a2d0fa92b2dbae9d79e39f7c781d70f36aff752749fd425ec
def _fetch_object_array(cursor): '\n _fetch_object_array() fetches arrays with a basetype that is not considered\n scalar.\n ' arrayShape = cursor_get_array_dim(cursor) if (len(arrayShape) == 0): arrayShape.append(1) array = numpy.empty(dtype=object, shape=arrayShape) cursor_goto_fi...
_fetch_object_array() fetches arrays with a basetype that is not considered scalar.
python/codapython.py
_fetch_object_array
ruimaranhao/coda
1
python
def _fetch_object_array(cursor): '\n _fetch_object_array() fetches arrays with a basetype that is not considered\n scalar.\n ' arrayShape = cursor_get_array_dim(cursor) if (len(arrayShape) == 0): arrayShape.append(1) array = numpy.empty(dtype=object, shape=arrayShape) cursor_goto_fi...
def _fetch_object_array(cursor): '\n _fetch_object_array() fetches arrays with a basetype that is not considered\n scalar.\n ' arrayShape = cursor_get_array_dim(cursor) if (len(arrayShape) == 0): arrayShape.append(1) array = numpy.empty(dtype=object, shape=arrayShape) cursor_goto_fi...
1f38df00fd6c7f86384900bce5298fcb15a7bb0309631deae8c829628f397274
def _fetch_subtree(cursor): '\n _fetch_subtree() recursively fetches all data starting from a specified\n position. this function is commonly called when path traversal reaches the\n end of the path. from that point on _all_ data has to be fetched, i.e. no\n array slicing or fetching of single specified...
_fetch_subtree() recursively fetches all data starting from a specified position. this function is commonly called when path traversal reaches the end of the path. from that point on _all_ data has to be fetched, i.e. no array slicing or fetching of single specified fields has to be performed. note: unavailable fields ...
python/codapython.py
_fetch_subtree
ruimaranhao/coda
1
python
def _fetch_subtree(cursor): '\n _fetch_subtree() recursively fetches all data starting from a specified\n position. this function is commonly called when path traversal reaches the\n end of the path. from that point on _all_ data has to be fetched, i.e. no\n array slicing or fetching of single specified...
def _fetch_subtree(cursor): '\n _fetch_subtree() recursively fetches all data starting from a specified\n position. this function is commonly called when path traversal reaches the\n end of the path. from that point on _all_ data has to be fetched, i.e. no\n array slicing or fetching of single specified...
821f48e1b45e9fda4fe0dd9bef32a9514f4c4cfb92bdcde7176f6770bd6e81f1
def _get_cursor(start): '\n _get_cursor() takes a valid CODA product file handle _or_ a valid CODA\n cursor as input and returns a new cursor object.\n ' if (not isinstance(start, Cursor)): cursor = Cursor() cursor_set_product(cursor, start) return cursor else: retur...
_get_cursor() takes a valid CODA product file handle _or_ a valid CODA cursor as input and returns a new cursor object.
python/codapython.py
_get_cursor
ruimaranhao/coda
1
python
def _get_cursor(start): '\n _get_cursor() takes a valid CODA product file handle _or_ a valid CODA\n cursor as input and returns a new cursor object.\n ' if (not isinstance(start, Cursor)): cursor = Cursor() cursor_set_product(cursor, start) return cursor else: retur...
def _get_cursor(start): '\n _get_cursor() takes a valid CODA product file handle _or_ a valid CODA\n cursor as input and returns a new cursor object.\n ' if (not isinstance(start, Cursor)): cursor = Cursor() cursor_set_product(cursor, start) return cursor else: retur...
c2454c3e81ea02fb5d7f5faab02a71647991566b36342465faf0999eaa36765b
def get_attributes(start, *path): '\n Retrieve the attributes of the specified data item.\n\n This function returns a Record containing the attributes of the\n specified data item.\n\n The start argument must be a valid CODA file handle that was\n retrieved with coda.open() _or_ a valid CODA cursor. ...
Retrieve the attributes of the specified data item. This function returns a Record containing the attributes of the specified data item. The start argument must be a valid CODA file handle that was retrieved with coda.open() _or_ a valid CODA cursor. If the start argument is a cursor, then the specified path is trave...
python/codapython.py
get_attributes
ruimaranhao/coda
1
python
def get_attributes(start, *path): '\n Retrieve the attributes of the specified data item.\n\n This function returns a Record containing the attributes of the\n specified data item.\n\n The start argument must be a valid CODA file handle that was\n retrieved with coda.open() _or_ a valid CODA cursor. ...
def get_attributes(start, *path): '\n Retrieve the attributes of the specified data item.\n\n This function returns a Record containing the attributes of the\n specified data item.\n\n The start argument must be a valid CODA file handle that was\n retrieved with coda.open() _or_ a valid CODA cursor. ...
57b78814acd8310b34e42476a98734e45fecd4d20f1e87a9defdaf6c71d79f11
def get_description(start, *path): '\n Retrieve the description of a field.\n\n This function returns a string containing the description in the\n product format definition of the specified data item.\n\n The start argument must be a valid CODA file handle that was\n retrieved with coda.open() _or_ a...
Retrieve the description of a field. This function returns a string containing the description in the product format definition of the specified data item. The start argument must be a valid CODA file handle that was retrieved with coda.open() _or_ a valid CODA cursor. If the start argument is a cursor, then the spec...
python/codapython.py
get_description
ruimaranhao/coda
1
python
def get_description(start, *path): '\n Retrieve the description of a field.\n\n This function returns a string containing the description in the\n product format definition of the specified data item.\n\n The start argument must be a valid CODA file handle that was\n retrieved with coda.open() _or_ a...
def get_description(start, *path): '\n Retrieve the description of a field.\n\n This function returns a string containing the description in the\n product format definition of the specified data item.\n\n The start argument must be a valid CODA file handle that was\n retrieved with coda.open() _or_ a...
d628f03a2af0839a6f05c8861651c7d9eaca4c1d15ae868aec2ded8a5394b96c
def fetch(start, *path): "\n Retrieve data from a product file.\n\n Reads the specified data item from the product file. Instead\n of just reading individual values, like strings, integers, doubles,\n etc. it is also possible to read complete arrays or records of data.\n For instance if 'pf' is a pro...
Retrieve data from a product file. Reads the specified data item from the product file. Instead of just reading individual values, like strings, integers, doubles, etc. it is also possible to read complete arrays or records of data. For instance if 'pf' is a product file handle obtained by calling coda.open(), then yo...
python/codapython.py
fetch
ruimaranhao/coda
1
python
def fetch(start, *path): "\n Retrieve data from a product file.\n\n Reads the specified data item from the product file. Instead\n of just reading individual values, like strings, integers, doubles,\n etc. it is also possible to read complete arrays or records of data.\n For instance if 'pf' is a pro...
def fetch(start, *path): "\n Retrieve data from a product file.\n\n Reads the specified data item from the product file. Instead\n of just reading individual values, like strings, integers, doubles,\n etc. it is also possible to read complete arrays or records of data.\n For instance if 'pf' is a pro...
b91e60f465ddcdc76cef0f7b36edd4ed67e0c113ca3c883f8ca15317089545e8
def get_field_available(start, *path): '\n Find out whether a dynamically available record field is available or not.\n\n This function returns True if the record field is available and False\n if it is not. The last item of the path argument should point to a\n record field. An empty path is considered...
Find out whether a dynamically available record field is available or not. This function returns True if the record field is available and False if it is not. The last item of the path argument should point to a record field. An empty path is considered an error, even if the start argument is a CODA cursor. The start...
python/codapython.py
get_field_available
ruimaranhao/coda
1
python
def get_field_available(start, *path): '\n Find out whether a dynamically available record field is available or not.\n\n This function returns True if the record field is available and False\n if it is not. The last item of the path argument should point to a\n record field. An empty path is considered...
def get_field_available(start, *path): '\n Find out whether a dynamically available record field is available or not.\n\n This function returns True if the record field is available and False\n if it is not. The last item of the path argument should point to a\n record field. An empty path is considered...
97c3c4521b68bcf3b034d23ab4795a5d0b3f909ef356b0585b2ab4ef3db2e7a8
def get_field_count(start, *path): '\n Retrieve the number of fields in a record.\n\n This function returns the number of fields in the Record instance\n that will be returned if coda.fetch() is called with the same\n arguments. The last node on the path should reference a record.\n\n The start argum...
Retrieve the number of fields in a record. This function returns the number of fields in the Record instance that will be returned if coda.fetch() is called with the same arguments. The last node on the path should reference a record. The start argument must be a valid CODA file handle that was retrieved with coda.op...
python/codapython.py
get_field_count
ruimaranhao/coda
1
python
def get_field_count(start, *path): '\n Retrieve the number of fields in a record.\n\n This function returns the number of fields in the Record instance\n that will be returned if coda.fetch() is called with the same\n arguments. The last node on the path should reference a record.\n\n The start argum...
def get_field_count(start, *path): '\n Retrieve the number of fields in a record.\n\n This function returns the number of fields in the Record instance\n that will be returned if coda.fetch() is called with the same\n arguments. The last node on the path should reference a record.\n\n The start argum...
614041af9c447b0c2e0afa5837fe7a25a2995795983c757f350bd0ca2d0196b4
def get_field_names(start, *path): '\n Retrieve the names of the fields in a record.\n\n This function returns the names of the fields of the Record instance\n that will be returned if coda.fetch() is called with the same\n arguments. The last node on the path should reference a record.\n\n The start...
Retrieve the names of the fields in a record. This function returns the names of the fields of the Record instance that will be returned if coda.fetch() is called with the same arguments. The last node on the path should reference a record. The start argument must be a valid CODA file handle that was retrieved with c...
python/codapython.py
get_field_names
ruimaranhao/coda
1
python
def get_field_names(start, *path): '\n Retrieve the names of the fields in a record.\n\n This function returns the names of the fields of the Record instance\n that will be returned if coda.fetch() is called with the same\n arguments. The last node on the path should reference a record.\n\n The start...
def get_field_names(start, *path): '\n Retrieve the names of the fields in a record.\n\n This function returns the names of the fields of the Record instance\n that will be returned if coda.fetch() is called with the same\n arguments. The last node on the path should reference a record.\n\n The start...
13ccad25f457591df6e0dfa6b749801d8c77a46794e9d83d4aa7fa15a6fc94be
def get_size(start, *path): '\n Retrieve the dimensions of the specified array.\n\n This function returns the dimensions of the array that will be\n returned if coda.fetch() is called with the same arguments. Thus,\n you can check what the dimensions of an array are without having\n to retrieve the e...
Retrieve the dimensions of the specified array. This function returns the dimensions of the array that will be returned if coda.fetch() is called with the same arguments. Thus, you can check what the dimensions of an array are without having to retrieve the entire array with coda.fetch(). The last node on the path sho...
python/codapython.py
get_size
ruimaranhao/coda
1
python
def get_size(start, *path): '\n Retrieve the dimensions of the specified array.\n\n This function returns the dimensions of the array that will be\n returned if coda.fetch() is called with the same arguments. Thus,\n you can check what the dimensions of an array are without having\n to retrieve the e...
def get_size(start, *path): '\n Retrieve the dimensions of the specified array.\n\n This function returns the dimensions of the array that will be\n returned if coda.fetch() is called with the same arguments. Thus,\n you can check what the dimensions of an array are without having\n to retrieve the e...
a7e4794dbc99857021f9039c3f93fc2dbc47a37e2bb2a53d8b60e870a3fb0e0a
def time_to_string(times): "\n Convert a number of seconds since 2000-01-01 (TAI) to a human readable\n form.\n\n This function turns a double value specifying a number of seconds\n since 2000-01-01 into a string containing the date and time in a human\n readable form. For example:\n\n time_to_str...
Convert a number of seconds since 2000-01-01 (TAI) to a human readable form. This function turns a double value specifying a number of seconds since 2000-01-01 into a string containing the date and time in a human readable form. For example: time_to_string(68260079.0) would return the string '2002-03-01 01:07:59.000...
python/codapython.py
time_to_string
ruimaranhao/coda
1
python
def time_to_string(times): "\n Convert a number of seconds since 2000-01-01 (TAI) to a human readable\n form.\n\n This function turns a double value specifying a number of seconds\n since 2000-01-01 into a string containing the date and time in a human\n readable form. For example:\n\n time_to_str...
def time_to_string(times): "\n Convert a number of seconds since 2000-01-01 (TAI) to a human readable\n form.\n\n This function turns a double value specifying a number of seconds\n since 2000-01-01 into a string containing the date and time in a human\n readable form. For example:\n\n time_to_str...
177fa4aaaad7459899859a16b1a9f0023196fe49f6f7205171acfa705d6b322b
def time_to_utcstring(times): "\n Convert a TAI number of seconds since 2000-01-01 (TAI) to a human readable\n form in UTC format.\n\n This function turns a double value specifying a number of TAI seconds\n since 2000-01-01 into a string containing the UTC date and time in a human\n readable form (us...
Convert a TAI number of seconds since 2000-01-01 (TAI) to a human readable form in UTC format. This function turns a double value specifying a number of TAI seconds since 2000-01-01 into a string containing the UTC date and time in a human readable form (using proper leap second correction in the conversion). For exam...
python/codapython.py
time_to_utcstring
ruimaranhao/coda
1
python
def time_to_utcstring(times): "\n Convert a TAI number of seconds since 2000-01-01 (TAI) to a human readable\n form in UTC format.\n\n This function turns a double value specifying a number of TAI seconds\n since 2000-01-01 into a string containing the UTC date and time in a human\n readable form (us...
def time_to_utcstring(times): "\n Convert a TAI number of seconds since 2000-01-01 (TAI) to a human readable\n form in UTC format.\n\n This function turns a double value specifying a number of TAI seconds\n since 2000-01-01 into a string containing the UTC date and time in a human\n readable form (us...
070f154b6a405f98b2ab73aebd51a6987ea7a5da89613e9e6fb935fcd2994ae1
def get_unit(start, *path): '\n Retrieve unit information.\n\n This function returns a string containing the unit information\n which is stored in the product format definition for the specified data\n item.\n\n The start argument must be a valid CODA file handle that was\n retrieved with coda.ope...
Retrieve unit information. This function returns a string containing the unit information which is stored in the product format definition for the specified data item. The start argument must be a valid CODA file handle that was retrieved with coda.open() _or_ a valid CODA cursor. If the start argument is a cursor, t...
python/codapython.py
get_unit
ruimaranhao/coda
1
python
def get_unit(start, *path): '\n Retrieve unit information.\n\n This function returns a string containing the unit information\n which is stored in the product format definition for the specified data\n item.\n\n The start argument must be a valid CODA file handle that was\n retrieved with coda.ope...
def get_unit(start, *path): '\n Retrieve unit information.\n\n This function returns a string containing the unit information\n which is stored in the product format definition for the specified data\n item.\n\n The start argument must be a valid CODA file handle that was\n retrieved with coda.ope...
1f559132ab9d7927a44dff300a78ff3db424e8bb900234d9be00f74d0bdeac2f
def _registerField(self, name, data): '\n _registerField() is a private method that is used to populate\n the Record with fields read from the product file.\n ' self._registeredFields.append(name) self.__setattr__(name, data)
_registerField() is a private method that is used to populate the Record with fields read from the product file.
python/codapython.py
_registerField
ruimaranhao/coda
1
python
def _registerField(self, name, data): '\n _registerField() is a private method that is used to populate\n the Record with fields read from the product file.\n ' self._registeredFields.append(name) self.__setattr__(name, data)
def _registerField(self, name, data): '\n _registerField() is a private method that is used to populate\n the Record with fields read from the product file.\n ' self._registeredFields.append(name) self.__setattr__(name, data)<|docstring|>_registerField() is a private method that is used...
a80d198f4355902eb9610da1eeb9fe6d81b25ca828529ed5db701378cf9048e5
def __len__(self): '\n Return the number of fields in this record.\n ' return len(self._registeredFields)
Return the number of fields in this record.
python/codapython.py
__len__
ruimaranhao/coda
1
python
def __len__(self): '\n \n ' return len(self._registeredFields)
def __len__(self): '\n \n ' return len(self._registeredFields)<|docstring|>Return the number of fields in this record.<|endoftext|>
dba0ef231c43ea9f17218383f8b0dcfb3d22f6d87511fa8aaa6b5151e231def7
def __repr__(self): "\n Return the canonical string representation of the instance.\n\n This is always the identifying string '<coda record>'.\n " return '<coda record>'
Return the canonical string representation of the instance. This is always the identifying string '<coda record>'.
python/codapython.py
__repr__
ruimaranhao/coda
1
python
def __repr__(self): "\n Return the canonical string representation of the instance.\n\n This is always the identifying string '<coda record>'.\n " return '<coda record>'
def __repr__(self): "\n Return the canonical string representation of the instance.\n\n This is always the identifying string '<coda record>'.\n " return '<coda record>'<|docstring|>Return the canonical string representation of the instance. This is always the identifying string '<coda rec...
315d10b12b25978b9edfb875e6370223b7f9a8e93655b2fbf3e8fd738b06db3b
def __str__(self): '\n Print type/structure information for this record.\n\n The output format is identical to how MATLAB shows structure information, except\n that for now a fixed padding value of 32 is used, and that the precision parameters\n for some of the floats will differ.\n ...
Print type/structure information for this record. The output format is identical to how MATLAB shows structure information, except that for now a fixed padding value of 32 is used, and that the precision parameters for some of the floats will differ.
python/codapython.py
__str__
ruimaranhao/coda
1
python
def __str__(self): '\n Print type/structure information for this record.\n\n The output format is identical to how MATLAB shows structure information, except\n that for now a fixed padding value of 32 is used, and that the precision parameters\n for some of the floats will differ.\n ...
def __str__(self): '\n Print type/structure information for this record.\n\n The output format is identical to how MATLAB shows structure information, except\n that for now a fixed padding value of 32 is used, and that the precision parameters\n for some of the floats will differ.\n ...
c0e310be3bd6c55d67fb64c3b5a3b5f62a77a7b56e7f69d448a2516c1a1c3e75
@staticmethod def review_to_sentences(review, tokenizer, remove_stopwords=False): '\n This function splits a review into parsed sentences. \n Returns a list of sentences, where each sentence is a list of words\n ' raw_sentences = tokenizer.tokenize(review.decode('utf8').strip()) sentenc...
This function splits a review into parsed sentences. Returns a list of sentences, where each sentence is a list of words
sentiment_analysis_in_minutes/sentiment_analysis_in_minutes.py
review_to_sentences
bbueno5000/SentimentAnalysisInMinutes
0
python
@staticmethod def review_to_sentences(review, tokenizer, remove_stopwords=False): '\n This function splits a review into parsed sentences. \n Returns a list of sentences, where each sentence is a list of words\n ' raw_sentences = tokenizer.tokenize(review.decode('utf8').strip()) sentenc...
@staticmethod def review_to_sentences(review, tokenizer, remove_stopwords=False): '\n This function splits a review into parsed sentences. \n Returns a list of sentences, where each sentence is a list of words\n ' raw_sentences = tokenizer.tokenize(review.decode('utf8').strip()) sentenc...
1c34a4d2e92f727847da6c650bffb8efdbe3780630a2e374c3c6e9f456e53eeb
@staticmethod def review_to_wordlist(review, remove_stopwords=False): '\n This function converts a document to a sequence of words,\n optionally removing stop words.\n Returns a list of words.\n ' review_text = bs4.BeautifulSoup(review).get_text() review_text = re.sub('[^a-zA-Z]'...
This function converts a document to a sequence of words, optionally removing stop words. Returns a list of words.
sentiment_analysis_in_minutes/sentiment_analysis_in_minutes.py
review_to_wordlist
bbueno5000/SentimentAnalysisInMinutes
0
python
@staticmethod def review_to_wordlist(review, remove_stopwords=False): '\n This function converts a document to a sequence of words,\n optionally removing stop words.\n Returns a list of words.\n ' review_text = bs4.BeautifulSoup(review).get_text() review_text = re.sub('[^a-zA-Z]'...
@staticmethod def review_to_wordlist(review, remove_stopwords=False): '\n This function converts a document to a sequence of words,\n optionally removing stop words.\n Returns a list of words.\n ' review_text = bs4.BeautifulSoup(review).get_text() review_text = re.sub('[^a-zA-Z]'...
231e88e406e9356d44fd1bf8aa84d9060b6c2b20441cf20897fe07dfde35bcd2
def __init__(self): '\n DOCSTRING\n ' train = pandas.read_csv('data\\ulabeledTrainData.tsv', header=0, delimiter='\t', quoting=3) test = pandas.read_csv('data\\testData.tsv', header=0, delimiter='\t', quoting=3) nltk.download() self.clean_train_reviews = list() for i in range(len(t...
DOCSTRING
sentiment_analysis_in_minutes/sentiment_analysis_in_minutes.py
__init__
bbueno5000/SentimentAnalysisInMinutes
0
python
def __init__(self): '\n \n ' train = pandas.read_csv('data\\ulabeledTrainData.tsv', header=0, delimiter='\t', quoting=3) test = pandas.read_csv('data\\testData.tsv', header=0, delimiter='\t', quoting=3) nltk.download() self.clean_train_reviews = list() for i in range(len(train['rev...
def __init__(self): '\n \n ' train = pandas.read_csv('data\\ulabeledTrainData.tsv', header=0, delimiter='\t', quoting=3) test = pandas.read_csv('data\\testData.tsv', header=0, delimiter='\t', quoting=3) nltk.download() self.clean_train_reviews = list() for i in range(len(train['rev...
97b5dbbfc4d343be71fa4e8e154ae6bc796fb1d408c9b2db8090a7243f7e48a7
def __call__(self): '\n DOCSTRING\n ' vectorizer = sklearn.feature_extraction.text.CountVectorizer(analyzer='word', tokenizer=None, preprocessor=None, stop_words=None, max_features=5000) train_data_features = vectorizer.fit_transform(self.clean_train_reviews) train_data_features = train_da...
DOCSTRING
sentiment_analysis_in_minutes/sentiment_analysis_in_minutes.py
__call__
bbueno5000/SentimentAnalysisInMinutes
0
python
def __call__(self): '\n \n ' vectorizer = sklearn.feature_extraction.text.CountVectorizer(analyzer='word', tokenizer=None, preprocessor=None, stop_words=None, max_features=5000) train_data_features = vectorizer.fit_transform(self.clean_train_reviews) train_data_features = train_data_featur...
def __call__(self): '\n \n ' vectorizer = sklearn.feature_extraction.text.CountVectorizer(analyzer='word', tokenizer=None, preprocessor=None, stop_words=None, max_features=5000) train_data_features = vectorizer.fit_transform(self.clean_train_reviews) train_data_features = train_data_featur...
10301943b4e4cf2dffb3b0d1246d4fad96a00d030f3108b29831572f40bef7b2
def match(edge, aidx=None, bidx=None, **kwargs): '\n Apply a composite CUDA matcher and ratio check. If this method is used,\n no additional ratio check is necessary and no symmetry check is required.\n The ratio check is embedded on the cuda side and returned as an\n ambiguity value. In testing symme...
Apply a composite CUDA matcher and ratio check. If this method is used, no additional ratio check is necessary and no symmetry check is required. The ratio check is embedded on the cuda side and returned as an ambiguity value. In testing symmetry is not required as it is expensive without significant gain in accuracy...
autocnet/matcher/cuda_matcher.py
match
europlanet-gmap/autocnet
17
python
def match(edge, aidx=None, bidx=None, **kwargs): '\n Apply a composite CUDA matcher and ratio check. If this method is used,\n no additional ratio check is necessary and no symmetry check is required.\n The ratio check is embedded on the cuda side and returned as an\n ambiguity value. In testing symme...
def match(edge, aidx=None, bidx=None, **kwargs): '\n Apply a composite CUDA matcher and ratio check. If this method is used,\n no additional ratio check is necessary and no symmetry check is required.\n The ratio check is embedded on the cuda side and returned as an\n ambiguity value. In testing symme...
d78c22a69cdf7149865dd72f2993b363e6cab5b58fba61605396d3ad1501ab69
def t_PARAM(t): '\\[[A-Z:\\s0-9#\\-]+\\]' global separators split_parameter = re.search('([A-Z\\-]+)\\s*:\\s*([A-Z0-9#]+)', t.value[1:(- 1)]) t.value = (split_parameter.group(1), split_parameter.group(2)) if (t.value[0] in separators): t.type = 'SEPARATOR' return t
\[[A-Z:\s0-9#\-]+\]
open_anafi/lib/ply/parser_anafi.py
t_PARAM
Cour-des-comptes/open-anafi-backend
7
python
def t_PARAM(t): '\\[[A-Z:\\s0-9#\\-]+\\]' global separators split_parameter = re.search('([A-Z\\-]+)\\s*:\\s*([A-Z0-9#]+)', t.value[1:(- 1)]) t.value = (split_parameter.group(1), split_parameter.group(2)) if (t.value[0] in separators): t.type = 'SEPARATOR' return t
def t_PARAM(t): '\\[[A-Z:\\s0-9#\\-]+\\]' global separators split_parameter = re.search('([A-Z\\-]+)\\s*:\\s*([A-Z0-9#]+)', t.value[1:(- 1)]) t.value = (split_parameter.group(1), split_parameter.group(2)) if (t.value[0] in separators): t.type = 'SEPARATOR' return t<|docstring|>\[[A-Z:\s0...
06bd88d575ead3e9559c3fccfaa4b6a8511c8fcfb479959705d8950f77d8f54f
def t_NUMBER(t): '\\d+' t.value = int(t.value) return t
\d+
open_anafi/lib/ply/parser_anafi.py
t_NUMBER
Cour-des-comptes/open-anafi-backend
7
python
def t_NUMBER(t): '\' t.value = int(t.value) return t
def t_NUMBER(t): '\' t.value = int(t.value) return t<|docstring|>\d+<|endoftext|>
8f26aedf59a6f3ee5a67a01a0e491b2ebe81b6555095cb8db011798c78736665
def t_newline(t): '\\n+' t.lexer.lineno += t.value.count('\n')
\n+
open_anafi/lib/ply/parser_anafi.py
t_newline
Cour-des-comptes/open-anafi-backend
7
python
def t_newline(t): '\' t.lexer.lineno += t.value.count('\n')
def t_newline(t): '\' t.lexer.lineno += t.value.count('\n')<|docstring|>\n+<|endoftext|>
cd24adb11a709efcf7bf9b317b2517649a0c75f009305d2fb5c72030b81dc225
def p_bloc(p): '\n start : expression\n | expression separator\n | expression separator start\n ' global return_values p[1] = {'tree': p[1], 'exmin': None, 'exmax': None, 'typeBudget': None, 'CAL': None, 'TE': None} if (len(p) > 2): for separator in p[2]: if (...
start : expression | expression separator | expression separator start
open_anafi/lib/ply/parser_anafi.py
p_bloc
Cour-des-comptes/open-anafi-backend
7
python
def p_bloc(p): '\n start : expression\n | expression separator\n | expression separator start\n ' global return_values p[1] = {'tree': p[1], 'exmin': None, 'exmax': None, 'typeBudget': None, 'CAL': None, 'TE': None} if (len(p) > 2): for separator in p[2]: if (...
def p_bloc(p): '\n start : expression\n | expression separator\n | expression separator start\n ' global return_values p[1] = {'tree': p[1], 'exmin': None, 'exmax': None, 'typeBudget': None, 'CAL': None, 'TE': None} if (len(p) > 2): for separator in p[2]: if (...
9d2845314eadf3e8f629ea51348d6e56894d42f8c0dd334bcd2e685aa09b7012
def p_expression_binop(p): 'expression : expression PLUS expression\n | expression MINUS expression\n | expression TIMES expression\n | expression DIVIDE expression\n | expression POW expression\n ' left_child = p[1] right_...
expression : expression PLUS expression | expression MINUS expression | expression TIMES expression | expression DIVIDE expression | expression POW expression
open_anafi/lib/ply/parser_anafi.py
p_expression_binop
Cour-des-comptes/open-anafi-backend
7
python
def p_expression_binop(p): 'expression : expression PLUS expression\n | expression MINUS expression\n | expression TIMES expression\n | expression DIVIDE expression\n | expression POW expression\n ' left_child = p[1] right_...
def p_expression_binop(p): 'expression : expression PLUS expression\n | expression MINUS expression\n | expression TIMES expression\n | expression DIVIDE expression\n | expression POW expression\n ' left_child = p[1] right_...
aa9cc64c73f7bce7cc992c15688ea5fc2988edc4e0b1f7a52e5e36d3df0756be
def p_expression_parameter(p): '\n expression : expression parameter\n ' p[0] = p[1]
expression : expression parameter
open_anafi/lib/ply/parser_anafi.py
p_expression_parameter
Cour-des-comptes/open-anafi-backend
7
python
def p_expression_parameter(p): '\n \n ' p[0] = p[1]
def p_expression_parameter(p): '\n \n ' p[0] = p[1]<|docstring|>expression : expression parameter<|endoftext|>
ef2a6d8ae3f77cfd8c8897acf9cb55f706c6a4aa68869e40c5dd8d00262911de
def p_expression_uminus(p): 'expression : MINUS expression %prec UMINUS' p[2].minus = True p[0] = p[2]
expression : MINUS expression %prec UMINUS
open_anafi/lib/ply/parser_anafi.py
p_expression_uminus
Cour-des-comptes/open-anafi-backend
7
python
def p_expression_uminus(p): p[2].minus = True p[0] = p[2]
def p_expression_uminus(p): p[2].minus = True p[0] = p[2]<|docstring|>expression : MINUS expression %prec UMINUS<|endoftext|>
258991c46b0c2f132897ccc07ef5101bf313dbe8b6658de93724bc844100cced
def p_expression_uplus(p): 'expression : PLUS expression %prec UPLUS' p[0] = p[2]
expression : PLUS expression %prec UPLUS
open_anafi/lib/ply/parser_anafi.py
p_expression_uplus
Cour-des-comptes/open-anafi-backend
7
python
def p_expression_uplus(p): p[0] = p[2]
def p_expression_uplus(p): p[0] = p[2]<|docstring|>expression : PLUS expression %prec UPLUS<|endoftext|>
ab7737d71f215cc5be58919104472d82db10ed513baf720f38ed005cf232ce27
def p_expression_group(p): 'expression : LPAREN expression RPAREN' p[0] = p[2]
expression : LPAREN expression RPAREN
open_anafi/lib/ply/parser_anafi.py
p_expression_group
Cour-des-comptes/open-anafi-backend
7
python
def p_expression_group(p): p[0] = p[2]
def p_expression_group(p): p[0] = p[2]<|docstring|>expression : LPAREN expression RPAREN<|endoftext|>
212997d914c7c6aa7c4ffc9c06a66c2fcec7b55dad186eb600b1dd83ea54d0ce
def p_expression_number(p): 'expression : NUMBER' p[0] = p[1]
expression : NUMBER
open_anafi/lib/ply/parser_anafi.py
p_expression_number
Cour-des-comptes/open-anafi-backend
7
python
def p_expression_number(p): p[0] = p[1]
def p_expression_number(p): p[0] = p[1]<|docstring|>expression : NUMBER<|endoftext|>
f3f14c8e9d280d393173dba2038e62b641c61503fd8802fefb8f8bb3d56eb031
def p_expression_indicator(p): 'expression : INDICATOR' global indicators indic = Indic(p[1], None, False) indicators.append(indic) p[0] = indic
expression : INDICATOR
open_anafi/lib/ply/parser_anafi.py
p_expression_indicator
Cour-des-comptes/open-anafi-backend
7
python
def p_expression_indicator(p): global indicators indic = Indic(p[1], None, False) indicators.append(indic) p[0] = indic
def p_expression_indicator(p): global indicators indic = Indic(p[1], None, False) indicators.append(indic) p[0] = indic<|docstring|>expression : INDICATOR<|endoftext|>
150dfb9cf3a73d9e40c3f4c299f3afa65711a40bdacba7cc47f213df3a4b80bc
def p_expression_variable(p): 'expression : VARIABLE' global variables var = Var(p[1], None, False) variables.append(var) p[0] = var
expression : VARIABLE
open_anafi/lib/ply/parser_anafi.py
p_expression_variable
Cour-des-comptes/open-anafi-backend
7
python
def p_expression_variable(p): global variables var = Var(p[1], None, False) variables.append(var) p[0] = var
def p_expression_variable(p): global variables var = Var(p[1], None, False) variables.append(var) p[0] = var<|docstring|>expression : VARIABLE<|endoftext|>
46f6a2e02e8df72f87db9a2c1b6df78a025f220fca28472da48a35f26bc65457
def p_expression_population(p): 'expression : POP' p[0] = p[1]
expression : POP
open_anafi/lib/ply/parser_anafi.py
p_expression_population
Cour-des-comptes/open-anafi-backend
7
python
def p_expression_population(p): p[0] = p[1]
def p_expression_population(p): p[0] = p[1]<|docstring|>expression : POP<|endoftext|>
f40838d8d8943cfa10bc1210984a0aa7dd69a1fa8f7da27687d07d977e66c04e
def p_separator(p): '\n separator : SEPARATOR separator\n | SEPARATOR\n ' if (len(p) == 3): if (type(p[2]) is list): p[2].append(p[1]) p[0] = p[2] else: p[0] = [p[1]]
separator : SEPARATOR separator | SEPARATOR
open_anafi/lib/ply/parser_anafi.py
p_separator
Cour-des-comptes/open-anafi-backend
7
python
def p_separator(p): '\n separator : SEPARATOR separator\n | SEPARATOR\n ' if (len(p) == 3): if (type(p[2]) is list): p[2].append(p[1]) p[0] = p[2] else: p[0] = [p[1]]
def p_separator(p): '\n separator : SEPARATOR separator\n | SEPARATOR\n ' if (len(p) == 3): if (type(p[2]) is list): p[2].append(p[1]) p[0] = p[2] else: p[0] = [p[1]]<|docstring|>separator : SEPARATOR separator | SEPARATOR<|endoftext|>
84d226352515f0fab6751eeac9c809724f72be4b30002b67ffb37e911567f2d7
def p_parameter(p): 'parameter : PARAM' global variables global indicators if (p[1][0] == 'TA'): for variable in variables: variable.type_solde = p[1][1] variables = [] elif (p[1][0] == 'OS'): indicators[(len(indicators) - 1)].offset = p[1][1] indicators =...
parameter : PARAM
open_anafi/lib/ply/parser_anafi.py
p_parameter
Cour-des-comptes/open-anafi-backend
7
python
def p_parameter(p): global variables global indicators if (p[1][0] == 'TA'): for variable in variables: variable.type_solde = p[1][1] variables = [] elif (p[1][0] == 'OS'): indicators[(len(indicators) - 1)].offset = p[1][1] indicators = [] p[0] = p[1]
def p_parameter(p): global variables global indicators if (p[1][0] == 'TA'): for variable in variables: variable.type_solde = p[1][1] variables = [] elif (p[1][0] == 'OS'): indicators[(len(indicators) - 1)].offset = p[1][1] indicators = [] p[0] = p[1]...
61675e4ec8ad7db8328db2c19587cd26b6961e1c5df6000f4ac2cfa17300a971
def to_json(self) -> Mapping[(str, str)]: ' Converts an income and expense item to a dictionary for serialization as a JSON object\n\n This method also converts the income and expense values from centicents to dollar amounts represented as\n strings.\n\n ' return {'spent': f"${format((Decim...
Converts an income and expense item to a dictionary for serialization as a JSON object This method also converts the income and expense values from centicents to dollar amounts represented as strings.
capitalone/_income_and_expense.py
to_json
David-Noble-at-work/capitalone-exercise
1
python
def to_json(self) -> Mapping[(str, str)]: ' Converts an income and expense item to a dictionary for serialization as a JSON object\n\n This method also converts the income and expense values from centicents to dollar amounts represented as\n strings.\n\n ' return {'spent': f"${format((Decim...
def to_json(self) -> Mapping[(str, str)]: ' Converts an income and expense item to a dictionary for serialization as a JSON object\n\n This method also converts the income and expense values from centicents to dollar amounts represented as\n strings.\n\n ' return {'spent': f"${format((Decim...
74c5ed443f0b01a290cdc984c87380dbd08f488ac9dc8bcb28fef1eae587650b
def get_policy_definition(policy_definition_name: Optional[str]=None, opts: Optional[pulumi.InvokeOptions]=None) -> AwaitableGetPolicyDefinitionResult: '\n The policy definition.\n\n\n :param str policy_definition_name: The name of the policy definition to get.\n ' __args__ = dict() __args__['polic...
The policy definition. :param str policy_definition_name: The name of the policy definition to get.
sdk/python/pulumi_azure_nextgen/authorization/v20180501/get_policy_definition.py
get_policy_definition
pulumi/pulumi-azure-nextgen
31
python
def get_policy_definition(policy_definition_name: Optional[str]=None, opts: Optional[pulumi.InvokeOptions]=None) -> AwaitableGetPolicyDefinitionResult: '\n The policy definition.\n\n\n :param str policy_definition_name: The name of the policy definition to get.\n ' __args__ = dict() __args__['polic...
def get_policy_definition(policy_definition_name: Optional[str]=None, opts: Optional[pulumi.InvokeOptions]=None) -> AwaitableGetPolicyDefinitionResult: '\n The policy definition.\n\n\n :param str policy_definition_name: The name of the policy definition to get.\n ' __args__ = dict() __args__['polic...
ed2e3dfc7f793ffaf32441e4879231600c1fe49bd7d775fa98fcc187a9ab9233
@property @pulumi.getter def description(self) -> Optional[str]: '\n The policy definition description.\n ' return pulumi.get(self, 'description')
The policy definition description.
sdk/python/pulumi_azure_nextgen/authorization/v20180501/get_policy_definition.py
description
pulumi/pulumi-azure-nextgen
31
python
@property @pulumi.getter def description(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'description')
@property @pulumi.getter def description(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'description')<|docstring|>The policy definition description.<|endoftext|>
6821472250a0483d07cbc686f07e9806a8205cbd157652ce8f70ed91575d74a3
@property @pulumi.getter(name='displayName') def display_name(self) -> Optional[str]: '\n The display name of the policy definition.\n ' return pulumi.get(self, 'display_name')
The display name of the policy definition.
sdk/python/pulumi_azure_nextgen/authorization/v20180501/get_policy_definition.py
display_name
pulumi/pulumi-azure-nextgen
31
python
@property @pulumi.getter(name='displayName') def display_name(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'display_name')
@property @pulumi.getter(name='displayName') def display_name(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'display_name')<|docstring|>The display name of the policy definition.<|endoftext|>
6a99bd0f141191e63d32a7ca082d46ece38a52803f81e3d404ae196250d35a18
@property @pulumi.getter def id(self) -> str: '\n The ID of the policy definition.\n ' return pulumi.get(self, 'id')
The ID of the policy definition.
sdk/python/pulumi_azure_nextgen/authorization/v20180501/get_policy_definition.py
id
pulumi/pulumi-azure-nextgen
31
python
@property @pulumi.getter def id(self) -> str: '\n \n ' return pulumi.get(self, 'id')
@property @pulumi.getter def id(self) -> str: '\n \n ' return pulumi.get(self, 'id')<|docstring|>The ID of the policy definition.<|endoftext|>
024a2e8a3fcb596395b87d131b3ae1181deb5beab50eeaab22b04af2db4ed109
@property @pulumi.getter def metadata(self) -> Optional[Any]: '\n The policy definition metadata.\n ' return pulumi.get(self, 'metadata')
The policy definition metadata.
sdk/python/pulumi_azure_nextgen/authorization/v20180501/get_policy_definition.py
metadata
pulumi/pulumi-azure-nextgen
31
python
@property @pulumi.getter def metadata(self) -> Optional[Any]: '\n \n ' return pulumi.get(self, 'metadata')
@property @pulumi.getter def metadata(self) -> Optional[Any]: '\n \n ' return pulumi.get(self, 'metadata')<|docstring|>The policy definition metadata.<|endoftext|>
fbee5e17ab7b91019197b6492a721265b68b561f64279859cc46643c8cbc153f
@property @pulumi.getter def mode(self) -> Optional[str]: '\n The policy definition mode. Possible values are NotSpecified, Indexed, and All.\n ' return pulumi.get(self, 'mode')
The policy definition mode. Possible values are NotSpecified, Indexed, and All.
sdk/python/pulumi_azure_nextgen/authorization/v20180501/get_policy_definition.py
mode
pulumi/pulumi-azure-nextgen
31
python
@property @pulumi.getter def mode(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'mode')
@property @pulumi.getter def mode(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'mode')<|docstring|>The policy definition mode. Possible values are NotSpecified, Indexed, and All.<|endoftext|>
6f02f6a3506dc9a4cf8676ff1ab84db4b3f6a73061adee1951f4d656ea29be22
@property @pulumi.getter def name(self) -> str: '\n The name of the policy definition.\n ' return pulumi.get(self, 'name')
The name of the policy definition.
sdk/python/pulumi_azure_nextgen/authorization/v20180501/get_policy_definition.py
name
pulumi/pulumi-azure-nextgen
31
python
@property @pulumi.getter def name(self) -> str: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> str: '\n \n ' return pulumi.get(self, 'name')<|docstring|>The name of the policy definition.<|endoftext|>
0e468d8b10576c60211800da4f2206e8036213afb7c77521ee1cdb1d455b3a61
@property @pulumi.getter def parameters(self) -> Optional[Any]: '\n Required if a parameter is used in policy rule.\n ' return pulumi.get(self, 'parameters')
Required if a parameter is used in policy rule.
sdk/python/pulumi_azure_nextgen/authorization/v20180501/get_policy_definition.py
parameters
pulumi/pulumi-azure-nextgen
31
python
@property @pulumi.getter def parameters(self) -> Optional[Any]: '\n \n ' return pulumi.get(self, 'parameters')
@property @pulumi.getter def parameters(self) -> Optional[Any]: '\n \n ' return pulumi.get(self, 'parameters')<|docstring|>Required if a parameter is used in policy rule.<|endoftext|>
922f9c74afa16a03b6b1555a613c207ee54ff3f2b5d14ddf15c0a99db15dc69f
@property @pulumi.getter(name='policyRule') def policy_rule(self) -> Optional[Any]: '\n The policy rule.\n ' return pulumi.get(self, 'policy_rule')
The policy rule.
sdk/python/pulumi_azure_nextgen/authorization/v20180501/get_policy_definition.py
policy_rule
pulumi/pulumi-azure-nextgen
31
python
@property @pulumi.getter(name='policyRule') def policy_rule(self) -> Optional[Any]: '\n \n ' return pulumi.get(self, 'policy_rule')
@property @pulumi.getter(name='policyRule') def policy_rule(self) -> Optional[Any]: '\n \n ' return pulumi.get(self, 'policy_rule')<|docstring|>The policy rule.<|endoftext|>
a60d0061d44b1e2cc5b2dcad84328e6b508a1359ca869f8038361f9314d84c03
@property @pulumi.getter(name='policyType') def policy_type(self) -> Optional[str]: '\n The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom.\n ' return pulumi.get(self, 'policy_type')
The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom.
sdk/python/pulumi_azure_nextgen/authorization/v20180501/get_policy_definition.py
policy_type
pulumi/pulumi-azure-nextgen
31
python
@property @pulumi.getter(name='policyType') def policy_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'policy_type')
@property @pulumi.getter(name='policyType') def policy_type(self) -> Optional[str]: '\n \n ' return pulumi.get(self, 'policy_type')<|docstring|>The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom.<|endoftext|>
c866657980d3b2c1450e2487f453db3bcd9b27971518b90525fc837a6176528e
@property @pulumi.getter def type(self) -> str: '\n The type of the resource (Microsoft.Authorization/policyDefinitions).\n ' return pulumi.get(self, 'type')
The type of the resource (Microsoft.Authorization/policyDefinitions).
sdk/python/pulumi_azure_nextgen/authorization/v20180501/get_policy_definition.py
type
pulumi/pulumi-azure-nextgen
31
python
@property @pulumi.getter def type(self) -> str: '\n \n ' return pulumi.get(self, 'type')
@property @pulumi.getter def type(self) -> str: '\n \n ' return pulumi.get(self, 'type')<|docstring|>The type of the resource (Microsoft.Authorization/policyDefinitions).<|endoftext|>
a4702060ba9994afea13b6aa5752643a8927f3396f16c1c0e9822fd413a9f9cd
def read(*filenames, **kwargs): '\n Build an absolute path from ``*filenames``, and return contents of\n resulting file. Defaults to UTF-8 encoding.\n ' encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('sep', '\n') buf = [] for fl in filenames: with codecs.open(os.path....
Build an absolute path from ``*filenames``, and return contents of resulting file. Defaults to UTF-8 encoding.
setup.py
read
gatarelib/chartify
1
python
def read(*filenames, **kwargs): '\n Build an absolute path from ``*filenames``, and return contents of\n resulting file. Defaults to UTF-8 encoding.\n ' encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('sep', '\n') buf = [] for fl in filenames: with codecs.open(os.path....
def read(*filenames, **kwargs): '\n Build an absolute path from ``*filenames``, and return contents of\n resulting file. Defaults to UTF-8 encoding.\n ' encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('sep', '\n') buf = [] for fl in filenames: with codecs.open(os.path....
b7ab170ce5abc0a122e7985279b2557fd32383d97aca2a3424a2c908d10f5134
def find_meta(meta): 'Extract __*meta*__ from META_FILE.' re_str = '^__{meta}__ = [\'\\"]([^\'\\"]*)[\'\\"]'.format(meta=meta) meta_match = re.search(re_str, META_FILE, re.M) if meta_match: return meta_match.group(1) raise RuntimeError('Unable to find __{meta}__ string.'.format(meta=meta))
Extract __*meta*__ from META_FILE.
setup.py
find_meta
gatarelib/chartify
1
python
def find_meta(meta): re_str = '^__{meta}__ = [\'\\"]([^\'\\"]*)[\'\\"]'.format(meta=meta) meta_match = re.search(re_str, META_FILE, re.M) if meta_match: return meta_match.group(1) raise RuntimeError('Unable to find __{meta}__ string.'.format(meta=meta))
def find_meta(meta): re_str = '^__{meta}__ = [\'\\"]([^\'\\"]*)[\'\\"]'.format(meta=meta) meta_match = re.search(re_str, META_FILE, re.M) if meta_match: return meta_match.group(1) raise RuntimeError('Unable to find __{meta}__ string.'.format(meta=meta))<|docstring|>Extract __*meta*__ from M...
0fbce83488953295012f9942badf93d0560bd3b020a59f2b51285ba01395a0c5
def make_hash_agility_v1(digest: bytes) -> CMSAttribute: '\n CMSAttribue:\n type: HASH_AGILITY_V1_OID\n values: Set of 1 XML Plist\n dict: {\n "cdhashes": [digset truncated to 20 bytes]\n }\n ' plist_dict = {'cdhashes': [digest[:20]]} plist_bytes = pl...
CMSAttribue: type: HASH_AGILITY_V1_OID values: Set of 1 XML Plist dict: { "cdhashes": [digset truncated to 20 bytes] }
signapple/sign.py
make_hash_agility_v1
achow101/signapple
20
python
def make_hash_agility_v1(digest: bytes) -> CMSAttribute: '\n CMSAttribue:\n type: HASH_AGILITY_V1_OID\n values: Set of 1 XML Plist\n dict: {\n "cdhashes": [digset truncated to 20 bytes]\n }\n ' plist_dict = {'cdhashes': [digest[:20]]} plist_bytes = pl...
def make_hash_agility_v1(digest: bytes) -> CMSAttribute: '\n CMSAttribue:\n type: HASH_AGILITY_V1_OID\n values: Set of 1 XML Plist\n dict: {\n "cdhashes": [digset truncated to 20 bytes]\n }\n ' plist_dict = {'cdhashes': [digest[:20]]} plist_bytes = pl...
8dfdb971e0a113c3bf8b9d7ef98f9c82afce649077c21e52af83753d3879bb32
def make_hash_agility_v2(digest: bytes, hash_type: int) -> CMSAttribute: '\n CMSAttribute:\n type: HASH_AGILITY_V2_OID\n values: Set of HashAgility\n type: DigestAlgorithmId\n data: digest\n ' dg_algo = _get_digest_algo(hash_type) ha = HashAgility({'type': dg_algo, ...
CMSAttribute: type: HASH_AGILITY_V2_OID values: Set of HashAgility type: DigestAlgorithmId data: digest
signapple/sign.py
make_hash_agility_v2
achow101/signapple
20
python
def make_hash_agility_v2(digest: bytes, hash_type: int) -> CMSAttribute: '\n CMSAttribute:\n type: HASH_AGILITY_V2_OID\n values: Set of HashAgility\n type: DigestAlgorithmId\n data: digest\n ' dg_algo = _get_digest_algo(hash_type) ha = HashAgility({'type': dg_algo, ...
def make_hash_agility_v2(digest: bytes, hash_type: int) -> CMSAttribute: '\n CMSAttribute:\n type: HASH_AGILITY_V2_OID\n values: Set of HashAgility\n type: DigestAlgorithmId\n data: digest\n ' dg_algo = _get_digest_algo(hash_type) ha = HashAgility({'type': dg_algo, ...
26349255d0c1af2b86b6a951de7a109a69334d79ca35a066979d4b3dc840a487
def sign_mach_o(filename: str, p12_path: str, passphrase: Optional[str]=None, force: bool=False, file_list: Optional[str]=None, detach_target: Optional[str]=None): '\n Code sign a Mach-O binary in place\n ' (bundle, filepath) = get_bundle_exec(filename) if (passphrase is None): passphrase = ge...
Code sign a Mach-O binary in place
signapple/sign.py
sign_mach_o
achow101/signapple
20
python
def sign_mach_o(filename: str, p12_path: str, passphrase: Optional[str]=None, force: bool=False, file_list: Optional[str]=None, detach_target: Optional[str]=None): '\n \n ' (bundle, filepath) = get_bundle_exec(filename) if (passphrase is None): passphrase = getpass.getpass(f'Enter the passphra...
def sign_mach_o(filename: str, p12_path: str, passphrase: Optional[str]=None, force: bool=False, file_list: Optional[str]=None, detach_target: Optional[str]=None): '\n \n ' (bundle, filepath) = get_bundle_exec(filename) if (passphrase is None): passphrase = getpass.getpass(f'Enter the passphra...
170e185a50a6b749ea2c55763778712e1df58076ef6064774c510b3abafed5dd
def apply_sig(filename: str, detach_path: str): '\n Attach the signature for the bundle of the same name at the detach_path\n ' (bundle, filepath) = get_bundle_exec(filename) detach_bundle = os.path.join(detach_path, os.path.basename(bundle)) bin_code_signers: Dict[(str, CodeSigner)] = {} for ...
Attach the signature for the bundle of the same name at the detach_path
signapple/sign.py
apply_sig
achow101/signapple
20
python
def apply_sig(filename: str, detach_path: str): '\n \n ' (bundle, filepath) = get_bundle_exec(filename) detach_bundle = os.path.join(detach_path, os.path.basename(bundle)) bin_code_signers: Dict[(str, CodeSigner)] = {} for file_path in glob.iglob(os.path.join(detach_bundle, '**'), recursive=Tr...
def apply_sig(filename: str, detach_path: str): '\n \n ' (bundle, filepath) = get_bundle_exec(filename) detach_bundle = os.path.join(detach_path, os.path.basename(bundle)) bin_code_signers: Dict[(str, CodeSigner)] = {} for file_path in glob.iglob(os.path.join(detach_bundle, '**'), recursive=Tr...
b4431998a23b0d4e9737a978d1d18f969f2f7d310250a81e91c93dd6067821b7
def make_signature(self): '\n Attaches the signature\n ' cs_sec = self.macho.sect[(- 1)] assert (cs_sec == self.get_linkedit_segment().sect[(- 1)]) assert isinstance(cs_sec, CodeSignature) sig_cmd = self.get_sig_command() cs_sec.content = StrPatchwork(self.sig_data)
Attaches the signature
signapple/sign.py
make_signature
achow101/signapple
20
python
def make_signature(self): '\n \n ' cs_sec = self.macho.sect[(- 1)] assert (cs_sec == self.get_linkedit_segment().sect[(- 1)]) assert isinstance(cs_sec, CodeSignature) sig_cmd = self.get_sig_command() cs_sec.content = StrPatchwork(self.sig_data)
def make_signature(self): '\n \n ' cs_sec = self.macho.sect[(- 1)] assert (cs_sec == self.get_linkedit_segment().sect[(- 1)]) assert isinstance(cs_sec, CodeSignature) sig_cmd = self.get_sig_command() cs_sec.content = StrPatchwork(self.sig_data)<|docstring|>Attaches the signature<|e...
9beac904a9b21df069373e4ef09828b846d32dbdfdd17f7a594a243669fe1d32
def _hash_name(self) -> str: '\n Get the name of the hash for use in CodeResources\n ' if (self.hash_type == 1): return 'hash' return f'hash{self.hash_type}'
Get the name of the hash for use in CodeResources
signapple/sign.py
_hash_name
achow101/signapple
20
python
def _hash_name(self) -> str: '\n \n ' if (self.hash_type == 1): return 'hash' return f'hash{self.hash_type}'
def _hash_name(self) -> str: '\n \n ' if (self.hash_type == 1): return 'hash' return f'hash{self.hash_type}'<|docstring|>Get the name of the hash for use in CodeResources<|endoftext|>
02bf1ebffbca131ec1c94f2c4f3f792b481fabdf4bcc31a13f8a322fc63b33d7
def make_signature(self): '\n Signs the filename in place\n ' arch_sizes: Dict[(int, int)] = {} for (i, h) in enumerate(get_macho_list(self.macho)): cs = SingleCodeSigner(self.filename, i, h, self.cert, self.privkey, force=self.force, detach_target=self.detach_target) self.code...
Signs the filename in place
signapple/sign.py
make_signature
achow101/signapple
20
python
def make_signature(self): '\n \n ' arch_sizes: Dict[(int, int)] = {} for (i, h) in enumerate(get_macho_list(self.macho)): cs = SingleCodeSigner(self.filename, i, h, self.cert, self.privkey, force=self.force, detach_target=self.detach_target) self.code_signers.append(cs) sel...
def make_signature(self): '\n \n ' arch_sizes: Dict[(int, int)] = {} for (i, h) in enumerate(get_macho_list(self.macho)): cs = SingleCodeSigner(self.filename, i, h, self.cert, self.privkey, force=self.force, detach_target=self.detach_target) self.code_signers.append(cs) sel...
d375040de9cb954e8b33b0a8958f1f1eecc353e753bf3bff8a23b94e8a1a5d69
def _find_rule(path: str) -> Optional[Tuple[(str, Any, Any)]]: '\n Finds the rule for the path.\n Returns None if no rule matches or this path should be excluded.\n ' best_rule = None for (k, v) in rules['rules2'].items(): weight = (v['weight'] if (isinstance(v, dict...
Finds the rule for the path. Returns None if no rule matches or this path should be excluded.
signapple/sign.py
_find_rule
achow101/signapple
20
python
def _find_rule(path: str) -> Optional[Tuple[(str, Any, Any)]]: '\n Finds the rule for the path.\n Returns None if no rule matches or this path should be excluded.\n ' best_rule = None for (k, v) in rules['rules2'].items(): weight = (v['weight'] if (isinstance(v, dict...
def _find_rule(path: str) -> Optional[Tuple[(str, Any, Any)]]: '\n Finds the rule for the path.\n Returns None if no rule matches or this path should be excluded.\n ' best_rule = None for (k, v) in rules['rules2'].items(): weight = (v['weight'] if (isinstance(v, dict...
43f0144d40d8fdecb6e04a79434dc94f47fcab9cd2347ad1d7642951e5b302a3
@plugin('^simple (\\d+)$') def simple_plugin(conn, num): 'nothing special'
nothing special
tests/functional/plugins/test_help.py
simple_plugin
igorsobreira/eizzek
1
python
@plugin('^simple (\\d+)$') def simple_plugin(conn, num):
@plugin('^simple (\\d+)$') def simple_plugin(conn, num): <|docstring|>nothing special<|endoftext|>
0bb906381cf3e315408448375ab9011ecf845c9a4efd7f2e9966a8d601bd82cf
def extract_manifest(path, resource_name): 'Reads manifest from |path| and returns it as a string.\n Returns None is there is no such manifest.' with LoadLibrary(path) as handle: try: return win32api.LoadResource(handle, RT_MANIFEST, resource_name) except pywintypes.error as error...
Reads manifest from |path| and returns it as a string. Returns None is there is no such manifest.
worker/deps/gyp/test/win/gyptest-link-generate-manifest.py
extract_manifest
xuehw357/mediasoup
2,151
python
def extract_manifest(path, resource_name): 'Reads manifest from |path| and returns it as a string.\n Returns None is there is no such manifest.' with LoadLibrary(path) as handle: try: return win32api.LoadResource(handle, RT_MANIFEST, resource_name) except pywintypes.error as error...
def extract_manifest(path, resource_name): 'Reads manifest from |path| and returns it as a string.\n Returns None is there is no such manifest.' with LoadLibrary(path) as handle: try: return win32api.LoadResource(handle, RT_MANIFEST, resource_name) except pywintypes.error as error...
4bf89619f53062c3153359348b6ae26fc867de885fc3ed94ed1faa513c3f257e
def test_am_replacer_basic(): '\n Tests replacing an ".. automodapi::" with the automodapi no-option\n template\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_str.format(options=''), fakeapp) assert (result == am_replacer_basic_ex...
Tests replacing an ".. automodapi::" with the automodapi no-option template
sphinx_automodapi/tests/test_automodapi.py
test_am_replacer_basic
janderil/sphinx-automodapi
0
python
def test_am_replacer_basic(): '\n Tests replacing an ".. automodapi::" with the automodapi no-option\n template\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_str.format(options=), fakeapp) assert (result == am_replacer_basic_expe...
def test_am_replacer_basic(): '\n Tests replacing an ".. automodapi::" with the automodapi no-option\n template\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_str.format(options=), fakeapp) assert (result == am_replacer_basic_expe...
eafaa745141302dc648af4c776b6885622bd81d4f2327e371af361aff83c61e5
def test_am_replacer_writereprocessed(tmpdir): '\n Tests the automodapi_writereprocessed option\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() fakeapp.srcdir = str(tmpdir) fakeapp.config.automodapi_writereprocessed = True automodapi_replace(am_replacer_repr_str.format(...
Tests the automodapi_writereprocessed option
sphinx_automodapi/tests/test_automodapi.py
test_am_replacer_writereprocessed
janderil/sphinx-automodapi
0
python
def test_am_replacer_writereprocessed(tmpdir): '\n \n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() fakeapp.srcdir = str(tmpdir) fakeapp.config.automodapi_writereprocessed = True automodapi_replace(am_replacer_repr_str.format(options=), fakeapp) assert tmpdir.join('...
def test_am_replacer_writereprocessed(tmpdir): '\n \n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() fakeapp.srcdir = str(tmpdir) fakeapp.config.automodapi_writereprocessed = True automodapi_replace(am_replacer_repr_str.format(options=), fakeapp) assert tmpdir.join('...
79d228bc7f837cd270a7823c16acb2a98ea6b6f29ed6bf863400b48a8b321bb6
def test_am_replacer_noinh(): '\n Tests replacing an ".. automodapi::" with no-inheritance-diagram\n option\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() ops = ['', ':no-inheritance-diagram:'] ostr = '\n '.join(ops) result = automodapi_replace(am_replacer_str.fo...
Tests replacing an ".. automodapi::" with no-inheritance-diagram option
sphinx_automodapi/tests/test_automodapi.py
test_am_replacer_noinh
janderil/sphinx-automodapi
0
python
def test_am_replacer_noinh(): '\n Tests replacing an ".. automodapi::" with no-inheritance-diagram\n option\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() ops = [, ':no-inheritance-diagram:'] ostr = '\n '.join(ops) result = automodapi_replace(am_replacer_str.form...
def test_am_replacer_noinh(): '\n Tests replacing an ".. automodapi::" with no-inheritance-diagram\n option\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() ops = [, ':no-inheritance-diagram:'] ostr = '\n '.join(ops) result = automodapi_replace(am_replacer_str.form...
cad5a4e0b9a4cb301a2df20d7ba52cc0db5a2a1e578103cc3607b1881c43359b
def test_am_replacer_titleandhdrs(): '\n Tests replacing an ".. automodapi::" entry with title-setting and header\n character options.\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() ops = ['', ':title: A new title', ':headings: &*'] ostr = '\n '.join(ops) result ...
Tests replacing an ".. automodapi::" entry with title-setting and header character options.
sphinx_automodapi/tests/test_automodapi.py
test_am_replacer_titleandhdrs
janderil/sphinx-automodapi
0
python
def test_am_replacer_titleandhdrs(): '\n Tests replacing an ".. automodapi::" entry with title-setting and header\n character options.\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() ops = [, ':title: A new title', ':headings: &*'] ostr = '\n '.join(ops) result = ...
def test_am_replacer_titleandhdrs(): '\n Tests replacing an ".. automodapi::" entry with title-setting and header\n character options.\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() ops = [, ':title: A new title', ':headings: &*'] ostr = '\n '.join(ops) result = ...
dcd024e015ed220a50fa9757d1073a2b5e6629696739fd963aa1aaa56e66e738
def test_am_replacer_nomain(): '\n Tests replacing an ".. automodapi::" with "no-main-docstring" .\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_nomain_str, fakeapp) assert (result == am_replacer_nomain_expected)
Tests replacing an ".. automodapi::" with "no-main-docstring" .
sphinx_automodapi/tests/test_automodapi.py
test_am_replacer_nomain
janderil/sphinx-automodapi
0
python
def test_am_replacer_nomain(): '\n \n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_nomain_str, fakeapp) assert (result == am_replacer_nomain_expected)
def test_am_replacer_nomain(): '\n \n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_nomain_str, fakeapp) assert (result == am_replacer_nomain_expected)<|docstring|>Tests replacing an ".. automodapi::" with "no-main-docstring" .<|endof...
2f3dc76f33b2d6294b97829474f7572c8e0c81b485be4d7eab513db8e41c7562
def test_am_replacer_skip(): '\n Tests using the ":skip: option in an ".. automodapi::" .\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_skip_str, fakeapp) assert (result == am_replacer_skip_expected)
Tests using the ":skip: option in an ".. automodapi::" .
sphinx_automodapi/tests/test_automodapi.py
test_am_replacer_skip
janderil/sphinx-automodapi
0
python
def test_am_replacer_skip(): '\n \n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_skip_str, fakeapp) assert (result == am_replacer_skip_expected)
def test_am_replacer_skip(): '\n \n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_skip_str, fakeapp) assert (result == am_replacer_skip_expected)<|docstring|>Tests using the ":skip: option in an ".. automodapi::" .<|endoftext|>
40bf00fe3630590d175afa6ec5a54488f4d8b89dbcbd2b5317a68de844be1ef7
def test_am_replacer_invalidop(): '\n Tests that a sphinx warning is produced with an invalid option.\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() automodapi_replace(am_replacer_invalidop_str, fakeapp) expected_warnings = [('Found additional options invalid-option in aut...
Tests that a sphinx warning is produced with an invalid option.
sphinx_automodapi/tests/test_automodapi.py
test_am_replacer_invalidop
janderil/sphinx-automodapi
0
python
def test_am_replacer_invalidop(): '\n \n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() automodapi_replace(am_replacer_invalidop_str, fakeapp) expected_warnings = [('Found additional options invalid-option in automodapi.', None)] assert (fakeapp.warnings == expected_warn...
def test_am_replacer_invalidop(): '\n \n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() automodapi_replace(am_replacer_invalidop_str, fakeapp) expected_warnings = [('Found additional options invalid-option in automodapi.', None)] assert (fakeapp.warnings == expected_warn...
490a7c79d816285a98f3f08f78da467f98949bc4ef9288a60b31294cdae69d17
def test_am_replacer_cython(cython_testpackage): '\n Tests replacing an ".. automodapi::" for a Cython module.\n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_cython_str.format(options=''), fakeapp) assert (result == am_replacer_cytho...
Tests replacing an ".. automodapi::" for a Cython module.
sphinx_automodapi/tests/test_automodapi.py
test_am_replacer_cython
janderil/sphinx-automodapi
0
python
def test_am_replacer_cython(cython_testpackage): '\n \n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_cython_str.format(options=), fakeapp) assert (result == am_replacer_cython_expected)
def test_am_replacer_cython(cython_testpackage): '\n \n ' from ..automodapi import automodapi_replace fakeapp = FakeApp() result = automodapi_replace(am_replacer_cython_str.format(options=), fakeapp) assert (result == am_replacer_cython_expected)<|docstring|>Tests replacing an ".. automodapi::...
e364091f3f1be4ffc54ed043973b9b5a01e09c79d958420b1c6a48ad58ebde39
def add_worker(self, worker): '\n Adds workers (watcher, filters or doers) to the bot\n :param worker: This can be a single worker or a list of workers\n :raises: TypeError\n ' try: iterator = iter(worker) except TypeError: self.__add_single_worker(worker) els...
Adds workers (watcher, filters or doers) to the bot :param worker: This can be a single worker or a list of workers :raises: TypeError
bot.py
add_worker
dvdme/redditbasebot
0
python
def add_worker(self, worker): '\n Adds workers (watcher, filters or doers) to the bot\n :param worker: This can be a single worker or a list of workers\n :raises: TypeError\n ' try: iterator = iter(worker) except TypeError: self.__add_single_worker(worker) els...
def add_worker(self, worker): '\n Adds workers (watcher, filters or doers) to the bot\n :param worker: This can be a single worker or a list of workers\n :raises: TypeError\n ' try: iterator = iter(worker) except TypeError: self.__add_single_worker(worker) els...
e4b9700eebe1c90d753776425812e27db26c623afcd69bd7985f0b6d4604baad
def __init__(self, fingerprint: str, access_token: str): 'Initialize the configuration.' self.fingerprint = fingerprint self.access_token = access_token
Initialize the configuration.
onyx_client/configuration/configuration.py
__init__
muhlba91/onyx-client
2
python
def __init__(self, fingerprint: str, access_token: str): self.fingerprint = fingerprint self.access_token = access_token
def __init__(self, fingerprint: str, access_token: str): self.fingerprint = fingerprint self.access_token = access_token<|docstring|>Initialize the configuration.<|endoftext|>
6405f440a0294fbf5efb90e1abd6975c32d5239ebee9e65299a22d873124d52d
def rfd(data, result, file_suffix, threshold=0.17, show=False): 'Run this show script during debugging and use it with data_out.\n\n Notes:\n rfd stands for run from debug.\n ' r_list = [] labels = [] for (l, r) in enumerate(result): if (r.size != 0): for i in range(r.sh...
Run this show script during debugging and use it with data_out. Notes: rfd stands for run from debug.
debugging/show.py
rfd
tuggeluk/mmdetection
1
python
def rfd(data, result, file_suffix, threshold=0.17, show=False): 'Run this show script during debugging and use it with data_out.\n\n Notes:\n rfd stands for run from debug.\n ' r_list = [] labels = [] for (l, r) in enumerate(result): if (r.size != 0): for i in range(r.sh...
def rfd(data, result, file_suffix, threshold=0.17, show=False): 'Run this show script during debugging and use it with data_out.\n\n Notes:\n rfd stands for run from debug.\n ' r_list = [] labels = [] for (l, r) in enumerate(result): if (r.size != 0): for i in range(r.sh...
d16646eaa458f62d4ece027542cbf0c47fb286efc6fad24f2e4a045a4569e5e5
def cati(coco: COCO, output_fp: str, pred: bool, img_ids: list=None, img_dir=None): 'COCO Anns to Image.\n\n Overlays bounding boxes with categories from a COCO ann_list onto the image\n specified in img_fp.\n\n Args:\n coco: The coco API object with the desired annotations.\n output_fp: Wher...
COCO Anns to Image. Overlays bounding boxes with categories from a COCO ann_list onto the image specified in img_fp. Args: coco: The coco API object with the desired annotations. output_fp: Where to output the files to. pred: True if this is the prediction, false if ground truth. img_ids: Image IDs to...
debugging/show.py
cati
tuggeluk/mmdetection
1
python
def cati(coco: COCO, output_fp: str, pred: bool, img_ids: list=None, img_dir=None): 'COCO Anns to Image.\n\n Overlays bounding boxes with categories from a COCO ann_list onto the image\n specified in img_fp.\n\n Args:\n coco: The coco API object with the desired annotations.\n output_fp: Wher...
def cati(coco: COCO, output_fp: str, pred: bool, img_ids: list=None, img_dir=None): 'COCO Anns to Image.\n\n Overlays bounding boxes with categories from a COCO ann_list onto the image\n specified in img_fp.\n\n Args:\n coco: The coco API object with the desired annotations.\n output_fp: Wher...
40c60d20d6d00a057a33b616e39d6cc2f5fc4c54b45ba092546a50df12e475b8
def ttp(img: torch.Tensor, save_path: str=None) -> Image: 'Tensor to PIL image. Saves to a path if specified.\n\n Shape:\n img: (3, h, w)\n ' if (img.device != torch.device('cpu')): img = img.detach().cpu() img = Image.fromarray(np.rollaxis(img.numpy(), 0, 3).astype('uint8')) if (sa...
Tensor to PIL image. Saves to a path if specified. Shape: img: (3, h, w)
debugging/show.py
ttp
tuggeluk/mmdetection
1
python
def ttp(img: torch.Tensor, save_path: str=None) -> Image: 'Tensor to PIL image. Saves to a path if specified.\n\n Shape:\n img: (3, h, w)\n ' if (img.device != torch.device('cpu')): img = img.detach().cpu() img = Image.fromarray(np.rollaxis(img.numpy(), 0, 3).astype('uint8')) if (sa...
def ttp(img: torch.Tensor, save_path: str=None) -> Image: 'Tensor to PIL image. Saves to a path if specified.\n\n Shape:\n img: (3, h, w)\n ' if (img.device != torch.device('cpu')): img = img.detach().cpu() img = Image.fromarray(np.rollaxis(img.numpy(), 0, 3).astype('uint8')) if (sa...
77bc9e3dd7cff4a981883d113cb72a0d30e00567e83eb082754a21565ba865e9
def compare(gt_file: str, pred_file: str, diff_file: str, img_ids: list): 'Compares two images.' for img_id in tqdm(img_ids): gt_array = np.array(Image.open((((gt_file + 'bbox-only_') + str(img_id)) + '.png'))) pred_array = np.array(Image.open((((pred_file + 'bbox-only_') + str(img_id)) + '.png'...
Compares two images.
debugging/show.py
compare
tuggeluk/mmdetection
1
python
def compare(gt_file: str, pred_file: str, diff_file: str, img_ids: list): for img_id in tqdm(img_ids): gt_array = np.array(Image.open((((gt_file + 'bbox-only_') + str(img_id)) + '.png'))) pred_array = np.array(Image.open((((pred_file + 'bbox-only_') + str(img_id)) + '.png'))) assert (gt...
def compare(gt_file: str, pred_file: str, diff_file: str, img_ids: list): for img_id in tqdm(img_ids): gt_array = np.array(Image.open((((gt_file + 'bbox-only_') + str(img_id)) + '.png'))) pred_array = np.array(Image.open((((pred_file + 'bbox-only_') + str(img_id)) + '.png'))) assert (gt...
b12582c21ddb135593aa8aed1a47b648e8865eb588b541005e8eb49aee878084
def from_file(results: str, coco: str, img_ind: (int or list), img_path: str): 'Does cati from a file.' if (not img_ind): img_ind = [0] coco = COCO(coco) results = coco.loadRes(results) keys = list(coco.imgs.keys()) if (len(img_ind) > 0): img_id = [coco.imgs[keys[ind]]['id'] for ...
Does cati from a file.
debugging/show.py
from_file
tuggeluk/mmdetection
1
python
def from_file(results: str, coco: str, img_ind: (int or list), img_path: str): if (not img_ind): img_ind = [0] coco = COCO(coco) results = coco.loadRes(results) keys = list(coco.imgs.keys()) if (len(img_ind) > 0): img_id = [coco.imgs[keys[ind]]['id'] for ind in img_ind] else...
def from_file(results: str, coco: str, img_ind: (int or list), img_path: str): if (not img_ind): img_ind = [0] coco = COCO(coco) results = coco.loadRes(results) keys = list(coco.imgs.keys()) if (len(img_ind) > 0): img_id = [coco.imgs[keys[ind]]['id'] for ind in img_ind] else...
9791e2b2390a73c9b16cac255cbdd72338a7f2146ed5e4bec079d25bbc64acbd
def connect_to_sqlite(func, *args): 'Sqlite Connection Wrapper...\n not the best , whatever It works (ig)' conn = sql.connect('StocksData.sqlite') cur = conn.cursor() return_val = func(cur, *args) conn.commit() conn.close() return return_val
Sqlite Connection Wrapper... not the best , whatever It works (ig)
database.py
connect_to_sqlite
programmer2215/StockBetaCalculator
1
python
def connect_to_sqlite(func, *args): 'Sqlite Connection Wrapper...\n not the best , whatever It works (ig)' conn = sql.connect('StocksData.sqlite') cur = conn.cursor() return_val = func(cur, *args) conn.commit() conn.close() return return_val
def connect_to_sqlite(func, *args): 'Sqlite Connection Wrapper...\n not the best , whatever It works (ig)' conn = sql.connect('StocksData.sqlite') cur = conn.cursor() return_val = func(cur, *args) conn.commit() conn.close() return return_val<|docstring|>Sqlite Connection Wrapper... not th...
8153fc1af483326c813a32bd3d4a2dd9ce1b110bbe31f9a2fad91a4b661e5150
def get_coordinates_of_tile(line): ' if A row is even\n / \\ / \\\n | * | * | (-1, 1) (0, 1)\n / \\ / \\ / \\\n | * | A | * | (-1, 0) (0, 0) (1, 0)\n \\ / \\ / \\ /\n | * | * | (-1, -1) (0, -1)\n \\ / \\ /\n\n if B row is odd\n / \\ / \\...
if A row is even / \ / \ | * | * | (-1, 1) (0, 1) / \ / \ / \ | * | A | * | (-1, 0) (0, 0) (1, 0) \ / \ / \ / | * | * | (-1, -1) (0, -1) \ / \ / if B row is odd / \ / \ | * | * | (0, 1) (1, 1) / \ / \ / \ | * | B | * | (-1, 0) (0, 0) (1, 0) \ / \ / \ / ...
day24/day24_part1.py
get_coordinates_of_tile
Disi77/AdventOfCode2020
1
python
def get_coordinates_of_tile(line): ' if A row is even\n / \\ / \\\n | * | * | (-1, 1) (0, 1)\n / \\ / \\ / \\\n | * | A | * | (-1, 0) (0, 0) (1, 0)\n \\ / \\ / \\ /\n | * | * | (-1, -1) (0, -1)\n \\ / \\ /\n\n if B row is odd\n / \\ / \\...
def get_coordinates_of_tile(line): ' if A row is even\n / \\ / \\\n | * | * | (-1, 1) (0, 1)\n / \\ / \\ / \\\n | * | A | * | (-1, 0) (0, 0) (1, 0)\n \\ / \\ / \\ /\n | * | * | (-1, -1) (0, -1)\n \\ / \\ /\n\n if B row is odd\n / \\ / \\...
dea3e24ad6a0afbdcddfed7f88ec03ea44c0e748cded269538d7b831d354e346
def add_image_version_to_plan(spec: dict, plan_id: str, image_version: str, image_url: str): '\n Add a new image version to a given plan and return a modified offer spec.\n\n The offer spec needs to be fetched upfront from the Azure Marketplace.\n The modified offer spec needs to be pushed to the Azure Mar...
Add a new image version to a given plan and return a modified offer spec. The offer spec needs to be fetched upfront from the Azure Marketplace. The modified offer spec needs to be pushed to the Azure Marketplace.
ci/glci/az.py
add_image_version_to_plan
clyann/gardenlinux
69
python
def add_image_version_to_plan(spec: dict, plan_id: str, image_version: str, image_url: str): '\n Add a new image version to a given plan and return a modified offer spec.\n\n The offer spec needs to be fetched upfront from the Azure Marketplace.\n The modified offer spec needs to be pushed to the Azure Mar...
def add_image_version_to_plan(spec: dict, plan_id: str, image_version: str, image_url: str): '\n Add a new image version to a given plan and return a modified offer spec.\n\n The offer spec needs to be fetched upfront from the Azure Marketplace.\n The modified offer spec needs to be pushed to the Azure Mar...
8c670422625acb3573ea1bc9cb2fb947a48a0ab5bcdbf680cc99ba38a4dde1d9
def remove_image_version_from_plan(spec: dict, plan_id: str, image_version: str, image_url: str): '\n Remove an image version from a given plan and return a modified offer spec.\n\n The offer spec needs to be fetched upfront from the Azure Marketplace.\n The modified offer spec needs to be pushed to the Az...
Remove an image version from a given plan and return a modified offer spec. The offer spec needs to be fetched upfront from the Azure Marketplace. The modified offer spec needs to be pushed to the Azure Marketplace.
ci/glci/az.py
remove_image_version_from_plan
clyann/gardenlinux
69
python
def remove_image_version_from_plan(spec: dict, plan_id: str, image_version: str, image_url: str): '\n Remove an image version from a given plan and return a modified offer spec.\n\n The offer spec needs to be fetched upfront from the Azure Marketplace.\n The modified offer spec needs to be pushed to the Az...
def remove_image_version_from_plan(spec: dict, plan_id: str, image_version: str, image_url: str): '\n Remove an image version from a given plan and return a modified offer spec.\n\n The offer spec needs to be fetched upfront from the Azure Marketplace.\n The modified offer spec needs to be pushed to the Az...
48859fdf4a90ccd445e773148e669d126e633f754d7618f6472326d62e2bff61
def copy_image_from_s3_to_az_storage_account(storage_account_cfg: glci.model.AzureStorageAccountCfg, s3_bucket_name: str, s3_object_key, target_blob_name, s3_client): ' copy object from s3 to storage account and return the generated access url including SAS token\n for the blob\n ' if (not target_blob_nam...
copy object from s3 to storage account and return the generated access url including SAS token for the blob
ci/glci/az.py
copy_image_from_s3_to_az_storage_account
clyann/gardenlinux
69
python
def copy_image_from_s3_to_az_storage_account(storage_account_cfg: glci.model.AzureStorageAccountCfg, s3_bucket_name: str, s3_object_key, target_blob_name, s3_client): ' copy object from s3 to storage account and return the generated access url including SAS token\n for the blob\n ' if (not target_blob_nam...
def copy_image_from_s3_to_az_storage_account(storage_account_cfg: glci.model.AzureStorageAccountCfg, s3_bucket_name: str, s3_object_key, target_blob_name, s3_client): ' copy object from s3 to storage account and return the generated access url including SAS token\n for the blob\n ' if (not target_blob_nam...
d6cfea775192a58ca9ca249ea18870e15d8ce86a62cd7d3e92d8da7cf1ee490e
def check_offer_transport_state(service_principal_cfg: glci.model.AzureServicePrincipalCfg, marketplace_cfg: glci.model.AzureMarketplaceCfg, release: glci.model.OnlineReleaseManifest) -> glci.model.OnlineReleaseManifest: 'Checks the state of the gardenlinux Azure Marketplace offer transport\n\n In case the trans...
Checks the state of the gardenlinux Azure Marketplace offer transport In case the transport to staging enviroment has been succeeded then the transport to production (go live) will be automatically triggered.
ci/glci/az.py
check_offer_transport_state
clyann/gardenlinux
69
python
def check_offer_transport_state(service_principal_cfg: glci.model.AzureServicePrincipalCfg, marketplace_cfg: glci.model.AzureMarketplaceCfg, release: glci.model.OnlineReleaseManifest) -> glci.model.OnlineReleaseManifest: 'Checks the state of the gardenlinux Azure Marketplace offer transport\n\n In case the trans...
def check_offer_transport_state(service_principal_cfg: glci.model.AzureServicePrincipalCfg, marketplace_cfg: glci.model.AzureMarketplaceCfg, release: glci.model.OnlineReleaseManifest) -> glci.model.OnlineReleaseManifest: 'Checks the state of the gardenlinux Azure Marketplace offer transport\n\n In case the trans...
19e70b6df1f1d0b50495f123c3639d9a6f5eab9db179e05296016c3aea9d71c4
def upload_and_publish_image(s3_client, service_principal_cfg: glci.model.AzureServicePrincipalCfg, storage_account_cfg: glci.model.AzureStorageAccountCfg, marketplace_cfg: glci.model.AzureMarketplaceCfg, release: glci.model.OnlineReleaseManifest, notification_emails: typing.Tuple[(str, ...)]) -> glci.model.OnlineRelea...
Copies an image from S3 to an Azure Storage Account, updates the corresponding Azure Marketplace offering and publish the offering.
ci/glci/az.py
upload_and_publish_image
clyann/gardenlinux
69
python
def upload_and_publish_image(s3_client, service_principal_cfg: glci.model.AzureServicePrincipalCfg, storage_account_cfg: glci.model.AzureStorageAccountCfg, marketplace_cfg: glci.model.AzureMarketplaceCfg, release: glci.model.OnlineReleaseManifest, notification_emails: typing.Tuple[(str, ...)]) -> glci.model.OnlineRelea...
def upload_and_publish_image(s3_client, service_principal_cfg: glci.model.AzureServicePrincipalCfg, storage_account_cfg: glci.model.AzureStorageAccountCfg, marketplace_cfg: glci.model.AzureMarketplaceCfg, release: glci.model.OnlineReleaseManifest, notification_emails: typing.Tuple[(str, ...)]) -> glci.model.OnlineRelea...
3e04056fe87b71bd595152042f64c0f00bb903fe6ad2709a3fc92a9e23f9af79
def copy_from_s3(self, s3_client, s3_bucket_name: str, s3_object_key: str, target_blob_name: str): 'Copy an object from Amazon S3 to an Azure Storage Account\n\n This will overwrite the contents of the target file if it already exists.\n ' connection_string = f'DefaultEndpointsProtocol=https;Accou...
Copy an object from Amazon S3 to an Azure Storage Account This will overwrite the contents of the target file if it already exists.
ci/glci/az.py
copy_from_s3
clyann/gardenlinux
69
python
def copy_from_s3(self, s3_client, s3_bucket_name: str, s3_object_key: str, target_blob_name: str): 'Copy an object from Amazon S3 to an Azure Storage Account\n\n This will overwrite the contents of the target file if it already exists.\n ' connection_string = f'DefaultEndpointsProtocol=https;Accou...
def copy_from_s3(self, s3_client, s3_bucket_name: str, s3_object_key: str, target_blob_name: str): 'Copy an object from Amazon S3 to an Azure Storage Account\n\n This will overwrite the contents of the target file if it already exists.\n ' connection_string = f'DefaultEndpointsProtocol=https;Accou...
ac1f6fbbf87dfae11af5ca9365348f92f2f2f6a8db79e939fe4c3bd0615d7c2c
def get_image_url(self, image_name: str): 'Generate an url including sas token to access image in the store.' container_sas = generate_container_sas(account_name=self.sa_name, account_key=self.sa_key, container_name=self.container_name, permission=ContainerSasPermissions(read=True, list=True), start=(datetime.u...
Generate an url including sas token to access image in the store.
ci/glci/az.py
get_image_url
clyann/gardenlinux
69
python
def get_image_url(self, image_name: str): container_sas = generate_container_sas(account_name=self.sa_name, account_key=self.sa_key, container_name=self.container_name, permission=ContainerSasPermissions(read=True, list=True), start=(datetime.utcnow() - timedelta(days=1)), expiry=(datetime.utcnow() + timedelta...
def get_image_url(self, image_name: str): container_sas = generate_container_sas(account_name=self.sa_name, account_key=self.sa_key, container_name=self.container_name, permission=ContainerSasPermissions(read=True, list=True), start=(datetime.utcnow() - timedelta(days=1)), expiry=(datetime.utcnow() + timedelta...
e5dc35f23a4eaa4340c64b1817b9e8579af29e448666c3111b7970649f512b38
def fetch_offer(self, publisher_id: str, offer_id: str): 'Fetch an offer from Azure marketplace.' response = self._request(url=self._api_url(publisher_id, 'offers', offer_id)) self._raise_for_status(response=response, message='Fetching of Azure marketplace offer for gardenlinux failed') offer_spec = res...
Fetch an offer from Azure marketplace.
ci/glci/az.py
fetch_offer
clyann/gardenlinux
69
python
def fetch_offer(self, publisher_id: str, offer_id: str): response = self._request(url=self._api_url(publisher_id, 'offers', offer_id)) self._raise_for_status(response=response, message='Fetching of Azure marketplace offer for gardenlinux failed') offer_spec = response.json() return offer_spec
def fetch_offer(self, publisher_id: str, offer_id: str): response = self._request(url=self._api_url(publisher_id, 'offers', offer_id)) self._raise_for_status(response=response, message='Fetching of Azure marketplace offer for gardenlinux failed') offer_spec = response.json() return offer_spec<|docs...
615bc0f2ee24c58c2da4058469fce4134c83ee84f389e93e0a749073d85da58a
def update_offer(self, publisher_id: str, offer_id: str, spec: dict): 'Update an offer with a give spec.' response = self._request(url=self._api_url(publisher_id, 'offers', offer_id), method='PUT', headers={'If-Match': '*'}, json=spec) self._raise_for_status(response=response, message='Update of Azure marke...
Update an offer with a give spec.
ci/glci/az.py
update_offer
clyann/gardenlinux
69
python
def update_offer(self, publisher_id: str, offer_id: str, spec: dict): response = self._request(url=self._api_url(publisher_id, 'offers', offer_id), method='PUT', headers={'If-Match': '*'}, json=spec) self._raise_for_status(response=response, message='Update of Azure marketplace offer for gardenlinux failed...
def update_offer(self, publisher_id: str, offer_id: str, spec: dict): response = self._request(url=self._api_url(publisher_id, 'offers', offer_id), method='PUT', headers={'If-Match': '*'}, json=spec) self._raise_for_status(response=response, message='Update of Azure marketplace offer for gardenlinux failed...
49247e339888da1384bc86a90e3dca106368dd0cc2f9bf978169b1ac559ffc50
def publish_offer(self, publisher_id: str, offer_id: str, notification_mails=()): 'Trigger (re-)publishing of an offer.' data = {'metadata': {'notification-emails': ','.join(notification_mails)}} res = self._request(method='POST', url=self._api_url(publisher_id, 'offers', offer_id, 'publish'), json=data) ...
Trigger (re-)publishing of an offer.
ci/glci/az.py
publish_offer
clyann/gardenlinux
69
python
def publish_offer(self, publisher_id: str, offer_id: str, notification_mails=()): data = {'metadata': {'notification-emails': ','.join(notification_mails)}} res = self._request(method='POST', url=self._api_url(publisher_id, 'offers', offer_id, 'publish'), json=data) self._raise_for_status(response=res,...
def publish_offer(self, publisher_id: str, offer_id: str, notification_mails=()): data = {'metadata': {'notification-emails': ','.join(notification_mails)}} res = self._request(method='POST', url=self._api_url(publisher_id, 'offers', offer_id, 'publish'), json=data) self._raise_for_status(response=res,...