repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
gadial/qiskit-terra
qiskit/transpiler/passes/utils/remove_final_measurements.py
<filename>qiskit/transpiler/passes/utils/remove_final_measurements.py # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http:/...
gadial/qiskit-terra
qiskit/pulse/transforms/dag.py
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
qiskit/tools/jupyter/version_table.py
<filename>qiskit/tools/jupyter/version_table.py # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licens...
gadial/qiskit-terra
qiskit/quantum_info/operators/mixins/linear.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
qiskit/quantum_info/synthesis/clifford_decompose.py
<reponame>gadial/qiskit-terra # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2021 # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # #...
gadial/qiskit-terra
qiskit/circuit/library/templates/rzx/rzx_xz.py
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
test/python/compiler/test_sequencer.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
test/python/compiler/test_disassembler.py
<filename>test/python/compiler/test_disassembler.py # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/li...
gadial/qiskit-terra
qiskit/opflow/expectations/aer_pauli_expectation.py
<reponame>gadial/qiskit-terra # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any ...
gadial/qiskit-terra
test/python/transpiler/test_pass_call.py
<filename>test/python/transpiler/test_pass_call.py # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/lic...
gadial/qiskit-terra
qiskit/algorithms/linear_solvers/observables/linear_system_observable.py
<filename>qiskit/algorithms/linear_solvers/observables/linear_system_observable.py<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2020, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of th...
gadial/qiskit-terra
qiskit/quantum_info/operators/symplectic/pauli_utils.py
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020 # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modificati...
gadial/qiskit-terra
test/python/classical_function_compiler/test_boolean_expression.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
qiskit/opflow/gradients/__init__.py
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications o...
gadial/qiskit-terra
test/python/providers/test_faulty_backend.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
qiskit/tools/jupyter/copyright.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
qiskit/pulse/instructions/snapshot.py
# This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
test/python/transpiler/test_enlarge_with_ancilla_pass.py
<filename>test/python/transpiler/test_enlarge_with_ancilla_pass.py<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree o...
gadial/qiskit-terra
qiskit/test/mock/fake_provider.py
<reponame>gadial/qiskit-terra<filename>qiskit/test/mock/fake_provider.py # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://ww...
gadial/qiskit-terra
qiskit/circuit/library/arithmetic/integer_comparator.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
test/python/opflow/test_two_qubit_reduction.py
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
test/python/opflow/test_pauli_expectation.py
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modificat...
gadial/qiskit-terra
qiskit/opflow/state_fns/cvar_measurement.py
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications o...
gadial/qiskit-terra
qiskit/visualization/qcstyle.py
<filename>qiskit/visualization/qcstyle.py<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/lice...
gadial/qiskit-terra
qiskit/qasm/node/external.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
qiskit/opflow/evolutions/trotterizations/suzuki.py
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications o...
gadial/qiskit-terra
qiskit/quantum_info/analysis/distance.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
qiskit/opflow/evolutions/matrix_evolution.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
qiskit/quantum_info/operators/channel/choi.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
test/python/circuit/test_register.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
test/python/visualization/timeline/test_core.py
<reponame>gadial/qiskit-terra # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any ...
gadial/qiskit-terra
qiskit/algorithms/algorithm_result.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
qiskit/pulse/instructions/frequency.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
qiskit/test/utils.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
qiskit/circuit/__init__.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
qiskit/algorithms/linear_solvers/matrices/linear_system_matrix.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
qiskit/circuit/parametervector.py
<filename>qiskit/circuit/parametervector.py # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/L...
gadial/qiskit-terra
test/python/opflow/test_aer_pauli_expectation.py
<reponame>gadial/qiskit-terra # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # ...
gadial/qiskit-terra
qiskit/opflow/evolutions/evolution_base.py
<filename>qiskit/opflow/evolutions/evolution_base.py # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/license...
gadial/qiskit-terra
qiskit/visualization/dag_visualization.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or d...
gadial/qiskit-terra
test/python/compiler/test_assembler.py
<reponame>gadial/qiskit-terra # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # ...
gadial/qiskit-terra
qiskit/transpiler/passes/optimization/remove_diagonal_gates_before_measure.py
<filename>qiskit/transpiler/passes/optimization/remove_diagonal_gates_before_measure.py # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source...
gadial/qiskit-terra
qiskit/algorithms/linear_solvers/numpy_linear_solver.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
test/python/algorithms/optimizers/test_optimizer_aqgd.py
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2019, 2021 # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modificati...
gadial/qiskit-terra
test/python/tools/monitor/test_job_monitor.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
test/python/opflow/test_z2_symmetries.py
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
test/python/classical_function_compiler/test_synthesis.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
qiskit/opflow/converters/__init__.py
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications o...
gadial/qiskit-terra
qiskit/qasm/qasmparser.py
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications o...
gadial/qiskit-terra
qiskit/visualization/array.py
<filename>qiskit/visualization/array.py # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICEN...
gadial/qiskit-terra
qiskit/test/mock/utils/configurable_backend.py
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications o...
gadial/qiskit-terra
qiskit/opflow/evolutions/trotterizations/trotterization_factory.py
<reponame>gadial/qiskit-terra<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE...
gadial/qiskit-terra
qiskit/qobj/utils.py
<reponame>gadial/qiskit-terra # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # ...
gadial/qiskit-terra
test/python/algorithms/optimizers/test_optimizers_scikitquant.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
test/python/dagcircuit/test_compose.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
qiskit/algorithms/optimizers/slsqp.py
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modificat...
gadial/qiskit-terra
qiskit/pulse/instructions/play.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
gadial/qiskit-terra
qiskit/visualization/pulse_v2/generators/waveform.py
<reponame>gadial/qiskit-terra<filename>qiskit/visualization/pulse_v2/generators/waveform.py<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of...
gadial/qiskit-terra
qiskit/tools/jupyter/library.py
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
gadial/qiskit-terra
qiskit/algorithms/phase_estimators/hamiltonian_phase_estimation.py
<gh_stars>1-10 # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications o...
gadial/qiskit-terra
qiskit/opflow/primitive_ops/primitive_op.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
trigaten/DAIDE
tests/str_parse_str_test.py
<gh_stars>0 from DAIDE import Order, Province, Arrangement, Unit from DAIDE import YES from DAIDE import MTO, SUP, CVY, CTO, VIA from DAIDE import PRP, FCT from DAIDE import ALY from DAIDE import XDO from DAIDE import AND, ORR from utils import EXAMPLE_ORDER, EXAMPLE_UNIT, EXAMPLE_PROVINCE, str_parse_str_test """lvl...
trigaten/DAIDE
src/DAIDE/syntax/lvl10/statement.py
__author__ = "<NAME>" __email__ = "<EMAIL>" from DAIDE.core import SimpleParensObject class FCT(SimpleParensObject): """FCT (arrangement)""" pass
trigaten/DAIDE
src/DAIDE/syntax/lvl0/unit.py
__author__ = "<NAME>" __email__ = "<EMAIL>" import re from DAIDE.core import DaideObject from DAIDE.utils.parsing import consume from DAIDE.utils.exceptions import ParseError class Unit(DaideObject): regex = re.compile("^[A-Za-z]{3}\s[A-Za-z]{3}\s[A-Za-z]{3}") def __init__(self, string): self.s...
trigaten/DAIDE
src/DAIDE/syntax/lvl0/__init__.py
<gh_stars>0 from DAIDE.syntax.lvl0.order import * from DAIDE.syntax.lvl0.unit import * from DAIDE.syntax.lvl0.province import * from DAIDE.syntax.lvl0.alliance import * from DAIDE.syntax.lvl0.response import *
trigaten/DAIDE
src/DAIDE/syntax/lvl20/xdo.py
<reponame>trigaten/DAIDE __author__ = "<NAME>" __email__ = "<EMAIL>" from DAIDE.core import SimpleParensObject class XDO(SimpleParensObject): """XDO (arrangement)""" pass
trigaten/DAIDE
src/DAIDE/syntax/lvl30/binop.py
__author__ = "<NAME>" __email__ = "<EMAIL>" from abc import ABC from DAIDE.core import DaideObject from DAIDE.core import Arrangement from DAIDE.utils.parsing import consume, parse_with_parens class Binop(DaideObject, ABC): """Abstract Base Class for BINOP DAIDE words like AND, ORR""" def __init__(self, arra...
trigaten/DAIDE
tests/utils.py
<gh_stars>0 """Property base testing""" from DAIDE import Unit, Order, HLD from DAIDE import Province EXAMPLE_UNIT = Unit("FFF FFF FFF") EXAMPLE_ORDER = Order(EXAMPLE_UNIT, HLD()) EXAMPLE_PROVINCE = Province("ADR") def str_parse_str_test(arrangement): """ A property base test which ensures that the str o...
trigaten/DAIDE
src/DAIDE/core.py
__author__ = "<NAME>" __email__ = "<EMAIL>" from abc import ABC, abstractmethod import DAIDE.utils.parsing as parsing from DAIDE.utils.parsing import consume, parse_with_parens class DaideObject(ABC): """Abstract Base Class for DAIDE objects""" @abstractmethod def __str__(self): raise NotImplemen...
trigaten/DAIDE
src/DAIDE/syntax/__init__.py
from DAIDE.syntax.lvl0 import * from DAIDE.syntax.lvl10 import * from DAIDE.syntax.lvl20 import * from DAIDE.syntax.lvl30 import *
trigaten/DAIDE
src/DAIDE/__init__.py
from DAIDE.syntax import * from DAIDE.core import ( DaideObject, Arrangement, parse )
trigaten/DAIDE
src/DAIDE/syntax/lvl20/__init__.py
from DAIDE.syntax.lvl20.xdo import XDO
trigaten/DAIDE
src/DAIDE/syntax/lvl10/proposal.py
<reponame>trigaten/DAIDE<gh_stars>0 __author__ = "<NAME>" __email__ = "<EMAIL>" from DAIDE.core import SimpleParensObject class PRP(SimpleParensObject): """PRP (arrangement)""" pass
trigaten/DAIDE
src/DAIDE/syntax/lvl0/order.py
__author__ = "<NAME>" __email__ = "<EMAIL>" from functools import reduce import re import DAIDE.config as config from DAIDE.core import DaideObject from DAIDE.utils.parsing import consume from DAIDE.utils.exceptions import ParseError from DAIDE.syntax.lvl0.unit import Unit from DAIDE.syntax.lvl0.province import Pro...
trigaten/DAIDE
src/DAIDE/syntax/lvl10/__init__.py
from DAIDE.syntax.lvl10.proposal import * from DAIDE.syntax.lvl10.statement import *
trigaten/DAIDE
src/DAIDE/syntax/lvl0/province.py
<reponame>trigaten/DAIDE<filename>src/DAIDE/syntax/lvl0/province.py __author__ = "<NAME>" __email__ = "<EMAIL>" import re from DAIDE.core import DaideObject from DAIDE.utils.exceptions import ParseError class Province(DaideObject): regex = re.compile("^(ADR|AEG|ALB|ANK|APU|ARM|BAL|BAR|BEL|BER|BLA|BOH|BRE|BUD|BU...
trigaten/DAIDE
src/DAIDE/utils/__init__.py
<filename>src/DAIDE/utils/__init__.py from DAIDE.utils.exceptions import ParseError from DAIDE.utils.exceptions import ConsumeError
trigaten/DAIDE
src/DAIDE/syntax/lvl0/response.py
<filename>src/DAIDE/syntax/lvl0/response.py __author__ = "<NAME>" __email__ = "<EMAIL>" from DAIDE.core import SimpleParensObject, Arrangement from DAIDE.utils.parsing import consume, parse_with_parens class Response(SimpleParensObject): """YES, REJ, stuff like that""" @classmethod def parse(cls, string)...
trigaten/DAIDE
src/DAIDE/syntax/lvl30/__init__.py
from DAIDE.syntax.lvl30.binop import *
trigaten/DAIDE
src/DAIDE/utils/parsing.py
__author__ = "<NAME>" __email__ = "<EMAIL>" from DAIDE.utils.exceptions import ConsumeError def consume(string, sub, error=True): """""" len_sub = len(sub) if string[:len_sub] == sub: return string[len_sub:] else: if error: raise ConsumeError(string, f"Consume \"{sub}\"") ...
trigaten/DAIDE
src/DAIDE/syntax/lvl0/alliance.py
<filename>src/DAIDE/syntax/lvl0/alliance.py __author__ = "<NAME>" __email__ = "<EMAIL>" from functools import reduce import re import DAIDE.config as config from DAIDE.core import DaideObject from DAIDE.utils.parsing import consume from DAIDE.utils.exceptions import ParseError from DAIDE.syntax.lvl0.unit import U...
trigaten/DAIDE
src/DAIDE/config.py
# orders will not necessarily be DAIDE syntax # Diplomacy Github project uses shorthand (e.g. STP/SC S A WAR - LVN) ORDERS_DAIDE = True
trigaten/DAIDE
src/DAIDE/utils/exceptions.py
__author__ = "<NAME>" __email__ = "<EMAIL>" class ParseError(Exception): def __init__(self, string, p_type): super().__init__("Can't parse \"" + string + "\" as " + p_type + ".") class ConsumeError(ParseError): def __init__(self, string, to_consume): super().__init__(to_consume, string)
trigaten/DAIDE
src/DAIDE/utils/descend.py
# def get_leaf_descendents(class_): # leaf_descendants = [] # for descendent in class_.__subclasses__(): # leaf_descendants.append(descendent) # leaf_descendants = leaf_descendants + get_leaf_descendents(descendent) # return leaf_descendants # if __name__ == "__main__": # from DAIDE....
DaleMcGrew/WeVoteServer
import_export_targetsmart/controllers.py
# import_export_targetsmart/controllers.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from .models import TargetSmartApiCounterManager from config.base import get_environment_variable from exception.models import handle_exception, handle_record_found_more_than_one_exception import json import reques...
DaleMcGrew/WeVoteServer
import_export_ballotpedia/models.py
<reponame>DaleMcGrew/WeVoteServer # import_export_ballotpedia/models.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from datetime import date, timedelta from django.db import models from wevote_functions.functions import convert_to_int, positive_value_exists class BallotpediaApiCounter(models.Mode...
abrolon87/journal-app
journal_entries/apps.py
from django.apps import AppConfig class JournalEntriesConfig(AppConfig): name = 'journal_entries'
abrolon87/journal-app
ja_env/lib/python3.7/site-packages/pry.py
from __future__ import print_function import code import types import inspect import sys import tempfile import re import shutil import struct import fcntl VERSION = "0.1.1" try: import termios except ImportError: termios = None try: import pygments import pygments.lexers import pygments.formatt...
MrSupW/Compute-Your-Code-Rows
main.py
import os parent_dir_path = './' total_rows = 0 total_files = 0 def walkInDir(dir_path): global total_rows, total_files for f_path, dirs, files in os.walk(dir_path): for dir in dirs: walkInDir(os.path.join(dir_path, dir)) for file in files: if file.split(".")[-1] in ['...
adambkaplan/jenkins
smoke/features/steps/steps.py
<filename>smoke/features/steps/steps.py # @mark.steps # ---------------------------------------------------------------------------- # STEPS: # ---------------------------------------------------------------------------- import os import time import urllib3 from behave import given, when, then from pyshould import shou...
feliciatrinh/speech-to-intent-benchmark
benchmark/plot.py
import matplotlib.pyplot as plt import numpy as np aws_cafe = np.array([0.70, 0.80, 0.85, 0.86, 0.87, 0.87, 0.87]) aws_kitchen = np.array([0.79, 0.83, 0.85, 0.86, 0.87, 0.87, 0.87]) aws = (aws_cafe + aws_kitchen) / 2. df_cafe = np.array([0.63, 0.70, 0.75, 0.78, 0.79, 0.80, 0.81]) df_kitchen = np.array([0.69, 0.73, 0....
feliciatrinh/speech-to-intent-benchmark
benchmark/mixer.py
<filename>benchmark/mixer.py import os import shutil import sys import numpy as np import soundfile def _path(x): return os.path.join(os.path.dirname(__file__), '../%s' % x) def _max_frame_energy(pcm, frame_length=2048): num_frames = pcm.size // frame_length pcm_frames = pcm[:(num_frames * frame_lengt...
chhshen/vowpal_wabbit
python/pyvw.py
<filename>python/pyvw.py import pylibvw class vw(pylibvw.vw): """The pyvw.vw object is a (trivial) wrapper around the pylibvw.vw object; you're probably best off using this directly and ignoring the pylibvw.vw structure entirely.""" def __init__(self, argString=""): """Initialize the vw ob...
shanakaprageeth/ml_examples
gcloud_ai_keras/keras_model.py
import os from six.moves import urllib import tempfile import numpy as np import pandas as pd import tensorflow as tf from matplotlib import pyplot as plt # Examine software versions print(__import__('sys').version) print(tf.__version__) print(tf.keras.__version__) ### For downloading data ### # Storage directory ...
shanakaprageeth/ml_examples
gcloud_ai_keras/prefilter.py
<reponame>shanakaprageeth/ml_examples from trainer import util import pandas as pd import json # load prefiltered data _, _, eval_x, eval_y = util.load_data() prediction_input = eval_x.sample(20) prediction_targets = eval_y[prediction_input.index] #print sample prediction_input #download raw data _, eval_file_path ...
Matteljay/clipcommander
setup.py
#!/usr/bin/env python3 # to install directly, invoke via pip: sudo pip3 install . # packages for PyPI.org: ./setup.py sdist bdist_wheel && twine upload dist/* import setuptools import os, sys, re from pathlib import Path mainscript = 'clipcommander.py' resources = [] for fil in (f for f in Path('data').rglob('*') if ...
Matteljay/clipcommander
clipcommander.py
<reponame>Matteljay/clipcommander #!/usr/bin/env python3 # -*- mode: python -*- # # ClipCommander - Clipboard selection monitor YouTube-dl GUI front-end # Copyright (C) 2018 Matteljay-at-pm-dot-me # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated document...
mchirico/Cipher
tests/test_advanced.py
# -*- coding: utf-8 -*- from .context import clib from clib.util.cipher import Cipher from unittest import TestCase class AdvancedTestSuite(TestCase): """Advanced test cases.""" def test_thoughts(self): self.assertIsNone(clib.hmm()) def test_cipher(self): cipher = Cipher() shif...
YiminGao0113/MiniDiscord
test.py
import smtplib, ssl port = 465 # For SSL smtp_server = "smtp.gmail.com" sender_email = "<EMAIL>" # Enter your address receiver_email = "<EMAIL>" # Enter receiver address password = "<PASSWORD>" message = """\ Subject: Hi there This message is sent from Python.""" context = ssl.create_default_context() with smtpl...
YiminGao0113/MiniDiscord
app.py
from flask import Flask, render_template, redirect, url_for, flash, request, session, jsonify from flask_bootstrap import Bootstrap from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField from wtforms.validators import InputRequired, Email, Length, DataRequired import email_validato...