code stringlengths 3 6.57k |
|---|
time.sleep(1) |
in (PB_Status.COMPLETED, PB_Status.NOT_SUPPORTED_VERSION) |
prints_manager.add_print_job(playbook_id + ' failed with error/s', print_warning, thread_index) |
prints_manager.add_print_job(playbook_id + ' failed with error/s', print_error, thread_index) |
time.time() |
prints_manager.add_print_job(playbook_id + ' failed on timeout', print_error, thread_index) |
prints_manager.add_print_job(loop_number_message, print, thread_index) |
__disable_integrations_instances(client, module_instances, prints_manager, thread_index=thread_index) |
options.get('memory_threshold', Docker.DEFAULT_CONTAINER_MEMORY_USAGE) |
options.get('pid_threshold', Docker.DEFAULT_CONTAINER_PIDS_USAGE) |
prints_manager.add_print_job(error_message, print_error, thread_index) |
prints_manager.add_print_job("Skipping docker container memory resource check for test {}".format(playbook_id) |
in (PB_Status.COMPLETED, PB_Status.NOT_SUPPORTED_VERSION) |
__delete_incident(client, incident, prints_manager, thread_index=thread_index) |
__delete_integrations_instances(client, module_instances, prints_manager, thread_index=thread_index) |
disable_all_integrations(demisto_api_key, server, prints_manager, thread_index=0) |
demisto_client.configure(base_url=server, api_key=demisto_api_key, verify_ssl=False) |
ast.literal_eval(int_resp[0]) |
format(conn_err) |
prints_manager.add_print_job(error_message, print_error, thread_index) |
int(int_resp[1]) |
format(int_resp[1]) |
prints_manager.add_print_job(error_message, print_error, thread_index) |
prints_manager.add_print_job("No integrations instances found to disable all", print, thread_index) |
instance.get('enabled') |
instance.get("isIntegrationScript") |
format(instance.get("name") |
instance.get("brand") |
prints_manager.add_print_job(add_to_disable_message, print, thread_index) |
to_disable.append(instance) |
len(to_disable) |
__disable_integrations_instances(client, to_disable, prints_manager, thread_index=thread_index) |
extensions (or modules to document with autodoc) |
sys.path.insert(0, os.path.abspath('.') |
Sphinx (named 'sphinx.ext.*') |
files (such as style sheets) |
setup(app) |
app.add_transform(AutoStructify) |
GearmanRequires(Endpoint) |
when('endpoint.{endpoint_name}.joined') |
joined(self) |
any(unit.received['port'] for unit in self.all_joined_units) |
set_flag(self.expand_name('available') |
when('endpoint.{endpoint_name}.changed') |
changed(self) |
any(unit.received['port'] for unit in self.all_joined_units) |
set_flag(self.expand_name('available') |
address(self) |
log("Unit: {}".format(unit.received) |
__init__(self) |
ReadLocationsFromCSV(self, csv_name, columns=["name", "region", "country", "gps_x", "gps_y", "location_type", "conflict_date", "pop/cap"]) |
range(0, len(columns) |
open(csv_name, newline='') |
csv.reader(csvfile) |
print(row) |
ReadLinksFromCSV(self, csv_name, name1_col=0, name2_col=1, dist_col=2) |
open(csv_name, newline='') |
csv.reader(csvfile) |
print(row) |
ReadClosuresFromCSV(self, csv_name) |
open(csv_name, newline='') |
csv.reader(csvfile) |
print(row) |
self.closures.append(row) |
StoreInputGeographyInEcosystem(self, e) |
len(l[1]) |
len(l[7]) |
print(l, file=sys.stderr) |
lower() |
int(l[5]) |
lower() |
if (len(l) |
int(l[3]) |
e.linkUp(l[0], l[1], int(l[2]) |
int(l[3]) |
e.linkUp(l[1], l[0], int(l[2]) |
e.linkUp(l[0], l[1], int(l[2]) |
e.linkUp(l[0], l[1], int(l[2]) |
e.closures.append([l[0], l[1], l[2], int(l[3]) |
int(l[4]) |
AddNewConflictZones(self, e, time) |
lower() |
int(l[5]) |
e.add_conflict_zone(l[0]) |
pd.read_csv('PATH/TO/DATA/FILE', sep='COLUMN_SEPARATOR', dtype=np.float64) |
tpot_data.drop('target', axis=1) |
train_test_split(features, tpot_data['target'], random_state=42) |
KNeighborsClassifier(n_neighbors=2, p=1, weights="distance") |
hasattr(exported_pipeline, 'random_state') |
setattr(exported_pipeline, 'random_state', 42) |
exported_pipeline.fit(training_features, training_target) |
exported_pipeline.predict(testing_features) |
ensure_in_syspath('../../') |
BrewTestCase(TestCase) |
test_list_taps(self) |
MagicMock(return_value=TAPS_STRING) |
patch.dict(brew.__salt__, {'cmd.run': mock_taps}) |
self.assertEqual(brew._list_taps() |
patch('salt.modules.brew._list_taps', MagicMock(return_value=TAPS_LIST) |
test_tap_installed(self) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.