code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class _PipeWriter(_UnicodeWriter, asyncio.BaseProtocol): <NEW_LINE> <INDENT> def __init__(self, process, datatype, encoding): <NEW_LINE> <INDENT> super().__init__(encoding) <NEW_LINE> self._process = process <NEW_LINE> self._datatype = datatype <NEW_LINE> self._transport = None <NEW_LINE> <DEDENT> def connection_made(s...
Forward data to a pipe
62599029d164cc6175821f2e
class NDDataRead(registry.UnifiedReadWrite): <NEW_LINE> <INDENT> def __init__(self, instance, cls): <NEW_LINE> <INDENT> super().__init__(instance, cls, 'read') <NEW_LINE> <DEDENT> def __call__(self, *args, **kwargs): <NEW_LINE> <INDENT> return registry.read(self._cls, *args, **kwargs)
Read and parse gridded N-dimensional data and return as an NDData-derived object. This function provides the NDDataBase interface to the astropy unified I/O layer. This allows easily reading a file in the supported data formats, for example:: >>> from astropy.nddata import CCDData >>> dat = CCDData.read('image.f...
62599029d99f1b3c44d06659
class ConnectionError(NetError): <NEW_LINE> <INDENT> pass
Failed to connect to the server.
62599029507cdc57c63a5d5e
class MalformedStatement(MigrateError): <NEW_LINE> <INDENT> pass
Incorrect statement exception
62599029d18da76e235b7929
class DeviceSpace(ColorSpace): <NEW_LINE> <INDENT> def __init__(self, family, default): <NEW_LINE> <INDENT> super(DeviceSpace, self).__init__(family, len(default), default) <NEW_LINE> if family.name == 'DeviceGray': <NEW_LINE> <INDENT> self.as_rgb = lambda value: value * 3 <NEW_LINE> <DEDENT> elif family.name == 'Devic...
One of the 3 device spaces (DeviceGray, DeviceRGB, DeviceCMYK).
625990298e05c05ec3f6f637
class Syllables(Base): <NEW_LINE> <INDENT> __tablename__ = 'syllables' <NEW_LINE> word = Column(String(255), nullable= False,primary_key= True) <NEW_LINE> syllable = Column(String(255), nullable= False) <NEW_LINE> mysql_charset='utf8mb4'
This Class Contains all of the users
625990298a349b6b436871f0
class AutodetectionError(RuntimeError): <NEW_LINE> <INDENT> pass
Raised when autodetecting the environment fails.
62599029ac7a0e7691f734a0
class Diffusion(AdvectionDiffusion): <NEW_LINE> <INDENT> def __init__(self, K=None, diffusion_axis=None, use_banded_solver=False, **kwargs): <NEW_LINE> <INDENT> super(Diffusion, self).__init__(K=K, U=0., diffusion_axis=diffusion_axis, use_banded_solver=use_banded_solver, **kwargs)
1D diffusion only, with advection set to zero. Otherwise identical to the parent class AdvectionDiffusion.
625990299b70327d1c57fd3a
class BaseRunner(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.quiet = False <NEW_LINE> self.force = False <NEW_LINE> self.suppress_errors = False <NEW_LINE> self.suppress_warnings = False <NEW_LINE> self.quiet = False <NEW_LINE> self._print_lock = threading.RLock() <NEW_LINE> <DEDENT> def p...
Base class for runners.
62599029a8ecb033258721d5
class SimContext(InstanceContext): <NEW_LINE> <INDENT> def __init__(self, version, sid): <NEW_LINE> <INDENT> super(SimContext, self).__init__(version) <NEW_LINE> self._solution = {'sid': sid, } <NEW_LINE> self._uri = '/Sims/{sid}'.format(**self._solution) <NEW_LINE> <DEDENT> def fetch(self): <NEW_LINE> <INDENT> payload...
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
6259902915baa72349462f50
class AbstractRouter(AbstractSoftware): <NEW_LINE> <INDENT> pass
Базовый класс для всего маршрутизирующего ПО.
6259902930c21e258be997c4
class OSMWay: <NEW_LINE> <INDENT> def __init__(self, id): <NEW_LINE> <INDENT> if not isinstance(id, int): <NEW_LINE> <INDENT> raise NameError('In class OSMWay: constructor: id must be an integer') <NEW_LINE> <DEDENT> self.id = id <NEW_LINE> self.node_ids = [] <NEW_LINE> self.line_type = None <NEW_LINE> <DEDENT> def add...
This class is the OSM Way container
625990293eb6a72ae038b61e
class EDTestCasePluginExecuteControlGridScreeningv1_0_integrationError(EDTestCasePluginExecuteControlGridScreeningv1_0): <NEW_LINE> <INDENT> def __init__(self, _edStringTestName=None): <NEW_LINE> <INDENT> EDTestCasePluginExecuteControlGridScreeningv1_0.__init__(self, "EDTestCasePluginExecuteControlGridScreeningv1_0_int...
Test of characterisation error messages.
625990291f5feb6acb163ba9
class YPatternManager(PatternManager): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> script_name = os.path.splitext(__file__)[0] <NEW_LINE> path = os.path.abspath('./') <NEW_LINE> super(YPatternManager, self).__init__(pattern_dict=yaml_file_to_dict(script_name, path))
Yaml version of pattern manager.
625990290a366e3fb87dd9a0
class ServiceItem(object): <NEW_LINE> <INDENT> def __init__(self, host, port, ttl=30, payload=""): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> self.port = port <NEW_LINE> self.ttl = ttl <NEW_LINE> self.payload = payload <NEW_LINE> self.probe = ORIGIN_DEFAULT_PROBE <NEW_LINE> <DEDENT> @property <NEW_LINE> def url_ro...
service definition
6259902921a7993f00c66f36
class RegistrationViewSet( mixins.CreateModelMixin, mixins.ListModelMixin, viewsets.GenericViewSet): <NEW_LINE> <INDENT> queryset = Registration.objects.all() <NEW_LINE> serializer_class = RegistrationSerializer <NEW_LINE> permission_classes = (DRYPermissions,)
API endpoints to create and list registrations. list: ### Example response [ { "id": 3, "email": "charles.dumont@example.net", "first_name": "Charles", "last_name": "Dumont", "submitted": "2018-05-05T14:15:10.998206+02:00", } ] crea...
6259902930c21e258be997c5
class MaxFn(beam.CombineFn): <NEW_LINE> <INDENT> def create_accumulator(self): <NEW_LINE> <INDENT> return -1 <NEW_LINE> <DEDENT> def add_input(self, current_min, x): <NEW_LINE> <INDENT> return max(current_min, x) <NEW_LINE> <DEDENT> def merge_accumulators(self, accumulators): <NEW_LINE> <INDENT> return max(accumulators...
A CombineFn to find the max of the input PCollection.
625990298a349b6b436871f2
class LimeSpecParsingError(ParsingError): <NEW_LINE> <INDENT> pass
Raised if there is a semantic error in the lime specification.
6259902926238365f5fadb0b
class NavBar(Menu): <NEW_LINE> <INDENT> def __init__(self, master_frame): <NEW_LINE> <INDENT> super().__init__(master_frame.root) <NEW_LINE> self.parent = master_frame.root <NEW_LINE> self.master = master_frame <NEW_LINE> self.file_menu = None <NEW_LINE> self.create_tab("File", self.file_menu, self.get_file_menu_data()...
This Widget controls the nav bar options and selection
62599029e76e3b2f99fd99c6
class NetworkConfigurationDiagnosticResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'profile': {'key': 'profile', 'type': 'NetworkConfigurationDiagnosticProfile'}, 'network_security_group_result': {'key': 'networkSecurityGroupResult', 'type': 'NetworkSecurityGroupResult'}, } <NEW_LINE> def __...
Network configuration diagnostic result corresponded to provided traffic query. :param profile: Network configuration diagnostic profile. :type profile: ~azure.mgmt.network.v2019_09_01.models.NetworkConfigurationDiagnosticProfile :param network_security_group_result: Network security group result. :type network_securi...
6259902921bff66bcd723c1d
class ISIView(HistogramView): <NEW_LINE> <INDENT> x_min = 0 <NEW_LINE> x_max = .05 <NEW_LINE> n_bins = int(x_max / .001) <NEW_LINE> alias_char = 'isi' <NEW_LINE> bin_unit = 'ms' <NEW_LINE> default_shortcuts = { 'change_window_size': 'ctrl+wheel', } <NEW_LINE> default_snippets = { 'set_n_bins': '%sn' % alias_char, 'set_...
Histogram view showing the interspike intervals.
62599029287bf620b6272bab
class EDTestCasePluginExecuteControlCharacterisationv1_2_iceRings(EDTestCasePluginExecuteControlCharacterisationv1_2): <NEW_LINE> <INDENT> def __init__(self, _edStringTestName=None): <NEW_LINE> <INDENT> EDTestCasePluginExecuteControlCharacterisationv1_2.__init__(self, "EDTestCasePluginExecuteControlCharacterisationv1_2...
Test of characterisation error messages.
62599029bf627c535bcb2472
class DictAverageMeter(Meter): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.average_meters = defaultdict(AverageMeter) <NEW_LINE> self.reset() <NEW_LINE> <DEDENT> def reset(self): <NEW_LINE> <INDENT> self.average_meters.clear() <NEW_LINE> <DEDENT> def update(self, val: Dict[str, Union[float, Tensor]...
Computes and stores the average and current value (Dict[str, Union[float, Tensor]])
625990298e05c05ec3f6f639
class BootstrapResult(object): <NEW_LINE> <INDENT> def __init__(self, empf, shape): <NEW_LINE> <INDENT> self.empf = empf <NEW_LINE> self.point = empf[0] <NEW_LINE> self.shape = shape <NEW_LINE> <DEDENT> def std(self): <NEW_LINE> <INDENT> return self._format(np.std(self.empf, axis=0)) <NEW_LINE> <DEDENT> def mean(self):...
class for bootstrap sample inference Parameters ---------- empf : array-like empirical bootstrap parameter distribution
625990298a349b6b436871f4
class ModItemForm(MyForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Item <NEW_LINE> exclude = ['Usuario', 'Fase', 'Fecha', 'Estado', 'Version', 'Campos', 'Tipo', 'condicion']
Formulario para la creacion de items Hereda de forms.ModelForm y utiliza la clase Group para agregar ciertos campos a la hora de la creacion/modificacion/eliminacion
62599029d164cc6175821f33
class VBCAR_train(TrainEngine): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> self.config = config <NEW_LINE> super(VBCAR_train, self).__init__(self.config) <NEW_LINE> <DEDENT> def load_dataset(self): <NEW_LINE> <INDENT> split_data = load_split_dataset(self.config) <NEW_LINE> self.data = GroceryDa...
An instance class from the TrainEngine base class.
6259902963f4b57ef0086550
class Session(requests.Session): <NEW_LINE> <INDENT> def __init__(self, timeout=30, max_retries=1): <NEW_LINE> <INDENT> requests.Session.__init__(self) <NEW_LINE> self.timeout = timeout <NEW_LINE> self.stream = True <NEW_LINE> self.adapters=[] <NEW_LINE> self.domain_delay = {} <NEW_LINE> self.headers.update({'User-Agen...
Subclass of requests Session class which defines some of our own defaults, records unresponsive sites, and raises errors by default.
625990291d351010ab8f4ad2
class Tag(object): <NEW_LINE> <INDENT> __slots__ = ('tagname', 'contents', '_context', '_html_dangle', '_always_paired') <NEW_LINE> def __init__(self, tagname, context, dangle, paired): <NEW_LINE> <INDENT> self.tagname = tagname <NEW_LINE> self._context = context <NEW_LINE> self._html_dangle = dangle <NEW_LINE> self._a...
A printable markup tag. Tags are generated by :class:`Generator` and are usually called immediately, returning a fully formed markup string:: print(generator.textarea(contents="hello!")) For more fine-tuned control over your markup, you may instead choose to use the :meth:`open` and :meth:`close` methods of the ta...
625990299b70327d1c57fd3e
class _QtWindow(QtGui.QWidget): <NEW_LINE> <INDENT> def __init__(self, parent, enable_window): <NEW_LINE> <INDENT> super(_QtWindow, self).__init__(parent) <NEW_LINE> self.handler = _QtWindowHandler(self, enable_window) <NEW_LINE> <DEDENT> def closeEvent(self, event): <NEW_LINE> <INDENT> self.handler.closeEvent(event) <...
The Qt widget that implements the enable control.
62599029a8ecb033258721d9
class DeviceWidget(tk.Toplevel): <NEW_LINE> <INDENT> def __init__(self, device, timeout=1500): <NEW_LINE> <INDENT> tk.Toplevel.__init__(self, padx=6, pady=6) <NEW_LINE> self.title(device.__class__.__name__) <NEW_LINE> self.grid() <NEW_LINE> self.queues = {} <NEW_LINE> self.values = {} <NEW_LINE> self.timeout = timeout ...
Wrap a device in a top level Tk widget. *device* must be an object derived from :class:`.Device`. *timeout* specifies how much time in milliseconds passes between to parameter queries.
625990291d351010ab8f4ad3
class BasicOrganizationSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> url = serializers.HyperlinkedIdentityField(view_name='organization-detail') <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Organization <NEW_LINE> fields = ('url', 'id', 'name', 'created', 'display_name') <NEW_LINE> read_only = ('ur...
Serializer for Basic Organization fields
62599029ec188e330fdf9851
class Word: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._word = None <NEW_LINE> self._doc = None <NEW_LINE> self._paragraphs = 0 <NEW_LINE> <DEDENT> def _add_paragraph(self): <NEW_LINE> <INDENT> if self._paragraphs > 0: <NEW_LINE> <INDENT> self._doc.Paragraphs.Add() <NEW_LINE> <DEDENT> self._paragr...
Microsoft Word Document helper
625990295e10d32532ce40e2
class StructFile(object): <NEW_LINE> <INDENT> def __init__(self, path: str): <NEW_LINE> <INDENT> self._impl = StructFileImpl(path) <NEW_LINE> <DEDENT> def load(self): <NEW_LINE> <INDENT> self._impl.load() <NEW_LINE> <DEDENT> def flush(self): <NEW_LINE> <INDENT> self._impl.flush() <NEW_LINE> <DEDENT> def add_address(sel...
Class that is used to read/modify/update pygamehack Addresses, Structs and Code defined in a file
62599029925a0f43d25e9005
class WorkShop(Donor): <NEW_LINE> <INDENT> objects = {} <NEW_LINE> def build_it(self, name='default'): <NEW_LINE> <INDENT> ride = self.objects.get(name) <NEW_LINE> style = Styles(ride.get_style()) <NEW_LINE> return '%s %s' % (style(), ride.get_model())
Reproduces interface.
62599029e76e3b2f99fd99ca
class IncludeGraphics(LatexFigure): <NEW_LINE> <INDENT> def __init__(self, fname, label, caption, fig=None, position="", star=False, options='width=\columnwidth', margin=False): <NEW_LINE> <INDENT> if fig is None: <NEW_LINE> <INDENT> from matplotlib.pyplot import gcf <NEW_LINE> fig = gcf() <NEW_LINE> <DEDENT> self.labe...
A LaTeX IPython DisplayObject Figure `label` is mandatory, since it also sets the filename. It will have ``fig:`` preprended to it. `fig` is optional - the current figure (via ``gcf``) will be used if it is not set. `position` is either the float placement specifier or the subfigure vertical position. If `subfigure...
6259902a21bff66bcd723c21
class Cat(object): <NEW_LINE> <INDENT> def __init__(self, name, legs=4, owner="john"): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.legs = legs <NEW_LINE> self.owner = owner <NEW_LINE> self.word = "meow" <NEW_LINE> <DEDENT> def talk(self): <NEW_LINE> <INDENT> s = "{}, my name is {}. i have {} legs and belong to...
Create a general Cat object. Requires a name and optional count of legs and owner name.
6259902abe8e80087fbc0037
class SoundException(Exception): <NEW_LINE> <INDENT> pass
Raised for invalid sound file names or unknown sound types.
6259902ad164cc6175821f36
class TestBogusFilter(object): <NEW_LINE> <INDENT> pass
Class that doesn't inherit from BaseHostFilter
6259902aec188e330fdf9853
class OrderedDictWithIndex(OrderedDict): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._key_to_pos = {} <NEW_LINE> self._pos_to_key = {} <NEW_LINE> <DEDENT> def _recalc_index(self): <NEW_LINE> <INDENT> self._key_to_pos = {key: pos for (pos, key) in enumerate(self.keys())...
An OrderedDict that keeps track of the positions of keys. Note: very inefficient to modify contents, except to add new items.
6259902a21a7993f00c66f3c
class DeviotChangeBuildFolderCommand(WindowCommand): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> deviot.folder_explorer(key='build_folder', callback=save_setting)
Adds extra libraries folder path from the settings
6259902a66673b3332c313ae
class CompilerError(Exception): <NEW_LINE> <INDENT> def __init__(self, descrip, range=None, warning=False): <NEW_LINE> <INDENT> self.descrip = descrip <NEW_LINE> self.range = range <NEW_LINE> self.warning = warning <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> error_color = "\x1B[31m" <NEW_LINE> warn_color...
Class representing compile-time errors. message (str) - User-friendly explanation of the error. Should begin with a lowercase letter. file_name (str) - File name in which the error occurred. line_number (int) - Line number on which the error occurred
6259902a8a349b6b436871f8
class RollFinder(with_metaclass(ABCMeta, object)): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def _active_contract(self, oc, front, back, dt): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def _get_active_contract_at_offset(self, root_symbol, dt, offset): <NEW_LINE> <INDENT> oc = self.asset_find...
Abstract base class for calculating when futures contracts are the active contract.
6259902a26238365f5fadb11
class Simulator: <NEW_LINE> <INDENT> ROUND_DIGITS = 0 <NEW_LINE> RADIUS_CM = 7 <NEW_LINE> TACHO_COUNT_CM_FACTOR = 20 <NEW_LINE> POSITION_FACTOR = 3.328125 <NEW_LINE> def __init__(self, x=0, y=0, r=15, angle=0): <NEW_LINE> <INDENT> self.__x = x <NEW_LINE> self.__y = y <NEW_LINE> self.__r = r <NEW_LINE> self.__angle = an...
Simulator for the robot and positional system.
6259902a1d351010ab8f4ad6
class Episode( collections.namedtuple( 'Episode', 'support_images, query_images, ' 'support_labels, query_labels, support_class_ids, query_class_ids')): <NEW_LINE> <INDENT> @property <NEW_LINE> def unique_class_ids(self): <NEW_LINE> <INDENT> return compute_unique_class_ids( tf.concat((self.support_class_ids, self.query...
Wraps an episode's data and facilitates creation of feed dict. Args: support_images: A Tensor of images for fitting an episodic model. query_images: A Tensor of images for evaluating an episodic model. support_labels: A 1D Tensor, the matching support labels (numbers between 0 and K-1, with K the number of c...
6259902a6e29344779b0160f
class SelezarPotrait(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, Start_X, Start_Y): <NEW_LINE> <INDENT> pygame.sprite.Sprite.__init__(self) <NEW_LINE> self.image, self.rect = load_image('SelezarPotrait2.png', 'Idle') <NEW_LINE> self.image.set_colorkey((63,72,204)) <NEW_LINE> scale = 0.7 <NEW_LINE> w,h...
generates a potrait of Selezar
6259902abe8e80087fbc0039
class World: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.objects_list = [] <NEW_LINE> <DEDENT> def getJSON(self): <NEW_LINE> <INDENT> return json.dumps(self, default=lambda o: o.__dict__) <NEW_LINE> <DEDENT> def getDict(self): <NEW_LINE> <INDENT> return json.loads(self.toJSON())
This class stores a list of objects detected by the robot. This list is refreshed everytime the simulation is updated (everytime the robot receives information about the world)
6259902a1d351010ab8f4ad7
class COCOAnnotationTransform(object): <NEW_LINE> <INDENT> def __init__(self, label_file): <NEW_LINE> <INDENT> super(COCOAnnotationTransform, self).__init__() <NEW_LINE> self.label_map = self._labelmap(label_file) <NEW_LINE> <DEDENT> def _labelmap(self, label_file): <NEW_LINE> <INDENT> label_map = {} <NEW_LINE> labels ...
Transforms a COCO annotation into a Tensor of bbox coords and label index Initilized with a dictionary lookup of classnames to indexes
6259902ad164cc6175821f38
class ErrorReportEvent(ObjectEvent): <NEW_LINE> <INDENT> implements(IErrorReportEvent)
A new error report has been created.
6259902a711fe17d825e147a
class Runner(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Runner, self).__init__() <NEW_LINE> self.radius = settings.PLAYER_RADIUS <NEW_LINE> r = self.radius <NEW_LINE> self.image = pygame.Surface((r*2, r*2), pygame.SRCALPHA) <NEW_LINE> pygame.draw.circle(self.image, colors.R...
Runner's Sprite
6259902a21a7993f00c66f3e
class Console(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.timer = None <NEW_LINE> self.__callback = None <NEW_LINE> self.encoding = sys.getfilesystemencoding() <NEW_LINE> self.last_return_code = None <NEW_LINE> self.logger = logging.getLogger(self.__class__.__name__) <NEW_LINE> <DEDENT> def __de...
Helper class to execute command lines. You can execute command right now using command method or after a certain amount of time using command_delayed
6259902a66673b3332c313b0
class ModelEma: <NEW_LINE> <INDENT> def __init__(self, model, decay=0.9999, device='', resume=''): <NEW_LINE> <INDENT> self.ema = deepcopy(model) <NEW_LINE> self.ema.eval() <NEW_LINE> self.decay = decay <NEW_LINE> self.device = device <NEW_LINE> if device: <NEW_LINE> <INDENT> self.ema.to(device=device) <NEW_LINE> <DEDE...
Model Exponential Moving Average Keep a moving average of everything in the model state_dict (parameters and buffers). This is intended to allow functionality like https://www.tensorflow.org/api_docs/python/tf/train/ExponentialMovingAverage A smoothed version of the weights is necessary for some training schemes to p...
6259902a5e10d32532ce40e4
class OpenFromJSON(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def insert_config(self,**kwargs): <NEW_LINE> <INDENT> file_to_write=kwargs['path'] <NEW_LINE> kwargs.__delitem__('path') <NEW_LINE> out_file = open(file_to_write,"w") <NEW_LINE> json.dump(kwargs , out_file , inden...
OpenFromJson is a class, which imports cobfiguration from JSON format.
6259902a8e05c05ec3f6f63c
class MarscoinTestNet(Marscoin): <NEW_LINE> <INDENT> name = 'test-marscoin' <NEW_LINE> seeds = ("dnsseed.marscoin.ru", "testnet-seed.marscointools.com") <NEW_LINE> port = 18338 <NEW_LINE> message_start = b'\xfc\xc1\xb7\xdc' <NEW_LINE> base58_prefixes = { 'PUBKEY_ADDR': 111, 'SCRIPT_ADDR': 196, 'SECRET_KEY': 239 }
Class with all the necessary Diamond testing network information based on https://github.com/marscoin/marscoin/blob/master-0.2/src/net.cpp (date of access: 02/16/2018)
6259902a15baa72349462f59
class EnumerateUsers(actions.ActionPlugin): <NEW_LINE> <INDENT> out_rdfvalues = [rdf_client.User, rdf_client.KnowledgeBaseUser] <NEW_LINE> def ParseWtmp(self): <NEW_LINE> <INDENT> users = {} <NEW_LINE> wtmp_struct_size = UtmpStruct.GetSize() <NEW_LINE> for filename in sorted(os.listdir("/var/log")): <NEW_LINE> <INDENT>...
Enumerates all the users on this system. While wtmp can be collected and parsed server-side using artifacts, we keep this client action to avoid collecting every wtmp on every interrogate, and to allow for the metadata (homedir) expansion to occur on the client, where we have access to LDAP.
6259902ad99f1b3c44d06665
class AttrList: <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self._init_pointer(pango.pango_attr_list_new()) <NEW_LINE> <DEDENT> def _init_pointer(self, pointer: ffi.CData): <NEW_LINE> <INDENT> self._pointer = ffi.gc(pointer, pango.pango_attr_list_unref) <NEW_LINE> <DEDENT> def get_pointer(self) ...
The :class:`AttrList` represents a list of attributes(:class:`Attribute`) that apply to a section of text. The attributes are, in general, allowed to overlap in an arbitrary fashion, however, if the attributes are manipulated only through :func:`AttrList.change()`, the overlap between properties will meet stricter crit...
6259902a21a7993f00c66f40
class PyFilter(object): <NEW_LINE> <INDENT> def __init__(self, callable): <NEW_LINE> <INDENT> self.callable = callable <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "<pyfilter '{}'>".format(self.callable.func_name) <NEW_LINE> <DEDENT> def __moyafilter__(self, context, app, value, params): <NEW_LINE...
A Python defined Moya filter.
6259902a23e79379d538d4ce
class FileSetsByRegexp: <NEW_LINE> <INDENT> def __init__(self, id_regexp_s, id_group = 0): <NEW_LINE> <INDENT> self.id_regexp = re.compile( id_regexp_s) <NEW_LINE> self.id_regexp_s = id_regexp_s <NEW_LINE> self.id_group = id_group <NEW_LINE> <DEDENT> def extract_id(self, name): <NEW_LINE> <INDENT> ret = None <NEW_LINE>...
Groups a list of filenames by an id extracted from the filename.
6259902a9b70327d1c57fd46
class MaxPoolLayer(object): <NEW_LINE> <INDENT> def __init__(self, filter_width=2, filter_height=2, stride=2): <NEW_LINE> <INDENT> self.type = 'pool' <NEW_LINE> self.filter_height, self.filter_width = filter_height, filter_width <NEW_LINE> self.stride = stride <NEW_LINE> self.indices = list() <NEW_LINE> <DEDENT> def po...
Pooling layer that performs the max pooling action, typically used after a ConvolutedLayer
6259902abe8e80087fbc003d
class ModoboaException(Exception): <NEW_LINE> <INDENT> http_code = None <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> if "http_code" in kwargs: <NEW_LINE> <INDENT> self.http_code = kwargs["http_code"] <NEW_LINE> del kwargs["http_code"] <NEW_LINE> <DEDENT> super(ModoboaException, self).__init__(*ar...
Base class for Modoboa custom exceptions.
6259902a287bf620b6272bb5
class WordCloudFields(object): <NEW_LINE> <INDENT> num_inputs = Integer( display_name="Inputs", help="Number of text boxes available for students to input words/sentences.", scope=Scope.settings, default=5, values={"min": 1} ) <NEW_LINE> num_top_words = Integer( display_name="Maximum Words", help="Maximum number of wor...
XFields for word cloud.
6259902a1f5feb6acb163bb5
class ValueLessThanFilterSpecification(CriterionFilterSpecification): <NEW_LINE> <INDENT> operator = LESS_THAN
Concrete value less than specification
6259902a30c21e258be997d0
class TestAdapterHugeMemoryRequired(ABCAdapter): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> ABCAdapter.__init__(self) <NEW_LINE> <DEDENT> def get_input_tree(self): <NEW_LINE> <INDENT> return [{'name': 'test', 'type': 'int', 'default': '0'}] <NEW_LINE> <DEDENT> def get_output(self): <NEW_LINE> <INDENT> ...
Adapter used for testing launch when a lot of memory is required.
6259902aec188e330fdf9858
@ns.route('/', endpoint='datasets') <NEW_LINE> class DatasetListAPI(API): <NEW_LINE> <INDENT> @api.doc('list_datasets') <NEW_LINE> @api.expect(search_parser) <NEW_LINE> @api.marshal_with(dataset_page_fields) <NEW_LINE> def get(self): <NEW_LINE> <INDENT> search_parser.parse_args() <NEW_LINE> return search.query(Dataset,...
Datasets collection endpoint
6259902ad6c5a102081e30eb
class LDAPExceptionTests(unittest.TestCase): <NEW_LINE> <INDENT> def test_exception_with_dn(self): <NEW_LINE> <INDENT> dn = distinguishedname.DistinguishedName(stringValue='dc=example,dc=org') <NEW_LINE> exception = ldaperrors.LDAPNoSuchObject(dn) <NEW_LINE> self.assertEqual(exception.toWire(), b'noSuchObject: dc=examp...
Getting bytes representations of LDAP exceptions
6259902a21a7993f00c66f42
class NotAWebIDException(RejectedClaimException): <NEW_LINE> <INDENT> pass
The given URI is not a WebID (no profile document has been found) Code: noWebId
6259902a26238365f5fadb17
@typic.slotted <NEW_LINE> @dataclasses.dataclass(unsafe_hash=True, order=True) <NEW_LINE> class Action: <NEW_LINE> <INDENT> type: ClassVar[NodeType] = NodeType.ACTION <NEW_LINE> action: str <NEW_LINE> persona: NodeID <NEW_LINE> scene: NodeID <NEW_LINE> index: int <NEW_LINE> @typic.cached_property <NEW_LINE> def id(self...
A representation of a stage direction related to a specific character.
6259902a50485f2cf55dbf46
class SBFloat32(BaseStructField): <NEW_LINE> <INDENT> PACK_FORMAT = UNPACK_FORMAT = b">f"
Unsigned Big Endian 32-bit float field
6259902ae76e3b2f99fd99d2
class TestApiAddUserResponse(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 testApiAddUserResponse(self): <NEW_LINE> <INDENT> pass
ApiAddUserResponse unit test stubs
6259902aa4f1c619b294f5ba
class Snoozer: <NEW_LINE> <INDENT> def __init__(self, seconds, maximum=None, watch_fds=None): <NEW_LINE> <INDENT> self._lock = threading.Lock() <NEW_LINE> self.seconds = seconds <NEW_LINE> self.maximum = max(maximum or 0, seconds) <NEW_LINE> self.watch_fds = watch_fds or [] <NEW_LINE> self._snoozeq = Queue() <NEW_LINE>...
This is a reusable Snooze schedule, which also provides a wake() function so other parts of an app can wake a snoozing thread.
6259902abe8e80087fbc003f
class VariableOffsetWindowIndexer(BaseIndexer): <NEW_LINE> <INDENT> def __init__( self, index_array: np.ndarray | None = None, window_size: int = 0, index=None, offset=None, **kwargs, ): <NEW_LINE> <INDENT> super().__init__(index_array, window_size, **kwargs) <NEW_LINE> self.index = index <NEW_LINE> self.offset = offse...
Calculate window boundaries based on a non-fixed offset such as a BusinessDay.
6259902a21bff66bcd723c29
class Response(ResponseBase): <NEW_LINE> <INDENT> def __init__(self, result=None, message=None, *args, **kwargs): <NEW_LINE> <INDENT> self.result = result <NEW_LINE> self.message = message <NEW_LINE> super(Response, self).__init__(**kwargs) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return self.__dict_...
Response object for the Transaction::approve API :param bool result: Result of the API call :param str message: message related to the API call
6259902a91af0d3eaad3adef
class CelebDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, csv_path, img_path, img_ext, transform=None): <NEW_LINE> <INDENT> tmp_df = pd.read_csv(csv_path) <NEW_LINE> assert tmp_df['Image_Name'].apply(lambda x: os.path.isfile(img_path + x + img_ext)).all(), "Some images referenced in the CSV file were not foun...
Dataset wrapping images and target labels Arguments: A CSV file path Path to image folder Extension of images PIL transforms
6259902a1f5feb6acb163bb7
class ComponentTest(ContainerBase): <NEW_LINE> <INDENT> shard = 22 <NEW_LINE> def setUp(self, is_staff=True): <NEW_LINE> <INDENT> super(ComponentTest, self).setUp(is_staff=is_staff) <NEW_LINE> self.advanced_settings = AdvancedSettingsPage( self.browser, self.course_info['org'], self.course_info['number'], self.course_i...
Test class to add different components. (Not the advanced components)
6259902ad6c5a102081e30ed
class MaxFuncCallReference(FuncCallReference): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> super(MaxFuncCallReference, self).__init__(True, max, *args) <NEW_LINE> <DEDENT> def __safe_repr__(self): <NEW_LINE> <INDENT> return "max_ref({0})".format(self._args_repr())
Holds a reference to max(*args) function call.
6259902ac432627299fa3fba
class EthereumPeer(): <NEW_LINE> <INDENT> def __init__(self, nodes): <NEW_LINE> <INDENT> self.nodes = nodes <NEW_LINE> self.id = 1 <NEW_LINE> self.port = 8545 <NEW_LINE> <DEDENT> def __payload(self, method, params): <NEW_LINE> <INDENT> return json.dumps({ "jsonrpc": "2.0", "method": method, "params": params, "id": self...
Add the ethereum nodes peer.
6259902a56b00c62f0fb3887
class ElementParser(Element, metaclass=ABCMeta): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> super().__init__(self.key, value) <NEW_LINE> <DEDENT> @property <NEW_LINE> @classmethod <NEW_LINE> @abstractmethod <NEW_LINE> def key(cls): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __repr__(self):...
Construct a Element Parser base class. Element Parsers are used to enforce the convention that all Element Parsers already know the key of the element they are constructing. Element Parser is a helper class that simplifies known element definition and makes a layer of abstraction for functionality that all known elem...
6259902a925a0f43d25e900f
class ServerCheck: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.required_header = [] <NEW_LINE> self.legit_server = [ "br1", "eun1", "euw1", "jp1", "kr", "la1", "la2", "na1", "oc1", "tr1", "ru", "americas", "asia", "europe", ] <NEW_LINE> self.logging = logging.getLogger("ServerCheck") <NEW_LINE> sel...
Middleware that makes sure the request is aimed at the proper server.
6259902a73bcbd0ca4bcb259
class NetworkInterfaceIPConfigurationListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'next_link': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'value': {'key': 'value', 'type': '[NetworkInterfaceIPConfiguration]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __in...
Response for list ip configurations API service call. Variables are only populated by the server, and will be ignored when sending a request. :param value: A list of ip configurations. :type value: list[~azure.mgmt.network.v2018_02_01.models.NetworkInterfaceIPConfiguration] :ivar next_link: The URL to get the next se...
6259902aa4f1c619b294f5bc
class MidiMaker: <NEW_LINE> <INDENT> def __init__(self, output_directory, melody): <NEW_LINE> <INDENT> self.output_directory = output_directory <NEW_LINE> self.melody = melody <NEW_LINE> self.file_handler = FileHandler() <NEW_LINE> self.track = 0 <NEW_LINE> self.channel = 0 <NEW_LINE> self.time = 0 <NEW_LINE> self.temp...
Transforms NoteUnits into midi notes that can be output.
6259902a6e29344779b01617
class Meta(object): <NEW_LINE> <INDENT> db_table = "zd_snapshot_tree"
表配置信息
6259902a21bff66bcd723c2b
class CompilerArgs(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.import_directories = None <NEW_LINE> self.input_file = None <NEW_LINE> self.output_source = None <NEW_LINE> self.output_header = None <NEW_LINE> self.output_base_dir = None <NEW_LINE> self.output_suffix = None <NEW_LINE> self.w...
Set of compiler arguments.
6259902a1d351010ab8f4adf
class baseparser: <NEW_LINE> <INDENT> def parse_file(self, source): <NEW_LINE> <INDENT> raise NotImplementedError("parse_file: You should have implemented this method!") <NEW_LINE> <DEDENT> def parse_string(self, source): <NEW_LINE> <INDENT> raise NotImplementedError("parse_string: You should have implemented this meth...
Parser interface.
6259902a1f5feb6acb163bb9
class RedirectAdminMiddleware(MiddlewareMixin): <NEW_LINE> <INDENT> def process_request(self, request): <NEW_LINE> <INDENT> path = request.path_info.lstrip('/') <NEW_LINE> if request.user.is_superuser: <NEW_LINE> <INDENT> if not compile(settings.SUPERUSER_DASHBOARD).match(path): <NEW_LINE> <INDENT> return HttpResponseR...
Middleware class that re-redirects a superuser to the superuser site
6259902a0a366e3fb87dd9b0
class Feed(twc.Widget): <NEW_LINE> <INDENT> url = None <NEW_LINE> template = 'mako:moksha.feeds.widgets.templates.feed_home' <NEW_LINE> title = twc.Variable("The title of this feed") <NEW_LINE> link = twc.Variable("The url to the site that this feed is for") <NEW_LINE> entries = twc.Variable("A list of feed entries", d...
The Moksha Feed object. A Feed is initialized with an id and a url, and automatically handles the fetching, parsing, and caching of the data.
6259902a15baa72349462f61
class inidserfinf(inididestud): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> verbose_name = u'13.7 Relación urbano - regionales' <NEW_LINE> verbose_name_plural = u'13.7 Relaciones urbano - regionales' <NEW_LINE> proxy = True
Socioeconómico y Cultural Relaciones funcionales urbano - regionales Información General
6259902a1d351010ab8f4ae0
class PVE_Mission(CombatLog): <NEW_LINE> <INDENT> __slots__ = CombatLog.__slots__ <NEW_LINE> matcher = re.compile("^PVE_Mission:\s'(?P<mission>[^']+)'.\s(?P<message>.*)")
- mission: contains the mission id. - message: contains the pve mission message, like starting rounds, waves, etc.
6259902a9b70327d1c57fd4c
class EcoByZipInputSet(InputSet): <NEW_LINE> <INDENT> def set_APICredentials(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'APICredentials', value) <NEW_LINE> <DEDENT> def set_Limit(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'Limit', value) <NEW_LINE> <DEDENT> def set_Zip(self, value): <N...
An InputSet with methods appropriate for specifying the inputs to the EcoByZip Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
6259902a6fece00bbaccc97c
class Fun(Tipo): <NEW_LINE> <INDENT> def __init__(self, domain, range): <NEW_LINE> <INDENT> self.tipo = "Fun" <NEW_LINE> self.domain = domain <NEW_LINE> self.range = range <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "%s --> %s" % (self.domain, self.range) <NEW_LINE> <DEDENT> def __eq__(self, othe...
T1 --> T2
6259902ad6c5a102081e30f1
class ErrorsMessages: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.message = "error" <NEW_LINE> self.invalid_post = "json post invalid according to the contract" <NEW_LINE> self.integrity_error = "Fields doesn't corresponds to database" <NEW_LINE> self.json_keys = "The json post's keys are invalid a...
Error messages control
6259902aec188e330fdf985e
class CatmxvcloamloopbkstatusEnum(Enum): <NEW_LINE> <INDENT> disabled = 1 <NEW_LINE> sent = 2 <NEW_LINE> received = 3 <NEW_LINE> failed = 4 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xe._meta import _ATM_MIB as meta <NEW_LINE> return meta._meta_table['AtmMib.Atmv...
CatmxvcloamloopbkstatusEnum Indicates OAM loopback status of the VC. disabled(1) \-\- No OAMs on this VC. sent(2) \-\- OAM sent, waiting for echo. received(3) \-\- OAM received from target. failed(4) \-\- Last OAM did not return. .. data:: disabled = 1 .. data:: sent = 2 .. data:: received = 3...
6259902a925a0f43d25e9013
class Append(Set): <NEW_LINE> <INDENT> def expression(self, token: Any): <NEW_LINE> <INDENT> if self.if_not_exists: <NEW_LINE> <INDENT> return f"{ref(token)} = if_not_exists({ref(token)}b, list_append({ref(token)}, {val(token)}))" <NEW_LINE> <DEDENT> return f"{ref(token)} = list_append({ref(token)}, {val(token)})"
Adds items to the end of a list
6259902a507cdc57c63a5d74
class Deploy(models.Model): <NEW_LINE> <INDENT> project = models.ForeignKey(verbose_name='项目', to='Project') <NEW_LINE> version = models.CharField(verbose_name='版本', max_length=32) <NEW_LINE> uid = models.CharField(verbose_name='上线文件包名称', max_length=32, null=True, blank=True) <NEW_LINE> status_choice = ( (1, '未获取'), (2...
部署任务表 例如: 1 0.11 2 1.10 1 0.12
6259902a66673b3332c313bc
class BasicDisplayWidget(QWidget): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> super().__init__(parent) <NEW_LINE> self.display_image = None <NEW_LINE> self.display_width = 0 <NEW_LINE> self.display_height = 0 <NEW_LINE> return <NEW_LINE> <DEDENT> def paintEvent(self, e): <NEW_LINE> <INDENT...
用于显示图像的 Widget 控件
6259902abf627c535bcb2484
class Eagle(object): <NEW_LINE> <INDENT> def __init__(self, user, password, ipaddress): <NEW_LINE> <INDENT> self._user = user <NEW_LINE> self._password = password <NEW_LINE> self._ipaddress = ipaddress <NEW_LINE> self._base_url = "http://{ip}/cgi-bin/cgi_manager".format(ip=ipaddress) <NEW_LINE> <DEDENT> def __getattrib...
as per: http://rainforestautomation.com/wp-content/uploads/2015/07/EAGLE_REST_API-1.1.pdf
6259902a26238365f5fadb1f
class EventListener(EventListenerBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(EventListener, self).__init__() <NEW_LINE> self._listener_thread = None <NEW_LINE> <DEDENT> def listen(self, ip_address): <NEW_LINE> <INDENT> address = (ip_address, self.requested_port_number) <NEW_LINE> self._list...
The Event Listener. Runs an http server in a thread which is an endpoint for ``NOTIFY`` requests from Sonos devices. Inherits from `soco.events_base.EventListenerBase`.
6259902a1d351010ab8f4ae4
class ImportWizardView(SessionWizardView): <NEW_LINE> <INDENT> form_list = [('basics', ProjectBasicsForm), ('extra', ProjectExtraForm), ('advanced', ProjectAdvancedForm)] <NEW_LINE> condition_dict = {'extra': lambda self: self.is_advanced(), 'advanced': lambda self: self.is_advanced()} <NEW_LINE> def get_form_kwargs(se...
Project import wizard
6259902ad10714528d69ee73
class SimpleOperationalTxSpec(BaseOperationalTxSpec): <NEW_LINE> <INDENT> def __init__(self, model, asset): <NEW_LINE> <INDENT> super(SimpleOperationalTxSpec, self).__init__() <NEW_LINE> self.model = model <NEW_LINE> self.targets = [] <NEW_LINE> self.asset = asset <NEW_LINE> <DEDENT> def add_target(self, color_target):...
Subclass of OperationalTxSpec which uses wallet model. Represents a transaction that's ready to be composed and then signed. The parent is an abstract class.
6259902a63f4b57ef0086559
class RestResponse(TypedDict): <NEW_LINE> <INDENT> json: dict <NEW_LINE> status_code: int
Used to define the dict types in a strict way.
6259902ad164cc6175821f46
class Aspect: <NEW_LINE> <INDENT> def __getattribute__(self, name): <NEW_LINE> <INDENT> method = super().__getattribute__(name) <NEW_LINE> if name[:2] == '__': <NEW_LINE> <INDENT> return method <NEW_LINE> <DEDENT> if not isinstance(method, Callable): <NEW_LINE> <INDENT> return method <NEW_LINE> <DEDENT> if isinstance(m...
Patcher for classes. Place it as first parent for new class for patching.
6259902aa8ecb033258721eb
class AddSubmodule(standard.Dialog): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> super(AddSubmodule, self).__init__(parent=parent) <NEW_LINE> hint = N_('git://git.example.com/repo.git') <NEW_LINE> tooltip = N_('Submodule URL (can be relative, ex: ../repo.git)') <NEW_LINE> self.url_text = text.Hi...
Add a new submodule
6259902a30c21e258be997da