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 |
|---|---|---|---|---|---|---|---|---|---|
d500209c80224810a00eed7cbcbb2f68230adeecb7fad0ec15bcda050d1fd131 | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_regenerate_code.yml')
def test_stream_targets_regenerate_code():
'\n Tests an API call to regenerate the connection code for a particular\n stream target\n '
current_code = stream_targets_instance.info(stream_target_id)['stream_target']['connec... | Tests an API call to regenerate the connection code for a particular
stream target | tests/test_wowza.py | test_stream_targets_regenerate_code | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_regenerate_code.yml')
def test_stream_targets_regenerate_code():
'\n Tests an API call to regenerate the connection code for a particular\n stream target\n '
current_code = stream_targets_instance.info(stream_target_id)['stream_target']['connec... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_regenerate_code.yml')
def test_stream_targets_regenerate_code():
'\n Tests an API call to regenerate the connection code for a particular\n stream target\n '
current_code = stream_targets_instance.info(stream_target_id)['stream_target']['connec... |
470bc198356ddf0770b0eca49d0a45852e057c902d1a06493592a23f67528ebb | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_new_code.yml')
def test_stream_targets_new_code():
'\n Tests an API call to get a new connection code for a particular\n stream target\n '
current_code = stream_targets_instance.info(stream_target_id)['stream_target']['connection_code']
res... | Tests an API call to get a new connection code for a particular
stream target | tests/test_wowza.py | test_stream_targets_new_code | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_new_code.yml')
def test_stream_targets_new_code():
'\n Tests an API call to get a new connection code for a particular\n stream target\n '
current_code = stream_targets_instance.info(stream_target_id)['stream_target']['connection_code']
res... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_new_code.yml')
def test_stream_targets_new_code():
'\n Tests an API call to get a new connection code for a particular\n stream target\n '
current_code = stream_targets_instance.info(stream_target_id)['stream_target']['connection_code']
res... |
99bb83369c343c7792c2a81810a07ea9b5bfcc74fae4ce87bdcfc6cbcbcc3e8d | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth_create.yml')
def test_stream_targets_token_auth_create():
'\n Tests an API call to create a new token auth for a particular\n stream target\n '
response = stream_targets_instance.create_token_auth(stream_target_id, {'enabled': 'true'... | Tests an API call to create a new token auth for a particular
stream target | tests/test_wowza.py | test_stream_targets_token_auth_create | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth_create.yml')
def test_stream_targets_token_auth_create():
'\n Tests an API call to create a new token auth for a particular\n stream target\n '
response = stream_targets_instance.create_token_auth(stream_target_id, {'enabled': 'true'... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth_create.yml')
def test_stream_targets_token_auth_create():
'\n Tests an API call to create a new token auth for a particular\n stream target\n '
response = stream_targets_instance.create_token_auth(stream_target_id, {'enabled': 'true'... |
3b223eac9dab84639a245a77962033dee4ca625eb4b0907284bee6193ea3634b | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth_info.yml')
def test_stream_targets_token_auth_info():
'\n Tests an API call to get the token auth associated with a\n stream target\n '
response = stream_targets_instance.token_auth_info(stream_target_id)
assert isinstance(respon... | Tests an API call to get the token auth associated with a
stream target | tests/test_wowza.py | test_stream_targets_token_auth_info | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth_info.yml')
def test_stream_targets_token_auth_info():
'\n Tests an API call to get the token auth associated with a\n stream target\n '
response = stream_targets_instance.token_auth_info(stream_target_id)
assert isinstance(respon... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth_info.yml')
def test_stream_targets_token_auth_info():
'\n Tests an API call to get the token auth associated with a\n stream target\n '
response = stream_targets_instance.token_auth_info(stream_target_id)
assert isinstance(respon... |
f693757eaaeeb042922255e6f9f5b5f23c3e809e04e260464d5f2ad659e349a4 | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth.yml')
def test_stream_targets_token_auth():
'\n Tests an API call to get the token auth associated with a \n particular stream target\n '
response = stream_targets_instance.token_auth(stream_target_id)
assert isinstance(response,... | Tests an API call to get the token auth associated with a
particular stream target | tests/test_wowza.py | test_stream_targets_token_auth | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth.yml')
def test_stream_targets_token_auth():
'\n Tests an API call to get the token auth associated with a \n particular stream target\n '
response = stream_targets_instance.token_auth(stream_target_id)
assert isinstance(response,... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth.yml')
def test_stream_targets_token_auth():
'\n Tests an API call to get the token auth associated with a \n particular stream target\n '
response = stream_targets_instance.token_auth(stream_target_id)
assert isinstance(response,... |
664abb0fb29166182169e8887b4ec97f8f4cc401ead4fddd1120723f0731c46d | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth_update.yml')
def test_stream_targets_token_auth_update():
'\n Tests an API call to update the details associated with a token\n auth for a given stream target\n '
with pytest.raises(TokenAuthBusy):
response = stream_targets_i... | Tests an API call to update the details associated with a token
auth for a given stream target | tests/test_wowza.py | test_stream_targets_token_auth_update | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth_update.yml')
def test_stream_targets_token_auth_update():
'\n Tests an API call to update the details associated with a token\n auth for a given stream target\n '
with pytest.raises(TokenAuthBusy):
response = stream_targets_i... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_token_auth_update.yml')
def test_stream_targets_token_auth_update():
'\n Tests an API call to update the details associated with a token\n auth for a given stream target\n '
with pytest.raises(TokenAuthBusy):
response = stream_targets_i... |
e93dddfc88a668e3f16b3bcd53b133f5d1b618c12efbd00e2807dd2be157d0f2 | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties_create.yml')
def test_stream_targets_properties_create():
'\n Tests an API call to create a new property for a given stream target\n '
response = stream_targets_instance.create_property(stream_target_id, {'section': 'hls', 'key': 'chunk... | Tests an API call to create a new property for a given stream target | tests/test_wowza.py | test_stream_targets_properties_create | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties_create.yml')
def test_stream_targets_properties_create():
'\n \n '
response = stream_targets_instance.create_property(stream_target_id, {'section': 'hls', 'key': 'chunkSize', 'value': '6'})
assert isinstance(response, dict)
asse... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties_create.yml')
def test_stream_targets_properties_create():
'\n \n '
response = stream_targets_instance.create_property(stream_target_id, {'section': 'hls', 'key': 'chunkSize', 'value': '6'})
assert isinstance(response, dict)
asse... |
f2c963fbd708c60408fc743731662ecfb02d2e8d3ebef25c565e0c627bf4bffa | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties.yml')
def test_stream_targets_properties():
'\n Tests an API call to get the properties associated with a particular\n stream target\n '
response = stream_targets_instance.properties(stream_target_id)
assert isinstance(response, ... | Tests an API call to get the properties associated with a particular
stream target | tests/test_wowza.py | test_stream_targets_properties | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties.yml')
def test_stream_targets_properties():
'\n Tests an API call to get the properties associated with a particular\n stream target\n '
response = stream_targets_instance.properties(stream_target_id)
assert isinstance(response, ... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties.yml')
def test_stream_targets_properties():
'\n Tests an API call to get the properties associated with a particular\n stream target\n '
response = stream_targets_instance.properties(stream_target_id)
assert isinstance(response, ... |
a93190e03b36cb37aed0b88ddf400f34735a47a2f5e925449ed783f2bbb1a453 | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties_specific.yml')
def test_stream_targets_properties_specific():
'\n Tests an API call to get a specific stream target property by id\n '
response = stream_targets_instance.properties(stream_target_id, property_id)
assert isinstance(re... | Tests an API call to get a specific stream target property by id | tests/test_wowza.py | test_stream_targets_properties_specific | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties_specific.yml')
def test_stream_targets_properties_specific():
'\n \n '
response = stream_targets_instance.properties(stream_target_id, property_id)
assert isinstance(response, dict)
assert ('property' in response) | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties_specific.yml')
def test_stream_targets_properties_specific():
'\n \n '
response = stream_targets_instance.properties(stream_target_id, property_id)
assert isinstance(response, dict)
assert ('property' in response)<|docstring|>Te... |
57b2ef1c9a1f75843efed94fa9f89c9cde98c81be05b6b395dc1856027ff8d3a | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties_delete.yml')
def test_stream_targets_properties_delete():
'\n Tests an API call to delete a stream target property by id\n '
response = stream_targets_instance.delete_property(stream_target_id, property_id)
assert (response.status_c... | Tests an API call to delete a stream target property by id | tests/test_wowza.py | test_stream_targets_properties_delete | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties_delete.yml')
def test_stream_targets_properties_delete():
'\n \n '
response = stream_targets_instance.delete_property(stream_target_id, property_id)
assert (response.status_code == 204) | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_properties_delete.yml')
def test_stream_targets_properties_delete():
'\n \n '
response = stream_targets_instance.delete_property(stream_target_id, property_id)
assert (response.status_code == 204)<|docstring|>Tests an API call to delete a stre... |
a83c2c38fe0e6a1ce3ac7e518b1de0cfd10e77f19cbd2c4cf8f97763abcc30f8 | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_geoblock_create.yml')
def test_stream_targets_geoblock_create():
'\n Tests an API call to create a geoblock for a location\n '
response = stream_targets_instance.create_geoblock(stream_target_id, {'type': 'allow', 'countries': ['de', 'us'], 'white... | Tests an API call to create a geoblock for a location | tests/test_wowza.py | test_stream_targets_geoblock_create | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_geoblock_create.yml')
def test_stream_targets_geoblock_create():
'\n \n '
response = stream_targets_instance.create_geoblock(stream_target_id, {'type': 'allow', 'countries': ['de', 'us'], 'whitelist': '0.0.0.0'})
assert isinstance(response, di... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_geoblock_create.yml')
def test_stream_targets_geoblock_create():
'\n \n '
response = stream_targets_instance.create_geoblock(stream_target_id, {'type': 'allow', 'countries': ['de', 'us'], 'whitelist': '0.0.0.0'})
assert isinstance(response, di... |
db648d3002befcccc003aae24e0b546915f0210ba8056b71aef33e3a87bd2199 | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_geoblock.yml')
def test_stream_targets_geoblock():
'\n Tests an API call to get the geoblocks for a given stream target\n '
response = stream_targets_instance.geoblock(stream_target_id)
assert isinstance(response, dict)
assert ('geoblock' ... | Tests an API call to get the geoblocks for a given stream target | tests/test_wowza.py | test_stream_targets_geoblock | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_geoblock.yml')
def test_stream_targets_geoblock():
'\n \n '
response = stream_targets_instance.geoblock(stream_target_id)
assert isinstance(response, dict)
assert ('geoblock' in response)
assert (response['geoblock']['stream_target_id'... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_geoblock.yml')
def test_stream_targets_geoblock():
'\n \n '
response = stream_targets_instance.geoblock(stream_target_id)
assert isinstance(response, dict)
assert ('geoblock' in response)
assert (response['geoblock']['stream_target_id'... |
9bbeff4e8fbb9cb45e0d946e280d3238b1f01f0936f263b776e42d63f9ded75d | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_geoblock_update.yml')
def test_stream_targets_geoblock_update():
'\n Tests an API call to update geoblocking details for a stream target\n '
with pytest.raises(GeoblockingBusy):
response = stream_targets_instance.update_geoblock(stream_tar... | Tests an API call to update geoblocking details for a stream target | tests/test_wowza.py | test_stream_targets_geoblock_update | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_geoblock_update.yml')
def test_stream_targets_geoblock_update():
'\n \n '
with pytest.raises(GeoblockingBusy):
response = stream_targets_instance.update_geoblock(stream_target_id, {'type': 'deny', 'countries': ['hk', 'it'], 'whitelist': '2... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_targets_geoblock_update.yml')
def test_stream_targets_geoblock_update():
'\n \n '
with pytest.raises(GeoblockingBusy):
response = stream_targets_instance.update_geoblock(stream_target_id, {'type': 'deny', 'countries': ['hk', 'it'], 'whitelist': '2... |
2741e55c2f952009ea22a5556ea7b26afd8b9032d7fdbae2356a652f4b2da6f4 | @vcr.use_cassette('tests/vcr_cassettes/test_players_info.yml')
def test_players_info():
"\n Test a GET call to get a player's info\n "
response = players_instance.info()
assert isinstance(response, dict)
assert ('players' in response)
global player_id
player_id = response['players'][0]['id... | Test a GET call to get a player's info | tests/test_wowza.py | test_players_info | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_players_info.yml')
def test_players_info():
"\n \n "
response = players_instance.info()
assert isinstance(response, dict)
assert ('players' in response)
global player_id
player_id = response['players'][0]['id'] | @vcr.use_cassette('tests/vcr_cassettes/test_players_info.yml')
def test_players_info():
"\n \n "
response = players_instance.info()
assert isinstance(response, dict)
assert ('players' in response)
global player_id
player_id = response['players'][0]['id']<|docstring|>Test a GET call to get ... |
96e1766ac0348032930d27cabe570350df8cdd8d17fd3fdbf7540be84bdcbd4d | @vcr.use_cassette('tests/vcr_cassettes/test_players_info_specific.yml')
def test_players_info_specific():
"\n Test a GET call to get a particular player's info by ID\n "
response = players_instance.info(player_id)
assert isinstance(response, dict)
assert (response['player']['id'] == player_id) | Test a GET call to get a particular player's info by ID | tests/test_wowza.py | test_players_info_specific | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_players_info_specific.yml')
def test_players_info_specific():
"\n \n "
response = players_instance.info(player_id)
assert isinstance(response, dict)
assert (response['player']['id'] == player_id) | @vcr.use_cassette('tests/vcr_cassettes/test_players_info_specific.yml')
def test_players_info_specific():
"\n \n "
response = players_instance.info(player_id)
assert isinstance(response, dict)
assert (response['player']['id'] == player_id)<|docstring|>Test a GET call to get a particular player's i... |
74c2d35769e29c864018c9b46f8f31b53ae7328475c13911eeea69fd631b964d | @vcr.use_cassette('tests/vcr_cassettes/test_players_update.yml')
def test_players_update():
'\n Test a PATCH call to update information associated with\n a particular player\n '
response = players_instance.update(player_id, {'width': '800px'})
assert isinstance(response, dict)
assert (response[... | Test a PATCH call to update information associated with
a particular player | tests/test_wowza.py | test_players_update | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_players_update.yml')
def test_players_update():
'\n Test a PATCH call to update information associated with\n a particular player\n '
response = players_instance.update(player_id, {'width': '800px'})
assert isinstance(response, dict)
assert (response[... | @vcr.use_cassette('tests/vcr_cassettes/test_players_update.yml')
def test_players_update():
'\n Test a PATCH call to update information associated with\n a particular player\n '
response = players_instance.update(player_id, {'width': '800px'})
assert isinstance(response, dict)
assert (response[... |
24a36b6b9142fd6a0018cc18f1f83a8bc6eb2e2841d39162ec6ba25bef67da4e | @vcr.use_cassette('tests/vcr_cassettes/test_players_state.yml')
def test_players_state():
'\n Test an API call to get the state of a particular player\n '
response = players_instance.info(player_id, 'state')
assert isinstance(response, dict)
assert ('state' in response['player']) | Test an API call to get the state of a particular player | tests/test_wowza.py | test_players_state | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_players_state.yml')
def test_players_state():
'\n \n '
response = players_instance.info(player_id, 'state')
assert isinstance(response, dict)
assert ('state' in response['player']) | @vcr.use_cassette('tests/vcr_cassettes/test_players_state.yml')
def test_players_state():
'\n \n '
response = players_instance.info(player_id, 'state')
assert isinstance(response, dict)
assert ('state' in response['player'])<|docstring|>Test an API call to get the state of a particular player<|end... |
05562c3b1800ee8534857d8f38fd479db588ae12cb20356a8ce8822d97fc1b9c | @vcr.use_cassette('tests/vcr_cassettes/test_players_rebuild.yml')
def test_players_rebuild():
'\n Tests an API call to rebuild a particular player\n '
response = players_instance.rebuild(player_id)
assert isinstance(response, dict)
assert (response['player']['state'] in ['requested', 'already_requ... | Tests an API call to rebuild a particular player | tests/test_wowza.py | test_players_rebuild | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_players_rebuild.yml')
def test_players_rebuild():
'\n \n '
response = players_instance.rebuild(player_id)
assert isinstance(response, dict)
assert (response['player']['state'] in ['requested', 'already_requested']), "The state 'requested' or 'already_req... | @vcr.use_cassette('tests/vcr_cassettes/test_players_rebuild.yml')
def test_players_rebuild():
'\n \n '
response = players_instance.rebuild(player_id)
assert isinstance(response, dict)
assert (response['player']['state'] in ['requested', 'already_requested']), "The state 'requested' or 'already_req... |
09c1e272034f411c17c61e08bf8396ccbd8489c2eb855dadddc2e5be2b63893d | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_new_missing_params.yml')
def test_players_urls_new_missing_params():
'\n Tests an API call to create a new URL for a player, but with\n missing required params\n '
with pytest.raises(MissingParameter):
response = players_instance.urls(pla... | Tests an API call to create a new URL for a player, but with
missing required params | tests/test_wowza.py | test_players_urls_new_missing_params | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_new_missing_params.yml')
def test_players_urls_new_missing_params():
'\n Tests an API call to create a new URL for a player, but with\n missing required params\n '
with pytest.raises(MissingParameter):
response = players_instance.urls(pla... | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_new_missing_params.yml')
def test_players_urls_new_missing_params():
'\n Tests an API call to create a new URL for a player, but with\n missing required params\n '
with pytest.raises(MissingParameter):
response = players_instance.urls(pla... |
188750c0024f739df281fd1fe4c964e8035e692ea999d05932e462846cb13373 | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_new.yml')
def test_players_urls_new():
'\n Tests an API call to create a new URL for a particular player\n '
response = players_instance.urls(player_id=player_id, option='new', param_dict={'label': 'Test label', 'height': 1080, 'width': 1920, 'bitra... | Tests an API call to create a new URL for a particular player | tests/test_wowza.py | test_players_urls_new | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_new.yml')
def test_players_urls_new():
'\n \n '
response = players_instance.urls(player_id=player_id, option='new', param_dict={'label': 'Test label', 'height': 1080, 'width': 1920, 'bitrate': 2500, 'url': 'http://some.url/test/path'})
assert is... | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_new.yml')
def test_players_urls_new():
'\n \n '
response = players_instance.urls(player_id=player_id, option='new', param_dict={'label': 'Test label', 'height': 1080, 'width': 1920, 'bitrate': 2500, 'url': 'http://some.url/test/path'})
assert is... |
020f03b66c9feb742aa032c971388b99dd2e26e36e39b038f541937357917f56 | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_get.yml')
def test_players_urls_get():
'\n Tests an API call to get the URLs for a particular player\n '
response = players_instance.urls(player_id)
assert isinstance(response, dict)
global url_ids
url_ids = [r['id'] for r in response['u... | Tests an API call to get the URLs for a particular player | tests/test_wowza.py | test_players_urls_get | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_get.yml')
def test_players_urls_get():
'\n \n '
response = players_instance.urls(player_id)
assert isinstance(response, dict)
global url_ids
url_ids = [r['id'] for r in response['urls']] | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_get.yml')
def test_players_urls_get():
'\n \n '
response = players_instance.urls(player_id)
assert isinstance(response, dict)
global url_ids
url_ids = [r['id'] for r in response['urls']]<|docstring|>Tests an API call to get the URLs for ... |
9a31536c6df045bbf4ed19c7a965bb7772360c4823978a2481c10b11dad62a99 | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_get_specific.yml')
def test_players_urls_get_specific():
'\n Tests an API call to get details for a specific URL\n '
response = players_instance.urls(player_id=player_id, url_id=url_ids[0])
assert isinstance(response, dict)
assert ('url' in ... | Tests an API call to get details for a specific URL | tests/test_wowza.py | test_players_urls_get_specific | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_get_specific.yml')
def test_players_urls_get_specific():
'\n \n '
response = players_instance.urls(player_id=player_id, url_id=url_ids[0])
assert isinstance(response, dict)
assert ('url' in response) | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_get_specific.yml')
def test_players_urls_get_specific():
'\n \n '
response = players_instance.urls(player_id=player_id, url_id=url_ids[0])
assert isinstance(response, dict)
assert ('url' in response)<|docstring|>Tests an API call to get deta... |
3366482358c17dbe6a5126bd485cc8480f8ed30e08d62f6cda8024e5ed581166 | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_update.yml')
def test_players_urls_update():
'\n Tests an API call to update the details of a specific URL\n '
response = players_instance.urls(player_id=player_id, url_id=url_ids[0], param_dict={'label': 'Test label change'})
assert isinstance(... | Tests an API call to update the details of a specific URL | tests/test_wowza.py | test_players_urls_update | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_update.yml')
def test_players_urls_update():
'\n \n '
response = players_instance.urls(player_id=player_id, url_id=url_ids[0], param_dict={'label': 'Test label change'})
assert isinstance(response, dict)
assert (response['url']['id'] == url_... | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_update.yml')
def test_players_urls_update():
'\n \n '
response = players_instance.urls(player_id=player_id, url_id=url_ids[0], param_dict={'label': 'Test label change'})
assert isinstance(response, dict)
assert (response['url']['id'] == url_... |
5789d9ca0424453bf972ce05ac323c91e4f175a1f04fd1cae1c52d86d681e843 | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_delete.yml')
def test_players_urls_delete():
'\n Tests an API call to delete a specific URL by ID\n '
for url in url_ids:
response = players_instance.urls(player_id, 'delete', url)
assert (response.status_code == 204) | Tests an API call to delete a specific URL by ID | tests/test_wowza.py | test_players_urls_delete | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_delete.yml')
def test_players_urls_delete():
'\n \n '
for url in url_ids:
response = players_instance.urls(player_id, 'delete', url)
assert (response.status_code == 204) | @vcr.use_cassette('tests/vcr_cassettes/test_players_urls_delete.yml')
def test_players_urls_delete():
'\n \n '
for url in url_ids:
response = players_instance.urls(player_id, 'delete', url)
assert (response.status_code == 204)<|docstring|>Tests an API call to delete a specific URL by ID<|e... |
7b4ea34d61aa4b4a8e05f5f5d0b03d39f229e1f4d8ae4728563cebddde7ca103 | @vcr.use_cassette('tests/vcr_cassettes/test_recordings_get.yml')
def test_recordings_get():
'\n Tests an API call to get all recordings associated with an account\n '
response = recordings_instance.info()
assert isinstance(response, dict)
assert ('recordings' in response) | Tests an API call to get all recordings associated with an account | tests/test_wowza.py | test_recordings_get | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_recordings_get.yml')
def test_recordings_get():
'\n \n '
response = recordings_instance.info()
assert isinstance(response, dict)
assert ('recordings' in response) | @vcr.use_cassette('tests/vcr_cassettes/test_recordings_get.yml')
def test_recordings_get():
'\n \n '
response = recordings_instance.info()
assert isinstance(response, dict)
assert ('recordings' in response)<|docstring|>Tests an API call to get all recordings associated with an account<|endoftext|> |
b7ae0a1c6c0ae075004f414a362d20d426e11f4dbd0fde5d55eaaa4248c8ac2c | @vcr.use_cassette('tests/vcr_cassettes/test_transcoders_create.yml')
def test_transcoders_create():
'\n Tests an API call to create a transcoder\n '
trans_data = {'name': 'Test Transcoder', 'transcoder_type': 'transcoded', 'billing_mode': 'pay_as_you_go', 'broadcast_location': 'us_east_s_carolina', 'proto... | Tests an API call to create a transcoder | tests/test_wowza.py | test_transcoders_create | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_transcoders_create.yml')
def test_transcoders_create():
'\n \n '
trans_data = {'name': 'Test Transcoder', 'transcoder_type': 'transcoded', 'billing_mode': 'pay_as_you_go', 'broadcast_location': 'us_east_s_carolina', 'protocol': 'rtmp', 'delivery_method': 'push'}... | @vcr.use_cassette('tests/vcr_cassettes/test_transcoders_create.yml')
def test_transcoders_create():
'\n \n '
trans_data = {'name': 'Test Transcoder', 'transcoder_type': 'transcoded', 'billing_mode': 'pay_as_you_go', 'broadcast_location': 'us_east_s_carolina', 'protocol': 'rtmp', 'delivery_method': 'push'}... |
ad8cf8580019c791286d95047c6bac8620ebf95a1d664b41ae7b3376a9ba73e1 | @vcr.use_cassette('tests/vcr_cassettes/test_transcoders_get.yml')
def test_transcoders_get():
'\n Tests an API call to get all transcoders associated with an account\n '
response = transcoders_instance.info()
assert isinstance(response, dict)
assert ('transcoders' in response) | Tests an API call to get all transcoders associated with an account | tests/test_wowza.py | test_transcoders_get | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_transcoders_get.yml')
def test_transcoders_get():
'\n \n '
response = transcoders_instance.info()
assert isinstance(response, dict)
assert ('transcoders' in response) | @vcr.use_cassette('tests/vcr_cassettes/test_transcoders_get.yml')
def test_transcoders_get():
'\n \n '
response = transcoders_instance.info()
assert isinstance(response, dict)
assert ('transcoders' in response)<|docstring|>Tests an API call to get all transcoders associated with an account<|endoft... |
e198934133602ee1fc668c9a214a0dfd26bf88c3ae3627e70e0e8e6684b2d7e5 | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_create.yml')
def test_schedules_create():
'\n Tests an API call to create a new schedule\n '
response = schedules_instance.create({'transcoder_id': trans_id, 'name': 'Test Schedule', 'action_type': 'start', 'begins_at': '2018-01-01T12:00:00.000Z', 'sta... | Tests an API call to create a new schedule | tests/test_wowza.py | test_schedules_create | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_create.yml')
def test_schedules_create():
'\n \n '
response = schedules_instance.create({'transcoder_id': trans_id, 'name': 'Test Schedule', 'action_type': 'start', 'begins_at': '2018-01-01T12:00:00.000Z', 'start_transcoder': '2018-01-01T12:00:00.000Z'... | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_create.yml')
def test_schedules_create():
'\n \n '
response = schedules_instance.create({'transcoder_id': trans_id, 'name': 'Test Schedule', 'action_type': 'start', 'begins_at': '2018-01-01T12:00:00.000Z', 'start_transcoder': '2018-01-01T12:00:00.000Z'... |
1ba07ad1201981ef285507055bb665ffeb0c43f581f0fda07676e72cac66e372 | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_get.yml')
def test_schedules_get():
'\n Tests an API call to get all the schedules associated with an account\n '
response = schedules_instance.info()
assert isinstance(response, dict)
assert ('schedules' in response) | Tests an API call to get all the schedules associated with an account | tests/test_wowza.py | test_schedules_get | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_get.yml')
def test_schedules_get():
'\n \n '
response = schedules_instance.info()
assert isinstance(response, dict)
assert ('schedules' in response) | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_get.yml')
def test_schedules_get():
'\n \n '
response = schedules_instance.info()
assert isinstance(response, dict)
assert ('schedules' in response)<|docstring|>Tests an API call to get all the schedules associated with an account<|endoftext|> |
2d74eeb3057ec64935f809589bb08d92ffe0019d28638ca406f6c5390cef233e | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_get_state.yml')
def test_schedules_get_state():
'\n Tests an API call to get the state of a schedule by ID\n '
response = schedules_instance.info(schedule_id, 'state')
assert isinstance(response, dict)
assert ('schedule' in response)
assert... | Tests an API call to get the state of a schedule by ID | tests/test_wowza.py | test_schedules_get_state | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_get_state.yml')
def test_schedules_get_state():
'\n \n '
response = schedules_instance.info(schedule_id, 'state')
assert isinstance(response, dict)
assert ('schedule' in response)
assert ('state' in response['schedule']) | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_get_state.yml')
def test_schedules_get_state():
'\n \n '
response = schedules_instance.info(schedule_id, 'state')
assert isinstance(response, dict)
assert ('schedule' in response)
assert ('state' in response['schedule'])<|docstring|>Tests a... |
d3d0222ae112226832118aba5d6acde9818d80f8e4d4e6e0a298e64858354a45 | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_update.yml')
def test_schedules_update():
'\n Tests an API call to update the details of a schedule\n '
response = schedules_instance.update(schedule_id, {'transcoder_id': trans_id, 'name': 'Test Schedule Name'})
assert isinstance(response, dict)
... | Tests an API call to update the details of a schedule | tests/test_wowza.py | test_schedules_update | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_update.yml')
def test_schedules_update():
'\n \n '
response = schedules_instance.update(schedule_id, {'transcoder_id': trans_id, 'name': 'Test Schedule Name'})
assert isinstance(response, dict)
assert ('schedule' in response)
assert (respon... | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_update.yml')
def test_schedules_update():
'\n \n '
response = schedules_instance.update(schedule_id, {'transcoder_id': trans_id, 'name': 'Test Schedule Name'})
assert isinstance(response, dict)
assert ('schedule' in response)
assert (respon... |
63ddd7ee80c660a145ea01d7c19ae8aaefaf66a1ec75ab50a58473c25b9f8240 | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_disable.yml')
def test_schedules_disable():
'\n Tests an API call to disable a schedule\n '
response = schedules_instance.disable(schedule_id)
assert isinstance(response, dict)
assert ('schedule' in response)
assert (response['schedule']['s... | Tests an API call to disable a schedule | tests/test_wowza.py | test_schedules_disable | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_disable.yml')
def test_schedules_disable():
'\n \n '
response = schedules_instance.disable(schedule_id)
assert isinstance(response, dict)
assert ('schedule' in response)
assert (response['schedule']['state'] == 'disabled') | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_disable.yml')
def test_schedules_disable():
'\n \n '
response = schedules_instance.disable(schedule_id)
assert isinstance(response, dict)
assert ('schedule' in response)
assert (response['schedule']['state'] == 'disabled')<|docstring|>Tests... |
a676876f91668670f34bb05825c9357ee71470f20194a31f177e722cdfbc819e | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_enable.yml')
def test_schedules_enable():
'\n Tests an API call to enable a schedule\n '
time.sleep(2)
response = schedules_instance.enable(schedule_id)
assert isinstance(response, dict)
assert ('schedule' in response)
assert (response[... | Tests an API call to enable a schedule | tests/test_wowza.py | test_schedules_enable | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_enable.yml')
def test_schedules_enable():
'\n \n '
time.sleep(2)
response = schedules_instance.enable(schedule_id)
assert isinstance(response, dict)
assert ('schedule' in response)
assert (response['schedule']['state'] == 'enabled') | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_enable.yml')
def test_schedules_enable():
'\n \n '
time.sleep(2)
response = schedules_instance.enable(schedule_id)
assert isinstance(response, dict)
assert ('schedule' in response)
assert (response['schedule']['state'] == 'enabled')<|do... |
dd9adc3675332ddcd55ca9375d1775f643888c5f223b142ad82d2ad538564909 | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_toggle.yml')
def test_schedules_toggle():
"\n Tests an API call to toggle a schedule's active state\n "
valid_states = ['enabled', 'disabled']
for _ in range(0, 2):
current_state = schedules_instance.info(schedule_id, 'state')['schedule']['... | Tests an API call to toggle a schedule's active state | tests/test_wowza.py | test_schedules_toggle | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_toggle.yml')
def test_schedules_toggle():
"\n \n "
valid_states = ['enabled', 'disabled']
for _ in range(0, 2):
current_state = schedules_instance.info(schedule_id, 'state')['schedule']['state']
assert (current_state in valid_states... | @vcr.use_cassette('tests/vcr_cassettes/test_schedules_toggle.yml')
def test_schedules_toggle():
"\n \n "
valid_states = ['enabled', 'disabled']
for _ in range(0, 2):
current_state = schedules_instance.info(schedule_id, 'state')['schedule']['state']
assert (current_state in valid_states... |
bcef30956ceae6b2db1be4aa66dd01447e547e5d3864ecd692bceb0d6d14b49d | @vcr.use_cassette('tests/vcr_cassettes/test_stream_delete.yml')
def test_stream_delete():
'\n Tests an API call to delete a live stream\n '
while 1:
time.sleep(2)
response = wowza_instance.info(stream_id, 'state')
print('Response: {}'.format(response))
if (response['live_st... | Tests an API call to delete a live stream | tests/test_wowza.py | test_stream_delete | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_stream_delete.yml')
def test_stream_delete():
'\n \n '
while 1:
time.sleep(2)
response = wowza_instance.info(stream_id, 'state')
print('Response: {}'.format(response))
if (response['live_stream']['state'] is not 'started'):
... | @vcr.use_cassette('tests/vcr_cassettes/test_stream_delete.yml')
def test_stream_delete():
'\n \n '
while 1:
time.sleep(2)
response = wowza_instance.info(stream_id, 'state')
print('Response: {}'.format(response))
if (response['live_stream']['state'] is not 'started'):
... |
acdae67056bd9f36bb353da3ee37116b1c5a18a4d838e21cca0452743f422982 | @vcr.use_cassette('tests/vcr_cassettes/test_transcoders_delete.yml')
def test_transcoders_delete():
'\n Tests an API call to delete a transcoder\n '
response = transcoders_instance.delete(trans_id)
assert (response.status_code == 204) | Tests an API call to delete a transcoder | tests/test_wowza.py | test_transcoders_delete | rafagonc/wowza | 15 | python | @vcr.use_cassette('tests/vcr_cassettes/test_transcoders_delete.yml')
def test_transcoders_delete():
'\n \n '
response = transcoders_instance.delete(trans_id)
assert (response.status_code == 204) | @vcr.use_cassette('tests/vcr_cassettes/test_transcoders_delete.yml')
def test_transcoders_delete():
'\n \n '
response = transcoders_instance.delete(trans_id)
assert (response.status_code == 204)<|docstring|>Tests an API call to delete a transcoder<|endoftext|> |
1c68ecebe7778d5d21ef8d600a636ce56da6585c2ffde65ff02df38bdb6b6283 | @property
def related_names(self):
"\n\t\tA list of fake `ast.Name.id` records inside the node.\n\n\t\tExamples::\n\n\t\t\tTextRecord(ast_node, 'Union[Text, MyClass]').related_names\n\t\t\t{'Union', 'Text', 'MyClass'}\n\n\t\tReturns:\n\t\t\tA set of related names.\n\t\t"
result = set()
for related_name in s... | A list of fake `ast.Name.id` records inside the node.
Examples::
TextRecord(ast_node, 'Union[Text, MyClass]').related_names
{'Union', 'Text', 'MyClass'}
Returns:
A set of related names. | fhdoc/ast_parser/node_records/text_record.py | related_names | FHPythonUtils/FHDoc | 1 | python | @property
def related_names(self):
"\n\t\tA list of fake `ast.Name.id` records inside the node.\n\n\t\tExamples::\n\n\t\t\tTextRecord(ast_node, 'Union[Text, MyClass]').related_names\n\t\t\t{'Union', 'Text', 'MyClass'}\n\n\t\tReturns:\n\t\t\tA set of related names.\n\t\t"
result = set()
for related_name in s... | @property
def related_names(self):
"\n\t\tA list of fake `ast.Name.id` records inside the node.\n\n\t\tExamples::\n\n\t\t\tTextRecord(ast_node, 'Union[Text, MyClass]').related_names\n\t\t\t{'Union', 'Text', 'MyClass'}\n\n\t\tReturns:\n\t\t\tA set of related names.\n\t\t"
result = set()
for related_name in s... |
c9ed2b070e672dea0281234cf9f8468990a315bf05def56e8c54168532c75e7b | @property
def diagram(self):
'The diagram associated with the object.'
return self.mesh | The diagram associated with the object. | src/compas_ags/rhino/diagramobject.py | diagram | franaudo/ags | 1 | python | @property
def diagram(self):
return self.mesh | @property
def diagram(self):
return self.mesh<|docstring|>The diagram associated with the object.<|endoftext|> |
e9a03763a07b2100a58d6727bb72d9de964ee984add2a23dd4c8960c77ee064b | def unselect(self):
'Unselect all Rhino objects associated with this diagram object.'
compas_rhino.rs.UnselectObjects(self.artist.guids) | Unselect all Rhino objects associated with this diagram object. | src/compas_ags/rhino/diagramobject.py | unselect | franaudo/ags | 1 | python | def unselect(self):
compas_rhino.rs.UnselectObjects(self.artist.guids) | def unselect(self):
compas_rhino.rs.UnselectObjects(self.artist.guids)<|docstring|>Unselect all Rhino objects associated with this diagram object.<|endoftext|> |
92432aa4df817aad323f12db2b6c1ba7800e908752785dfd5e754eb78bf6f712 | def select_vertex(self, message='Select Vertex.'):
'Manually select one vertex in the Rhino view.\n\n Returns\n -------\n int\n The identifier of the selected vertex.\n '
pointfilter = compas_rhino.rs.filter.point
guid = compas_rhino.rs.GetObject(message=message, prese... | Manually select one vertex in the Rhino view.
Returns
-------
int
The identifier of the selected vertex. | src/compas_ags/rhino/diagramobject.py | select_vertex | franaudo/ags | 1 | python | def select_vertex(self, message='Select Vertex.'):
'Manually select one vertex in the Rhino view.\n\n Returns\n -------\n int\n The identifier of the selected vertex.\n '
pointfilter = compas_rhino.rs.filter.point
guid = compas_rhino.rs.GetObject(message=message, prese... | def select_vertex(self, message='Select Vertex.'):
'Manually select one vertex in the Rhino view.\n\n Returns\n -------\n int\n The identifier of the selected vertex.\n '
pointfilter = compas_rhino.rs.filter.point
guid = compas_rhino.rs.GetObject(message=message, prese... |
fc221fb45b5cefa10af4bdfc052f531b882c61bece04d01d70cee12aa035d302 | def select_edge(self, message='Select Edge.'):
'Manually select one edge in the Rhino view.\n\n Returns\n -------\n tuple of int\n The identifier of the selected edge.\n '
curvefilter = compas_rhino.rs.filter.curve
guid = compas_rhino.rs.GetObject(message=message, pres... | Manually select one edge in the Rhino view.
Returns
-------
tuple of int
The identifier of the selected edge. | src/compas_ags/rhino/diagramobject.py | select_edge | franaudo/ags | 1 | python | def select_edge(self, message='Select Edge.'):
'Manually select one edge in the Rhino view.\n\n Returns\n -------\n tuple of int\n The identifier of the selected edge.\n '
curvefilter = compas_rhino.rs.filter.curve
guid = compas_rhino.rs.GetObject(message=message, pres... | def select_edge(self, message='Select Edge.'):
'Manually select one edge in the Rhino view.\n\n Returns\n -------\n tuple of int\n The identifier of the selected edge.\n '
curvefilter = compas_rhino.rs.filter.curve
guid = compas_rhino.rs.GetObject(message=message, pres... |
1ac7386d8c73ca75a1ff93e588ea5d2d0fcf8233f00039c8353e0a1ab693a4e4 | def move(self):
'Move the entire diagram.\n\n Returns\n -------\n bool\n True if the operation is successful.\n False otherwise.\n '
def OnDynamicDraw(sender, e):
translation = subtract_vectors(list(e.CurrentPoint), start)
for vertex in vertex_x... | Move the entire diagram.
Returns
-------
bool
True if the operation is successful.
False otherwise. | src/compas_ags/rhino/diagramobject.py | move | franaudo/ags | 1 | python | def move(self):
'Move the entire diagram.\n\n Returns\n -------\n bool\n True if the operation is successful.\n False otherwise.\n '
def OnDynamicDraw(sender, e):
translation = subtract_vectors(list(e.CurrentPoint), start)
for vertex in vertex_x... | def move(self):
'Move the entire diagram.\n\n Returns\n -------\n bool\n True if the operation is successful.\n False otherwise.\n '
def OnDynamicDraw(sender, e):
translation = subtract_vectors(list(e.CurrentPoint), start)
for vertex in vertex_x... |
561f7cd3acd3ec2c16fd2ddabbedf58fabb71ff485003a6a1b71c921350cc2ef | def move_vertex(self, vertex, constraint=None, allow_off=None):
'Move one vertex of the diagram and update the data structure to the new geometry.\n\n Parameters\n ----------\n vertex : int\n The identifier of the vertex.\n\n Other Parameters\n ----------------\n ... | Move one vertex of the diagram and update the data structure to the new geometry.
Parameters
----------
vertex : int
The identifier of the vertex.
Other Parameters
----------------
constraint : :class:`Rhino.Geometry.GeometryBase`, optional
allow_off : bool, optional
Returns
-------
bool
True if the operatio... | src/compas_ags/rhino/diagramobject.py | move_vertex | franaudo/ags | 1 | python | def move_vertex(self, vertex, constraint=None, allow_off=None):
'Move one vertex of the diagram and update the data structure to the new geometry.\n\n Parameters\n ----------\n vertex : int\n The identifier of the vertex.\n\n Other Parameters\n ----------------\n ... | def move_vertex(self, vertex, constraint=None, allow_off=None):
'Move one vertex of the diagram and update the data structure to the new geometry.\n\n Parameters\n ----------\n vertex : int\n The identifier of the vertex.\n\n Other Parameters\n ----------------\n ... |
898fcea5dc234e749b29529fbb1aed84ec43a046f7198c7f15cfb7ff7ad0540e | def move_vertices(self, vertices):
'Move a selection of vertices of the diagram and update the data structure to the new geometry.\n\n Parameters\n ----------\n vertices : list\n The identifiers of the vertices.\n\n Returns\n -------\n bool\n True if t... | Move a selection of vertices of the diagram and update the data structure to the new geometry.
Parameters
----------
vertices : list
The identifiers of the vertices.
Returns
-------
bool
True if the operation was successful.
False otherwise. | src/compas_ags/rhino/diagramobject.py | move_vertices | franaudo/ags | 1 | python | def move_vertices(self, vertices):
'Move a selection of vertices of the diagram and update the data structure to the new geometry.\n\n Parameters\n ----------\n vertices : list\n The identifiers of the vertices.\n\n Returns\n -------\n bool\n True if t... | def move_vertices(self, vertices):
'Move a selection of vertices of the diagram and update the data structure to the new geometry.\n\n Parameters\n ----------\n vertices : list\n The identifiers of the vertices.\n\n Returns\n -------\n bool\n True if t... |
1396effe9d742429b53fa1a88e67b823895dd237ab58c91ae3ed45c214434648 | def field(resolver: Optional[_RESOLVER_TYPE]=None, *, name: Optional[str]=None, is_subscription: bool=False, description: Optional[str]=None, permission_classes: Optional[List[Type[BasePermission]]]=None, federation: Optional[FederationFieldParams]=None, deprecation_reason: Optional[str]=None, default: Any=UNSET, defau... | Annotates a method or property as a GraphQL field.
This is normally used inside a type declaration:
>>> @strawberry.type:
>>> class X:
>>> field_abc: str = strawberry.field(description="ABC")
>>> @strawberry.field(description="ABC")
>>> def field_with_resolver(self) -> str:
>>> return "abc"
it c... | strawberry/field.py | field | tobiaswiese/strawberry | 0 | python | def field(resolver: Optional[_RESOLVER_TYPE]=None, *, name: Optional[str]=None, is_subscription: bool=False, description: Optional[str]=None, permission_classes: Optional[List[Type[BasePermission]]]=None, federation: Optional[FederationFieldParams]=None, deprecation_reason: Optional[str]=None, default: Any=UNSET, defau... | def field(resolver: Optional[_RESOLVER_TYPE]=None, *, name: Optional[str]=None, is_subscription: bool=False, description: Optional[str]=None, permission_classes: Optional[List[Type[BasePermission]]]=None, federation: Optional[FederationFieldParams]=None, deprecation_reason: Optional[str]=None, default: Any=UNSET, defau... |
59daf11f94b5ed54c3d7778a59780b20459b4bd64774c69b1709f267c6b27378 | def __call__(self, resolver: _RESOLVER_TYPE) -> 'StrawberryField':
'Add a resolver to the field'
if (not isinstance(resolver, StrawberryResolver)):
resolver = StrawberryResolver(resolver)
self.base_resolver = resolver
return self | Add a resolver to the field | strawberry/field.py | __call__ | tobiaswiese/strawberry | 0 | python | def __call__(self, resolver: _RESOLVER_TYPE) -> 'StrawberryField':
if (not isinstance(resolver, StrawberryResolver)):
resolver = StrawberryResolver(resolver)
self.base_resolver = resolver
return self | def __call__(self, resolver: _RESOLVER_TYPE) -> 'StrawberryField':
if (not isinstance(resolver, StrawberryResolver)):
resolver = StrawberryResolver(resolver)
self.base_resolver = resolver
return self<|docstring|>Add a resolver to the field<|endoftext|> |
4c0d417714e8402e1fa16329c785123e4a2ebbb6a51c227c080918d5c7c36b37 | def get_result(self, source: Any, info: Info, args: List[Any], kwargs: Dict[(str, Any)]) -> Union[(Awaitable[Any], Any)]:
"\n Calls the resolver defined for the StrawberryField. If the field doesn't have a\n resolver defined we default to using getattr on `source`.\n "
if self.base_resolver... | Calls the resolver defined for the StrawberryField. If the field doesn't have a
resolver defined we default to using getattr on `source`. | strawberry/field.py | get_result | tobiaswiese/strawberry | 0 | python | def get_result(self, source: Any, info: Info, args: List[Any], kwargs: Dict[(str, Any)]) -> Union[(Awaitable[Any], Any)]:
"\n Calls the resolver defined for the StrawberryField. If the field doesn't have a\n resolver defined we default to using getattr on `source`.\n "
if self.base_resolver... | def get_result(self, source: Any, info: Info, args: List[Any], kwargs: Dict[(str, Any)]) -> Union[(Awaitable[Any], Any)]:
"\n Calls the resolver defined for the StrawberryField. If the field doesn't have a\n resolver defined we default to using getattr on `source`.\n "
if self.base_resolver... |
cbc825d913b90c77ead91039a811b7a555b6c682d397e7cfd5e04203134255a8 | @click.command()
@click.pass_context
def show(ctx):
'\n Show current configuration\n '
click.echo(yaml.dump(ctx.obj.get('JT_CONFIG'), default_flow_style=False)) | Show current configuration | jtracker/cli/conf/commands.py | show | jthub/jt-cli | 2 | python | @click.command()
@click.pass_context
def show(ctx):
'\n \n '
click.echo(yaml.dump(ctx.obj.get('JT_CONFIG'), default_flow_style=False)) | @click.command()
@click.pass_context
def show(ctx):
'\n \n '
click.echo(yaml.dump(ctx.obj.get('JT_CONFIG'), default_flow_style=False))<|docstring|>Show current configuration<|endoftext|> |
8afd066f4ff3ba6d82a6df703e5f4697d13d79c664be0b442a2bde9995bfba5d | @click.command()
@click.pass_context
def update(ctx):
'\n Update JTracker CLI configuration\n '
click.echo('*** to be implemented ***') | Update JTracker CLI configuration | jtracker/cli/conf/commands.py | update | jthub/jt-cli | 2 | python | @click.command()
@click.pass_context
def update(ctx):
'\n \n '
click.echo('*** to be implemented ***') | @click.command()
@click.pass_context
def update(ctx):
'\n \n '
click.echo('*** to be implemented ***')<|docstring|>Update JTracker CLI configuration<|endoftext|> |
d14bd958ec9c2a3c6edadd9403ab3e6b0220bb4cc00f14a0b1c4498ba55c6120 | @staticmethod
def segments(path):
'read segments from .segments file. return list of Segment'
res = []
with open(path) as f:
segments = f.read().splitlines(False)
for segment in segments:
(start, end, name) = segment.split('\t')
s = Segment(name, float(start), float(end))
... | read segments from .segments file. return list of Segment | src/moshaf_builder/reader.py | segments | AmmarRabie/auto-combine-moshaf | 0 | python | @staticmethod
def segments(path):
res = []
with open(path) as f:
segments = f.read().splitlines(False)
for segment in segments:
(start, end, name) = segment.split('\t')
s = Segment(name, float(start), float(end))
res.append(s)
return res | @staticmethod
def segments(path):
res = []
with open(path) as f:
segments = f.read().splitlines(False)
for segment in segments:
(start, end, name) = segment.split('\t')
s = Segment(name, float(start), float(end))
res.append(s)
return res<|docstring|>read segments fro... |
cf95f9d5d7a016239d28657fd6d7de0cab2f45c2f1bb23a7e949f5b56114ee6d | @staticmethod
def chapters(path):
'read segments from .segments file. return list of Segment'
res = []
with open(path) as f:
chapters = f.read().splitlines(False)
for chapter in chapters:
(chapter, globalStart, globalEnd) = chapter.split('\t')
s = ChapterLocation(chapter, globalS... | read segments from .segments file. return list of Segment | src/moshaf_builder/reader.py | chapters | AmmarRabie/auto-combine-moshaf | 0 | python | @staticmethod
def chapters(path):
res = []
with open(path) as f:
chapters = f.read().splitlines(False)
for chapter in chapters:
(chapter, globalStart, globalEnd) = chapter.split('\t')
s = ChapterLocation(chapter, globalStart, globalEnd)
res.append(s)
return res | @staticmethod
def chapters(path):
res = []
with open(path) as f:
chapters = f.read().splitlines(False)
for chapter in chapters:
(chapter, globalStart, globalEnd) = chapter.split('\t')
s = ChapterLocation(chapter, globalStart, globalEnd)
res.append(s)
return res<|docs... |
2720831bea234000aff7c1e1b83c0b6ba4a98a2ac76607e6cd10ae75a9c37808 | def get_sell_price(self, item: Item, children_items: Iterable[Item]) -> Price:
"\n :returns Price of item and it's children\n "
if (not self.can_sell(item)):
raise ValueError('Item is not sellable')
tpl = self.__templates_repository.get_template(item)
price_rub = tpl.props.CreditsP... | :returns Price of item and it's children | tarkov/trader/trader.py | get_sell_price | JustEmuTarkov/jet_py | 14 | python | def get_sell_price(self, item: Item, children_items: Iterable[Item]) -> Price:
"\n \n "
if (not self.can_sell(item)):
raise ValueError('Item is not sellable')
tpl = self.__templates_repository.get_template(item)
price_rub = tpl.props.CreditsPrice
for child in children_items:
... | def get_sell_price(self, item: Item, children_items: Iterable[Item]) -> Price:
"\n \n "
if (not self.can_sell(item)):
raise ValueError('Item is not sellable')
tpl = self.__templates_repository.get_template(item)
price_rub = tpl.props.CreditsPrice
for child in children_items:
... |
29a9edc2eb55dc4abae556045d315bfd78b4ceaae4e05488d7e4e3d1189b97aa | def scalespace(img, sigma, order=(0, 0)):
'Compute the scale-space of an image. sigma is the scale parameter. dx\n and dy specify the differentiation order along the x and y axis\n respectively.'
ss = ScaleSpace(img.shape, [sigma], [order[0]], [order[1]])
return ss.compute(img)[0] | Compute the scale-space of an image. sigma is the scale parameter. dx
and dy specify the differentiation order along the x and y axis
respectively. | ipcv/scalespace.py | scalespace | andersbll/ipcv | 2 | python | def scalespace(img, sigma, order=(0, 0)):
'Compute the scale-space of an image. sigma is the scale parameter. dx\n and dy specify the differentiation order along the x and y axis\n respectively.'
ss = ScaleSpace(img.shape, [sigma], [order[0]], [order[1]])
return ss.compute(img)[0] | def scalespace(img, sigma, order=(0, 0)):
'Compute the scale-space of an image. sigma is the scale parameter. dx\n and dy specify the differentiation order along the x and y axis\n respectively.'
ss = ScaleSpace(img.shape, [sigma], [order[0]], [order[1]])
return ss.compute(img)[0]<|docstring|>Compute ... |
ee1442c47ad53e96c0ea4f992580cf60dcb7e8569409dd76ce7d44b47aa0ecfe | def gradient_orientation(img, scale, signed=True, fft=False):
'Calculate gradient orientations at scale sigma.'
normalizer = (scale ** 2)
if fft:
Ly = (normalizer * scalespace(img, scale, order=(1, 0)))
Lx = (normalizer * scalespace(img, scale, order=(0, 1)))
else:
mode = 'reflec... | Calculate gradient orientations at scale sigma. | ipcv/scalespace.py | gradient_orientation | andersbll/ipcv | 2 | python | def gradient_orientation(img, scale, signed=True, fft=False):
normalizer = (scale ** 2)
if fft:
Ly = (normalizer * scalespace(img, scale, order=(1, 0)))
Lx = (normalizer * scalespace(img, scale, order=(0, 1)))
else:
mode = 'reflect'
Ly = (normalizer * gaussian_filter(img... | def gradient_orientation(img, scale, signed=True, fft=False):
normalizer = (scale ** 2)
if fft:
Ly = (normalizer * scalespace(img, scale, order=(1, 0)))
Lx = (normalizer * scalespace(img, scale, order=(0, 1)))
else:
mode = 'reflect'
Ly = (normalizer * gaussian_filter(img... |
1ed09d69baf865065b7f4b6bef10c5e57dec1476d352a9b680d24360f2832ea8 | def shape_index(img, scale, orientations=False, fft=False):
'Calculate the shape index at the given scale.'
normalizer = (scale ** 2)
if fft:
Lyy = (normalizer * scalespace(img, scale, order=(2, 0)))
Lxy = (normalizer * scalespace(img, scale, order=(1, 1)))
Lxx = (normalizer * scales... | Calculate the shape index at the given scale. | ipcv/scalespace.py | shape_index | andersbll/ipcv | 2 | python | def shape_index(img, scale, orientations=False, fft=False):
normalizer = (scale ** 2)
if fft:
Lyy = (normalizer * scalespace(img, scale, order=(2, 0)))
Lxy = (normalizer * scalespace(img, scale, order=(1, 1)))
Lxx = (normalizer * scalespace(img, scale, order=(0, 2)))
else:
... | def shape_index(img, scale, orientations=False, fft=False):
normalizer = (scale ** 2)
if fft:
Lyy = (normalizer * scalespace(img, scale, order=(2, 0)))
Lxy = (normalizer * scalespace(img, scale, order=(1, 1)))
Lxx = (normalizer * scalespace(img, scale, order=(0, 2)))
else:
... |
59b390c1eba2aae45af532be0aa92e410b853cac2e3c1de646fe47094323c9fb | def __init__(self, img_shape, sigmas, dys, dxs):
' Compute the scale-space of an image.\n Upon initialization, this class precomputes the Gaussian windows used\n to smooth images of a fixed shape to save the computations at later\n points.\n '
assert (len(sigmas) == len(dys) == len(d... | Compute the scale-space of an image.
Upon initialization, this class precomputes the Gaussian windows used
to smooth images of a fixed shape to save the computations at later
points. | ipcv/scalespace.py | __init__ | andersbll/ipcv | 2 | python | def __init__(self, img_shape, sigmas, dys, dxs):
' Compute the scale-space of an image.\n Upon initialization, this class precomputes the Gaussian windows used\n to smooth images of a fixed shape to save the computations at later\n points.\n '
assert (len(sigmas) == len(dys) == len(d... | def __init__(self, img_shape, sigmas, dys, dxs):
' Compute the scale-space of an image.\n Upon initialization, this class precomputes the Gaussian windows used\n to smooth images of a fixed shape to save the computations at later\n points.\n '
assert (len(sigmas) == len(dys) == len(d... |
6816b5d8f0bdef1018ccddcb7ca766fe86eb64df936392145ffca52314583b86 | def compute_f(self, img_f):
' Compute the scale space of an image in the fourier domain.'
return [np.multiply(img_f, f) for f in self.filters] | Compute the scale space of an image in the fourier domain. | ipcv/scalespace.py | compute_f | andersbll/ipcv | 2 | python | def compute_f(self, img_f):
' '
return [np.multiply(img_f, f) for f in self.filters] | def compute_f(self, img_f):
' '
return [np.multiply(img_f, f) for f in self.filters]<|docstring|>Compute the scale space of an image in the fourier domain.<|endoftext|> |
e8db0b71984a258ce4ae304f8f170f4a6dbabda483cd3ea0e4f0043ff65a34b7 | def compute(self, img):
' Compute the scale space of an image.'
img_f = np.fft.fft2(img)
return [np.fft.ifft2(np.multiply(img_f, f)).real for f in self.filters] | Compute the scale space of an image. | ipcv/scalespace.py | compute | andersbll/ipcv | 2 | python | def compute(self, img):
' '
img_f = np.fft.fft2(img)
return [np.fft.ifft2(np.multiply(img_f, f)).real for f in self.filters] | def compute(self, img):
' '
img_f = np.fft.fft2(img)
return [np.fft.ifft2(np.multiply(img_f, f)).real for f in self.filters]<|docstring|>Compute the scale space of an image.<|endoftext|> |
7608765be7ed0d4a051aa715f16612618980b8c18402fc2c95aed80266112831 | def _float_feature(value):
'Returns a float_list from a float / double.'
return tf.train.Feature(float_list=tf.train.FloatList(value=[value])) | Returns a float_list from a float / double. | galaxy2galaxy/data_generators/galsim_utils.py | _float_feature | fadinammour/galaxy2galaxy | 1 | python | def _float_feature(value):
return tf.train.Feature(float_list=tf.train.FloatList(value=[value])) | def _float_feature(value):
return tf.train.Feature(float_list=tf.train.FloatList(value=[value]))<|docstring|>Returns a float_list from a float / double.<|endoftext|> |
117eaf444f5eceea58b3e97631cfe11345e9d359144ea58642e2223654f43b84 | def draw_and_encode_stamp(gal, psf, stamp_size, pixel_scale, attributes=None):
'\n Draws the galaxy, psf and noise power spectrum on a postage stamp and\n encodes it to be exported in a TFRecord.\n '
psf_hst = galsim.Gaussian(flux=1.0, sigma=0.07)
gal_hst = galsim.Convolve(gal, psf_hst)
gal_euc... | Draws the galaxy, psf and noise power spectrum on a postage stamp and
encodes it to be exported in a TFRecord. | galaxy2galaxy/data_generators/galsim_utils.py | draw_and_encode_stamp | fadinammour/galaxy2galaxy | 1 | python | def draw_and_encode_stamp(gal, psf, stamp_size, pixel_scale, attributes=None):
'\n Draws the galaxy, psf and noise power spectrum on a postage stamp and\n encodes it to be exported in a TFRecord.\n '
psf_hst = galsim.Gaussian(flux=1.0, sigma=0.07)
gal_hst = galsim.Convolve(gal, psf_hst)
gal_euc... | def draw_and_encode_stamp(gal, psf, stamp_size, pixel_scale, attributes=None):
'\n Draws the galaxy, psf and noise power spectrum on a postage stamp and\n encodes it to be exported in a TFRecord.\n '
psf_hst = galsim.Gaussian(flux=1.0, sigma=0.07)
gal_hst = galsim.Convolve(gal, psf_hst)
gal_euc... |
6f68c2d151ff5e8327a6b29aa533ebd91c7893bb954e29df3143ac1b857f30b5 | def maybe_download_cosmos(target_dir, sample='25.2'):
'\n Checks for already accessible cosmos data, downloads it somewhere otherwise\n '
import logging
logging_level = logging.INFO
logging.basicConfig(format='%(message)s', level=logging_level, stream=sys.stdout)
logger = logging.getLogger('ga... | Checks for already accessible cosmos data, downloads it somewhere otherwise | galaxy2galaxy/data_generators/galsim_utils.py | maybe_download_cosmos | fadinammour/galaxy2galaxy | 1 | python | def maybe_download_cosmos(target_dir, sample='25.2'):
'\n \n '
import logging
logging_level = logging.INFO
logging.basicConfig(format='%(message)s', level=logging_level, stream=sys.stdout)
logger = logging.getLogger('galaxy2galaxy:galsim')
try:
catalog = galsim.COSMOSCatalog(sample... | def maybe_download_cosmos(target_dir, sample='25.2'):
'\n \n '
import logging
logging_level = logging.INFO
logging.basicConfig(format='%(message)s', level=logging_level, stream=sys.stdout)
logger = logging.getLogger('galaxy2galaxy:galsim')
try:
catalog = galsim.COSMOSCatalog(sample... |
fde176c896c0f98b3a6df36a904e1564b3cf395b6f89ee2659efd8b158b937ad | @property
def num_bands(self):
'Number of bands.'
return 1 | Number of bands. | galaxy2galaxy/data_generators/galsim_utils.py | num_bands | fadinammour/galaxy2galaxy | 1 | python | @property
def num_bands(self):
return 1 | @property
def num_bands(self):
return 1<|docstring|>Number of bands.<|endoftext|> |
735c63ad2816807a93cdd7275848d6c1e1330d424ac2a1f26b1b70455c98429a | def generator(self, data_dir, tmp_dir, dataset_split, task_id=(- 1)):
'\n Function to implement to generate galaxy postage stamps,\n use draw_and_encode_stamp to yield actual images from\n galsim objects\n '
raise NotImplementedError | Function to implement to generate galaxy postage stamps,
use draw_and_encode_stamp to yield actual images from
galsim objects | galaxy2galaxy/data_generators/galsim_utils.py | generator | fadinammour/galaxy2galaxy | 1 | python | def generator(self, data_dir, tmp_dir, dataset_split, task_id=(- 1)):
'\n Function to implement to generate galaxy postage stamps,\n use draw_and_encode_stamp to yield actual images from\n galsim objects\n '
raise NotImplementedError | def generator(self, data_dir, tmp_dir, dataset_split, task_id=(- 1)):
'\n Function to implement to generate galaxy postage stamps,\n use draw_and_encode_stamp to yield actual images from\n galsim objects\n '
raise NotImplementedError<|docstring|>Function to implement to generate galaxy postage stamp... |
7b5f4e207594bb1fd590beb7390838aef3967dfa314bcaf5c0ed33b2f73d70e3 | def prepare_to_generate(self, data_dir, tmp_dir):
'Prepare to generate data in parallel on different processes.\n\n This function is called if multiprocess_generate is True.\n\n Some things that might need to be done once are downloading the data\n if it is not yet downloaded, and building the vocabulary.\... | Prepare to generate data in parallel on different processes.
This function is called if multiprocess_generate is True.
Some things that might need to be done once are downloading the data
if it is not yet downloaded, and building the vocabulary.
Args:
data_dir: a string
tmp_dir: a string | galaxy2galaxy/data_generators/galsim_utils.py | prepare_to_generate | fadinammour/galaxy2galaxy | 1 | python | def prepare_to_generate(self, data_dir, tmp_dir):
'Prepare to generate data in parallel on different processes.\n\n This function is called if multiprocess_generate is True.\n\n Some things that might need to be done once are downloading the data\n if it is not yet downloaded, and building the vocabulary.\... | def prepare_to_generate(self, data_dir, tmp_dir):
'Prepare to generate data in parallel on different processes.\n\n This function is called if multiprocess_generate is True.\n\n Some things that might need to be done once are downloading the data\n if it is not yet downloaded, and building the vocabulary.\... |
68252c4c67dc9ec5cd30e103e82f0379d434ee1f3566646b9dbf9241c19db17f | def example_reading_spec(self):
'Define how data is serialized to file and read back.\n\n Returns:\n data_fields: A dictionary mapping data names to its feature type.\n data_items_to_decoders: A dictionary mapping data names to TF Example\n decoders, to be used when reading back TF examples fro... | Define how data is serialized to file and read back.
Returns:
data_fields: A dictionary mapping data names to its feature type.
data_items_to_decoders: A dictionary mapping data names to TF Example
decoders, to be used when reading back TF examples from disk. | galaxy2galaxy/data_generators/galsim_utils.py | example_reading_spec | fadinammour/galaxy2galaxy | 1 | python | def example_reading_spec(self):
'Define how data is serialized to file and read back.\n\n Returns:\n data_fields: A dictionary mapping data names to its feature type.\n data_items_to_decoders: A dictionary mapping data names to TF Example\n decoders, to be used when reading back TF examples fro... | def example_reading_spec(self):
'Define how data is serialized to file and read back.\n\n Returns:\n data_fields: A dictionary mapping data names to its feature type.\n data_items_to_decoders: A dictionary mapping data names to TF Example\n decoders, to be used when reading back TF examples fro... |
eaa3de9646d29dcf4d07a73f3fc62a5b7d3114595eea3f43b8051833bd5f84ca | @property
def multiprocess_generate(self):
'Whether to generate the data in multiple parallel processes.'
return True | Whether to generate the data in multiple parallel processes. | galaxy2galaxy/data_generators/galsim_utils.py | multiprocess_generate | fadinammour/galaxy2galaxy | 1 | python | @property
def multiprocess_generate(self):
return True | @property
def multiprocess_generate(self):
return True<|docstring|>Whether to generate the data in multiple parallel processes.<|endoftext|> |
70c40304ee16e52c56630a4d12a9ec0b8bf004059465be242fcc4471e29fecc0 | @property
def num_generate_tasks(self):
'Needed if multiprocess_generate is True.'
return (self.num_train_shards + self.num_dev_shards) | Needed if multiprocess_generate is True. | galaxy2galaxy/data_generators/galsim_utils.py | num_generate_tasks | fadinammour/galaxy2galaxy | 1 | python | @property
def num_generate_tasks(self):
return (self.num_train_shards + self.num_dev_shards) | @property
def num_generate_tasks(self):
return (self.num_train_shards + self.num_dev_shards)<|docstring|>Needed if multiprocess_generate is True.<|endoftext|> |
4cf220d9cd3b0fd00e54b0401f25e29977c773dd46d49cf4dea980a39e248acb | def _tow2sec(time_of_week: float) -> Tuple[(int, int)]:
'Convert a float time to integer seconds and femtoseconds\n\n Parameters\n ----------\n time_of_week : float\n The time of week, as a float\n\n Returns\n -------\n Tuple[int, int]\n The seconds and femtoseconds within the time o... | Convert a float time to integer seconds and femtoseconds
Parameters
----------
time_of_week : float
The time of week, as a float
Returns
-------
Tuple[int, int]
The seconds and femtoseconds within the time of week | gps_time/core.py | _tow2sec | the-aerospace-corporation/gps_time | 6 | python | def _tow2sec(time_of_week: float) -> Tuple[(int, int)]:
'Convert a float time to integer seconds and femtoseconds\n\n Parameters\n ----------\n time_of_week : float\n The time of week, as a float\n\n Returns\n -------\n Tuple[int, int]\n The seconds and femtoseconds within the time o... | def _tow2sec(time_of_week: float) -> Tuple[(int, int)]:
'Convert a float time to integer seconds and femtoseconds\n\n Parameters\n ----------\n time_of_week : float\n The time of week, as a float\n\n Returns\n -------\n Tuple[int, int]\n The seconds and femtoseconds within the time o... |
4cad6ac40ed062931e63ebe99239afd06a800d72734895f170fa20640275d599 | def __init__(self, week_number: int, *args, **kwargs) -> None:
'Object constructor.\n\n This sets the week number and the time of week and ensures that the\n time of week is a float. It also calls `correct_time()`, which checks\n to see if the time of week is negative or past the end of the wee... | Object constructor.
This sets the week number and the time of week and ensures that the
time of week is a float. It also calls `correct_time()`, which checks
to see if the time of week is negative or past the end of the week
and adjust the values accordingly.
This constructor supports many different input arguments. ... | gps_time/core.py | __init__ | the-aerospace-corporation/gps_time | 6 | python | def __init__(self, week_number: int, *args, **kwargs) -> None:
'Object constructor.\n\n This sets the week number and the time of week and ensures that the\n time of week is a float. It also calls `correct_time()`, which checks\n to see if the time of week is negative or past the end of the wee... | def __init__(self, week_number: int, *args, **kwargs) -> None:
'Object constructor.\n\n This sets the week number and the time of week and ensures that the\n time of week is a float. It also calls `correct_time()`, which checks\n to see if the time of week is negative or past the end of the wee... |
f06849a313ad9141972003533b21af81a88358b80910164c62c6c9d98fc63720 | @property
def time_of_week(self) -> float:
'The time of week as a float.'
return float((self.seconds + (self.femtoseconds * _FEMTO_SEC_TO_SEC))) | The time of week as a float. | gps_time/core.py | time_of_week | the-aerospace-corporation/gps_time | 6 | python | @property
def time_of_week(self) -> float:
return float((self.seconds + (self.femtoseconds * _FEMTO_SEC_TO_SEC))) | @property
def time_of_week(self) -> float:
return float((self.seconds + (self.femtoseconds * _FEMTO_SEC_TO_SEC)))<|docstring|>The time of week as a float.<|endoftext|> |
2299abaf902a32bfcddc688b95dec5dc99698f787f797fa0bc7e3ae37b23fee6 | @time_of_week.setter
def time_of_week(self, time_of_week: float) -> None:
'A setter for the time of week.\n\n The method allows the seconds and femtoseconds to be updated using\n a single float.\n\n Paremeters\n ----------\n time_of_week : float\n The time of week as a ... | A setter for the time of week.
The method allows the seconds and femtoseconds to be updated using
a single float.
Paremeters
----------
time_of_week : float
The time of week as a float | gps_time/core.py | time_of_week | the-aerospace-corporation/gps_time | 6 | python | @time_of_week.setter
def time_of_week(self, time_of_week: float) -> None:
'A setter for the time of week.\n\n The method allows the seconds and femtoseconds to be updated using\n a single float.\n\n Paremeters\n ----------\n time_of_week : float\n The time of week as a ... | @time_of_week.setter
def time_of_week(self, time_of_week: float) -> None:
'A setter for the time of week.\n\n The method allows the seconds and femtoseconds to be updated using\n a single float.\n\n Paremeters\n ----------\n time_of_week : float\n The time of week as a ... |
e1402d777e6e2a140e9c278a49a6452bae1151aca2c0b03c115fe0ffa7d26355 | @classmethod
def from_yaml(cls: type, constructor: ruamel.yaml.Constructor, node: ruamel.yaml.MappingNode) -> GPSTime:
'YAML Constructor.\n\n This YAML constructor is used to load a GPSTime from a YAML file. It must be\n registered with the YAML loader. This is accomplished using\n ```python3\n... | YAML Constructor.
This YAML constructor is used to load a GPSTime from a YAML file. It must be
registered with the YAML loader. This is accomplished using
```python3
import ruamel.yaml
yaml = ruamel.yaml.YAML(typ="unsafe")
yaml.register_class(GPSTime)
```
This class method is primarily used to add a constructor to an... | gps_time/core.py | from_yaml | the-aerospace-corporation/gps_time | 6 | python | @classmethod
def from_yaml(cls: type, constructor: ruamel.yaml.Constructor, node: ruamel.yaml.MappingNode) -> GPSTime:
'YAML Constructor.\n\n This YAML constructor is used to load a GPSTime from a YAML file. It must be\n registered with the YAML loader. This is accomplished using\n ```python3\n... | @classmethod
def from_yaml(cls: type, constructor: ruamel.yaml.Constructor, node: ruamel.yaml.MappingNode) -> GPSTime:
'YAML Constructor.\n\n This YAML constructor is used to load a GPSTime from a YAML file. It must be\n registered with the YAML loader. This is accomplished using\n ```python3\n... |
40d60bef4451928628b8b9046d3fdd1f65970c4d14240a1af072fa3d1a808d1f | def to_datetime(self) -> datetime.datetime:
'Convert the `GPSTime` to a datetime.\n\n This method calls `tow2datetime()` to convert the `GPSTime` to a\n datetime object.\n\n Returns\n -------\n datetime.datetime\n The equivalent datetime representation of the `GPSTime`\... | Convert the `GPSTime` to a datetime.
This method calls `tow2datetime()` to convert the `GPSTime` to a
datetime object.
Returns
-------
datetime.datetime
The equivalent datetime representation of the `GPSTime`
Notes
-----
.. note::
Datetimes are limited to microsecond resolution, so this
conversion may lo... | gps_time/core.py | to_datetime | the-aerospace-corporation/gps_time | 6 | python | def to_datetime(self) -> datetime.datetime:
'Convert the `GPSTime` to a datetime.\n\n This method calls `tow2datetime()` to convert the `GPSTime` to a\n datetime object.\n\n Returns\n -------\n datetime.datetime\n The equivalent datetime representation of the `GPSTime`\... | def to_datetime(self) -> datetime.datetime:
'Convert the `GPSTime` to a datetime.\n\n This method calls `tow2datetime()` to convert the `GPSTime` to a\n datetime object.\n\n Returns\n -------\n datetime.datetime\n The equivalent datetime representation of the `GPSTime`\... |
e89dc6024d7d7969314e82022dd30904a7c1cbd11b71073e0101540447c8a178 | @classmethod
def from_datetime(cls, time: datetime.datetime) -> GPSTime:
'Create a `GPSTime` for a datetime.\n\n Parameters\n ----------\n time : datetime.datetime\n The datetime that will be converted to a `GPSTime`\n\n Returns\n -------\n GPSTime\n T... | Create a `GPSTime` for a datetime.
Parameters
----------
time : datetime.datetime
The datetime that will be converted to a `GPSTime`
Returns
-------
GPSTime
The `GPSTime` corresponding to the datetime. This is a lossless
conversion.
Raises
------
TypeError
If the input value is not a datetime
Notes
... | gps_time/core.py | from_datetime | the-aerospace-corporation/gps_time | 6 | python | @classmethod
def from_datetime(cls, time: datetime.datetime) -> GPSTime:
'Create a `GPSTime` for a datetime.\n\n Parameters\n ----------\n time : datetime.datetime\n The datetime that will be converted to a `GPSTime`\n\n Returns\n -------\n GPSTime\n T... | @classmethod
def from_datetime(cls, time: datetime.datetime) -> GPSTime:
'Create a `GPSTime` for a datetime.\n\n Parameters\n ----------\n time : datetime.datetime\n The datetime that will be converted to a `GPSTime`\n\n Returns\n -------\n GPSTime\n T... |
0a781b6be94087bb2a59c6728c6f07b59f0b73aeeaf48c6c4acabc3062cb36f1 | def to_zcount(self) -> float:
'Get the current Z-Count.\n\n Returns\n -------\n float\n The time of week divided by 1.5\n\n '
return (self.time_of_week / 1.5) | Get the current Z-Count.
Returns
-------
float
The time of week divided by 1.5 | gps_time/core.py | to_zcount | the-aerospace-corporation/gps_time | 6 | python | def to_zcount(self) -> float:
'Get the current Z-Count.\n\n Returns\n -------\n float\n The time of week divided by 1.5\n\n '
return (self.time_of_week / 1.5) | def to_zcount(self) -> float:
'Get the current Z-Count.\n\n Returns\n -------\n float\n The time of week divided by 1.5\n\n '
return (self.time_of_week / 1.5)<|docstring|>Get the current Z-Count.
Returns
-------
float
The time of week divided by 1.5<|endoftext|> |
70bd44873cae9ad6bb088f2a2c85909441975753f8cb2dfab3d9b4f3e855e00c | def correct_weeks(self) -> None:
'Correct the week number based on the time of week.\n\n If the time of week is less than 0 or greater than 604800 seconds,\n then the week number and time of week will be corrected to ensure that\n the time of week is within the week indicated by the week number... | Correct the week number based on the time of week.
If the time of week is less than 0 or greater than 604800 seconds,
then the week number and time of week will be corrected to ensure that
the time of week is within the week indicated by the week number.
Returns
-------
None | gps_time/core.py | correct_weeks | the-aerospace-corporation/gps_time | 6 | python | def correct_weeks(self) -> None:
'Correct the week number based on the time of week.\n\n If the time of week is less than 0 or greater than 604800 seconds,\n then the week number and time of week will be corrected to ensure that\n the time of week is within the week indicated by the week number... | def correct_weeks(self) -> None:
'Correct the week number based on the time of week.\n\n If the time of week is less than 0 or greater than 604800 seconds,\n then the week number and time of week will be corrected to ensure that\n the time of week is within the week indicated by the week number... |
bfa409cc04569e4d96eeeb1eece804c66648e81a0af64c2e7ec2b161d48590a3 | def __add__(self, other: Union[(int, float, GPSTime, datetime.datetime, datetime.timedelta, np.ndarray)]) -> Union[(GPSTime, np.ndarray)]:
'Addition, apply an offset to a `GPSTime`.\n\n This is the addition of a `GPSTime` and another object. In this\n context, addition means moving the clock of the fi... | Addition, apply an offset to a `GPSTime`.
This is the addition of a `GPSTime` and another object. In this
context, addition means moving the clock of the first argument
forward by some amount.
Suppose `a` is a `GPSTime` and the value give for other represents a
positive time. The value returned will be a `GPSTime` ob... | gps_time/core.py | __add__ | the-aerospace-corporation/gps_time | 6 | python | def __add__(self, other: Union[(int, float, GPSTime, datetime.datetime, datetime.timedelta, np.ndarray)]) -> Union[(GPSTime, np.ndarray)]:
'Addition, apply an offset to a `GPSTime`.\n\n This is the addition of a `GPSTime` and another object. In this\n context, addition means moving the clock of the fi... | def __add__(self, other: Union[(int, float, GPSTime, datetime.datetime, datetime.timedelta, np.ndarray)]) -> Union[(GPSTime, np.ndarray)]:
'Addition, apply an offset to a `GPSTime`.\n\n This is the addition of a `GPSTime` and another object. In this\n context, addition means moving the clock of the fi... |
b2f4ffff62986484ceceb2d54aee5028253a363c110ce2db429c6bd8e754b8df | def __sub__(self, other: Union[(int, float, GPSTime, datetime.datetime, datetime.timedelta, np.ndarray)]) -> Union[(GPSTime, float, np.ndarray)]:
'Subtraction.\n\n This method is used to represent subtraction. Depending on the type of\n the arguments, it can be used to find the time offset by an amoun... | Subtraction.
This method is used to represent subtraction. Depending on the type of
the arguments, it can be used to find the time offset by an amount or
the number of seconds between two times.
Parameters
----------
other : Union[int, float, GPSTime, datetime.datetime,
datetime.timedelta, np.ndarray]
... | gps_time/core.py | __sub__ | the-aerospace-corporation/gps_time | 6 | python | def __sub__(self, other: Union[(int, float, GPSTime, datetime.datetime, datetime.timedelta, np.ndarray)]) -> Union[(GPSTime, float, np.ndarray)]:
'Subtraction.\n\n This method is used to represent subtraction. Depending on the type of\n the arguments, it can be used to find the time offset by an amoun... | def __sub__(self, other: Union[(int, float, GPSTime, datetime.datetime, datetime.timedelta, np.ndarray)]) -> Union[(GPSTime, float, np.ndarray)]:
'Subtraction.\n\n This method is used to represent subtraction. Depending on the type of\n the arguments, it can be used to find the time offset by an amoun... |
607ea7f7c28854e4c236f9a625cfa520333092a330314aa284257d161a249216 | def __lt__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Less Than.\n\n .. note:: In this context "less than" is equivalent to "before"\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be ... | Comparison: Less Than.
.. note:: In this context "less than" is equivalent to "before"
Parameters
----------
other : Union[GPSTime, datetime.datetime]
The object to compare. Datatimes will be converted to `GPSTime`
Returns
-------
bool
True if the current object is before its comparison
Raises
------
TypeEr... | gps_time/core.py | __lt__ | the-aerospace-corporation/gps_time | 6 | python | def __lt__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Less Than.\n\n .. note:: In this context "less than" is equivalent to "before"\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be ... | def __lt__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Less Than.\n\n .. note:: In this context "less than" is equivalent to "before"\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be ... |
eaf56ac63cd9f71bc99197b23a35c7c00def2e1913b5af1009d157a9f1b6c4c0 | def __gt__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Greater Than.\n\n .. note:: In this context "greater than" is equivalent to "after"\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes wil... | Comparison: Greater Than.
.. note:: In this context "greater than" is equivalent to "after"
Parameters
----------
other : Union[GPSTime, datetime.datetime]
The object to compare. Datatimes will be converted to `GPSTime`
Returns
-------
bool
True if the current object is after its comparison
Raises
------
Ty... | gps_time/core.py | __gt__ | the-aerospace-corporation/gps_time | 6 | python | def __gt__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Greater Than.\n\n .. note:: In this context "greater than" is equivalent to "after"\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes wil... | def __gt__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Greater Than.\n\n .. note:: In this context "greater than" is equivalent to "after"\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes wil... |
72215c99f7cdf2f931e2d7b1aeeab6ddfca76334053051ca416f647a76c5d195 | def __eq__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Equality.\n\n .. note:: In this context "equality" is equivalent to "coincident"\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will b... | Comparison: Equality.
.. note:: In this context "equality" is equivalent to "coincident"
Parameters
----------
other : Union[GPSTime, datetime.datetime]
The object to compare. Datatimes will be converted to `GPSTime`
Returns
-------
bool
True if the current object is the same time as its comparison
Raises
-... | gps_time/core.py | __eq__ | the-aerospace-corporation/gps_time | 6 | python | def __eq__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Equality.\n\n .. note:: In this context "equality" is equivalent to "coincident"\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will b... | def __eq__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Equality.\n\n .. note:: In this context "equality" is equivalent to "coincident"\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will b... |
cc15f4af3822ef59489eb2899ba498d0495f167e42afcc279b8ecc045f2e5242 | def __le__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Less Than or Equals.\n\n Calls the `__lt__()` and `__eq__()` methods\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be converted ... | Comparison: Less Than or Equals.
Calls the `__lt__()` and `__eq__()` methods
Parameters
----------
other : Union[GPSTime, datetime.datetime]
The object to compare. Datatimes will be converted to `GPSTime`
Returns
-------
bool
True if the current object is before or at the same time as its
comparison obje... | gps_time/core.py | __le__ | the-aerospace-corporation/gps_time | 6 | python | def __le__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Less Than or Equals.\n\n Calls the `__lt__()` and `__eq__()` methods\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be converted ... | def __le__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Less Than or Equals.\n\n Calls the `__lt__()` and `__eq__()` methods\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be converted ... |
e7038fd8b42a4c4e02406c84c7afa6819303d54ec897e11fd047d002bb1860e5 | def __ge__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Greater Than or Equals.\n\n Calls the `__gt__()` and `__eq__()` methods\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be convert... | Comparison: Greater Than or Equals.
Calls the `__gt__()` and `__eq__()` methods
Parameters
----------
other : Union[GPSTime, datetime.datetime]
The object to compare. Datatimes will be converted to `GPSTime`
Returns
-------
bool
True if the current object is after or at the same time as its
comparison ob... | gps_time/core.py | __ge__ | the-aerospace-corporation/gps_time | 6 | python | def __ge__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Greater Than or Equals.\n\n Calls the `__gt__()` and `__eq__()` methods\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be convert... | def __ge__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Greater Than or Equals.\n\n Calls the `__gt__()` and `__eq__()` methods\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be convert... |
41b004c6d19229dc4ca8504eb081fbf9bed26980ab78d23cc392efb5ba9bccbe | def __ne__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Not Equals.\n\n Inverts the result of the `__eq__()` method\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be converted to `GPSTi... | Comparison: Not Equals.
Inverts the result of the `__eq__()` method
Parameters
----------
other : Union[GPSTime, datetime.datetime]
The object to compare. Datatimes will be converted to `GPSTime`
Returns
-------
bool
True if the current object is not the same time as its comparison
Raises
------
TypeError
... | gps_time/core.py | __ne__ | the-aerospace-corporation/gps_time | 6 | python | def __ne__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Not Equals.\n\n Inverts the result of the `__eq__()` method\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be converted to `GPSTi... | def __ne__(self, other: Union[(GPSTime, datetime.datetime)]) -> bool:
'Comparison: Not Equals.\n\n Inverts the result of the `__eq__()` method\n\n Parameters\n ----------\n other : Union[GPSTime, datetime.datetime]\n The object to compare. Datatimes will be converted to `GPSTi... |
a3291448e1291b1444f76e5b7cb0e56cb118e0394124f8496847117ec271b472 | def __hash__(self):
'Make GPSTime hashable.'
return hash(((str(self.week_number) + str(self.seconds)) + str(self.femtoseconds))) | Make GPSTime hashable. | gps_time/core.py | __hash__ | the-aerospace-corporation/gps_time | 6 | python | def __hash__(self):
return hash(((str(self.week_number) + str(self.seconds)) + str(self.femtoseconds))) | def __hash__(self):
return hash(((str(self.week_number) + str(self.seconds)) + str(self.femtoseconds)))<|docstring|>Make GPSTime hashable.<|endoftext|> |
f4bc51262a6ac05e2b8dd717d6dd697430896487cdf88590805c8e5fb6c50856 | def __repr__(self) -> str:
'Representation of the object.\n\n Returns\n -------\n str\n The representation of the object\n\n '
return 'GPSTime(week_number={}, time_of_week={})'.format(self.week_number, self.time_of_week) | Representation of the object.
Returns
-------
str
The representation of the object | gps_time/core.py | __repr__ | the-aerospace-corporation/gps_time | 6 | python | def __repr__(self) -> str:
'Representation of the object.\n\n Returns\n -------\n str\n The representation of the object\n\n '
return 'GPSTime(week_number={}, time_of_week={})'.format(self.week_number, self.time_of_week) | def __repr__(self) -> str:
'Representation of the object.\n\n Returns\n -------\n str\n The representation of the object\n\n '
return 'GPSTime(week_number={}, time_of_week={})'.format(self.week_number, self.time_of_week)<|docstring|>Representation of the object.
Returns
-... |
f96aa3f34d061ea33c53132449bffe8a5c642e099baab8160570bed2bf265ad4 | def solution(resistances, r_i_word_line, r_i_bit_line, applied_voltages, **kwargs):
'Extracts branch currents and node voltages of a crossbar in a\n convenient form.\n\n Parameters\n ----------\n resistances : ndarray\n Resistances of crossbar devices.\n r_i_word_line : int or float, optional\... | Extracts branch currents and node voltages of a crossbar in a
convenient form.
Parameters
----------
resistances : ndarray
Resistances of crossbar devices.
r_i_word_line : int or float, optional
Interconnect resistance of the word line segments.
r_i_bit_line : int or float, optional
Interconnect resistance... | badcrossbar/computing/extract.py | solution | nikhil-garg-rram/badcrossbar | 5 | python | def solution(resistances, r_i_word_line, r_i_bit_line, applied_voltages, **kwargs):
'Extracts branch currents and node voltages of a crossbar in a\n convenient form.\n\n Parameters\n ----------\n resistances : ndarray\n Resistances of crossbar devices.\n r_i_word_line : int or float, optional\... | def solution(resistances, r_i_word_line, r_i_bit_line, applied_voltages, **kwargs):
'Extracts branch currents and node voltages of a crossbar in a\n convenient form.\n\n Parameters\n ----------\n resistances : ndarray\n Resistances of crossbar devices.\n r_i_word_line : int or float, optional\... |
84c46b4f7eb1aa4bce5d580d507a703578b5c24941eaea1dbb5d46d8c920c404 | def currents(extracted_voltages, resistances, r_i, applied_voltages, **kwargs):
'Extracts crossbar branch currents in a convenient format.\n \n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n contain the p... | Extracts crossbar branch currents in a convenient format.
Parameters
----------
extracted_voltages : named tuple
Crossbar node voltages. It has fields `word_line` and `bit_line` that
contain the potentials at the nodes on the word and bit lines.
resistances : ndarray
Resistances of crossbar devices.
r_i : ... | badcrossbar/computing/extract.py | currents | nikhil-garg-rram/badcrossbar | 5 | python | def currents(extracted_voltages, resistances, r_i, applied_voltages, **kwargs):
'Extracts crossbar branch currents in a convenient format.\n \n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n contain the p... | def currents(extracted_voltages, resistances, r_i, applied_voltages, **kwargs):
'Extracts crossbar branch currents in a convenient format.\n \n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n contain the p... |
60acc340beed3dd0b8f898aa36980e8f66f19a3bb7cd8208ceeea76e94a245d9 | def voltages(v, resistances, **kwargs):
'Extracts crossbar node voltages in a convenient format.\n\n Parameters\n ----------\n v : ndarray\n Solution to gv = i in a flattened form.\n resistances : ndarray\n Resistances of crossbar devices.\n\n Returns\n -------\n named tuple\n ... | Extracts crossbar node voltages in a convenient format.
Parameters
----------
v : ndarray
Solution to gv = i in a flattened form.
resistances : ndarray
Resistances of crossbar devices.
Returns
-------
named tuple
Crossbar node voltages. It has fields `word_line` and `bit_line` that
contain the potenti... | badcrossbar/computing/extract.py | voltages | nikhil-garg-rram/badcrossbar | 5 | python | def voltages(v, resistances, **kwargs):
'Extracts crossbar node voltages in a convenient format.\n\n Parameters\n ----------\n v : ndarray\n Solution to gv = i in a flattened form.\n resistances : ndarray\n Resistances of crossbar devices.\n\n Returns\n -------\n named tuple\n ... | def voltages(v, resistances, **kwargs):
'Extracts crossbar node voltages in a convenient format.\n\n Parameters\n ----------\n v : ndarray\n Solution to gv = i in a flattened form.\n resistances : ndarray\n Resistances of crossbar devices.\n\n Returns\n -------\n named tuple\n ... |
f79574172b80bfecbf61df819c713144732d96f2a23424121c6366b02798f168 | def word_line_voltages(v, resistances):
'Extracts voltages at the nodes on the word lines.\n\n Parameters\n ----------\n v : ndarray\n Solution to gv = i in a flattened form.\n resistances : ndarray\n Resistances of crossbar devices.\n\n Returns\n -------\n ndarray\n Voltag... | Extracts voltages at the nodes on the word lines.
Parameters
----------
v : ndarray
Solution to gv = i in a flattened form.
resistances : ndarray
Resistances of crossbar devices.
Returns
-------
ndarray
Voltages at the nodes on the word lines. | badcrossbar/computing/extract.py | word_line_voltages | nikhil-garg-rram/badcrossbar | 5 | python | def word_line_voltages(v, resistances):
'Extracts voltages at the nodes on the word lines.\n\n Parameters\n ----------\n v : ndarray\n Solution to gv = i in a flattened form.\n resistances : ndarray\n Resistances of crossbar devices.\n\n Returns\n -------\n ndarray\n Voltag... | def word_line_voltages(v, resistances):
'Extracts voltages at the nodes on the word lines.\n\n Parameters\n ----------\n v : ndarray\n Solution to gv = i in a flattened form.\n resistances : ndarray\n Resistances of crossbar devices.\n\n Returns\n -------\n ndarray\n Voltag... |
08923fb2e291463056b72829c3baf6ab8fc202aff66e99b9b18495d5f60422bc | def bit_line_voltages(v, resistances):
'Extracts voltages at the nodes on the bit lines.\n\n Parameters\n ----------\n v : ndarray\n Solution to gv = i in a flattened form.\n resistances : ndarray\n Resistances of crossbar devices.\n\n Returns\n -------\n ndarray\n Voltages... | Extracts voltages at the nodes on the bit lines.
Parameters
----------
v : ndarray
Solution to gv = i in a flattened form.
resistances : ndarray
Resistances of crossbar devices.
Returns
-------
ndarray
Voltages at the nodes on the bit lines. | badcrossbar/computing/extract.py | bit_line_voltages | nikhil-garg-rram/badcrossbar | 5 | python | def bit_line_voltages(v, resistances):
'Extracts voltages at the nodes on the bit lines.\n\n Parameters\n ----------\n v : ndarray\n Solution to gv = i in a flattened form.\n resistances : ndarray\n Resistances of crossbar devices.\n\n Returns\n -------\n ndarray\n Voltages... | def bit_line_voltages(v, resistances):
'Extracts voltages at the nodes on the bit lines.\n\n Parameters\n ----------\n v : ndarray\n Solution to gv = i in a flattened form.\n resistances : ndarray\n Resistances of crossbar devices.\n\n Returns\n -------\n ndarray\n Voltages... |
cce2ad46a742a8daccb2974806557dd6a9fc65473ba8cc79a099a225b2493c0f | def output_currents(extracted_voltages, extracted_device_currents, r_i):
'Extracts output currents.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n contain the potentials at the nodes on the word and bit ... | Extracts output currents.
Parameters
----------
extracted_voltages : named tuple
Crossbar node voltages. It has fields `word_line` and `bit_line` that
contain the potentials at the nodes on the word and bit lines.
extracted_device_currents : ndarray
Currents flowing through crossbar devices.
r_i : named tu... | badcrossbar/computing/extract.py | output_currents | nikhil-garg-rram/badcrossbar | 5 | python | def output_currents(extracted_voltages, extracted_device_currents, r_i):
'Extracts output currents.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n contain the potentials at the nodes on the word and bit ... | def output_currents(extracted_voltages, extracted_device_currents, r_i):
'Extracts output currents.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n contain the potentials at the nodes on the word and bit ... |
3c2952910878bb2beeb90fe6dc4755fc164fdc45c6b7b77d6bc58a655fd17f9d | def device_currents(extracted_voltages, resistances):
'Extracts currents flowing through crossbar devices.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n contain the potentials at the nodes on the word a... | Extracts currents flowing through crossbar devices.
Parameters
----------
extracted_voltages : named tuple
Crossbar node voltages. It has fields `word_line` and `bit_line` that
contain the potentials at the nodes on the word and bit lines.
resistances : ndarray
Resistances of crossbar devices.
Returns
---... | badcrossbar/computing/extract.py | device_currents | nikhil-garg-rram/badcrossbar | 5 | python | def device_currents(extracted_voltages, resistances):
'Extracts currents flowing through crossbar devices.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n contain the potentials at the nodes on the word a... | def device_currents(extracted_voltages, resistances):
'Extracts currents flowing through crossbar devices.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n contain the potentials at the nodes on the word a... |
9dac349b3fc191da33f90e44039873d30766f15679c2b11cc2f3cb05d719d696 | def word_line_currents(extracted_voltages, extracted_device_currents, r_i, applied_voltages):
'Extracts currents flowing through interconnect segments along the word\n lines.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bi... | Extracts currents flowing through interconnect segments along the word
lines.
Parameters
----------
extracted_voltages : named tuple
Crossbar node voltages. It has fields `word_line` and `bit_line` that
contain the potentials at the nodes on the word and bit lines.
extracted_device_currents : ndarray
Curre... | badcrossbar/computing/extract.py | word_line_currents | nikhil-garg-rram/badcrossbar | 5 | python | def word_line_currents(extracted_voltages, extracted_device_currents, r_i, applied_voltages):
'Extracts currents flowing through interconnect segments along the word\n lines.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bi... | def word_line_currents(extracted_voltages, extracted_device_currents, r_i, applied_voltages):
'Extracts currents flowing through interconnect segments along the word\n lines.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bi... |
35a0fe38c8505aaf430db073ccc42008fccddb886c323c4af7e09bf6e6391370 | def bit_line_currents(extracted_voltages, extracted_device_currents, r_i):
'Extracts currents flowing through interconnect segments along the bit\n lines.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n ... | Extracts currents flowing through interconnect segments along the bit
lines.
Parameters
----------
extracted_voltages : named tuple
Crossbar node voltages. It has fields `word_line` and `bit_line` that
contain the potentials at the nodes on the word and bit lines.
extracted_device_currents : ndarray
Curren... | badcrossbar/computing/extract.py | bit_line_currents | nikhil-garg-rram/badcrossbar | 5 | python | def bit_line_currents(extracted_voltages, extracted_device_currents, r_i):
'Extracts currents flowing through interconnect segments along the bit\n lines.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n ... | def bit_line_currents(extracted_voltages, extracted_device_currents, r_i):
'Extracts currents flowing through interconnect segments along the bit\n lines.\n\n Parameters\n ----------\n extracted_voltages : named tuple\n Crossbar node voltages. It has fields `word_line` and `bit_line` that\n ... |
3f127500e5503c4fda5245b7442503f713ae0c02bdfddfe182744bc462527a19 | def insulating_interconnect_solution(resistances, applied_voltages, **kwargs):
'Extracts solution when all interconnects are perfectly insulating.\n\n Parameters\n ----------\n resistances : ndarray\n Resistances of crossbar devices.\n applied_voltages : ndarray\n Applied voltages.\n **... | Extracts solution when all interconnects are perfectly insulating.
Parameters
----------
resistances : ndarray
Resistances of crossbar devices.
applied_voltages : ndarray
Applied voltages.
**kwargs
all_currents : bool, optional
If False, only output currents are returned, while all the other
... | badcrossbar/computing/extract.py | insulating_interconnect_solution | nikhil-garg-rram/badcrossbar | 5 | python | def insulating_interconnect_solution(resistances, applied_voltages, **kwargs):
'Extracts solution when all interconnects are perfectly insulating.\n\n Parameters\n ----------\n resistances : ndarray\n Resistances of crossbar devices.\n applied_voltages : ndarray\n Applied voltages.\n **... | def insulating_interconnect_solution(resistances, applied_voltages, **kwargs):
'Extracts solution when all interconnects are perfectly insulating.\n\n Parameters\n ----------\n resistances : ndarray\n Resistances of crossbar devices.\n applied_voltages : ndarray\n Applied voltages.\n **... |
fa32f5bd0e8d60a38c4e77ce703dbfb6ed2f8a4472dcf0b9bb57fe25636c1a29 | def check(self):
' Checks parameters and paths\n '
super().check()
if ('ORTHO' not in PATH):
setattr(PATH, 'ORTHO', join(PATH.SCRATCH, 'ortho')) | Checks parameters and paths | seisflows/preprocess/ortho.py | check | fanwu8/sf | 1 | python | def check(self):
' \n '
super().check()
if ('ORTHO' not in PATH):
setattr(PATH, 'ORTHO', join(PATH.SCRATCH, 'ortho')) | def check(self):
' \n '
super().check()
if ('ORTHO' not in PATH):
setattr(PATH, 'ORTHO', join(PATH.SCRATCH, 'ortho'))<|docstring|>Checks parameters and paths<|endoftext|> |
194ac78c4eb11b96c2a0508bd56f065622b05121217c608380c5a301d8905bdc | def setup(self):
' Sets up data preprocessing machinery\n '
super().setup()
unix.mkdir(PATH.ORTHO)
solver = sys.modules['seisflows_solver']
nevt = PAR.NEVT
ntpss = PAR.NTPSS
dt = PAR.DT
nrec = PAR.NREC
freq_min = float(PAR.FREQ_MIN)
freq_max = float(PAR.FREQ_MAX)
freq_... | Sets up data preprocessing machinery | seisflows/preprocess/ortho.py | setup | fanwu8/sf | 1 | python | def setup(self):
' \n '
super().setup()
unix.mkdir(PATH.ORTHO)
solver = sys.modules['seisflows_solver']
nevt = PAR.NEVT
ntpss = PAR.NTPSS
dt = PAR.DT
nrec = PAR.NREC
freq_min = float(PAR.FREQ_MIN)
freq_max = float(PAR.FREQ_MAX)
freq_full = fftfreq(ntpss, dt)
freq_t... | def setup(self):
' \n '
super().setup()
unix.mkdir(PATH.ORTHO)
solver = sys.modules['seisflows_solver']
nevt = PAR.NEVT
ntpss = PAR.NTPSS
dt = PAR.DT
nrec = PAR.NREC
freq_min = float(PAR.FREQ_MIN)
freq_max = float(PAR.FREQ_MAX)
freq_full = fftfreq(ntpss, dt)
freq_t... |
f0d687f274ab9d078d89ae798bc91167a097d76af3e3f562be93a3298030334e | def prepare_eval_grad(self, path='.', wat=True):
' Prepares solver for gradient evaluation by writing residuals and\n adjoint traces\n\n INPUT\n PATH - directory containing observed and synthetic seismic data\n '
solver = sys.modules['seisflows_solver']
for filename in so... | Prepares solver for gradient evaluation by writing residuals and
adjoint traces
INPUT
PATH - directory containing observed and synthetic seismic data | seisflows/preprocess/ortho.py | prepare_eval_grad | fanwu8/sf | 1 | python | def prepare_eval_grad(self, path='.', wat=True):
' Prepares solver for gradient evaluation by writing residuals and\n adjoint traces\n\n INPUT\n PATH - directory containing observed and synthetic seismic data\n '
solver = sys.modules['seisflows_solver']
for filename in so... | def prepare_eval_grad(self, path='.', wat=True):
' Prepares solver for gradient evaluation by writing residuals and\n adjoint traces\n\n INPUT\n PATH - directory containing observed and synthetic seismic data\n '
solver = sys.modules['seisflows_solver']
for filename in so... |
87791a4309c02b814794b81f26bf38d11f94e587911d0ff0c03e41de60eace05 | def write_residuals(self, path, syn, obs):
' Computes residuals from observations and synthetics\n\n INPUT\n PATH - location residuals will be written\n SYN - obspy Stream object containing synthetic data\n OBS - obspy Stream object containing observed data\n '
(... | Computes residuals from observations and synthetics
INPUT
PATH - location residuals will be written
SYN - obspy Stream object containing synthetic data
OBS - obspy Stream object containing observed data | seisflows/preprocess/ortho.py | write_residuals | fanwu8/sf | 1 | python | def write_residuals(self, path, syn, obs):
' Computes residuals from observations and synthetics\n\n INPUT\n PATH - location residuals will be written\n SYN - obspy Stream object containing synthetic data\n OBS - obspy Stream object containing observed data\n '
(... | def write_residuals(self, path, syn, obs):
' Computes residuals from observations and synthetics\n\n INPUT\n PATH - location residuals will be written\n SYN - obspy Stream object containing synthetic data\n OBS - obspy Stream object containing observed data\n '
(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.