Best Python code snippet using localstack_python
dope_model.py
Source: dope_model.py
...37 str(i_layer + 2), nn.Conv2d(256, 128, kernel_size=3, stride=1, padding=1))38 self.vgg.add_module(str(i_layer + 3), nn.ReLU(inplace=True))39 # print('---Belief------------------------------------------------')40 # _2 are the belief map stages41 self.m1_2 = DopeNetwork.create_stage(128, numBeliefMap, True)42 self.m2_2 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numBeliefMap, False)43 self.m3_2 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numBeliefMap, False)44 self.m4_2 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numBeliefMap, False)45 self.m5_2 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numBeliefMap, False)46 self.m6_2 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numBeliefMap, False)47 # print('---Affinity----------------------------------------------')48 # _1 are the affinity map stages49 self.m1_1 = DopeNetwork.create_stage(128, numAffinity, True)50 self.m2_1 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numAffinity, False)51 self.m3_1 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numAffinity, False)52 self.m4_1 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numAffinity, False)53 self.m5_1 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numAffinity, False)54 self.m6_1 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numAffinity, False)55 def forward(self, x):56 '''Runs inference on the neural network'''57 out1 = self.vgg(x)58 out1_2 = self.m1_2(out1)59 out1_1 = self.m1_1(out1)60 out2 = torch.cat([out1_2, out1_1, out1], 1)61 out2_2 = self.m2_2(out2)62 out2_1 = self.m2_1(out2)63 out3 = torch.cat([out2_2, out2_1, out1], 1)64 out3_2 = self.m3_2(out3)65 out3_1 = self.m3_1(out3)66 out4 = torch.cat([out3_2, out3_1, out1], 1)67 out4_2 = self.m4_2(out4)68 out4_1 = self.m4_1(out4)69 out5 = torch.cat([out4_2, out4_1, out1], 1)70 out5_2 = self.m5_2(out5)71 out5_1 = self.m5_1(out5)72 out6 = torch.cat([out5_2, out5_1, out1], 1)73 out6_2 = self.m6_2(out6)74 out6_1 = self.m6_1(out6)75 return torch.cat([out6_2, out6_1], 1)76 @staticmethod77 def create_stage(in_channels, out_channels, first=False):78 '''Create the neural network layers for a single stage.'''79 model = nn.Sequential()80 mid_channels = 12881 if first:82 padding = 183 kernel = 384 count = 685 final_channels = 51286 else:87 padding = 388 kernel = 789 count = 1090 final_channels = mid_channels91 # First convolution...
stages.py
Source: stages.py
...4 Carrega a stage cliente5 :param connection: conexão com o banco de dados6 :return: None7 """8 dwt.create_stage(9 conn_input=connection,10 conn_output=connection,11 schema_in="public",12 table="CLIENTE",13 stg_name="stg_cliente",14 tbl_exists="replace"15 )16def run_stg_endereco(connection):17 """18 Carrega a stage endereco19 :param connection: conexão com o banco de dados20 :return: None21 """22 dwt.create_stage(23 conn_input=connection,24 conn_output=connection,25 schema_in="public",26 table="ENDERECO",27 stg_name="stg_endereco",28 tbl_exists="replace"29 )30def run_stg_forma_pagamento(connection):31 """32 Carrega a stage forma_pagamento33 :param connection: conexão com o banco de dados34 :return: None35 """36 dwt.create_stage(37 conn_input=connection,38 conn_output=connection,39 schema_in="public",40 table="FORMA_PAGAMENTO",41 stg_name="stg_forma_pagamento",42 tbl_exists="replace"43 )44def run_stg_funcionario(connection):45 """46 Carrega a stage funcionario47 :param connection: conexão com o banco de dados48 :return: None49 """50 dwt.create_stage(51 conn_input=connection,52 conn_output=connection,53 schema_in="public",54 table="FUNCIONARIO",55 stg_name="stg_funcionario",56 tbl_exists="replace"57 )58def run_stg_item_venda(connection):59 """60 Carrega a stage item_venda61 :param connection: conexão com o banco de dados62 :return: None63 """64 dwt.create_stage(65 conn_input=connection,66 conn_output=connection,67 schema_in="public",68 table="ITEM_VENDA",69 stg_name="stg_item_venda",70 tbl_exists="replace"71 )72def run_stg_venda(connection):73 """74 Carrega a stage venda75 :param connection: conexão com o banco de dados76 :return: None77 """78 dwt.create_stage(79 conn_input=connection,80 conn_output=connection,81 schema_in="public",82 table="VENDA",83 stg_name="stg_venda",84 tbl_exists="replace"...
patient_stage.py
Source: patient_stage.py
...8 for r in Registry.objects.all():9 if r.has_feature(RegistryFeatures.STAGES):10 init_registry_stages_and_rules(r)11def init_registry_stages_and_rules(registry):12 informed_consent = create_stage(registry, 'Informed Consent', None)13 eligibility = create_stage(registry, 'Eligibility', informed_consent)14 pre_screening = create_stage(registry, 'Pre-screening', eligibility)15 screening = create_stage(registry, 'Screening', pre_screening)16 run_in = create_stage(registry, 'Run-in', screening)17 trial = create_stage(registry, 'Trial', run_in)18 _ = create_stage(registry, 'Follow-up', trial)19 if informed_consent and eligibility:20 create_rule(registry, None, 'registered', informed_consent, 1)21 create_rule(registry, informed_consent, 'consented', eligibility, 1)22def create_stage(registry, name, previous_stage):23 stage, created = models.PatientStage.objects.get_or_create(name=name, registry=registry)24 if created and previous_stage:25 stage.allowed_prev_stages.add(previous_stage)26 previous_stage.allowed_next_stages.add(stage)27 return stage if created else None28def create_rule(registry, from_stage, rule, to_stage, order):29 models.PatientStageRule.objects.get_or_create(30 registry=registry,31 from_stage=from_stage, 32 condition=rule, 33 to_stage=to_stage,34 order=order...
Check out the latest blogs from LambdaTest on this topic:
The fact is not alien to us anymore that cross browser testing is imperative to enhance your application’s user experience. Enhanced knowledge of popular and highly acclaimed testing frameworks goes a long way in developing a new app. It holds more significance if you are a full-stack developer or expert programmer.
QA testers have a unique role and responsibility to serve the customer. Serving the customer in software testing means protecting customers from application defects, failures, and perceived failures from missing or misunderstood requirements. Testing for known requirements based on documentation or discussion is the core of the testing profession. One unique way QA testers can both differentiate themselves and be innovative occurs when senseshaping is used to improve the application user experience.
Having a good web design can empower business and make your brand stand out. According to a survey by Top Design Firms, 50% of users believe that website design is crucial to an organization’s overall brand. Therefore, businesses should prioritize website design to meet customer expectations and build their brand identity. Your website is the face of your business, so it’s important that it’s updated regularly as per the current web design trends.
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!!