Best Python code snippet using localstack_python
__init__.py
Source:__init__.py
...109from thelma.repositories.rdb.schema.tables import plate110from thelma.repositories.rdb.schema.tables import moleculesuppliermoleculedesign111# Not all tables are dependencies for other tables. pylint: disable=W0612112def initialize_tables(metadata):113 organization_tbl = organization.create_table(metadata)114 molecule_type_tbl = moleculetype.create_table(metadata)115 molecule_design_tbl = moleculedesign.create_table(metadata,116 molecule_type_tbl)117 molecule_design_set_tbl = moleculedesignset.create_table(metadata)118 moleucle_design_pool_tbl = \119 moleculedesignpool.create_table(metadata, molecule_design_set_tbl,120 molecule_type_tbl)121 molecule_design_set_member_tbl = moleculedesignsetmember.create_table(122 metadata, molecule_design_tbl, molecule_design_set_tbl)123 chemical_structure_tbl = chemicalstructure.create_table(metadata)124 molecule_design_structure_tbl = \125 moleculedesignstructure.create_table(metadata,126 molecule_design_tbl,127 chemical_structure_tbl)128 item_status_tbl = itemstatus.create_table(metadata)129 rack_shape_tbl = rackshape.create_table(metadata)130 container_specs_tbl = containerspecs.create_table(metadata,131 organization_tbl)132 rack_specs_tbl = rackspecs.create_table(metadata, organization_tbl,133 rack_shape_tbl)134 container_tbl = container.create_table(metadata, container_specs_tbl,135 item_status_tbl)136 containerbarcode_tbl = containerbarcode.create_table(metadata,137 container_tbl)138 rack_specs_container_specs_tbl = \139 rackspecscontainerspecs.create_table(metadata, rack_specs_tbl,140 container_specs_tbl)141 rack_tbl = rack.create_table(metadata, item_status_tbl, rack_specs_tbl)142 tube_rack_tbl = tuberack.create_table(metadata, rack_tbl)143 plate_tbl = plate.create_table(metadata, rack_tbl)144 rack_position_tbl = rackposition.create_table(metadata)145 tube_tbl = tube.create_table(metadata, container_tbl)146 well_tbl = well.create_table(metadata, container_tbl, plate_tbl,147 rack_position_tbl)148 device_type_tbl = devicetype.create_table(metadata)149 device_tbl = device.create_table(metadata, device_type_tbl, organization_tbl)150 barcoded_location_tbl = barcodedlocation.create_table(metadata, device_tbl)151 rack_barcoded_location_tbl = rackbarcodedlocation.create_table(152 metadata,153 rack_tbl,154 barcoded_location_tbl)155 tubelocation.create_table(metadata, container_tbl, rack_tbl,156 rack_position_tbl)157 molecule_tbl = molecule.create_table(metadata, molecule_design_tbl,158 organization_tbl)159 sample_tbl = sample.create_table(metadata, container_tbl)160 sampleregistration.create_table(metadata, sample_tbl)161 sample_molecule_tbl = samplemolecule.create_table(metadata, sample_tbl,162 molecule_tbl)163 stocksample.create_table(metadata, sample_tbl, organization_tbl,164 molecule_design_set_tbl, molecule_type_tbl)165 compound_tbl = compound.create_table(metadata, molecule_design_tbl)166 species_tbl = species.create_table(metadata)167 refseq_gene_tbl = refseqgene.create_table(metadata, species_tbl)168 molecule_design_gene_tbl = \169 moleculedesigngene.create_table(metadata, molecule_design_tbl,170 refseq_gene_tbl)171 molecule_design_set_gene_tbl = \172 moleculedesignsetgene.create_table(metadata, molecule_design_set_tbl,173 refseq_gene_tbl)174 molecule_design_pool_set_tbl = moleculedesignpoolset.create_table(metadata,175 molecule_type_tbl)176 molecule_design_pool_set_member_tbl = moleculedesignpoolsetmember.\177 create_table(metadata, molecule_design_set_tbl,178 molecule_design_pool_set_tbl)179 supplier_molecule_design_tbl = suppliermoleculedesign.create_table(180 metadata, organization_tbl)181 singlesuppliermoleculedesign.create_table(metadata,182 supplier_molecule_design_tbl,183 molecule_design_tbl)184 pooledsuppliermoleculedesign.create_table(metadata,185 supplier_molecule_design_tbl,186 molecule_design_set_tbl)187 supplierstructureannotation.create_table(metadata,188 supplier_molecule_design_tbl,189 chemical_structure_tbl)190 moleculesuppliermoleculedesign.create_table(metadata,191 molecule_tbl,192 supplier_molecule_design_tbl)193 dbuser_tbl = user.create_table(metadata)194 user_preferences_tbl = userpreferences.create_table(metadata, dbuser_tbl)195 tag_tbl = tag.create_table(metadata)196 tagged_tbl = tagged.create_table(metadata)197 tagging_tbl = tagging.create_table(metadata, tagged_tbl, tag_tbl,198 dbuser_tbl)199 rack_position_set_tbl = rackpositionset.create_table(metadata)200 rack_position_set_member_tbl = rackpositionsetmember.create_table(201 metadata, rack_position_set_tbl, rack_position_tbl)202 rack_layout_tbl = racklayout.create_table(metadata, rack_shape_tbl)203 tagged_rack_position_set_tbl = taggedrackpositionset.create_table(204 metadata, rack_layout_tbl, tagged_tbl, rack_position_set_tbl)205 project_tbl = project.create_table(metadata, organization_tbl, dbuser_tbl)206 subproject_tbl = subproject.create_table(metadata, project_tbl)207 job_tbl = job.create_table(metadata, dbuser_tbl)208 pipetting_specs_tbl = pipettingspecs.create_table(metadata)209 reservoir_specs_tbl = reservoirspecs.create_table(metadata, rack_shape_tbl)210 planned_liquid_transfer_tbl = plannedliquidtransfer.create_table(metadata)211 planned_sample_dilution_tbl = plannedsampledilution.create_table(metadata,212 planned_liquid_transfer_tbl, rack_position_tbl)213 planned_sample_transfer_tbl = plannedsampletransfer.create_table(metadata,214 planned_liquid_transfer_tbl, rack_position_tbl)215 planned_rack_sample_transfer_tbl = plannedracksampletransfer.create_table(216 metadata, planned_liquid_transfer_tbl)217 planned_worklist_tbl = plannedworklist.create_table(metadata,218 pipetting_specs_tbl)219 planned_worklist_member_tbl = plannedworklistmember.create_table(metadata,220 planned_worklist_tbl, planned_liquid_transfer_tbl)221 worklist_series_tbl = worklistseries.create_table(metadata)222 worklist_series_member_tbl = worklistseriesmember.create_table(metadata,223 worklist_series_tbl, planned_worklist_tbl)224 executed_liquid_transfer_tbl = executedliquidtransfer.create_table(metadata,225 planned_liquid_transfer_tbl, dbuser_tbl)226 executed_sample_dilution_tbl = executedsampledilution.create_table(metadata,227 executed_liquid_transfer_tbl, container_tbl,228 reservoir_specs_tbl)229 executed_sample_transfer_tbl = executedsampletransfer.create_table(metadata,230 executed_liquid_transfer_tbl, container_tbl)231 executed_rack_sample_transfer_tbl = executedracksampletransfer.create_table(232 metadata, executed_liquid_transfer_tbl, rack_tbl)233 executed_worklist_tbl = executedworklist.create_table(metadata,234 planned_worklist_tbl)235 executed_worklist_member_tbl = executedworklistmember.create_table(metadata,236 executed_worklist_tbl, executed_liquid_transfer_tbl)237 tube_transfer_tbl = tubetransfer.create_table(metadata, container_tbl,238 rack_tbl, rack_position_tbl)239 tube_transfer_worklist_tbl = tubetransferworklist.create_table(metadata,240 dbuser_tbl)241 tube_transfer_worklist_member_tbl = tubetransferworklistmember.create_table(242 metadata, tube_transfer_tbl, tube_transfer_worklist_tbl)243 iso_request_tbl = isorequest.create_table(metadata)244 iso_request_pool_set_tbl = isorequestpoolset.create_table(metadata,245 iso_request_tbl, molecule_design_pool_set_tbl)246 lab_iso_request_tbl = labisorequest.create_table(metadata, iso_request_tbl,247 dbuser_tbl, rack_layout_tbl, reservoir_specs_tbl)248 stock_sample_creation_iso_request = stocksamplecreationisorequest.\249 create_table(metadata, iso_request_tbl)250 experiment_metadata_type_tbl = experimentmetadatatype.create_table(metadata)251 experiment_metadata_tbl = experimentmetadata.create_table(metadata,252 subproject_tbl, experiment_metadata_type_tbl)253 experiment_design_tbl = experimentdesign.create_table(metadata,254 rack_shape_tbl, experiment_metadata_tbl)255 worklist_series_experiment_design_tbl = \256 worklistseriesexperimentdesign.create_table(metadata,257 experiment_design_tbl, worklist_series_tbl)258 experiment_tbl = experiment.create_table(259 metadata, experiment_design_tbl, job_tbl)260 experiment_source_rack_tbl = experimentsourcerack.create_table(metadata,261 experiment_tbl, rack_tbl)262 experiment_design_rack_tbl = experimentdesignrack.create_table(263 metadata, experiment_design_tbl, rack_layout_tbl)264 worklist_series_experiment_design_rack_tbl = \265 worklistseriesexperimentdesignrack.create_table(metadata,266 experiment_design_rack_tbl, worklist_series_tbl)267 experiment_rack_tbl = experimentrack.create_table(metadata,268 experiment_design_rack_tbl, experiment_tbl, rack_tbl)269 # FIXME: add and repair experiment racks#pylint: disable=W0511270 worklist_series_iso_request_tbl = worklistseriesisorequest.create_table(271 metadata, iso_request_tbl, worklist_series_tbl)272 experiment_metadata_iso_request_tbl = experimentmetadataisorequest.\273 create_table(metadata, experiment_metadata_tbl,274 iso_request_tbl)275 iso_tbl = iso.create_table(metadata, iso_request_tbl, rack_layout_tbl)276 stock_sample_creation_iso_tbl = stocksamplecreationiso.create_table(277 metadata, iso_tbl)278 iso_pool_set_tbl = isopoolset.create_table(metadata, iso_tbl,279 molecule_design_pool_set_tbl)280 iso_job_tbl = isojob.create_table(metadata, job_tbl)281 worklist_series_iso_job_tbl = worklistseriesisojob.create_table(metadata,282 iso_job_tbl, worklist_series_tbl)283 iso_job_member_tbl = isojobmember.create_table(metadata, job_tbl, iso_tbl)284 stock_rack_tbl = stockrack.create_table(metadata, rack_tbl, rack_layout_tbl,285 worklist_series_tbl)286 iso_job_stock_rack_tbl = isojobstockrack.create_table(metadata,287 stock_rack_tbl, job_tbl)288 iso_stock_rack_tbl = isostockrack.create_table(metadata, stock_rack_tbl,289 iso_tbl)290 iso_sector_stock_rack_tbl = isosectorstockrack.create_table(metadata,291 stock_rack_tbl, iso_tbl)292 iso_plate_tbl = isoplate.create_table(metadata, iso_tbl, rack_tbl)293 iso_aliquot_plate_tbl = isoaliquotplate.create_table(metadata,294 iso_plate_tbl)295 iso_preparation_plate_tbl = isopreparationplate.create_table(metadata,296 iso_plate_tbl, rack_layout_tbl)297 iso_sector_preparation_plate_tbl = isosectorpreparationplate.create_table(298 metadata, iso_plate_tbl, rack_layout_tbl)299 iso_job_preparation_plate_tbl = isojobpreparationplate.create_table(300 metadata, rack_tbl, job_tbl, rack_layout_tbl)301 experiment_rack_job_tbl = experimentrackjob.create_table(302 metadata, job_tbl, experiment_rack_tbl)303 molecule_design_library_tbl = moleculedesignlibrary.create_table(metadata,304 rack_layout_tbl, molecule_design_pool_set_tbl)305 molecule_design_library_creation_iso_request_tbl = \306 moleculedesignlibrarycreationisorequest.create_table(metadata,307 molecule_design_library_tbl, stock_sample_creation_iso_request)308 molecule_design_library_lab_iso_request_tbl = \309 moleculedesignlibrarylabisorequest.create_table(metadata,310 molecule_design_library_tbl, lab_iso_request_tbl)311 library_plate_tbl = libraryplate.create_table(metadata,312 molecule_design_library_tbl, rack_tbl)313 iso_library_plate_tbl = labisolibraryplate.create_table(metadata, iso_tbl,314 library_plate_tbl)...
create_tables.py
Source:create_tables.py
1import sqlite32connection = sqlite3.connect('data.db')3cursor= connection.cursor()4create_table = "Create TABLE IF NOT EXISTS users(id INTEGER PRIMARY KEY, username text, password text)" #Auto incrementing ID (id INTEGER PRIMARY KEY)5cursor.execute(create_table)6#create_table = "Create TABLE IF NOT EXISTS items(name text, price real)" #Auto incrementing ID (id INTEGER PRIMARY KEY)7#cursor.execute(create_table)8#create_table = "Create TABLE IF NOT EXISTS geometry_columns(id INTEGER PRIMARY KEY, name text, score FLOAT, latitude FLOAT, longitude FLOAT)" #Auto incrementing ID (id INTEGER PRIMARY KEY)9#cursor.execute(create_table)10create_table = "Create TABLE IF NOT EXISTS geometry_columns(id INTEGER PRIMARY KEY, meldID text,date text, name text, Email text, telephone int, categorie text, toelichting text, latitude FLOAT, longitude FLOAT)" #Auto incrementing ID (id INTEGER PRIMARY KEY)11cursor.execute(create_table)12'''create_table = "Create TABLE IF NOT EXISTS spatial_ref_sys(srid INTEGER, auth_name TEXT, auth_srid TEXT, srtext TEXT)" #Auto incrementing ID (id INTEGER PRIMARY KEY)13cursor.execute(create_table)14create_table = "Create TABLE IF NOT EXISTS sql(ogc_fid INTEGER, GEOMETRY BLOB, fid BIGINT, score FLOAT)" #Auto incrementing ID (id INTEGER PRIMARY KEY)15cursor.execute(create_table)'''16#create_table = "Create TABLE IF NOT EXISTS sqlite_sequence(name name, seq seq)" #Auto incrementing ID (id INTEGER PRIMARY KEY)17#cursor.execute(create_table)18#cursor.execute("INSERT INTO items VALUES ('test', 10.99)")19connection.commit()...
CreateTables.py
Source:CreateTables.py
1import Tables2conn = Tables.create_connection()3Tables.CarTypesTable.create_table(conn)4Tables.PlugTypesTable.create_table(conn)5Tables.CarsTable.create_table(conn)6Tables.ChargingStationsTable.create_table(conn)7Tables.SocketsTable.create_table(conn)8Tables.PartTypesTable.create_table(conn)9Tables.PartCarTable.create_table(conn)10Tables.ProvidersTable.create_table(conn)11Tables.PartProviderTable.create_table(conn)12Tables.WorkshopsTable.create_table(conn)13Tables.PartWorkshopTable.create_table(conn)14Tables.ProviderWorkshopTable.create_table(conn)15Tables.CustomersTable.create_table(conn)16Tables.OrdersTable.create_table(conn)17Tables.PaymentsTable.create_table(conn)18Tables.ChargesTable.create_table(conn)19Tables.RepairsTable.create_table(conn)20Tables.OrderPartsTable.create_table(conn)...
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!!