code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Solution: <NEW_LINE> <INDENT> def isInterleave(self, s1, s2, s3): <NEW_LINE> <INDENT> if s1 is None or s2 is None or s3 is None: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> if len(s1) + len(s2) != len(s3): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> interleave = [[False] * (len(s2) + 1) for i in...
@params s1, s2, s3: Three strings as description. @return: return True if s3 is formed by the interleaving of s1 and s2 or False if not. @hint: you can use [[True] * m for i in range (n)] to allocate a n*m matrix.
62598f0d091ae3566870379c
@tag(0xFC) <NEW_LINE> class EmergencyInformationDescriptor(Descriptor): <NEW_LINE> <INDENT> descriptor_tag = uimsbf(8) <NEW_LINE> descriptor_length = uimsbf(8) <NEW_LINE> @loop(descriptor_length) <NEW_LINE> class services(Syntax): <NEW_LINE> <INDENT> service_id = uimsbf(16) <NEW_LINE> start_end_flag = bslbf(1) <NEW_LIN...
緊急情報記述子(ARIB-STD-B10-2-7.2.24)
62598f0d9f28863672817379
class Suffix(object): <NEW_LINE> <INDENT> def __init__(self, name, description, separator, ordering): <NEW_LINE> <INDENT> if not name: <NEW_LINE> <INDENT> raise SuffixNameEmptyError('Suffix name cannot be empty.') <NEW_LINE> <DEDENT> if ordering != 'suffix' and ordering != 'prefix': <NEW_LINE> <INDENT> raise InvalidOrd...
Action suffix in actions.xml. Attributes: name: name of the suffix. description: description of the suffix. separator: the separator between affected action name and suffix name. ordering: 'suffix' or 'prefix'. if set to prefix, suffix name will be inserted after the first dot separator of affected...
62598f0d3346ee7daa336c24
class ClusterBasicSettings(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.ClusterOs = None <NEW_LINE> self.ClusterVersion = None <NEW_LINE> self.ClusterName = None <NEW_LINE> self.ClusterDescription = None <NEW_LINE> self.VpcId = None <NEW_LINE> self.ProjectId = None <NEW_LINE> self.Ta...
描述集群的基本配置信息
62598f0d283ffb24f3cf242f
class ContextStack(object): <NEW_LINE> <INDENT> def __init__(self, *items): <NEW_LINE> <INDENT> self._stack = list(items) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "%s%s" % (self.__class__.__name__, tuple(self._stack)) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def create(*context, **kwargs):...
Provides dictionary-like access to a stack of zero or more items. Instances of this class are meant to act as the rendering context when rendering Mustache templates in accordance with mustache(5) and the Mustache spec. Instances encapsulate a private stack of hashes, objects, and built-in type instances. Querying t...
62598f0dbe7bc26dc9251422
class RecomendationsConfig(AppConfig): <NEW_LINE> <INDENT> name = 'recomendations'
App config for the recomendations app.
62598f0dbf627c535bcafff8
class Leds: <NEW_LINE> <INDENT> class Channel: <NEW_LINE> <INDENT> OFF = 0 <NEW_LINE> ON = 1 <NEW_LINE> PATTERN = 2 <NEW_LINE> def __init__(self, state, brightness): <NEW_LINE> <INDENT> if state not in (self.ON, self.OFF, self.PATTERN): <NEW_LINE> <INDENT> raise ValueError('state must be OFF, ON, or PATTERN') <NEW_LINE...
Class to control the KTD LED driver chip in the button used with the Vision and Voice Bonnet.
62598f0dff9c53063f5191e0
class WebNotificationViewSet(APILoggingMixin, JqListAPIMixin, mixins.ListModelMixin, viewsets.GenericViewSet): <NEW_LINE> <INDENT> queryset = WebNotification.objects.all() <NEW_LINE> schema = ObjectResponseSchema() <NEW_LINE> permission_classes = [IsAuthenticated] <NEW_LINE> track_view_actions = ['mark_seen', 'unmark_s...
list: Web Notification List
62598f0d167d2b6e312b5b1d
class WordsAccess: <NEW_LINE> <INDENT> def __init__(self, puzzle: puz.Puzzle, cells: CellsAccess): <NEW_LINE> <INDENT> self.words = [] <NEW_LINE> self.across = [] <NEW_LINE> self.down = [] <NEW_LINE> numbering = puzzle.clue_numbering() <NEW_LINE> for info in numbering.across: <NEW_LINE> <INDENT> x, y = to_position(info...
Basic container for a list of words.
62598f0d377c676e912f6327
class SignatureMethod(object): <NEW_LINE> <INDENT> def _to_utf8(self, s): <NEW_LINE> <INDENT> return unicode(s, 'utf-8').encode('utf-8') <NEW_LINE> <DEDENT> def _escape(self, s): <NEW_LINE> <INDENT> return quote(self._to_utf8(s), safe='~') <NEW_LINE> <DEDENT> def _normalize_request_parameters(self, request): <NEW_LINE>...
A base class for signature methods providing a set of common methods.
62598f0d9f2886367281737b
class _CallBack(object): <NEW_LINE> <INDENT> CALL_AT = "" <NEW_LINE> REQUIRED_ARGS = [] <NEW_LINE> def __init__(self, its_per_epochs: int) -> None: <NEW_LINE> <INDENT> self._iteration = 0 <NEW_LINE> self._epoch = 0 <NEW_LINE> self._its_per_epochs = its_per_epochs <NEW_LINE> <DEDENT> def iteration_end(self, jump: int, *...
A CallBack is called every time an iteration ends, it can monitor metrics or modify parameters of the network. Constants: CALL_AT (str): When to call the callback REQUIRED_ARGS (list): A list of arguments required to call .action(). Those arguments must be attributes of the model. Methods: iterati...
62598f0d3346ee7daa336c25
class TestGypCustom(TestGypBase): <NEW_LINE> <INDENT> def __init__(self, **kw): <NEW_LINE> <INDENT> self.format = kw.pop("format") <NEW_LINE> super(TestGypCustom, self).__init__(**kw)
Subclass for testing the GYP with custom generator
62598f0d7b180e01f3e4860a
class RWLock: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.__read_switch = _LightSwitch() <NEW_LINE> self.__write_switch = _LightSwitch() <NEW_LINE> self.__no_readers = threading.Lock() <NEW_LINE> self.__no_writers = threading.Lock() <NEW_LINE> self.__readers_queue = threading.Lock() <NEW_LINE> <DED...
Synchronization object used in a solution of so-called second readers-writers problem. In this problem, many readers can simultaneously access a share, and a writer has an exclusive access to this share. Additionally, the following constraints should be met: 1) no reader should be kept waiting if the share is currently...
62598f0da05bb46b384893fd
class Slot(NamedTuple): <NEW_LINE> <INDENT> venue: str <NEW_LINE> starts_at: datetime <NEW_LINE> duration: int <NEW_LINE> capacity: int <NEW_LINE> session: str
A period of time at a venue in which an event can be scheduled Parameters ---------- venue : str A human readable string starts_at: datetime The starting time for the time period duration: int The duration of the time period in minutes capacity: int This will be compared with :attr:`Event.demand` durin...
62598f0d55399d3f056250ab
@admin.register(College) <NEW_LINE> class CollegeAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ['college_id', 'name', ] <NEW_LINE> search_fields = ['college_id', 'name', ] <NEW_LINE> list_filter = ['college_id', 'name', ] <NEW_LINE> ordering = ['college_id']
the class of CollegeAdmin
62598f0d7c178a314d78c025
class VirtualNetworkListResponse(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, 'value': {'key': 'value', 'type': '[VirtualNetwork]'}, } <NEW_LINE> def __init__( self, *, next_link: Optional[str] = None, value: Optional[List["VirtualNetwork"]] = None...
List of virtual networks. :param next_link: Link for next list of VirtualNetwork. :type next_link: str :param value: Results of the VirtualNetwork list. :type value: list[~azure.mgmt.vmwarecloudsimple.models.VirtualNetwork]
62598f0d283ffb24f3cf2432
class EnumCharField(CharField): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.enum_class = kwargs.pop("choices") <NEW_LINE> super().__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def db_value(self, value): <NEW_LINE> <INDENT> return value.name <NEW_LINE> <DEDENT> def python_value(self...
Custom class to store name of Python enum item (enum class passed as the `choices` argument during initialization) in a `varchar` field. Two methods are provided to convert between application and database layer. The conversion is defined by the `choices` attribute. Cf. suggestions in https://github.com/coleifer/peewee...
62598f0d97e22403b3839a67
class CircleCommitDTO: <NEW_LINE> <INDENT> def __init__( self, owner, project, commit_sha, build_num, quality_tool, repo_id=None, pr_link=None ): <NEW_LINE> <INDENT> self.owner = owner <NEW_LINE> self.project = project <NEW_LINE> self.commit_sha = commit_sha <NEW_LINE> self.build_num = build_num <NEW_LINE> self.quality...
DTO that represents the commit processed by CircleCI in order to generate the report.
62598f0d60cbc95b06362eb8
class Bookmark(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey(User) <NEW_LINE> pid = models.CharField(max_length=255) <NEW_LINE> tags = TaggableManager() <NEW_LINE> unique_together = ( ('user', 'pid'), ) <NEW_LINE> def display_tags(self): <NEW_LINE> <INDENT> return ', '.join(self.tags.all().values_list('na...
:class:`~django.db.models.Model` to allow users to create private bookmarks and tags for :class:`~eulfedora.models.DigitalObject` instances.
62598f0da05bb46b384893ff
class Path(object): <NEW_LINE> <INDENT> def __init__(self, verts, pathtype = None): <NEW_LINE> <INDENT> global setup <NEW_LINE> self.verts = verts <NEW_LINE> self.pathtype = pathtype
Stores a list of vertices, a single color, and a primitive type Intended to be rendered as a single OpenGL primitive
62598f0d7c178a314d78c027
class PostForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Post <NEW_LINE> fields = ('title', 'categories', 'introduction', 'body') <NEW_LINE> widgets = { 'title': forms.TextInput(attrs={'class': 'form-control'}), 'categories': forms.SelectMultiple(choices=list(choices), attrs={'class'...
Used in adding post or update post
62598f0d7cff6e4e811b4570
class ISBN: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def parse_literal(ast: "ValueNode") -> Union[str, "UNDEFINED_VALUE"]: <NEW_LINE> <INDENT> if isinstance(ast, StringValueNode): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return _check_isbn(ast.value) <NEW_LINE> <DEDENT> except (ValueError, TypeError): <NEW_LINE...
Scalar which handles International Standard Book Numbers (10/13)
62598f0dec188e330fdf743b
class SemaphoreTests(BaseSemaphoreTests): <NEW_LINE> <INDENT> def test_release_unacquired(self): <NEW_LINE> <INDENT> sem = self.semtype(1) <NEW_LINE> sem.release() <NEW_LINE> sem.acquire() <NEW_LINE> sem.acquire() <NEW_LINE> sem.release() <NEW_LINE> <DEDENT> def test_repr(self): <NEW_LINE> <INDENT> sem = self.semtype(3...
Tests for unbounded semaphores.
62598f0d7b180e01f3e4860c
class VIEW3D_OT_gethide(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "update_view_to_render.gethide" <NEW_LINE> bl_label = "Match to Hidden" <NEW_LINE> bl_options = {'REGISTER', 'UNDO'} <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> print("Operator is executing") <NEW_LINE> for x in bpy.context.scen...
Match all visibility toggles to hide visibility This doesn't affect Collection
62598f0dbe7bc26dc9251425
class IrreversibleModelFBATest(unittest.TestCase): <NEW_LINE> <INDENT> def testRun(self): <NEW_LINE> <INDENT> model = load_sbml_model(SMALL_TEST_MODEL, kind=GPR_CONSTRAINED) <NEW_LINE> fix_bigg_model(model) <NEW_LINE> make_irreversible(model) <NEW_LINE> self.assertTrue(all([not reaction.reversible for reaction in model...
Test FBA simulation after reversible decomposition.
62598f0d4a966d76dd5eda5d
class COCsegment(Segment): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> Segment.__init__(self, id='COC') <NEW_LINE> self.__dict__.update(**kwargs) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> msg = Segment.__str__(self) <NEW_LINE> msg += '\n Associated component: {0}'.format(s...
COC (Coding style Component) segment information. Attributes ---------- id : str Identifier for the segment. offset : int Offset of marker segment in bytes from beginning of file. length : int Length of marker segment in bytes. This number does not include the two bytes constituting the marker. Ccoc :...
62598f0d60cbc95b06362eba
class Delete(base.Command): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> parser.add_argument( 'names', metavar='NAME', nargs='+', help='The names of the groups to delete.') <NEW_LINE> <DEDENT> def Run(self, args): <NEW_LINE> <INDENT> compute_holder = base_classes.ComputeApiHolder(s...
Delete Google Compute Engine groups. *{command}* deletes one or more Google Compute Engine groups. ## EXAMPLES To delete a group, run: $ {command} example-group To delete multiple groups, run: $ {command} example-group-1 example-group-2
62598f0d091ae356687037a4
class event(object): <NEW_LINE> <INDENT> venusian = venusian <NEW_LINE> def __init__(self, regexp, callback=None, iotype='in', venusian_category='irc3.rfc1459'): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> re.compile(getattr(regexp, 're', regexp)) <NEW_LINE> <DEDENT> except Exception as e: <NEW_LINE> <INDENT> raise e....
register a method or function an irc event callback:: >>> @event('^:\S+ 353 [^&#]+(?P<channel>\S+) :(?P<nicknames>.*)') ... def on_names(bot, channel=None, nicknames=None): ... '''this will catch nickname when you enter a channel''' ... print(channel, nicknames.split(':')) The callback can be ...
62598f0dbe7bc26dc9251426
class BreslowFlemingHarringtonFitter(BaseFitter): <NEW_LINE> <INDENT> def fit(self, durations, event_observed=None, timeline=None, entry=None, label='BFH_estimate', alpha=None, ci_labels=None): <NEW_LINE> <INDENT> self._label = label <NEW_LINE> alpha = alpha if alpha is not None else self.alpha <NEW_LINE> naf = NelsonA...
Class for fitting the Breslow-Fleming-Harrington estimate for the survival function. This estimator is a biased estimator of the survival function but is more stable when the popualtion is small and there are too few early truncation times, it may happen that is the number of patients at risk and the number of deaths i...
62598f0dbf627c535bcb0001
class KLLFile: <NEW_LINE> <INDENT> def __init__(self, path, file_context): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> self.context = file_context <NEW_LINE> self.lines = [] <NEW_LINE> self.data = "" <NEW_LINE> self.connect_id = None <NEW_LINE> self.context.kll_files.append(self.filename()) <NEW_LINE> <DEDENT> def ...
Container class for imported KLL files
62598f0dd8ef3951e32c7419
class Time(SchemaType): <NEW_LINE> <INDENT> err_template = _('Invalid time') <NEW_LINE> def serialize(self, node, appstruct): <NEW_LINE> <INDENT> if appstruct is null: <NEW_LINE> <INDENT> return null <NEW_LINE> <DEDENT> if isinstance(appstruct, datetime.datetime): <NEW_LINE> <INDENT> appstruct = appstruct.time() <NEW_...
A type representing a Python ``datetime.time`` object. .. note:: This type is new as of Colander 0.9.3. This type serializes python ``datetime.time`` objects to a `ISO8601 <http://en.wikipedia.org/wiki/ISO_8601>`_ string format. The format includes the date only. The constructor accepts no arguments. You can adjust...
62598f0dad47b63b2c5a63a4
class Segment(Graph): <NEW_LINE> <INDENT> def __init__(self, *, adjacency_matrix=None, chain=None, type_=None, len_=None, gamma_graph=None): <NEW_LINE> <INDENT> self._gamma_graph = gamma_graph <NEW_LINE> Graph.__init__(self, adjacency_matrix=adjacency_matrix, chain=chain, type_=type_, len_=len_) <NEW_LINE> <DEDENT> def...
Сегмент
62598f0dcc40096d6161979f
class ChannelContext: <NEW_LINE> <INDENT> def __init__(self, conn, kwargs): <NEW_LINE> <INDENT> self.conn = conn <NEW_LINE> self.kwargs = kwargs <NEW_LINE> <DEDENT> async def __aenter__(self): <NEW_LINE> <INDENT> self.channel = await self.conn.channel(**self.kwargs) <NEW_LINE> return self.channel <NEW_LINE> <DEDENT> as...
This class is returned by :meth:`AmqpProtocol:new_channel`. It is responsible for creating a new channel when used as a context manager.
62598f0d31939e2706ed1027
class IncompatibleSessionError(SessionResumeError): <NEW_LINE> <INDENT> pass
Exception raised when :class:`SessionResumeHelper` comes across malformed or unsupported data that was (presumably) produced by :class:`SessionSuspendHelper`
62598f0d3d592f4c4edb9a72
class WorkQueue(object): <NEW_LINE> <INDENT> def __init__(self, queue_length: int = None): <NEW_LINE> <INDENT> self.condition = Condition() <NEW_LINE> self.queue = deque([], queue_length) if queue_length else deque() <NEW_LINE> <DEDENT> def get(self) -> object: <NEW_LINE> <INDENT> if not self.queue: <NEW_LINE> <INDENT>...
Used by workers and coordinators to manage their internal work queue. Args: - queue_length: Maximum length queue can reach, before popping old items. Attributes: - condition: Queue Lock, allowing threads to wait until they are notified. - queue: Queue of data to be processed.
62598f0d091ae356687037a6
class TableType: <NEW_LINE> <INDENT> _compat = False <NEW_LINE> @classmethod <NEW_LINE> def from_tree(cls, node, ctx): <NEW_LINE> <INDENT> meta = node.get('meta', {}) <NEW_LINE> if cls._compat: <NEW_LINE> <INDENT> return table.Table(node['columns'], meta=meta) <NEW_LINE> <DEDENT> if node.get('qtable', False): <NEW_LINE...
This class defines to_tree and from_tree methods that are used by both the AstropyTableType and the AsdfTableType defined below. The behavior is differentiated by the ``_compat`` class attribute. When ``_compat==True``, the behavior will conform to the table schema defined by the ASDF Standard. Otherwise, the behavior ...
62598f0d71ff763f4b5e62f0
class Lookahead(BaseNode, BranchCompiled): <NEW_LINE> <INDENT> def __init__(self, equal, forwards): <NEW_LINE> <INDENT> super(Lookahead, self).__init__(consumes=False, size=0) <NEW_LINE> self.equal = equal <NEW_LINE> self.forwards = forwards <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return '(?' + ...
Lookahead match (one that does not consume any input). - `equal` is `True` if the lookahead should succeed for the match to continue and `False` if the lookahead should fail. - `forwards` is `True` if the lookahead should start from the current position and `False` if it should end there. - `next` contains two v...
62598f0dab23a570cc2d4332
class TestUser(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> app.config['TESTING'] = True <NEW_LINE> app.config['SQLALCHEMY_DATABASE_URI'] = DATABASE_URI <NEW_LINE> db.create_all() <NEW_LINE> self.user = User(full_name='test1 user1', email='test@gmail.com', password='1', is_active=True, a...
Test case for user model. For test running tables Users and Roles had to be created.
62598f0d9f28863672817384
class HttpLifecycleManager(TaskRunner): <NEW_LINE> <INDENT> DEFAULT_ESCALATION_WAIT = Amount(5, Time.SECONDS) <NEW_LINE> WAIT_POLL_INTERVAL = Amount(1, Time.SECONDS) <NEW_LINE> @classmethod <NEW_LINE> def wrap(cls, runner, task_instance, portmap): <NEW_LINE> <INDENT> if not task_instance.has_lifecycle() or not task_ins...
A wrapper around a TaskRunner that performs HTTP lifecycle management.
62598f0ddc8b845886d52154
class UserProfileFeedViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> authentication_classes = (TokenAuthentication,) <NEW_LINE> serializer_class = serializers.ProfileFeedItemSerializer <NEW_LINE> queryset = models.ProfileFeedItem.objects.all() <NEW_LINE> permission_classes = (permission.UpdateOwnStatus,IsAuthentica...
Handles creating, reading and updating profile feed items
62598f0dad47b63b2c5a63a6
class TestModel_WorkspaceBulkDeleteResponse(): <NEW_LINE> <INDENT> def test_workspace_bulk_delete_response_serialization(self): <NEW_LINE> <INDENT> workspace_bulk_delete_response_model_json = {} <NEW_LINE> workspace_bulk_delete_response_model_json['job'] = 'testString' <NEW_LINE> workspace_bulk_delete_response_model_js...
Test Class for WorkspaceBulkDeleteResponse
62598f0d4527f215b58e8a88
class AltTSB(nn.Module): <NEW_LINE> <INDENT> def __init__(self, Ca=96, Cp=48, Cr=5, T=301, F=257, N=5, device='cpu'): <NEW_LINE> <INDENT> super(AltTSB, self).__init__() <NEW_LINE> self.ftb_1 = AltFTB(Ca, Cr, T, F, N, device) <NEW_LINE> self.conv_a_1 = nn.Sequential( nn.Conv2d(Ca, Ca, kernel_size=5, stride=1, dilation=1...
Alternative TSB using AltFTB
62598f0dbf627c535bcb0005
class HUD(qt.QFrame): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> qt.QFrame.__init__(self, parent) <NEW_LINE> self.setFrameStyle(qt.QFrame.Panel | qt.QFrame.Raised) <NEW_LINE> self.setLineWidth(2) <NEW_LINE> pal = self.palette(); <NEW_LINE> pal.setColor(self.backgroundRole(), qc.Qt.blue); <NEW...
Always displayed information.
62598f0d851cf427c66b6e58
class PageNumberPagination(BasePagination): <NEW_LINE> <INDENT> page_size = api_settings.PAGE_SIZE <NEW_LINE> page_query_param = 'page' <NEW_LINE> page_size_query_param = None <NEW_LINE> max_page_size = None <NEW_LINE> paginator_class = Paginator <NEW_LINE> last_page_strings = ('last',) <NEW_LINE> invalid_page_message ...
A simple page number based style that supports page numbers as query parameters. For example: http://api.example.org/accounts/?page=4 http://api.example.org/accounts/?page=4&page_size=100
62598f0da05bb46b38489407
class ZMQBase(Binding): <NEW_LINE> <INDENT> def __init__(self, protocol, address): <NEW_LINE> <INDENT> self.protocol = protocol <NEW_LINE> self.address = address <NEW_LINE> <DEDENT> def address_prompt(self, message="", level="Warning"): <NEW_LINE> <INDENT> message = "{}. Change address".format(message) <NEW_LINE> retur...
Base class for the zmq modules
62598f0dad47b63b2c5a63a8
class TextureProgram(MeshProgram): <NEW_LINE> <INDENT> def __init__(self, program=None, **kwargs): <NEW_LINE> <INDENT> super().__init__(program=None) <NEW_LINE> self.program = programs.load(ProgramDescription( label="scene_default/texture.glsl", path="scene_default/texture.glsl")) <NEW_LINE> <DEDENT> def draw(self, mes...
Simple texture program
62598f0d091ae356687037aa
class CliHashmapThresholdGroup(command.Command): <NEW_LINE> <INDENT> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(CliHashmapThresholdGroup, self).get_parser(prog_name) <NEW_LINE> parser.add_argument('-i', '--threshold-id', help='Threshold uuid', required=True) <NEW_LINE> return parser <NEW_LINE> ...
Get a threshold group.
62598f0d283ffb24f3cf243b
class BooleanConverter(ValueConverter): <NEW_LINE> <INDENT> TRUE_VALUES = frozenset(('t', 'T', 'true', 'True', 'TRUE', True, 1, '1',)) <NEW_LINE> FALSE_VALUES = frozenset(('f', 'F', 'false', 'False', 'FALSE', False, 0, '0',)) <NEW_LINE> def _convert_value(self, value, format_str): <NEW_LINE> <INDENT> if value in self.T...
Converts strings to a boolean value or None
62598f0d377c676e912f632d
class Ztrie(object): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> if len(args) == 2 and type(args[0]) is c_void_p and isinstance(args[1], bool): <NEW_LINE> <INDENT> self._as_parameter_ = cast(args[0], ztrie_p) <NEW_LINE> self.allow_destruct = args[1] <NEW_LINE> <DEDENT> elif len(args) == 2 and typ...
simple trie for tokenizable strings
62598f0dec188e330fdf7443
class RefDepartmentRUDView(RetrieveUpdateDestroyAPIView): <NEW_LINE> <INDENT> lookup_field = 'id' <NEW_LINE> serializer_class = RefDepartmentSerializer <NEW_LINE> permission_classes = (PermissionSettings.IS_ADMIN_OR_READ_ONLY, CustomDjangoModelPermissions) <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return R...
This module contains the definition for RETRIEVE, UPDATE AND DELETE operation for the DEPARTMENT Model.
62598f0d97e22403b3839a71
@unittest2.skipIf(True, 'Skipped until we improve integration tests setup') <NEW_LINE> class SensorContainerTestCase(IntegrationTestCase): <NEW_LINE> <INDENT> print_stdout_stderr_on_teardown = True <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(SensorContainerTestCase, cls).setUpClass...
Note: For those tests MongoDB must be running, virtualenv must exist for examples pack and sensors from the example pack must be registered.
62598f0da05bb46b38489409
class Api(object): <NEW_LINE> <INDENT> def __init__(self, host, port, auth): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self.auth = auth <NEW_LINE> self.reassign = [] <NEW_LINE> self.volumes = [] <NEW_LINE> self.snapshots = [] <NEW_LINE> self.attachments = [] <NEW_LINE> <DEDENT> @classm...
Mock the API bindings class.
62598f0d3617ad0b5ee04cbf
class StockModeler: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> raise NotImplementedError( "This class must used statically; don't instantiate it." ) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> @validate_df(columns={'close'}, instance_method=False) <NEW_LINE> def decompose(df, period, model='additive')...
Static methods for modeling stocks.
62598f0dec188e330fdf7445
@attr.s <NEW_LINE> class HuaweiLteMobileDataSwitch(HuaweiLteBaseSwitch): <NEW_LINE> <INDENT> def __attrs_post_init__(self) -> None: <NEW_LINE> <INDENT> self.key = KEY_DIALUP_MOBILE_DATASWITCH <NEW_LINE> self.item = "dataswitch" <NEW_LINE> <DEDENT> @property <NEW_LINE> def _entity_name(self) -> str: <NEW_LINE> <INDENT> ...
Huawei LTE mobile data switch device.
62598f0d5fdd1c0f98e5cb33
class Die: <NEW_LINE> <INDENT> def __init__(self, lowest_value, highest_value): <NEW_LINE> <INDENT> self.low = lowest_value <NEW_LINE> self.high = highest_value
responsibility: Determines the number of potential outcomes for a dice roll collaborators: Game
62598f0d7b180e01f3e48611
class SymbolReservedError(SymbolError): <NEW_LINE> <INDENT> pass
Symbol cannot be removed because it is reserved.
62598f0d851cf427c66b6e5c
class BankHollidayTransformer(BaseEstimator, TransformerMixin): <NEW_LINE> <INDENT> def __init__(self, DO): <NEW_LINE> <INDENT> self.DO = DO <NEW_LINE> <DEDENT> def transform(self, X, **transform_params): <NEW_LINE> <INDENT> tmp = pd.DataFrame(X, columns=['cnt']) <NEW_LINE> tmp[tmp.index.isin(self.bos)] = 0.0 <NEW_LINE...
Fill bank holliday with zeros
62598f0da05bb46b3848940b
@attr.s(frozen=True) <NEW_LINE> class NoOpDpEvent(DpEvent): <NEW_LINE> <INDENT> pass
Represents appplication of an operation with no privacy impact. A `NoOpDpEvent` is generally never required, but it can be useful as a placeholder where a `DpEvent` is expected, such as in tests or some live accounting pipelines.
62598f0d31939e2706ed102b
@pulumi.output_type <NEW_LINE> class GetPolicyResult: <NEW_LINE> <INDENT> def __init__(__self__, controls=None, id=None, name=None, published_copy=None, requires=None, rules=None, strategy=None): <NEW_LINE> <INDENT> if controls and not isinstance(controls, list): <NEW_LINE> <INDENT> raise TypeError("Expected argument '...
A collection of values returned by getPolicy.
62598f0d091ae356687037ae
class CustomGripObject(GripObject, IDisposable): <NEW_LINE> <INDENT> def Dispose(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def NewLocation(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def OnAddToDocument(self, *args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def OnDeleteFromDocument(self, *args): <...
CustomGripObject()
62598f0d8a349b6b43684dd6
class TestLogToProfile(AATest): <NEW_LINE> <INDENT> tests = 'invalid' <NEW_LINE> def _run_test(self, params, expected): <NEW_LINE> <INDENT> logfile = '%s.in' % params <NEW_LINE> profile_dummy_file = 'AATest_does_exist' <NEW_LINE> parser = ReadLog('', '', '', '') <NEW_LINE> parsed_event = parser.parse_event(read_file(lo...
Check if the libraries/libapparmor/testsuite/test_multi tests result in the expected profile
62598f0d7cff6e4e811b457c
class TestUpdateWorkweekConfigRequest(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 testUpdateWorkweekConfigRequest(self): <NEW_LINE> <INDENT> model = squareconnect.models.update_workweek_config_...
UpdateWorkweekConfigRequest unit test stubs
62598f0d283ffb24f3cf2440
class JMeter_20x_9u_1t_300msdelay(JMeter): <NEW_LINE> <INDENT> jmx = os.path.join(os.path.dirname(__file__), 'jmeter/httpreq_20x_9u_1t_300msdelay.jmx') <NEW_LINE> shortname = "httpreq_20x_9u_1t_300msdelay"
Runs JMeter jmx 20x_9u_1t_300msdelay
62598f0d9f2886367281738c
class GlobalDeclaration(object): <NEW_LINE> <INDENT> def __init__(self, declaration_file): <NEW_LINE> <INDENT> self._declaration_file = declaration_file <NEW_LINE> self._initialized = False <NEW_LINE> <DEDENT> def lazy_init(self, reason): <NEW_LINE> <INDENT> if self._initialized: <NEW_LINE> <INDENT> return <NEW_LINE> <...
Global inclusion dependenct relationship declaration.
62598f0d4a966d76dd5eda69
class SSHSock(object): <NEW_LINE> <INDENT> def _sshconnect(self): <NEW_LINE> <INDENT> ps, cs = socketpair(AF_UNIX, SOCK_STREAM, 0) <NEW_LINE> p = fork() <NEW_LINE> if p == -1: <NEW_LINE> <INDENT> raise Exception("Fork failed") <NEW_LINE> <DEDENT> if p == 0: <NEW_LINE> <INDENT> ps.close() <NEW_LINE> f = cs.fileno() <NEW...
Ubervisor ssh transport. This provides a socket-like object to communicate with an ubervisor server.
62598f0dff9c53063f5191f2
class ReactiveSeq(pt.Composite): <NEW_LINE> <INDENT> def __init__(self, name="ReactiveSeq", children=None): <NEW_LINE> <INDENT> super(ReactiveSeq, self).__init__(name, children) <NEW_LINE> self.current_child = None <NEW_LINE> <DEDENT> def tick(self): <NEW_LINE> <INDENT> self.logger.debug("%s.tick()" % self.__class__.__...
>>>>>>>> Copied from the selector code to make into a reactive sequence .. graphviz:: dot/selector.dot A selector executes each of its child behaviours in turn until one of them fails (at which point it itself returns :data:`~py_trees.common.Status.RUNNING` or :data:`~py_trees.common.Status.FAILURE`, or it runs out...
62598f0d50812a4eaa6201b6
class Core(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> environ['#'] = '1' <NEW_LINE> pg.mixer.pre_init(44100, -16, 2, 1024) <NEW_LINE> pg.init() <NEW_LINE> pg.display.set_caption('Mario by techprogrammer007') <NEW_LINE> pg.display.set_caption('@code_with_python_') <NEW_LINE> pg.display.set_mode...
Main class.
62598f0ea219f33f346c53c0
class LetterDataProvider(DataProvider): <NEW_LINE> <INDENT> def all(self) -> Collection[str]: <NEW_LINE> <INDENT> return list("AB")
Concrete data provider returning collection containing "A" and "B"
62598f0e9f2886367281738d
class AdlistDetailView(DetailView): <NEW_LINE> <INDENT> pass
Sub-class the DetailView to pass the request to the form.
62598f0e3617ad0b5ee04cc3
class Tria(LinearODESystemsBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.t_start = 0 <NEW_LINE> self.t_end = 2 <NEW_LINE> self.initial_values = numpy.array([1, 3]) <NEW_LINE> <DEDENT> def f2f_rhs(self, t, u, v): <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> def s2f_rhs(self, t, u, v): <NEW_...
ODE-system - tria ∂²u/∂t² + ∂u/∂t + u = 0 gets to: ∂u/∂t = v ∂v/∂t = -v -u.
62598f0eab23a570cc2d4338
class LinkList(DashboardModule): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(LinkList, self).__init__(**kwargs) <NEW_LINE> self.title = kwargs.get('title', _('Links')) <NEW_LINE> self.template = kwargs.get('template', 'admin_tools/dashboard/modules/link_list.html') <NEW_LINE> self.layout...
A module that displays a list of links. As well as the :class:`~admin_tools.dashboard.modules.DashboardModule` properties, the :class:`~admin_tools.dashboard.modules.LinkList` takes an extra keyword argument: ``layout`` The layout of the list, possible values are ``stacked`` and ``inline``. The default value i...
62598f0ebe7bc26dc925142d
class AutomationException(Exception): <NEW_LINE> <INDENT> message = "An unknown exception occurred" <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(AutomationException, self).__init__() <NEW_LINE> try: <NEW_LINE> <INDENT> self._error_string = self.message % kwargs <NEW_LINE> <DEDENT> except Ex...
Base Tempest Exception To correctly use this class, inherit from it and define a 'message' property. That message will get printf'd with the keyword arguments provided to the constructor.
62598f0e60cbc95b06362ecb
class AuthError(AwairError): <NEW_LINE> <INDENT> message = ( "The supplied access token is invalid or " + "does not have access to the requested data" )
Some kind of authorization or authentication failure.
62598f0e099cdd3c636749a4
class CourseUpdateForm(forms.ModelForm): <NEW_LINE> <INDENT> def __init__(self, uid, *args, **kwargs): <NEW_LINE> <INDENT> super(CourseUpdateForm, self).__init__(*args, **kwargs) <NEW_LINE> creator = User.objects.get(id=uid) <NEW_LINE> <DEDENT> title = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-contr...
Form used for submitting project updates Attributes (Fields): update_title: [CharField] Name of project update update: [CharField] Project update content user: [User] User object associated with form submitter Methods: __init__ : gets the current user when initiating the form
62598f0e97e22403b3839a7b
class solver_counter: <NEW_LINE> <INDENT> def __init__(self, disp=True): <NEW_LINE> <INDENT> self._disp = disp <NEW_LINE> self.niter = 0 <NEW_LINE> self.backup= None <NEW_LINE> <DEDENT> def __call__(self, rk=None, msg='', store=None): <NEW_LINE> <INDENT> self.niter += 1 <NEW_LINE> if self._disp: <NEW_LINE> <INDENT> log...
counter for pcg, gmres, ... scipy routines since they don't keep count of iterations. see here: http://stackoverflow.com/questions/33512081/
62598f0e9f28863672817392
class IInitializer(Interface): <NEW_LINE> <INDENT> pass
Interface for XML stream initializers. Initializers perform a step in getting the XML stream ready to be used for the exchange of XML stanzas.
62598f0e851cf427c66b6e64
class PublicTagsApiTests(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.client = APIClient() <NEW_LINE> <DEDENT> def test_login_required(self): <NEW_LINE> <INDENT> resp = self.client.get(TAGS_URL) <NEW_LINE> self.assertEqual(resp.status_code, status.HTTP_401_UNAUTHORIZED)
Test the publicly available tags API
62598f0ead47b63b2c5a63b4
@Pgraph.node_type <NEW_LINE> class Atom(AtomicNode): <NEW_LINE> <INDENT> __slots__ = ()
To be extended by the client.
62598f0ecc40096d616197a7
class ChatHeadersList: <NEW_LINE> <INDENT> def __init__(self, metadata): <NEW_LINE> <INDENT> self.metadata = {} <NEW_LINE> for item in metadata: <NEW_LINE> <INDENT> self.metadata[item.uel] = item
A list of headers was parsed
62598f0e0fa83653e46f3a80
class SchemaField(Property): <NEW_LINE> <INDENT> def get_json_schema_dict(self): <NEW_LINE> <INDENT> prop = {} <NEW_LINE> prop['type'] = self._property_type <NEW_LINE> if self._optional: <NEW_LINE> <INDENT> prop['optional'] = self._optional <NEW_LINE> <DEDENT> if self._description: <NEW_LINE> <INDENT> prop['description...
SchemaField defines a simple field in REST API.
62598f0eadb09d7d5dc09147
class LAMP_PT_xplane(bpy.types.Panel): <NEW_LINE> <INDENT> bl_label = "XPlane" <NEW_LINE> bl_space_type = "PROPERTIES" <NEW_LINE> bl_region_type = "WINDOW" <NEW_LINE> bl_context = "data" <NEW_LINE> def draw(self,context): <NEW_LINE> <INDENT> obj = context.object <NEW_LINE> if(obj.type == "LAMP"): <NEW_LINE> <INDENT> la...
XPlane Material Panel
62598f0e3346ee7daa336c31
class MapActor(Actor): <NEW_LINE> <INDENT> def __init__(self, f: Callable[[Any], Any], recipient: str) -> None: <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._f = f <NEW_LINE> self._recipient = recipient <NEW_LINE> <DEDENT> def receive(self, msg: Any) -> Optional[Tuple[str, Any]]: <NEW_LINE> <INDENT> result = ...
Very simple, stateless actor that can be used with a msg transform function and a recipient.
62598f0ea05bb46b38489415
class DateTimeWidget(AbstractDataSetWidget): <NEW_LINE> <INDENT> def __init__(self, item, parent_layout): <NEW_LINE> <INDENT> super(DateTimeWidget, self).__init__(item, parent_layout) <NEW_LINE> self.dateedit = self.group = QDateTimeEdit() <NEW_LINE> self.dateedit.setCalendarPopup(True) <NEW_LINE> self.dateedit.setTool...
DateTimeItem widget
62598f0edc8b845886d52164
class Email(GraphProperty): <NEW_LINE> <INDENT> validator = validate_email <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self.encoding = kwargs.pop('encoding', 'utf-8') <NEW_LINE> if 'default' in kwargs and isinstance(kwargs['default'], string_types): <NEW_LINE> <INDENT> if not PY3: <NEW_LINE> <IN...
Email Data property type
62598f0ead47b63b2c5a63b6
class VideoFrameIterator(StimCollectionIterator): <NEW_LINE> <INDENT> _input_type = VideoStim <NEW_LINE> _output_type = ImageStim
Iterates frames in a VideoStim as ImageStims.
62598f0e377c676e912f6334
class _SeekFallbackCommand(object): <NEW_LINE> <INDENT> def __enter__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __exit__(self, typ, exc, tb): <NEW_LINE> <INDENT> if exc is None: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> pos = exc.pos <NEW_LINE> ba = exc.ba <NEW_LINE> <DEDENT>...
Context manager that tries to seek a fallback command if an error was raised.
62598f0e4527f215b58e8a96
class Token: <NEW_LINE> <INDENT> def __init__(self, literal, lineno, colno): <NEW_LINE> <INDENT> self._literal = literal <NEW_LINE> self._lineno = lineno <NEW_LINE> self._colno = colno <NEW_LINE> <DEDENT> @property <NEW_LINE> def pos(self): <NEW_LINE> <INDENT> return self._lineno, self._colno <NEW_LINE> <DEDENT> def __...
Lexical token remembering the position in the original code
62598f0e5fdd1c0f98e5cb3f
class SensorPlotThread(QThread): <NEW_LINE> <INDENT> add_sensor = pyqtSignal(int, int, int, int, int, int, int) <NEW_LINE> add_actuator = pyqtSignal(int, int, int, int, int, int) <NEW_LINE> clear_sensor_actuator_list = pyqtSignal() <NEW_LINE> update_tab_physical = pyqtSignal() <NEW_LINE> update_sensor_plot = pyqtSignal...
define pyqt signals to communicate with other threads
62598f0e97e22403b3839a7f
class Enumeration(object): <NEW_LINE> <INDENT> def __init__(self, enum_info): <NEW_LINE> <INDENT> self._enum_info = enum_info <NEW_LINE> self._inv_info = {v: k for k, v in enum_info.iteritems()} <NEW_LINE> <DEDENT> def __getitem__(self, key): <NEW_LINE> <INDENT> if isinstance(key, (int, long)): <NEW_LINE> <INDENT> retu...
Stand for an enumeration type
62598f0e9f28863672817396
class ConfigArgumentParser(argparse.ArgumentParser): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> self._config = None <NEW_LINE> self._config_keys = {} <NEW_LINE> self._env = {} <NEW_LINE> super(ConfigArgumentParser, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def _set_config(sel...
an argparse.ArgumentParser that handles config files and environment variables for arguments.
62598f0e60cbc95b06362ed1
class Stack: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.items = [] <NEW_LINE> <DEDENT> def push(self, item): <NEW_LINE> <INDENT> self.items.append(item) <NEW_LINE> <DEDENT> def pop(self): <NEW_LINE> <INDENT> self.items.pop() <NEW_LINE> <DEDENT> def get_top_element(self): <NEW_LINE> <INDENT> return...
Stack runs Last In First Out(LIFO) Item appended to top of the stack. If we want to pop item from the stack, remove top element of the stack.
62598f0e55399d3f056250c5
class MemcacheClient(object): <NEW_LINE> <INDENT> def __init__( self, endpoint, ad_timeout=10, ad_interval=60, *args, **kwargs): <NEW_LINE> <INDENT> self.endpoint = endpoint <NEW_LINE> self.ad_timeout = ad_timeout <NEW_LINE> cluster = Cluster(endpoint, ad_timeout) <NEW_LINE> self.cluster = cluster <NEW_LINE> self.wc = ...
Implement autodiscovery for elasticache memcache cluster
62598f0e7cff6e4e811b4588
class MissingObjectFinder(object): <NEW_LINE> <INDENT> def __init__(self, object_store, haves, wants, progress=None, get_tagged=None, get_parents=lambda commit: commit.parents): <NEW_LINE> <INDENT> self.object_store = object_store <NEW_LINE> self._get_parents = get_parents <NEW_LINE> have_commits, have_tags = ( _split_...
Find the objects missing from another object store. :param object_store: Object store containing at least all objects to be sent :param haves: SHA1s of commits not to send (already present in target) :param wants: SHA1s of commits to send :param progress: Optional function to report progress to. :param get_tagged:...
62598f0eab23a570cc2d433c
class SizeConverter(TypeConverter): <NEW_LINE> <INDENT> def CanConvertFrom(self,*__args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def CanConvertTo(self,*__args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ConvertFrom(self,*__args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def ConvertTo(self,*__args): <NE...
The System.Drawing.SizeConverter class is used to convert from one data type to another. Access this class through the System.ComponentModel.TypeDescriptor object. SizeConverter()
62598f0e97e22403b3839a81
class MySQLObjectStore(SQLObjectStore): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self._autocommit = kwargs.pop('autocommit', False) <NEW_LINE> SQLObjectStore.__init__(self, **kwargs) <NEW_LINE> <DEDENT> def augmentDatabaseArgs(self, args, pool=False): <NEW_LINE> <INDENT> if not args.get('db...
MySQLObjectStore implements an object store backed by a MySQL database. MySQL notes: * MySQL home page: http://www.mysql.com. * MySQL version this was developed and tested with: 3.22.34 & 3.23.27 * The platforms developed and tested with include Linux (Mandrake 7.1) and Windows ME. * The MySQL-Python DB AP...
62598f0e3346ee7daa336c33
class Transform(Layer): <NEW_LINE> <INDENT> def forward(self, x, is_training): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def forward_multi_input(self, xx, is_training): <NEW_LINE> <INDENT> assert len(xx) == 1 <NEW_LINE> x = xx[0] <NEW_LINE> return self.forward(x, is_training)
A single input, single output layer (the normal case).
62598f0ebe7bc26dc9251431
class Quote(SupportingObject): <NEW_LINE> <INDENT> quote = models.TextField() <NEW_LINE> location = models.TextField() <NEW_LINE> question = models.ForeignKey(Question, on_delete=models.CASCADE) <NEW_LINE> topic = models.ForeignKey(Topic, on_delete=models.CASCADE) <NEW_LINE> book = models.ForeignKey(Book, on_delete=mod...
Quotes.
62598f0e50812a4eaa6201bc
class Gollyhandler: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.name = "FeudalSim" <NEW_LINE> <DEDENT> def topopup(self, text): <NEW_LINE> <INDENT> g.note(text) <NEW_LINE> <DEDENT> def select_rectangle_for_borders(self, startx, starty, width, height): <NEW_LINE> <INDENT> g.select([startx, starty, w...
Handles all the Golly calls so that it wont have to be imported into the files that need it
62598f0e9f28863672817399
class Antenna(models.Model): <NEW_LINE> <INDENT> POLARIZATION_CHOICES = ( ('horizontal', _("Horizontal")), ('vertical', _("Vertical")), ('circular', _("Circular")), ('dual', _("Dual")), ) <NEW_LINE> name = models.CharField(max_length=100, verbose_name=_("Name")) <NEW_LINE> manufacturer = models.CharField(max_length=100...
Antenna descriptor.
62598f0eec188e330fdf7455
class Pinger(Greenlet): <NEW_LINE> <INDENT> def __init__(self, id): <NEW_LINE> <INDENT> super(Pinger,self).__init__() <NEW_LINE> self.event = Event() <NEW_LINE> self.conn = None <NEW_LINE> self.id = id <NEW_LINE> <DEDENT> def _run(self): <NEW_LINE> <INDENT> logger.debug("Pinger starting") <NEW_LINE> self.conn = connect...
Very simple test 'app'
62598f0e956e5f7376df4c4d