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
e92fb21e584327249216dadfdff91428f09723c92da1f036bdfb348c7cf78e09
def __all_status_up(self, target_components): '"\n helper function to check the current local statuses of all components.\n Returns boolean value indicating whether all current local\n statuses are UP.\n ' return all(((component.current_status == SERVICE_COMPONENT_STATUS.UP) for comp...
" helper function to check the current local statuses of all components. Returns boolean value indicating whether all current local statuses are UP.
python/orchestrator/health_status_monitor.py
__all_status_up
mfahdaz/EBRAINS-RichEndpoint
1
python
def __all_status_up(self, target_components): '"\n helper function to check the current local statuses of all components.\n Returns boolean value indicating whether all current local\n statuses are UP.\n ' return all(((component.current_status == SERVICE_COMPONENT_STATUS.UP) for comp...
def __all_status_up(self, target_components): '"\n helper function to check the current local statuses of all components.\n Returns boolean value indicating whether all current local\n statuses are UP.\n ' return all(((component.current_status == SERVICE_COMPONENT_STATUS.UP) for comp...
25784d9c35a43371b3044e91fb987f07418d3468710275f58ea23e5eef47a4b4
def __all_have_same_state(self, target_components): '"\n helper function to check the current local states of all components.\n Returns boolean value indicating whether all current local\n states are same.\n ' return all(((component.current_state == target_components[0].current_state...
" helper function to check the current local states of all components. Returns boolean value indicating whether all current local states are same.
python/orchestrator/health_status_monitor.py
__all_have_same_state
mfahdaz/EBRAINS-RichEndpoint
1
python
def __all_have_same_state(self, target_components): '"\n helper function to check the current local states of all components.\n Returns boolean value indicating whether all current local\n states are same.\n ' return all(((component.current_state == target_components[0].current_state...
def __all_have_same_state(self, target_components): '"\n helper function to check the current local states of all components.\n Returns boolean value indicating whether all current local\n states are same.\n ' return all(((component.current_state == target_components[0].current_state...
a32e92bab61af2ced0e3cff79b983d9ef02ece37359a83c231f6ef37767319e9
def validate_local_states(self): '\n checks the current status and the current state of each component.\n If all have the same current state and status as UP\n then, it returns a tuple of proxies of all components\n and the componenets which have states (e.g. Orchestrator,\n Appli...
checks the current status and the current state of each component. If all have the same current state and status as UP then, it returns a tuple of proxies of all components and the componenets which have states (e.g. Orchestrator, Application Companions). Otherwise, it returns a tuple of None.
python/orchestrator/health_status_monitor.py
validate_local_states
mfahdaz/EBRAINS-RichEndpoint
1
python
def validate_local_states(self): '\n checks the current status and the current state of each component.\n If all have the same current state and status as UP\n then, it returns a tuple of proxies of all components\n and the componenets which have states (e.g. Orchestrator,\n Appli...
def validate_local_states(self): '\n checks the current status and the current state of each component.\n If all have the same current state and status as UP\n then, it returns a tuple of proxies of all components\n and the componenets which have states (e.g. Orchestrator,\n Appli...
bbd94b816c2bbf15f16217c5cc0992456fb78a5209c680b21b04b66681771278
def __monitor_health_status(self): '\n Monitors the current status and the current state of each component.\n Raises an alarm signal, if local states are in-consistent.\n ' counter = self.__counter while self.__keep_monitoring: if (self.validate_local_states() == (None, None)): ...
Monitors the current status and the current state of each component. Raises an alarm signal, if local states are in-consistent.
python/orchestrator/health_status_monitor.py
__monitor_health_status
mfahdaz/EBRAINS-RichEndpoint
1
python
def __monitor_health_status(self): '\n Monitors the current status and the current state of each component.\n Raises an alarm signal, if local states are in-consistent.\n ' counter = self.__counter while self.__keep_monitoring: if (self.validate_local_states() == (None, None)): ...
def __monitor_health_status(self): '\n Monitors the current status and the current state of each component.\n Raises an alarm signal, if local states are in-consistent.\n ' counter = self.__counter while self.__keep_monitoring: if (self.validate_local_states() == (None, None)): ...
0bc66421c15b61ad9667f6f80b7e585291c034125f95ec2ec5fa8c6d13acb2f4
def start_monitoring(self): '\n Creates a thread to monitor the local states and statuses\n to validate and transition of the global state.\n ' health_status_monitor = threading.Thread(name='health and status monitor', target=self.__monitor_health_status) health_status_monitor.daemon = ...
Creates a thread to monitor the local states and statuses to validate and transition of the global state.
python/orchestrator/health_status_monitor.py
start_monitoring
mfahdaz/EBRAINS-RichEndpoint
1
python
def start_monitoring(self): '\n Creates a thread to monitor the local states and statuses\n to validate and transition of the global state.\n ' health_status_monitor = threading.Thread(name='health and status monitor', target=self.__monitor_health_status) health_status_monitor.daemon = ...
def start_monitoring(self): '\n Creates a thread to monitor the local states and statuses\n to validate and transition of the global state.\n ' health_status_monitor = threading.Thread(name='health and status monitor', target=self.__monitor_health_status) health_status_monitor.daemon = ...
7725b384d3f3af1cdabcf5fd6e5fb97704e2c3cf37f0a996f5d6a9f453f6fe11
def __init__(self, x, y, host, port, tag, strip): '\n :param x: The x-coordinate of a chip, between 0 and 255\n :type x: int\n :param y: The y-coordinate of a chip, between 0 and 255\n :type y: int\n :param host: The host address, as an array of 4 bytes\n :type host: bytear...
:param x: The x-coordinate of a chip, between 0 and 255 :type x: int :param y: The y-coordinate of a chip, between 0 and 255 :type y: int :param host: The host address, as an array of 4 bytes :type host: bytearray :param port: The port, between 0 and 65535 :type port: int :param tag: The tag, between 0 and 7 :type tag:...
src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spinnman/messages/scp/impl/scp_iptag_set_request.py
__init__
Roboy/LSM_SpiNNaker_MyoArm
2
python
def __init__(self, x, y, host, port, tag, strip): '\n :param x: The x-coordinate of a chip, between 0 and 255\n :type x: int\n :param y: The y-coordinate of a chip, between 0 and 255\n :type y: int\n :param host: The host address, as an array of 4 bytes\n :type host: bytear...
def __init__(self, x, y, host, port, tag, strip): '\n :param x: The x-coordinate of a chip, between 0 and 255\n :type x: int\n :param y: The y-coordinate of a chip, between 0 and 255\n :type y: int\n :param host: The host address, as an array of 4 bytes\n :type host: bytear...
87a28882f1403834be39a3a8168e55c8bfcb91ca985078e24217243eadd3046e
def test_approve_notebooks_for_publishing(self): 'Test case for approve_notebooks_for_publishing\n\n \n ' notebook_ids = [List[str]()] response = self.client.open('/apis/v1alpha1/notebooks/publish_approved', method='POST', data=json.dumps(notebook_ids), content_type='application/json') sel...
Test case for approve_notebooks_for_publishing
api/server/swagger_server/test/test_notebook_service_controller.py
test_approve_notebooks_for_publishing
srishtipithadia/mlx
0
python
def test_approve_notebooks_for_publishing(self): '\n\n \n ' notebook_ids = [List[str]()] response = self.client.open('/apis/v1alpha1/notebooks/publish_approved', method='POST', data=json.dumps(notebook_ids), content_type='application/json') self.assert200(response, ('Response body is : ' +...
def test_approve_notebooks_for_publishing(self): '\n\n \n ' notebook_ids = [List[str]()] response = self.client.open('/apis/v1alpha1/notebooks/publish_approved', method='POST', data=json.dumps(notebook_ids), content_type='application/json') self.assert200(response, ('Response body is : ' +...
72cf92a5718116af053cd42d4f35cb37589abf40b1015f8349813e0f62c60a38
def test_create_notebook(self): 'Test case for create_notebook\n\n \n ' body = ApiNotebook() response = self.client.open('/apis/v1alpha1/notebooks', method='POST', data=json.dumps(body), content_type='application/json') self.assert200(response, ('Response body is : ' + response.data.decode...
Test case for create_notebook
api/server/swagger_server/test/test_notebook_service_controller.py
test_create_notebook
srishtipithadia/mlx
0
python
def test_create_notebook(self): '\n\n \n ' body = ApiNotebook() response = self.client.open('/apis/v1alpha1/notebooks', method='POST', data=json.dumps(body), content_type='application/json') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))
def test_create_notebook(self): '\n\n \n ' body = ApiNotebook() response = self.client.open('/apis/v1alpha1/notebooks', method='POST', data=json.dumps(body), content_type='application/json') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))<|docstring|>Test ...
bb991616894c62ada8c8b5136ee599448d22bc1a52275e0f6bfd8361c611c3ec
def test_delete_notebook(self): 'Test case for delete_notebook\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}'.format(id='id_example'), method='DELETE') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))
Test case for delete_notebook
api/server/swagger_server/test/test_notebook_service_controller.py
test_delete_notebook
srishtipithadia/mlx
0
python
def test_delete_notebook(self): '\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}'.format(id='id_example'), method='DELETE') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))
def test_delete_notebook(self): '\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}'.format(id='id_example'), method='DELETE') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))<|docstring|>Test case for delete_notebook<|endoftext|>
66822e3b6ad8fa1373ac40fd17abb56825ab1df9f7c5e7caf20d667d81138888
def test_download_notebook_files(self): 'Test case for download_notebook_files\n\n Returns the notebook artifacts compressed into a .tgz (.tar.gz) file.\n ' query_string = [('include_generated_code', False)] response = self.client.open('/apis/v1alpha1/notebooks/{id}/download'.format(id='id_exa...
Test case for download_notebook_files Returns the notebook artifacts compressed into a .tgz (.tar.gz) file.
api/server/swagger_server/test/test_notebook_service_controller.py
test_download_notebook_files
srishtipithadia/mlx
0
python
def test_download_notebook_files(self): 'Test case for download_notebook_files\n\n Returns the notebook artifacts compressed into a .tgz (.tar.gz) file.\n ' query_string = [('include_generated_code', False)] response = self.client.open('/apis/v1alpha1/notebooks/{id}/download'.format(id='id_exa...
def test_download_notebook_files(self): 'Test case for download_notebook_files\n\n Returns the notebook artifacts compressed into a .tgz (.tar.gz) file.\n ' query_string = [('include_generated_code', False)] response = self.client.open('/apis/v1alpha1/notebooks/{id}/download'.format(id='id_exa...
915ab54660ade642ae264d82536b1f0640de17a95de0e980a741f5d31b62e84c
def test_generate_notebook_code(self): 'Test case for generate_notebook_code\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}/generate_code'.format(id='id_example'), method='GET') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))
Test case for generate_notebook_code
api/server/swagger_server/test/test_notebook_service_controller.py
test_generate_notebook_code
srishtipithadia/mlx
0
python
def test_generate_notebook_code(self): '\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}/generate_code'.format(id='id_example'), method='GET') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))
def test_generate_notebook_code(self): '\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}/generate_code'.format(id='id_example'), method='GET') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))<|docstring|>Test case for generate_notebook_code<...
ad85d6d875c1490dd6e75f3dd6e344a84b5cb52642441083655db066a5f75fd0
def test_get_notebook(self): 'Test case for get_notebook\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}'.format(id='id_example'), method='GET') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))
Test case for get_notebook
api/server/swagger_server/test/test_notebook_service_controller.py
test_get_notebook
srishtipithadia/mlx
0
python
def test_get_notebook(self): '\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}'.format(id='id_example'), method='GET') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))
def test_get_notebook(self): '\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}'.format(id='id_example'), method='GET') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))<|docstring|>Test case for get_notebook<|endoftext|>
e495cb5b203f886b16f8c7f8f501427be08a47b80b224f2aa10d0a969466de4c
def test_get_notebook_template(self): 'Test case for get_notebook_template\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}/templates'.format(id='id_example'), method='GET') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))
Test case for get_notebook_template
api/server/swagger_server/test/test_notebook_service_controller.py
test_get_notebook_template
srishtipithadia/mlx
0
python
def test_get_notebook_template(self): '\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}/templates'.format(id='id_example'), method='GET') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))
def test_get_notebook_template(self): '\n\n \n ' response = self.client.open('/apis/v1alpha1/notebooks/{id}/templates'.format(id='id_example'), method='GET') self.assert200(response, ('Response body is : ' + response.data.decode('utf-8')))<|docstring|>Test case for get_notebook_template<|endof...
0ad50b45359061692e639e3000cead992be538b68296210a319a2a16837683f4
def test_list_notebooks(self): 'Test case for list_notebooks\n\n \n ' query_string = [('page_token', 'page_token_example'), ('page_size', 56), ('sort_by', 'name'), ('filter', '{"name": "test"}')] response = self.client.open('/apis/v1alpha1/notebooks', method='GET', query_string=query_string) ...
Test case for list_notebooks
api/server/swagger_server/test/test_notebook_service_controller.py
test_list_notebooks
srishtipithadia/mlx
0
python
def test_list_notebooks(self): '\n\n \n ' query_string = [('page_token', 'page_token_example'), ('page_size', 56), ('sort_by', 'name'), ('filter', '{"name": "test"}')] response = self.client.open('/apis/v1alpha1/notebooks', method='GET', query_string=query_string) self.assert200(response, ...
def test_list_notebooks(self): '\n\n \n ' query_string = [('page_token', 'page_token_example'), ('page_size', 56), ('sort_by', 'name'), ('filter', '{"name": "test"}')] response = self.client.open('/apis/v1alpha1/notebooks', method='GET', query_string=query_string) self.assert200(response, ...
968a64433baa9fba23678e2f5f55d36694a912c2703159a593157439868b76ff
def test_run_notebook(self): 'Test case for run_notebook\n\n \n ' query_string = [('run_name', 'run_name_example')] response = self.client.open('/apis/v1alpha1/notebooks/{id}/run'.format(id='id_example'), method='POST', query_string=query_string) self.assert200(response, ('Response body is...
Test case for run_notebook
api/server/swagger_server/test/test_notebook_service_controller.py
test_run_notebook
srishtipithadia/mlx
0
python
def test_run_notebook(self): '\n\n \n ' query_string = [('run_name', 'run_name_example')] response = self.client.open('/apis/v1alpha1/notebooks/{id}/run'.format(id='id_example'), method='POST', query_string=query_string) self.assert200(response, ('Response body is : ' + response.data.decod...
def test_run_notebook(self): '\n\n \n ' query_string = [('run_name', 'run_name_example')] response = self.client.open('/apis/v1alpha1/notebooks/{id}/run'.format(id='id_example'), method='POST', query_string=query_string) self.assert200(response, ('Response body is : ' + response.data.decod...
9936dbbca60010beb879619bdc44a71857374462564b523e848418e0b5f74234
def test_set_featured_notebooks(self): 'Test case for set_featured_notebooks\n\n \n ' notebook_ids = [List[str]()] response = self.client.open('/apis/v1alpha1/notebooks/featured', method='POST', data=json.dumps(notebook_ids), content_type='application/json') self.assert200(response, ('Resp...
Test case for set_featured_notebooks
api/server/swagger_server/test/test_notebook_service_controller.py
test_set_featured_notebooks
srishtipithadia/mlx
0
python
def test_set_featured_notebooks(self): '\n\n \n ' notebook_ids = [List[str]()] response = self.client.open('/apis/v1alpha1/notebooks/featured', method='POST', data=json.dumps(notebook_ids), content_type='application/json') self.assert200(response, ('Response body is : ' + response.data.dec...
def test_set_featured_notebooks(self): '\n\n \n ' notebook_ids = [List[str]()] response = self.client.open('/apis/v1alpha1/notebooks/featured', method='POST', data=json.dumps(notebook_ids), content_type='application/json') self.assert200(response, ('Response body is : ' + response.data.dec...
29191bb5c6fae70e86d20a7b2be01d5eb7183055bc97436fdb5c949739ad8a2f
def test_upload_notebook(self): 'Test case for upload_notebook\n\n \n ' query_string = [('name', 'name_example')] data = dict(uploadfile=(BytesIO(b'some file data'), 'file.txt')) response = self.client.open('/apis/v1alpha1/notebooks/upload', method='POST', data=data, content_type='multipar...
Test case for upload_notebook
api/server/swagger_server/test/test_notebook_service_controller.py
test_upload_notebook
srishtipithadia/mlx
0
python
def test_upload_notebook(self): '\n\n \n ' query_string = [('name', 'name_example')] data = dict(uploadfile=(BytesIO(b'some file data'), 'file.txt')) response = self.client.open('/apis/v1alpha1/notebooks/upload', method='POST', data=data, content_type='multipart/form-data', query_string=qu...
def test_upload_notebook(self): '\n\n \n ' query_string = [('name', 'name_example')] data = dict(uploadfile=(BytesIO(b'some file data'), 'file.txt')) response = self.client.open('/apis/v1alpha1/notebooks/upload', method='POST', data=data, content_type='multipart/form-data', query_string=qu...
2a006abd18c2198867126d40b2b32d0065da2a8206e061031e878778a0ec9bd8
def test_upload_notebook_file(self): 'Test case for upload_notebook_file\n\n \n ' data = dict(uploadfile=(BytesIO(b'some file data'), 'file.txt')) response = self.client.open('/apis/v1alpha1/notebooks/{id}/upload'.format(id='id_example'), method='POST', data=data, content_type='multipart/form-...
Test case for upload_notebook_file
api/server/swagger_server/test/test_notebook_service_controller.py
test_upload_notebook_file
srishtipithadia/mlx
0
python
def test_upload_notebook_file(self): '\n\n \n ' data = dict(uploadfile=(BytesIO(b'some file data'), 'file.txt')) response = self.client.open('/apis/v1alpha1/notebooks/{id}/upload'.format(id='id_example'), method='POST', data=data, content_type='multipart/form-data') self.assert200(response...
def test_upload_notebook_file(self): '\n\n \n ' data = dict(uploadfile=(BytesIO(b'some file data'), 'file.txt')) response = self.client.open('/apis/v1alpha1/notebooks/{id}/upload'.format(id='id_example'), method='POST', data=data, content_type='multipart/form-data') self.assert200(response...
fb7b22ed082a69a9d390dc90cb1c0c67d7a39a61476c6fc0f384ea21551763f5
def rearrange(blist, flist): 'Alligns the number of evaluations taken from the blist with the\n corresponding flist' final_b = [] final_f = [] for i in range(0, len(blist)): erg_b = numpy.empty(0, float) erg_f = [numpy.empty(0, float), numpy.empty(0, float), numpy.empty(0, float)] ...
Alligns the number of evaluations taken from the blist with the corresponding flist
code-postprocessing/build/lib/bbob_pproc/ppconverrorbars.py
rearrange
akhoufi/Optimization-Algo-2
0
python
def rearrange(blist, flist): 'Alligns the number of evaluations taken from the blist with the\n corresponding flist' final_b = [] final_f = [] for i in range(0, len(blist)): erg_b = numpy.empty(0, float) erg_f = [numpy.empty(0, float), numpy.empty(0, float), numpy.empty(0, float)] ...
def rearrange(blist, flist): 'Alligns the number of evaluations taken from the blist with the\n corresponding flist' final_b = [] final_f = [] for i in range(0, len(blist)): erg_b = numpy.empty(0, float) erg_f = [numpy.empty(0, float), numpy.empty(0, float), numpy.empty(0, float)] ...
41e0e442745643d1892ce4d4339de48984e4c9a6441af2646c9a73d3530e4c92
def main(dictAlg, isBiobjective, outputdir='.', verbose=True, parentHtmlFileName=None): 'Main routine for generating convergence plots\n\n ' global warned dictFun = pproc.dictAlgByFun(dictAlg) for l in dictFun: for i in dictFun[l]: plt.figure() if (1 < 3): ...
Main routine for generating convergence plots
code-postprocessing/build/lib/bbob_pproc/ppconverrorbars.py
main
akhoufi/Optimization-Algo-2
0
python
def main(dictAlg, isBiobjective, outputdir='.', verbose=True, parentHtmlFileName=None): '\n\n ' global warned dictFun = pproc.dictAlgByFun(dictAlg) for l in dictFun: for i in dictFun[l]: plt.figure() if (1 < 3): figurename = ('ppconv_' + ('f%03d' % l)) ...
def main(dictAlg, isBiobjective, outputdir='.', verbose=True, parentHtmlFileName=None): '\n\n ' global warned dictFun = pproc.dictAlgByFun(dictAlg) for l in dictFun: for i in dictFun[l]: plt.figure() if (1 < 3): figurename = ('ppconv_' + ('f%03d' % l)) ...
1471bae63622b1e92d9b212a0f93d4eaa30acbf737daf1427835fe4f5f63b843
def test_quoting(self): "\n #9655 - Check urlize doesn't overquote already quoted urls. The\n teststring is the urlquoted version of 'http://hi.baidu.com/重新开始'\n " self.assertEqual(urlize('http://hi.baidu.com/%E9%87%8D%E6%96%B0%E5%BC%80%E5%A7%8B'), '<a href="http://hi.baidu.com/%E9%87%8D%E6...
#9655 - Check urlize doesn't overquote already quoted urls. The teststring is the urlquoted version of 'http://hi.baidu.com/重新开始'
tests/template_tests/filter_tests/test_urlize.py
test_quoting
mavisguan/django
61,676
python
def test_quoting(self): "\n #9655 - Check urlize doesn't overquote already quoted urls. The\n teststring is the urlquoted version of 'http://hi.baidu.com/重新开始'\n " self.assertEqual(urlize('http://hi.baidu.com/%E9%87%8D%E6%96%B0%E5%BC%80%E5%A7%8B'), '<a href="http://hi.baidu.com/%E9%87%8D%E6...
def test_quoting(self): "\n #9655 - Check urlize doesn't overquote already quoted urls. The\n teststring is the urlquoted version of 'http://hi.baidu.com/重新开始'\n " self.assertEqual(urlize('http://hi.baidu.com/%E9%87%8D%E6%96%B0%E5%BC%80%E5%A7%8B'), '<a href="http://hi.baidu.com/%E9%87%8D%E6...
c557cbcd82c2bcbc2c3954a184c62057fb085c650155eb44e85edd6396ca638b
def test_parenthesis(self): '\n #11911 - Check urlize keeps balanced parentheses\n ' self.assertEqual(urlize('https://en.wikipedia.org/wiki/Django_(web_framework)'), '<a href="https://en.wikipedia.org/wiki/Django_(web_framework)" rel="nofollow">https://en.wikipedia.org/wiki/Django_(web_framework)<...
#11911 - Check urlize keeps balanced parentheses
tests/template_tests/filter_tests/test_urlize.py
test_parenthesis
mavisguan/django
61,676
python
def test_parenthesis(self): '\n \n ' self.assertEqual(urlize('https://en.wikipedia.org/wiki/Django_(web_framework)'), '<a href="https://en.wikipedia.org/wiki/Django_(web_framework)" rel="nofollow">https://en.wikipedia.org/wiki/Django_(web_framework)</a>') self.assertEqual(urlize('(see https://...
def test_parenthesis(self): '\n \n ' self.assertEqual(urlize('https://en.wikipedia.org/wiki/Django_(web_framework)'), '<a href="https://en.wikipedia.org/wiki/Django_(web_framework)" rel="nofollow">https://en.wikipedia.org/wiki/Django_(web_framework)</a>') self.assertEqual(urlize('(see https://...
338835bd1b8446cd5c8943ced831cf275dfbf8988136de2e4b6486ed2d596fb9
def test_nofollow(self): '\n #12183 - Check urlize adds nofollow properly - see #12183\n ' self.assertEqual(urlize('example@example.com or www.bar.com'), '<a href="mailto:example@example.com">foo@bar.com</a> or <a href="http://www.bar.com" rel="nofollow">www.bar.com</a>')
#12183 - Check urlize adds nofollow properly - see #12183
tests/template_tests/filter_tests/test_urlize.py
test_nofollow
mavisguan/django
61,676
python
def test_nofollow(self): '\n \n ' self.assertEqual(urlize('example@example.com or www.bar.com'), '<a href="mailto:example@example.com">foo@bar.com</a> or <a href="http://www.bar.com" rel="nofollow">www.bar.com</a>')
def test_nofollow(self): '\n \n ' self.assertEqual(urlize('example@example.com or www.bar.com'), '<a href="mailto:example@example.com">foo@bar.com</a> or <a href="http://www.bar.com" rel="nofollow">www.bar.com</a>')<|docstring|>#12183 - Check urlize adds nofollow properly - see #12183<|endoftext|>
f5d7349c86b97dc1027acafc10b46207d4272ebad7c490087bd93fa7f7c94d16
def test_idn(self): '\n #13704 - Check urlize handles IDN correctly\n ' self.assertEqual(urlize('http://c✶.ws'), '<a href="http://xn--c-lgq.ws" rel="nofollow">http://c✶.ws</a>') self.assertEqual(urlize('www.c✶.ws'), '<a href="http://www.xn--c-lgq.ws" rel="nofollow">www.c✶.ws</a>') self.ass...
#13704 - Check urlize handles IDN correctly
tests/template_tests/filter_tests/test_urlize.py
test_idn
mavisguan/django
61,676
python
def test_idn(self): '\n \n ' self.assertEqual(urlize('http://c✶.ws'), '<a href="http://xn--c-lgq.ws" rel="nofollow">http://c✶.ws</a>') self.assertEqual(urlize('www.c✶.ws'), '<a href="http://www.xn--c-lgq.ws" rel="nofollow">www.c✶.ws</a>') self.assertEqual(urlize('c✶.org'), '<a href="http:/...
def test_idn(self): '\n \n ' self.assertEqual(urlize('http://c✶.ws'), '<a href="http://xn--c-lgq.ws" rel="nofollow">http://c✶.ws</a>') self.assertEqual(urlize('www.c✶.ws'), '<a href="http://www.xn--c-lgq.ws" rel="nofollow">www.c✶.ws</a>') self.assertEqual(urlize('c✶.org'), '<a href="http:/...
79714eee4748ef516e6cf599a36001f910be92169542c1783afabf1c3def891e
def test_malformed(self): "\n #16395 - Check urlize doesn't highlight malformed URIs\n " self.assertEqual(urlize('http:///www.google.com'), 'http:///www.google.com') self.assertEqual(urlize('http://.google.com'), 'http://.google.com') self.assertEqual(urlize('http:example@example.com'), 'h...
#16395 - Check urlize doesn't highlight malformed URIs
tests/template_tests/filter_tests/test_urlize.py
test_malformed
mavisguan/django
61,676
python
def test_malformed(self): "\n \n " self.assertEqual(urlize('http:///www.google.com'), 'http:///www.google.com') self.assertEqual(urlize('http://.google.com'), 'http://.google.com') self.assertEqual(urlize('http:example@example.com'), 'http:example@example.com')
def test_malformed(self): "\n \n " self.assertEqual(urlize('http:///www.google.com'), 'http:///www.google.com') self.assertEqual(urlize('http://.google.com'), 'http://.google.com') self.assertEqual(urlize('http:example@example.com'), 'http:example@example.com')<|docstring|>#16395 - Check u...
f51adce683389f85c8fc24fe0f5070e80fba9387d142d2fa42d20bca0c75f53d
def test_tlds(self): '\n #16656 - Check urlize accepts more TLDs\n ' self.assertEqual(urlize('usa.gov'), '<a href="http://usa.gov" rel="nofollow">usa.gov</a>')
#16656 - Check urlize accepts more TLDs
tests/template_tests/filter_tests/test_urlize.py
test_tlds
mavisguan/django
61,676
python
def test_tlds(self): '\n \n ' self.assertEqual(urlize('usa.gov'), '<a href="http://usa.gov" rel="nofollow">usa.gov</a>')
def test_tlds(self): '\n \n ' self.assertEqual(urlize('usa.gov'), '<a href="http://usa.gov" rel="nofollow">usa.gov</a>')<|docstring|>#16656 - Check urlize accepts more TLDs<|endoftext|>
4a6f2a4ea2e1ebec25cbac3fb4172fcd3bf2489d48e21c21eb91ae294b5d1f51
def test_invalid_email(self): "\n #17592 - Check urlize don't crash on invalid email with dot-starting\n domain\n " self.assertEqual(urlize('example@example.com'), 'example@example.com')
#17592 - Check urlize don't crash on invalid email with dot-starting domain
tests/template_tests/filter_tests/test_urlize.py
test_invalid_email
mavisguan/django
61,676
python
def test_invalid_email(self): "\n #17592 - Check urlize don't crash on invalid email with dot-starting\n domain\n " self.assertEqual(urlize('example@example.com'), 'example@example.com')
def test_invalid_email(self): "\n #17592 - Check urlize don't crash on invalid email with dot-starting\n domain\n " self.assertEqual(urlize('example@example.com'), 'example@example.com')<|docstring|>#17592 - Check urlize don't crash on invalid email with dot-starting domain<|endoftext|>
86444dcce18b6b29180ac5b06e1a71e54051e8ee214cbfa888818607d3c99aa1
def test_uppercase(self): '\n #18071 - Check urlize accepts uppercased URL schemes\n ' self.assertEqual(urlize('HTTPS://github.com/'), '<a href="https://github.com/" rel="nofollow">HTTPS://github.com/</a>')
#18071 - Check urlize accepts uppercased URL schemes
tests/template_tests/filter_tests/test_urlize.py
test_uppercase
mavisguan/django
61,676
python
def test_uppercase(self): '\n \n ' self.assertEqual(urlize('HTTPS://github.com/'), '<a href="https://github.com/" rel="nofollow">HTTPS://github.com/</a>')
def test_uppercase(self): '\n \n ' self.assertEqual(urlize('HTTPS://github.com/'), '<a href="https://github.com/" rel="nofollow">HTTPS://github.com/</a>')<|docstring|>#18071 - Check urlize accepts uppercased URL schemes<|endoftext|>
6da4db0bf2abaffe9ac059bba5fec3c917206dba81a6e3eb567b3b75835a84f7
def test_trailing_period(self): '\n #18644 - Check urlize trims trailing period when followed by parenthesis\n ' self.assertEqual(urlize('(Go to http://www.example.com/foo.)'), '(Go to <a href="http://www.example.com/foo" rel="nofollow">http://www.example.com/foo</a>.)')
#18644 - Check urlize trims trailing period when followed by parenthesis
tests/template_tests/filter_tests/test_urlize.py
test_trailing_period
mavisguan/django
61,676
python
def test_trailing_period(self): '\n \n ' self.assertEqual(urlize('(Go to http://www.example.com/foo.)'), '(Go to <a href="http://www.example.com/foo" rel="nofollow">http://www.example.com/foo</a>.)')
def test_trailing_period(self): '\n \n ' self.assertEqual(urlize('(Go to http://www.example.com/foo.)'), '(Go to <a href="http://www.example.com/foo" rel="nofollow">http://www.example.com/foo</a>.)')<|docstring|>#18644 - Check urlize trims trailing period when followed by parenthesis<|endoftext|>
be77e7c02ae02b5e4c9449325da417dd6b4789db452c63d04ea0fe7297191b28
def test_brackets(self): '\n #19070 - Check urlize handles brackets properly\n ' self.assertEqual(urlize('[see www.example.com]'), '[see <a href="http://www.example.com" rel="nofollow">www.example.com</a>]') self.assertEqual(urlize('see test[at[example.com'), 'see <a href="http://test[at[examp...
#19070 - Check urlize handles brackets properly
tests/template_tests/filter_tests/test_urlize.py
test_brackets
mavisguan/django
61,676
python
def test_brackets(self): '\n \n ' self.assertEqual(urlize('[see www.example.com]'), '[see <a href="http://www.example.com" rel="nofollow">www.example.com</a>]') self.assertEqual(urlize('see test[at[example.com'), 'see <a href="http://test[at[example.com" rel="nofollow">test[at[example.com</a>'...
def test_brackets(self): '\n \n ' self.assertEqual(urlize('[see www.example.com]'), '[see <a href="http://www.example.com" rel="nofollow">www.example.com</a>]') self.assertEqual(urlize('see test[at[example.com'), 'see <a href="http://test[at[example.com" rel="nofollow">test[at[example.com</a>'...
943ff80ea919563c2f208dbcd2a05726c61e33088c56713059bb992b62ce4b1e
def test_quotation_marks(self): '\n #20364 - Check urlize correctly include quotation marks in links\n ' self.assertEqual(urlize('before "example@example.com" afterward', autoescape=False), 'before "<a href="mailto:example@example.com">hi@example.com</a>" afterward') self.assertEqual(urlize('b...
#20364 - Check urlize correctly include quotation marks in links
tests/template_tests/filter_tests/test_urlize.py
test_quotation_marks
mavisguan/django
61,676
python
def test_quotation_marks(self): '\n \n ' self.assertEqual(urlize('before "example@example.com" afterward', autoescape=False), 'before "<a href="mailto:example@example.com">hi@example.com</a>" afterward') self.assertEqual(urlize('before example@example.com" afterward', autoescape=False), 'befor...
def test_quotation_marks(self): '\n \n ' self.assertEqual(urlize('before "example@example.com" afterward', autoescape=False), 'before "<a href="mailto:example@example.com">hi@example.com</a>" afterward') self.assertEqual(urlize('before example@example.com" afterward', autoescape=False), 'befor...
3f18b77c9717a009ff7ee397d534d005592ac7f529c71407c716ec7430f87a77
def test_quote_commas(self): '\n #20364 - Check urlize copes with commas following URLs in quotes\n ' self.assertEqual(urlize('Email us at "example@example.com", or phone us at +xx.yy', autoescape=False), 'Email us at "<a href="mailto:example@example.com">hi@example.com</a>", or phone us at +xx.yy...
#20364 - Check urlize copes with commas following URLs in quotes
tests/template_tests/filter_tests/test_urlize.py
test_quote_commas
mavisguan/django
61,676
python
def test_quote_commas(self): '\n \n ' self.assertEqual(urlize('Email us at "example@example.com", or phone us at +xx.yy', autoescape=False), 'Email us at "<a href="mailto:example@example.com">hi@example.com</a>", or phone us at +xx.yy')
def test_quote_commas(self): '\n \n ' self.assertEqual(urlize('Email us at "example@example.com", or phone us at +xx.yy', autoescape=False), 'Email us at "<a href="mailto:example@example.com">hi@example.com</a>", or phone us at +xx.yy')<|docstring|>#20364 - Check urlize copes with commas following...
dee5f9d2422ce36aeaadf8aaffef34a6be9947461e6c82e4ae60f9e987b79cf7
def test_exclamation_marks(self): '\n #23715 - Check urlize correctly handles exclamation marks after TLDs\n or query string\n ' self.assertEqual(urlize('Go to djangoproject.com! and enjoy.'), 'Go to <a href="http://djangoproject.com" rel="nofollow">djangoproject.com</a>! and enjoy.') s...
#23715 - Check urlize correctly handles exclamation marks after TLDs or query string
tests/template_tests/filter_tests/test_urlize.py
test_exclamation_marks
mavisguan/django
61,676
python
def test_exclamation_marks(self): '\n #23715 - Check urlize correctly handles exclamation marks after TLDs\n or query string\n ' self.assertEqual(urlize('Go to djangoproject.com! and enjoy.'), 'Go to <a href="http://djangoproject.com" rel="nofollow">djangoproject.com</a>! and enjoy.') s...
def test_exclamation_marks(self): '\n #23715 - Check urlize correctly handles exclamation marks after TLDs\n or query string\n ' self.assertEqual(urlize('Go to djangoproject.com! and enjoy.'), 'Go to <a href="http://djangoproject.com" rel="nofollow">djangoproject.com</a>! and enjoy.') s...
dc289d4eab5b322b03c1b1a54393b55d8f65c2eb90f0eab111e18dfae21e8386
def __init__(self, name='', desc='', machine=(- 1), input=(- 1), logger_name='Pyleecan.Simulation', var_simu=None, postproc_list=(- 1), index=None, path_result=None, layer=None, layer_log_warn=None, init_dict=None, init_str=None): 'Constructor of the class. Can be use in three ways :\n - __init__ (arg1 = 1, ...
Constructor of the class. Can be use in three ways : - __init__ (arg1 = 1, arg3 = 5) every parameters have name and default values for pyleecan type, -1 will call the default constructor - __init__ (init_dict = d) d must be a dictionary with property names as keys - __init__ (init_str = s) s must be a string s is t...
pyleecan/Classes/Simulation.py
__init__
EmileDvs/pyleecan
95
python
def __init__(self, name=, desc=, machine=(- 1), input=(- 1), logger_name='Pyleecan.Simulation', var_simu=None, postproc_list=(- 1), index=None, path_result=None, layer=None, layer_log_warn=None, init_dict=None, init_str=None): 'Constructor of the class. Can be use in three ways :\n - __init__ (arg1 = 1, arg3...
def __init__(self, name=, desc=, machine=(- 1), input=(- 1), logger_name='Pyleecan.Simulation', var_simu=None, postproc_list=(- 1), index=None, path_result=None, layer=None, layer_log_warn=None, init_dict=None, init_str=None): 'Constructor of the class. Can be use in three ways :\n - __init__ (arg1 = 1, arg3...
b4037e2d9501f1807be576f2c9110d04fed673b6ced925b7b467cde5d86ebbc1
def __str__(self): 'Convert this object in a readeable string (for print)' Simulation_str = '' if (self.parent is None): Simulation_str += ('parent = None ' + linesep) else: Simulation_str += ((('parent = ' + str(type(self.parent))) + ' object') + linesep) Simulation_str += ((('name ...
Convert this object in a readeable string (for print)
pyleecan/Classes/Simulation.py
__str__
EmileDvs/pyleecan
95
python
def __str__(self): Simulation_str = if (self.parent is None): Simulation_str += ('parent = None ' + linesep) else: Simulation_str += ((('parent = ' + str(type(self.parent))) + ' object') + linesep) Simulation_str += ((('name = "' + str(self.name)) + '"') + linesep) Simulation_s...
def __str__(self): Simulation_str = if (self.parent is None): Simulation_str += ('parent = None ' + linesep) else: Simulation_str += ((('parent = ' + str(type(self.parent))) + ' object') + linesep) Simulation_str += ((('name = "' + str(self.name)) + '"') + linesep) Simulation_s...
87f41efad805a62ac275b477084c09f162f8b57a127199a74a0827e4d4e4d1c7
def __eq__(self, other): 'Compare two objects (skip parent)' if (type(other) != type(self)): return False if (other.name != self.name): return False if (other.desc != self.desc): return False if (other.machine != self.machine): return False if (other.input != self...
Compare two objects (skip parent)
pyleecan/Classes/Simulation.py
__eq__
EmileDvs/pyleecan
95
python
def __eq__(self, other): if (type(other) != type(self)): return False if (other.name != self.name): return False if (other.desc != self.desc): return False if (other.machine != self.machine): return False if (other.input != self.input): return False i...
def __eq__(self, other): if (type(other) != type(self)): return False if (other.name != self.name): return False if (other.desc != self.desc): return False if (other.machine != self.machine): return False if (other.input != self.input): return False i...
866b0d6c4d059732011aafe9faca8250460f8ee6c99266786022d9a35ae3b61f
def compare(self, other, name='self', ignore_list=None): 'Compare two objects and return list of differences' if (ignore_list is None): ignore_list = list() if (type(other) != type(self)): return [(('type(' + name) + ')')] diff_list = list() if (other._name != self._name): di...
Compare two objects and return list of differences
pyleecan/Classes/Simulation.py
compare
EmileDvs/pyleecan
95
python
def compare(self, other, name='self', ignore_list=None): if (ignore_list is None): ignore_list = list() if (type(other) != type(self)): return [(('type(' + name) + ')')] diff_list = list() if (other._name != self._name): diff_list.append((name + '.name')) if (other._desc...
def compare(self, other, name='self', ignore_list=None): if (ignore_list is None): ignore_list = list() if (type(other) != type(self)): return [(('type(' + name) + ')')] diff_list = list() if (other._name != self._name): diff_list.append((name + '.name')) if (other._desc...
00f98f7767bacd7086863d13d2f0be8b6aaf28b8307e44697553cf391ed308a9
def __sizeof__(self): 'Return the size in memory of the object (including all subobject)' S = 0 S += getsizeof(self.name) S += getsizeof(self.desc) S += getsizeof(self.machine) S += getsizeof(self.input) S += getsizeof(self.logger_name) S += getsizeof(self.var_simu) if (self.postproc...
Return the size in memory of the object (including all subobject)
pyleecan/Classes/Simulation.py
__sizeof__
EmileDvs/pyleecan
95
python
def __sizeof__(self): S = 0 S += getsizeof(self.name) S += getsizeof(self.desc) S += getsizeof(self.machine) S += getsizeof(self.input) S += getsizeof(self.logger_name) S += getsizeof(self.var_simu) if (self.postproc_list is not None): for value in self.postproc_list: ...
def __sizeof__(self): S = 0 S += getsizeof(self.name) S += getsizeof(self.desc) S += getsizeof(self.machine) S += getsizeof(self.input) S += getsizeof(self.logger_name) S += getsizeof(self.var_simu) if (self.postproc_list is not None): for value in self.postproc_list: ...
4714b33b360df608124d7077dbd49ef5c9c2d4064ccda0eaa0486753724aa4dc
def as_dict(self, type_handle_ndarray=0, keep_function=False, **kwargs): '\n Convert this object in a json serializable dict (can be use in __init__).\n type_handle_ndarray: int\n How to handle ndarray (0: tolist, 1: copy, 2: nothing)\n keep_function : bool\n True to keep ...
Convert this object in a json serializable dict (can be use in __init__). type_handle_ndarray: int How to handle ndarray (0: tolist, 1: copy, 2: nothing) keep_function : bool True to keep the function object, else return str Optional keyword input parameter is for internal use only and may prevent json serializ...
pyleecan/Classes/Simulation.py
as_dict
EmileDvs/pyleecan
95
python
def as_dict(self, type_handle_ndarray=0, keep_function=False, **kwargs): '\n Convert this object in a json serializable dict (can be use in __init__).\n type_handle_ndarray: int\n How to handle ndarray (0: tolist, 1: copy, 2: nothing)\n keep_function : bool\n True to keep ...
def as_dict(self, type_handle_ndarray=0, keep_function=False, **kwargs): '\n Convert this object in a json serializable dict (can be use in __init__).\n type_handle_ndarray: int\n How to handle ndarray (0: tolist, 1: copy, 2: nothing)\n keep_function : bool\n True to keep ...
ad939d21a60448cf7425e91a9c3a3a4293d7feed6a90b9b89991ce88764c41a4
def _set_None(self): 'Set all the properties to None (except pyleecan object)' self.name = None self.desc = None if (self.machine is not None): self.machine._set_None() if (self.input is not None): self.input._set_None() self.logger_name = None if (self.var_simu is not None):...
Set all the properties to None (except pyleecan object)
pyleecan/Classes/Simulation.py
_set_None
EmileDvs/pyleecan
95
python
def _set_None(self): self.name = None self.desc = None if (self.machine is not None): self.machine._set_None() if (self.input is not None): self.input._set_None() self.logger_name = None if (self.var_simu is not None): self.var_simu._set_None() self.postproc_list...
def _set_None(self): self.name = None self.desc = None if (self.machine is not None): self.machine._set_None() if (self.input is not None): self.input._set_None() self.logger_name = None if (self.var_simu is not None): self.var_simu._set_None() self.postproc_list...
5a2c9024d412678203c63954905c5729c6da3097d1014489672c642fbd1c3f08
def _get_name(self): 'getter of name' return self._name
getter of name
pyleecan/Classes/Simulation.py
_get_name
EmileDvs/pyleecan
95
python
def _get_name(self): return self._name
def _get_name(self): return self._name<|docstring|>getter of name<|endoftext|>
4bcfae3c416221f17ff880947ddf1dcb0b3ad582e9c5d554a71d4716529075e1
def _set_name(self, value): 'setter of name' check_var('name', value, 'str') self._name = value
setter of name
pyleecan/Classes/Simulation.py
_set_name
EmileDvs/pyleecan
95
python
def _set_name(self, value): check_var('name', value, 'str') self._name = value
def _set_name(self, value): check_var('name', value, 'str') self._name = value<|docstring|>setter of name<|endoftext|>
a59bca5a1ad1004b1900519298e6c74af22b2bcbb52f8d5f17ffacd7de448080
def _get_desc(self): 'getter of desc' return self._desc
getter of desc
pyleecan/Classes/Simulation.py
_get_desc
EmileDvs/pyleecan
95
python
def _get_desc(self): return self._desc
def _get_desc(self): return self._desc<|docstring|>getter of desc<|endoftext|>
1d130d377b47d03bd878daf55fddf0fbc6b76208f9c1067cd4c073d35d325c43
def _set_desc(self, value): 'setter of desc' check_var('desc', value, 'str') self._desc = value
setter of desc
pyleecan/Classes/Simulation.py
_set_desc
EmileDvs/pyleecan
95
python
def _set_desc(self, value): check_var('desc', value, 'str') self._desc = value
def _set_desc(self, value): check_var('desc', value, 'str') self._desc = value<|docstring|>setter of desc<|endoftext|>
ecb30512178b388224a95a237cd109471e4906f6338d3f5232be314a4b524d64
def _get_machine(self): 'getter of machine' return self._machine
getter of machine
pyleecan/Classes/Simulation.py
_get_machine
EmileDvs/pyleecan
95
python
def _get_machine(self): return self._machine
def _get_machine(self): return self._machine<|docstring|>getter of machine<|endoftext|>
8aa34010d54c8998ee3251e62d91aec5094b9fa4c3d26313f3f5e8d78329d1ff
def _set_machine(self, value): 'setter of machine' if isinstance(value, str): value = load_init_dict(value)[1] if (isinstance(value, dict) and ('__class__' in value)): class_obj = import_class('pyleecan.Classes', value.get('__class__'), 'machine') value = class_obj(init_dict=value) ...
setter of machine
pyleecan/Classes/Simulation.py
_set_machine
EmileDvs/pyleecan
95
python
def _set_machine(self, value): if isinstance(value, str): value = load_init_dict(value)[1] if (isinstance(value, dict) and ('__class__' in value)): class_obj = import_class('pyleecan.Classes', value.get('__class__'), 'machine') value = class_obj(init_dict=value) elif ((type(valu...
def _set_machine(self, value): if isinstance(value, str): value = load_init_dict(value)[1] if (isinstance(value, dict) and ('__class__' in value)): class_obj = import_class('pyleecan.Classes', value.get('__class__'), 'machine') value = class_obj(init_dict=value) elif ((type(valu...
260ab649d20927c5692523adf73b9391bd0516025cb47255e211bde75862cc44
def _get_input(self): 'getter of input' return self._input
getter of input
pyleecan/Classes/Simulation.py
_get_input
EmileDvs/pyleecan
95
python
def _get_input(self): return self._input
def _get_input(self): return self._input<|docstring|>getter of input<|endoftext|>
96469891571e79aa8b9e4fc4df7404b58c92b40f5b21f1d0a7bb75753bd73731
def _set_input(self, value): 'setter of input' if isinstance(value, str): value = load_init_dict(value)[1] if (isinstance(value, dict) and ('__class__' in value)): class_obj = import_class('pyleecan.Classes', value.get('__class__'), 'input') value = class_obj(init_dict=value) eli...
setter of input
pyleecan/Classes/Simulation.py
_set_input
EmileDvs/pyleecan
95
python
def _set_input(self, value): if isinstance(value, str): value = load_init_dict(value)[1] if (isinstance(value, dict) and ('__class__' in value)): class_obj = import_class('pyleecan.Classes', value.get('__class__'), 'input') value = class_obj(init_dict=value) elif ((type(value) i...
def _set_input(self, value): if isinstance(value, str): value = load_init_dict(value)[1] if (isinstance(value, dict) and ('__class__' in value)): class_obj = import_class('pyleecan.Classes', value.get('__class__'), 'input') value = class_obj(init_dict=value) elif ((type(value) i...
2f18d246d4e2402bb980bf1bf44519b3959ad2619855049a39b7c5f950849381
def _get_logger_name(self): 'getter of logger_name' return self._logger_name
getter of logger_name
pyleecan/Classes/Simulation.py
_get_logger_name
EmileDvs/pyleecan
95
python
def _get_logger_name(self): return self._logger_name
def _get_logger_name(self): return self._logger_name<|docstring|>getter of logger_name<|endoftext|>
628742a6c7a8d71acce9ecdb8982f242581ed1ee939fecc2b3ccda1cf5c3448e
def _set_logger_name(self, value): 'setter of logger_name' check_var('logger_name', value, 'str') self._logger_name = value
setter of logger_name
pyleecan/Classes/Simulation.py
_set_logger_name
EmileDvs/pyleecan
95
python
def _set_logger_name(self, value): check_var('logger_name', value, 'str') self._logger_name = value
def _set_logger_name(self, value): check_var('logger_name', value, 'str') self._logger_name = value<|docstring|>setter of logger_name<|endoftext|>
0184b128fc7279bbf4f50907436786b3589b21b1722cbba7901bdffc6d5c586a
def _get_var_simu(self): 'getter of var_simu' return self._var_simu
getter of var_simu
pyleecan/Classes/Simulation.py
_get_var_simu
EmileDvs/pyleecan
95
python
def _get_var_simu(self): return self._var_simu
def _get_var_simu(self): return self._var_simu<|docstring|>getter of var_simu<|endoftext|>
aed0735df9f6948a969ab81a76963624adb210ccc1f8c0359ba37867ae4264b1
def _set_var_simu(self, value): 'setter of var_simu' if isinstance(value, str): value = load_init_dict(value)[1] if (isinstance(value, dict) and ('__class__' in value)): class_obj = import_class('pyleecan.Classes', value.get('__class__'), 'var_simu') value = class_obj(init_dict=value...
setter of var_simu
pyleecan/Classes/Simulation.py
_set_var_simu
EmileDvs/pyleecan
95
python
def _set_var_simu(self, value): if isinstance(value, str): value = load_init_dict(value)[1] if (isinstance(value, dict) and ('__class__' in value)): class_obj = import_class('pyleecan.Classes', value.get('__class__'), 'var_simu') value = class_obj(init_dict=value) elif ((type(va...
def _set_var_simu(self, value): if isinstance(value, str): value = load_init_dict(value)[1] if (isinstance(value, dict) and ('__class__' in value)): class_obj = import_class('pyleecan.Classes', value.get('__class__'), 'var_simu') value = class_obj(init_dict=value) elif ((type(va...
e48eb9b7091957489e095c9fb187b17696985d55ea37aef214930db5308699a3
def _get_postproc_list(self): 'getter of postproc_list' if (self._postproc_list is not None): for obj in self._postproc_list: if (obj is not None): obj.parent = self return self._postproc_list
getter of postproc_list
pyleecan/Classes/Simulation.py
_get_postproc_list
EmileDvs/pyleecan
95
python
def _get_postproc_list(self): if (self._postproc_list is not None): for obj in self._postproc_list: if (obj is not None): obj.parent = self return self._postproc_list
def _get_postproc_list(self): if (self._postproc_list is not None): for obj in self._postproc_list: if (obj is not None): obj.parent = self return self._postproc_list<|docstring|>getter of postproc_list<|endoftext|>
6cf46f2d8c488348271c84e26dab2eed3916cb2fa1779d87fe10dd4edc8327da
def _set_postproc_list(self, value): 'setter of postproc_list' if (type(value) is list): for (ii, obj) in enumerate(value): if (type(obj) is dict): class_obj = import_class('pyleecan.Classes', obj.get('__class__'), 'postproc_list') value[ii] = class_obj(init_d...
setter of postproc_list
pyleecan/Classes/Simulation.py
_set_postproc_list
EmileDvs/pyleecan
95
python
def _set_postproc_list(self, value): if (type(value) is list): for (ii, obj) in enumerate(value): if (type(obj) is dict): class_obj = import_class('pyleecan.Classes', obj.get('__class__'), 'postproc_list') value[ii] = class_obj(init_dict=obj) if (...
def _set_postproc_list(self, value): if (type(value) is list): for (ii, obj) in enumerate(value): if (type(obj) is dict): class_obj = import_class('pyleecan.Classes', obj.get('__class__'), 'postproc_list') value[ii] = class_obj(init_dict=obj) if (...
5eaca006052590294ffc8f3c2f485b13d761fb537c3f232c9033ec1df76a3acd
def _get_index(self): 'getter of index' return self._index
getter of index
pyleecan/Classes/Simulation.py
_get_index
EmileDvs/pyleecan
95
python
def _get_index(self): return self._index
def _get_index(self): return self._index<|docstring|>getter of index<|endoftext|>
492298967bb7e9333b280d063586d3e259be9b2ab4e2cba96f1a858c5ea5fd96
def _set_index(self, value): 'setter of index' check_var('index', value, 'int', Vmin=0) self._index = value
setter of index
pyleecan/Classes/Simulation.py
_set_index
EmileDvs/pyleecan
95
python
def _set_index(self, value): check_var('index', value, 'int', Vmin=0) self._index = value
def _set_index(self, value): check_var('index', value, 'int', Vmin=0) self._index = value<|docstring|>setter of index<|endoftext|>
9b3839853e2acae920f1a8219daee4864206af82e4aeca40da89de87d7ebc216
def _get_path_result(self): 'getter of path_result' return self._path_result
getter of path_result
pyleecan/Classes/Simulation.py
_get_path_result
EmileDvs/pyleecan
95
python
def _get_path_result(self): return self._path_result
def _get_path_result(self): return self._path_result<|docstring|>getter of path_result<|endoftext|>
5eab074b6231f67ecbad493a249b1080913dc1999f0af2433fa9f1b1545f1f4b
def _set_path_result(self, value): 'setter of path_result' check_var('path_result', value, 'str') self._path_result = value
setter of path_result
pyleecan/Classes/Simulation.py
_set_path_result
EmileDvs/pyleecan
95
python
def _set_path_result(self, value): check_var('path_result', value, 'str') self._path_result = value
def _set_path_result(self, value): check_var('path_result', value, 'str') self._path_result = value<|docstring|>setter of path_result<|endoftext|>
7495811ceec13d23f8a95fe52a5de286275806e4fca1d33ea85e23bbbec8a304
def _get_layer(self): 'getter of layer' return self._layer
getter of layer
pyleecan/Classes/Simulation.py
_get_layer
EmileDvs/pyleecan
95
python
def _get_layer(self): return self._layer
def _get_layer(self): return self._layer<|docstring|>getter of layer<|endoftext|>
127bbbc2a4dda313fc3a3671a3f01ef35fbee8c9b6d91a705c1f769d68b32ab4
def _set_layer(self, value): 'setter of layer' check_var('layer', value, 'int', Vmin=0) self._layer = value
setter of layer
pyleecan/Classes/Simulation.py
_set_layer
EmileDvs/pyleecan
95
python
def _set_layer(self, value): check_var('layer', value, 'int', Vmin=0) self._layer = value
def _set_layer(self, value): check_var('layer', value, 'int', Vmin=0) self._layer = value<|docstring|>setter of layer<|endoftext|>
814ec4968ab50ea44d636b36d3550103fe75bb8e40903195a2c75fa4a8f7d857
def _get_layer_log_warn(self): 'getter of layer_log_warn' return self._layer_log_warn
getter of layer_log_warn
pyleecan/Classes/Simulation.py
_get_layer_log_warn
EmileDvs/pyleecan
95
python
def _get_layer_log_warn(self): return self._layer_log_warn
def _get_layer_log_warn(self): return self._layer_log_warn<|docstring|>getter of layer_log_warn<|endoftext|>
93f9959c8d21974367ab80871086b373733571a46ca4970b8ac1c19b23c8a4e7
def _set_layer_log_warn(self, value): 'setter of layer_log_warn' check_var('layer_log_warn', value, 'int', Vmin=0) self._layer_log_warn = value
setter of layer_log_warn
pyleecan/Classes/Simulation.py
_set_layer_log_warn
EmileDvs/pyleecan
95
python
def _set_layer_log_warn(self, value): check_var('layer_log_warn', value, 'int', Vmin=0) self._layer_log_warn = value
def _set_layer_log_warn(self, value): check_var('layer_log_warn', value, 'int', Vmin=0) self._layer_log_warn = value<|docstring|>setter of layer_log_warn<|endoftext|>
1c80af581001dfbeffc3830d2fd8aca96d6bc8668b6ea2573f56b46783b2cea3
def __init__(self, aws_account: 'account.AWSAccount') -> None: 'Initialize the AWS S3 resource.\n\n Args:\n aws_account (AWSAccount): The account for the resource.\n ' self.aws_account = aws_account
Initialize the AWS S3 resource. Args: aws_account (AWSAccount): The account for the resource.
libcloudforensics/providers/aws/internal/s3.py
__init__
f0r3ns1cat0r/cloud-forensics-utils
0
python
def __init__(self, aws_account: 'account.AWSAccount') -> None: 'Initialize the AWS S3 resource.\n\n Args:\n aws_account (AWSAccount): The account for the resource.\n ' self.aws_account = aws_account
def __init__(self, aws_account: 'account.AWSAccount') -> None: 'Initialize the AWS S3 resource.\n\n Args:\n aws_account (AWSAccount): The account for the resource.\n ' self.aws_account = aws_account<|docstring|>Initialize the AWS S3 resource. Args: aws_account (AWSAccount): The account for the res...
7359a7417a16d62f142834c6bc724b2172663239c00ecdc32e58788f4f784455
def CreateBucket(self, name: str, region: Optional[str]=None, acl: str='private') -> Dict[(str, Any)]: "Create an S3 storage bucket.\n\n Args:\n name (str): The name of the bucket.\n region (str): Optional. The region in which the bucket resides.\n acl (str): Optional. The canned ACL with which to...
Create an S3 storage bucket. Args: name (str): The name of the bucket. region (str): Optional. The region in which the bucket resides. acl (str): Optional. The canned ACL with which to create the bucket. Default is 'private'. Appropriate values for the Canned ACLs are here: https://docs.aws.amazon.com/Amazon...
libcloudforensics/providers/aws/internal/s3.py
CreateBucket
f0r3ns1cat0r/cloud-forensics-utils
0
python
def CreateBucket(self, name: str, region: Optional[str]=None, acl: str='private') -> Dict[(str, Any)]: "Create an S3 storage bucket.\n\n Args:\n name (str): The name of the bucket.\n region (str): Optional. The region in which the bucket resides.\n acl (str): Optional. The canned ACL with which to...
def CreateBucket(self, name: str, region: Optional[str]=None, acl: str='private') -> Dict[(str, Any)]: "Create an S3 storage bucket.\n\n Args:\n name (str): The name of the bucket.\n region (str): Optional. The region in which the bucket resides.\n acl (str): Optional. The canned ACL with which to...
88afb59d0d9033eaea1e99262216e74291111c50d2d258bdfe3937f40f9e2ce4
def internet_status(): '\n Get the internet connection status (Try to connect to an IP address).\n\n Returns:\n True if we have internet access, False otherwise.\n ' try: urllib2.urlopen('http://{}'.format(test_IP), timeout=1) return True except: return False
Get the internet connection status (Try to connect to an IP address). Returns: True if we have internet access, False otherwise.
internet_status.py
internet_status
cyprieng/Cachet-Internet-Connection
0
python
def internet_status(): '\n Get the internet connection status (Try to connect to an IP address).\n\n Returns:\n True if we have internet access, False otherwise.\n ' try: urllib2.urlopen('http://{}'.format(test_IP), timeout=1) return True except: return False
def internet_status(): '\n Get the internet connection status (Try to connect to an IP address).\n\n Returns:\n True if we have internet access, False otherwise.\n ' try: urllib2.urlopen('http://{}'.format(test_IP), timeout=1) return True except: return False<|docstri...
2e63c3ad7c59bb04f008297df5ed51cffd66a7a14fdf3ee81278e3db2d8a9e1a
def test_ping(): '\n Get the average ping.\n\n Returns:\n The average ping in ms.\n ' return ping.quiet_ping(test_IP, timeout=1000)[2]
Get the average ping. Returns: The average ping in ms.
internet_status.py
test_ping
cyprieng/Cachet-Internet-Connection
0
python
def test_ping(): '\n Get the average ping.\n\n Returns:\n The average ping in ms.\n ' return ping.quiet_ping(test_IP, timeout=1000)[2]
def test_ping(): '\n Get the average ping.\n\n Returns:\n The average ping in ms.\n ' return ping.quiet_ping(test_IP, timeout=1000)[2]<|docstring|>Get the average ping. Returns: The average ping in ms.<|endoftext|>
21c78422012e9c72badd7c1261a6f3261b213cc56006115a134bceaed99b1442
def send_ping_to_cachet(): '\n Send the ping to Cachet.\n ' ping = test_ping() timestamp = int(time.time()) headers = {'X-Cachet-Token': token} logger.info('Sending ping({})...'.format(ping)) requests.post('{0}api/v1/metrics/{1}/points?value={2}&timestamp={3}'.format(cachet_url, ping_metri...
Send the ping to Cachet.
internet_status.py
send_ping_to_cachet
cyprieng/Cachet-Internet-Connection
0
python
def send_ping_to_cachet(): '\n \n ' ping = test_ping() timestamp = int(time.time()) headers = {'X-Cachet-Token': token} logger.info('Sending ping({})...'.format(ping)) requests.post('{0}api/v1/metrics/{1}/points?value={2}&timestamp={3}'.format(cachet_url, ping_metric_id, ping, timestamp), ...
def send_ping_to_cachet(): '\n \n ' ping = test_ping() timestamp = int(time.time()) headers = {'X-Cachet-Token': token} logger.info('Sending ping({})...'.format(ping)) requests.post('{0}api/v1/metrics/{1}/points?value={2}&timestamp={3}'.format(cachet_url, ping_metric_id, ping, timestamp), ...
2a91978ed318a0bb481506e71aed53fb6844154322e555bea8330ad2b168bb5e
def get_last_incident_id(): '\n Get the last incident id.\n\n Returns:\n Last incident id.\n ' try: headers = {'X-Cachet-Token': token} data = requests.get('{0}api/v1/incidents'.format(cachet_url), headers=headers).json() return data['data'][(- 1)]['id'] except: ...
Get the last incident id. Returns: Last incident id.
internet_status.py
get_last_incident_id
cyprieng/Cachet-Internet-Connection
0
python
def get_last_incident_id(): '\n Get the last incident id.\n\n Returns:\n Last incident id.\n ' try: headers = {'X-Cachet-Token': token} data = requests.get('{0}api/v1/incidents'.format(cachet_url), headers=headers).json() return data['data'][(- 1)]['id'] except: ...
def get_last_incident_id(): '\n Get the last incident id.\n\n Returns:\n Last incident id.\n ' try: headers = {'X-Cachet-Token': token} data = requests.get('{0}api/v1/incidents'.format(cachet_url), headers=headers).json() return data['data'][(- 1)]['id'] except: ...
d2466f71570a3fe1d948f5b57f0663f03c95a5fb095bdfe1f0af209d56fb1968
def send_state_to_cachet(): '\n Send the internet status to cachet. Is there is a problem create an incident.\n If it returns to normal, resolve incdent.\n ' headers = {'X-Cachet-Token': token, 'content-type': 'application/json'} status = 1 if (not internet_status()): logger.info('Sendi...
Send the internet status to cachet. Is there is a problem create an incident. If it returns to normal, resolve incdent.
internet_status.py
send_state_to_cachet
cyprieng/Cachet-Internet-Connection
0
python
def send_state_to_cachet(): '\n Send the internet status to cachet. Is there is a problem create an incident.\n If it returns to normal, resolve incdent.\n ' headers = {'X-Cachet-Token': token, 'content-type': 'application/json'} status = 1 if (not internet_status()): logger.info('Sendi...
def send_state_to_cachet(): '\n Send the internet status to cachet. Is there is a problem create an incident.\n If it returns to normal, resolve incdent.\n ' headers = {'X-Cachet-Token': token, 'content-type': 'application/json'} status = 1 if (not internet_status()): logger.info('Sendi...
4681d2c8eb4f79bcc96b9eea17d249be109bf73a764d3bb7d704e28c99ffe035
@staticmethod def _get_misorientation(tip_world: np.ndarray, tip_world0: np.ndarray) -> np.ndarray: ' Get the misorientation angle ' (nof_w, nof_h) = (1920, 1080) nof_c = get_intrinsic_matrix(nof_w, nof_h, np.deg2rad(120)) (cam_w, cam_h) = (512, 512) (cam_u, cam_v) = ((cam_w / 2.0), (cam_h / 2.0)) ...
Get the misorientation angle
surrol/tasks/ecm_misorient.py
_get_misorientation
TaoHuang13/SurRoL
32
python
@staticmethod def _get_misorientation(tip_world: np.ndarray, tip_world0: np.ndarray) -> np.ndarray: ' ' (nof_w, nof_h) = (1920, 1080) nof_c = get_intrinsic_matrix(nof_w, nof_h, np.deg2rad(120)) (cam_w, cam_h) = (512, 512) (cam_u, cam_v) = ((cam_w / 2.0), (cam_h / 2.0)) cam_c = get_intrinsic_mat...
@staticmethod def _get_misorientation(tip_world: np.ndarray, tip_world0: np.ndarray) -> np.ndarray: ' ' (nof_w, nof_h) = (1920, 1080) nof_c = get_intrinsic_matrix(nof_w, nof_h, np.deg2rad(120)) (cam_w, cam_h) = (512, 512) (cam_u, cam_v) = ((cam_w / 2.0), (cam_h / 2.0)) cam_c = get_intrinsic_mat...
23e1ad30cc136cd756a384b386af70e20e45657eba3ece15c5941ff51f811d7c
def _sample_goal(self) -> np.ndarray: 'Samples a new goal and returns it.\n ' goal = np.array([0.0]) return goal.copy()
Samples a new goal and returns it.
surrol/tasks/ecm_misorient.py
_sample_goal
TaoHuang13/SurRoL
32
python
def _sample_goal(self) -> np.ndarray: '\n ' goal = np.array([0.0]) return goal.copy()
def _sample_goal(self) -> np.ndarray: '\n ' goal = np.array([0.0]) return goal.copy()<|docstring|>Samples a new goal and returns it.<|endoftext|>
65bea7a2ce9ea28563e93c404b6684408e5a575918eb71bb6f4a4b312c3a0285
def get_oracle_action(self, obs) -> np.ndarray: '\n Define a human expert strategy\n ' (pos, orn) = get_link_pose(self.ecm.body, self.ecm.TIP_LINK_INDEX) cam_world = get_matrix_from_pose_2d((pos, orn)) cam_world[(:3, 3)] /= self.SCALING droll = (self._get_misorientation(cam_world, self...
Define a human expert strategy
surrol/tasks/ecm_misorient.py
get_oracle_action
TaoHuang13/SurRoL
32
python
def get_oracle_action(self, obs) -> np.ndarray: '\n \n ' (pos, orn) = get_link_pose(self.ecm.body, self.ecm.TIP_LINK_INDEX) cam_world = get_matrix_from_pose_2d((pos, orn)) cam_world[(:3, 3)] /= self.SCALING droll = (self._get_misorientation(cam_world, self.cam_nof) / np.deg2rad(3)) ...
def get_oracle_action(self, obs) -> np.ndarray: '\n \n ' (pos, orn) = get_link_pose(self.ecm.body, self.ecm.TIP_LINK_INDEX) cam_world = get_matrix_from_pose_2d((pos, orn)) cam_world[(:3, 3)] /= self.SCALING droll = (self._get_misorientation(cam_world, self.cam_nof) / np.deg2rad(3)) ...
ea04a3230b332cfeecfa6e768de2f247b85577e26a79a8f43fa26044ec0a2272
def get_last_experiment(parent_dir, env_name): 'Searches through directory for highest numbered experiement' experiment_id = 0 for folder_name in os.listdir(parent_dir): if (not os.path.isdir(os.path.join(parent_dir, folder_name))): continue try: folder_name = int(fol...
Searches through directory for highest numbered experiement
util/dir_utils.py
get_last_experiment
alexansari101/deep-rl
0
python
def get_last_experiment(parent_dir, env_name): experiment_id = 0 for folder_name in os.listdir(parent_dir): if (not os.path.isdir(os.path.join(parent_dir, folder_name))): continue try: folder_name = int(folder_name.split('-run')[(- 1)]) if (folder_name > ...
def get_last_experiment(parent_dir, env_name): experiment_id = 0 for folder_name in os.listdir(parent_dir): if (not os.path.isdir(os.path.join(parent_dir, folder_name))): continue try: folder_name = int(folder_name.split('-run')[(- 1)]) if (folder_name > ...
c0ec3a10a389f3bf5aa9f5b8da01fc9a15fa43106ce7721083c355a17edb6e25
def get_output_folder(parent_dir, env_name, load, trial=None, tmp=False): "Return save folder.\n\n Assumes folders in the parent_dir have suffix -run{run\n number}. Finds the highest run number and sets the output folder\n to that number + 1. This is just convenient so that if you run the\n same script ...
Return save folder. Assumes folders in the parent_dir have suffix -run{run number}. Finds the highest run number and sets the output folder to that number + 1. This is just convenient so that if you run the same script multiple times tensorboard can plot all of the results on the same plots with different names. Para...
util/dir_utils.py
get_output_folder
alexansari101/deep-rl
0
python
def get_output_folder(parent_dir, env_name, load, trial=None, tmp=False): "Return save folder.\n\n Assumes folders in the parent_dir have suffix -run{run\n number}. Finds the highest run number and sets the output folder\n to that number + 1. This is just convenient so that if you run the\n same script ...
def get_output_folder(parent_dir, env_name, load, trial=None, tmp=False): "Return save folder.\n\n Assumes folders in the parent_dir have suffix -run{run\n number}. Finds the highest run number and sets the output folder\n to that number + 1. This is just convenient so that if you run the\n same script ...
c17114eb7ecaed3d93a2ac94f633203a6a961ae2246b5a821c37312e4db3a08f
def copy_files(outdir): 'Copies files to the outdir to store complete script with each trial' codedir = (outdir + '/code') os.makedirs(codedir) code = [] exclude = set(['trials']) for (root, dirs, files) in os.walk('.', topdown=True): dirs[:] = [d for d in dirs if (d not in exclude)] ...
Copies files to the outdir to store complete script with each trial
util/dir_utils.py
copy_files
alexansari101/deep-rl
0
python
def copy_files(outdir): codedir = (outdir + '/code') os.makedirs(codedir) code = [] exclude = set(['trials']) for (root, dirs, files) in os.walk('.', topdown=True): dirs[:] = [d for d in dirs if (d not in exclude)] for f in files: if (not f.endswith('.py')): ...
def copy_files(outdir): codedir = (outdir + '/code') os.makedirs(codedir) code = [] exclude = set(['trials']) for (root, dirs, files) in os.walk('.', topdown=True): dirs[:] = [d for d in dirs if (d not in exclude)] for f in files: if (not f.endswith('.py')): ...
316d0a9ca6d3cefe3378f2d1786ae7848aff63bcce9728c111f9c575faf7f3d0
def get_config(): '\n Reads the config file defined in the FILE_PATHS tuple, keeping the\n priority. That is, the config will be set for the first file\n found, exiting the loop in that moment and returning the value.\n If no file was found, an empty dictionary will be returned.\n :return: A dictiona...
Reads the config file defined in the FILE_PATHS tuple, keeping the priority. That is, the config will be set for the first file found, exiting the loop in that moment and returning the value. If no file was found, an empty dictionary will be returned. :return: A dictionary with the config, in "{'remote':{'username':'.....
gitssue/config/config_reader.py
get_config
julenpardo/Gitssue
0
python
def get_config(): '\n Reads the config file defined in the FILE_PATHS tuple, keeping the\n priority. That is, the config will be set for the first file\n found, exiting the loop in that moment and returning the value.\n If no file was found, an empty dictionary will be returned.\n :return: A dictiona...
def get_config(): '\n Reads the config file defined in the FILE_PATHS tuple, keeping the\n priority. That is, the config will be set for the first file\n found, exiting the loop in that moment and returning the value.\n If no file was found, an empty dictionary will be returned.\n :return: A dictiona...
1e50bfd574fe6e110ba6d053316fceb70d02f2f98f04159989b161a23277fd39
def make_identifier(self, value): '\n Turn an identifier in the model into a string.\n ' return '\\delta_{{{}}}'.format(value)
Turn an identifier in the model into a string.
tarski/write/latex.py
make_identifier
rmellema/tarski.py
0
python
def make_identifier(self, value): '\n \n ' return '\\delta_{{{}}}'.format(value)
def make_identifier(self, value): '\n \n ' return '\\delta_{{{}}}'.format(value)<|docstring|>Turn an identifier in the model into a string.<|endoftext|>
cbe5ec314a2c7c815072bbaf0727853ca625b3900fa6052e2f7dd66209015293
def write_domain(self, domain): '\n Write the domain to the stream.\n ' self.stream.write('\\begin{dmath*}\n\tD = \\left\\{') self.stream.write('\\mycom '.join((self.make_identifier(id) for id in domain))) self.stream.write('\\right\\}\n\\end{dmath*}')
Write the domain to the stream.
tarski/write/latex.py
write_domain
rmellema/tarski.py
0
python
def write_domain(self, domain): '\n \n ' self.stream.write('\\begin{dmath*}\n\tD = \\left\\{') self.stream.write('\\mycom '.join((self.make_identifier(id) for id in domain))) self.stream.write('\\right\\}\n\\end{dmath*}')
def write_domain(self, domain): '\n \n ' self.stream.write('\\begin{dmath*}\n\tD = \\left\\{') self.stream.write('\\mycom '.join((self.make_identifier(id) for id in domain))) self.stream.write('\\right\\}\n\\end{dmath*}')<|docstring|>Write the domain to the stream.<|endoftext|>
55ad8b14b7c5b377bd1532da21917e8bdd72d47f8e5c295532764a30fbc78d59
def write_constant(self, constant, identifier): '\n Write a single constant to the stream.\n ' self.stream.write('\\begin{dmath*}') self.stream.write('{') self.stream.write(constant) self.stream.write('}^{\\mathfrak{M}} = ') self.stream.write(self.make_identifier(identifier)) s...
Write a single constant to the stream.
tarski/write/latex.py
write_constant
rmellema/tarski.py
0
python
def write_constant(self, constant, identifier): '\n \n ' self.stream.write('\\begin{dmath*}') self.stream.write('{') self.stream.write(constant) self.stream.write('}^{\\mathfrak{M}} = ') self.stream.write(self.make_identifier(identifier)) self.stream.write('\\end{dmath*}')
def write_constant(self, constant, identifier): '\n \n ' self.stream.write('\\begin{dmath*}') self.stream.write('{') self.stream.write(constant) self.stream.write('}^{\\mathfrak{M}} = ') self.stream.write(self.make_identifier(identifier)) self.stream.write('\\end{dmath*}')<|doc...
87cd1be5ca6d12c92a32e257b623c9799334d8d201348970b492c642f97bde5a
def write_predicate(self, name, extension): '\n Write a predicate to the stream.\n ' self.stream.write('\\begin{dmath*}') self.stream.write('\\mathfrak{M}(\\mathit{') self.stream.write(name) self.stream.write('}) = ') if extension: self.stream.write('\\left\\{ ') se...
Write a predicate to the stream.
tarski/write/latex.py
write_predicate
rmellema/tarski.py
0
python
def write_predicate(self, name, extension): '\n \n ' self.stream.write('\\begin{dmath*}') self.stream.write('\\mathfrak{M}(\\mathit{') self.stream.write(name) self.stream.write('}) = ') if extension: self.stream.write('\\left\\{ ') self.stream.write('\\mycom '.join(...
def write_predicate(self, name, extension): '\n \n ' self.stream.write('\\begin{dmath*}') self.stream.write('\\mathfrak{M}(\\mathit{') self.stream.write(name) self.stream.write('}) = ') if extension: self.stream.write('\\left\\{ ') self.stream.write('\\mycom '.join(...
d39504375f894a035f69a35648298ba15269205c9e3e7192cdbad57bf60c59cc
def write_model(self, model): '\n Write the model to the stream. Makes sure that all the `=` signs in the equations are\n aligned by wrapping all equations in a `dgroup*`.\n\n :param Model model: The model to write to the stream.\n ' self.stream.write('\\begin{dgroup*}\n') super(...
Write the model to the stream. Makes sure that all the `=` signs in the equations are aligned by wrapping all equations in a `dgroup*`. :param Model model: The model to write to the stream.
tarski/write/latex.py
write_model
rmellema/tarski.py
0
python
def write_model(self, model): '\n Write the model to the stream. Makes sure that all the `=` signs in the equations are\n aligned by wrapping all equations in a `dgroup*`.\n\n :param Model model: The model to write to the stream.\n ' self.stream.write('\\begin{dgroup*}\n') super(...
def write_model(self, model): '\n Write the model to the stream. Makes sure that all the `=` signs in the equations are\n aligned by wrapping all equations in a `dgroup*`.\n\n :param Model model: The model to write to the stream.\n ' self.stream.write('\\begin{dgroup*}\n') super(...
f983168f33ceada08c68308639d31baafc5ea5b12487b4088a3784fe0e178894
def tatami_solve(xmax: int, ymax: int) -> list[facile.Solution]: 'Solves the tatami problem.\n\n The variables in the solve_all must be passed in order:\n - x coordinates;\n - y coordinates;\n - xs the size of the tatami on the x axis (1: vertical, 2: horizontal);\n - other variables\n ' if ((...
Solves the tatami problem. The variables in the solve_all must be passed in order: - x coordinates; - y coordinates; - xs the size of the tatami on the x axis (1: vertical, 2: horizontal); - other variables
problems/tatami/tatami_solve.py
tatami_solve
xoolive/edu_constraints
1
python
def tatami_solve(xmax: int, ymax: int) -> list[facile.Solution]: 'Solves the tatami problem.\n\n The variables in the solve_all must be passed in order:\n - x coordinates;\n - y coordinates;\n - xs the size of the tatami on the x axis (1: vertical, 2: horizontal);\n - other variables\n ' if ((...
def tatami_solve(xmax: int, ymax: int) -> list[facile.Solution]: 'Solves the tatami problem.\n\n The variables in the solve_all must be passed in order:\n - x coordinates;\n - y coordinates;\n - xs the size of the tatami on the x axis (1: vertical, 2: horizontal);\n - other variables\n ' if ((...
9a29a0ec2c0f00678c2a1495629da0b77ead4884366933d366e954775463a05e
def query(self, endpoint, data=None): 'Request an HTTP endpoint with a GET request (or POST if data is not None)' url = self.url(endpoint) log.debug(('%s: %s %s' % (self.__class__.__name__, ('GET' if (data is None) else 'POST'), url))) def raise_error(reason): raise self.QueryError(('Failed to ...
Request an HTTP endpoint with a GET request (or POST if data is not None)
src/main/python/twitter/aurora/common/http_signaler.py
query
isomer/incubator-aurora
0
python
def query(self, endpoint, data=None): url = self.url(endpoint) log.debug(('%s: %s %s' % (self.__class__.__name__, ('GET' if (data is None) else 'POST'), url))) def raise_error(reason): raise self.QueryError(('Failed to signal %s: %s' % (self.url(endpoint), reason))) try: with conte...
def query(self, endpoint, data=None): url = self.url(endpoint) log.debug(('%s: %s %s' % (self.__class__.__name__, ('GET' if (data is None) else 'POST'), url))) def raise_error(reason): raise self.QueryError(('Failed to signal %s: %s' % (self.url(endpoint), reason))) try: with conte...
3434d0c2f34878edeed2b66ceeb82fdb551588ab53010379e9497e6ffe58ce19
def __call__(self, endpoint, use_post_method=False, expected_response=None): 'Returns a (boolean, string|None) tuple of (call success, failure reason)' try: response = self.query(endpoint, ('' if use_post_method else None)).strip().lower() if ((expected_response is not None) and (response != exp...
Returns a (boolean, string|None) tuple of (call success, failure reason)
src/main/python/twitter/aurora/common/http_signaler.py
__call__
isomer/incubator-aurora
0
python
def __call__(self, endpoint, use_post_method=False, expected_response=None): try: response = self.query(endpoint, ( if use_post_method else None)).strip().lower() if ((expected_response is not None) and (response != expected_response)): def shorten(string): return (...
def __call__(self, endpoint, use_post_method=False, expected_response=None): try: response = self.query(endpoint, ( if use_post_method else None)).strip().lower() if ((expected_response is not None) and (response != expected_response)): def shorten(string): return (...
04b2f8aded1268d98132e8a0e72fe8bc887b9932a15fe796da979118b9b4dd9c
def get_dec(): '現在位置を取得' global tree_path return tree_path[(len(tree_path) - 1)]
現在位置を取得
maze.py
get_dec
muzudho/collatz
0
python
def get_dec(): global tree_path return tree_path[(len(tree_path) - 1)]
def get_dec(): global tree_path return tree_path[(len(tree_path) - 1)]<|docstring|>現在位置を取得<|endoftext|>
c264ca6c62d6e25ee4c7fb42ef080e6493c79a2ea50c3dfbad96a5a2f5a5d340
def choice_next(): '次の目的地の表示' dec = get_dec() while True: next_list_list = [[0]] next_width = 0 if ((dec != 4) and (dec != 7)): dec_minus_one_divided_of_3 = (((dec - 1) % 3) == 0) next = ((dec - 1) // 3) next_is_odd = ((next % 2) == 1) ...
次の目的地の表示
maze.py
choice_next
muzudho/collatz
0
python
def choice_next(): dec = get_dec() while True: next_list_list = [[0]] next_width = 0 if ((dec != 4) and (dec != 7)): dec_minus_one_divided_of_3 = (((dec - 1) % 3) == 0) next = ((dec - 1) // 3) next_is_odd = ((next % 2) == 1) if ((next ...
def choice_next(): dec = get_dec() while True: next_list_list = [[0]] next_width = 0 if ((dec != 4) and (dec != 7)): dec_minus_one_divided_of_3 = (((dec - 1) % 3) == 0) next = ((dec - 1) // 3) next_is_odd = ((next % 2) == 1) if ((next ...
057a3d7fde9a880215a7a74a939642c618a992d87136a6add75600e591a3160b
def module_is_avalaible(self): ' Check if this module should be shown to current user ' return False
Check if this module should be shown to current user
containers/shiva/engine/modules/heartbeat.py
module_is_avalaible
LifeDJIK/S.H.I.V.A.
0
python
def module_is_avalaible(self): ' ' return False
def module_is_avalaible(self): ' ' return False<|docstring|>Check if this module should be shown to current user<|endoftext|>
9eb74badc37e6ef315b3dae39feac443943c36aaaf4d7e05855ebe196aa29d5d
@cherrypy.expose def index(self): ' Index ' return 'OK'
Index
containers/shiva/engine/modules/heartbeat.py
index
LifeDJIK/S.H.I.V.A.
0
python
@cherrypy.expose def index(self): ' ' return 'OK'
@cherrypy.expose def index(self): ' ' return 'OK'<|docstring|>Index<|endoftext|>
51e37fba007100eedda0bc40d602866bf3912eeca4c80905d99f6911b42baeb3
def vgg11(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 11-layer model.\n\n VGG 11-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
Create VGG 11-layer model. VGG 11-layer model from `"Very Deep Convolutional Networks for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input size of the model is 32x32. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
frarch/models/classification/cnn/vgg.py
vgg11
victorbadenas/frarch
0
python
def vgg11(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 11-layer model.\n\n VGG 11-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
def vgg11(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 11-layer model.\n\n VGG 11-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
f8121c8065e1af5e2866d225ea605a9b0c3570ccec46f4fa880f597ca21b62be
def vgg11_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 11-layer with batch normalization model.\n\n VGG 11-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
Create VGG 11-layer with batch normalization model. VGG 11-layer model with batch normalization from `"Very Deep Convolutional Networks for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input size of the model is 32x32. Args: pretrained (bool): If True, returns a mod...
frarch/models/classification/cnn/vgg.py
vgg11_bn
victorbadenas/frarch
0
python
def vgg11_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 11-layer with batch normalization model.\n\n VGG 11-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
def vgg11_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 11-layer with batch normalization model.\n\n VGG 11-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
b236a297db1c92b062e4bbb460006bbbc4605ea73d75fc835a8666b52dd4f559
def vgg13(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 13-layer model.\n\n VGG 13-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
Create VGG 13-layer model. VGG 13-layer model from `"Very Deep Convolutional Networks for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input size of the model is 32x32. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
frarch/models/classification/cnn/vgg.py
vgg13
victorbadenas/frarch
0
python
def vgg13(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 13-layer model.\n\n VGG 13-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
def vgg13(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 13-layer model.\n\n VGG 13-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
b59c5927c16eb92919fc34b6361308186eba3933d810a4127e3277e341d3d508
def vgg13_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 13-layer with batch normalization model.\n\n VGG 13-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
Create VGG 13-layer with batch normalization model. VGG 13-layer model with batch normalization from `"Very Deep Convolutional Networks for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input size of the model is 32x32. Args: pretrained (bool): If True, returns a mod...
frarch/models/classification/cnn/vgg.py
vgg13_bn
victorbadenas/frarch
0
python
def vgg13_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 13-layer with batch normalization model.\n\n VGG 13-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
def vgg13_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 13-layer with batch normalization model.\n\n VGG 13-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
6f93ae73682b7a51854b1e47e54496f9c2743900b3e71124bf32e3323833dc65
def vgg16(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 16-layer model.\n\n VGG 16-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
Create VGG 16-layer model. VGG 16-layer model from `"Very Deep Convolutional Networks for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input size of the model is 32x32. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
frarch/models/classification/cnn/vgg.py
vgg16
victorbadenas/frarch
0
python
def vgg16(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 16-layer model.\n\n VGG 16-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
def vgg16(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 16-layer model.\n\n VGG 16-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
545bb2be8c45defd135b83345be91a0b1cceced0ae20046ea7ff3de307cbc344
def vgg16_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 16-layer with batch normalization model.\n\n VGG 16-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
Create VGG 16-layer with batch normalization model. VGG 16-layer model with batch normalization from `"Very Deep Convolutional Networks for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input size of the model is 32x32. Args: pretrained (bool): If True, returns a mod...
frarch/models/classification/cnn/vgg.py
vgg16_bn
victorbadenas/frarch
0
python
def vgg16_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 16-layer with batch normalization model.\n\n VGG 16-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
def vgg16_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 16-layer with batch normalization model.\n\n VGG 16-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
6af3c4d6898e2962d11419845eb1054fd2fb9f6789994144d738b85968f577ee
def vgg19(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 19-layer model.\n\n VGG 19-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
Create VGG 19-layer model. VGG 19-layer model from `"Very Deep Convolutional Networks for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input size of the model is 32x32. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
frarch/models/classification/cnn/vgg.py
vgg19
victorbadenas/frarch
0
python
def vgg19(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 19-layer model.\n\n VGG 19-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
def vgg19(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 19-layer model.\n\n VGG 19-layer model from `"Very Deep Convolutional Networks for Large-Scale Image\n Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input\n size of the model is 32x32.\n\n Args:\n pr...
91d5cd7e7997002e32daa9920380fa06f9d8d1ebad5bdf67ceab49b7b833f82a
def vgg19_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 19-layer with batch normalization model.\n\n VGG 19-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
Create VGG 19-layer with batch normalization model. VGG 19-layer model with batch normalization from `"Very Deep Convolutional Networks for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_. The required minimum input size of the model is 32x32. Args: pretrained (bool): If True, returns a mod...
frarch/models/classification/cnn/vgg.py
vgg19_bn
victorbadenas/frarch
0
python
def vgg19_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 19-layer with batch normalization model.\n\n VGG 19-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
def vgg19_bn(pretrained: bool=False, **kwargs: Any) -> VGG: 'Create VGG 19-layer with batch normalization model.\n\n VGG 19-layer model with batch normalization from `"Very Deep Convolutional Networks\n for Large-Scale Image Recognition" <https://arxiv.org/pdf/1409.1556.pdf>`_.\n The required minimum input...
3686b6f0d3a523c81a4870f4b653bcebd255a2a8a586326d9bbdd502314f1828
def forward(self, x: torch.Tensor) -> torch.Tensor: 'Define the computation performed at every call.\n\n forward computation for VGG.\n\n Args:\n x (torch.Tensor): input to the model.\n\n Returns:\n torch.Tensor: output of the model.\n ' x = self.features(x) ...
Define the computation performed at every call. forward computation for VGG. Args: x (torch.Tensor): input to the model. Returns: torch.Tensor: output of the model.
frarch/models/classification/cnn/vgg.py
forward
victorbadenas/frarch
0
python
def forward(self, x: torch.Tensor) -> torch.Tensor: 'Define the computation performed at every call.\n\n forward computation for VGG.\n\n Args:\n x (torch.Tensor): input to the model.\n\n Returns:\n torch.Tensor: output of the model.\n ' x = self.features(x) ...
def forward(self, x: torch.Tensor) -> torch.Tensor: 'Define the computation performed at every call.\n\n forward computation for VGG.\n\n Args:\n x (torch.Tensor): input to the model.\n\n Returns:\n torch.Tensor: output of the model.\n ' x = self.features(x) ...
82502769e4db6a946de51f0081992fd5d2d5163a8aef32d5d412bbdd5361b411
def forward(self, x: torch.Tensor) -> torch.Tensor: 'Define the computation performed at every call.\n\n forward computation for VGG.\n\n Args:\n x (torch.Tensor): input to the model.\n\n Returns:\n torch.Tensor: output of the model.\n ' x = self.classifier(x) ...
Define the computation performed at every call. forward computation for VGG. Args: x (torch.Tensor): input to the model. Returns: torch.Tensor: output of the model.
frarch/models/classification/cnn/vgg.py
forward
victorbadenas/frarch
0
python
def forward(self, x: torch.Tensor) -> torch.Tensor: 'Define the computation performed at every call.\n\n forward computation for VGG.\n\n Args:\n x (torch.Tensor): input to the model.\n\n Returns:\n torch.Tensor: output of the model.\n ' x = self.classifier(x) ...
def forward(self, x: torch.Tensor) -> torch.Tensor: 'Define the computation performed at every call.\n\n forward computation for VGG.\n\n Args:\n x (torch.Tensor): input to the model.\n\n Returns:\n torch.Tensor: output of the model.\n ' x = self.classifier(x) ...
b4cb0e76e215abd31aa9bab17d5b83fc2304d0fcc582c54682d62cb1fb92fe14
def AddFile(self, filePath=None, logicalFolder=None, type=None, name=None, file=None): ' Usage: self.AddFile(filePath, logicalFolder, type, name) # used for initial generation of object\n self.AddFile(file=xyzFile) # normally used for redo/undo\n Add newly created file object using fi...
Usage: self.AddFile(filePath, logicalFolder, type, name) # used for initial generation of object self.AddFile(file=xyzFile) # normally used for redo/undo Add newly created file object using filePath and logicalFolder or given file object
noval/project/basemodel.py
AddFile
bopopescu/NovalIDE
0
python
def AddFile(self, filePath=None, logicalFolder=None, type=None, name=None, file=None): ' Usage: self.AddFile(filePath, logicalFolder, type, name) # used for initial generation of object\n self.AddFile(file=xyzFile) # normally used for redo/undo\n Add newly created file object using fi...
def AddFile(self, filePath=None, logicalFolder=None, type=None, name=None, file=None): ' Usage: self.AddFile(filePath, logicalFolder, type, name) # used for initial generation of object\n self.AddFile(file=xyzFile) # normally used for redo/undo\n Add newly created file object using fi...
11084b3501b2825183243676d133e7135b737dda0b528b6d90727d55cc3f1c7f
def _SetCache(self, enable): "\n Only turn this on if your operation assumes files on disk won't change.\n Once your operation is done, turn this back off.\n Nested enables are allowed, only the last disable will disable the cache.\n \n This bypasses the IsDocu...
Only turn this on if your operation assumes files on disk won't change. Once your operation is done, turn this back off. Nested enables are allowed, only the last disable will disable the cache. This bypasses the IsDocumentModificationDateCorrect call because the modification date check is too costly, it hits the disk...
noval/project/basemodel.py
_SetCache
bopopescu/NovalIDE
0
python
def _SetCache(self, enable): "\n Only turn this on if your operation assumes files on disk won't change.\n Once your operation is done, turn this back off.\n Nested enables are allowed, only the last disable will disable the cache.\n \n This bypasses the IsDocu...
def _SetCache(self, enable): "\n Only turn this on if your operation assumes files on disk won't change.\n Once your operation is done, turn this back off.\n Nested enables are allowed, only the last disable will disable the cache.\n \n This bypasses the IsDocu...