<jupyter_start><jupyter_text>Connect to database or create it if not existing:<jupyter_code>initialise_or_create_database_at('..//measurements//experiments.db')<jupyter_output><empty_output><jupyter_text>Connect to experiment or create it if not existing:<jupyter_code>exp = load_or_create_experiment(**get_exp_and_sample())
station = qc.Station()
# Component to control experiment
from qube.measurement.experiment import Controls
controls = Controls('controls')
station.add_component(controls)
# from qube.layout import gds
# from qube.helpers.qcodes_layout import LayoutContent

# def controls_display(
#     data:qc.dataset.data_set.DataSet=None, # Optional: Extract information from a dataset
#     gds_path = '..\\configurations\\sample.GDS',
#     gds_conf = '..\\configurations\\gds_config.ini',
# ):
#     """
#     This function displays the controls of your experiment via a GDS layout.
#     If no data is passed, the current values of your controls are shown.
#     If data is passed, the control values and sweeps from the dataset are displayed.
#     """
    
#     # Extract information of controls and measurement (optional, if dataset is provided)
#     if data == None:
#         snapshot_controls = controls.snapshot()['parameters']
#     else:
#         snapshot_controls = data.snapshot['station']['components']['controls']['parameters']

#     # Make layout
#     temp_layout = GDS_layout.Layout(gds_path)

#     if not os.path.exists(gds_conf):
        
#         # Run wizard if layout config file is not existing
#         print('GDS config file does not exist ... launching wizard ...')
#         full_names_of_controls = [ i['full_name'] for i in controls.snapshot()['parameters'].values() ] 
#         temp_layout.config_wizard(
#             names = full_names_of_controls,
#             export_file = gds_conf,
#             default_file = '..\\tools\\plot\\LayoutLibrary\\db\\default.ini'
#         )
        
#     else:
        
#         # Load layout config file
#         temp_layout.load_layout_config(gds_conf)

#         # Extract informations on controls and measurement
#         gates = LayoutContent(snapshot_controls,data)
#         gates.set_to_layout(layout=temp_layout)

#         # Plot
#         fig, ax = temp_layout.plot_layout()
#         plt.show()
        
startup_was_launched = True<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10810810810810811, 'fraction_numerical': 0.0, 'mean_word_length': 3.185512367491166, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '531535', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 694, 'n_tokens_neox': 693, 'n_words': 169, 'path': 'tests/jupyter/20220202__experiment__sample/startup.ipynb', 'repo_name': 'maluffi/qube', 'size': '2368'}