






import argparse
import json
import subprocess

def      lowerCAmelCase__	(    _a       :			Optional[int]  ,      _a       :			Union[str, Any]    ):
		snake_case_				:							Any						 =       []

		snake_case_				:							Union[str, Any]						 =       (
		    F'''curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer {token}"'''
		    " https://api.github.com/repos/huggingface/transformers/actions/runners"
		)
		snake_case_				:							Dict						 =       subprocess.run(_a  ,      shell=_a  ,      stdout=subprocess.PIPE    )
		snake_case_				:							str						 =       output.stdout.decode("utf-8"    )
		snake_case_				:							Optional[Any]						 =       json.loads(_a    )

		snake_case_				:							int						 =       status["runners"]
		for runner in runners:
				if runner["name"] in target_runners:
						if runner["status"] == "offline":
								offline_runners.append(_a    )

    # save the result so we can report them on Slack
		with open("offline_runners.txt"  ,      "w"    ) as fp:
				fp.write(json.dumps(_a    )    )

		if len(_a    ) > 0:
				snake_case_				:							List[str]						 =       "\n".join([x["name"] for x in offline_runners]    )
				raise ValueError(F'''The following runners are offline:\n{failed}'''    )


if __name__ == "__main__":

							def      lowerCAmelCase__	(    _a       :			Any    ):
									return values.split(","    )

							lowercase  :							List[str]			  =    argparse.ArgumentParser()
							# Required parameters
							parser.add_argument(
							    '''--target_runners''',
							    default=None,
							    type=list_str,
							    required=True,
							    help='''Comma-separated list of runners to check status.''',
							)

							parser.add_argument(
							    '''--token''', default=None, type=str, required=True, help='''A token that has actions:read permission.'''
							)
							lowercase  :							List[Any]			  =    parser.parse_args()

							get_runner_status(args.target_runners, args.token)








import qiskit

def      lowerCAmelCase__	(    _a       :			int  ,      _a       :			int    ):
		snake_case_				:							Tuple						 =       qiskit.Aer.get_backend("aer_simulator"    )

		# Create a Quantum Circuit acting on the q register
		snake_case_				:							Any						 =       qiskit.QuantumCircuit(_a  ,      _a    )

		# Apply X (NOT) Gate to Qubits 0 & 1
		circuit.x(0    )
		circuit.x(1    )

		# Map the quantum measurement to the classical bits
		circuit.measure([0, 1]  ,      [0, 1]    )

		# Execute the circuit on the qasm simulator
		snake_case_				:							Any						 =       qiskit.execute(_a  ,      _a  ,      shots=10_00    )

		# Return the histogram data of the results of the experiment.
		return job.result().get_counts(_a    )


if __name__ == "__main__":
							lowercase  :							List[Any]			  =    single_qubit_measure(2, 2)
							print(F"""Total count for various states are: {counts}""")
