code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ChiralTetrahedral(Tetrahedral): <NEW_LINE> <INDENT> index = 2 <NEW_LINE> order = 12 <NEW_LINE> mirrors = 1 <NEW_LINE> def fundamental_domain(self): <NEW_LINE> <INDENT> return self.chiral()
Chiral Tetrahedral symmetry This is the symmetry group used by Escher's 'Sphere with Fish' This group is an interesting one, for having a very large fundamental domain. This makes that the curvature of the sphere plays a large role in how the tiles fit together
62599050a219f33f346c7c97
class EmbeddingLayer(object): <NEW_LINE> <INDENT> def __init__(self, vocabulary_size, embedding_size, hidden_size, float_dtype, name): <NEW_LINE> <INDENT> self.vocabulary_size = vocabulary_size <NEW_LINE> self.hidden_size = hidden_size <NEW_LINE> self.float_dtype = float_dtype <NEW_LINE> self.name = name <NEW_LINE> sel...
Looks up embeddings for the specified token sequence in the learned embedding table; allows for easy weight scaling and tying.
62599050d99f1b3c44d06b30
class ITaskTemplateFolderSchema(model.Schema): <NEW_LINE> <INDENT> model.fieldset( u'common', label=_(u'fieldset_common', default=u'Common'), fields=[u'sequence_type', 'text']) <NEW_LINE> directives.order_after(sequence_type='IOpenGeverBase.description') <NEW_LINE> sequence_type = schema.Choice( title=_(u'label_sequenc...
Marker Schema for TaskTemplateFolder
62599050d6c5a102081e35b4
class TestLPS(unittest.TestCase): <NEW_LINE> <INDENT> def test_empty_string(self): <NEW_LINE> <INDENT> assert lps("") == 0 <NEW_LINE> <DEDENT> def test_single_char(self): <NEW_LINE> <INDENT> assert lps("a") == 1 <NEW_LINE> assert lps("k") == 1 <NEW_LINE> <DEDENT> def test_two_chars(self): <NEW_LINE> <INDENT> assert lps...
Test cases for lps function
625990508da39b475be0467b
class _basefilecache(scmutil.filecache): <NEW_LINE> <INDENT> def __get__(self, repo, type=None): <NEW_LINE> <INDENT> if repo is None: <NEW_LINE> <INDENT> return self <NEW_LINE> <DEDENT> return super(_basefilecache, self).__get__(repo.unfiltered(), type) <NEW_LINE> <DEDENT> def __set__(self, repo, value): <NEW_LINE> <IN...
All filecache usage on repo are done for logic that should be unfiltered
62599050f7d966606f749300
class TableFileHandleResults(ModelNormal): <NEW_LINE> <INDENT> allowed_values = { } <NEW_LINE> validations = { } <NEW_LINE> additional_properties_type = None <NEW_LINE> _nullable = False <NEW_LINE> @cached_property <NEW_LINE> def openapi_types(): <NEW_LINE> <INDENT> lazy_import() <NEW_LINE> return { 'headers': ([Select...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Attributes: allowed_values (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict with a capitalized key describing the a...
625990508da39b475be0467c
class HeaderMessage(StatusMessage): <NEW_LINE> <INDENT> def __init__(self, message, status=None): <NEW_LINE> <INDENT> horiz_lines = max(len(message) + 10, 80) <NEW_LINE> new_message = ( "{:^{spacing}}\n".format(message, spacing=horiz_lines) + '–' * horiz_lines ) <NEW_LINE> super().__init__(new_message, status)
Extends StatusMessage with a border around the message
62599050b57a9660fecd2f13
class GreedyAgent(AgentBase): <NEW_LINE> <INDENT> def __init__(self, env): <NEW_LINE> <INDENT> self.env = env <NEW_LINE> self.name = "Greedy" <NEW_LINE> <DEDENT> def act(self): <NEW_LINE> <INDENT> flip_num = self.env.num_disks_can_filp(self.env.turn) <NEW_LINE> max_flips_index = np.argwhere(flip_num == flip_num.max()) ...
Represents a Snake agent that takes a random action at every step.
62599050d7e4931a7ef3d50f
class RecuperationDeadline(Deadline.Deadline): <NEW_LINE> <INDENT> def __init__(self,nom,description,heure): <NEW_LINE> <INDENT> self.nom = nom <NEW_LINE> self.description = description <NEW_LINE> self.mon_deadline = heure
this class was created in order to allow me to create deadline in a different way by retrieving data entered by the user in a file
62599050462c4b4f79dbce96
class SchoolLocationView(ListAPIView): <NEW_LINE> <INDENT> serializer_class = SchoolLocationSerializer <NEW_LINE> filter_class = SchoolLocationFilter <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> region = self.kwargs['region'] <NEW_LINE> return SchoolLocation.objects.filter(region__name=region)
This is a read-only view that represents `SchoolLocation`. get: Returns a list of all available schools in the given region. Provides filters for `district`.
625990503c8af77a43b68989
class AllRoutes(View): <NEW_LINE> <INDENT> model = Schedule <NEW_LINE> form_class = RouteCreation <NEW_LINE> template_name = 'trains_schedule/trains.html' <NEW_LINE> context_object_name = 'schedule_list' <NEW_LINE> def get(self, request, train_id=None): <NEW_LINE> <INDENT> if train_id: <NEW_LINE> <INDENT> train = get_o...
Класс отвечающий за вывод информации о маршрутах, /schedule/trains/ - все маршруты /schedule/trains/19 - информация по конкретному маршруту Так же обрабатывает запросы на изменение/удаление маршрута
62599050d6c5a102081e35b5
class DataType(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100) <NEW_LINE> s_desc = models.CharField(max_length=200, verbose_name='short_description', help_text='A concise description of the file format, for quick orientation') <NEW_LINE> desc = models.CharField(max_length=2000, verbose_name='...
A dimension alteredand the experiment, e.g. time since some event, concnentration of some molecule in medium, etc.
62599050fff4ab517ebcecb4
@implementer(IOpenSSLClientConnectionCreator) <NEW_LINE> class ClientTLSOptions: <NEW_LINE> <INDENT> def __init__(self, hostname: str, ctx: SSL.Context): <NEW_LINE> <INDENT> self._ctx = ctx <NEW_LINE> if isIPAddress(hostname) or isIPv6Address(hostname): <NEW_LINE> <INDENT> self._hostnameBytes = hostname.encode("ascii")...
Client creator for TLS without certificate identity verification. This is a copy of twisted.internet._sslverify.ClientTLSOptions with the identity verification left out. For documentation, see the twisted documentation.
6259905010dbd63aa1c72075
class TemplateManager(LabfluenceBase): <NEW_LINE> <INDENT> def __init__(self, confighandler, server=None): <NEW_LINE> <INDENT> LabfluenceBase.__init__(self, confighandler, server) <NEW_LINE> self.Cache = dict() <NEW_LINE> confighandler.Singletons['templatemanager'] = self <NEW_LINE> <DEDENT> def get(self, templatetype)...
TemplateManager is responsible for locating templates, either locally or from the wiki server. The templates may be cached (if enabled in config). to improve performance.
625990500fa83653e46f6376
class BeauticianKind(BaseKind): <NEW_LINE> <INDENT> nickName = ndb.StringProperty() <NEW_LINE> compEval = ndb.FloatProperty() <NEW_LINE> pr = ndb.IntegerProperty() <NEW_LINE> totalPoint = ndb.IntegerProperty(default=0) <NEW_LINE> gender = ndb.IntegerProperty() <NEW_LINE> birthday = ndb.DateProperty() <NEW_LINE> license...
美容師情報
625990507b25080760ed8729
class ArticleDataSource(TemplateDataSource): <NEW_LINE> <INDENT> _BASE = ARTICLES_TEMPLATES
Serves templates for Articles.
62599050a219f33f346c7c99
class TestMozmillAPI(unittest.TestCase): <NEW_LINE> <INDENT> def make_test(self): <NEW_LINE> <INDENT> test = """var test_something = function() {}""" <NEW_LINE> fd, path = tempfile.mkstemp() <NEW_LINE> os.write(fd, test) <NEW_LINE> os.close(fd) <NEW_LINE> return path <NEW_LINE> <DEDENT> def test_runtwice(self): <NEW_LI...
test mozmill's API
6259905015baa72349463424
class TestFixedAddressApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = ibcsp_ipamsvc.api.fixed_address_api.FixedAddressApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_fixed_address_create(self): <NEW_LINE> <INDENT> pass <NEW_...
FixedAddressApi unit test stubs
625990507d847024c075d86c
class PublicViewTest(TestBase): <NEW_LINE> <INDENT> def test_public_front_page_view(self): <NEW_LINE> <INDENT> response = self.testapp.get('/') <NEW_LINE> self.assertEqual(response.status_int, 200) <NEW_LINE> <DEDENT> def test_public_about_page_view(self): <NEW_LINE> <INDENT> for page in ['/about', '/about/?doc=terms',...
test that the public views are implemented and functioning correctly
6259905063b5f9789fe86606
class ProgressBar: <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> if args: <NEW_LINE> <INDENT> self._maxLength = str(args[0]) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._maxLength = None <NEW_LINE> <DEDENT> self._input = None <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> if self...
a simple progress handler to monitor the status of some process
6259905045492302aabfd96c
class VOIEWithInterviewData(object): <NEW_LINE> <INDENT> _names = { "txverify_interview":'txVerifyInterview', "extract_earnings":'extractEarnings', "extract_deductions":'extractDeductions', "extract_direct_deposit":'extractDirectDeposit' } <NEW_LINE> def __init__(self, txverify_interview=None, extract_earnings=True, ex...
Implementation of the 'VOIE With Interview Data' model. TODO: type model description here. Attributes: txverify_interview (list of TxverifyInterview): An array of txVerifyInterview objects. extract_earnings (bool): Field to indicate whether to extract the earnings on all pay statements. This i...
62599050435de62698e9d296
class PublicTransportData(object): <NEW_LINE> <INDENT> def __init__(self, journey): <NEW_LINE> <INDENT> self.start = journey[0] <NEW_LINE> self.destination = journey[1] <NEW_LINE> self.times = {} <NEW_LINE> <DEDENT> def update(self): <NEW_LINE> <INDENT> response = requests.get( _RESOURCE + 'connections?' + 'from=' + se...
The Class for handling the data retrieval.
62599050dd821e528d6da373
class CartItem(models.Model): <NEW_LINE> <INDENT> cart_id = models.CharField(max_length=50) <NEW_LINE> date_added = models.DateTimeField(auto_now_add=True) <NEW_LINE> quantity = models.IntegerField(default=1) <NEW_LINE> product = models.ForeignKey('catalog.Product', unique=False) <NEW_LINE> class Meta: <NEW_LINE> <INDE...
Model for a cart item.
6259905007d97122c421813d
class Shoter: <NEW_LINE> <INDENT> def __init__(self, width=1280, height=720): <NEW_LINE> <INDENT> options = Options() <NEW_LINE> options.add_argument('--headless') <NEW_LINE> options.add_argument('--disable-dev-shm-usage') <NEW_LINE> driver = 'chromium.chromedriver' <NEW_LINE> path = '/snap/bin/chromium.chromedriver' <...
class able to record screenshots from slenium webdriver
6259905099cbb53fe683237e
class SourcePackageCopyrightView(LaunchpadView): <NEW_LINE> <INDENT> page_title = "Copyright" <NEW_LINE> @property <NEW_LINE> def label(self): <NEW_LINE> <INDENT> return smartquote("Copyright for " + self.context.title)
A view to display a source package's copyright information.
6259905076e4537e8c3f0a1f
class ArtifactTagProperties(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'registry_login_server': {'required': True, 'readonly': True}, 'repository_name': {'required': True, 'readonly': True}, 'name': {'required': True, 'readonly': True}, 'digest': {'required': True, 'readonly': True}, 'created_on':...
Tag attributes. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar registry_login_server: Required. Registry login server name. This is likely to be similar to {registry-name}.azurecr.io. :vartype registr...
6259905094891a1f408ba141
class CodeBlockProcessor(BlockProcessor): <NEW_LINE> <INDENT> def test(self, parent, block): <NEW_LINE> <INDENT> return block.startswith(' '*self.tab_length) <NEW_LINE> <DEDENT> def run(self, parent, blocks): <NEW_LINE> <INDENT> sibling = self.lastChild(parent) <NEW_LINE> block = blocks.pop(0) <NEW_LINE> theRest = '' <...
Process code blocks.
62599050435de62698e9d297
class PizzaToppin(models.Model): <NEW_LINE> <INDENT> id_pizza = models.ForeignKey(Pizza, on_delete=models.DO_NOTHING, verbose_name="Pizza") <NEW_LINE> id_toppin = models.ForeignKey(Toppin, on_delete=models.DO_NOTHING, verbose_name="Toppin") <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return '{}'.format(self.id_to...
Model: PizzaToppin Tabla: PizzaToppin Compone las relaciones de la pizza y los toppins que se le asignan Numero de id_pizza y Numero del id_toppin
6259905023e79379d538d995
class CustomORJSONResponse(ORJSONResponse): <NEW_LINE> <INDENT> def render(self, content: Any) -> bytes: <NEW_LINE> <INDENT> assert orjson is not None, "orjson must be installed to use ORJSONResponse" <NEW_LINE> return orjson.dumps( content, option=orjson.OPT_PASSTHROUGH_DATETIME, default=default )
Custom orjson response with a custom format for datetimes orjson defaults to outputing datetime objects in RFC 3339 format: `1970-01-01T00:00:00+00:00` with this, we simply output the string representation of the python datetime object: `1970-01-01 00:00:00` see: https://github.com/ijl/orjson#opt_passthr...
6259905016aa5153ce401987
class MathOperation(Expression): <NEW_LINE> <INDENT> __slots__ = 'left', 'operator', 'right' <NEW_LINE> OPERATORS = ('*', '/', '%', '+', '-') <NEW_LINE> func_lookup = {"*": "multiply", "+": "add", "-": "subtract", "%": "modulo", "/": "divide"} <NEW_LINE> min_precedence = NamedSubquery.precedence + 1 <NEW_LINE> max_prec...
Mathematical operation between two numeric values.
6259905024f1403a9268631a
class DNAPlugin(Plugin): <NEW_LINE> <INDENT> def __init__(self, instance, dn="cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config"): <NEW_LINE> <INDENT> super(DNAPlugin, self).__init__(instance, dn)
A single instance of Distributed Numeric Assignment plugin entry :param instance: An instance :type instance: lib389.DirSrv :param dn: Entry DN :type dn: str
6259905076d4e153a661dcc5
class Sablon(object): <NEW_LINE> <INDENT> def __init__(self, template): <NEW_LINE> <INDENT> self.template = template <NEW_LINE> self.returncode = None <NEW_LINE> self.stdout = None <NEW_LINE> self.stderr = None <NEW_LINE> self.file_data = None <NEW_LINE> <DEDENT> def process(self, json_data, namedblobfile=None): <NEW_L...
Integrate word document template processor. See https://github.com/senny/sablon
62599050d99f1b3c44d06b34
class uavcangen(Task.Task): <NEW_LINE> <INDENT> color = 'BLUE' <NEW_LINE> before = 'cxx c' <NEW_LINE> def run(self): <NEW_LINE> <INDENT> python = self.env.get_flat('PYTHON') <NEW_LINE> out = self.env.get_flat('OUTPUT_DIR') <NEW_LINE> src = self.env.get_flat('SRC') <NEW_LINE> dsdlc = self.env.get_flat("DSDL_COMPILER"...
generate uavcan header files
62599050b57a9660fecd2f16
class SigCertConstraintFlags(Flag): <NEW_LINE> <INDENT> SUBJECT = 1 <NEW_LINE> ISSUER = 2 <NEW_LINE> OID = 4 <NEW_LINE> SUBJECT_DN = 8 <NEW_LINE> RESERVED = 16 <NEW_LINE> KEY_USAGE = 32 <NEW_LINE> URL = 64 <NEW_LINE> UNSUPPORTED = RESERVED | OID
Flags for the ``/Ff`` entry in the certificate seed value dictionary for a dictionary field. These mark which of the constraints are to be strictly enforced, as opposed to optional ones. .. warning:: While this enum records values for all flags, not all corresponding constraint types have been implemented yet.
62599050498bea3a75a58fbb
class PlayerAI(character.Character): <NEW_LINE> <INDENT> movements = {0:UP, 1:DOWN, 2:RIGHT, 3:LEFT} <NEW_LINE> def __init__(self, position, world,sprite, with_animation=True): <NEW_LINE> <INDENT> super().__init__(position,world,sprite, with_animation) <NEW_LINE> tf.reset_default_graph() <NEW_LINE> tf.set_random_seed(4...
Class used for the characters of the game
625990508e7ae83300eea52c
class ExcludeState(object): <NEW_LINE> <INDENT> def __init__(self, *states): <NEW_LINE> <INDENT> self.not_allowed_states = states <NEW_LINE> <DEDENT> def __call__(self, window): <NEW_LINE> <INDENT> state = window.state <NEW_LINE> for not_allowed_state in self.not_allowed_states: <NEW_LINE> <INDENT> if not_allowed_state...
Return only windows without specified types.
62599050a79ad1619776b509
class Prototype(Vowel.Vowel): <NEW_LINE> <INDENT> def __init__(self, e1, e2, length, name): <NEW_LINE> <INDENT> super(Prototype, self).__init__(e1, e2, length, name) <NEW_LINE> self.carriers = 1 <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> f1, f2 = self.to_hz_praat(self.e1, self.e2) <NEW_LINE> f1 = int(f1...
Prototype class *Vowel subclass* A Prototype indicates the average f1/f2 position, length of a vowel and the number of carriers (Agents) i.e. the conventional representation of a vowel for some population. Prototypes are formed by collecting Vowels from agents.
62599050287bf620b6273084
class gcPersonView(BrowserView): <NEW_LINE> <INDENT> implements(IgcPersonView) <NEW_LINE> def __init__(self, context, request): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> self.request = request <NEW_LINE> <DEDENT> @property <NEW_LINE> def portal_catalog(self): <NEW_LINE> <INDENT> return getToolByName(self.co...
gcPerson browser view
6259905063d6d428bbee3c67
class ReceivingItemView(Viewable): <NEW_LINE> <INDENT> branch = Branch <NEW_LINE> id = ReceivingOrderItem.id <NEW_LINE> order_identifier = ReceivingOrder.identifier <NEW_LINE> purchase_identifier = PurchaseOrder.identifier <NEW_LINE> purchase_item_id = ReceivingOrderItem.purchase_item_id <NEW_LINE> sellable_id = Receiv...
Stores information about receiving items. This view is used to query products that are going to be received or was already received and the information related to that process. :cvar id: the id of the receiving item :cvar order_identifier: the identifier of the receiving order :cvar purchase_identifier: the identifier...
62599050e76e3b2f99fd9e9a
class Brew(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=50) <NEW_LINE> bubble_sensor_gpio = models.SmallIntegerField(blank=True, null=True) <NEW_LINE> start_time = models.DateTimeField(default=timezone.now) <NEW_LINE> finished = models.BooleanField(default=False) <NEW_LINE> def bubbles_in_inter...
A brew class
62599050d7e4931a7ef3d513
class History(list): <NEW_LINE> <INDENT> def new_epoch(self): <NEW_LINE> <INDENT> self.append({'batches': []}) <NEW_LINE> <DEDENT> def new_batch(self): <NEW_LINE> <INDENT> self[-1]['batches'].append({}) <NEW_LINE> <DEDENT> def record(self, attr, value): <NEW_LINE> <INDENT> msg = "Call new_epoch before recording for the...
History contains the information about the training history of a NeuralNet, facilitating some of the more common tasks that are occur during training. When you want to log certain information during training (say, a particular score or the norm of the gradients), you should write them to the net's history object. It ...
62599050dd821e528d6da375
class FakeDBSubjectLock(data_store.DBSubjectLock): <NEW_LINE> <INDENT> def _Acquire(self, lease_time): <NEW_LINE> <INDENT> self.expires = int((time.time() + lease_time) * 1e6) <NEW_LINE> with self.store.lock: <NEW_LINE> <INDENT> expires = self.store.transactions.get(self.subject) <NEW_LINE> if expires and (time.time() ...
A fake transaction object for testing.
625990508e71fb1e983bcf60
class RequestRedirect(werkzeug.routing.RequestRedirect): <NEW_LINE> <INDENT> code = 302
Used for redirection from within nested calls. Note: We avoid using 308 to avoid permanent
6259905096565a6dacd2d9d6
class FileSystemResponse(object): <NEW_LINE> <INDENT> swagger_types = { 'items': 'list[FileSystem]' } <NEW_LINE> attribute_map = { 'items': 'items' } <NEW_LINE> required_args = { } <NEW_LINE> def __init__( self, items=None, ): <NEW_LINE> <INDENT> if items is not None: <NEW_LINE> <INDENT> self.items = items <NEW_LINE> <...
Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition.
6259905010dbd63aa1c72079
class DirectConn: <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> self.db = config['Main']['inv_db'] <NEW_LINE> self.dbConn, self.cur = self._connect2db() <NEW_LINE> <DEDENT> def _connect2db(self): <NEW_LINE> <INDENT> logging.debug("Creating Datastore object and cursor") <NEW_LINE> if os.path.isfile...
This class will set up a direct connection to the database. It allows to reset the database, in which case the database will be dropped and recreated, including all tables.
62599050e5267d203ee6cd86
class BaseNNLayer: <NEW_LINE> <INDENT> BATCH_SIZE = 64 <NEW_LINE> @staticmethod <NEW_LINE> def lrelu(x, alpha=0.2): <NEW_LINE> <INDENT> return tf.maximum(alpha*x, x) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def weight_variable(shape, stddev=.1): <NEW_LINE> <INDENT> init = tf.truncated_normal(shape=shape, stddev=std...
A basic NN layer containing definitions of general functions
62599050d53ae8145f9198fe
class _CommandLatticePopulateChildren_Array: <NEW_LINE> <INDENT> def GetResources(self): <NEW_LINE> <INDENT> return {'Pixmap' : getIconPath("Lattice2_PopulateChildren_Array.svg"), 'MenuText': QtCore.QT_TRANSLATE_NOOP("Lattice2_PopulateChildren","Populate with Children: Build Array"), 'Accel': "", 'ToolTip': QtCore.QT_...
Command to create LatticePopulateChildren feature
625990507b25080760ed872b
class OpenvswitchMechanismDriver(mech_agent.SimpleAgentMechanismDriverBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(OpenvswitchMechanismDriver, self).__init__( constants.AGENT_TYPE_OVS, portbindings.VIF_TYPE_OVS, {portbindings.CAP_PORT_FILTER: True, portbindings.OVS_HYBRID_PLUG: True}) <NEW_L...
Attach to networks using openvswitch L2 agent. The OpenvswitchMechanismDriver integrates the ml2 plugin with the openvswitch L2 agent. Port binding with this driver requires the openvswitch agent to be running on the port's host, and that agent to have connectivity to at least one segment of the port's network.
62599050a219f33f346c7c9d
class CSVDataLine: <NEW_LINE> <INDENT> def __init__(self, name: str, date: str, occurrence: int) -> None: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> test_val = int(occurrence) <NEW_LINE> <DEDENT> except ValueError: <NEW_LINE> <INDENT> print("Occurence should be and integer value!") <NEW_LINE> <DEDENT> if len(date) !=...
Class that specifies the look of data line in processed csv file prepared for database
6259905007d97122c4218140
class Bond(namedtuple("Bond", ["tail", "head"])): <NEW_LINE> <INDENT> def __contains__(self, item): <NEW_LINE> <INDENT> if isinstance(item, BondGraphBase): <NEW_LINE> <INDENT> return self.head[0] is item or self.tail[0] is item <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> c, i = item <NEW_LINE> return any(c == comp and...
Stores the connection between two ports. Head and tail are specified to determine orientation Attributes: head: The 'harpoon' end of the power bond and direction of positive $f$ tail: The non-harpoon end, and direction of negative $f$
625990507cff6e4e811b6ed7
class TypeLookup(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.uuid = False <NEW_LINE> self.label = False <NEW_LINE> self.project_uuid = False <NEW_LINE> self.predicate_uuid = False <NEW_LINE> self.predicate_label = False <NEW_LINE> self.content_uuid = False <NEW_LINE> self.content = False <NEW_LI...
Class for helping with derefencing type entities
62599050d6c5a102081e35b9
class Class_Base(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.any_base_class = False <NEW_LINE> <DEDENT> def has_any_base(self): <NEW_LINE> <INDENT> return self.any_base_class
The types of global class variables are kept here.
6259905030dc7b76659a0cca
class TemporaryUserGroup(DeclarativeBase): <NEW_LINE> <INDENT> __tablename__ = "user_group" <NEW_LINE> group_id = Column(Integer, primary_key=True) <NEW_LINE> user_id = Column(Integer, primary_key=True)
temporary sqlalchemy object to help migration
6259905029b78933be26ab10
class PlatformComponent(object): <NEW_LINE> <INDENT> def __init__(self, get_func): <NEW_LINE> <INDENT> self.get_func = get_func <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.instance = self.get_func() <NEW_LINE> return self.instance <NEW_LINE> <DEDENT> def __exit__(self, etype, value, trace): <NEW_L...
Context manager to safely handle platform components.
62599050f7d966606f749303
class Assignment(base.Assignment): <NEW_LINE> <INDENT> implements(Iprezencka) <NEW_LINE> users = [] <NEW_LINE> def __init__(self, header="Prezenčka", dateBool=False): <NEW_LINE> <INDENT> self.header = header <NEW_LINE> self.dateBool = dateBool <NEW_LINE> self.users = [] <NEW_LINE> <DEDENT> @property <NEW_LINE> def titl...
Portlet assignment. This is what is actually managed through the portlets UI and associated with columns.
6259905023849d37ff85255a
class ARFieldMappingList(Structure): <NEW_LINE> <INDENT> _fields_ = [ ('numItems', c_uint), ('mappingList', POINTER(ARFieldMappingStruct)) ]
"List of 0 or more field mappings (ar.h line 5502).
62599050287bf620b6273086
class VariableValue(Callback): <NEW_LINE> <INDENT> def __init__(self, var_list, period=1, filename=None, precision=2): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.var_list = var_list if isinstance(var_list, list) else [var_list] <NEW_LINE> self.period = period <NEW_LINE> self.precision = precision <NEW_LINE>...
Get the variable values. Args: var_list: A `TensorFlow Variable <https://www.tensorflow.org/api_docs/python/tf/Variable>`_ or a list of TensorFlow Variable. period (int): Interval (number of epochs) between checking values. filename (string): Output the values to the file `filename`. The fi...
6259905063b5f9789fe8660a
class BKTransaction(ATCTContent): <NEW_LINE> <INDENT> schema = BKTransactionSchema <NEW_LINE> __implements__ = (ATCTContent.__implements__) <NEW_LINE> implements(IBKTransaction) <NEW_LINE> meta_type = 'BKTransaction' <NEW_LINE> portal_type = 'BKTransaction' <NEW_LINE> archetype_name = 'BKTransaction' <NEW_LINE> _at_ren...
a transaction record.
62599050d53ae8145f9198ff
class Solution: <NEW_LINE> <INDENT> def findDiagonalOrder(self, matrix: List[List[int]]) -> List[int]: <NEW_LINE> <INDENT> result = [] <NEW_LINE> m = len(matrix) <NEW_LINE> if not m: return result <NEW_LINE> dd = defaultdict(list) <NEW_LINE> for i in range(m): <NEW_LINE> <INDENT> n = len(matrix[i]) <NEW_LINE> for j in ...
Runtime: 196 ms, faster than 46.02% of Python3 Memory Usage: 17.2 MB, less than 5.05% of Python3
62599050a8ecb033258726af
class GMRES(SolverTag): <NEW_LINE> <INDENT> def vcl_solve_call(self, *args): <NEW_LINE> <INDENT> return _v.iterative_solve(*args) <NEW_LINE> <DEDENT> def __init__(self, tolerance=1e-8, max_iterations=300, krylov_dim=20): <NEW_LINE> <INDENT> self.vcl_tag = _v.gmres_tag(tolerance, max_iterations, krylov_dim) <NEW_LINE> <...
Instruct the solver to solve using the GMRES solver. Used for supplying solver parameters.
62599050d486a94d0ba2d461
class Random(Actor): <NEW_LINE> <INDENT> @manage(['lower', 'upper']) <NEW_LINE> def init(self, lower, upper): <NEW_LINE> <INDENT> self.lower = lower <NEW_LINE> self.upper = upper <NEW_LINE> self.setup() <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> self.use('calvinsys.math.rng', shorthand="random") <NEW_LINE...
Produce random integer in range [lower ... upper-1] Inputs: trigger : Any token Outputs: integer : Random integer in range [lower ... upper-1]
62599050b830903b9686eec9
class TestAlignmentErrored(TestAlignment): <NEW_LINE> <INDENT> def test_error(self): <NEW_LINE> <INDENT> self.assertEqual(self.aln.error, "Whoops")
Test an Alignment with an error.
625990500fa83653e46f637c
class Search (GeneaProveModel): <NEW_LINE> <INDENT> activity = models.ForeignKey(Activity, null=True, on_delete=models.CASCADE) <NEW_LINE> source = models.ForeignKey( Source, null=True, help_text="The source in which the search was conducted. It could" " be null if this was a general search in a repository for" " insta...
A specific examination of a source to find information. This is usually linked to a research_objective, through an activity, but not necessarily, if for instance this is an unexpected opportunity
625990506fece00bbaccce58
class BufferTree(gtkextra.Tree): <NEW_LINE> <INDENT> YPAD = 2 <NEW_LINE> XPAD = 2 <NEW_LINE> COLUMNS = [('icon', gtk.gdk.Pixbuf, gtk.CellRendererPixbuf, True, 'pixbuf'), ('name', gobject.TYPE_STRING, gtk.CellRendererText, True, 'markup'), ('file', gobject.TYPE_STRING, None, False, None), ('number', gobject.TYPE_INT, No...
Tree view control for buffer list. The displayed columns are the icon and shortened name. @var YPAD: Increase the default y-padding @var XPAD: Increase the default x-padding @var COLUMNS: The column template
62599050d99f1b3c44d06b38
class Gimmick_Battery(Gimmick): <NEW_LINE> <INDENT> def __init__(self, fobj): <NEW_LINE> <INDENT> self.param_names = ('polarity', 'is_toggle', 'target_id', 'param3', 'param4', 'param5') <NEW_LINE> super(Gimmick_Battery, self).__init__(fobj) <NEW_LINE> self.name = 'Battery'
Gimmick # 22
62599050baa26c4b54d50748
class FlashMessageException(CFMEException): <NEW_LINE> <INDENT> def skip_and_log(self, message="Skipping due to flash message"): <NEW_LINE> <INDENT> logger.error("Flash message error: {}".format(str(self))) <NEW_LINE> pytest.skip("{}: {}".format(message, str(self)))
Raised by functions in :py:mod:`cfme.web_ui.flash`
6259905015baa7234946342a
class Solution: <NEW_LINE> <INDENT> def climbStairs(self, n): <NEW_LINE> <INDENT> if n < 0: <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> if n == 0: <NEW_LINE> <INDENT> return 1 <NEW_LINE> <DEDENT> if n <= 2: <NEW_LINE> <INDENT> return n <NEW_LINE> <DEDENT> prev_prev, prev = 1, 2 <NEW_LINE> result = None <NEW_LINE> ...
@param n: An integer @return: An integer
62599050009cb60464d029d7
class Team: <NEW_LINE> <INDENT> STATS = {'teamRoster': 0, 'personNames': 1, 'teamScheduleNext': 2, 'teamSchedulePrev': 3, 'teamStats': 4, 'teams': 5} <NEW_LINE> modifiers = {STATS['teamRoster']: 'expand=team.roster', STATS['personNames']: 'expand=person.names', STATS['teamScheduleNext']: 'expand=team.schedule.next', ST...
Team class for the nhlapi package
6259905071ff763f4b5e8c47
class TestCartesianToSpherical(unittest.TestCase): <NEW_LINE> <INDENT> def test_cartesian_to_spherical(self): <NEW_LINE> <INDENT> np.testing.assert_almost_equal( cartesian_to_spherical(np.array([3, 1, 6])), np.array([6.78232998, 1.08574654, 0.32175055]), decimal=7) <NEW_LINE> np.testing.assert_almost_equal( cartesian_t...
Defines :func:`colour.algebra.coordinates.transformations.cartesian_to_spherical` definition unit tests methods.
6259905076e4537e8c3f0a25
class StockOutTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.se = StockOut(None) <NEW_LINE> self.OP_CODE = self.se.get_opcodes().pop() <NEW_LINE> <DEDENT> def send_args(self, arg_string): <NEW_LINE> <INDENT> return self.se.parse_arguments(self.OP_CODE, arg_string, None) <NEW_LINE> <DEDENT...
All tests involving a the StockOut app.
62599050fff4ab517ebcecbc
class ScoreRecord(models.Model): <NEW_LINE> <INDENT> student = models.ForeignKey(to='Student', on_delete=models.CASCADE) <NEW_LINE> content = models.TextField(verbose_name='理由') <NEW_LINE> score = models.IntegerField(verbose_name='分值', help_text='违纪扣分,表现优秀加分') <NEW_LINE> user = models.ForeignKey(verbose_name='执行人', to=...
学分记录
625990507cff6e4e811b6edb
class Device(freestyle.FreeStyleHidDevice): <NEW_LINE> <INDENT> def get_meter_info(self): <NEW_LINE> <INDENT> return common.MeterInfo( 'FreeStyle Libre', serial_number=self.get_serial_number(), version_info=( 'Software version: ' + self._get_version(),), native_unit=self.get_glucose_unit()) <NEW_LINE> <DEDENT> def get_...
Glucometer driver for FreeStyle Libre devices.
62599050498bea3a75a58fc0
class Clock(Scheduler): <NEW_LINE> <INDENT> pass
Schedules stuff like a Scheduler, and includes time limiting functions WIP
62599050b7558d5895464977
class Output2Excl(object): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def process(cls, file, total_ent_list, sent_list, entity_relationship): <NEW_LINE> <INDENT> total_et = dict() <NEW_LINE> for entity_list in total_ent_list: <NEW_LINE> <INDENT> et_index = 0 <NEW_LINE> for entity in entity_list: <NEW_LINE> <INDENT> et...
将依存树解析结果输出到excel进行可视化
62599050d7e4931a7ef3d519
class ContextParserCache(Cache): <NEW_LINE> <INDENT> def get_context_parser(self, parser_module_name): <NEW_LINE> <INDENT> logger.debug("starting") <NEW_LINE> parser_function = self.get(parser_module_name, lambda: load_the_parser(parser_module_name)) <NEW_LINE> logger.debug("done") <NEW_LINE> return parser_function
Get functions from the pypeloader cache.
6259905071ff763f4b5e8c48
class copy_img(object): <NEW_LINE> <INDENT> def __init__(self, xml_dir, img_orginal_dir, img_copy_dir): <NEW_LINE> <INDENT> self.xml_dir = xml_dir <NEW_LINE> self.img_orginal_dir = img_orginal_dir <NEW_LINE> self.img_copy_dir = img_copy_dir <NEW_LINE> <DEDENT> def copy_imgs(self): <NEW_LINE> <INDENT> for file in tqdm(o...
按xml文件中的文件名称,从所有图片中拷贝部分至另一个文件夹
62599050e76e3b2f99fd9ea0
class Squirrel(models.Model): <NEW_LINE> <INDENT> AM, PM = 'AM', 'PM' <NEW_LINE> SHIFT_CHOICES = ((AM, 'AM'), (PM, 'PM')) <NEW_LINE> x = models.FloatField('X', help_text='Geo Latitude') <NEW_LINE> y = models.FloatField('Y', help_text='Geo Longitude') <NEW_LINE> unique_squirrel_id = models.CharField('Unique Squirrel ID'...
Model class for storing sighted squirrel information
625990508e71fb1e983bcf66
class TestList(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def testList(self): <NEW_LINE> <INDENT> model = swagger_client.models.list.List()
List unit test stubs
6259905063b5f9789fe8660e
class UnetSkipConnectionBlock(nn.Module): <NEW_LINE> <INDENT> def __init__(self, outer_nc, inner_nc, input_nc=None, submodule=None, outermost=False, innermost=False, norm_layer=nn.BatchNorm2d, use_dropout=False, conv=nn.Conv2d, deconv=nn.ConvTranspose2d): <NEW_LINE> <INDENT> super(UnetSkipConnectionBlock, self).__init_...
Unet Skip Connection built recursively by taking a submodule and generating a downsample and upsample block over it. These blocks are then connected in a short circuit.
6259905094891a1f408ba145
class VariableList(ListResource): <NEW_LINE> <INDENT> def __init__(self, version, service_sid, environment_sid): <NEW_LINE> <INDENT> super(VariableList, self).__init__(version) <NEW_LINE> self._solution = {'service_sid': service_sid, 'environment_sid': environment_sid, } <NEW_LINE> self._uri = '/Services/{service_sid}/...
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
62599050379a373c97d9a4cc
class Keys(NamedTuple): <NEW_LINE> <INDENT> pid: int <NEW_LINE> service: str
Dictionary key tuple.
62599050fff4ab517ebcecbe
class Front(SubredditListingMixin): <NEW_LINE> <INDENT> def __init__(self, reddit: Reddit): <NEW_LINE> <INDENT> super().__init__(reddit, _data=None) <NEW_LINE> self._path = "/" <NEW_LINE> <DEDENT> def best( self, **generator_kwargs: Union[str, int] ) -> Generator[Submission, None, None]: <NEW_LINE> <INDENT> return List...
Front is a Listing class that represents the front page.
6259905024f1403a9268631e
class ModelView(QWidget, Ui_ModelView): <NEW_LINE> <INDENT> __author__ = "Moritz Wade" <NEW_LINE> __contact__ = "wade@zib.de" <NEW_LINE> __copyright__ = "Zuse Institute Berlin 2011" <NEW_LINE> def __init__(self, parent, bioParkinController): <NEW_LINE> <INDENT> if not parent or not bioParkinController: <NEW_LINE> <INDE...
Provides a list widget that connects to the main BioPARKIN controller, displays all current models and allows to select any of them. It is hooked up to events of the BioPARKIN controller so it is only loosely coupled and not a necessary part of the UI at all (e.g. the NetworkView can also be used to show and select cur...
625990506fece00bbaccce5c
class Question(Base): <NEW_LINE> <INDENT> __tablename__ = 'questions' <NEW_LINE> id = Column( Integer, primary_key=True) <NEW_LINE> question_timestamp = Column( DateTime, nullable=False) <NEW_LINE> subject = Column( String, nullable=False) <NEW_LINE> text = Column( String, nullable=False) <NEW_LINE> reply_timestamp = C...
Class to store a private question from the user to the managers, and its answer.
62599050d99f1b3c44d06b3c
class Select(UnaryOperator): <NEW_LINE> <INDENT> def __init__(self, condition=None, input=None): <NEW_LINE> <INDENT> self.condition = condition <NEW_LINE> UnaryOperator.__init__(self, input) <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> return (UnaryOperator.__eq__(self, other) and self.condition == ...
Logical selection operator
6259905007f4c71912bb08d7
class TestKillProcess(unittest.TestCase): <NEW_LINE> <INDENT> def test_kill_process(self): <NEW_LINE> <INDENT> s = Solution() <NEW_LINE> self.assertEqual(sorted([5, 10]), sorted(s.killProcess([1, 3, 10, 5], [3, 0, 5, 3], 5)))
Test q582_kill_process.py
625990500c0af96317c577b1
class SonobuoyStatus: <NEW_LINE> <INDENT> def __init__(self, status_json: str): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> status = json.loads(status_json) <NEW_LINE> self.status: Status = Status(status["status"]) <NEW_LINE> self.tar_info: str = status["tar-info"] <NEW_LINE> self.plugins: Dict[str, Dict[str, Any]] = ...
A status output from the sonobuoy CLI.
625990508da39b475be04687
class Resume(base.Command): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> parsers.AddQueueResourceArg(parser, 'to resume') <NEW_LINE> <DEDENT> def Run(self, args): <NEW_LINE> <INDENT> queues_client = queues.Queues() <NEW_LINE> queue_ref = parsers.ParseQueue(args.queue) <NEW_LINE> qu...
Request to resume a paused or disabled queue.
62599050507cdc57c63a6241
class Weather: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.temperature = 70.0 <NEW_LINE> self.status = "sunny" <NEW_LINE> <DEDENT> def process_message(self, message): <NEW_LINE> <INDENT> value = message.value() <NEW_LINE> if value: <NEW_LINE> <INDENT> self.temperature = value.get("temperature") <NE...
Defines the Weather model
625990504e696a045264e871
class TestCopyableTraitNames( unittest.TestCase ): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> foo = Foo() <NEW_LINE> self.names = foo.copyable_trait_names() <NEW_LINE> return <NEW_LINE> <DEDENT> def test_events_not_copyable(self): <NEW_LINE> <INDENT> self.failIf( 'e' in self.names ) <NEW_LINE> <DEDENT> de...
Validate that copyable_trait_names returns the appropraite result.
62599050b57a9660fecd2f1f
class GeneratorIO(BufferedIOBase): <NEW_LINE> <INDENT> def __init__(self, generator, length=None): <NEW_LINE> <INDENT> self._generator = generator <NEW_LINE> self._next_chunk = bytearray() <NEW_LINE> self._length = length <NEW_LINE> <DEDENT> def read(self, num_bytes=None): <NEW_LINE> <INDENT> if self._next_chunk is Non...
Wrapper around a generator to act as a file-like object.
62599050e76e3b2f99fd9ea2
class SetupCommand(Command): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(SetupCommand, self).__init__( name='setup', help_short='Setup the build environment.', *args, **kwargs) <NEW_LINE> <DEDENT> def execute(self, args, cwd): <NEW_LINE> <INDENT> print('Setting up the build enviro...
'setup' command.
62599050dd821e528d6da37d
class StateMiddleware: <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> state = models.BaseVersionedModel.PUBLISHED <NEW_LINE> if request.user.is_staff: <NEW_LINE> <INDENT> state = request.session.get(SESSION_KEY, models.BaseVersionedModel.DRAFT) <NEW_LINE> <DEDENT> manager.activate(state) <N...
Middleware that sets state to published unless an active staff user is logged in and has flagged show drafts in their session.
62599050d486a94d0ba2d467
class MongoDB(Database): <NEW_LINE> <INDENT> def __init__(self, mongodburi): <NEW_LINE> <INDENT> self._description = 'mongo' <NEW_LINE> db_name = mongodburi[mongodburi.rfind('/') + 1:] <NEW_LINE> self._mongo = MongoClient(mongodburi)[db_name][COLLECTION] <NEW_LINE> <DEDENT> def __contains__(self, uid): <NEW_LINE> <INDE...
MongoDB abstraction.
625990503539df3088ecd744
class StudentUpdateView(UpdateView): <NEW_LINE> <INDENT> model = Student <NEW_LINE> template_name = 'students/students_edit.html' <NEW_LINE> form_class = StudentUpdateForm <NEW_LINE> def get_success_url(self): <NEW_LINE> <INDENT> return u'%s?success=1&status_message=Студента було успішно збережено!' % revers...
Class for editing students
62599050a219f33f346c7ca5
class Channel: <NEW_LINE> <INDENT> def __init__(self, reader, writer): <NEW_LINE> <INDENT> self.reader = reader <NEW_LINE> self.writer = writer <NEW_LINE> <DEDENT> def close(self): <NEW_LINE> <INDENT> self.writer.close()
encapsulate the (reader, writer) stream pair
62599050baa26c4b54d5074e
class ToolError(Exception): <NEW_LINE> <INDENT> pass
Exception raised for problems during tooling setup
62599050b5575c28eb71371b
class NewGameForm(messages.Message): <NEW_LINE> <INDENT> user_name = messages.StringField(1, required=True) <NEW_LINE> attempts = messages.IntegerField(2, default=6)
Used to create a new game
625990500c0af96317c577b2
class AFDEndpoint(TrackedResource): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'system_data': {'readonly': True}, 'location': {'required': True}, 'origin_response_timeout_seconds': {'minimum': 16}, 'provisioning_state': {'readonly': True}, 'depl...
CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format :code:`<endpointname>`.azureedge.net. Variables are only populated by the server, and will be ignored when sending a requ...
625990508e7ae83300eea536
class PDAError(AutomatonError): <NEW_LINE> <INDENT> pass
The base class for all PDA-related errors.
62599050009cb60464d029dd