code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class GeoLocatorException(Exception): <NEW_LINE> <INDENT> pass | Basic pysyge GeoLocator exception. | 6259905f498bea3a75a59142 |
class ChannelAttention_MLP(nn.Module): <NEW_LINE> <INDENT> def __init__(self, channel, reduction=16): <NEW_LINE> <INDENT> super(ChannelAttention_MLP, self).__init__() <NEW_LINE> self.input_size=128 <NEW_LINE> self.avg_pool = nn.Sequential( nn.AdaptiveAvgPool2d(1), ) <NEW_LINE> self.max_pool = nn.Sequential( nn.MaxPool2... | each channel's feature means different in rebuilding HR image
so by learning what features are being extracted,which feature matters most can be applied. | 6259905f1f5feb6acb164272 |
class ClearMemberFieldInformationError(ApiRequestFailed): <NEW_LINE> <INDENT> pass | An API call to clear member info from a field did not complete correctly | 6259905f63b5f9789fe867fb |
class Context(object): <NEW_LINE> <INDENT> def __init__(self, dict_=None): <NEW_LINE> <INDENT> dict_ = dict_ or {} <NEW_LINE> self.dicts = [dict_] <NEW_LINE> self.dirty = True <NEW_LINE> self.result = None <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return repr(self.dicts) <NEW_LINE> <DEDENT> def __iter... | A stack container for variable context | 6259905f7d43ff2487427f54 |
class CTRexNbar_Test(CTRexNbarBase): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(CTRexNbar_Test, self).__init__(*args, **kwargs) <NEW_LINE> self.unsupported_modes = ['loopback'] <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> super(CTRexNbar_Test, self).setUp() <NEW_LINE>... | This class defines the NBAR testcase of the TRex traffic generator | 6259905f8e71fb1e983bd153 |
class TestBuyIncomingNumberRequest(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 testBuyIncomingNumberRequest(self): <NEW_LINE> <INDENT> pass | BuyIncomingNumberRequest unit test stubs | 6259905f8e7ae83300eea716 |
class State(object): <NEW_LINE> <INDENT> def __init__(self, opts): <NEW_LINE> <INDENT> self.opts = opts <NEW_LINE> self.player_pos = 0 <NEW_LINE> self.opponent_pos = 0 | Represents the state of a pong game | 6259905f15baa7234946361c |
class PSD_Dataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self.data = data <NEW_LINE> <DEDENT> def __len__(self): <NEW_LINE> <INDENT> return len(self.data['pulses']) <NEW_LINE> <DEDENT> def __getitem__(self, index): <NEW_LINE> <INDENT> pulses = torch.FloatTensor(self.data['pulses'][i... | A class to convert the input data into torch tensors
and store them in a Dataset object so that it
can be read later by torch's Dataloader function. | 6259905f7cff6e4e811b70ce |
class Login(SeleniumCommand): <NEW_LINE> <INDENT> def __init__(self, device=None, address=None, username=None, password=None, port=None, proto='https', timeout=15, ver=None, *args, **kwargs): <NEW_LINE> <INDENT> super(Login, self).__init__(*args, **kwargs) <NEW_LINE> self.timeout = timeout <NEW_LINE> self.proto = proto... | Log in command.
@param device: The device.
@type device: str or DeviceAccess instance
@param address: The IP or hostname.
@type address: str
@param username: The username.
@type username: str
@param password: The password.
@type password: str | 6259905fd53ae8145f919aeb |
class Body1(object): <NEW_LINE> <INDENT> swagger_types = { 'file': 'str' } <NEW_LINE> attribute_map = { 'file': 'file' } <NEW_LINE> def __init__(self, file=None): <NEW_LINE> <INDENT> self._file = None <NEW_LINE> self.discriminator = None <NEW_LINE> self.file = file <NEW_LINE> <DEDENT> @property <NEW_LINE> def file(self... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually. | 6259905f8e7ae83300eea717 |
class InvariantIndexable(CallByIndex): <NEW_LINE> <INDENT> __slots__ = [] <NEW_LINE> def __init__(self, v): <NEW_LINE> <INDENT> super().__init__(lambda _: v) | Objects whose indexing always gives the same constant.
This small utility is for cases where we need an indexable object whose
indexing result is actually invariant with respect to the given indices.
For an instance constructed with value ``v``, all indexing of it gives ``v``
back. | 6259905f627d3e7fe0e08514 |
class Tail(Part): <NEW_LINE> <INDENT> def __init__(self, **kwa): <NEW_LINE> <INDENT> super(Tail, self).__init__(**kwa) <NEW_LINE> <DEDENT> def pack(self): <NEW_LINE> <INDENT> self.packed = '' <NEW_LINE> if self.kind == raeting.tailKinds.nada: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> return self.packed <NEW_LINE> <D... | RAET protocol packet tail object
Manages the verification of the body portion of the packet | 6259905f16aa5153ce401b66 |
class GPGKey( Entity, EntityCreateMixin, EntityDeleteMixin, EntityReadMixin, EntitySearchMixin): <NEW_LINE> <INDENT> def __init__(self, server_config=None, **kwargs): <NEW_LINE> <INDENT> self._fields = { 'content': entity_fields.StringField(required=True), 'name': entity_fields.StringField(required=True), 'organization... | A representation of a GPG Key entity. | 6259905fa8370b77170f1a57 |
class CLILoggingFormatter(ColoredFormatter, object): <NEW_LINE> <INDENT> LOG_COLORS = { 'SPAM': '', 'DEBUG': 'blue', 'VERBOSE': 'cyan', 'INFO': 'green', 'NOTICE': 'yellow', 'WARNING': 'red', 'ERROR': 'fg_white,bg_red', 'CRITICAL': 'purple,bold', } <NEW_LINE> def __init__(self, verbosity=logging.INFO):... | Logging formatter with colorization and variable verbosity.
COT logs are formatted differently (more or less verbosely) depending
on the logging level.
.. seealso:: :class:`logging.Formatter`
Args:
verbosity (int): Logging level as defined by :mod:`logging`.
Examples::
>>> record = logging.LogRecord(
... "CO... | 6259905f460517430c432b97 |
class AttributeLookupTable(EntityLookupTable): <NEW_LINE> <INDENT> def __init__(self, attribute, entity_manager): <NEW_LINE> <INDENT> field = entity_module.Entity.reflect_attribute(attribute) <NEW_LINE> coerce_fn = field.typedesc.coerce <NEW_LINE> def key_func(entity): <NEW_LINE> <INDENT> return (coerce_fn(entity.get_r... | Lookup table by attribute value. | 6259905f7b25080760ed8825 |
class YcmGoToDefinition(YcmSearch): <NEW_LINE> <INDENT> searchType = 'GoToDefinition' | Plugin to find the definition of a symbol | 6259905f7d847024c075da5e |
class ColorPrint: <NEW_LINE> <INDENT> reset = "\x1b[0m" <NEW_LINE> def __init__(self, color=30, bg_color=None, style=None): <NEW_LINE> <INDENT> self.__color = "\x1b[" <NEW_LINE> if style: <NEW_LINE> <INDENT> self.__color += "%d;" % style <NEW_LINE> <DEDENT> if bg_color: <NEW_LINE> <INDENT> self.__color += "%d;" % bg_co... | 字体色 | 背景色 | 颜色描述
-------------------------------------------
30 | 40 | 黑色
31 | 41 | 红色
32 | 42 | 绿色
33 | 43 | 黃色
34 | 44 | 蓝色
35 | 45 | 紫红色
36 | 46 | 青蓝色
37 | 47 | 白色
-------------------------------------------
-------------------------------
显示方式 | 效果
-------------------------------
0 | 终端默认设置
1 | 高亮显示
4 | 使用下划线
5 | 闪... | 6259905f23e79379d538db86 |
class SmallestLastNodeColoring: <NEW_LINE> <INDENT> def __init__(self, graph): <NEW_LINE> <INDENT> if graph.is_directed(): <NEW_LINE> <INDENT> raise ValueError("the graph is directed") <NEW_LINE> <DEDENT> self.graph = graph <NEW_LINE> self.color = dict((node, None) for node in self.graph.iternodes()) <NEW_LINE> for edg... | Find a smallest last (SL) node coloring.
Attributes
----------
graph : input undirected graph or multigraph
color : dict with nodes (values are colors)
Notes
-----
Colors are 0, 1, 2, ... | 6259905f32920d7e50bc76d0 |
class ProviderException(Exception): <NEW_LINE> <INDENT> pass | Dropbox redirected to your redirect URI with some unexpected error
identifier and error message.
The recommended action is to log the error, tell the user something went
wrong, and let them try again. | 6259905f3eb6a72ae038bcea |
class PKSampler(Sampler): <NEW_LINE> <INDENT> def __init__(self, groups, p, k): <NEW_LINE> <INDENT> self.p = p <NEW_LINE> self.k = k <NEW_LINE> self.groups = create_groups(groups, self.k) <NEW_LINE> assert len(self.groups) >= p <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> for key in self.groups: <NEW_LIN... | Randomly samples from a dataset while ensuring that each batch (of size p * k)
includes samples from exactly p labels, with k samples for each label.
Args:
groups (list[int]): List where the ith entry is the group_id/label of the ith sample in the dataset.
p (int): Number of labels/groups to be sampled from in... | 6259905fbe8e80087fbc0710 |
class GatewayRouteListResult(Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[GatewayRoute]'}, } <NEW_LINE> def __init__(self, value=None): <NEW_LINE> <INDENT> super(GatewayRouteListResult, self).__init__() <NEW_LINE> self.value = value | List of virtual network gateway routes.
:param value: List of gateway routes
:type value: list[~azure.mgmt.network.v2017_11_01.models.GatewayRoute] | 6259905f76e4537e8c3f0c17 |
class Patched_CNN(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Patched_CNN, self).__init__() <NEW_LINE> self.model = Sequential() <NEW_LINE> <DEDENT> def load_model(self, filepath='model.h5', custom_objects=None, compile=True): <NEW_LINE> <INDENT> self.model = keras.models.load_model(filep... | Implementation based on the 'Patched CNN' architecture from
http://chenpingyu.org/docs/yago_eccv2016.pdf (page 9).
This implementation differs in that it accepts an arbitrary number of
channels for the input, which is defined when build_model() is called. | 6259905f91f36d47f22319d4 |
class NewPostEvent(InstanceEvent): <NEW_LINE> <INDENT> event_type = 'thread reply' <NEW_LINE> content_type = Thread <NEW_LINE> def __init__(self, reply): <NEW_LINE> <INDENT> super(NewPostEvent, self).__init__(reply.thread) <NEW_LINE> self.reply = reply <NEW_LINE> <DEDENT> def fire(self, **kwargs): <NEW_LINE> <INDENT> r... | An event which fires when a thread receives a reply
Firing this also notifies watchers of the containing forum. | 6259905f0a50d4780f706904 |
class _Failed(object): <NEW_LINE> <INDENT> def __init__(self, matcher): <NEW_LINE> <INDENT> self._matcher = matcher <NEW_LINE> <DEDENT> def _got_failure(self, deferred, failure): <NEW_LINE> <INDENT> deferred.addErrback(lambda _: None) <NEW_LINE> return self._matcher.match(failure) <NEW_LINE> <DEDENT> @staticmethod <NEW... | Matches a Deferred that has failed. | 6259905fd53ae8145f919aed |
class Company(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> fields = ( 'name', 'status', 'notes', 'doc_url', ) <NEW_LINE> model = models.Company | Company form. | 6259905f56ac1b37e630382c |
class TestDownload(IWebTest): <NEW_LINE> <INDENT> @pytest.fixture <NEW_LINE> def image_well_plate(self): <NEW_LINE> <INDENT> plate = PlateI() <NEW_LINE> plate.name = rstring(self.uuid()) <NEW_LINE> plate = self.update.saveAndReturnObject(plate) <NEW_LINE> well = WellI() <NEW_LINE> well.plate = plate <NEW_LINE> well = s... | Tests to check download is disabled where specified. | 6259905fd486a94d0ba2d653 |
class Basket: <NEW_LINE> <INDENT> def __init__(self, request): <NEW_LINE> <INDENT> self.session = request.session <NEW_LINE> basket = self.session.get("skey") <NEW_LINE> if "skey" not in request.session: <NEW_LINE> <INDENT> basket = self.session["skey"] = {} <NEW_LINE> <DEDENT> self.basket = basket <NEW_LINE> <DEDENT> ... | A base Basket class, providing some default behaviors that can be inherited
or overridden as necessary. | 6259905f45492302aabfdb65 |
class ReadView(BreadViewMixin, DetailView): <NEW_LINE> <INDENT> perm_name = "view" <NEW_LINE> template_name_suffix = "_read" <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> data = super(ReadView, self).get_context_data(**kwargs) <NEW_LINE> data["form"] = self.get_form(instance=self.object) <NEW_LIN... | The read view makes a form, not because we're going to submit
changes, but just as a handy container for the object's data that
we can iterate over in the template to display it if we don't want
to make a custom template for this model. | 6259905fd7e4931a7ef3d6ca |
class ConnectionLevel: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> READ_ONLY = "ro" <NEW_LINE> UPDATE = "update" <NEW_LINE> ADMIN = "admin" | Connection level. | 6259905f8a43f66fc4bf381a |
class Connector: <NEW_LINE> <INDENT> def read_item(self, from_date=None): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def read_block(self, size, from_date=None): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def write(self, items): <NEW_LINE> <INDENT> raise NotImplementedError ... | Abstract class for reading and writing items.
This class provides methods for reading and writing items from/to a
given data source. | 6259905fadb09d7d5dc0bbf6 |
class Viewable(MetaHasProps): <NEW_LINE> <INDENT> model_class_reverse_map = {} <NEW_LINE> def __new__(cls, class_name, bases, class_dict): <NEW_LINE> <INDENT> if "__view_model__" not in class_dict: <NEW_LINE> <INDENT> class_dict["__view_model__"] = class_name <NEW_LINE> <DEDENT> class_dict["get_class"] = Viewable.get_c... | Any plot object (Data Model) which has its own View Model in the
persistence layer.
One thing to keep in mind is that a Viewable should have a single
unique representation in the persistence layer, but it might have
multiple concurrent client-side Views looking at it. Those may
be from different machines altogether. | 6259905f379a373c97d9a6b0 |
@dataclass <NEW_LINE> class CoskewArrays: <NEW_LINE> <INDENT> diagonal: np.ndarray <NEW_LINE> semi_diagonal: np.ndarray <NEW_LINE> off_diagonal: np.ndarray | Object to store measured coskew data. | 6259905f7d43ff2487427f56 |
class scaleH(): <NEW_LINE> <INDENT> def __init__(self,planet,species,state): <NEW_LINE> <INDENT> iplanet = np.where(PPdat['body'] == planet)[0] <NEW_LINE> ispecies = np.where(SPdat['species'] == species)[0] <NEW_LINE> self.g = PPdat['g'][iplanet] <NEW_LINE> self.Rv = SPdat['Rv'][ispecies] <NEW_LINE> iTc = np.where((PI... | Load all paramaters for a certain planet and a particular species that will condense in solid or liquid form, and calculate cloud scale height, Hc, and atm scale height, H | 6259905f9c8ee82313040cd0 |
class Ems: <NEW_LINE> <INDENT> def __init__(self, url): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> <DEDENT> def conf_radio(self, emsd): <NEW_LINE> <INDENT> ems_url = self.url <NEW_LINE> api_prefix = "" <NEW_LINE> url = ems_url + api_prefix <NEW_LINE> headers = {"Content-Type": "application/json", "Accept": "applicat... | Class implementing the communication API with EMS | 6259905f1f037a2d8b9e53b1 |
class LinearLayer(Layer): <NEW_LINE> <INDENT> def __init__(self, n_in, n_out, seed=0): <NEW_LINE> <INDENT> super(LinearLayer, self).__init__(n_in=n_in, n_out=n_out) <NEW_LINE> np.random.seed(seed) <NEW_LINE> self.weights = np.random.normal(0.0, n_in ** -0.5, (n_in, n_out)) <NEW_LINE> self.dloss_dweights = None <NEW_LIN... | A linear layer for a neural network. | 6259905f0c0af96317c578a5 |
class ShowUsedTextures(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.usedtextures" <NEW_LINE> bl_label = "" <NEW_LINE> isGroup: bpy.props.BoolProperty() <NEW_LINE> Index: bpy.props.IntProperty() <NEW_LINE> LODIndex: bpy.props.IntProperty() <NEW_LINE> BlockIndex: bpy.props.IntProperty() <NEW_LINE> def exe... | Show used texture paths for the mesh block | 6259905f8da39b475be04874 |
class Operations(object): <NEW_LINE> <INDENT> models = models <NEW_LINE> def __init__(self, client, config, serializer, deserializer): <NEW_LINE> <INDENT> self._client = client <NEW_LINE> self._serialize = serializer <NEW_LINE> self._deserialize = deserializer <NEW_LINE> self.api_version = "2018-01-01" <NEW_LINE> self.... | Operations operations.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client API version. Constant value: "2018-01-01". | 6259905ff548e778e596cc15 |
class Bucketlist(BaseModel): <NEW_LINE> <INDENT> created_by = models.ForeignKey(User) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return 'BucketList : {}'.format(self.name) | A model of the bucketlist table | 6259905fe76e3b2f99fda08c |
class RTester(RPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/gastonstat/tester" <NEW_LINE> url = "https://cloud.r-project.org/src/contrib/tester_0.1.7.tar.gz" <NEW_LINE> list_url = "https://cloud.r-project.org/src/contrib/Archive/tester" <NEW_LINE> version('0.1.7', sha256='b9c645119c21c69450f3d366c9... | tester allows you to test characteristics of common R objects. | 6259905f01c39578d7f1427b |
class CurveMetrics(BinaryClassificationMetrics): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> super(CurveMetrics, self).__init__(*args) <NEW_LINE> <DEDENT> def _to_list(self, rdd): <NEW_LINE> <INDENT> points = [] <NEW_LINE> for row in rdd.collect(): <NEW_LINE> <INDENT> points += [(float(row._1()),... | Scala version implements .roc() and .pr()
Python: https://spark.apache.org/docs/latest/api/python/_modules/pyspark/mllib/common.html
Scala: https://spark.apache.org/docs/latest/api/java/org/apache/spark/mllib/evaluation/BinaryClassificationMetrics.html
See: https://stackoverflow.com/a/57342431/1646932 | 6259905f2c8b7c6e89bd4e7c |
class ResourcePointer(obj.Pointer): <NEW_LINE> <INDENT> resource_base = 0 <NEW_LINE> def __init__(self, resource_base=None, **kwargs): <NEW_LINE> <INDENT> super(ResourcePointer, self).__init__(**kwargs) <NEW_LINE> self.resource_base = (resource_base or self.obj_context.get("resource_base")) <NEW_LINE> if self.resource_... | A pointer relative to our resource section. | 6259905fdd821e528d6da4c7 |
class DisplacementOperator(Operator): <NEW_LINE> <INDENT> def __init__(self, par_space, control_points, discr_space, ft_kernel): <NEW_LINE> <INDENT> if par_space.size != discr_space.ndim: <NEW_LINE> <INDENT> raise ValueError('dimensions of product space and image grid space' ' do not match ({} != {})' ''.format(par_spa... | Operator mapping parameters to an inverse displacement.
This operator computes for the momenta::
alpha --> D(alpha)
where
D(alpha) = v.
The vector field ``v`` depends on the deformation parameters
``alpha_j`` as follows::
v(y) = sum_j (K(y, y_j) * alpha_j)
Here, ``K`` is the RKHS kernel matrix and ea... | 6259905f56ac1b37e630382d |
class I18NTextWidget(I18NWidget, text.TextWidget): <NEW_LINE> <INDENT> implementsOnly(II18NTextWidget) <NEW_LINE> default_widget = text.TextWidget <NEW_LINE> maxlength = I18NWidgetProperty('maxlength') <NEW_LINE> size = I18NWidgetProperty('size') <NEW_LINE> def updateWidget(self, widget, language): <NEW_LINE> <INDENT> ... | I18N text input type implementation. | 6259905f3539df3088ecd929 |
class Piece(object): <NEW_LINE> <INDENT> def __init__(self, image, index): <NEW_LINE> <INDENT> self.image = image[:] <NEW_LINE> self.id = index <NEW_LINE> <DEDENT> def __getitem__(self, index): <NEW_LINE> <INDENT> return self.image.__getitem__(index) <NEW_LINE> <DEDENT> def size(self): <NEW_LINE> <INDENT> return self.i... | Represents single jigsaw puzzle piece.
Each piece has identifier so it can be
tracked across different individuals
:param image: ndarray representing piece's RGB values
:param index: Unique id withing piece's parent image
Usage::
>>> from gaps.piece import Piece
>>> piece = Piece(image[:28, :28, :], 42) | 6259905fa219f33f346c7e93 |
class FluxFactory(object): <NEW_LINE> <INDENT> latest = "0.26.0" <NEW_LINE> def _iter_flux(): <NEW_LINE> <INDENT> loader = pkgutil.get_loader('maestrowf.interfaces.script._flux') <NEW_LINE> mods = [(name, ispkg) for finder, name, ispkg in pkgutil.iter_modules( loader.load_module('maestrowf.interfaces.script._flux').__p... | A factory for swapping out Flux's backend interface based on version. | 6259905fa8370b77170f1a5b |
class ValueInSetValidator(object): <NEW_LINE> <INDENT> def __init__(self, valid_values, nullable=False): <NEW_LINE> <INDENT> self.valid_values = valid_values <NEW_LINE> self.nullable = nullable <NEW_LINE> <DEDENT> def __call__(self, value): <NEW_LINE> <INDENT> if self.nullable and not value: <NEW_LINE> <INDENT> return ... | Validates that a value is within a set of possible values.
The optional 'nullable' flag determines whether or not the value
may also be empty. | 6259905f6e29344779b01cdc |
class ATabController(QTabWidget): <NEW_LINE> <INDENT> def __init__(self, tabSettings, parent=None): <NEW_LINE> <INDENT> super(ATabController, self).__init__(parent) <NEW_LINE> self._configureTabs(tabSettings) <NEW_LINE> self.setTabPosition(QTabWidget.South) <NEW_LINE> <DEDENT> def _configureTabs(self, settings): <NEW_L... | Main representation of a tab widget. Constructor expects
an iterable with 4-tuple items containing (widget, text, idx icon name). | 6259905f435de62698e9d493 |
class ComparisonCondition(Condition): <NEW_LINE> <INDENT> _segment = Segment.WHERE <NEW_LINE> def __init__(self, operator: str, field_or_name: Union[field.Field, str], value: Any): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.operator = operator <NEW_LINE> self.value = value <NEW_LINE> if isinstance(field_or_... | Used to specify a comparison between a column and a value in the WHERE. | 6259905f435de62698e9d494 |
class ShellInjectionTimingCheck(_TimingCheck): <NEW_LINE> <INDENT> key = "shell.timing.sleep" <NEW_LINE> name = "Shell Injection Timing" <NEW_LINE> description = "checks for shell injection by executing delays" <NEW_LINE> example = "; sleep 9 #" <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self._payloads = [ ('; ... | Checks for Shell Injection by executing the 'sleep' command. The payload uses shell separators to inject 'sleep',
such as ;, &&, ||,
, and backticks.
| 6259905f7b25080760ed8827 |
class ReverseProxiedConfig(object): <NEW_LINE> <INDENT> def __init__(self, trusted_proxy_headers: List[str] = None, http_host: str = None, remote_addr: str = None, script_name: str = None, server_name: str = None, server_port: int = None, url_scheme: str = None, rewrite_path_info: bool = False) -> None: <NEW_LINE> <IND... | Class to hold information about a reverse proxy configuration. | 6259905fd7e4931a7ef3d6cb |
class DevelopmentConfig(Config): <NEW_LINE> <INDENT> DEBUG = True <NEW_LINE> SQLALCHEMY_ECHO = True <NEW_LINE> SQLALCHEMY_TRACK_MODIFICATIONS = False <NEW_LINE> SERVER_NAME = 'localhost:6286' | Development configurations | 6259905fac7a0e7691f73b71 |
class InvalidUsePartnerOstypeSettingInfo(NetAppObject): <NEW_LINE> <INDENT> _initiator_group_os_type = None <NEW_LINE> @property <NEW_LINE> def initiator_group_os_type(self): <NEW_LINE> <INDENT> return self._initiator_group_os_type <NEW_LINE> <DEDENT> @initiator_group_os_type.setter <NEW_LINE> def initiator_group_os_ty... | Information about an invalid initiator group ostype and
use_partner combination | 6259905f3cc13d1c6d466dcf |
class TestPoFileHeaders(FormatsBaseTestCase): <NEW_LINE> <INDENT> def _load_pot(self): <NEW_LINE> <INDENT> test_file = os.path.join(TEST_FILES_PATH, 'test.pot') <NEW_LINE> self.resource.entities.all().delete() <NEW_LINE> handler = POHandler(test_file) <NEW_LINE> handler.bind_resource(self.resource) <NEW_LINE> handler.s... | Test PO File library support for PO file headers. | 6259905f498bea3a75a59145 |
class Models(DatasetModels, collections.abc.MutableSequence): <NEW_LINE> <INDENT> def __delitem__(self, key): <NEW_LINE> <INDENT> del self._models[self.index(key)] <NEW_LINE> <DEDENT> def __setitem__(self, key, model): <NEW_LINE> <INDENT> from gammapy.modeling.models import FoVBackgroundModel, SkyModel <NEW_LINE> if is... | Sky model collection.
Parameters
----------
models : `SkyModel`, list of `SkyModel` or `Models`
Sky models | 6259905f7d847024c075da61 |
@HEADS.register_module <NEW_LINE> class FusedSemanticHead(nn.Module): <NEW_LINE> <INDENT> def __init__(self, num_ins, fusion_level, num_convs=4, in_channels=256, conv_out_channels=256, num_classes=183, ignore_label=255, loss_weight=0.2, conv_cfg=None, norm_cfg=None): <NEW_LINE> <INDENT> super(FusedSemanticHead, self)._... | Multi-level fused semantic segmentation head.
in_1 -> 1x1 conv ---
|
in_2 -> 1x1 conv -- |
||
in_3 -> 1x1 conv - ||
||| /-> 1x1 conv (mask prediction)
in_4 -> 1x1 conv -----> 3x3 convs (*4)
| \-> 1x1 conv (fe... | 6259905f7d847024c075da62 |
class Datasets: <NEW_LINE> <INDENT> train: LetterData <NEW_LINE> valid: LetterData <NEW_LINE> test: LetterData | データセット | 6259905f2ae34c7f260ac774 |
class BytesMinHash(BaseMinHash): <NEW_LINE> <INDENT> def __init__(self, shingles): <NEW_LINE> <INDENT> super(BytesMinHash, self).__init__(BytesShingle, shingles) | Documentation can be found in the inherited class BaseMinHash | 6259905f4e4d562566373a95 |
class BeautifulStoneSoup(BeautifulSoup): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> kwargs['features'] = 'xml' <NEW_LINE> warnings.warn( 'The BeautifulStoneSoup class is deprecated. Instead of using ' 'it, pass features="xml" into the BeautifulSoup constructor.') <NEW_LINE> super(Beaut... | Deprecated interface to an XML parser. | 6259905f9c8ee82313040cd1 |
class OverlapsBelowLookup(GISLookup): <NEW_LINE> <INDENT> lookup_name = 'overlaps_below' | The 'overlaps_below' operator returns true if A's bounding box overlaps or is below
B's bounding box. | 6259905f1b99ca400229007d |
class ConnectionState(Enum): <NEW_LINE> <INDENT> CONNECTING = 0 <NEW_LINE> OPEN = 1 <NEW_LINE> REMOTE_CLOSING = 2 <NEW_LINE> LOCAL_CLOSING = 3 <NEW_LINE> CLOSED = 4 <NEW_LINE> REJECTING = 5 | RFC 6455, Section 4 - Opening Handshake | 6259905f4f6381625f199fea |
class ProductViewSet(PaginatedViewSetMixin): <NEW_LINE> <INDENT> serializer_class = ProductSerializer <NEW_LINE> filter_class = ProductFilter <NEW_LINE> queryset = Product.objects.all() <NEW_LINE> permission_classes = (AdminWriteOnly, ) | Viewset for Product Details | 6259905f0c0af96317c578a6 |
class EntryRandom(RedirectView): <NEW_LINE> <INDENT> permanent = False <NEW_LINE> def get_redirect_url(self, **kwargs): <NEW_LINE> <INDENT> entry = Entry.published.all().order_by('?')[0] <NEW_LINE> return entry.get_absolute_url() | View for handling a random entry
simply do a redirection after the random selection. | 6259905f3eb6a72ae038bcee |
class TemplateBuilder(object): <NEW_LINE> <INDENT> def __init__(self, package_name, options): <NEW_LINE> <INDENT> self.package_name = package_name <NEW_LINE> self.options = vars(options) <NEW_LINE> self.templates = {} <NEW_LINE> self.directories = set() <NEW_LINE> <DEDENT> def add_template(self, template, target): <NEW... | A builder that handles the creation of directories for the registed
template files in addition to creating the output files by filling
in the templates with the values from options. | 6259905f8da39b475be04876 |
class DefaultsMixin(object): <NEW_LINE> <INDENT> if settings.DEBUG: <NEW_LINE> <INDENT> authentication_classes = ( authentication.BasicAuthentication, JSONWebTokenAuthentication,) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> authentication_classes = (JSONWebTokenAuthentication,) <NEW_LINE> <DEDENT> permission_classes ... | Default settings for view authentication, permissions,
filtering and pagination. | 6259905f76e4537e8c3f0c1b |
class JSONstr: <NEW_LINE> <INDENT> __slots__ = ['serialized_json'] <NEW_LINE> def __repr__(self): <NEW_LINE> <INDENT> return self.serialized_json <NEW_LINE> <DEDENT> def __init__(self, serialized_json: str): <NEW_LINE> <INDENT> assert isinstance(serialized_json, str) <NEW_LINE> self.serialized_json = serialized_json | JSONStr is a special type that encapsulates already serialized
json-chunks in json object-trees. `json_dumps` will insert the content
of a JSONStr-object literally, rather than serializing it as other
objects. | 6259905fd6c5a102081e37b2 |
class ServiceHealth(EntityHealth): <NEW_LINE> <INDENT> _attribute_map = { 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, 'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'}, 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, 'name': ... | Information about the health of a Service Fabric service.
:param aggregated_health_state: The HealthState representing the
aggregated health state of the entity computed by Health Manager.
The health evaluation of the entity reflects all events reported on the
entity and its children (if any).
The aggregation is d... | 6259905f097d151d1a2c26fe |
class merge_commits_args(object): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRING, 'path', None, None, ), (2, TType.STRING, 'ours', None, None, ), (3, TType.STRING, 'theirs', None, None, ), ) <NEW_LINE> def __init__(self, path=None, ours=None, theirs=None,): <NEW_LINE> <INDENT> self.path = path <NEW_LINE> se... | Attributes:
- path
- ours
- theirs | 6259905f38b623060ffaa397 |
class Slack(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> path = os.path.dirname(os.path.abspath(__file__)) <NEW_LINE> with open(path + "/../config", "r") as ymlfile: <NEW_LINE> <INDENT> config = yaml.load(ymlfile) <NEW_LINE> <DEDENT> try: <NEW_LINE> <INDENT> self.slack_url = config['slack']['url'] <NE... | Class for pushing realtime notifications to slack channel. | 6259905f0fa83653e46f6576 |
class SpeedsSensorDaysBefore(FeatureBase): <NEW_LINE> <INDENT> def __init__(self, mode, n_days_before=1): <NEW_LINE> <INDENT> name = 'SpeedsSensorDaysBefore' <NEW_LINE> self.n_days_before = n_days_before <NEW_LINE> super(SpeedsSensorDaysBefore, self).__init__( name=name, mode=mode) <NEW_LINE> <DEDENT> def extract_featu... | say for each street the avg speed
| KEY | KM | DATETIME_UTC_y_0 | speed_avg_sensor_day_i_before | speed_sd_sensor_day_i_before | speed_min_sensor_day_i_before | speed_max_sensor_day_i_before | n_vehicles_sensor_day_i_before | 6259905fd486a94d0ba2d657 |
class Timer: <NEW_LINE> <INDENT> def __init__(self, num_runs): <NEW_LINE> <INDENT> self.num_runs = num_runs <NEW_LINE> <DEDENT> def __call__(self, func): <NEW_LINE> <INDENT> def wrap(arg): <NEW_LINE> <INDENT> avg_time = 0 <NEW_LINE> for _ in range(self.num_runs): <NEW_LINE> <INDENT> start = time.time() <NEW_LINE> retur... | Класс с методом __call__(), являющийся декоратором
для замера времени выполнения функции | 6259905f460517430c432b9a |
class ZNode(NodePathWrapper): <NEW_LINE> <INDENT> def __init__(self,geomnode=None,magnification=1): <NEW_LINE> <INDENT> NodePathWrapper.__init__(self) <NEW_LINE> self.magnification = magnification <NEW_LINE> if geomnode is None: <NEW_LINE> <INDENT> cm = CardMaker('Node created by CardMaker') <NEW_LINE> cm.setFrame(-.3,... | A nodepath with an attached geomnode that can be automatically zoomed and
panned to by the viewport (a 'zoomable' node.) | 6259905f99cbb53fe6832571 |
class Stretch(Enum): <NEW_LINE> <INDENT> ULTRA_CONDENSED = pango.PANGO_STRETCH_ULTRA_CONDENSED <NEW_LINE> EXTRA_CONDENSED = pango.PANGO_STRETCH_EXTRA_CONDENSED <NEW_LINE> CONDENSED = pango.PANGO_STRETCH_CONDENSED <NEW_LINE> SEMI_CONDENSED = pango.PANGO_STRETCH_SEMI_CONDENSED <NEW_LINE> NORMAL = pango.PANGO_STRETCH_NORM... | An enumeration specifying the width of the font relative to other designs
within a family. | 6259905f009cb60464d02bc6 |
class TagTests(TestCase): <NEW_LINE> <INDENT> fixtures = [ 'tag', ] <NEW_LINE> def test_tag_list(self): <NEW_LINE> <INDENT> client = APIClient() <NEW_LINE> response = client.get('/api/tag/list/') <NEW_LINE> result = json.loads(response.content) <NEW_LINE> objects_count = 23 <NEW_LINE> first_uuid = '4a408eff-7f22-44df-a... | Test module for Tag model | 6259905f07f4c71912bb0acc |
class Report(object): <NEW_LINE> <INDENT> def __init__(self, report_id, exception_type, device_id, exception_symbols, os_version): <NEW_LINE> <INDENT> self.report_id = report_id; <NEW_LINE> self.exception_type = exception_type; <NEW_LINE> self.device_id = device_id; <NEW_LINE> self.exception_symbols = exception_symbols... | Report class used to encapsulate the row data in EXCEL | 6259905fac7a0e7691f73b73 |
class ComplaintsStatistics(Document): <NEW_LINE> <INDENT> meta = { 'db_alias': 'statistics', 'collection': 'complaintsstatistics', 'strict': False, } <NEW_LINE> statsType = IntField(required=True) <NEW_LINE> provinceCode = StringField(default=None) <NEW_LINE> cityCode = StringField(required=True) <NEW_LINE> countyCode ... | 评价统计 | 6259905ffff4ab517ebceeb6 |
class DefaultExchangeRuleTests(TestBase, StandardExchangeVerifier): <NEW_LINE> <INDENT> @SupportedBrokers(QPID, OPENAMQ) <NEW_LINE> @inlineCallbacks <NEW_LINE> def test_default_exchange(self): <NEW_LINE> <INDENT> yield self.queue_declare(queue="d") <NEW_LINE> yield self.assertPublishConsume(queue="d", routing_key="d") ... | The server MUST predeclare a direct exchange to act as the default exchange
for content Publish methods and for default queue bindings.
Client checks that the default exchange is active by specifying a queue
binding with no exchange name, and publishing a message with a suitable
routing key but without specifying the ... | 6259905f1f5feb6acb16427a |
@dataclass <NEW_LINE> class LeanSendsResponse(LeanScriptStep): <NEW_LINE> <INDENT> message: Dict <NEW_LINE> async def run(self, server: 'MockLeanServerProcess') -> None: <NEW_LINE> <INDENT> print(f"\nLean sends the following response:\n{self.message}") <NEW_LINE> server.send_message(self.message) | Simulate Lean's output behaviour | 6259905fe64d504609df9f16 |
class CbgppeerprevstateEnum(Enum): <NEW_LINE> <INDENT> none = 0 <NEW_LINE> idle = 1 <NEW_LINE> connect = 2 <NEW_LINE> active = 3 <NEW_LINE> opensent = 4 <NEW_LINE> openconfirm = 5 <NEW_LINE> established = 6 <NEW_LINE> @staticmethod <NEW_LINE> def _meta_info(): <NEW_LINE> <INDENT> from ydk.models.cisco_ios_xe._meta impo... | CbgppeerprevstateEnum
The BGP peer connection previous state.
.. data:: none = 0
.. data:: idle = 1
.. data:: connect = 2
.. data:: active = 3
.. data:: opensent = 4
.. data:: openconfirm = 5
.. data:: established = 6 | 6259905f3617ad0b5ee077dd |
class RepositoryViewSet(viewsets.ReadOnlyModelViewSet): <NEW_LINE> <INDENT> queryset = Repository.objects.all() <NEW_LINE> serializer_class = RepositorySerializer <NEW_LINE> filter_backends = (filters.SearchFilter, filters.OrderingFilter) <NEW_LINE> search_fields = ('name', 'project', 'url') <NEW_LINE> ordering_fields ... | Returns a list of all available repositories in Porchlight.
The `name`, `project`, and `url` fields can all be searched using
`?search=`. For example, `?search=porc` will match Porchlight.
Ordering can be changed based on `name`, `project`, and `url` using
`?ordering=`. For example, `?ordering=name` will order by nam... | 6259905fa79ad1619776b605 |
class Mouse(Turtle): <NEW_LINE> <INDENT> def __init__(self, position, heading, fill=green, **style): <NEW_LINE> <INDENT> Turtle.__init__(self, position, heading, fill=fill, **style) <NEW_LINE> self.radius = (self.position - self.origin).length() <NEW_LINE> self.theta = (self.m / self.radius) * 180 / pi <NEW_LINE> self.... | docstring for Mouse | 6259905fbe8e80087fbc0716 |
class AddTimeFeatures(MapTransformation): <NEW_LINE> <INDENT> @validated() <NEW_LINE> def __init__( self, start_field: str, target_field: str, output_field: str, time_features: List[TimeFeature], pred_length: int, ) -> None: <NEW_LINE> <INDENT> self.date_features = time_features <NEW_LINE> self.pred_length = pred_lengt... | Adds a set of time features.
If `is_train=True` the feature matrix has the same length as the `target` field.
If `is_train=False` the feature matrix has length len(target) + pred_length
Parameters
----------
start_field
Field with the start time stamp of the time series
target_field
Field with the array conta... | 6259905f8da39b475be04878 |
class Discovery(): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> self._config = config <NEW_LINE> self._thread = None <NEW_LINE> self._skills = {} <NEW_LINE> self._log = logging.getLogger('atlas.discovery') <NEW_LINE> self._client = DiscoveryClient(on_discovery=self.process) <NEW_LINE> <DEDENT> de... | Represents the discovery service used to keep track of registered skills.
| 6259905f4a966d76dd5f0584 |
class CompatibilityStrategy: <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> @abstractmethod <NEW_LINE> def check_compatibility(self): <NEW_LINE> <INDENT> raise NotImplementedError | Metaclass defining the compatibility check set of operations | 6259905f38b623060ffaa398 |
class RandomInverseModel(InverseModel): <NEW_LINE> <INDENT> name = 'Rnd' <NEW_LINE> desc = 'Random' <NEW_LINE> def infer_x(self, y_desired): <NEW_LINE> <INDENT> InverseModel.infer_x(y_desired) <NEW_LINE> if self.fmodel.size() == 0: <NEW_LINE> <INDENT> return self._random_x() <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT... | Random Inverse Model | 6259905f009cb60464d02bc7 |
class TestX265NoSAO(unittest.TestCase): <NEW_LINE> <INDENT> def test_x265_no_sao(self): <NEW_LINE> <INDENT> x265 = X265() <NEW_LINE> self._test_no_sao_normal_values(x265) <NEW_LINE> self._test_no_sao_abormal_values(x265) <NEW_LINE> <DEDENT> def _test_no_sao_normal_values(self, x265): <NEW_LINE> <INDENT> x265.no_sao = T... | Tests all No SAO option values for the x265 codec. | 6259905f3d592f4c4edbc56d |
class Camera(Structure): <NEW_LINE> <INDENT> _fields_ = [ ("mName", String), ("mPosition", Vector3D), ("mUp", Vector3D), ("mLookAt", Vector3D), ("mHorizontalFOV", c_float), ("mClipPlaneNear", c_float), ("mClipPlaneFar", c_float), ("mAspect", c_float), ] | See 'camera.h' for details. | 6259905fa219f33f346c7e97 |
class dN(): <NEW_LINE> <INDENT> def __init__(self, N): <NEW_LINE> <INDENT> self.N = N <NEW_LINE> <DEDENT> def roll(self): <NEW_LINE> <INDENT> return randint(1, self.N) | classdocs | 6259905f4f88993c371f1067 |
class add_doc(object): <NEW_LINE> <INDENT> def __init__(self, description): <NEW_LINE> <INDENT> self.doc = description <NEW_LINE> <DEDENT> def __call__(self, f): <NEW_LINE> <INDENT> f.__doc__ = self.doc <NEW_LINE> return f | Decorator to add a docstring to a function | 6259905fd7e4931a7ef3d6cd |
class ZMQReader: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> context = zmq.Context() <NEW_LINE> receiver = context.socket(zmq.PULL) <NEW_LINE> self._bind_addr = "tcp://127.0.0.1:{}".format(ZMQ_PULL_PORT) <NEW_LINE> receiver.bind(self._bind_addr) <NEW_LINE> logger.info("Biding ZMQ at {}".format(self._bin... | Used for reading data from input devices using the PyGame API. | 6259905f45492302aabfdb6b |
class Explosion(character.Character, object): <NEW_LINE> <INDENT> def __init__(self, pos, direction, game_map, texture="explosion.png"): <NEW_LINE> <INDENT> super(Explosion, self).__init__(pos, texture) <NEW_LINE> current_cell = self.get_current_cell(game_map) <NEW_LINE> if current_cell.occupied_by: <NEW_LINE> <INDENT... | Includes the explosions on the game. | 6259905fe5267d203ee6cf08 |
class StatsdPlugin(Plugin): <NEW_LINE> <INDENT> targets = [ Plugin.gauge('^statsd\.?(?P<server>[^\.]*)\.(?P<wtt>numStats)'), Plugin.gauge('^stats\.statsd\.?(?P<server>[^\.]*)\.(?P<wtt>processing_time)$'), Plugin.rate('^stats\.statsd\.?(?P<server>[^\.]*)\.(?P<wtt>[^\.]+)$'), Plugin.gauge('^stats\.statsd\.?(?P<server>[^\... | 'use this in combination with: derivative(statsd.*.udp_packet_receive_errors)',
assumes that if you use prefixStats, it's of the format statsd.<statsd_server> , adjust as needed. | 6259905fe64d504609df9f17 |
class InstrDataCursor(object): <NEW_LINE> <INDENT> text_template = 'x: %0.2f\ny: %0.2f' <NEW_LINE> x, y = 0.0, 0.0 <NEW_LINE> xoffset, yoffset = -20, 20 <NEW_LINE> text_template = 'x: %0.2f\ny: %0.2f' <NEW_LINE> def __init__(self, ax): <NEW_LINE> <INDENT> self.ax = ax <NEW_LINE> self.positions = [] <NEW_LINE> self.inte... | Allows to click on a displayed plot to determine the instrument curve
stop by closing the window
it returns two arrays: positons and corresponding intensity values | 6259905f3c8af77a43b68a8a |
class DS8KConnectionPool(connectionpool.HTTPSConnectionPool): <NEW_LINE> <INDENT> scheme = 'httpsds8k' <NEW_LINE> ConnectionCls = DS8KHTTPSConnection <NEW_LINE> def urlopen(self, method, url, **kwargs): <NEW_LINE> <INDENT> if url and url.startswith('httpsds8k://'): <NEW_LINE> <INDENT> url = 'https://' + url[12:] <NEW_L... | Extend the HTTPS Connection Pool to our own Certificate verification. | 6259905f2ae34c7f260ac779 |
class TestDefaults: <NEW_LINE> <INDENT> @pytest.mark.parametrize('config_class', [base(), production(), testing(), development()]) <NEW_LINE> def test_core_defaults(self, config_class, monkeypatch): <NEW_LINE> <INDENT> monkeypatch.setattr(os, "environ", {}) <NEW_LINE> instance = config_class() <NEW_LINE> assert len(ins... | Ensure that the config classes set their defaults properly. | 6259905f63b5f9789fe86805 |
class InteractionLJ(Interaction): <NEW_LINE> <INDENT> key = "lj" <NEW_LINE> def __init__(self, epsilon, sigma): <NEW_LINE> <INDENT> self.key = InteractionLJ.key <NEW_LINE> self.type = "Lennard-Jones" <NEW_LINE> self.epsilon = epsilon <NEW_LINE> self.sigma = sigma <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDEN... | Standard Lennard Jones potential (bonded or non-bonded)
U(r) = 4 epsilon [ (sigma/r)^12 - (sigma/r)^6 ] | 6259905f0c0af96317c578a8 |
class GenconfigCommand(command.Command): <NEW_LINE> <INDENT> def __init__(self, args): <NEW_LINE> <INDENT> self.args = args <NEW_LINE> init() <NEW_LINE> <DEDENT> def execute_command(self): <NEW_LINE> <INDENT> print(Back.GREEN + Fore.BLACK + "Scrapple Genconfig") <NEW_LINE> print(Back.RESET + Fore.RESET) <NEW_LINE> dire... | Defines the execution of :command: genconfig | 6259905f97e22403b383c59f |
class PhonemeTest(TestCase): <NEW_LINE> <INDENT> def test_get_consonant(self): <NEW_LINE> <INDENT> consonant = instance.get_consonant() <NEW_LINE> self.assertEqual(consonant, 'p') <NEW_LINE> <DEDENT> def test_get_vowel(self): <NEW_LINE> <INDENT> vowel = instance.get_vowel() <NEW_LINE> self.assertEqual(vowel, 'o') <NEW_... | phoneme tests | 6259905f45492302aabfdb6c |
class RandomHorizontalFlip(object): <NEW_LINE> <INDENT> def __call__(self, img, inv, flow): <NEW_LINE> <INDENT> if self.p < 0.5: <NEW_LINE> <INDENT> img = img.transpose(Image.FLIP_LEFT_RIGHT) <NEW_LINE> if inv is True: <NEW_LINE> <INDENT> img = ImageOps.invert(img) <NEW_LINE> <DEDENT> <DEDENT> return img <NEW_LINE> <D... | Horizontally flip the given PIL.Image randomly with a probability of 0.5. | 6259905f91f36d47f22319d8 |
class FrameProcessorPipeline(FrameProcessorPool): <NEW_LINE> <INDENT> def __init__(self, processorTypes): <NEW_LINE> <INDENT> FrameProcessorPool.__init__(self) <NEW_LINE> self.processors = [] <NEW_LINE> for processorType in processorTypes: <NEW_LINE> <INDENT> if issubclass(processorType, FrameProcessor): <NEW_LINE> <IN... | An ordered pipeline of FrameProcessor instances. | 6259905fa17c0f6771d5d6ed |
class dynamicObjs(object): <NEW_LINE> <INDENT> def __init__(self, params): <NEW_LINE> <INDENT> self.dckItems = [] <NEW_LINE> self.actItems = [] <NEW_LINE> <DEDENT> def addNewDock(self, dockUIObj, name, description='', icon=None): <NEW_LINE> <INDENT> dckItem = QtWidgets.QDockWidget(self) <NEW_LINE> dockUIObj.setupUi(dck... | classdocs | 6259905f4e4d562566373a9a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.