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
cf234fff51e0edb360a9a997a56a6ad0f57b0f053a63bbb8842f1f89c282e7de
def test_artifacttype_create_not_logged_in(self): ' test create view ' destination = ('/login/?next=' + urllib.parse.quote('/artifacts/artifacttype/create/', safe='')) response = self.client.get('/artifacts/artifacttype/create/', follow=True) self.assertRedirects(response, destination, status_code=302, ...
test create view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_create_not_logged_in
FabFaeb/dfirtrack
1
python
def test_artifacttype_create_not_logged_in(self): ' ' destination = ('/login/?next=' + urllib.parse.quote('/artifacts/artifacttype/create/', safe=)) response = self.client.get('/artifacts/artifacttype/create/', follow=True) self.assertRedirects(response, destination, status_code=302, target_status_code...
def test_artifacttype_create_not_logged_in(self): ' ' destination = ('/login/?next=' + urllib.parse.quote('/artifacts/artifacttype/create/', safe=)) response = self.client.get('/artifacts/artifacttype/create/', follow=True) self.assertRedirects(response, destination, status_code=302, target_status_code...
c824bfc835345661618c146c1df659e25e3933a3a7d4d396ba0638cf8f12f292
def test_artifacttype_create_logged_in(self): ' test create view ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get('/artifacts/artifacttype/create/') self.assertEqual(response.status_code, 200)
test create view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_create_logged_in
FabFaeb/dfirtrack
1
python
def test_artifacttype_create_logged_in(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get('/artifacts/artifacttype/create/') self.assertEqual(response.status_code, 200)
def test_artifacttype_create_logged_in(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get('/artifacts/artifacttype/create/') self.assertEqual(response.status_code, 200)<|docstring|>test create view<|endoftext|>
7bcc8437211c438285537d4134ad5a7fc4cf4bf0184bcbdd3d81e2d3eae21d67
def test_artifacttype_create_template(self): ' test create view ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get('/artifacts/artifacttype/create/') self.assertTemplateUsed(response, 'dfirtrack_artifacts/artifacttype/artifacttype_add.html')
test create view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_create_template
FabFaeb/dfirtrack
1
python
def test_artifacttype_create_template(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get('/artifacts/artifacttype/create/') self.assertTemplateUsed(response, 'dfirtrack_artifacts/artifacttype/artifacttype_add.html')
def test_artifacttype_create_template(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get('/artifacts/artifacttype/create/') self.assertTemplateUsed(response, 'dfirtrack_artifacts/artifacttype/artifacttype_add.html')<|docstring|>tes...
be0a507634320737bb2e85c88cdc734aad6f31d36aed42c88ccd428817d74431
def test_artifacttype_create_get_user_context(self): ' test create view ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get('/artifacts/artifacttype/create/') self.assertEqual(str(response.context['user']), 'testuser_artifacttype')
test create view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_create_get_user_context
FabFaeb/dfirtrack
1
python
def test_artifacttype_create_get_user_context(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get('/artifacts/artifacttype/create/') self.assertEqual(str(response.context['user']), 'testuser_artifacttype')
def test_artifacttype_create_get_user_context(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get('/artifacts/artifacttype/create/') self.assertEqual(str(response.context['user']), 'testuser_artifacttype')<|docstring|>test create vi...
ca511b041f4ede01e572e50d133b4f6649b36ae68cc9a9f2f8ab93ec2b5fdb2a
def test_artifacttype_create_redirect(self): ' test create view ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') destination = urllib.parse.quote('/artifacts/artifacttype/create/', safe='/') response = self.client.get('/artifacts/artifacttype/create', follow=True) ...
test create view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_create_redirect
FabFaeb/dfirtrack
1
python
def test_artifacttype_create_redirect(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') destination = urllib.parse.quote('/artifacts/artifacttype/create/', safe='/') response = self.client.get('/artifacts/artifacttype/create', follow=True) self.assertRe...
def test_artifacttype_create_redirect(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') destination = urllib.parse.quote('/artifacts/artifacttype/create/', safe='/') response = self.client.get('/artifacts/artifacttype/create', follow=True) self.assertRe...
2341b5e754a63d66e04f3308b9be55b770187afdea5fcfae1c365baabf3988e6
def test_artifacttype_create_post_redirect(self): ' test create view ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') data_dict = {'artifacttype_name': 'artifacttype_create_post_test'} response = self.client.post('/artifacts/artifacttype/create/', data_dict) art...
test create view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_create_post_redirect
FabFaeb/dfirtrack
1
python
def test_artifacttype_create_post_redirect(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') data_dict = {'artifacttype_name': 'artifacttype_create_post_test'} response = self.client.post('/artifacts/artifacttype/create/', data_dict) artifacttype_id = A...
def test_artifacttype_create_post_redirect(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') data_dict = {'artifacttype_name': 'artifacttype_create_post_test'} response = self.client.post('/artifacts/artifacttype/create/', data_dict) artifacttype_id = A...
fa6a8e538b04b87a7256cba85cbfac1bef5536f40061c3c7992fe72109dc61a5
def test_artifacttype_create_post_invalid_reload(self): ' test create view ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') data_dict = {} response = self.client.post('/artifacts/artifacttype/create/', data_dict) self.assertEqual(response.status_code, 200)
test create view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_create_post_invalid_reload
FabFaeb/dfirtrack
1
python
def test_artifacttype_create_post_invalid_reload(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') data_dict = {} response = self.client.post('/artifacts/artifacttype/create/', data_dict) self.assertEqual(response.status_code, 200)
def test_artifacttype_create_post_invalid_reload(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') data_dict = {} response = self.client.post('/artifacts/artifacttype/create/', data_dict) self.assertEqual(response.status_code, 200)<|docstring|>test crea...
76e07b7a995bca521b93644bac1b53dc55c442934b0d88f25dc22d224d460065
def test_artifacttype_create_post_invalid_template(self): ' test create view ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') data_dict = {} response = self.client.post('/artifacts/artifacttype/create/', data_dict) self.assertTemplateUsed(response, 'dfirtrack_ar...
test create view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_create_post_invalid_template
FabFaeb/dfirtrack
1
python
def test_artifacttype_create_post_invalid_template(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') data_dict = {} response = self.client.post('/artifacts/artifacttype/create/', data_dict) self.assertTemplateUsed(response, 'dfirtrack_artifacts/artifact...
def test_artifacttype_create_post_invalid_template(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') data_dict = {} response = self.client.post('/artifacts/artifacttype/create/', data_dict) self.assertTemplateUsed(response, 'dfirtrack_artifacts/artifact...
41a42085b5c96273ceb58ea08cc853700d39008ecea30c60c7f1c89ab04f5fe9
def test_artifacttype_update_not_logged_in(self): ' test update view ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') destination = ('/login/?next=' + urllib.parse.quote((('/artifacts/artifacttype/update/' + str(artifacttype_1.artifacttype_id)) + '/'), safe='')) response =...
test update view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_update_not_logged_in
FabFaeb/dfirtrack
1
python
def test_artifacttype_update_not_logged_in(self): ' ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') destination = ('/login/?next=' + urllib.parse.quote((('/artifacts/artifacttype/update/' + str(artifacttype_1.artifacttype_id)) + '/'), safe=)) response = self.client.get((...
def test_artifacttype_update_not_logged_in(self): ' ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') destination = ('/login/?next=' + urllib.parse.quote((('/artifacts/artifacttype/update/' + str(artifacttype_1.artifacttype_id)) + '/'), safe=)) response = self.client.get((...
197dfbcdfa76a55db5f16796825190def63595cadd86a0e66aacca1faef291f0
def test_artifacttype_update_logged_in(self): ' test update view ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get((('/artifacts/artifacttype/update/' + str(artif...
test update view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_update_logged_in
FabFaeb/dfirtrack
1
python
def test_artifacttype_update_logged_in(self): ' ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get((('/artifacts/artifacttype/update/' + str(artifacttype_1.artifa...
def test_artifacttype_update_logged_in(self): ' ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get((('/artifacts/artifacttype/update/' + str(artifacttype_1.artifa...
f09ef5ba21b030447c52d1415ee0417ab2d68ed31fe3601eb2e16865e9c6bc21
def test_artifacttype_update_template(self): ' test update view ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get((('/artifacts/artifacttype/update/' + str(artifa...
test update view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_update_template
FabFaeb/dfirtrack
1
python
def test_artifacttype_update_template(self): ' ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get((('/artifacts/artifacttype/update/' + str(artifacttype_1.artifac...
def test_artifacttype_update_template(self): ' ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get((('/artifacts/artifacttype/update/' + str(artifacttype_1.artifac...
32ca13109ab71f04f8f8f26c7a52d0ab2b04acef3b8eeef1e46c070c1b58c77f
def test_artifacttype_update_get_user_context(self): ' test update view ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get((('/artifacts/artifacttype/update/' + st...
test update view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_update_get_user_context
FabFaeb/dfirtrack
1
python
def test_artifacttype_update_get_user_context(self): ' ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get((('/artifacts/artifacttype/update/' + str(artifacttype_1...
def test_artifacttype_update_get_user_context(self): ' ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') response = self.client.get((('/artifacts/artifacttype/update/' + str(artifacttype_1...
a43cb36161f98f61a74b9a6f8ccef1e33f7a8fb14e49a982b67e5577038d5e66
def test_artifacttype_update_redirect(self): ' test update view ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') destination = urllib.parse.quote((('/artifacts/artifacttype/update/' + str(...
test update view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_update_redirect
FabFaeb/dfirtrack
1
python
def test_artifacttype_update_redirect(self): ' ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') destination = urllib.parse.quote((('/artifacts/artifacttype/update/' + str(artifacttype_1.a...
def test_artifacttype_update_redirect(self): ' ' artifacttype_1 = Artifacttype.objects.get(artifacttype_name='artifacttype_1') self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') destination = urllib.parse.quote((('/artifacts/artifacttype/update/' + str(artifacttype_1.a...
5cbc9602f4731c4dab50a0317c24701c55127d5a4e25d0ca971e835b9adf197b
def test_artifacttype_update_post_redirect(self): ' test update view ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') artifacttype_id = Artifacttype.objects.create(artifacttype_name='artifacttype_update_post_test_1').artifacttype_id data_dict = {'artifacttype_name':...
test update view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_update_post_redirect
FabFaeb/dfirtrack
1
python
def test_artifacttype_update_post_redirect(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') artifacttype_id = Artifacttype.objects.create(artifacttype_name='artifacttype_update_post_test_1').artifacttype_id data_dict = {'artifacttype_name': 'artifacttype_u...
def test_artifacttype_update_post_redirect(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') artifacttype_id = Artifacttype.objects.create(artifacttype_name='artifacttype_update_post_test_1').artifacttype_id data_dict = {'artifacttype_name': 'artifacttype_u...
f09e1fda69752d5af34f3c1d76ffe7e3b6f7fa89192f7b81c178ef38370ef34f
def test_artifacttype_update_post_invalid_reload(self): ' test update view ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') artifacttype_id = Artifacttype.objects.get(artifacttype_name='artifacttype_1').artifacttype_id data_dict = {} response = self.client.post(...
test update view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_update_post_invalid_reload
FabFaeb/dfirtrack
1
python
def test_artifacttype_update_post_invalid_reload(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') artifacttype_id = Artifacttype.objects.get(artifacttype_name='artifacttype_1').artifacttype_id data_dict = {} response = self.client.post((('/artifacts/ar...
def test_artifacttype_update_post_invalid_reload(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') artifacttype_id = Artifacttype.objects.get(artifacttype_name='artifacttype_1').artifacttype_id data_dict = {} response = self.client.post((('/artifacts/ar...
336e244bd3b54d646caca3466083ed78f2c9e0856e53ade78108b17d6b27a1bb
def test_artifacttype_update_post_invalid_template(self): ' test update view ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') artifacttype_id = Artifacttype.objects.get(artifacttype_name='artifacttype_1').artifacttype_id data_dict = {} response = self.client.pos...
test update view
dfirtrack_artifacts/tests/artifacttype/test_artifacttype_views.py
test_artifacttype_update_post_invalid_template
FabFaeb/dfirtrack
1
python
def test_artifacttype_update_post_invalid_template(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') artifacttype_id = Artifacttype.objects.get(artifacttype_name='artifacttype_1').artifacttype_id data_dict = {} response = self.client.post((('/artifacts/...
def test_artifacttype_update_post_invalid_template(self): ' ' self.client.login(username='testuser_artifacttype', password='5HxLPaA1wWbphTcd2C3S') artifacttype_id = Artifacttype.objects.get(artifacttype_name='artifacttype_1').artifacttype_id data_dict = {} response = self.client.post((('/artifacts/...
e8d4aa371b8e934e2d0ccd46c1c9eb1a14fe03e00c1801b468f3530669d4d7a5
def run_mash(seqids, output_dir): '\n Use MASH to determine the genus of strains when the requested analysis has a genus-specific database\n :return: dictionary of MASH-calculated genera\n ' genus_dict = dict() for seqid in seqids: screen_file = os.path.join(output_dir, '{seqid}_screen.tab'...
Use MASH to determine the genus of strains when the requested analysis has a genus-specific database :return: dictionary of MASH-calculated genera
automators_dev/geneseekr.py
run_mash
forestdussault/OLCRedmineAutomator
0
python
def run_mash(seqids, output_dir): '\n Use MASH to determine the genus of strains when the requested analysis has a genus-specific database\n :return: dictionary of MASH-calculated genera\n ' genus_dict = dict() for seqid in seqids: screen_file = os.path.join(output_dir, '{seqid}_screen.tab'...
def run_mash(seqids, output_dir): '\n Use MASH to determine the genus of strains when the requested analysis has a genus-specific database\n :return: dictionary of MASH-calculated genera\n ' genus_dict = dict() for seqid in seqids: screen_file = os.path.join(output_dir, '{seqid}_screen.tab'...
fabb3836cf49bbc8526ec566ddbd2889b67e3f7187518161bf57d714a8c46f51
def verify_fasta_files_present(seqid_list, fasta_dir): '\n Makes sure that FASTQ files specified in seqid_list have been successfully copied/linked to directory specified\n by fastq_dir.\n :param seqid_list: List with SEQIDs.\n :param fasta_dir: Directory to which FASTA files should have been linked\n ...
Makes sure that FASTQ files specified in seqid_list have been successfully copied/linked to directory specified by fastq_dir. :param seqid_list: List with SEQIDs. :param fasta_dir: Directory to which FASTA files should have been linked :return: List of SEQIDs that did not have files associated with them.
automators_dev/geneseekr.py
verify_fasta_files_present
forestdussault/OLCRedmineAutomator
0
python
def verify_fasta_files_present(seqid_list, fasta_dir): '\n Makes sure that FASTQ files specified in seqid_list have been successfully copied/linked to directory specified\n by fastq_dir.\n :param seqid_list: List with SEQIDs.\n :param fasta_dir: Directory to which FASTA files should have been linked\n ...
def verify_fasta_files_present(seqid_list, fasta_dir): '\n Makes sure that FASTQ files specified in seqid_list have been successfully copied/linked to directory specified\n by fastq_dir.\n :param seqid_list: List with SEQIDs.\n :param fasta_dir: Directory to which FASTA files should have been linked\n ...
b15b69790c26b3602d85212b1339674b6947a989d98f5b1b6dcd0ab689f4ae22
def make_executable(path): '\n Takes a shell script and makes it executable (chmod +x)\n :param path: path to shell script\n ' mode = os.stat(path).st_mode mode |= ((mode & 292) >> 2) os.chmod(path, mode)
Takes a shell script and makes it executable (chmod +x) :param path: path to shell script
automators_dev/geneseekr.py
make_executable
forestdussault/OLCRedmineAutomator
0
python
def make_executable(path): '\n Takes a shell script and makes it executable (chmod +x)\n :param path: path to shell script\n ' mode = os.stat(path).st_mode mode |= ((mode & 292) >> 2) os.chmod(path, mode)
def make_executable(path): '\n Takes a shell script and makes it executable (chmod +x)\n :param path: path to shell script\n ' mode = os.stat(path).st_mode mode |= ((mode & 292) >> 2) os.chmod(path, mode)<|docstring|>Takes a shell script and makes it executable (chmod +x) :param path: path to s...
605408a92572375c120d313f255f5828fb95cf1d9b265b4af28bf3d8998527c2
def zip_folder(results_path, output_dir, output_filename): '\n Compress a folder\n :param results_path: The path of the folder to be compressed\n :param output_dir: The output directory\n :param output_filename: The output file name\n :return:\n ' output_path = os.path.join(output_dir, output_...
Compress a folder :param results_path: The path of the folder to be compressed :param output_dir: The output directory :param output_filename: The output file name :return:
automators_dev/geneseekr.py
zip_folder
forestdussault/OLCRedmineAutomator
0
python
def zip_folder(results_path, output_dir, output_filename): '\n Compress a folder\n :param results_path: The path of the folder to be compressed\n :param output_dir: The output directory\n :param output_filename: The output file name\n :return:\n ' output_path = os.path.join(output_dir, output_...
def zip_folder(results_path, output_dir, output_filename): '\n Compress a folder\n :param results_path: The path of the folder to be compressed\n :param output_dir: The output directory\n :param output_filename: The output file name\n :return:\n ' output_path = os.path.join(output_dir, output_...
dc20e953fd38ba5d72c18c2053e6e1130821c2cfc72491679eb04f658be04148
def __init__(self, protobuf_map_path: str, world_to_ecef: np.ndarray): '\n Interface to the raw protobuf map file with the following features:\n - access to element using ID is O(1);\n - access to coordinates in world ref system for a set of elements is O(1) after first access (lru cache)\n ...
Interface to the raw protobuf map file with the following features: - access to element using ID is O(1); - access to coordinates in world ref system for a set of elements is O(1) after first access (lru cache) - object support iteration using __getitem__ protocol Args: protobuf_map_path (str): path to the protobu...
l5kit/l5kit/data/map_api.py
__init__
ronamit/l5kit
1
python
def __init__(self, protobuf_map_path: str, world_to_ecef: np.ndarray): '\n Interface to the raw protobuf map file with the following features:\n - access to element using ID is O(1);\n - access to coordinates in world ref system for a set of elements is O(1) after first access (lru cache)\n ...
def __init__(self, protobuf_map_path: str, world_to_ecef: np.ndarray): '\n Interface to the raw protobuf map file with the following features:\n - access to element using ID is O(1);\n - access to coordinates in world ref system for a set of elements is O(1) after first access (lru cache)\n ...
c90528fc5e3bdf6315951f11c34a22bad14efcb4974a6caf2e91d414b52529d0
@staticmethod def from_cfg(data_manager: DataManager, cfg: dict) -> 'MapAPI': 'Build a MapAPI object starting from a config file and a data manager\n\n :param data_manager: a data manager object ot resolve paths\n :param cfg: the config dict\n :return: a MapAPI object\n ' raster_cfg ...
Build a MapAPI object starting from a config file and a data manager :param data_manager: a data manager object ot resolve paths :param cfg: the config dict :return: a MapAPI object
l5kit/l5kit/data/map_api.py
from_cfg
ronamit/l5kit
1
python
@staticmethod def from_cfg(data_manager: DataManager, cfg: dict) -> 'MapAPI': 'Build a MapAPI object starting from a config file and a data manager\n\n :param data_manager: a data manager object ot resolve paths\n :param cfg: the config dict\n :return: a MapAPI object\n ' raster_cfg ...
@staticmethod def from_cfg(data_manager: DataManager, cfg: dict) -> 'MapAPI': 'Build a MapAPI object starting from a config file and a data manager\n\n :param data_manager: a data manager object ot resolve paths\n :param cfg: the config dict\n :return: a MapAPI object\n ' raster_cfg ...
6cd3c9fcb934ece77f7c57f03319d768f96ff89590ac7499978d1a7ac16ed558
@staticmethod @no_type_check def id_as_str(element_id: GlobalId) -> str: '\n Get the element id as a string.\n Elements ids are stored as a variable len sequence of bytes in the protobuf\n\n Args:\n element_id (GlobalId): the GlobalId in the protobuf\n\n Returns:\n ...
Get the element id as a string. Elements ids are stored as a variable len sequence of bytes in the protobuf Args: element_id (GlobalId): the GlobalId in the protobuf Returns: str: the id as a str
l5kit/l5kit/data/map_api.py
id_as_str
ronamit/l5kit
1
python
@staticmethod @no_type_check def id_as_str(element_id: GlobalId) -> str: '\n Get the element id as a string.\n Elements ids are stored as a variable len sequence of bytes in the protobuf\n\n Args:\n element_id (GlobalId): the GlobalId in the protobuf\n\n Returns:\n ...
@staticmethod @no_type_check def id_as_str(element_id: GlobalId) -> str: '\n Get the element id as a string.\n Elements ids are stored as a variable len sequence of bytes in the protobuf\n\n Args:\n element_id (GlobalId): the GlobalId in the protobuf\n\n Returns:\n ...
bcf76b8d1a8106d55e0ed495ae1134fd4d324a6cd8de9a7dbd785e59bfb23dfd
@staticmethod def _undo_e7(value: float) -> float: '\n Latitude and longitude are stored as value*1e7 in the protobuf for efficiency and guaranteed accuracy.\n Convert them back to float.\n\n Args:\n value (float): the scaled value\n\n Returns:\n float: the unscaled...
Latitude and longitude are stored as value*1e7 in the protobuf for efficiency and guaranteed accuracy. Convert them back to float. Args: value (float): the scaled value Returns: float: the unscaled value
l5kit/l5kit/data/map_api.py
_undo_e7
ronamit/l5kit
1
python
@staticmethod def _undo_e7(value: float) -> float: '\n Latitude and longitude are stored as value*1e7 in the protobuf for efficiency and guaranteed accuracy.\n Convert them back to float.\n\n Args:\n value (float): the scaled value\n\n Returns:\n float: the unscaled...
@staticmethod def _undo_e7(value: float) -> float: '\n Latitude and longitude are stored as value*1e7 in the protobuf for efficiency and guaranteed accuracy.\n Convert them back to float.\n\n Args:\n value (float): the scaled value\n\n Returns:\n float: the unscaled...
ae29d551314c690243ebb1fc642d6d9eb3ab5ac97923036b6149882043861365
@no_type_check def unpack_deltas_cm(self, dx: Sequence[int], dy: Sequence[int], dz: Sequence[int], frame: GeoFrame) -> np.ndarray: '\n Get coords in world reference system (local ENU->ECEF->world).\n See the protobuf annotations for additional information about how coordinates are stored\n\n Ar...
Get coords in world reference system (local ENU->ECEF->world). See the protobuf annotations for additional information about how coordinates are stored Args: dx (Sequence[int]): X displacement in centimeters in local ENU dy (Sequence[int]): Y displacement in centimeters in local ENU dz (Sequence[int]): Z d...
l5kit/l5kit/data/map_api.py
unpack_deltas_cm
ronamit/l5kit
1
python
@no_type_check def unpack_deltas_cm(self, dx: Sequence[int], dy: Sequence[int], dz: Sequence[int], frame: GeoFrame) -> np.ndarray: '\n Get coords in world reference system (local ENU->ECEF->world).\n See the protobuf annotations for additional information about how coordinates are stored\n\n Ar...
@no_type_check def unpack_deltas_cm(self, dx: Sequence[int], dy: Sequence[int], dz: Sequence[int], frame: GeoFrame) -> np.ndarray: '\n Get coords in world reference system (local ENU->ECEF->world).\n See the protobuf annotations for additional information about how coordinates are stored\n\n Ar...
d59eef78ae5d05ab08e636376fac1ecc499549b46a2abd899b232c7399aa1d74
@staticmethod @no_type_check def is_lane(element: MapElement) -> bool: '\n Check whether an element is a valid lane\n\n Args:\n element (MapElement): a proto element\n\n Returns:\n bool: True if the element is a valid lane\n ' return bool(element.element.HasFiel...
Check whether an element is a valid lane Args: element (MapElement): a proto element Returns: bool: True if the element is a valid lane
l5kit/l5kit/data/map_api.py
is_lane
ronamit/l5kit
1
python
@staticmethod @no_type_check def is_lane(element: MapElement) -> bool: '\n Check whether an element is a valid lane\n\n Args:\n element (MapElement): a proto element\n\n Returns:\n bool: True if the element is a valid lane\n ' return bool(element.element.HasFiel...
@staticmethod @no_type_check def is_lane(element: MapElement) -> bool: '\n Check whether an element is a valid lane\n\n Args:\n element (MapElement): a proto element\n\n Returns:\n bool: True if the element is a valid lane\n ' return bool(element.element.HasFiel...
f77d139d92f5f9bd96e7b381716bc6b064a426e2fdddbc5ddc1b3a30aef99065
@lru_cache(maxsize=CACHE_SIZE) def get_lane_coords(self, element_id: str) -> dict: '\n Get XYZ coordinates in world ref system for a lane given its id\n lru_cached for O(1) access\n\n Args:\n element_id (str): lane element id\n\n Returns:\n dict: a dict with the two...
Get XYZ coordinates in world ref system for a lane given its id lru_cached for O(1) access Args: element_id (str): lane element id Returns: dict: a dict with the two boundaries coordinates as (Nx3) XYZ arrays
l5kit/l5kit/data/map_api.py
get_lane_coords
ronamit/l5kit
1
python
@lru_cache(maxsize=CACHE_SIZE) def get_lane_coords(self, element_id: str) -> dict: '\n Get XYZ coordinates in world ref system for a lane given its id\n lru_cached for O(1) access\n\n Args:\n element_id (str): lane element id\n\n Returns:\n dict: a dict with the two...
@lru_cache(maxsize=CACHE_SIZE) def get_lane_coords(self, element_id: str) -> dict: '\n Get XYZ coordinates in world ref system for a lane given its id\n lru_cached for O(1) access\n\n Args:\n element_id (str): lane element id\n\n Returns:\n dict: a dict with the two...
26d4bf11717bef333b360404acb6bac8924e73f876a68f719c82b9041e94358d
@staticmethod def interpolate(xyz: np.ndarray, step: float, method: InterpolationMethod) -> np.ndarray: '\n Interpolate points based on cumulative distances from the first one. Two modes are available:\n INTER_METER: interpolate using step as a meter value over cumulative distances (variable len resul...
Interpolate points based on cumulative distances from the first one. Two modes are available: INTER_METER: interpolate using step as a meter value over cumulative distances (variable len result) INTER_ENSURE_LEN: interpolate using a variable step such that we always get step values Args: xyz (np.ndarray): XYZ coord...
l5kit/l5kit/data/map_api.py
interpolate
ronamit/l5kit
1
python
@staticmethod def interpolate(xyz: np.ndarray, step: float, method: InterpolationMethod) -> np.ndarray: '\n Interpolate points based on cumulative distances from the first one. Two modes are available:\n INTER_METER: interpolate using step as a meter value over cumulative distances (variable len resul...
@staticmethod def interpolate(xyz: np.ndarray, step: float, method: InterpolationMethod) -> np.ndarray: '\n Interpolate points based on cumulative distances from the first one. Two modes are available:\n INTER_METER: interpolate using step as a meter value over cumulative distances (variable len resul...
ae1eebabd7a6761fa75db5b8f73d77adfdae9c33292abdf0b8084c17f26a224e
@lru_cache(maxsize=CACHE_SIZE) def get_lane_as_interpolation(self, element_id: str, step: float, method: InterpolationMethod) -> dict: '\n Perform an interpolation of the left and right lanes and compute the midlane.\n See interpolate for details about the different interpolation methods\n\n Ar...
Perform an interpolation of the left and right lanes and compute the midlane. See interpolate for details about the different interpolation methods Args: element_id (str): lane id step (float): step param for the method method (InterpolationMethod): one of the accepted methods Returns: dict: same as `...
l5kit/l5kit/data/map_api.py
get_lane_as_interpolation
ronamit/l5kit
1
python
@lru_cache(maxsize=CACHE_SIZE) def get_lane_as_interpolation(self, element_id: str, step: float, method: InterpolationMethod) -> dict: '\n Perform an interpolation of the left and right lanes and compute the midlane.\n See interpolate for details about the different interpolation methods\n\n Ar...
@lru_cache(maxsize=CACHE_SIZE) def get_lane_as_interpolation(self, element_id: str, step: float, method: InterpolationMethod) -> dict: '\n Perform an interpolation of the left and right lanes and compute the midlane.\n See interpolate for details about the different interpolation methods\n\n Ar...
928556c086b752d6d071bcee2c4418b9952b0f68d8ec7636413a43278a959dee
@staticmethod @no_type_check def is_crosswalk(element: MapElement) -> bool: '\n Check whether an element is a valid crosswalk\n\n Args:\n element (MapElement): a proto element\n\n Returns:\n bool: True if the element is a valid crosswalk\n ' if (not element.elem...
Check whether an element is a valid crosswalk Args: element (MapElement): a proto element Returns: bool: True if the element is a valid crosswalk
l5kit/l5kit/data/map_api.py
is_crosswalk
ronamit/l5kit
1
python
@staticmethod @no_type_check def is_crosswalk(element: MapElement) -> bool: '\n Check whether an element is a valid crosswalk\n\n Args:\n element (MapElement): a proto element\n\n Returns:\n bool: True if the element is a valid crosswalk\n ' if (not element.elem...
@staticmethod @no_type_check def is_crosswalk(element: MapElement) -> bool: '\n Check whether an element is a valid crosswalk\n\n Args:\n element (MapElement): a proto element\n\n Returns:\n bool: True if the element is a valid crosswalk\n ' if (not element.elem...
9be309a750594552ef4bba6298d29aebe92c994ff66c2199e4ed8ec6ea7e1f3a
@lru_cache(maxsize=CACHE_SIZE) def get_crosswalk_coords(self, element_id: str) -> dict: '\n Get XYZ coordinates in world ref system for a crosswalk given its id\n lru_cached for O(1) access\n\n Args:\n element_id (str): crosswalk element id\n\n Returns:\n dict: a di...
Get XYZ coordinates in world ref system for a crosswalk given its id lru_cached for O(1) access Args: element_id (str): crosswalk element id Returns: dict: a dict with the polygon coordinates as an (Nx3) XYZ array
l5kit/l5kit/data/map_api.py
get_crosswalk_coords
ronamit/l5kit
1
python
@lru_cache(maxsize=CACHE_SIZE) def get_crosswalk_coords(self, element_id: str) -> dict: '\n Get XYZ coordinates in world ref system for a crosswalk given its id\n lru_cached for O(1) access\n\n Args:\n element_id (str): crosswalk element id\n\n Returns:\n dict: a di...
@lru_cache(maxsize=CACHE_SIZE) def get_crosswalk_coords(self, element_id: str) -> dict: '\n Get XYZ coordinates in world ref system for a crosswalk given its id\n lru_cached for O(1) access\n\n Args:\n element_id (str): crosswalk element id\n\n Returns:\n dict: a di...
5c29685644e9ef62340aeb2951a3b7fb85f4db25af5ed605dcbf84f94180a0d5
def is_traffic_light(self, element_id: str) -> bool: '\n Check if the element is a traffic light\n Args:\n element_id (str): the id (utf-8 encode) of the element\n\n Returns:\n True if the element is a traffic light\n ' element = self[element_id] if (not ele...
Check if the element is a traffic light Args: element_id (str): the id (utf-8 encode) of the element Returns: True if the element is a traffic light
l5kit/l5kit/data/map_api.py
is_traffic_light
ronamit/l5kit
1
python
def is_traffic_light(self, element_id: str) -> bool: '\n Check if the element is a traffic light\n Args:\n element_id (str): the id (utf-8 encode) of the element\n\n Returns:\n True if the element is a traffic light\n ' element = self[element_id] if (not ele...
def is_traffic_light(self, element_id: str) -> bool: '\n Check if the element is a traffic light\n Args:\n element_id (str): the id (utf-8 encode) of the element\n\n Returns:\n True if the element is a traffic light\n ' element = self[element_id] if (not ele...
a0a06cb21830c30a6abd16ea395c7ec27e7268954ed7ce1ea59f97954edd6faf
@lru_cache(maxsize=CACHE_SIZE) def is_traffic_face(self, element_id: str) -> bool: '\n Check if the element is a traffic light face (of any color)\n\n Args:\n element_id (str): the id (utf-8 encode) of the element\n Returns:\n True if the element is a traffic light face, F...
Check if the element is a traffic light face (of any color) Args: element_id (str): the id (utf-8 encode) of the element Returns: True if the element is a traffic light face, False otherwise
l5kit/l5kit/data/map_api.py
is_traffic_face
ronamit/l5kit
1
python
@lru_cache(maxsize=CACHE_SIZE) def is_traffic_face(self, element_id: str) -> bool: '\n Check if the element is a traffic light face (of any color)\n\n Args:\n element_id (str): the id (utf-8 encode) of the element\n Returns:\n True if the element is a traffic light face, F...
@lru_cache(maxsize=CACHE_SIZE) def is_traffic_face(self, element_id: str) -> bool: '\n Check if the element is a traffic light face (of any color)\n\n Args:\n element_id (str): the id (utf-8 encode) of the element\n Returns:\n True if the element is a traffic light face, F...
45c0ef3cade29803062f04ddeb2f6f87155904c142bc5dbb233ad0d6a554cbc7
def is_traffic_face_color(self, element_id: str, color: str) -> bool: '\n Check if the element is a traffic light face of the given color\n\n Args:\n element_id (str): the id (utf-8 encode) of the element\n color (str): the color to check\n Returns:\n True if th...
Check if the element is a traffic light face of the given color Args: element_id (str): the id (utf-8 encode) of the element color (str): the color to check Returns: True if the element is a traffic light face with the given color
l5kit/l5kit/data/map_api.py
is_traffic_face_color
ronamit/l5kit
1
python
def is_traffic_face_color(self, element_id: str, color: str) -> bool: '\n Check if the element is a traffic light face of the given color\n\n Args:\n element_id (str): the id (utf-8 encode) of the element\n color (str): the color to check\n Returns:\n True if th...
def is_traffic_face_color(self, element_id: str, color: str) -> bool: '\n Check if the element is a traffic light face of the given color\n\n Args:\n element_id (str): the id (utf-8 encode) of the element\n color (str): the color to check\n Returns:\n True if th...
b70049f7e9bc78ad6bbd861f28586bc689e9664e746fbf9e6fc8c46c87d14cbb
@lru_cache(maxsize=CACHE_SIZE) def get_color_for_face(self, face_id: str) -> str: '\n Utility function. It calls `is_traffic_face_color` for a set of colors until it gets an answer.\n If no color is found, then `face_id` is not the id of a traffic light face (and we raise ValueError).\n\n Args:...
Utility function. It calls `is_traffic_face_color` for a set of colors until it gets an answer. If no color is found, then `face_id` is not the id of a traffic light face (and we raise ValueError). Args: face_id (str): the element id Returns: str: the color as string for this traffic face
l5kit/l5kit/data/map_api.py
get_color_for_face
ronamit/l5kit
1
python
@lru_cache(maxsize=CACHE_SIZE) def get_color_for_face(self, face_id: str) -> str: '\n Utility function. It calls `is_traffic_face_color` for a set of colors until it gets an answer.\n If no color is found, then `face_id` is not the id of a traffic light face (and we raise ValueError).\n\n Args:...
@lru_cache(maxsize=CACHE_SIZE) def get_color_for_face(self, face_id: str) -> str: '\n Utility function. It calls `is_traffic_face_color` for a set of colors until it gets an answer.\n If no color is found, then `face_id` is not the id of a traffic light face (and we raise ValueError).\n\n Args:...
c3583171bb425013a3459258af8ed3a34ce248071586f4bb0ff8ebd28e6699e5
def get_tl_feature_for_lane(self, lane_id: str, active_tl_face_to_color: dict) -> int: ' Get traffic light feature for a lane given its active tl faces and a constant priority map.\n ' tl_color_to_priority_idx = {'unknown': 0, 'green': 1, 'yellow': 2, 'red': 3, 'none': 4} lane_tces = self.get_lane_tr...
Get traffic light feature for a lane given its active tl faces and a constant priority map.
l5kit/l5kit/data/map_api.py
get_tl_feature_for_lane
ronamit/l5kit
1
python
def get_tl_feature_for_lane(self, lane_id: str, active_tl_face_to_color: dict) -> int: ' \n ' tl_color_to_priority_idx = {'unknown': 0, 'green': 1, 'yellow': 2, 'red': 3, 'none': 4} lane_tces = self.get_lane_traffic_control_ids(lane_id) lane_tls = [tce for tce in lane_tces if self.is_traffic_ligh...
def get_tl_feature_for_lane(self, lane_id: str, active_tl_face_to_color: dict) -> int: ' \n ' tl_color_to_priority_idx = {'unknown': 0, 'green': 1, 'yellow': 2, 'red': 3, 'none': 4} lane_tces = self.get_lane_traffic_control_ids(lane_id) lane_tls = [tce for tce in lane_tces if self.is_traffic_ligh...
11c14799c02a9b049fedbf675f6194b05f7b61389c4a36bb860aa4cf9e361b1e
def get_bounds(self) -> dict: '\n For each elements of interest returns bounds [[min_x, min_y],[max_x, max_y]] and proto ids\n Coords are computed by the MapAPI and, as such, are in the world ref system.\n\n Returns:\n dict: keys are classes of elements, values are dict with `bounds`...
For each elements of interest returns bounds [[min_x, min_y],[max_x, max_y]] and proto ids Coords are computed by the MapAPI and, as such, are in the world ref system. Returns: dict: keys are classes of elements, values are dict with `bounds` and `ids` keys
l5kit/l5kit/data/map_api.py
get_bounds
ronamit/l5kit
1
python
def get_bounds(self) -> dict: '\n For each elements of interest returns bounds [[min_x, min_y],[max_x, max_y]] and proto ids\n Coords are computed by the MapAPI and, as such, are in the world ref system.\n\n Returns:\n dict: keys are classes of elements, values are dict with `bounds`...
def get_bounds(self) -> dict: '\n For each elements of interest returns bounds [[min_x, min_y],[max_x, max_y]] and proto ids\n Coords are computed by the MapAPI and, as such, are in the world ref system.\n\n Returns:\n dict: keys are classes of elements, values are dict with `bounds`...
b7f41ac407f5fa37c88412ea9507b56426a84029c98ca3790c868cec884124ec
def __init__(self): 'The constructor' self._set_fields() self._module = AnsibleModule(argument_spec=self._fields, supports_check_mode=True)
The constructor
technologies/servicenow/library/snow_create_ticket.py
__init__
agold-rh/ansible-programming-howto
0
python
def __init__(self): self._set_fields() self._module = AnsibleModule(argument_spec=self._fields, supports_check_mode=True)
def __init__(self): self._set_fields() self._module = AnsibleModule(argument_spec=self._fields, supports_check_mode=True)<|docstring|>The constructor<|endoftext|>
45091651b6eece997b946357d986dda758be64ccb2b935cdd671ee58220bbb42
def _set_fields(self): 'Configure module input' self._fields = {'short_description': {'required': True, 'type': 'str'}, 'assignment_group': {'required': True, 'type': 'str'}, 'remediation': {'required': True, 'type': 'str'}, 'serviceName': {'required': True, 'type': 'str'}, 'server': {'required': True, 'type': ...
Configure module input
technologies/servicenow/library/snow_create_ticket.py
_set_fields
agold-rh/ansible-programming-howto
0
python
def _set_fields(self): self._fields = {'short_description': {'required': True, 'type': 'str'}, 'assignment_group': {'required': True, 'type': 'str'}, 'remediation': {'required': True, 'type': 'str'}, 'serviceName': {'required': True, 'type': 'str'}, 'server': {'required': True, 'type': 'str'}, 'host': {'requir...
def _set_fields(self): self._fields = {'short_description': {'required': True, 'type': 'str'}, 'assignment_group': {'required': True, 'type': 'str'}, 'remediation': {'required': True, 'type': 'str'}, 'serviceName': {'required': True, 'type': 'str'}, 'server': {'required': True, 'type': 'str'}, 'host': {'requir...
65a480fcde19f130d140aa75653dff9ce12a8a07f3cf43c5b7854e61390c1bbd
def work(self): 'Main application logic' short_description = self._module.params['short_description'] assignment_group = self._module.params['assignment_group'] remediation = self._module.params['remediation'] serviceName = self._module.params['serviceName'] server = self._module.params['server'...
Main application logic
technologies/servicenow/library/snow_create_ticket.py
work
agold-rh/ansible-programming-howto
0
python
def work(self): short_description = self._module.params['short_description'] assignment_group = self._module.params['assignment_group'] remediation = self._module.params['remediation'] serviceName = self._module.params['serviceName'] server = self._module.params['server'] host = self._modul...
def work(self): short_description = self._module.params['short_description'] assignment_group = self._module.params['assignment_group'] remediation = self._module.params['remediation'] serviceName = self._module.params['serviceName'] server = self._module.params['server'] host = self._modul...
092a7e5817b5c7ba03413c5d5ae3ec676375c7b72af0b32e20d38cd022c39553
def run(self): 'Application entry point' is_changed = False retval = {'notice': 'check_mode so no records created'} if (not self._module.check_mode): retval = self.work() is_changed = True self._module.exit_json(changed=is_changed, meta=retval)
Application entry point
technologies/servicenow/library/snow_create_ticket.py
run
agold-rh/ansible-programming-howto
0
python
def run(self): is_changed = False retval = {'notice': 'check_mode so no records created'} if (not self._module.check_mode): retval = self.work() is_changed = True self._module.exit_json(changed=is_changed, meta=retval)
def run(self): is_changed = False retval = {'notice': 'check_mode so no records created'} if (not self._module.check_mode): retval = self.work() is_changed = True self._module.exit_json(changed=is_changed, meta=retval)<|docstring|>Application entry point<|endoftext|>
aef0bc164a7a56d6ab528b856633c0991ebffbbcede45dd824a0233d555c1700
@pytest.mark.usefixtures('os', 'scheduler', 'instance') def test_additional_sg_and_ssh_from(region, custom_security_group, pcluster_config_reader, clusters_factory): '\n Test when additional_sg ssh_from are provided in the config file\n\n The additional security group should be added to the head and compute n...
Test when additional_sg ssh_from are provided in the config file The additional security group should be added to the head and compute nodes. The
tests/integration-tests/tests/networking/test_security_groups.py
test_additional_sg_and_ssh_from
mrgum/aws-parallelcluster
279
python
@pytest.mark.usefixtures('os', 'scheduler', 'instance') def test_additional_sg_and_ssh_from(region, custom_security_group, pcluster_config_reader, clusters_factory): '\n Test when additional_sg ssh_from are provided in the config file\n\n The additional security group should be added to the head and compute n...
@pytest.mark.usefixtures('os', 'scheduler', 'instance') def test_additional_sg_and_ssh_from(region, custom_security_group, pcluster_config_reader, clusters_factory): '\n Test when additional_sg ssh_from are provided in the config file\n\n The additional security group should be added to the head and compute n...
a37f7a742f665b76762ead6077bc7d392cdfb7ec7bb8a5d7a34636e26540869e
@pytest.mark.usefixtures('os', 'instance') def test_overwrite_sg(region, scheduler, custom_security_group, pcluster_config_reader, clusters_factory): 'Test vpc_security_group_id overwrites pcluster default sg on head and compute nodes, efs, fsx' custom_security_group_id = custom_security_group.cfn_resources['Se...
Test vpc_security_group_id overwrites pcluster default sg on head and compute nodes, efs, fsx
tests/integration-tests/tests/networking/test_security_groups.py
test_overwrite_sg
mrgum/aws-parallelcluster
279
python
@pytest.mark.usefixtures('os', 'instance') def test_overwrite_sg(region, scheduler, custom_security_group, pcluster_config_reader, clusters_factory): custom_security_group_id = custom_security_group.cfn_resources['SecurityGroupResource'] cluster_config = pcluster_config_reader(vpc_security_group_id=custom_...
@pytest.mark.usefixtures('os', 'instance') def test_overwrite_sg(region, scheduler, custom_security_group, pcluster_config_reader, clusters_factory): custom_security_group_id = custom_security_group.cfn_resources['SecurityGroupResource'] cluster_config = pcluster_config_reader(vpc_security_group_id=custom_...
4942d8626560a68f943a930eb9c64f4bf3656a7aef3552b8d54aa32dceb69dd7
def parse_args(): ' Parsed command line. ' parser = argparse.ArgumentParser(description='Find running files.') parser.add_argument('pattern', nargs='?', help='Pattern of program name to terminate.') parser.add_argument('--test', help='Run tests', action='store_true') args = parser.parse_args() i...
Parsed command line.
source/blockchain_backup/config/killmatch.py
parse_args
denova-com/blockchain-backup
0
python
def parse_args(): ' ' parser = argparse.ArgumentParser(description='Find running files.') parser.add_argument('pattern', nargs='?', help='Pattern of program name to terminate.') parser.add_argument('--test', help='Run tests', action='store_true') args = parser.parse_args() if (len(args.pattern)...
def parse_args(): ' ' parser = argparse.ArgumentParser(description='Find running files.') parser.add_argument('pattern', nargs='?', help='Pattern of program name to terminate.') parser.add_argument('--test', help='Run tests', action='store_true') args = parser.parse_args() if (len(args.pattern)...
4e2074c74cebb9632155abbf4aada0bcba472d4d7007cbdc9156615fe874a69a
def make_vector(wordQuery, vocab_all): '\n\n :param wordQuery:\n :param vocab_all:\n :return:\n ' clean_query = w3.prepro_base(wordQuery) token_query = clean_query.split() vector = ([0] * len(vocab_all)) for word in token_query: if (word in vocab_all): vector[vocab_al...
:param wordQuery: :param vocab_all: :return:
_scripts/w6.py
make_vector
dandyarir/SearchEngine
0
python
def make_vector(wordQuery, vocab_all): '\n\n :param wordQuery:\n :param vocab_all:\n :return:\n ' clean_query = w3.prepro_base(wordQuery) token_query = clean_query.split() vector = ([0] * len(vocab_all)) for word in token_query: if (word in vocab_all): vector[vocab_al...
def make_vector(wordQuery, vocab_all): '\n\n :param wordQuery:\n :param vocab_all:\n :return:\n ' clean_query = w3.prepro_base(wordQuery) token_query = clean_query.split() vector = ([0] * len(vocab_all)) for word in token_query: if (word in vocab_all): vector[vocab_al...
451f3fa79d9a565d82e7b3d87047f0ba2c37557aa94fba5cd4032f99c39377f6
def get_job_content(remote_files, operator, biz_cc_id): '\n 根据ip、文件路径获取远程服务器的以base64编码的文件内容\n @param remote_files: 文件集合 [{"file_path":"", "ip":"只支持单个ip", "job_account":""}]\n @param operator: 操作人员\n @param biz_cc_id: 业务id\n @return: {\n "success": [\n {"file_name": "...
根据ip、文件路径获取远程服务器的以base64编码的文件内容 @param remote_files: 文件集合 [{"file_path":"", "ip":"只支持单个ip", "job_account":""}] @param operator: 操作人员 @param biz_cc_id: 业务id @return: { "success": [ {"file_name": "file_name", "content": "content", "ip": "1.1.1.2"} ], "failure": [ ...
pipeline_plugins/components/utils/job.py
get_job_content
Chace-wang/bk-sops
881
python
def get_job_content(remote_files, operator, biz_cc_id): '\n 根据ip、文件路径获取远程服务器的以base64编码的文件内容\n @param remote_files: 文件集合 [{"file_path":, "ip":"只支持单个ip", "job_account":}]\n @param operator: 操作人员\n @param biz_cc_id: 业务id\n @return: {\n "success": [\n {"file_name": "file...
def get_job_content(remote_files, operator, biz_cc_id): '\n 根据ip、文件路径获取远程服务器的以base64编码的文件内容\n @param remote_files: 文件集合 [{"file_path":, "ip":"只支持单个ip", "job_account":}]\n @param operator: 操作人员\n @param biz_cc_id: 业务id\n @return: {\n "success": [\n {"file_name": "file...
59b42221a15c6e509fd8fdc8d3a9969b8eeba485d9be246425411d3be8063e01
def get_job_instance_log(job_instance_record, operator, bk_biz_id): '\n 轮询job执行结果\n @param job_instance_record: [({"file_name": file_name, "ip": remote_file["ip"]}, job_instant_id)]\n @param operator: admin\n @param bk_biz_id: 123\n @return:\n ' client = get_client_by_user(operator) get_jo...
轮询job执行结果 @param job_instance_record: [({"file_name": file_name, "ip": remote_file["ip"]}, job_instant_id)] @param operator: admin @param bk_biz_id: 123 @return:
pipeline_plugins/components/utils/job.py
get_job_instance_log
Chace-wang/bk-sops
881
python
def get_job_instance_log(job_instance_record, operator, bk_biz_id): '\n 轮询job执行结果\n @param job_instance_record: [({"file_name": file_name, "ip": remote_file["ip"]}, job_instant_id)]\n @param operator: admin\n @param bk_biz_id: 123\n @return:\n ' client = get_client_by_user(operator) get_jo...
def get_job_instance_log(job_instance_record, operator, bk_biz_id): '\n 轮询job执行结果\n @param job_instance_record: [({"file_name": file_name, "ip": remote_file["ip"]}, job_instant_id)]\n @param operator: admin\n @param bk_biz_id: 123\n @return:\n ' client = get_client_by_user(operator) get_jo...
d932bd95b1b1e6514754eeecac9fe9197ba606d07889ed4d9dfc6701dd37923a
def ExpandQName(qname, refNode=None, namespaces=None): '\n Expand the given QName in the context of the given node,\n or in the given namespace dictionary\n ' nss = {} if refNode: nss = xml.dom.ext.GetAllNs(refNode) elif namespaces: nss = namespaces (prefix, local) = xml.dom...
Expand the given QName in the context of the given node, or in the given namespace dictionary
backend/src/gloader/xml/xpath/Util.py
ExpandQName
ikaier/gini5
11
python
def ExpandQName(qname, refNode=None, namespaces=None): '\n Expand the given QName in the context of the given node,\n or in the given namespace dictionary\n ' nss = {} if refNode: nss = xml.dom.ext.GetAllNs(refNode) elif namespaces: nss = namespaces (prefix, local) = xml.dom...
def ExpandQName(qname, refNode=None, namespaces=None): '\n Expand the given QName in the context of the given node,\n or in the given namespace dictionary\n ' nss = {} if refNode: nss = xml.dom.ext.GetAllNs(refNode) elif namespaces: nss = namespaces (prefix, local) = xml.dom...
c9084a34b062890e4e7c8be785d9b37212ffacfbaf5034ef32e97ee1738a9d01
def __recurseSort(test, toSort): 'Check whether any of the nodes in toSort are in the list test, and if so, sort them into the result list' result = [] for node in test: toSort = filter((lambda x, n=node: (x != n)), toSort) if (node in toSort): result.append(node) if (nod...
Check whether any of the nodes in toSort are in the list test, and if so, sort them into the result list
backend/src/gloader/xml/xpath/Util.py
__recurseSort
ikaier/gini5
11
python
def __recurseSort(test, toSort): result = [] for node in test: toSort = filter((lambda x, n=node: (x != n)), toSort) if (node in toSort): result.append(node) if (node.nodeType == Node.ELEMENT_NODE): attrList = node.attributes.values() result = (re...
def __recurseSort(test, toSort): result = [] for node in test: toSort = filter((lambda x, n=node: (x != n)), toSort) if (node in toSort): result.append(node) if (node.nodeType == Node.ELEMENT_NODE): attrList = node.attributes.values() result = (re...
01ae1bd3ff27a596d95b952439b507bb412bbf2a5b31c85b0728bbe73b5e1aea
def NormalizeNode(node): 'NormalizeNode is used to prepare a DOM for XPath evaluation.\n\n 1. Convert CDATA Sections to Text Nodes.\n 2. Normalize all text nodes\n ' node = node.firstChild while node: if (node.nodeType == Node.CDATA_SECTION_NODE): if (node.nextSibling and (nod...
NormalizeNode is used to prepare a DOM for XPath evaluation. 1. Convert CDATA Sections to Text Nodes. 2. Normalize all text nodes
backend/src/gloader/xml/xpath/Util.py
NormalizeNode
ikaier/gini5
11
python
def NormalizeNode(node): 'NormalizeNode is used to prepare a DOM for XPath evaluation.\n\n 1. Convert CDATA Sections to Text Nodes.\n 2. Normalize all text nodes\n ' node = node.firstChild while node: if (node.nodeType == Node.CDATA_SECTION_NODE): if (node.nextSibling and (nod...
def NormalizeNode(node): 'NormalizeNode is used to prepare a DOM for XPath evaluation.\n\n 1. Convert CDATA Sections to Text Nodes.\n 2. Normalize all text nodes\n ' node = node.firstChild while node: if (node.nodeType == Node.CDATA_SECTION_NODE): if (node.nextSibling and (nod...
5e91da8ed00bf37214a3a003e29554571a6891162d228486a591f4b4b880fd67
def raw_rewards(self, obs): '\n Return (unnormalized) reward for each frame of a single segment\n from each member of the ensemble.\n ' assert_equal(obs.shape[1:], (84, 84, 4)) n_steps = obs.shape[0] feed_dict = {} for rp in self.rps: feed_dict[rp.training] = False ...
Return (unnormalized) reward for each frame of a single segment from each member of the ensemble.
reward_predictor.py
raw_rewards
unghee/learning-from-human-preferences
189
python
def raw_rewards(self, obs): '\n Return (unnormalized) reward for each frame of a single segment\n from each member of the ensemble.\n ' assert_equal(obs.shape[1:], (84, 84, 4)) n_steps = obs.shape[0] feed_dict = {} for rp in self.rps: feed_dict[rp.training] = False ...
def raw_rewards(self, obs): '\n Return (unnormalized) reward for each frame of a single segment\n from each member of the ensemble.\n ' assert_equal(obs.shape[1:], (84, 84, 4)) n_steps = obs.shape[0] feed_dict = {} for rp in self.rps: feed_dict[rp.training] = False ...
efcd0d424556ceda2b3530e354c15544b74cee1c6fb594e9666fd2a4c39c63bd
def reward(self, obs): '\n Return (normalized) reward for each frame of a single segment.\n\n (Normalization involves normalizing the rewards from each member of the\n ensemble separately, then averaging the resulting rewards across all\n ensemble members.)\n ' assert_equal(ob...
Return (normalized) reward for each frame of a single segment. (Normalization involves normalizing the rewards from each member of the ensemble separately, then averaging the resulting rewards across all ensemble members.)
reward_predictor.py
reward
unghee/learning-from-human-preferences
189
python
def reward(self, obs): '\n Return (normalized) reward for each frame of a single segment.\n\n (Normalization involves normalizing the rewards from each member of the\n ensemble separately, then averaging the resulting rewards across all\n ensemble members.)\n ' assert_equal(ob...
def reward(self, obs): '\n Return (normalized) reward for each frame of a single segment.\n\n (Normalization involves normalizing the rewards from each member of the\n ensemble separately, then averaging the resulting rewards across all\n ensemble members.)\n ' assert_equal(ob...
027f61f7d7892ecc7a59ac2873c5b2d0266735d8a0f8adb5960a9749f90d6a9b
def preferences(self, s1s, s2s): '\n Predict probability of human preferring one segment over another\n for each segment in the supplied batch of segment pairs.\n ' feed_dict = {} for rp in self.rps: feed_dict[rp.s1] = s1s feed_dict[rp.s2] = s2s feed_dict[rp.trai...
Predict probability of human preferring one segment over another for each segment in the supplied batch of segment pairs.
reward_predictor.py
preferences
unghee/learning-from-human-preferences
189
python
def preferences(self, s1s, s2s): '\n Predict probability of human preferring one segment over another\n for each segment in the supplied batch of segment pairs.\n ' feed_dict = {} for rp in self.rps: feed_dict[rp.s1] = s1s feed_dict[rp.s2] = s2s feed_dict[rp.trai...
def preferences(self, s1s, s2s): '\n Predict probability of human preferring one segment over another\n for each segment in the supplied batch of segment pairs.\n ' feed_dict = {} for rp in self.rps: feed_dict[rp.s1] = s1s feed_dict[rp.s2] = s2s feed_dict[rp.trai...
69412bf52efd0a105adf0501f47684a1bdef259ee2f591156814df1191f172f5
def train(self, prefs_train, prefs_val, val_interval): '\n Train all ensemble members for one epoch.\n ' print(('Training/testing with %d/%d preferences' % (len(prefs_train), len(prefs_val)))) start_steps = self.n_steps start_time = time.time() for (_, batch) in enumerate(batch_iter(pr...
Train all ensemble members for one epoch.
reward_predictor.py
train
unghee/learning-from-human-preferences
189
python
def train(self, prefs_train, prefs_val, val_interval): '\n \n ' print(('Training/testing with %d/%d preferences' % (len(prefs_train), len(prefs_val)))) start_steps = self.n_steps start_time = time.time() for (_, batch) in enumerate(batch_iter(prefs_train.prefs, batch_size=32, shuffle=T...
def train(self, prefs_train, prefs_val, val_interval): '\n \n ' print(('Training/testing with %d/%d preferences' % (len(prefs_train), len(prefs_val)))) start_steps = self.n_steps start_time = time.time() for (_, batch) in enumerate(batch_iter(prefs_train.prefs, batch_size=32, shuffle=T...
bf2b0de74a675b57961fc8afccc2c347c324e7c337fc19b24011972890ff8f9d
def correct_motion_on_peaks(peaks, peak_locations, times, motion, temporal_bins, spatial_bins, direction='y', progress_bar=False): '\n Given the output of estimate_motion(), apply inverse motion on peak location.\n\n Parameters\n ----------\n peaks: np.array\n peaks vector\n peak_locations: np...
Given the output of estimate_motion(), apply inverse motion on peak location. Parameters ---------- peaks: np.array peaks vector peak_locations: np.array peaks location vector times: np.array times vector of recording motion: np.array 2D motion.shape[0] equal temporal_bins.shape[0] motion.shape[1] ...
spikeinterface/sortingcomponents/motion_correction.py
correct_motion_on_peaks
tfoutz99/spikeinterface
0
python
def correct_motion_on_peaks(peaks, peak_locations, times, motion, temporal_bins, spatial_bins, direction='y', progress_bar=False): '\n Given the output of estimate_motion(), apply inverse motion on peak location.\n\n Parameters\n ----------\n peaks: np.array\n peaks vector\n peak_locations: np...
def correct_motion_on_peaks(peaks, peak_locations, times, motion, temporal_bins, spatial_bins, direction='y', progress_bar=False): '\n Given the output of estimate_motion(), apply inverse motion on peak location.\n\n Parameters\n ----------\n peaks: np.array\n peaks vector\n peak_locations: np...
af57c0112a4921c0fe747efb5c779aec6ca6c0135b4c6a81e2684c076e71c25e
def correct_motion_on_traces(traces, times, channel_locations, motion, temporal_bins, spatial_bins, direction=1): '\n Apply inverse motion with spatial interpolation on traces.\n\n Traces can be full traces, but also waveforms snippets.\n\n Parameters\n ----------\n traces : np.array\n Trace s...
Apply inverse motion with spatial interpolation on traces. Traces can be full traces, but also waveforms snippets. Parameters ---------- traces : np.array Trace snippet (num_samples, num_channels) channel_location: np.array 2d Channel location with shape (n, 2) or (n, 3) motion: np.array 2D motion.shape[0...
spikeinterface/sortingcomponents/motion_correction.py
correct_motion_on_traces
tfoutz99/spikeinterface
0
python
def correct_motion_on_traces(traces, times, channel_locations, motion, temporal_bins, spatial_bins, direction=1): '\n Apply inverse motion with spatial interpolation on traces.\n\n Traces can be full traces, but also waveforms snippets.\n\n Parameters\n ----------\n traces : np.array\n Trace s...
def correct_motion_on_traces(traces, times, channel_locations, motion, temporal_bins, spatial_bins, direction=1): '\n Apply inverse motion with spatial interpolation on traces.\n\n Traces can be full traces, but also waveforms snippets.\n\n Parameters\n ----------\n traces : np.array\n Trace s...
167f4b669611c5d325246c9ffa7235382722647d36941500f701cc717bb2c2a4
def channel_motions_over_time_OLD(times, channel_locations, motion, temporal_bins, spatial_bins, direction=1): '\n Interpolate the channel motion over time given motion matrix.\n\n Parameters\n ----------\n times: np.array 1d\n Times vector\n channel_location: np.array 2d\n Channel loca...
Interpolate the channel motion over time given motion matrix. Parameters ---------- times: np.array 1d Times vector channel_location: np.array 2d Channel location with shape (n, 2) or (n, 3) motion: np.array 2D motion.shape[0] equal temporal_bins.shape[0] motion.shape[1] equal 1 when "rigid" motion ...
spikeinterface/sortingcomponents/motion_correction.py
channel_motions_over_time_OLD
tfoutz99/spikeinterface
0
python
def channel_motions_over_time_OLD(times, channel_locations, motion, temporal_bins, spatial_bins, direction=1): '\n Interpolate the channel motion over time given motion matrix.\n\n Parameters\n ----------\n times: np.array 1d\n Times vector\n channel_location: np.array 2d\n Channel loca...
def channel_motions_over_time_OLD(times, channel_locations, motion, temporal_bins, spatial_bins, direction=1): '\n Interpolate the channel motion over time given motion matrix.\n\n Parameters\n ----------\n times: np.array 1d\n Times vector\n channel_location: np.array 2d\n Channel loca...
9cce05252e3f54af17465c0246accbeb0fa007bb45813e2ea6cd29296f619976
def correct_motion_on_traces_OLD(traces, times, channel_locations, motion, temporal_bins, spatial_bins, direction=1): '\n Apply inverse motion with spatial interpolation on traces.\n\n Traces can be full traces, but also waveforms snippets.\n\n Parameters\n ----------\n traces : np.array\n Tra...
Apply inverse motion with spatial interpolation on traces. Traces can be full traces, but also waveforms snippets. Parameters ---------- traces : np.array Trace snippet (num_samples, num_channels) channel_location: np.array 2d Channel location with shape (n, 2) or (n, 3) motion: np.array 2D motion.shape[0...
spikeinterface/sortingcomponents/motion_correction.py
correct_motion_on_traces_OLD
tfoutz99/spikeinterface
0
python
def correct_motion_on_traces_OLD(traces, times, channel_locations, motion, temporal_bins, spatial_bins, direction=1): '\n Apply inverse motion with spatial interpolation on traces.\n\n Traces can be full traces, but also waveforms snippets.\n\n Parameters\n ----------\n traces : np.array\n Tra...
def correct_motion_on_traces_OLD(traces, times, channel_locations, motion, temporal_bins, spatial_bins, direction=1): '\n Apply inverse motion with spatial interpolation on traces.\n\n Traces can be full traces, but also waveforms snippets.\n\n Parameters\n ----------\n traces : np.array\n Tra...
b7bbff2155fbb1257f8c1753a6904144061ca89d79cd0a73e479af8b8f470518
@abc.abstractmethod def prepare_port_filter(self, port): 'Prepare filters for the port.\n\n This method should be called before the port is created.\n '
Prepare filters for the port. This method should be called before the port is created.
neutron/agent/firewall.py
prepare_port_filter
tankertyp/openstack-neutron
0
python
@abc.abstractmethod def prepare_port_filter(self, port): 'Prepare filters for the port.\n\n This method should be called before the port is created.\n '
@abc.abstractmethod def prepare_port_filter(self, port): 'Prepare filters for the port.\n\n This method should be called before the port is created.\n '<|docstring|>Prepare filters for the port. This method should be called before the port is created.<|endoftext|>
8eaf5df6b95a48eda951a8445e46c01d58d52ae05f6367e60685b04cd6547143
def apply_port_filter(self, port): "Apply port filter.\n\n Once this method returns, the port should be firewalled\n appropriately. This method should as far as possible be a\n no-op. It's vastly preferred to get everything set up in\n prepare_port_filter.\n " raise NotImpleme...
Apply port filter. Once this method returns, the port should be firewalled appropriately. This method should as far as possible be a no-op. It's vastly preferred to get everything set up in prepare_port_filter.
neutron/agent/firewall.py
apply_port_filter
tankertyp/openstack-neutron
0
python
def apply_port_filter(self, port): "Apply port filter.\n\n Once this method returns, the port should be firewalled\n appropriately. This method should as far as possible be a\n no-op. It's vastly preferred to get everything set up in\n prepare_port_filter.\n " raise NotImpleme...
def apply_port_filter(self, port): "Apply port filter.\n\n Once this method returns, the port should be firewalled\n appropriately. This method should as far as possible be a\n no-op. It's vastly preferred to get everything set up in\n prepare_port_filter.\n " raise NotImpleme...
744673d3916edd994d08362fcf44ec8358ae33e258dcb503886f714fcb9bfdf2
@abc.abstractmethod def update_port_filter(self, port): 'Refresh security group rules from data store\n\n Gets called when a port gets added to or removed from\n the security group the port is a member of or if the\n group gains or looses a rule.\n '
Refresh security group rules from data store Gets called when a port gets added to or removed from the security group the port is a member of or if the group gains or looses a rule.
neutron/agent/firewall.py
update_port_filter
tankertyp/openstack-neutron
0
python
@abc.abstractmethod def update_port_filter(self, port): 'Refresh security group rules from data store\n\n Gets called when a port gets added to or removed from\n the security group the port is a member of or if the\n group gains or looses a rule.\n '
@abc.abstractmethod def update_port_filter(self, port): 'Refresh security group rules from data store\n\n Gets called when a port gets added to or removed from\n the security group the port is a member of or if the\n group gains or looses a rule.\n '<|docstring|>Refresh security group ru...
4e207ee5dae87040b78974a4cd4cda7710424de98fbdd9071c6cfddbdc503ae5
def remove_port_filter(self, port): 'Stop filtering port.' raise NotImplementedError()
Stop filtering port.
neutron/agent/firewall.py
remove_port_filter
tankertyp/openstack-neutron
0
python
def remove_port_filter(self, port): raise NotImplementedError()
def remove_port_filter(self, port): raise NotImplementedError()<|docstring|>Stop filtering port.<|endoftext|>
6c1bfeddec8c8f80cdeb6a75bad4ea09dbd950b6c1d70925075c1c9451a823b5
def filter_defer_apply_on(self): 'Defer application of filtering rule.' pass
Defer application of filtering rule.
neutron/agent/firewall.py
filter_defer_apply_on
tankertyp/openstack-neutron
0
python
def filter_defer_apply_on(self): pass
def filter_defer_apply_on(self): pass<|docstring|>Defer application of filtering rule.<|endoftext|>
9da369fbd00abc2feec49fae9516b6240d648f09ffc82c87c9ae8a49a033ed4e
def filter_defer_apply_off(self): 'Turn off deferral of rules and apply the rules now.' pass
Turn off deferral of rules and apply the rules now.
neutron/agent/firewall.py
filter_defer_apply_off
tankertyp/openstack-neutron
0
python
def filter_defer_apply_off(self): pass
def filter_defer_apply_off(self): pass<|docstring|>Turn off deferral of rules and apply the rules now.<|endoftext|>
e1dc9b55e4e99b8d1b10d3bbdb1b73eb02cd907bd6ad5baae1509e91122f7a47
@property def ports(self): 'Returns filtered ports.' pass
Returns filtered ports.
neutron/agent/firewall.py
ports
tankertyp/openstack-neutron
0
python
@property def ports(self): pass
@property def ports(self): pass<|docstring|>Returns filtered ports.<|endoftext|>
b5f64e470ad20b705c68c9254a8824d9dce7b0f0be3686d4aa865d5dde558d96
@contextlib.contextmanager def defer_apply(self): 'Defer apply context.' self.filter_defer_apply_on() try: (yield) finally: self.filter_defer_apply_off()
Defer apply context.
neutron/agent/firewall.py
defer_apply
tankertyp/openstack-neutron
0
python
@contextlib.contextmanager def defer_apply(self): self.filter_defer_apply_on() try: (yield) finally: self.filter_defer_apply_off()
@contextlib.contextmanager def defer_apply(self): self.filter_defer_apply_on() try: (yield) finally: self.filter_defer_apply_off()<|docstring|>Defer apply context.<|endoftext|>
6a87609fb74bfab580d4c057e4a6ddfce36be52d007eaff2b7714dba8b91b9fe
def update_security_group_members(self, sg_id, ips): 'Update group members in a security group.' raise NotImplementedError()
Update group members in a security group.
neutron/agent/firewall.py
update_security_group_members
tankertyp/openstack-neutron
0
python
def update_security_group_members(self, sg_id, ips): raise NotImplementedError()
def update_security_group_members(self, sg_id, ips): raise NotImplementedError()<|docstring|>Update group members in a security group.<|endoftext|>
1ccc06a3d66487e65402626cd2aee141dab35153f6bcfb045ae07de3da286048
def update_security_group_rules(self, sg_id, rules): 'Update rules in a security group.' raise NotImplementedError()
Update rules in a security group.
neutron/agent/firewall.py
update_security_group_rules
tankertyp/openstack-neutron
0
python
def update_security_group_rules(self, sg_id, rules): raise NotImplementedError()
def update_security_group_rules(self, sg_id, rules): raise NotImplementedError()<|docstring|>Update rules in a security group.<|endoftext|>
66d77543efb136ebe2d606a6e3bd85a85b1a865a297dd70f575028d768533807
def security_group_updated(self, action_type, sec_group_ids, device_id=None): 'Called when a security group is updated.\n\n Note: This method needs to be implemented by the firewall drivers\n which use enhanced RPC for security_groups.\n ' raise NotImplementedError()
Called when a security group is updated. Note: This method needs to be implemented by the firewall drivers which use enhanced RPC for security_groups.
neutron/agent/firewall.py
security_group_updated
tankertyp/openstack-neutron
0
python
def security_group_updated(self, action_type, sec_group_ids, device_id=None): 'Called when a security group is updated.\n\n Note: This method needs to be implemented by the firewall drivers\n which use enhanced RPC for security_groups.\n ' raise NotImplementedError()
def security_group_updated(self, action_type, sec_group_ids, device_id=None): 'Called when a security group is updated.\n\n Note: This method needs to be implemented by the firewall drivers\n which use enhanced RPC for security_groups.\n ' raise NotImplementedError()<|docstring|>Called when...
aafcbf16670e0ba1234a198ead48b91f5399c266709aa03472bdad4dcda6457d
def process_trusted_ports(self, port_ids): "Process ports that are trusted and shouldn't be filtered." pass
Process ports that are trusted and shouldn't be filtered.
neutron/agent/firewall.py
process_trusted_ports
tankertyp/openstack-neutron
0
python
def process_trusted_ports(self, port_ids): pass
def process_trusted_ports(self, port_ids): pass<|docstring|>Process ports that are trusted and shouldn't be filtered.<|endoftext|>
f380e52b722a1649ec55130e825b099d099069d8fee9b4e294cc9e23ff54ca64
def setup_multicast_traffic(self, phy_br_ofports, tun_br_ofports, enable_tunneling): 'Setup filters for multicast traffic' pass
Setup filters for multicast traffic
neutron/agent/firewall.py
setup_multicast_traffic
tankertyp/openstack-neutron
0
python
def setup_multicast_traffic(self, phy_br_ofports, tun_br_ofports, enable_tunneling): pass
def setup_multicast_traffic(self, phy_br_ofports, tun_br_ofports, enable_tunneling): pass<|docstring|>Setup filters for multicast traffic<|endoftext|>
a4b09c15b1031b7ff3d509e4dfe6819224669fd827e37f4d0b9c1ba630e98fbb
def averaging(self, properties, combinations={}, **constants): '\n Calls :func:`~sample.averaging` for all samples in the list.\n\n Parameters\n ----------\n : Same as in :func:`sample.averaging`.\n\n Returns\n -------\n pandas.DataFrame\n A da...
Calls :func:`~sample.averaging` for all samples in the list. Parameters ---------- : Same as in :func:`sample.averaging`. Returns ------- pandas.DataFrame A data frame containing the computed averages and combinations, as well as their estimated standard errors, for all samples.
src/mics/pooledsamples.py
averaging
craabreu/MICS
4
python
def averaging(self, properties, combinations={}, **constants): '\n Calls :func:`~sample.averaging` for all samples in the list.\n\n Parameters\n ----------\n : Same as in :func:`sample.averaging`.\n\n Returns\n -------\n pandas.DataFrame\n A da...
def averaging(self, properties, combinations={}, **constants): '\n Calls :func:`~sample.averaging` for all samples in the list.\n\n Parameters\n ----------\n : Same as in :func:`sample.averaging`.\n\n Returns\n -------\n pandas.DataFrame\n A da...
b3049db7d8aa5330559f8200c283fcf9df3de041b2d24d2f365fdfa232b6b90a
def mixture(self, engine): '\n Generates a :class:`mixture` object.\n\n Parameters\n ----------\n engine: :class:`MICS` or :class:`MBAR`\n\n Returns\n -------\n :class:`mixture`\n\n ' return mics.mixture(self, engine)
Generates a :class:`mixture` object. Parameters ---------- engine: :class:`MICS` or :class:`MBAR` Returns ------- :class:`mixture`
src/mics/pooledsamples.py
mixture
craabreu/MICS
4
python
def mixture(self, engine): '\n Generates a :class:`mixture` object.\n\n Parameters\n ----------\n engine: :class:`MICS` or :class:`MBAR`\n\n Returns\n -------\n :class:`mixture`\n\n ' return mics.mixture(self, engine)
def mixture(self, engine): '\n Generates a :class:`mixture` object.\n\n Parameters\n ----------\n engine: :class:`MICS` or :class:`MBAR`\n\n Returns\n -------\n :class:`mixture`\n\n ' return mics.mixture(self, engine)<|docstring|>Generates a :class...
cffb6a4489e78e649c5b80edebcefe194201271f27b359724437b5347a6ef5ee
def subsampling(self, integratedACF=True): '\n Calls :func:`~sample.subsampling` for all samples in the list.\n\n Parameters\n ----------\n : Same as in :func:`sample.subsampling`.\n\n Returns\n -------\n :class:`pooledsample`\n Although the su...
Calls :func:`~sample.subsampling` for all samples in the list. Parameters ---------- : Same as in :func:`sample.subsampling`. Returns ------- :class:`pooledsample` Although the subsampling is done in line, the new pooled sample is returned for chaining purposes.
src/mics/pooledsamples.py
subsampling
craabreu/MICS
4
python
def subsampling(self, integratedACF=True): '\n Calls :func:`~sample.subsampling` for all samples in the list.\n\n Parameters\n ----------\n : Same as in :func:`sample.subsampling`.\n\n Returns\n -------\n :class:`pooledsample`\n Although the su...
def subsampling(self, integratedACF=True): '\n Calls :func:`~sample.subsampling` for all samples in the list.\n\n Parameters\n ----------\n : Same as in :func:`sample.subsampling`.\n\n Returns\n -------\n :class:`pooledsample`\n Although the su...
2b3c8ff832ae8ba7e1b7beb63f7ae3f68a3f033e103f31decf09e5ed0c19de62
def show_2dboxes(im, bdbs, color_list=[], random_color=True, scale=1.0): "\n Visualize the bounding boxes with the image\n\n Parameters\n ----------\n im : numpy array (W, H, 3)\n bdbs : list of dicts\n Keys: {'x1', 'y1', 'x2', 'y2', 'classname'}\n The (x1, y1) posi...
Visualize the bounding boxes with the image Parameters ---------- im : numpy array (W, H, 3) bdbs : list of dicts Keys: {'x1', 'y1', 'x2', 'y2', 'classname'} The (x1, y1) position is at the top left corner, the (x2, y2) position is at the bottom right corner color_list: list of colors
utils/vis_utils.py
show_2dboxes
Jerrypiglet/cooperative_scene_parsing
2
python
def show_2dboxes(im, bdbs, color_list=[], random_color=True, scale=1.0): "\n Visualize the bounding boxes with the image\n\n Parameters\n ----------\n im : numpy array (W, H, 3)\n bdbs : list of dicts\n Keys: {'x1', 'y1', 'x2', 'y2', 'classname'}\n The (x1, y1) posi...
def show_2dboxes(im, bdbs, color_list=[], random_color=True, scale=1.0): "\n Visualize the bounding boxes with the image\n\n Parameters\n ----------\n im : numpy array (W, H, 3)\n bdbs : list of dicts\n Keys: {'x1', 'y1', 'x2', 'y2', 'classname'}\n The (x1, y1) posi...
3b6c299f0462f4bd150fb2c9556eda23f754c8640eb274c89ed75528b0ce3d28
def show_3d_box(boxes): '\n :param box: 8 x 3 numpy array\n ' fig = plt.figure() ax = Axes3D(fig) for box in boxes: plot_cuboid(ax, box[0], box[1], box[2], box[3], box[4], box[5], box[6], box[7], 'r-') plt.show()
:param box: 8 x 3 numpy array
utils/vis_utils.py
show_3d_box
Jerrypiglet/cooperative_scene_parsing
2
python
def show_3d_box(boxes): '\n \n ' fig = plt.figure() ax = Axes3D(fig) for box in boxes: plot_cuboid(ax, box[0], box[1], box[2], box[3], box[4], box[5], box[6], box[7], 'r-') plt.show()
def show_3d_box(boxes): '\n \n ' fig = plt.figure() ax = Axes3D(fig) for box in boxes: plot_cuboid(ax, box[0], box[1], box[2], box[3], box[4], box[5], box[6], box[7], 'r-') plt.show()<|docstring|>:param box: 8 x 3 numpy array<|endoftext|>
e15f17fd5590325180b5b876fa31a0c2c6c04b97d4c27f870cc22bb962ef92cb
@staticmethod def buildTargetsFromArgs(urls: List[str], method: Union[(str, List[str])], body: str) -> List[dict]: 'Build the targets from arguments\n\n @type urls: List[str]\n @param urls: The target URLs\n @type method: str | List[str]\n @param method: The request methods\n @typ...
Build the targets from arguments @type urls: List[str] @param urls: The target URLs @type method: str | List[str] @param method: The request methods @type body: str @param body: The raw request body data @returns dict: The targets data builded into a dictionary
src/fuzzingtool/interfaces/ArgumentBuilder.py
buildTargetsFromArgs
NESCAU-UFLA/FuzzingTool
131
python
@staticmethod def buildTargetsFromArgs(urls: List[str], method: Union[(str, List[str])], body: str) -> List[dict]: 'Build the targets from arguments\n\n @type urls: List[str]\n @param urls: The target URLs\n @type method: str | List[str]\n @param method: The request methods\n @typ...
@staticmethod def buildTargetsFromArgs(urls: List[str], method: Union[(str, List[str])], body: str) -> List[dict]: 'Build the targets from arguments\n\n @type urls: List[str]\n @param urls: The target URLs\n @type method: str | List[str]\n @param method: The request methods\n @typ...
22f9e473ee695c9693c69697fc1375a5f0c60a27b707d434ff57acc93edcbae2
@staticmethod def buildTargetsFromRawHttp(rawHttpFilenames: List[str], scheme: str) -> List[dict]: 'Build the targets from raw http files\n\n @type rawHttpFilenames: list\n @param rawHttpFilenames: The list with the raw http filenames\n @type scheme: str\n @param scheme: The scheme used ...
Build the targets from raw http files @type rawHttpFilenames: list @param rawHttpFilenames: The list with the raw http filenames @type scheme: str @param scheme: The scheme used in the URL @returns List[dict]: The targets data builded into a list of dictionary
src/fuzzingtool/interfaces/ArgumentBuilder.py
buildTargetsFromRawHttp
NESCAU-UFLA/FuzzingTool
131
python
@staticmethod def buildTargetsFromRawHttp(rawHttpFilenames: List[str], scheme: str) -> List[dict]: 'Build the targets from raw http files\n\n @type rawHttpFilenames: list\n @param rawHttpFilenames: The list with the raw http filenames\n @type scheme: str\n @param scheme: The scheme used ...
@staticmethod def buildTargetsFromRawHttp(rawHttpFilenames: List[str], scheme: str) -> List[dict]: 'Build the targets from raw http files\n\n @type rawHttpFilenames: list\n @param rawHttpFilenames: The list with the raw http filenames\n @type scheme: str\n @param scheme: The scheme used ...
c7c9994d1e6af688ef2a84f79d2e4be3729f8f683b1d4f77ea430bdb2a1ee567
def buildHeaderFromRawHttp(headerList: List[deque]) -> Dict[(str, str)]: 'Get the HTTP header\n\n @tyoe headerList: List[deque]\n @param headerList: The list with HTTP header\n @returns Dict[str, str]: The HTTP header parsed into a dict\n ' headers = {} i = 0 ...
Get the HTTP header @tyoe headerList: List[deque] @param headerList: The list with HTTP header @returns Dict[str, str]: The HTTP header parsed into a dict
src/fuzzingtool/interfaces/ArgumentBuilder.py
buildHeaderFromRawHttp
NESCAU-UFLA/FuzzingTool
131
python
def buildHeaderFromRawHttp(headerList: List[deque]) -> Dict[(str, str)]: 'Get the HTTP header\n\n @tyoe headerList: List[deque]\n @param headerList: The list with HTTP header\n @returns Dict[str, str]: The HTTP header parsed into a dict\n ' headers = {} i = 0 ...
def buildHeaderFromRawHttp(headerList: List[deque]) -> Dict[(str, str)]: 'Get the HTTP header\n\n @tyoe headerList: List[deque]\n @param headerList: The list with HTTP header\n @returns Dict[str, str]: The HTTP header parsed into a dict\n ' headers = {} i = 0 ...
64c9e6adbb9fbc95d66df01fc786e8bac2eb3ac56af0728032fb1d4694006b4f
def annotation(self, xdata: InstrXData) -> str: 'data format a:vxa\n\n vars[0]: lhs\n xprs[0]: rhs\n xprs[1]: address of memory location\n ' lhs = str(xdata.vars[0]) rhs = str(xdata.xprs[0]) if ((lhs == '?') and (len(xdata.xprs) == 2)): lhs = derefstr(xdata.xprs[1]) ...
data format a:vxa vars[0]: lhs xprs[0]: rhs xprs[1]: address of memory location
chb/mips/opcodes/MIPSStoreDoubleWordFromFP.py
annotation
sipma/CodeHawk-Binary
0
python
def annotation(self, xdata: InstrXData) -> str: 'data format a:vxa\n\n vars[0]: lhs\n xprs[0]: rhs\n xprs[1]: address of memory location\n ' lhs = str(xdata.vars[0]) rhs = str(xdata.xprs[0]) if ((lhs == '?') and (len(xdata.xprs) == 2)): lhs = derefstr(xdata.xprs[1]) ...
def annotation(self, xdata: InstrXData) -> str: 'data format a:vxa\n\n vars[0]: lhs\n xprs[0]: rhs\n xprs[1]: address of memory location\n ' lhs = str(xdata.vars[0]) rhs = str(xdata.xprs[0]) if ((lhs == '?') and (len(xdata.xprs) == 2)): lhs = derefstr(xdata.xprs[1]) ...
5ff789409112166206184508d623ca801a1054cf8723589cfc1d8b759c733c3d
def __init__(self, userdata=None): '\n Store userdata\n\n :param userdata: Userdata file to be sent to AWS instances\n :type userdata: str, list, optional\n\n :return: A new UserdataCreator instance\n :rtype: UserdataCreator\n ' if (userdata is None): userdata =...
Store userdata :param userdata: Userdata file to be sent to AWS instances :type userdata: str, list, optional :return: A new UserdataCreator instance :rtype: UserdataCreator
ci/awsPseudoCi/userdata_creator.py
__init__
mikkowus/BESSPIN-Tool-Suite
0
python
def __init__(self, userdata=None): '\n Store userdata\n\n :param userdata: Userdata file to be sent to AWS instances\n :type userdata: str, list, optional\n\n :return: A new UserdataCreator instance\n :rtype: UserdataCreator\n ' if (userdata is None): userdata =...
def __init__(self, userdata=None): '\n Store userdata\n\n :param userdata: Userdata file to be sent to AWS instances\n :type userdata: str, list, optional\n\n :return: A new UserdataCreator instance\n :rtype: UserdataCreator\n ' if (userdata is None): userdata =...
c23c336e4dcdaa75cc6f88a4755345fda9cc8d170728801ccf68716c82b283db
@classmethod @log_assertion_fails @debug_wrap def default(cls, credentials, name, index, branch=None, binaries_branch=None, key_path='~/.ssh/id_rsa', runMode='fett'): "\n Add userdata to start with BESSPIN at specific branch and binaries branch\n\n :param credentials: AWS credentials.\n :type c...
Add userdata to start with BESSPIN at specific branch and binaries branch :param credentials: AWS credentials. :type credentials: AWSCredentials :param name: Job name :type name: str :param index: BESSPIN index :type index: int :param branch: What branch of BESSPIN-Tool-Suite to run on AWS instances, defaults to 'm...
ci/awsPseudoCi/userdata_creator.py
default
mikkowus/BESSPIN-Tool-Suite
0
python
@classmethod @log_assertion_fails @debug_wrap def default(cls, credentials, name, index, branch=None, binaries_branch=None, key_path='~/.ssh/id_rsa', runMode='fett'): "\n Add userdata to start with BESSPIN at specific branch and binaries branch\n\n :param credentials: AWS credentials.\n :type c...
@classmethod @log_assertion_fails @debug_wrap def default(cls, credentials, name, index, branch=None, binaries_branch=None, key_path='~/.ssh/id_rsa', runMode='fett'): "\n Add userdata to start with BESSPIN at specific branch and binaries branch\n\n :param credentials: AWS credentials.\n :type c...
51caeaa149a3c9ad63e15e24b26ddf228a7174b6d171720345be566d2e767c88
@debug_wrap def append(self, ul=''): "\n Convenience to append to self._userdata\n\n :param ul: Script to append to userdata, defaults to ''\n :type ul: str, list, optional\n " if (not isinstance(ul, str)): self._userdata += ul else: self._userdata.append(ul)
Convenience to append to self._userdata :param ul: Script to append to userdata, defaults to '' :type ul: str, list, optional
ci/awsPseudoCi/userdata_creator.py
append
mikkowus/BESSPIN-Tool-Suite
0
python
@debug_wrap def append(self, ul=): "\n Convenience to append to self._userdata\n\n :param ul: Script to append to userdata, defaults to \n :type ul: str, list, optional\n " if (not isinstance(ul, str)): self._userdata += ul else: self._userdata.append(ul)
@debug_wrap def append(self, ul=): "\n Convenience to append to self._userdata\n\n :param ul: Script to append to userdata, defaults to \n :type ul: str, list, optional\n " if (not isinstance(ul, str)): self._userdata += ul else: self._userdata.append(ul)<|docstri...
0d0eacd9f8b2ac34dcf3591899d9ecd47c4e23acf7526efe5fef2b810fb7b263
@debug_wrap @log_assertion_fails def append_file(self, dest, path): '\n Add file contents of path to userdata\n\n :param dest: Destination of file contents\n :type dest: str\n\n :param path: Filepath\n :type path: str\n ' assert os.path.exists(path) self.append(f'ca...
Add file contents of path to userdata :param dest: Destination of file contents :type dest: str :param path: Filepath :type path: str
ci/awsPseudoCi/userdata_creator.py
append_file
mikkowus/BESSPIN-Tool-Suite
0
python
@debug_wrap @log_assertion_fails def append_file(self, dest, path): '\n Add file contents of path to userdata\n\n :param dest: Destination of file contents\n :type dest: str\n\n :param path: Filepath\n :type path: str\n ' assert os.path.exists(path) self.append(f'ca...
@debug_wrap @log_assertion_fails def append_file(self, dest, path): '\n Add file contents of path to userdata\n\n :param dest: Destination of file contents\n :type dest: str\n\n :param path: Filepath\n :type path: str\n ' assert os.path.exists(path) self.append(f'ca...
e98f6ae6464572a7184c01e7d584a106b7f072d5eea56bcaf00d404ba36957e9
@debug_wrap def to_file(self, fname): '\n Write userdata to a userdata file\n\n :param fname: Filename\n :type fname: str\n ' with open(fname, 'w') as fp: ud = [f"runuser -l centos -c 'touch {self.indicator_filepath()}'"] fp.write('\n'.join(ud)) log.info(f"Userdat...
Write userdata to a userdata file :param fname: Filename :type fname: str
ci/awsPseudoCi/userdata_creator.py
to_file
mikkowus/BESSPIN-Tool-Suite
0
python
@debug_wrap def to_file(self, fname): '\n Write userdata to a userdata file\n\n :param fname: Filename\n :type fname: str\n ' with open(fname, 'w') as fp: ud = [f"runuser -l centos -c 'touch {self.indicator_filepath()}'"] fp.write('\n'.join(ud)) log.info(f"Userdat...
@debug_wrap def to_file(self, fname): '\n Write userdata to a userdata file\n\n :param fname: Filename\n :type fname: str\n ' with open(fname, 'w') as fp: ud = [f"runuser -l centos -c 'touch {self.indicator_filepath()}'"] fp.write('\n'.join(ud)) log.info(f"Userdat...
6f829df46b4d738f0fc30865d25b970a8aed7dc0c1a3ebfd8b5cf1de1079afd6
@property def userdata(self): '\n Userdata getter\n\n :return: Userdata\n :rtype: str\n ' return '\n'.join(self._userdata)
Userdata getter :return: Userdata :rtype: str
ci/awsPseudoCi/userdata_creator.py
userdata
mikkowus/BESSPIN-Tool-Suite
0
python
@property def userdata(self): '\n Userdata getter\n\n :return: Userdata\n :rtype: str\n ' return '\n'.join(self._userdata)
@property def userdata(self): '\n Userdata getter\n\n :return: Userdata\n :rtype: str\n ' return '\n'.join(self._userdata)<|docstring|>Userdata getter :return: Userdata :rtype: str<|endoftext|>
05b38efc04c87a6abbc340c57ba4203742ab8322203f91b925c0395de50df8d1
def iuwt_decomposition(in1, scale_count, scale_adjust=0, mode='ser', core_count=2, store_smoothed=False): "\n This function serves as a handler for the different implementations of the IUWT decomposition. It allows the\n different methods to be used almost interchangeably.\n\n INPUTS:\n in1 ...
This function serves as a handler for the different implementations of the IUWT decomposition. It allows the different methods to be used almost interchangeably. INPUTS: in1 (no default): Array on which the decomposition is to be performed. scale_count (no default): Maximum scale to...
vip_hci/exlib/iuwt.py
iuwt_decomposition
ChrisDelaX/VIP
2
python
def iuwt_decomposition(in1, scale_count, scale_adjust=0, mode='ser', core_count=2, store_smoothed=False): "\n This function serves as a handler for the different implementations of the IUWT decomposition. It allows the\n different methods to be used almost interchangeably.\n\n INPUTS:\n in1 ...
def iuwt_decomposition(in1, scale_count, scale_adjust=0, mode='ser', core_count=2, store_smoothed=False): "\n This function serves as a handler for the different implementations of the IUWT decomposition. It allows the\n different methods to be used almost interchangeably.\n\n INPUTS:\n in1 ...
60c9d3c4668ea6a8aeca6272f5730b8bffd28fe04c7e6b48e1d633797d6d5d0f
def iuwt_recomposition(in1, scale_adjust=0, mode='ser', core_count=1, store_on_gpu=False, smoothed_array=None): "\n This function serves as a handler for the different implementations of the IUWT recomposition. It allows the\n different methods to be used almost interchangeably.\n\n INPUTS:\n in1 ...
This function serves as a handler for the different implementations of the IUWT recomposition. It allows the different methods to be used almost interchangeably. INPUTS: in1 (no default): Array on which the decomposition is to be performed. scale_adjust (no default): Number of omitte...
vip_hci/exlib/iuwt.py
iuwt_recomposition
ChrisDelaX/VIP
2
python
def iuwt_recomposition(in1, scale_adjust=0, mode='ser', core_count=1, store_on_gpu=False, smoothed_array=None): "\n This function serves as a handler for the different implementations of the IUWT recomposition. It allows the\n different methods to be used almost interchangeably.\n\n INPUTS:\n in1 ...
def iuwt_recomposition(in1, scale_adjust=0, mode='ser', core_count=1, store_on_gpu=False, smoothed_array=None): "\n This function serves as a handler for the different implementations of the IUWT recomposition. It allows the\n different methods to be used almost interchangeably.\n\n INPUTS:\n in1 ...
6687a8f6a8bcb4f2b71ac6272b513f2eabe8e3952e94995a5112b121a96dd45a
def ser_iuwt_decomposition(in1, scale_count, scale_adjust, store_smoothed): '\n This function calls the a trous algorithm code to decompose the input into its wavelet coefficients. This is\n the isotropic undecimated wavelet transform implemented for a single CPU core.\n\n INPUTS:\n in1 ...
This function calls the a trous algorithm code to decompose the input into its wavelet coefficients. This is the isotropic undecimated wavelet transform implemented for a single CPU core. INPUTS: in1 (no default): Array on which the decomposition is to be performed. scale_count (no default): ...
vip_hci/exlib/iuwt.py
ser_iuwt_decomposition
ChrisDelaX/VIP
2
python
def ser_iuwt_decomposition(in1, scale_count, scale_adjust, store_smoothed): '\n This function calls the a trous algorithm code to decompose the input into its wavelet coefficients. This is\n the isotropic undecimated wavelet transform implemented for a single CPU core.\n\n INPUTS:\n in1 ...
def ser_iuwt_decomposition(in1, scale_count, scale_adjust, store_smoothed): '\n This function calls the a trous algorithm code to decompose the input into its wavelet coefficients. This is\n the isotropic undecimated wavelet transform implemented for a single CPU core.\n\n INPUTS:\n in1 ...
ac784d662475f6226a5d77540db3ddffa23485e8884b952d66f903873ebc4c45
def ser_iuwt_recomposition(in1, scale_adjust, smoothed_array): '\n This function calls the a trous algorithm code to recompose the input into a single array. This is the\n implementation of the isotropic undecimated wavelet transform recomposition for a single CPU core.\n\n INPUTS:\n in1 (no...
This function calls the a trous algorithm code to recompose the input into a single array. This is the implementation of the isotropic undecimated wavelet transform recomposition for a single CPU core. INPUTS: in1 (no default): Array containing wavelet coefficients. scale_adjust (no default): Indica...
vip_hci/exlib/iuwt.py
ser_iuwt_recomposition
ChrisDelaX/VIP
2
python
def ser_iuwt_recomposition(in1, scale_adjust, smoothed_array): '\n This function calls the a trous algorithm code to recompose the input into a single array. This is the\n implementation of the isotropic undecimated wavelet transform recomposition for a single CPU core.\n\n INPUTS:\n in1 (no...
def ser_iuwt_recomposition(in1, scale_adjust, smoothed_array): '\n This function calls the a trous algorithm code to recompose the input into a single array. This is the\n implementation of the isotropic undecimated wavelet transform recomposition for a single CPU core.\n\n INPUTS:\n in1 (no...
735ac0304cb9c82feb22c37085c8aae962a8803977bd930ccd026b0708960a77
def ser_a_trous(C0, filter, scale): '\n The following is a serial implementation of the a trous algorithm. Accepts the following parameters:\n\n INPUTS:\n filter (no default): The filter-bank which is applied to the components of the transform.\n C0 (no default): The current array on w...
The following is a serial implementation of the a trous algorithm. Accepts the following parameters: INPUTS: filter (no default): The filter-bank which is applied to the components of the transform. C0 (no default): The current array on which filtering is to be performed. scale (no default): ...
vip_hci/exlib/iuwt.py
ser_a_trous
ChrisDelaX/VIP
2
python
def ser_a_trous(C0, filter, scale): '\n The following is a serial implementation of the a trous algorithm. Accepts the following parameters:\n\n INPUTS:\n filter (no default): The filter-bank which is applied to the components of the transform.\n C0 (no default): The current array on w...
def ser_a_trous(C0, filter, scale): '\n The following is a serial implementation of the a trous algorithm. Accepts the following parameters:\n\n INPUTS:\n filter (no default): The filter-bank which is applied to the components of the transform.\n C0 (no default): The current array on w...
562ca9e0e621ae38eb4275b11e5e09b3dc732a65ef9f755086771bc098023434
def mp_iuwt_decomposition(in1, scale_count, scale_adjust, store_smoothed, core_count): '\n This function calls the a trous algorithm code to decompose the input into its wavelet coefficients. This is\n the isotropic undecimated wavelet transform implemented for multiple CPU cores. NOTE: Python is not well sui...
This function calls the a trous algorithm code to decompose the input into its wavelet coefficients. This is the isotropic undecimated wavelet transform implemented for multiple CPU cores. NOTE: Python is not well suited to multiprocessing - this may not improve execution speed. INPUTS: in1 (no default...
vip_hci/exlib/iuwt.py
mp_iuwt_decomposition
ChrisDelaX/VIP
2
python
def mp_iuwt_decomposition(in1, scale_count, scale_adjust, store_smoothed, core_count): '\n This function calls the a trous algorithm code to decompose the input into its wavelet coefficients. This is\n the isotropic undecimated wavelet transform implemented for multiple CPU cores. NOTE: Python is not well sui...
def mp_iuwt_decomposition(in1, scale_count, scale_adjust, store_smoothed, core_count): '\n This function calls the a trous algorithm code to decompose the input into its wavelet coefficients. This is\n the isotropic undecimated wavelet transform implemented for multiple CPU cores. NOTE: Python is not well sui...
2ec56be4c4693695c7d2164a08c06bc28132d8c54662827e88f03633f4e7333b
def mp_iuwt_recomposition(in1, scale_adjust, core_count, smoothed_array): '\n This function calls the a trous algorithm code to recompose the input into a single array. This is the\n implementation of the isotropic undecimated wavelet transform recomposition for multiple CPU cores.\n\n INPUTS:\n in1 ...
This function calls the a trous algorithm code to recompose the input into a single array. This is the implementation of the isotropic undecimated wavelet transform recomposition for multiple CPU cores. INPUTS: in1 (no default): Array containing wavelet coefficients. scale_adjust (no default): Indic...
vip_hci/exlib/iuwt.py
mp_iuwt_recomposition
ChrisDelaX/VIP
2
python
def mp_iuwt_recomposition(in1, scale_adjust, core_count, smoothed_array): '\n This function calls the a trous algorithm code to recompose the input into a single array. This is the\n implementation of the isotropic undecimated wavelet transform recomposition for multiple CPU cores.\n\n INPUTS:\n in1 ...
def mp_iuwt_recomposition(in1, scale_adjust, core_count, smoothed_array): '\n This function calls the a trous algorithm code to recompose the input into a single array. This is the\n implementation of the isotropic undecimated wavelet transform recomposition for multiple CPU cores.\n\n INPUTS:\n in1 ...
e2b6e272346938dba12253f059b9fca0234e5a17770278949d209c880e3e7dcb
def mp_a_trous(C0, wavelet_filter, scale, core_count): '\n This is a reimplementation of the a trous filter which makes use of multiprocessing. In particular,\n it divides the input array of dimensions NxN into M smaller arrays of dimensions (N/M)xN, where M is the\n number of cores which are to be used.\n...
This is a reimplementation of the a trous filter which makes use of multiprocessing. In particular, it divides the input array of dimensions NxN into M smaller arrays of dimensions (N/M)xN, where M is the number of cores which are to be used. INPUTS: C0 (no default): The current array which is to be dec...
vip_hci/exlib/iuwt.py
mp_a_trous
ChrisDelaX/VIP
2
python
def mp_a_trous(C0, wavelet_filter, scale, core_count): '\n This is a reimplementation of the a trous filter which makes use of multiprocessing. In particular,\n it divides the input array of dimensions NxN into M smaller arrays of dimensions (N/M)xN, where M is the\n number of cores which are to be used.\n...
def mp_a_trous(C0, wavelet_filter, scale, core_count): '\n This is a reimplementation of the a trous filter which makes use of multiprocessing. In particular,\n it divides the input array of dimensions NxN into M smaller arrays of dimensions (N/M)xN, where M is the\n number of cores which are to be used.\n...
2b20851b145f4a373be3343ddf508b29509668e4df4f15ad47f52b8962068a2d
def mp_a_trous_kernel(C0, wavelet_filter, scale, slice_ind, slice_width, r_or_c='row'): '\n This is the convolution step of the a trous algorithm.\n\n INPUTS:\n C0 (no default): The current array which is to be decomposed.\n wavelet_filter (no default): The filter-bank which is...
This is the convolution step of the a trous algorithm. INPUTS: C0 (no default): The current array which is to be decomposed. wavelet_filter (no default): The filter-bank which is applied to the elements of the transform. scale (no default): The scale at which decomposition is ...
vip_hci/exlib/iuwt.py
mp_a_trous_kernel
ChrisDelaX/VIP
2
python
def mp_a_trous_kernel(C0, wavelet_filter, scale, slice_ind, slice_width, r_or_c='row'): '\n This is the convolution step of the a trous algorithm.\n\n INPUTS:\n C0 (no default): The current array which is to be decomposed.\n wavelet_filter (no default): The filter-bank which is...
def mp_a_trous_kernel(C0, wavelet_filter, scale, slice_ind, slice_width, r_or_c='row'): '\n This is the convolution step of the a trous algorithm.\n\n INPUTS:\n C0 (no default): The current array which is to be decomposed.\n wavelet_filter (no default): The filter-bank which is...
1f67bb4e9cd3bcfbcfa2e1e46a4fc950932e43ea6b31ad058be503b35092393f
def list_to_sql_string(lst: Tuple[str]) -> str: 'turns python lists into a string that can be put into a postgres tuple and serve as a list in postgres\n\n :param lst: a list of strings like ``[\'pg_catalog\',\'information_schema\']``\n\n :return: a string of items in SQL format ``"\'pg_catalog\',\'informatio...
turns python lists into a string that can be put into a postgres tuple and serve as a list in postgres :param lst: a list of strings like ``['pg_catalog','information_schema']`` :return: a string of items in SQL format ``"'pg_catalog','information_schema','hi'"``
plpy_wrapper/utilities.py
list_to_sql_string
skamensky/plpy-wrapper
5
python
def list_to_sql_string(lst: Tuple[str]) -> str: 'turns python lists into a string that can be put into a postgres tuple and serve as a list in postgres\n\n :param lst: a list of strings like ``[\'pg_catalog\',\'information_schema\']``\n\n :return: a string of items in SQL format ``"\'pg_catalog\',\'informatio...
def list_to_sql_string(lst: Tuple[str]) -> str: 'turns python lists into a string that can be put into a postgres tuple and serve as a list in postgres\n\n :param lst: a list of strings like ``[\'pg_catalog\',\'information_schema\']``\n\n :return: a string of items in SQL format ``"\'pg_catalog\',\'informatio...
8ad90e9e33145ac5310155e7a43cc7142a25a3e57c96658e8023af74faac1509
def make_qualified_schema_name(schema_name: str, table_name: str) -> str: 'produces a qualified schema name given a schema and table\n\n :param schema_name: the schema name\n :param table_name: the table name\n :return: a quoted dot separated qualified schema name\n ' return '"{s}"."{t}"'.format(s=s...
produces a qualified schema name given a schema and table :param schema_name: the schema name :param table_name: the table name :return: a quoted dot separated qualified schema name
plpy_wrapper/utilities.py
make_qualified_schema_name
skamensky/plpy-wrapper
5
python
def make_qualified_schema_name(schema_name: str, table_name: str) -> str: 'produces a qualified schema name given a schema and table\n\n :param schema_name: the schema name\n :param table_name: the table name\n :return: a quoted dot separated qualified schema name\n ' return '"{s}"."{t}"'.format(s=s...
def make_qualified_schema_name(schema_name: str, table_name: str) -> str: 'produces a qualified schema name given a schema and table\n\n :param schema_name: the schema name\n :param table_name: the table name\n :return: a quoted dot separated qualified schema name\n ' return '"{s}"."{t}"'.format(s=s...
8a44dc6080956053f842c1690066f525ea15c9b37d14bede246ad59893bd5b7a
def check_nth_arg_is_of_type(n: int, type_to_check: type): 'this decorator allows us to do some basic type checking\n\n :param n: the "nth" argument of the decorated function\n :param type_to_check: the type to ensure that the "nth" value is of\n :raises: :class:`plpy_wrapper.exceptions.TypeException`\n ...
this decorator allows us to do some basic type checking :param n: the "nth" argument of the decorated function :param type_to_check: the type to ensure that the "nth" value is of :raises: :class:`plpy_wrapper.exceptions.TypeException`
plpy_wrapper/utilities.py
check_nth_arg_is_of_type
skamensky/plpy-wrapper
5
python
def check_nth_arg_is_of_type(n: int, type_to_check: type): 'this decorator allows us to do some basic type checking\n\n :param n: the "nth" argument of the decorated function\n :param type_to_check: the type to ensure that the "nth" value is of\n :raises: :class:`plpy_wrapper.exceptions.TypeException`\n ...
def check_nth_arg_is_of_type(n: int, type_to_check: type): 'this decorator allows us to do some basic type checking\n\n :param n: the "nth" argument of the decorated function\n :param type_to_check: the type to ensure that the "nth" value is of\n :raises: :class:`plpy_wrapper.exceptions.TypeException`\n ...
5acf84b3f04f1b3868ad064579572a3d7a49f1dae88ec247aee4b839fb5ea8da
def create_plpython_triggers(plpy_wrapper: 'plpy_wrapper.PLPYWrapper', schema: str, table_name: str, trigger_template_path: Union[(str, Path, None)]=Path(Path(__file__).parent, 'trigger_process_template.txt'), trigger_func_definition: Union[(str, None)]='', trigger_func_name: Union[(str, None)]=''): '\n sets up ...
sets up triggers and the trigger function for a table. After running this function, triggers will now be routed to the custom function where you can run arbitrary python inside of the :class:`plpython.trigger.Trigger` methods. Should be executed from the DB like so:: do $$ import plpy_wrapper wrapper = plp...
plpy_wrapper/utilities.py
create_plpython_triggers
skamensky/plpy-wrapper
5
python
def create_plpython_triggers(plpy_wrapper: 'plpy_wrapper.PLPYWrapper', schema: str, table_name: str, trigger_template_path: Union[(str, Path, None)]=Path(Path(__file__).parent, 'trigger_process_template.txt'), trigger_func_definition: Union[(str, None)]=, trigger_func_name: Union[(str, None)]=): '\n sets up trig...
def create_plpython_triggers(plpy_wrapper: 'plpy_wrapper.PLPYWrapper', schema: str, table_name: str, trigger_template_path: Union[(str, Path, None)]=Path(Path(__file__).parent, 'trigger_process_template.txt'), trigger_func_definition: Union[(str, None)]=, trigger_func_name: Union[(str, None)]=): '\n sets up trig...
f2c6b88b4919b24e5cd2a43010745f134a4475c80956aa0bf3aa4ba1bbc3a341
def get_all_tables(plpy_wrapper: 'plpy_wrapper.PLPYWrapper', exclude_schemas: Tuple[str]=(), exclude_tables: Tuple[str]=()) -> 'plpy_wrapper.ResultSet': 'Queries postgres for all tables\n\n :param plpy_wrapper: PLPYWrapper instance\n :param exclude_schemas: schemas to exclude from the query\n :param exclud...
Queries postgres for all tables :param plpy_wrapper: PLPYWrapper instance :param exclude_schemas: schemas to exclude from the query :param exclude_tables: tables to exclude from the query :return:
plpy_wrapper/utilities.py
get_all_tables
skamensky/plpy-wrapper
5
python
def get_all_tables(plpy_wrapper: 'plpy_wrapper.PLPYWrapper', exclude_schemas: Tuple[str]=(), exclude_tables: Tuple[str]=()) -> 'plpy_wrapper.ResultSet': 'Queries postgres for all tables\n\n :param plpy_wrapper: PLPYWrapper instance\n :param exclude_schemas: schemas to exclude from the query\n :param exclud...
def get_all_tables(plpy_wrapper: 'plpy_wrapper.PLPYWrapper', exclude_schemas: Tuple[str]=(), exclude_tables: Tuple[str]=()) -> 'plpy_wrapper.ResultSet': 'Queries postgres for all tables\n\n :param plpy_wrapper: PLPYWrapper instance\n :param exclude_schemas: schemas to exclude from the query\n :param exclud...