code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class PhpLanguageModel(language_model.LanguageModel): <NEW_LINE> <INDENT> _SCHEMA_TYPE_TO_PHP_TYPE = { 'any': 'object', 'boolean': 'bool', 'integer': 'int', 'long': 'string', 'number': 'double', 'string': 'string', 'uint32': 'string', 'uint64': 'string', 'int32': 'int', 'int64': 'string', 'double': 'double', 'float': '... | A LanguageModel tunded for PHP. | 625990658e7ae83300eea7c7 |
class INodes(object): <NEW_LINE> <INDENT> std_interval = np.array([0.0, 0.0]) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._num_nodes = None <NEW_LINE> self._nodes = None <NEW_LINE> self._interval = None <NEW_LINE> <DEDENT> def init(self, n_nodes, interval=None): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> ... | Provider for integration nodes.
This is an abstract interface for providers of integration nodes. | 62599065cc0a2c111447c66c |
class Serializer(six.with_metaclass(SerializerMeta, SerializerBase)): <NEW_LINE> <INDENT> default_getter = operator.attrgetter <NEW_LINE> def __init__(self, instance=None, many=False, **kwargs): <NEW_LINE> <INDENT> super(Serializer, self).__init__(**kwargs) <NEW_LINE> self.instance = instance <NEW_LINE> self.many = man... | The Serializer class is used as a base for custom serializers.
A Serializer class is also a subclass of Field class, which allows nesting
Serializers. A new serializer is defined by subclassing the `Serializer` class,
then adding each `Field` as a class variable.
Example: :
class FooSerializer(Serializer):
... | 625990657047854f46340aed |
@register_plugin <NEW_LINE> class I13StxmLoader(BaseLoader): <NEW_LINE> <INDENT> def __init__(self, name='I13StxmLoader'): <NEW_LINE> <INDENT> super(I13StxmLoader, self).__init__(name) <NEW_LINE> <DEDENT> def setup(self): <NEW_LINE> <INDENT> exp = self.exp <NEW_LINE> data_obj = exp.create_data_object('in_data', 'tomo')... | A class to load tomography data from the txm | 62599065a219f33f346c7f40 |
class APIRouter(base_wsgi.Router): <NEW_LINE> <INDENT> ExtensionManager = None <NEW_LINE> @classmethod <NEW_LINE> def factory(cls, global_config, **local_config): <NEW_LINE> <INDENT> return cls() <NEW_LINE> <DEDENT> def __init__(self, ext_mgr=None): <NEW_LINE> <INDENT> if ext_mgr is None: <NEW_LINE> <INDENT> if self.Ex... | Routes requests on the OpenStack API to the appropriate controller
and method. | 6259906545492302aabfdc15 |
class RawString(piSetting): <NEW_LINE> <INDENT> def _validate(self, value): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> def _convert_to_kodi_setting(self, value): <NEW_LINE> <INDENT> return str(value) <NEW_LINE> <DEDENT> def _convert_to_piconfig_setting(self, value): <NEW_LINE> <INDENT> return str(value) | Class to handle strings that pass directly from the config.txt to Kodi,
and back again. Such as codec serial numbers. | 62599065e76e3b2f99fda139 |
class Redis(redis.Redis): <NEW_LINE> <INDENT> def __init__(self, app): <NEW_LINE> <INDENT> app.config.setdefault('REDIS_HOST', 'localhost') <NEW_LINE> app.config.setdefault('REDIS_PORT', 6379) <NEW_LINE> app.config.setdefault('REDIS_DB', 0) <NEW_LINE> app.config.setdefault('REDIS_PASSWORD', None) <NEW_LINE> app.config.... | Redis Flask wrapper, inspired by: https://github.com/satori/flask-redis
Can also provide Flask configuration values using regular cache paradigm.
Use Redis.get_config() to retreive any flask configuration value.
This class will return the value stored in redis or if it is not (yet)
stored, retreive it from the Flask c... | 6259906591af0d3eaad3b562 |
class Console: <NEW_LINE> <INDENT> pass | Welcome to ttproto console.
- Use [tab] to complete
- Use help(object) to print help messages.
- Quit using ctrl+d | 625990653539df3088ecd9d8 |
class UserList(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'value': {'readonly': True}, 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[User]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LI... | Collection of users.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: The list of users.
:vartype value: list[~azure.mgmt.databoxedge.v2020_05_01_preview.models.User]
:ivar next_link: Link to the next set of results.
:vartype next_link: str | 62599065baa26c4b54d509de |
class TableSpikers(object): <NEW_LINE> <INDENT> def __init__(self, N, tau_out=5.0): <NEW_LINE> <INDENT> self.N = N <NEW_LINE> self.spike_table = None <NEW_LINE> self.tau_out = tau_out <NEW_LINE> <DEDENT> def prepare(self, tmax, dt): <NEW_LINE> <INDENT> self.out = np.zeros(self.N) <NEW_LINE> <DEDENT> def evolve(self, t,... | A layer of neurons that spike at times indicated by a boolean array.
Set `spike_table` (for example by overloading `prepare` method) to decide when
firing should happen.
Attributes
----------
spike_table: (n_steps, n_neurons) matrix
Boolean matrix identifying the steps when each neuron fires. | 625990653617ad0b5ee0788a |
class IndexedWordForms(object): <NEW_LINE> <INDENT> def __init__(self, semcor, wfs): <NEW_LINE> <INDENT> self.semcor = semcor <NEW_LINE> self.wfs = wfs <NEW_LINE> self.lemma_idx = create_lemma_index(wfs) <NEW_LINE> self.lemma_fname_idx = {} <NEW_LINE> for lemma, wfs in self.lemma_idx.items(): <NEW_LINE> <INDENT> self.l... | Class that provides an interface to a set of WordForms. This is in
addition to the lemma_idx on Semcor, which is a simple index from lemmas to
WordForm lists, which contains all WordForms in the corpus. This class is
intended to store the results of specific searches and has more than one way
to access the data.
Attri... | 6259906599cbb53fe683261e |
class ViewInspector(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.instance_schemas = WeakKeyDictionary() <NEW_LINE> <DEDENT> def __get__(self, instance, owner): <NEW_LINE> <INDENT> if instance in self.instance_schemas: <NEW_LINE> <INDENT> return self.instance_schemas[instance] <NEW_LINE> <DE... | Descriptor class on APIView.
Provide subclass for per-view schema generation | 625990652ae34c7f260ac821 |
class BootResource(Object, metaclass=BootResourceType): <NEW_LINE> <INDENT> id = ObjectField.Checked( "id", check(int), readonly=True) <NEW_LINE> type = ObjectField.Checked( "type", check(str), check(str), readonly=True) <NEW_LINE> name = ObjectField.Checked( "name", check(str), check(str), readonly=True) <NEW_LINE> ar... | A boot resource. | 62599065009cb60464d02c72 |
class Dimensions(messages.Message): <NEW_LINE> <INDENT> os_family = messages.EnumField(OSFamily, 1) <NEW_LINE> backend = messages.EnumField(Backend, 2) <NEW_LINE> hostname = messages.StringField(3) <NEW_LINE> num_cpus = messages.IntegerField(4) <NEW_LINE> memory_gb = messages.FloatField(5) <NEW_LINE> disk_gb = messages... | Represents the dimensions of a machine. | 6259906545492302aabfdc16 |
class ThreadScan(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, queue): <NEW_LINE> <INDENT> threading.Thread.__init__(self) <NEW_LINE> self.queue = queue <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> while True: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> site = self.queue.... | thread untuk admin page | 62599065379a373c97d9a758 |
class ResourceGroup(Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'location': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'ResourceGroupProperties'}, 'location': {'key'... | Resource group information.
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 id: The ID of the resource group.
:vartype id: str
:param name: The name of the resource group.
:type name: str
:param propert... | 625990655166f23b2e244b0b |
class GeneralTeamPackageTable(BasePackageTable): <NEW_LINE> <INDENT> default_title = "All team packages" <NEW_LINE> slug = 'general' <NEW_LINE> @property <NEW_LINE> def packages(self): <NEW_LINE> <INDENT> if self.tag: <NEW_LINE> <INDENT> return self.scope.packages.filter( data__key=self.tag).order_by('name') <NEW_LINE>... | This table displays the packages information of a team in a simple fashion.
It must receive a :class:`Team <distro_tracker.core.models.Team>` as scope | 625990658e71fb1e983bd200 |
class OrderSTATUS(Enum): <NEW_LINE> <INDENT> ORDER_STATE_PENDING = 0 <NEW_LINE> ORDER_STATE_CLOSED = 1 <NEW_LINE> ORDER_STATE_CANCELED = 2 <NEW_LINE> ORDER_STATE_UNKNOWN = 3 <NEW_LINE> ORDER_STATE_PARTIALLY_FILLED = 4 | Direction of order/trade/position. | 6259906597e22403b383c647 |
class RequestMethod: <NEW_LINE> <INDENT> GET = 'get' <NEW_LINE> POST = 'post' <NEW_LINE> PATCH = 'patch' <NEW_LINE> PUT = 'put' <NEW_LINE> DELETE = 'delete' | class to hold request methods | 625990651f037a2d8b9e5408 |
class Neighbour(object): <NEW_LINE> <INDENT> def __init__(self, types=None): <NEW_LINE> <INDENT> self.types = types <NEW_LINE> <DEDENT> def build_list(self, x, t): <NEW_LINE> <INDENT> if self.types == None: <NEW_LINE> <INDENT> i = range(len(t)) <NEW_LINE> return np.array(list(it.combinations(i, 2)), dtype=np.int64) <NE... | Base Neighbour class. | 62599065009cb60464d02c73 |
class MockSensor(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(MockSensor, self).__init__() <NEW_LINE> <DEDENT> def begin(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def readTempC(self): <NEW_LINE> <INDENT> return 25. | docstring for MockSensor | 62599065a219f33f346c7f42 |
class Alert(AbstractAction): <NEW_LINE> <INDENT> def __init__(self, text): <NEW_LINE> <INDENT> self.text = text <NEW_LINE> <DEDENT> def __call__(self, world, entity): <NEW_LINE> <INDENT> world.infobox.write(self.text) | On call, writes text to the infobox. | 6259906599fddb7c1ca6396c |
class AxesHandler(AbstractAxesHandler, AxesBaseHandler): <NEW_LINE> <INDENT> def user_login_failed(self, sender, credentials: dict, request=None, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def user_logged_in(self, sender, request, user, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def user_logge... | Signal bare handler implementation without any storage backend. | 62599065e76e3b2f99fda13b |
class WindowsFactoryBase: <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> def __init__(self, func, *args): <NEW_LINE> <INDENT> self._func = func <NEW_LINE> self._args = args <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def _java_cls(self, sc): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def _jwindow(self, sc)... | WindowFactory represents an intended window that will be
instantiated later when we have access to a SparkContext.
Typical usage is that a user constructs one of these (using the
functions in this module), then passes it to one of the
window-related methods of :class:`TimeSeriesDataFrame`, where we
have a SparkContext... | 625990653cc13d1c6d466e7f |
class TellCoreServer(object): <NEW_LINE> <INDENT> def __init__(self, port_client, port_events): <NEW_LINE> <INDENT> self.proc = None <NEW_LINE> self.port_client = port_client <NEW_LINE> self.port_events = port_events <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDENT> self.proc = [] <NEW_LINE> for telldus, port in... | Server for tellcore. | 62599065d6c5a102081e3861 |
class Square: <NEW_LINE> <INDENT> def __init__(self, __size=0): <NEW_LINE> <INDENT> if not isinstance(__size, int): <NEW_LINE> <INDENT> raise TypeError('size must be an integer') <NEW_LINE> <DEDENT> elif __size < 0: <NEW_LINE> <INDENT> raise ValueError('size must be >= 0') <NEW_LINE> <DEDENT> self.__size = __size <NEW_... | Class docstring
__init__: This class defines a square by: (based on 2-square.py).
Args:
size (int): size of square
Attributes:
size: (int): size of square | 625990654a966d76dd5f0631 |
@register(PathResourceID.CLIPBOARD) <NEW_LINE> @attr.s(slots=True) <NEW_LINE> class ClipboardRecord(BaseElement): <NEW_LINE> <INDENT> top = attr.ib(default=0, type=int) <NEW_LINE> left = attr.ib(default=0, type=int) <NEW_LINE> bottom = attr.ib(default=0, type=int) <NEW_LINE> right = attr.ib(default=0, type=int) <NEW_LI... | Clipboard record.
..py:attribute: top
..py:attribute: left
..py:attribute: bottom
..py:attribute: right
..py:attribute: resolution | 62599065dd821e528d6da51f |
class PyKerasApplications(PythonPackage): <NEW_LINE> <INDENT> homepage = "http://keras.io" <NEW_LINE> url = "https://github.com/keras-team/keras-applications/archive/1.0.4.tar.gz" <NEW_LINE> version('1.0.7', sha256='8580a885c8abe4bf8429cb0e551f23e79b14eda73d99138cfa1d355968dd4b0a') <NEW_LINE> version('1.0.6', sha2... | Sample Deep Learning application in Keras.
Keras depends on this package to run properly. | 62599065498bea3a75a5919e |
class DataQueue(object): <NEW_LINE> <INDENT> queue_ttl = 86400 <NEW_LINE> queue_max_age = 3600 <NEW_LINE> def __init__(self, key, redis_client, batch=0, compress=False, json=True): <NEW_LINE> <INDENT> self.key = key <NEW_LINE> self.redis_client = redis_client <NEW_LINE> self.batch = batch <NEW_LINE> self.compress = com... | A Redis based queue which stores binary or JSON encoded items
in lists. The queue uses a single static queue key.
The lists maintain a TTL value corresponding to the time data has
been last put into the queue. | 62599065d7e4931a7ef3d723 |
class GraphAlgoInterface: <NEW_LINE> <INDENT> def get_graph(self) -> GraphInterface: <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def load_from_json(self, file_name: str) -> bool: <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def save_to_json(self, file_name: str) -> bool: <NEW_... | This abstract class represents an interface of a graph. | 62599065baa26c4b54d509e0 |
class Callback(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def set(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get(self): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> def notify_unary_operations(self, obj): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT>... | callback before the operations | 62599065be8e80087fbc07c4 |
class LinkedQueue: <NEW_LINE> <INDENT> class _Node: <NEW_LINE> <INDENT> __slots__ = '_item', '_next' <NEW_LINE> def __init__(self, item, next=None): <NEW_LINE> <INDENT> self._item = item <NEW_LINE> self._next = next <NEW_LINE> <DEDENT> <DEDENT> def __init__(self): <NEW_LINE> <INDENT> self._head = None <NEW_LINE> self._... | Singly Linked List Queue implementation. | 62599065435de62698e9d545 |
class OrganizationProfile(UserProfile): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> app_label = 'api' <NEW_LINE> <DEDENT> is_organization = models.BooleanField(default=True) <NEW_LINE> creator = models.ForeignKey(User) <NEW_LINE> def save(self, *args, **kwargs): <NEW_LINE> <INDENT> super(OrganizationProfile, se... | Organization: Extends the user profile for organization specific info
* What does this do?
- it has a createor
- it has owner(s), through permissions/group
- has members, through permissions/group
- no login access, no password? no registration like a normal user?
- created by a user who becomes th... | 62599065a8ecb03325872954 |
class BucketlistSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> items = BucketlistItemSerializer(many=True, read_only=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Bucketlist <NEW_LINE> fields = ('id', 'name', 'items', 'date_created', 'date_modified', 'created_by', 'user') | Bucketlist Model serializer class. | 625990657d43ff2487427fae |
class RateLimit: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.limit: int = 0 <NEW_LINE> self.remaining: int = 0 <NEW_LINE> self.reset: int = 0 <NEW_LINE> self.reset_time: float = time.time() <NEW_LINE> <DEDENT> def wait_for_next_request(self): <NEW_LINE> <INDENT> if not self.reset_time: <NEW_LINE> <... | meetup api rate limit, wait for new request if needed
Raises:
HttpNoXRateLimitHeader: Raise when HTTP response has no XRateLimitHeader | 6259906599cbb53fe6832620 |
class VoteCountAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ['votes', 'choice', 'contest_batch'] | Modify default layout of admin form | 625990652ae34c7f260ac824 |
class StdLogListener (LogListener): <NEW_LINE> <INDENT> def __init__ (self, level = LOG_INFO, info_out = sys.stdout, error_out = sys.stderr, *a, **k): <NEW_LINE> <INDENT> super (StdLogListener, self).__init__ (*a, **k) <NEW_LINE> self.level = level <NEW_LINE> self.info_output = info_out <NEW_LINE> self.error_output = e... | This is a log listener that outputs all the messages to the given
files. It can filter the messages below a given log level. | 625990655166f23b2e244b0d |
class ExceptionThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> threading.Thread.__init__(self, *args, **kwargs) <NEW_LINE> self._eq = Queue.Queue() <NEW_LINE> <DEDENT> def run(self, *args, **kwargs): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> threading.Thread.run... | Wrapper around a python :class:`Thread` which will raise an
exception on join if the child threw an unhandled exception. | 625990655fdd1c0f98e5f6c0 |
class Usage(Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'unit': {'required': True, 'constant': True}, 'current_value': {'required': True}, 'limit': {'required': True}, 'name': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'unit': {'key': 'unit', 'type'... | Describes network resource usage.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource identifier.
:vartype id: str
:ivar unit: An enum describing the unit of measurement. Default value:
"Count" .
:vartype unit: str
:param current_value: The current value of the ... | 62599065aad79263cf42ff00 |
class MessageSchema(ma.Schema): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> fields = ('mid','bid','uid','message','created') | Some info | 625990657d847024c075db13 |
class Shell(object): <NEW_LINE> <INDENT> def __init__(self, *iargs, **ikwargs): <NEW_LINE> <INDENT> self.initargs = iargs <NEW_LINE> self.initkwargs = ikwargs <NEW_LINE> <DEDENT> def callme(self, *args, **kwargs): <NEW_LINE> <INDENT> print("args:", args) <NEW_LINE> print("kwargs:", kwargs) | A simple class for testing object wrappers. | 625990651f037a2d8b9e5409 |
class MockFactory(LocalPiFactory): <NEW_LINE> <INDENT> def __init__( self, revision=os.getenv('GPIOZERO_MOCK_REVISION', 'a02082'), pin_class=os.getenv('GPIOZERO_MOCK_PIN_CLASS', MockPin)): <NEW_LINE> <INDENT> super(MockFactory, self).__init__() <NEW_LINE> self._revision = revision <NEW_LINE> if not issubclass(pin_class... | Factory for generating mock pins. The *revision* parameter specifies what
revision of Pi the mock factory pretends to be (this affects the result of
the :attr:`pi_info` attribute as well as where pull-ups are assumed to be).
The *pin_class* attribute specifies which mock pin class will be generated
by the :meth:`pin` m... | 62599065009cb60464d02c75 |
class Error(Exception): <NEW_LINE> <INDENT> def __init__(self, msg=''): <NEW_LINE> <INDENT> self.message = msg <NEW_LINE> Exception.__init__(self, msg) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return self.message <NEW_LINE> <DEDENT> __str__ = __repr__ | Base class for custom exceptions. | 6259906563d6d428bbee3e27 |
class QuestionsPage(MethodView): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> return redirect(url_for('ui.home'), 303) | Encapsulates the views for the questions page | 625990650a50d4780f70695e |
class EmitterMixin(object): <NEW_LINE> <INDENT> __metaclass__ = EmitterMeta <NEW_LINE> Meta = Meta <NEW_LINE> def emit(self, content, request=None, emitter=None): <NEW_LINE> <INDENT> emitter = emitter or self.determine_emitter(request) <NEW_LINE> emitter = emitter(self, request=request, response=content) <NEW_LINE> res... | Serialize response.
.. autoclass:: adrest.mixin.emitter.Meta
:members:
Example: ::
class SomeResource():
class Meta:
emit_fields = ['pk', 'user', 'customfield']
emit_related = {
'user': {
fields: ['username']
}
}
... | 62599065a219f33f346c7f44 |
class TextSequenceGenerator(keras.utils.Sequence): <NEW_LINE> <INDENT> def __init__(self, mode="train", batch_size=16, img_size=(224, 224), no_channels=3, shuffle=True): <NEW_LINE> <INDENT> self.imgs, self.labels = [], [] <NEW_LINE> if mode == "train": <NEW_LINE> <INDENT> base_train = 'path-to-train-folder/train' <NEW_... | Generates data for Keras | 625990652c8b7c6e89bd4f2c |
class Zwierz: <NEW_LINE> <INDENT> def __init__(self, gatunek, wiek): <NEW_LINE> <INDENT> self.gatunek = gatunek <NEW_LINE> self.wiek = wiek <NEW_LINE> <DEDENT> def podaj_gatunek(self): <NEW_LINE> <INDENT> print('lis') | pierwsza klasa | 62599065462c4b4f79dbd144 |
class Like(TimeStampModel): <NEW_LINE> <INDENT> creator = models.ForeignKey(user_model.User, on_delete=models.PROTECT, null=True) <NEW_LINE> image = models.ForeignKey(Image, on_delete=models.PROTECT, null=True, related_name='likes') <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "User: {} - Image Caption: {}"... | Like Model | 62599065435de62698e9d546 |
class User(AbstractUser, BaseModel): <NEW_LINE> <INDENT> phone = models.CharField(max_length=20, verbose_name='手机号码') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> db_table = 'mak_user' <NEW_LINE> verbose_name = '用户' <NEW_LINE> verbose_name_plural = verbose_name | 用户模型类 | 625990654a966d76dd5f0633 |
class GloAvgConv(nn.Module): <NEW_LINE> <INDENT> def __init__( self, C_in, C_out, init=nn.init.kaiming_normal, bias = True, activation = nn.ReLU(inplace=True) ): <NEW_LINE> <INDENT> super(GloAvgConv, self).__init__() <NEW_LINE> self.conv_avg = nn.Conv2d(in_channels = C_in, out_channels = C_out, kernel_size = (1, 1), st... | Input shape: (B, C_in, 1, nsample)
Output shape: (B, C_out, npoint) | 625990654e4d562566373b45 |
class BruteForce(SolvingAlgorithm): <NEW_LINE> <INDENT> def __init__(self, pattern_size, colors, attempts): <NEW_LINE> <INDENT> super().__init__(pattern_size, colors, attempts) <NEW_LINE> self.guessed = [] <NEW_LINE> <DEDENT> def guess_pattern(self): <NEW_LINE> <INDENT> if len(self.guessed) == 0: <NEW_LINE> <INDENT> se... | Class represents Brute Force solving algorithm. | 62599065460517430c432bf3 |
class ExtruderModel(Model): <NEW_LINE> <INDENT> Type = 'OSEExtruder' <NEW_LINE> def __init__(self, obj, placement=Placement(), origin_translation_offset=Vector()): <NEW_LINE> <INDENT> super(ExtruderModel, self).__init__(obj) <NEW_LINE> self.placement = placement <NEW_LINE> self.origin_translation_offset = origin_transl... | Encapsulates the data (i.e. topography and shape) for a Extruder,
and is separate from the "view" or GUI representation.
Based on:
https://wiki.opensourceecology.org/wiki/File:Simpleextruderassy.fcstd
See:
https://wiki.opensourceecology.org/wiki/File:Finalextruder.png | 62599065a8370b77170f1b0c |
class LinkedList(object): <NEW_LINE> <INDENT> def __init__(self, head=None, tail=None): <NEW_LINE> <INDENT> self.head = head <NEW_LINE> self.tail = tail <NEW_LINE> <DEDENT> def insert(self, data): <NEW_LINE> <INDENT> new_token = Token(data) <NEW_LINE> if self.head is None: <NEW_LINE> <INDENT> self.head = new_token <NEW... | Simple linkedlist implementation for storing tokens from the sentence.
It assumes that the list is always populated
from the beginning of the sentence. | 62599065be8e80087fbc07c6 |
class NormalDistribution(Distribution): <NEW_LINE> <INDENT> def __init__(self, mean, precision): <NEW_LINE> <INDENT> super(NormalDistribution, self).__init__(['mean', 'precision']) <NEW_LINE> self._mean = as_tensor(mean) <NEW_LINE> self._precision = as_tensor(precision) <NEW_LINE> <DEDENT> def _statistic(self, statisti... | Univariate normal distribution.
Parameters
----------
mean : tf.Tensor
mean of the normal distribution
precision : tf.Tensor
precision of the normal distribution | 625990653d592f4c4edbc61b |
class File(content.Content): <NEW_LINE> <INDENT> icon("file.png") <NEW_LINE> content.name(_(u"File")) <NEW_LINE> content.schema(IFile) <NEW_LINE> content.require(security.CanAddContent) <NEW_LINE> data = BlobProperty(IFile['data']) | A file content type storing the data in blobs.
| 625990658e71fb1e983bd204 |
class QuoraQDA(QuoraClassifier): <NEW_LINE> <INDENT> def __init__(self, features, targets): <NEW_LINE> <INDENT> classifier = QDA(reg_param=0.5) <NEW_LINE> QuoraClassifier.__init__(self, classifier, features, targets) | Classifier implementation encapsulating scikit-learn
Quadratic Discriminant classifier. | 625990658e7ae83300eea7cc |
class AirPressure(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'air_pressure' <NEW_LINE> id = db.Column(db.INTEGER, primary_key=True) <NEW_LINE> created_datetime = db.Column(db.DATETIME, nullable=False) <NEW_LINE> value = db.Column(db.FLOAT, nullable=False) <NEW_LINE> def __init__(self, value): <NEW_LINE> <INDENT> se... | 気圧を表すクラス | 6259906532920d7e50bc7785 |
class GenericSignedAttestation(_messages.Message): <NEW_LINE> <INDENT> class ContentTypeValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> CONTENT_TYPE_UNSPECIFIED = 0 <NEW_LINE> SIMPLE_SIGNING_JSON = 1 <NEW_LINE> <DEDENT> contentType = _messages.EnumField('ContentTypeValueValuesEnum', 1) <NEW_LINE> serializedPayload... | An attestation wrapper that uses the Grafeas `Signature` message. This
attestation must define the `plaintext` that the `signatures` verify and any
metadata necessary to interpret that plaintext. The signatures should
always be over the `plaintext` bytestring.
Enums:
ContentTypeValueValuesEnum: Type (for example sc... | 6259906501c39578d7f142d4 |
class Gmetric(object): <NEW_LINE> <INDENT> def __init__(self, metric_type, name, units, maximum, mcast=None, debug=0): <NEW_LINE> <INDENT> self.bin = "/usr/bin/gmetric" <NEW_LINE> self.metric_type = metric_type <NEW_LINE> self.name = name <NEW_LINE> self.units = units <NEW_LINE> self.maximum = maximum <NEW_LINE> self.m... | Send metrics to gmond. | 625990652c8b7c6e89bd4f2e |
class CurrentPhases(PhaseStatus): <NEW_LINE> <INDENT> def __getitem__(self, nominal_phase: SinglePhaseKind) -> SinglePhaseKind: <NEW_LINE> <INDENT> return self.terminal.traced_phases.current(nominal_phase) <NEW_LINE> <DEDENT> def __setitem__(self, nominal_phase: SinglePhaseKind, traced_phase: SinglePhaseKind) -> bool: ... | The traced phases in the current state of the network. | 62599065462c4b4f79dbd146 |
class Filter(AxObj): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.field = '' <NEW_LINE> self.op = 'EQ' <NEW_LINE> self.value = '' <NEW_LINE> self._init_kwargs(kwargs, [ 'field', 'op', 'value', ]) <NEW_LINE> <DEDENT> def validate(self): <NEW_LINE> <INDENT> if not self.field: <NE... | Field filter representation. | 62599065097d151d1a2c27ab |
class Eleve: <NEW_LINE> <INDENT> def __init__(self, id_el, nom): <NEW_LINE> <INDENT> self.id_eleve = id_el <NEW_LINE> self.nom_eleve = nom | classdocs | 62599065d6c5a102081e3865 |
class PostgreSQLServer(SQLServer): <NEW_LINE> <INDENT> def __init__(self, model_meta, migration_root, host, port, user, database, password=None, interactive=False, run_env=None): <NEW_LINE> <INDENT> super(PostgreSQLServer, self).__init__(model_meta, migration_root) <NEW_LINE> self.host = host <NEW_LINE> self.port = por... | Handler for PostgreSQL. | 62599065498bea3a75a591a0 |
class WindowsRegistryListEvent(time_events.FiletimeEvent): <NEW_LINE> <INDENT> DATA_TYPE = 'windows:registry:list' <NEW_LINE> def __init__( self, filetime, key_path, list_name, list_values, timestamp_description=None, value_name=None): <NEW_LINE> <INDENT> if timestamp_description is None: <NEW_LINE> <INDENT> timestamp_... | Convenience class for a list retrieved from the Registry e.g. MRU.
Attributes:
key_path: string containing the Windows Registry key path.
list_name: string containing the name of the list.
list_values: string containing the list values.
value_name: string containing the Windows Registry value name. | 6259906538b623060ffaa3f1 |
class MockClearDirTest(ClearDirTest): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super().__init__(*args, **kwargs) <NEW_LINE> self.manifest_file = self.temp_dir.joinpath('removed_files') <NEW_LINE> <DEDENT> def test_clear_dir(self): <NEW_LINE> <INDENT> def track_file(path): <NEW_LINE> ... | Mock out os.remove in clear_dir. | 6259906599cbb53fe6832623 |
class RouterStatusEntryV3(RouterStatusEntry): <NEW_LINE> <INDENT> TYPE_ANNOTATION_NAME = 'network-status-consensus-3' <NEW_LINE> ATTRIBUTES = dict(RouterStatusEntry.ATTRIBUTES, **{ 'digest': (None, _parse_r_line), 'or_addresses': ([], _parse_a_line), 'identifier_type': (None, _parse_id_line), 'identifier': (None, _pars... | Information about an individual router stored within a version 3 network
status document.
:var list or_addresses: **\*** relay's OR addresses, this is a tuple listing
of the form (address (**str**), port (**int**), is_ipv6 (**bool**))
:var str identifier_type: identity digest key type
:var str identifier: base64 enc... | 62599065adb09d7d5dc0bcaa |
class ApiGenericMixin(object): <NEW_LINE> <INDENT> def finalize_response(self, request, response, *args, **kwargs): <NEW_LINE> <INDENT> if not isinstance(response, Response): <NEW_LINE> <INDENT> return response <NEW_LINE> <DEDENT> response_data = {"result": True, "code": "OK", "message": "success", "data": []} <NEW_LIN... | API视图类通用函数 | 625990652ae34c7f260ac828 |
class TZscoreLinear(ScoreTransformModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__('tzl') <NEW_LINE> self.rscore_max = 150 <NEW_LINE> self.rscore_min = 0 <NEW_LINE> self.tscore_mean = 50 <NEW_LINE> self.tscore_std = 10 <NEW_LINE> self.tscore_stdnum = 4 <NEW_LINE> <DEDENT> def set_dat... | Get Zscore by linear formula: (x-mean)/std | 6259906591f36d47f2231a2f |
class ListColumnRepresentation(ColumnRepresentation): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(ListColumnRepresentation, self).__init__() <NEW_LINE> <DEDENT> def as_feature_spec(self, logical_column): <NEW_LINE> <INDENT> return tf.VarLenFeature(logical_column.domain.dtype) <NEW_LINE> <DEDENT> d... | Represent the column using a variable size. | 62599065a17c0f6771d5d746 |
class VivisectRemoteTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_basic(self): <NEW_LINE> <INDENT> testfile = helpers.getTestPath('windows', 'amd64', 'firefox.exe') <NEW_LINE> good = vivisect.VivWorkspace() <NEW_LINE> good.loadFromFile(testfile) <NEW_LINE> host = 'localhost' <NEW_LINE> port = 0x4097 <NEW_LINE>... | So...what would be fun is basically a chain of remote workspaces all tied in interesting
configurations. | 625990655fdd1c0f98e5f6c4 |
class FileBackupTask(BackupTask): <NEW_LINE> <INDENT> checker_fqdn = models.CharField(max_length=255, choices=settings.FILE_BACKUP_CHECKERS, verbose_name=_(u"Checker fqdn"), help_text=_(u"Machine fqdn where this backups shoud be checked.")) <NEW_LINE> directory = models.CharField(max_length=255, help_text=_(u'Directory... | File backup task | 62599065f548e778e596ccca |
class Constant(CExpression): <NEW_LINE> <INDENT> def __init__(self, s): <NEW_LINE> <INDENT> self.s = str(s) <NEW_LINE> <DEDENT> def add_includes(self, program): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def to_c_string(self, root=False): <NEW_LINE> <INDENT> return self.s | A predefined C constant | 62599065aad79263cf42ff04 |
class FeedConfigException(StreamApiException): <NEW_LINE> <INDENT> status_code = 400 <NEW_LINE> code = 6 | Raised when there are missing or misconfigured custom fields | 6259906532920d7e50bc7787 |
class TenCrops(object): <NEW_LINE> <INDENT> def __init__(self, size, mean=[0.0, 0.0, 0.0], std=[1.0, 1.0, 1.0], interpolation=Image.BILINEAR): <NEW_LINE> <INDENT> self.size = size <NEW_LINE> self.interpolation = interpolation <NEW_LINE> self.mean = mean <NEW_LINE> self.std = std <NEW_LINE> self.fiveCrops = FiveCrops(se... | Generates four corner and center crops and their horizontally flipped versions
| 6259906556ac1b37e6303885 |
class School(NonEssentialBusinessBaseLocation[SchoolState]): <NEW_LINE> <INDENT> state_type = SchoolState | Implements a simple school | 625990650a50d4780f706960 |
class Subject(): <NEW_LINE> <INDENT> def add_observer(self, obs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def remove_observer(self, obs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def update_observers(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def get_state(self): <NEW_LINE> <INDENT> pass | Subject interface | 62599065b7558d5895464acf |
class Time: <NEW_LINE> <INDENT> pass | 表示一天的时间,属性hour、minute、second | 625990654428ac0f6e659c73 |
class ConsulMapParser(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.log = logging.getLogger(self.__class__.__name__) <NEW_LINE> <DEDENT> def GetMap(self, cache_info, data): <NEW_LINE> <INDENT> entries = collections.defaultdict(dict) <NEW_LINE> for line in json.loads(cache_info.read()): <NEW_... | A base class for parsing nss_files module cache. | 62599065097d151d1a2c27ad |
class Relationship: <NEW_LINE> <INDENT> def __init__(self, id, subject, predicate, object, synset): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.subject = subject <NEW_LINE> self.predicate = predicate <NEW_LINE> self.object = object <NEW_LINE> self.synset = synset <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <... | Relationships. Ex, 'man - jumping over - fire hydrant'.
subject int
predicate string
object int
rel_canon Synset | 62599065fff4ab517ebcef5d |
class TaskMetrics(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.SubmittedCount = None <NEW_LINE> self.PendingCount = None <NEW_LINE> self.RunnableCount = None <NEW_LINE> self.StartingCount = None <NEW_LINE> self.RunningCount = None <NEW_LINE> self.SucceedCount = None <NEW_LINE> self.F... | Task statistical metrics
| 62599065e76e3b2f99fda141 |
class AccountAgedTrialBalance(orm.TransientModel): <NEW_LINE> <INDENT> _inherit = "open.invoices.webkit" <NEW_LINE> _name = "account.aged.trial.balance.webkit" <NEW_LINE> _description = "Aged partner balanced" <NEW_LINE> def _get_current_fiscalyear(self, cr, uid, context=None): <NEW_LINE> <INDENT> user_obj = self.pool[... | Will launch age partner balance report.
This report is based on Open Invoice Report
and share a lot of knowledge with him | 625990657c178a314d78e78d |
class LinkEnableCfg(A10BaseClass): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.ERROR_MSG = "" <NEW_LINE> self.b_key = "link-enable-cfg" <NEW_LINE> self.DeviceProxy = "" <NEW_LINE> self.ena_sequence = "" <NEW_LINE> self.enaeth = "" <NEW_LINE> for keys, value in kwargs.items(): <NEW_LINE> <... | This class does not support CRUD Operations please use parent.
:param ena_sequence: {"description": "Sequence number (Specify the physical port number)", "minimum": 1, "type": "number", "maximum": 16, "format": "number"}
:param enaeth: {"type": "number", "description": "Specify the physical port number (Ethernet inter... | 625990653539df3088ecd9df |
class CollectionUsage(object): <NEW_LINE> <INDENT> def __init__(self, available=None, maximum_allowed=None): <NEW_LINE> <INDENT> self.available = available <NEW_LINE> self.maximum_allowed = maximum_allowed <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _from_dict(cls, _dict): <NEW_LINE> <INDENT> args = {} <NEW_LINE> i... | Summary of the collection usage in the environment.
:attr int available: (optional) Number of active collections in the environment.
:attr int maximum_allowed: (optional) Total number of collections allowed in the environment. | 625990654a966d76dd5f0637 |
class IServiceRequest(Interface): <NEW_LINE> <INDENT> pass | Marker interface for the ServiceRequest | 62599065796e427e5384feb8 |
class CoordinationNumberAttributeGenerator: <NEW_LINE> <INDENT> def generate_features(self, entries): <NEW_LINE> <INDENT> feat_values = [] <NEW_LINE> feat_headers = [] <NEW_LINE> if not isinstance(entries, list): <NEW_LINE> <INDENT> raise ValueError("Argument should be of type list of " "CrystalStructureEntry's") <NEW_... | Class to compute attributes based on the coordination number. Uses the
Voronoi tessellation to define the coordination network.
DEV NOTE (LW 15Jul15): Could benefit from adding a face size cutoff, where
atoms are only defined as coordinated if the face between them is larger
than a certain fraction of the surface area... | 625990653539df3088ecd9e0 |
class AverageMeter(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.reset() <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.val = 0 <NEW_LINE> self.avg = 0 <NEW_LINE> self.sum = 0 <NEW_LINE> self.count = 0 <NEW_LINE> <DEDENT> def update(self, val, n=1): <NEW_LINE> <INDENT> self.va... | Computes and stores the average and current value | 62599065be8e80087fbc07ca |
class ServiceCatalog(object): <NEW_LINE> <INDENT> def __init__(self, resource_dict, region_name=None): <NEW_LINE> <INDENT> self.catalog = resource_dict <NEW_LINE> self.region_name = region_name <NEW_LINE> <DEDENT> def get_token(self): <NEW_LINE> <INDENT> token = {'id': self.catalog['token']['id'], 'expires': self.catal... | Helper methods for dealing with a Keystone Service Catalog. | 62599065a8ecb0332587295a |
class TestPluginCiscoNXOSEnrichmentN3KModels(TestPluginCiscoNXOSEnrichment, unittest.TestCase): <NEW_LINE> <INDENT> resource_id = 'n3k_3048T' <NEW_LINE> snmp_community = 'n3k_3048T' <NEW_LINE> results_data_file = 'n3k_3048T.results.json' <NEW_LINE> resource_model = '3048T' | Test plugin's handling of N3K Model NXOS devices. | 62599065d486a94d0ba2d70b |
class LazyGroup(click.Group): <NEW_LINE> <INDENT> def __init__(self, import_name, **kwargs): <NEW_LINE> <INDENT> self._import_name = import_name <NEW_LINE> super().__init__(**kwargs) <NEW_LINE> <DEDENT> @cached_property <NEW_LINE> def _impl(self): <NEW_LINE> <INDENT> module, name = self._import_name.split(':', 1) <NEW_... | A click Group that imports the actual implementation only when
needed. This allows for more resilient CLIs where the top-level
command does not fail when a subcommand is broken enough to fail
at import time. | 62599065adb09d7d5dc0bcac |
class GetCodeList: <NEW_LINE> <INDENT> def __init__(self, verbose=False): <NEW_LINE> <INDENT> self.verbose = verbose <NEW_LINE> self.url = TOSHO_1ST_LIST_URL <NEW_LINE> <DEDENT> def get_response(self): <NEW_LINE> <INDENT> print("url: ", self.url) <NEW_LINE> with urllib.request.urlopen(self.url) as response: <NEW_LINE> ... | GetCodeList class
銘柄リストを取得する | 62599065fff4ab517ebcef5e |
class GuardianSpider(scrapy.Spider): <NEW_LINE> <INDENT> name = "guardian" <NEW_LINE> start_urls = ["https://www.theguardian.com/au"] <NEW_LINE> def __init__(self, num_of_days=2, *args, **kwargs): <NEW_LINE> <INDENT> super(GuardianSpider, self).__init__(*args, **kwargs) <NEW_LINE> self.num_of_days = self.crawl_day_coun... | Spider to fetch values from guardian HTML | 625990657d847024c075db19 |
class TestReplace(TestSMIME): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.test_cert_id = 1234 <NEW_LINE> self.api_version = "v2" <NEW_LINE> self.api_url = f"{self.cfixt.base_url}{self.ep_path}/{self.api_version}" <NEW_LINE> self.test_url = f"{self.api_url}/replace/order/{sel... | Test the replace method. | 625990658e7ae83300eea7d0 |
class SearchKeyword(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Key = None <NEW_LINE> self.Value = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.Key = params.get("Key") <NEW_LINE> self.Value = params.get("Value") <NEW_LINE> memeber_set = set(param... | 搜索关键词
| 625990653eb6a72ae038bda2 |
class DeleteMixin(object): <NEW_LINE> <INDENT> def delete(self): <NEW_LINE> <INDENT> db.session.delete(self) <NEW_LINE> db.session.flush() <NEW_LINE> return self | Provides a 'delete' method deleting an object from the DB. | 625990654428ac0f6e659c75 |
class Phoneme: <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self.created = True <NEW_LINE> return self <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_json(cls, json): <NEW_LINE> <INDENT> return cls(json) | A class defining a phoneme object, including several functions for
constructing them and extracting information | 62599065462c4b4f79dbd14a |
class ExternalUrlsPinger(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, entry, timeout=10, start_now=True): <NEW_LINE> <INDENT> self.results = [] <NEW_LINE> self.entry = entry <NEW_LINE> self.timeout = timeout <NEW_LINE> self.entry_url = '%s%s' % (site, self.entry.get_absolute_url()) <NEW_LINE> threading.Thr... | Threaded ExternalUrls Pinger | 6259906567a9b606de547644 |
class UnorderedList: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.head = None <NEW_LINE> <DEDENT> def isEmpty(self): <NEW_LINE> <INDENT> return self.head == None <NEW_LINE> <DEDENT> def add(self, item): <NEW_LINE> <INDENT> temp = Node(item) <NEW_LINE> temp.setNext(self.head) <NEW_LINE> self.head = t... | here we will begin creating the unordered list from a collection of nodes that we set above.
As long as we know where to find the first node, each item can be found successfully by folliwing
the links hence the unordered list must contain a rederence to the first node. | 625990653cc13d1c6d466e87 |
class BaseModel(object): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True, autoincrement=True) <NEW_LINE> create_time = db.Column(db.String(64), index=True, default=int(time.time() * 1000), comment="创建时间") <NEW_LINE> update_time = db.Column(db.String(64), default=int(time.time() * 1000), comment="更新时间") ... | 模型基类,为每个模型补充创建时间与更新时间 | 625990651f5feb6acb16432f |
class ExtranonceCounter(object): <NEW_LINE> <INDENT> def __init__(self, instance_id): <NEW_LINE> <INDENT> if instance_id < 0 or instance_id > 31: <NEW_LINE> <INDENT> raise Exception("Current ExtranonceCounter implementation needs an instance_id in <0, 31>.") <NEW_LINE> <DEDENT> self.counter = instance_id << 58 <NEW_LIN... | Implementation of a counter producing
unique extranonce across all pool instances.
This is just dumb "quick&dirty" solution,
but it can be changed at any time without breaking anything. | 62599065796e427e5384feba |
class IssueCredentialStatus(IntEnum): <NEW_LINE> <INDENT> Null = 0 <NEW_LINE> OfferCredential = 1 <NEW_LINE> RequestCredential = 2 <NEW_LINE> IssueCredential = 3 | https://github.com/hyperledger/aries-rfcs/tree/master/features/0036-issue-credential | 625990657b25080760ed8883 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.