code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class ZFilter(object): <NEW_LINE> <INDENT> def __init__(self, shape, demean=True, destd=True, clip=10.0): <NEW_LINE> <INDENT> self.demean = demean <NEW_LINE> self.destd = destd <NEW_LINE> self.clip = clip <NEW_LINE> self.rs = RunningStat(shape) <NEW_LINE> <DEDENT> def __call__(self, x, update=True): <NEW_LINE> <INDENT>...
y = (x-mean)/std using running estimates of mean,std
62598efa99cbb53fe682f7bb
class TagDetails(Model): <NEW_LINE> <INDENT> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'tag_name': {'key': 'tagName', 'type': 'str'}, 'count': {'key': 'count', 'type': 'TagCount'}, 'values': {'key': 'values', 'type': '[TagValue]'}, } <NEW_LINE> def __init__(self, id=None, tag_name=None, count=None, values=...
Tag details. :param id: The tag ID. :type id: str :param tag_name: The tag name. :type tag_name: str :param count: The tag count. :type count: ~azure.mgmt.resource.resources.v2016_02_01.models.TagCount :param values: The list of tag values. :type values: list[~azure.mgmt.resource.resources.v2016_02_01.models.TagValue...
62598efafff4ab517ebcc0de
class OrderRetryTaskRepo(BaseRepo): <NEW_LINE> <INDENT> def get_by_create_date( self, only_at_or_before_this_date=None, offset_arg=None, limit_arg=None, suppress_exception=False, session=None): <NEW_LINE> <INDENT> offset, limit = clean_paging_values(offset_arg, limit_arg) <NEW_LINE> session = self.get_session(session) ...
Repository for the OrderRetryTask entity.
62598efaadb09d7d5dc08ec4
class IaRestOctets(Packet): <NEW_LINE> <INDENT> name = "IA Rest Octets" <NEW_LINE> fields_desc = [ ByteField("ieiIRO", 0x0), XByteField("lengthIRO", None), ByteField("byte2", None), ByteField("byte3", None), ByteField("byte4", None), ByteField("byte5", None), ByteField("byte6", None), ByteField("byte7", None), ByteFiel...
IA Rest Octets Section 10.5.2.16
62598efa3539df3088ecabb9
class SyncEventStatus(SyncManagerBase): <NEW_LINE> <INDENT> name = models.CharField(max_length=16, help_text='name of status') <NEW_LINE> description = models.CharField(max_length=128, blank=True, null=True) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return self.name
table of types of statuses for a SyncEvent
62598efaa8370b77170eecf1
class CompileTest(integration.ModuleCase): <NEW_LINE> <INDENT> def test_multi_state(self): <NEW_LINE> <INDENT> ret = self.run_function('state.sls', mods='fuzz.multi_state') <NEW_LINE> self.assertIsInstance(ret, list)
Validate the state compiler
62598efa57b8e32f52507589
class ZMQMessengerBase(object): <NEW_LINE> <INDENT> def __init__(self, context, socket_type): <NEW_LINE> <INDENT> self.socket = context.socket(socket_type) <NEW_LINE> <DEDENT> def receive(self): <NEW_LINE> <INDENT> return pickle.loads(self.socket.recv()) <NEW_LINE> <DEDENT> def send(self, msg): <NEW_LINE> <INDENT> self...
Base class for simple communicating messages through zmq.
62598efa3317a56b869bd9eb
class Clone(SCPTest): <NEW_LINE> <INDENT> ENDPOINT = 'clone' <NEW_LINE> def test_json(self): <NEW_LINE> <INDENT> test.induce_error('POST', self) <NEW_LINE> test.auto_run_json_tests('POST', self)
Tests for Clone Endpoint
62598efaff9c53063f518f6e
class Deck(object): <NEW_LINE> <INDENT> def __init__(self, unique_cards, deck_rules): <NEW_LINE> <INDENT> self.unique_cards = unique_cards <NEW_LINE> self.deck_rules = deck_rules <NEW_LINE> self.cards = self.get_cards() <NEW_LINE> <DEDENT> def shuffled(self): <NEW_LINE> <INDENT> return shuffle( self.cards ) <NEW_LINE> ...
A Deck is made up of a set of card objects.
62598efa92d797404e388001
class UserForm(forms.ModelForm): <NEW_LINE> <INDENT> first_name = forms.CharField(max_length=30) <NEW_LINE> last_name = forms.CharField(max_length=30) <NEW_LINE> role = forms.MultipleChoiceField(required = False, widget=forms.CheckboxSelectMultiple(), choices = [(x.id, x) for x in Group.objects.exclude(pk__in= [role.gr...
Form which represents auth user
62598efa56ac1b37e6300afa
class GoogleTranslation(GoogleBaseTranslation): <NEW_LINE> <INDENT> name = "Google Translate" <NEW_LINE> max_score = 90 <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> if settings.MT_GOOGLE_KEY is None: <NEW_LINE> <INDENT> raise MissingConfiguration("Google Translate requires API key") ...
Google Translate API v2 machine translation support.
62598efa3d592f4c4edb97fb
class Cube: <NEW_LINE> <INDENT> def __init__(self, x, y, z): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.z = z <NEW_LINE> <DEDENT> def __add__(self, other): <NEW_LINE> <INDENT> return Cube( self.x + other.x, self.y + other.y, self.z + other.z ) <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_...
http://www.redblobgames.com/grids/hexagons/
62598efa5fdd1c0f98e5c8b3
class DescribeReleasedConfigResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Result = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Result = params.get("Result") <NEW_LINE> self.RequestId = params.get("RequestI...
DescribeReleasedConfig返回参数结构体
62598efa099cdd3c6367485e
@endpoint("openapi/root/v1/diagnostics/patch/", "PATCH") <NEW_LINE> class Patch(RootService): <NEW_LINE> <INDENT> RESPONSE_DATA = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(Patch, self).__init__()
Send a PATCH request and get a 200 OK response back.
62598efaf548e778e5969e9b
class RASUserCreationForm(UserCreationForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ('username', 'email', 'password1', 'password2', 'first_name', 'last_name') <NEW_LINE> <DEDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(RASUserCreationForm, self).__ini...
Override the default UserCreationForm in order to add HTML5 attributes.
62598efa7cff6e4e811b42f0
class CostMapDialogTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dialog = CostMapDialog(None) <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.dialog = None <NEW_LINE> <DEDENT> def test_dialog_ok(self): <NEW_LINE> <INDENT> button = self.dialog.button_box.button(Q...
Test dialog works.
62598efa851cf427c66b6bd5
class QemuOpenWrt(qemu.Qemu): <NEW_LINE> <INDENT> model = "qemux86-openwrt" <NEW_LINE> wan_iface = "eth1" <NEW_LINE> lan_iface = "br-lan" <NEW_LINE> lan_network = ipaddress.IPv4Network(u"192.168.1.0/24") <NEW_LINE> lan_gateway = ipaddress.IPv4Address(u"192.168.1.1")
Emulated QEMU board.
62598efaa05bb46b38489182
class ScConstClass(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.eventTypeUnknown = 0 <NEW_LINE> self.eventTypeClicked = 1 <NEW_LINE> self.eventTypeChange = 2 <NEW_LINE> self.eventTypeFocusIn = 3 <NEW_LINE> self.eventTypeFocusOut = 4 <NEW_LINE> self.StopEventPropagation = 'StopEventPropagati...
a class for retrieving a SciTE constant. example: from scite_extend_ui import ScConst matchType = ScConst.SCFIND_MATCHCASE ScEditor.SearchNext(matchType, 'a') color = ScConst.MakeColor(0, 250, 200) ScEditor.SetMarkerBack(1, color) See https://moltenform.com/page/scite-with-python/doc/writingpluginap...
62598efa3539df3088ecabbb
class WinkBinarySwitch(WinkDevice): <NEW_LINE> <INDENT> def state(self): <NEW_LINE> <INDENT> _field = self.binary_state_name() <NEW_LINE> return self._last_reading.get(_field, False) <NEW_LINE> <DEDENT> def set_state(self, state): <NEW_LINE> <INDENT> _field = self.binary_state_name() <NEW_LINE> values = {"desired_state...
Represents a Wink binary switch.
62598efae5267d203ee6a213
class VarDef(Node): <NEW_LINE> <INDENT> items = Undefined(List[Var]) <NEW_LINE> kind = None <NEW_LINE> init = Undefined(Node) <NEW_LINE> is_top_level = False <NEW_LINE> def __init__(self, items: List[Var], is_top_level: bool, init: Node = None) -> None: <NEW_LINE> <INDENT> self.items = items <NEW_LINE> self.is_top_leve...
Variable definition with explicit types
62598efaa8370b77170eecf3
class TheStrategy(bt.Strategy): <NEW_LINE> <INDENT> params = ( ('macd1', 12), ('macd2', 26), ('macdsig', 9), ('atrperiod', 7), ('atrdist', 3.0), ('smaperiod', 30), ('dirperiod', 10), ) <NEW_LINE> def log(self, txt, dt=None): <NEW_LINE> <INDENT> dt = dt or self.datas[0].datetime.date(0) <NEW_LINE> print('%s, %s' % (dt.i...
This strategy is loosely based on some of the examples from the Van K. Tharp book: *Trade Your Way To Financial Freedom*. The logic: - Enter the market if: - The MACD.macd line crosses the MACD.signal line to the upside - The Simple Moving Average has a negative direction in the last x periods (actual ...
62598efa26068e7796d4b268
class SCMCommitWidget(ew_core.Widget): <NEW_LINE> <INDENT> template = TEMPLATE_DIR + 'commit.html' <NEW_LINE> defaults = dict(ew_core.Widget.defaults, commit=None) <NEW_LINE> widgets = dict(revision_widget=SCMRevisionWidget()) <NEW_LINE> def prepare_context(self, context): <NEW_LINE> <INDENT> c = super(SCMCommitWidget,...
Renders a commit. Used SCMRevisionWidget to display metadata, then displays files added, modified, deleted.
62598efa460517430c430d97
class DigestConfig(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'action_group_resource_id': {'key': 'actionGroupResourceId', 'type': 'str'}, 'frequency': {'key': 'frequency', 'type': 'int'}, 'categories': {'key': 'categories', 'type': '[str]'}, 'language': ...
Advisor Digest configuration entity. :param name: Name of digest configuration. Value is case-insensitive and must be unique within a subscription. :type name: str :param action_group_resource_id: Action group resource id used by digest. :type action_group_resource_id: str :param frequency: Frequency that digest will...
62598efa57b8e32f5250758a
class ImapClientError(ImapClientException): <NEW_LINE> <INDENT> pass
Common exception for an error.
62598efa99fddb7c1ca6228a
class FunctionConstraint(Constraint): <NEW_LINE> <INDENT> def __init__(self, func, assigned=True): <NEW_LINE> <INDENT> self._func = func <NEW_LINE> self._assigned = assigned <NEW_LINE> <DEDENT> def __call__(self, variables, domains, assignments, forwardcheck=False, _unassigned=Unassigned): <NEW_LINE> <INDENT> parms = [...
Constraint which wraps a function defining the constraint logic Examples: >>> problem = Problem() >>> problem.addVariables(["a", "b"], [1, 2]) >>> def func(a, b): ... return b > a >>> problem.addConstraint(func, ["a", "b"]) >>> problem.getSolution() {'a': 1, 'b': 2} >>> problem = Problem() >>> problem.addVariabl...
62598efa56ac1b37e6300afb
class BreakSwitchException(Exception): <NEW_LINE> <INDENT> pass
A special exception that is thrown and caught by the switch context-manager to break from a switch block.
62598efa097d151d1a2bf934
class CheckShellBinaryNameAndVersionMixIn(object): <NEW_LINE> <INDENT> _call_binary_ = None <NEW_LINE> _call_binary_expected_version_ = None <NEW_LINE> def test_version_includes_binary_name(self): <NEW_LINE> <INDENT> if getattr(self, '_call_binary_', None) is None: <NEW_LINE> <INDENT> self.skipTest('\'_call_binary_\' n...
Simple class mix-in to subclass in companion to :class:`ShellTestCase<salttesting.case.ShellTestCase>` which adds a test case to verify proper version report from Salt's CLI tools.
62598efa5fcc89381b2655b0
class Luck(Advantage): <NEW_LINE> <INDENT> advantage_cost_type = Cost_Type.PYRAMID_RANK <NEW_LINE> advantage_needs_rank = True <NEW_LINE> def __init__(self, rank): <NEW_LINE> <INDENT> super().__init__("Luck") <NEW_LINE> self.init_pyramid(rank)
Once per round, you can choose to re-roll a die roll, like spending a hero point (see Hero Points, page 20), including adding 10 to re-rolls of 10 or less. You can do this a number of times per game session equal to your Luck rank, with a maximum rank of half the series power level (rounded down). Your Luck ranks refre...
62598efa1f5feb6acb161564
class Loader(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.modules = {} <NEW_LINE> <DEDENT> def load(self, modulePath): <NEW_LINE> <INDENT> module = __import__(modulePath) <NEW_LINE> self.modules[modulePath] = sys.modules[modulePath] <NEW_LINE> <DEDENT> def get(self, modulePath): <NEW_LINE> <INDEN...
Class for loading, unloading and reloading python modules.
62598efa167d2b6e312b58ab
class QModelRealizationList(APIView): <NEW_LINE> <INDENT> permission_classes = [QRealizationPermission] <NEW_LINE> def get(self, request, format=None): <NEW_LINE> <INDENT> assert request.method == "GET" <NEW_LINE> models = QModelRealization.objects.all() <NEW_LINE> serializer = QModelRealizationSerializer(models, many=...
List existing models, or create a new model.
62598efa0fa83653e46f37f1
class AttackerWait(State): <NEW_LINE> <INDENT> def enter(self, agent): <NEW_LINE> <INDENT> print("%s : I'm waiting." % agent.name) <NEW_LINE> agent.postoffice.post_msg(3, ATTACKER, ATTACKER, GO_ATTACK) <NEW_LINE> <DEDENT> def leave(self, agent): <NEW_LINE> <INDENT> print("%s : Let's go!" % agent.name) <NEW_LINE> <DEDEN...
Attackers twiddling their thumbs.
62598efaadb09d7d5dc08ec8
class UrlInput(QDialog): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super().__init__(**kwargs) <NEW_LINE> load_ui('link_input.ui', self) <NEW_LINE> self.buttonBox.rejected.connect(self.reject) <NEW_LINE> self.buttonBox.accepted.connect(self.accept) <NEW_LINE> <DEDENT> @pyqtSlot() <NEW_LINE> d...
Dialog for entering text.
62598efa67a9b606de5448e0
class BuildingManager(models.Manager): <NEW_LINE> <INDENT> pass
Extended Building model manager.
62598efa4f88993c371ef973
class TextureGlyph(object): <NEW_LINE> <INDENT> def __init__(self, charcode, size, offset, advance, texture_coordinates): <NEW_LINE> <INDENT> self.charcode = charcode <NEW_LINE> self.size = size <NEW_LINE> self.offset = offset <NEW_LINE> self.advance = advance <NEW_LINE> self.texture_coordinates = texture_coordinates <...
A texture glyph gathers information relative to the size/offset/advance and texture coordinates of a single character. It is generally built automatically by a TextureFont.
62598efabe383301e02520f1
class EC2InstancesInfoUnavailable(Exception): <NEW_LINE> <INDENT> pass
Exception raised when unable to retrieve cluster instance info from EC2.
62598efa50812a4eaa620072
class ReaderProxy(ReaderProxyBase): <NEW_LINE> <INDENT> is_polar2grid_reader = True <NEW_LINE> def get_default_products(self) -> list[str]: <NEW_LINE> <INDENT> return DEFAULT_PRODUCTS <NEW_LINE> <DEDENT> def get_all_products(self) -> list[str]: <NEW_LINE> <INDENT> return ALL_BANDS + ALL_ANGLES + ALL_COMPS <NEW_LINE> <D...
Provide Polar2Grid-specific information about this reader's products.
62598efa99fddb7c1ca6228b
class GroupGetMemberGroupsParameters(Model): <NEW_LINE> <INDENT> _validation = { 'security_enabled_only': {'required': True}, } <NEW_LINE> _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'security_enabled_only': {'key': 'securityEnabledOnly', 'type': 'bool'}, } <NEW_LINE> def __init__(self,...
Request parameters for GetMemberGroups API call. All required parameters must be populated in order to send to Azure. :param additional_properties: Unmatched properties from the message are deserialized this collection :type additional_properties: dict[str, object] :param security_enabled_only: Required. If true, on...
62598efa9f28863672817105
class AmenitySerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Amenity <NEW_LINE> fields = ['pk', 'amenity_type', 'room']
Room amenity serializer
62598efa7d847024c075acda
class Milestone(GitHubCore): <NEW_LINE> <INDENT> def __init__(self, mile, session=None): <NEW_LINE> <INDENT> super(Milestone, self).__init__(mile, session) <NEW_LINE> self._api = mile.get('url', '') <NEW_LINE> self.number = mile.get('number') <NEW_LINE> self.state = mile.get('state') <NEW_LINE> self.title = mile.get('t...
The :class:`Milestone <Milestone>` object. This is a small class to handle information about milestones on repositories and issues. See also: http://developer.github.com/v3/issues/milestones/
62598efa5fc7496912d476fb
class GH_BoundingBox(object): <NEW_LINE> <INDENT> def ToString(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def __new__(self, *__args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> Max = None <NEW_LINE> Min = None
Represents a 3D bounding box, denoted by two points. GH_BoundingBox(nMin: GH_Point3D, nMax: GH_Point3D) GH_BoundingBox(Minx: float, Miny: float, Minz: float, Maxx: float, Maxy: float, Maxz: float)
62598efa442bda511e95ad73
class ConfigTests(unittest.TestCase): <NEW_LINE> <INDENT> def compare_config(self, config1, config2): <NEW_LINE> <INDENT> self.assertIsNot(config1, config2) <NEW_LINE> for member in ('version', 'use_jsonclass', 'content_type', 'user_agent', 'ignore_attribute'): <NEW_LINE> <INDENT> self.assertEqual(getattr(config1, memb...
Tests the methods of the Config class
62598efae5267d203ee6a217
class Proxy(dpkt.Packet): <NEW_LINE> <INDENT> __hdr__ = ( ('ttl', 'H', 4), ('proxy_hops', 'h', 0), ('srcport', 'H', 0x0), ('srcip_n', '4s', '\x00' * 4), ('area', 'H', 0) ) <NEW_LINE> @property <NEW_LINE> def srcip(self): <NEW_LINE> <INDENT> if self.srcip_a is None: <NEW_LINE> <INDENT> self.srcip_a = socket.inet_ntoa(se...
VXFLD proxy request from vxsnd to vxsnd.
62598efa32920d7e50bc493b
class VertexProxy(object): <NEW_LINE> <INDENT> def __init__(self,element_class, client): <NEW_LINE> <INDENT> assert issubclass(element_class, Vertex) <NEW_LINE> self.element_class = element_class <NEW_LINE> self.client = client <NEW_LINE> self.index = None <NEW_LINE> self.client.registry.add_class(element_class) <NEW_L...
A proxy for interacting with vertices on the graph database. :param element_class: The element class managed by this proxy instance. :type element_class: Vertex class :param client: The Client object for the database. :type client: Client :ivar element_class: Element class. :ivar client: Client object. :ivar index:...
62598efa5166f23b2e241cef
class Encoder(object): <NEW_LINE> <INDENT> def __init__(self, params, cohort, secret, irr_rand): <NEW_LINE> <INDENT> self.params = params <NEW_LINE> self.cohort = cohort <NEW_LINE> self.secret = secret <NEW_LINE> self.irr_rand = irr_rand <NEW_LINE> <DEDENT> def _internal_encode_bits(self, bits): <NEW_LINE> <INDENT> uni...
Obfuscates values for a given user using the RAPPOR privacy algorithm.
62598efa10dbd63aa1c6f490
class DataLoaderBase(DataLoader): <NEW_LINE> <INDENT> def __init__(self, dataset, batch_size, shuffle, validation_split, num_workers=0, collate_fn=default_collate): <NEW_LINE> <INDENT> self.validation_split = validation_split <NEW_LINE> self.shuffle = shuffle <NEW_LINE> self.batch_idx = 0 <NEW_LINE> self.n_samples = le...
Base class for all data loaders
62598efa283ffb24f3cf21bd
class OverflowChip(_BaseChip): <NEW_LINE> <INDENT> ROOT = ".//button[contains(@class, 'pf-c-chip') and contains(@class, 'pf-m-overflow')]" <NEW_LINE> def _show_less_shown(self): <NEW_LINE> <INDENT> return self.text.replace(" ", "").lower() == "showless" <NEW_LINE> <DEDENT> def _show_more_shown(self): <NEW_LINE> <INDENT...
The 'Show More'/'Show Less' button is essentially a special kind of chip
62598efa63b5f9789fe83a72
class RegexEncoder(object): <NEW_LINE> <INDENT> def __new__(self, regex, fixed_slice): <NEW_LINE> <INDENT> global _instance <NEW_LINE> if not _instance.get((regex, fixed_slice)): <NEW_LINE> <INDENT> _instance[(regex, fixed_slice)] = RegexEncoderObject(regex, fixed_slice) <NEW_LINE> <DEDENT> return _instance[(regex, fix...
A proxy object used for caching invocations of ``RegexEncoderObject``. If a ``RegexEncoder`` is invoked twice in one process, we want to invoke ``RegexEncoderObject.__init__`` only once.
62598efa460517430c430d9b
class Mesh: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Mesh.is_body = False <NEW_LINE> with open(Case.path+'/_infoMesh.yaml', 'r') as infile: <NEW_LINE> <INDENT> info_mesh = yaml.load(infile) <NEW_LINE> <DEDENT> Mesh.directions = {} <NEW_LINE> for info in info_mesh: <NEW_LINE> <INDENT> if 'direction' i...
Class to generate a Cartesian grid mesh.
62598efa7047854f4633dcda
class Solution: <NEW_LINE> <INDENT> def insertionSortList(self, head): <NEW_LINE> <INDENT> if head is None or head.next is None: <NEW_LINE> <INDENT> return head <NEW_LINE> <DEDENT> fakehead = ListNode(0) <NEW_LINE> p = fakehead <NEW_LINE> while head is not None: <NEW_LINE> <INDENT> while p.next is not None and p.next.v...
@param head: The first node of linked list. @return: The head of linked list.
62598efa56ac1b37e6300aff
class Area2_7_UpperLeftInnerArea(area_base.Area): <NEW_LINE> <INDENT> def __init__(self: "Area", window_width: int = 500, window_height: int = 500, player_obj: "Snake"=None, enemies: "Group"=None): <NEW_LINE> <INDENT> area_base.Area.__init__(self, window_width, window_height, player_obj, enemies) <NEW_LINE> self.is_che...
A class that represents the upper left inner Area of Area2_7.
62598efa5fcc89381b2655b2
class AlterUniqueTogether(AlterTogetherOptionOperation): <NEW_LINE> <INDENT> option_name = 'unique_together' <NEW_LINE> def __init__(self, name, unique_together): <NEW_LINE> <INDENT> super().__init__(name, unique_together)
Change the value of unique_together to the target one. Input value of unique_together must be a set of tuples.
62598efa097d151d1a2bf938
class ResultsListView(generic.ListView): <NEW_LINE> <INDENT> model = Product <NEW_LINE> template_name = 'products/results.html' <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> search_product = self.request.GET.get('research') <NEW_LINE> context = super().get_context_data(**kwargs) <NEW_LINE> list_p...
Generic class-based view listing all products by nutriscore
62598efabe7bc26dc92512ed
class ExpandPlacements: <NEW_LINE> <INDENT> def IsActive(self): <NEW_LINE> <INDENT> return bool(FreeCADGui.Selection.getSelectionEx()) <NEW_LINE> <DEDENT> def Activated(self): <NEW_LINE> <INDENT> import expandplacements <NEW_LINE> for selobj in FreeCADGui.Selection.getSelectionEx(): <NEW_LINE> <INDENT> expandplacements...
This should aid interactive repair in the future but currently it breaks extrusions, as axis, base and so on have to be recalculated
62598efaad47b63b2c5a612c
class CCSDS_Telemetry_Header (my_endian): <NEW_LINE> <INDENT> _pack_ = 1 <NEW_LINE> _fields_ = [ ("Pri" , CCSDS_PriHdr_t ), ("s_time" , ctypes.c_byte * 8 )] <NEW_LINE> def SetConstants(self): <NEW_LINE> <INDENT> pass
/*! * @brief CCSDS Telemetry Header * @TelemetryPacketHeader * */ CCSDS_Telemetry_Header { CCSDS_PriHdr_t Pri; /* *@bitarray msbf * @bits 1 * @name ccsds_standard_secondary_header * @enum CCSDS_Standard_Secondary_header * @bits 63 * @name time_stamp * @brief It i...
62598efa56ac1b37e6300b00
class OperatorMeta(type): <NEW_LINE> <INDENT> __abstractmethods__ = frozenset(['__call__']) <NEW_LINE> def __new__(mcls, cls_name, bases, namespace): <NEW_LINE> <INDENT> cls = super(OperatorMeta, mcls).__new__(mcls, cls_name, bases, namespace) <NEW_LINE> cls.__abstractmethods__ = frozenset(all_abstracts(cls)) <NEW_LINE...
Inheriting from this creates a class which is callable (__call__), but whose __init__ or __new__ are NOT called by 'cls(arguments)' calls. It also does: () Checks for abstract methods during class inheritance (not instantiation). ... to temporarily override this behavior, simply redeclare the attribute as...
62598efa009cb60464cffe63
class TestMochadSwitchSetup(unittest.TestCase): <NEW_LINE> <INDENT> PLATFORM = mochad <NEW_LINE> COMPONENT = light <NEW_LINE> THING = "light" <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.hass = get_test_home_assistant() <NEW_LINE> self.addCleanup(self.hass.stop) <NEW_LINE> <DEDENT> @mock.patch("homeassistant.co...
Test the mochad light.
62598efa23849d37ff84f9d3
class TribeRole(models.Model): <NEW_LINE> <INDENT> name = models.CharField(_("name"), max_length=50, unique=True) <NEW_LINE> title = models.CharField(_("title"), max_length=150, default="") <NEW_LINE> description = models.TextField(_("description"), default="") <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return s...
Tribe's role'
62598efae1aae11d1e7cdccc
class ProfileTopicListSerializer(serializers.HyperlinkedModelSerializer): <NEW_LINE> <INDENT> items_url = serializers.HyperlinkedIdentityField( view_name="know-me:profile:profile-item-list" ) <NEW_LINE> permissions = DRYPermissionsField() <NEW_LINE> profile_id = serializers.PrimaryKeyRelatedField( read_only=True, sourc...
Serializer for a list of profile topics.
62598efa63d6d428bbee10e3
class ManageCLient: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.liste = {} <NEW_LINE> <DEDENT> def addClient(self, name, communication): <NEW_LINE> <INDENT> if name not in self.liste.keys(): <NEW_LINE> <INDENT> self.liste[name] = Client(robotIP, PORT, communication) <NEW_LINE> <DEDENT> <DEDENT> def...
* Gere l'ajout et la suppression des clients
62598efa8a349b6b43684b56
class DashboardSouth(Dashboard): <NEW_LINE> <INDENT> def __init__(self, orientation): <NEW_LINE> <INDENT> Dashboard.__init__(self, orientation)
Dashboard sub-class dor southward orientation.
62598efabf627c535bcafd88
class UnicodeMixin(object): <NEW_LINE> <INDENT> if six.PY3: <NEW_LINE> <INDENT> def __str__(self): <NEW_LINE> <INDENT> return self.__unicode__() <NEW_LINE> <DEDENT> def __bytes__(self): <NEW_LINE> <INDENT> return self.__unicode__().encode('utf-8') <NEW_LINE> <DEDENT> <DEDENT> else: <NEW_LINE> <INDENT> def __str__(self)...
Mixin that handles __str__ and __bytes__. Just define __unicode__.
62598efa67a9b606de5448e4
class DocIter: <NEW_LINE> <INDENT> def __init__(self,path,recordIter,recursive=False,extensions=None): <NEW_LINE> <INDENT> self.extensions = set(extensions) <NEW_LINE> self.recursive = recursive <NEW_LINE> self.recordIter = recordIter <NEW_LINE> self.path = path <NEW_LINE> <DEDENT> def walk(self): <NEW_LINE> <INDENT> p...
Iterates over docs in a directory or a file. recordIter is any iterable returning docs as dicts of attribute:value pairs. you can supply any class here that will iterate over docs/records in a file, given a path to the file. By using this iterator, you never need to have more than the contents of one input file in me...
62598efa9c8ee8231303f5e6
class ElasticSearch(object): <NEW_LINE> <INDENT> def __init__(self, app=None): <NEW_LINE> <INDENT> if app is not None: <NEW_LINE> <INDENT> self.init_app(app) <NEW_LINE> <DEDENT> <DEDENT> def init_app(self, app): <NEW_LINE> <INDENT> app.config.setdefault('ELASTICSEARCH_URL', 'http://localhost:9200/') <NEW_LINE> params =...
A thin wrapper around pyelasticsearch.ElasticSearch()
62598efaa8370b77170eecf9
class MaxRetriesStopStrategy(StopStrategy): <NEW_LINE> <INDENT> def __init__(self, max_retries): <NEW_LINE> <INDENT> self.max_retries = max_retries <NEW_LINE> <DEDENT> def should_continue(self, attempts, elapsed_time): <NEW_LINE> <INDENT> return attempts <= self.max_retries
A :class:`StopStrategy` that gives up after a certain number of retries.
62598efa4f88993c371ef975
class MplAxhspan(MplPlot): <NEW_LINE> <INDENT> _input_ports = [ ("xmin", "basic:Float", {'optional': True, 'defaults': "['0']"}), ("hold", "basic:String", {'optional': True}), ("ymin", "basic:Float", {}), ("ymax", "basic:Float", {}), ("xmax", "basic:Float", {'optional': True, 'defaults': "['1']"}), ("patchProperties", ...
Add a horizontal span (rectangle) across the axis. Call signature: axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs) y coords are in data units and x coords are in axes (relative 0-1) units. Draw a horizontal span (rectangle) from ymin to ymax. With the default values of xmin = 0 and xmax = 1, this always spans the xra...
62598efa627d3e7fe0e057a2
class Htmlcoin(Bitcoin): <NEW_LINE> <INDENT> name = 'htmlcoin' <NEW_LINE> symbols = ('HTML', ) <NEW_LINE> seeds = ('seed1.htmlcoin.com', 'seed2.htmlcoin.com', 'seed3.htmlcoin.com', 'seed4.htmlcoin.com') <NEW_LINE> port = 4888 <NEW_LINE> message_start = b'\x1f\x2e\x3d\x4c' <NEW_LINE> base58_prefixes = { 'PUBKEY_ADDR': 4...
Class with all the necessary HTMLCOIN (HTML) network information based on https://github.com/HTMLCOIN/HTMLCOIN/blob/master/src/chainparams.cpp (date of access: 02/12/2018)
62598efa21bff66bcd72156b
@pytest.mark.components <NEW_LINE> @pytest.allure.story('Proximity_Zones') <NEW_LINE> @pytest.allure.feature('PATCH') <NEW_LINE> class Test_PFE_Components(object): <NEW_LINE> <INDENT> @pytest.allure.link('https://jira.qumu.com/browse/TC-43875') <NEW_LINE> @pytest.mark.Proximity_Zones <NEW_LINE> @pytest.mark.PATCH <NEW_...
PFE Proximity_Zones test cases.
62598efaff9c53063f518f76
class DeleteL7PolicyInDB(BaseDatabaseTask): <NEW_LINE> <INDENT> def execute(self, l7policy): <NEW_LINE> <INDENT> LOG.debug("Delete in DB for l7policy id: %s ", l7policy.id) <NEW_LINE> self.l7policy_repo.delete(db_apis.get_session(), id=l7policy.id) <NEW_LINE> <DEDENT> def revert(self, l7policy, *args, **kwargs): <NEW_L...
Delete the L7 policy in the DB. Since sqlalchemy will likely retry by itself always revert if it fails
62598efaad47b63b2c5a612e
class ResponseTime: <NEW_LINE> <INDENT> def __init__(self, feature): <NEW_LINE> <INDENT> self.feature = feature <NEW_LINE> <DEDENT> def get_dif(self) -> list: <NEW_LINE> <INDENT> time_diff = [] <NEW_LINE> temp_packet = None <NEW_LINE> temp_direction = None <NEW_LINE> for packet, direction in self.feature.packets: <NEW_...
A summary of features based on the time difference between an outgoing packet and the following response.
62598efa167d2b6e312b58b1
class Source(_messages.Message): <NEW_LINE> <INDENT> repoSource = _messages.MessageField('RepoSource', 1) <NEW_LINE> storageSource = _messages.MessageField('StorageSource', 2)
Source describes the location of the source in a supported storage service. Fields: repoSource: If provided, get source from this location in a Cloud Repo. storageSource: If provided, get the source from this location in Google Cloud Storage.
62598efa4c34283577618bfc
class ParentIsAlive(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, parent_pid, condition): <NEW_LINE> <INDENT> super(ParentIsAlive, self).__init__() <NEW_LINE> self.parent_pid = parent_pid <NEW_LINE> self.condition = condition <NEW_LINE> self.again = True <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT...
stop current process (and it's children) if parent dies
62598efa5fdd1c0f98e5c8bb
class ProfileCounter(object): <NEW_LINE> <INDENT> _instances_lock = threading.Lock() <NEW_LINE> _instances = [] <NEW_LINE> @staticmethod <NEW_LINE> def summarize_all(): <NEW_LINE> <INDENT> print('\nProfiling report:') <NEW_LINE> print('-' * 80) <NEW_LINE> print( '{:<38}{:<10}{:<16}{:<16}'.format( 'Name', 'Count', 'Tota...
Records total time spent in a chunk of code during lifetime of a process. Recursive calls count as a single call (i.e. only the time spent in the outer call is recorded). Autoregisters itself in a global list when instantiated. All counters will be reported at the process exit time (in atexit hook). Best to be used a...
62598efa0fa83653e46f37f7
class TestBaseModel(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.cls = BaseModel() <NEW_LINE> <DEDENT> def testattr(self): <NEW_LINE> <INDENT> self.assertTrue(hasattr(self.cls, "created_at")) <NEW_LINE> self.assertFalse(hasattr(self.cls, "updated_at")) <NEW_LINE> self.assertTrue(has...
TestBaseModel class
62598efadc8b845886d51edd
class SamrContext(object): <NEW_LINE> <INDENT> def __init__(self, server, lp=None, creds=None): <NEW_LINE> <INDENT> self.connection = None <NEW_LINE> self.handle = None <NEW_LINE> self.domain_handle = None <NEW_LINE> self.domain_sid = None <NEW_LINE> self.group_handle = None <NEW_LINE> self.user_handle ...
State/Context associated with a samr connection.
62598efa10dbd63aa1c6f494
class ComponentEvent(zope.component.interfaces.ObjectEvent): <NEW_LINE> <INDENT> zope.interface.implements(IComponentEvent) <NEW_LINE> def __init__(self, object, component): <NEW_LINE> <INDENT> super(ComponentEvent, self).__init__(object) <NEW_LINE> self.component = component
An event about a component of an article
62598efa7047854f4633dcde
class VRF(model_base.Base, model_base.HasAimId, model_base.HasName, model_base.HasDisplayName, model_base.HasTenantName, model_base.AttributeMixin, model_base.IsMonitored): <NEW_LINE> <INDENT> __tablename__ = 'aim_vrfs' <NEW_LINE> __table_args__ = (model_base.uniq_column(__tablename__, 'tenant_name', 'name') + model_ba...
DB model for BridgeDomain.
62598efa97e22403b3839807
class Coconut(object): <NEW_LINE> <INDENT> def __init__(self, coconut_type, coconut_weight): <NEW_LINE> <INDENT> self.coconut_type = coconut_type <NEW_LINE> self.coconut_weight = coconut_weight
A coconut object
62598efaff9c53063f518f78
class Epworth(BaseEvaluation): <NEW_LINE> <INDENT> EPWORTH_CHOICES = ( (0, _(u'would never doze')), (1, _(u'slight chance of dozing')), (2, _(u'moderate chance of dozing')), (3, _(u'high chance of dozing')), ) + BaseEvaluation.UN <NEW_LINE> sitting_reading = models.IntegerField(_('Sitting and reading'), choices=EPWORTH...
Epworth Sleepniess Scale
62598efa92d797404e388006
class TestJsonBrowserLevel(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 testJsonBrowserLevel(self): <NEW_LINE> <INDENT> pass
JsonBrowserLevel unit test stubs
62598efa99fddb7c1ca6228e
class Base(UnicodeMixin): <NEW_LINE> <INDENT> @declared_attr <NEW_LINE> def __tablename__(cls): <NEW_LINE> <INDENT> return cls.__name__.lower() <NEW_LINE> <DEDENT> pk = Column(Integer, primary_key=True) <NEW_LINE> created = Column(DateTime(timezone=True), default=datetime.utcnow) <NEW_LINE> updated = Column( DateTime(t...
All our models have an integer primary key which has nothing to do with the kind of data stored in a table. 'Natural' candidates for primary keys should be marked with unique constraints instead. This adds flexibility when it comes to database changes.
62598efa71ff763f4b5e6078
class TokenGenerator: <NEW_LINE> <INDENT> def make_custom_token(self, details_dict): <NEW_LINE> <INDENT> return jwt.encode( details_dict, settings.SECRET_KEY, algorithm='HS256' ).decode('utf-8') <NEW_LINE> <DEDENT> def decode_token(self, token): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return jwt.decode(token, sett...
Generates custom tokens used in verifying users and password reseting
62598efa5fcc89381b2655b4
class NotConfiguredChallenge(AbstractChallenge): <NEW_LINE> <INDENT> def html(self, **kwargs): <NEW_LINE> <INDENT> return lazy_gettext("Please ask the server administrator to configure a challenge!") <NEW_LINE> <DEDENT> def is_valid_response(self, **kwargs): <NEW_LINE> <INDENT> return ChallengeResponse(False, '')
A fallback challenge used when an administrator has not configured a specific method.
62598efa2c8b7c6e89bd20d8
class MethodDesc(object): <NEW_LINE> <INDENT> def __init__(self, method, args, doc="", args_desc=None, api_method=None): <NEW_LINE> <INDENT> self.method = method <NEW_LINE> self.api_method = api_method <NEW_LINE> self.args = args <NEW_LINE> self.doc = doc <NEW_LINE> if args_desc is None: <NEW_LINE> <INDENT> args_desc =...
A descriptor for an API method.
62598efa167d2b6e312b58b3
class TestCsvTableDescriptor(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 make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDENT> return CsvTableDesc...
CsvTableDescriptor unit test stubs
62598efa5fc7496912d476fe
class Persistence(object): <NEW_LINE> <INDENT> def __init__(self, db_filename): <NEW_LINE> <INDENT> self.engine = sqlalchemy.create_engine('sqlite:///%s' % db_filename, echo=False) <NEW_LINE> self.sessionmaker = sessionmaker(bind=self.engine) <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> self.session = s...
Persistence class should be used using the 'with' keyword. The resource is automatically closed after running the block. exmaple: with Persistence(Config.TELEWALL_DATABASE_PATH) as p: if not p.is_blocked(caller_phone_number): p.block(caller_phone_number, '', 'button')
62598efa009cb60464cffe67
class ProfileFormView(LoginRequiredMixin, FormView): <NEW_LINE> <INDENT> template_name = "members/profile_form.html" <NEW_LINE> form_class = ProfileForm <NEW_LINE> success_url = reverse_lazy("members:profile") <NEW_LINE> def get_form_kwargs(self): <NEW_LINE> <INDENT> kwargs = super().get_form_kwargs() <NEW_LINE> kwargs...
Page for editing own contact info.
62598efa0fa83653e46f37f9
class PassagemInterEstadual(ABC): <NEW_LINE> <INDENT> def __init__(self, origem, destino, data_hora): <NEW_LINE> <INDENT> super(PassagemInterEstadual, self).__init__() <NEW_LINE> self.origem = origem <NEW_LINE> self.destino = destino <NEW_LINE> self.data_hora = data_hora <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> d...
docstring for PassagemInterEstadual.
62598efad486a94d0ba2a8e1
class SmallKurtosis(Feature): <NEW_LINE> <INDENT> def fit(self, data): <NEW_LINE> <INDENT> magnitude = data[0] <NEW_LINE> n = len(magnitude) <NEW_LINE> mean = np.mean(magnitude) <NEW_LINE> std = np.std(magnitude) <NEW_LINE> S = sum(((magnitude - mean) / std) ** 4) <NEW_LINE> c1 = float(n * (n + 1)) / ((n - 1) * (n - 2)...
Small sample kurtosis of the magnitudes. See http://www.xycoon.com/peakedness_small_sample_test_1.htm
62598efa97e22403b3839809
class PipeTest(unittest.TestCase): <NEW_LINE> <INDENT> def test_pipes(self): <NEW_LINE> <INDENT> r = pipe(pipe.test_return(0)|pipe.test_return(0, "output")|pipe.grep("o")) <NEW_LINE> self.assertEqual(r.returncode, [0,0,0]) <NEW_LINE> self.assertEqual(r.stdout, b'output\n') <NEW_LINE> self.assertEqual(r.stderr, b'') <NE...
Tests pipe functionality
62598efaff9c53063f518f7a
class Worker(BaseWorker): <NEW_LINE> <INDENT> shadows = [Pusher] <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.settings = kwargs.pop('settings', None) or Settings() <NEW_LINE> setup_logging(self.settings) <NEW_LINE> kwargs['redis_settings'] = self.settings.redis <NEW_LINE> super().__init__(**kwargs)...
arq worker used to execute jobs
62598efa5fcc89381b2655b5
class MiniMaxPlayer(Player): <NEW_LINE> <INDENT> def __init__(self, board_size=8, depth=1): <NEW_LINE> <INDENT> self._size = board_size <NEW_LINE> self._s_input_format = 'bitboard' <NEW_LINE> self._legal_moves_input_format = 'bitboard_single' <NEW_LINE> self._move_output_format = 'bitboard_single' <NEW_LINE> self._dept...
This agent uses the minimiax algorithm to decide which move to play Attributes _depth : int the depth to which explore the next states for best move _env : StateEnvBitBoard instance of environment to allow exploration of next states _player : int stores which coin the player has to originally play 1 fo...
62598efad268445f2663901c
class ProviderStatisticsModel(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'provider_statistics' <NEW_LINE> __table_args__ = {"schema": "scs"} <NEW_LINE> provider_id = db.Column(db.Integer, primary_key=True) <NEW_LINE> total_patient_visits = db.Column(db.Integer, nullable=False) <NEW_LINE> avg_consult_time = db.Colum...
ProviderStatisticsModel Model
62598efa67a9b606de5448e9
class BranchNode(Layer): <NEW_LINE> <INDENT> instances = {} <NEW_LINE> def __new__(cls, name=None): <NEW_LINE> <INDENT> if name in cls.instances: <NEW_LINE> <INDENT> return cls.instances[name] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return Layer.__new__(cls) <NEW_LINE> <DEDENT> <DEDENT> def __init__(self, name=No...
Layer that allows branching. Used to send outputs to multiple layer pathways. Each pathway will get the entire output of the layer preceding the branch node.
62598efa3346ee7daa336af3
class IndexView(TemplateView): <NEW_LINE> <INDENT> template_name = 'accounts/index.html'
Displays index page. :template:`accounts/index.html`
62598efa99cbb53fe682f7c9
class BackporterError(Exception): <NEW_LINE> <INDENT> def __init__(self, message, title=None, show_traceback=False): <NEW_LINE> <INDENT> Exception.__init__(self, message) <NEW_LINE> self.message = message <NEW_LINE> self.title = title <NEW_LINE> self.show_traceback = show_traceback
Exception base class for errors in Trac.
62598efa796e427e5384d0b4
class IFMapLinkAttr(IFMapMetadata): <NEW_LINE> <INDENT> def __init__(self, name): <NEW_LINE> <INDENT> super(IFMapMetadata, self).__init__(name) <NEW_LINE> self._cppname = CamelCase(name) <NEW_LINE> self._complexType = None <NEW_LINE> <DEDENT> def getCppName(self): <NEW_LINE> <INDENT> return self._cppname <NEW_LINE> <DE...
Link metadata with attributes
62598efa091ae35668703533
class Receive(MyThread): <NEW_LINE> <INDENT> def __init__(self, communicator, client_socket): <NEW_LINE> <INDENT> MyThread.__init__(self, -1, "ClientComReceive") <NEW_LINE> self.communicator = communicator <NEW_LINE> self.client_socket = client_socket <NEW_LINE> <DEDENT> def manager(self): <NEW_LINE> <INDENT> while not...
The class represents a thread that is listening for a client.
62598efa60cbc95b06362c4a
class RDGAEnvironment(Environment.CommonEnvironment): <NEW_LINE> <INDENT> def __init__(self, objectives=None, var_ranges=None, size=None, maxgen=None, cross_rate=None, mut_rate=None, num_cycles=None, fitness=None, output=None): <NEW_LINE> <INDENT> Individ = Individual.RealCoded <NEW_LINE> Pop = Population.RDGAPopulatio...
In progress...
62598efa4a966d76dd5ed7ee
class Tokenizer(object): <NEW_LINE> <INDENT> def __init__(self, starting_mode, matchers, default_types): <NEW_LINE> <INDENT> self.__starting_mode = starting_mode <NEW_LINE> self.matchers = matchers <NEW_LINE> self.default_types = default_types <NEW_LINE> <DEDENT> def TokenizeFile(self, file): <NEW_LINE> <INDENT> self.m...
General purpose tokenizer. Attributes: mode: The latest mode of the tokenizer. This allows patterns to distinguish if they are mid-comment, mid-parameter list, etc. matchers: Dictionary of modes to sequences of matchers that define the patterns to check at any given time. default_types: Dictionary o...
62598efa8a349b6b43684b5c
class BinarySearchTree: <NEW_LINE> <INDENT> class _Node: <NEW_LINE> <INDENT> def __init__(self,key,value): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.value = value <NEW_LINE> self.left = None <NEW_LINE> self.right = None <NEW_LINE> <DEDENT> <DEDENT> def __init__(self): <NEW_LINE> <INDENT> self.root = None <NEW_...
An unbalanced binary search tree.
62598efa5166f23b2e241cf7