Best Python code snippet using localstack_python
strategy_observer.py
Source: strategy_observer.py
...19os_tools = auxiliary.ostools()20session = os_tools.db_connection()21user_handler = auxiliary.user_handler()22data_handler = auxiliary.data_handler()23signal_handler = auxiliary.signal_handler()24notification_handler = auxiliary.notification_handler()25invoice_handler = auxiliary.invoice_handler()26indicator_handler = auxiliary.indicator_handler()27bollinger_up_indicator = indicator_handler.get_indicator_by_name(session, 'bollinger_up')28bollinger_up_mean = indicator_handler.get_indicator_by_name(session, 'bollinger_up_mean')29bollinger_up_std = indicator_handler.get_indicator_by_name(session, 'bollinger_up_std')30bollinger_up_standardized = indicator_handler.get_indicator_by_name(session, 'bollinger_up_standardized')31bollinger_low_indicator = indicator_handler.get_indicator_by_name(session, 'bollinger_low')32bollinger_low_mean = indicator_handler.get_indicator_by_name(session, 'bollinger_low_mean')33bollinger_low_std = indicator_handler.get_indicator_by_name(session, 'bollinger_low_std')34bollinger_low_standardized = indicator_handler.get_indicator_by_name(session, 'bollinger_low_standardized')35bollinger_indicator = indicator_handler.get_indicator_by_name(session, 'bollinger')36bollinger_mean = indicator_handler.get_indicator_by_name(session, 'bollinger_mean')37bollinger_std = indicator_handler.get_indicator_by_name(session, 'bollinger_std')...
quack
Source: quack
...3os.system("printf '\033]2;Quack Toolkit\a'")4import argparse5import sys6import signal7def signal_handler(signal, frame):8 A = '\033[1;33m'9 W = '\033[0m'10 E = '\033[0m'11 print(A+'\n[!]'+W+' Attack terminated.'+E)12 os._exit(0)13def main():14 parser = argparse.ArgumentParser()15 parser.add_argument("--target", type = str, metavar = "<ip:port/URL/phone>",16 help = "Target IP and port, URL or phone.")17 parser.add_argument("--tool", type = str, metavar = "[SMS|NTP|TCP|UDP|SYN|POD|SLOWLORIS|MEMCACHED|HTTP|NJRAT]",18 help = "Attack tool.")19 parser.add_argument("--timeout", type = int, default = 10, metavar = "<timeout>",20 help = 'Timeout in seconds.')21 parser.add_argument("--threads", type = int, default = 3, metavar = "<threads>",...
helpers.py
Source: helpers.py
...33 return is_sigusr1_available and is_sigusr2_available34 def _is_signal_usr_signal_handlers_used(self, signal_to_test):35 signal_handler = signal.getsignal(signal_to_test)36 is_signal_handlers_used = (signal_handler is None37 or self._is_default_signal_handler(signal_handler)38 or self._is_ignore_signal_handler(signal_handler)39 or self._is_gunicorn_logfile_signal_handler(signal_handler) )40 # Gunicorn is configured to emit logs to std. Hence41 # we can safely override SIGUSR1 handler42 if not is_signal_handlers_used:43 self.logger.error(f"{signal_to_test.name} is not available as it is used by {signal_handler}")44 45 return is_signal_handlers_used46 def _is_default_signal_handler(self, signal_handler):47 return (signal_handler is not None48 and hasattr(signal_handler , "name")49 and signal_handler.name == signal.SIG_DFL.name)50 def _is_ignore_signal_handler(self, signal_handler):51 return (signal_handler is not None52 and hasattr(signal_handler , "name")53 and signal_handler.name == signal.SIG_IGN.name)54 def _is_gunicorn_logfile_signal_handler(self, signal_handler):55 return (signal_handler is not None...
os-signal.py
Source: os-signal.py
...12import signal 13import time 14 15# Our signal handler16def signal_handler(signum, frame): 17 print("Signal Number:", signum, " Frame: ", frame) 18 19def exit_handler(signum, frame):20 print('Exiting....')21 exit(0)22 23# Register our signal handler with `SIGINT`(CTRL + C)24signal.signal(signal.SIGINT, signal_handler)25 26# Register the exit handler with `SIGTSTP` (Ctrl + Z)27signal.signal(signal.SIGTSTP, exit_handler)28signal.signal(signal.SIGHUP, signal_handler)29signal.signal(signal.SIGINT, signal_handler)30signal.signal(signal.SIGQUIT, signal_handler)...
Check out the latest blogs from LambdaTest on this topic:
When most firms employed a waterfall development model, it was widely joked about in the industry that Google kept its products in beta forever. Google has been a pioneer in making the case for in-production testing. Traditionally, before a build could go live, a tester was responsible for testing all scenarios, both defined and extempore, in a testing environment. However, this concept is evolving on multiple fronts today. For example, the tester is no longer testing alone. Developers, designers, build engineers, other stakeholders, and end users, both inside and outside the product team, are testing the product and providing feedback.
The QA testing profession requires both educational and long-term or experience-based learning. One can learn the basics from certification courses and exams, boot camp courses, and college-level courses where available. However, developing instinctive and practical skills works best when built with work experience.
The holidays are just around the corner, and with Christmas and New Year celebrations coming up, everyone is busy preparing for the festivities! And during this busy time of year, LambdaTest also prepped something special for our beloved developers and testers – #LambdaTestYourBusiness
Enterprise resource planning (ERP) is a form of business process management software—typically a suite of integrated applications—that assists a company in managing its operations, interpreting data, and automating various back-office processes. The introduction of a new ERP system is analogous to the introduction of a new product into the market. If the product is not handled appropriately, it will fail, resulting in significant losses for the business. Most significantly, the employees’ time, effort, and morale would suffer as a result of the procedure.
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!