code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class AssumptionsContext(set): <NEW_LINE> <INDENT> def add(self, *assumptions): <NEW_LINE> <INDENT> for a in assumptions: <NEW_LINE> <INDENT> super().add(a) <NEW_LINE> <DEDENT> <DEDENT> def _sympystr(self, printer): <NEW_LINE> <INDENT> if not self: <NEW_LINE> <INDENT> return "%s()" % self.__class__.__name__ <NEW_LINE> ...
Set containing default assumptions which are applied to the ``ask()`` function. Explanation =========== This is used to represent global assumptions, but you can also use this class to create your own local assumptions contexts. It is basically a thin wrapper to Python's set, so see its documentation for advanced usa...
62598f4c0a366e3fb87dbd5d
class RateOfChangeTransformer(ScalingTransformer): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(RateOfChangeTransformer, self).__init__(**kwargs) <NEW_LINE> self.cache = {} <NEW_LINE> self.scale = self.scale or '1' <NEW_LINE> <DEDENT> def handle_sample(self, context, s): <NEW_LINE> <INDEN...
Transformer based on the rate of change of a sample volume. For example taking the current and previous volumes of a cumulative sample and producing a gauge value based on the proportion of some maximum used.
62598f4c21a7993f00c65305
class QuarterEnd(QuarterOffset): <NEW_LINE> <INDENT> _outputName = 'QuarterEnd' <NEW_LINE> _default_startingMonth = 3 <NEW_LINE> _prefix = 'Q' <NEW_LINE> @apply_wraps <NEW_LINE> def apply(self, other): <NEW_LINE> <INDENT> n = self.n <NEW_LINE> other = datetime(other.year, other.month, other.day, other.hour, other.minut...
DateOffset increments between business Quarter dates startingMonth = 1 corresponds to dates like 1/31/2007, 4/30/2007, ... startingMonth = 2 corresponds to dates like 2/28/2007, 5/31/2007, ... startingMonth = 3 corresponds to dates like 3/31/2007, 6/30/2007, ...
62598f4c15fb5d323ce7e0b9
class Config: <NEW_LINE> <INDENT> SECRET_KEY = "TQ6uZxn+SLqiLgVimX838/VplIsLbEP5jV7vvZ+Ohqw=" <NEW_LINE> SQLALCHEMY_DATABASE_URI = "mysql://root:mysql@localhost/ihome" <NEW_LINE> SQLALCHEMY_TRACK_MODIFICATIONS = True <NEW_LINE> REDIS_HOST = "127.0.0.1" <NEW_LINE> REDIS_PORT = 6379 <NEW_LINE> SESSION_TYPE = "redis" <NEW...
基本配置参数
62598f4c627d3e7fe0e0621e
class ProtocolErrorRequest(LaunchpadBrowserRequest): <NEW_LINE> <INDENT> def traverse(self, object): <NEW_LINE> <INDENT> return None
An HTTP request that happened to result in an HTTP error.
62598f4c0a366e3fb87dbd5f
class Line(ChartObject): <NEW_LINE> <INDENT> def __init__(self, values, index=None, title=None, xlabel=None, ylabel=None, legend=False, xscale="linear", yscale="linear", width=800, height=600, tools=True, filename=False, server=False, notebook=False, facet=False, xgrid=True, ygrid=True): <NEW_LINE> <INDENT> self.values...
This is the Line class and it is in charge of plotting Line charts in an easy and intuitive way. Essentially, we provide a way to ingest the data, make the proper calculations and push the references into a source object. We additionally make calculations for the ranges. And finally add the needed lines taking the ref...
62598f4c15fb5d323ce7e0bb
class SimpleSharingViewlet(ViewletBase): <NEW_LINE> <INDENT> index = ViewPageTemplateFile('sharing.pt')
Viewlet to display the simple sharing form
62598f4c507cdc57c63a4131
class UnlockDevice(Command): <NEW_LINE> <INDENT> NUMBER = 0x106 <NEW_LINE> key = stringfield(8, start=16) <NEW_LINE> def __init__(self, key='-1\0\0\0\0\0\0'): <NEW_LINE> <INDENT> Command.__init__(self, 24) <NEW_LINE> self.number = UnlockDevice.NUMBER <NEW_LINE> self.type = 0x01 <NEW_LINE> self.length = 8 <NEW_LINE> sel...
Unlock the device
62598f4c3cc13d1c6d464b05
class PeerCredLineServer(basic.LineReceiver): <NEW_LINE> <INDENT> delimiter = b'\n' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.uid = None <NEW_LINE> self.gid = None <NEW_LINE> self.username = None <NEW_LINE> <DEDENT> def connectionMade(self): <NEW_LINE> <INDENT> _LOGGER.info('connection made') <NEW_LINE> <...
Line based GSSAPI server.
62598f4c627d3e7fe0e06220
class CorrelationViewForm(forms.Form): <NEW_LINE> <INDENT> assignment_name = forms.ModelChoiceField(required=True, queryset=AssignmentName.objects, cache_choices=True)
Form to choose Assignment Name
62598f4c462c4b4f79dbad93
class Car: <NEW_LINE> <INDENT> def __init__(self, fuel=0, name=""): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.fuel = fuel <NEW_LINE> self.odometer = 0 <NEW_LINE> <DEDENT> def add_fuel(self, amount): <NEW_LINE> <INDENT> self.fuel += amount <NEW_LINE> <DEDENT> def drive(self, distance): <NEW_LINE> <INDENT> if ...
Represent a Car object.
62598f4c15fb5d323ce7e0bd
class OptionParser(object): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> @abc.abstractmethod <NEW_LINE> def load(self, arguments): <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def dump(self): <NEW_LINE> <INDENT> return [] <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE...
OptionParser is an abstract class and defines the interfaces. All of option parser need inherit this class.
62598f4c627d3e7fe0e06222
class PackedAncestryMap(AncestryMap): <NEW_LINE> <INDENT> def __init__(self, prefix): <NEW_LINE> <INDENT> super().__init__(prefix) <NEW_LINE> super()._get_snp_dataframe() <NEW_LINE> super()._get_inds() <NEW_LINE> self._get_genotype_matrix() <NEW_LINE> <DEDENT> def _get_genotype_matrix(self): <NEW_LINE> <INDENT> rlen = ...
Class for packed ancestry map eigenstrat format. The packed format's geno is binary so it requires a couple steps processing before being loaded into a numpy array. We modify some code from https://github.com/mathii/pyEigenstrat Arguments --------- prefix : str prefix of path to data files
62598f4c21a7993f00c6530f
class WorkflowUnknownError(LambdaBuilderError): <NEW_LINE> <INDENT> MESSAGE = "{workflow_name}:{action_name} - {reason}"
Raised when the build ran into an unexpected error
62598f4c3cc13d1c6d464b0d
class RSI(technical.EventBasedFilter): <NEW_LINE> <INDENT> def __init__(self, dataSeries, period, maxLen=None): <NEW_LINE> <INDENT> super(RSI, self).__init__(dataSeries, RSIEventWindow(period), maxLen)
Relative Strength Index filter as described in http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:relative_strength_index_rsi. :param dataSeries: The DataSeries instance being filtered. :type dataSeries: :class:`pyalgotrade.dataseries.DataSeries`. :param period: The period. Note that if period...
62598f4c56b00c62f0fb1c52
class CreateProbe(ProbeCommand): <NEW_LINE> <INDENT> log = logging.getLogger(__name__ + '.CreateProbe') <NEW_LINE> def get_parser(self, prog_name): <NEW_LINE> <INDENT> parser = super(CreateProbe, self).get_parser(prog_name) <NEW_LINE> parser.add_argument( 'id', metavar='network_id', help=_('ID of network to probe')) <N...
Create probe port and interface, then plug it in.
62598f4c15fb5d323ce7e0c5
class QuoteMove(Wizard): <NEW_LINE> <INDENT> __name__ = 'tmi.move.quote' <NEW_LINE> start_state = 'default' <NEW_LINE> default = StateView('tmi.move.quote.default', 'tmi.tmi_move_quote_default_view_form', [ Button('Cancel', 'end', 'tryton-cancel'), Button('Ok', 'cancel', 'tryton-ok', default=True), ]) <NEW_LINE> cancel...
Tmi Quote Move
62598f4cd164cc6175820319
class Team( object ): <NEW_LINE> <INDENT> def __init__( self, name, players ): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.players = players <NEW_LINE> <DEDENT> def __repr__( self ): <NEW_LINE> <INDENT> return 'Team(%s)' % self.name <NEW_LINE> <DEDENT> def __str__( self ): <NEW_LINE> <INDENT> return self.name ...
A team.
62598f4c462c4b4f79dbad9d
class FilterRoutingRegion(Region): <NEW_LINE> <INDENT> def __init__(self, keyspace_routes, filter_routing_tag="filter_routing", index_field="index"): <NEW_LINE> <INDENT> self.keyspace_routes = keyspace_routes <NEW_LINE> self.filter_routing_tag = filter_routing_tag <NEW_LINE> self.index_field = index_field <NEW_LINE> <D...
Region of memory which maps routing entries to filter indices. Attributes ---------- keyspace_routes : [(BitField, int), ...] Pairs of BitFields (keyspaces) to the index of the filter that packets matching the entry should be routed.
62598f4cff9c53063f5199ea
class IFooter(IPortletManager): <NEW_LINE> <INDENT> pass
Portlet manager that is rendered in page footer Register a portlet for IFooter if it is applicable to page footer.
62598f4c15fb5d323ce7e0c9
class Concatenate(object): <NEW_LINE> <INDENT> def __init__(self, sep=','): <NEW_LINE> <INDENT> self.sep = sep <NEW_LINE> self.ans = '' <NEW_LINE> <DEDENT> def step(self, value): <NEW_LINE> <INDENT> if value is not None: <NEW_LINE> <INDENT> self.ans += value + self.sep <NEW_LINE> <DEDENT> <DEDENT> def finalize(self): <...
String concatenation aggregator for sqlite
62598f4cd164cc617582031d
class DevelopmentConfig(Config): <NEW_LINE> <INDENT> DEBUG = True <NEW_LINE> SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL') or 'postgresql://localhost/iosdb' <NEW_LINE> SECRET_KEY = 1234
Configurations for Development.
62598f4c3cc13d1c6d464b13
class CribbagePlayer(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def discard(self, is_dealer, hand, player_score, opponent_score): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def play_card(self, is_dealer, hand, played_cards, is_go, linear_play, ...
Abstract base class for an object that plays a game of cribbage.
62598f4c56b00c62f0fb1c58
class OneVsAllClassification(object): <NEW_LINE> <INDENT> def __init__(self, classifier_constructor, provide_likelihood=False): <NEW_LINE> <INDENT> self._classifier_constructor = classifier_constructor <NEW_LINE> self._label_classifiers = None <NEW_LINE> self._label_values = None <NEW_LINE> self._provide_likelihood = p...
Give a classifier that is ONLY able to predict how likely a binary classification is, predict which of N classes each element is in. Good example is the LogisticRegression (or LogisticRegressionTF) classifier. Parameters -------- classifier_constructor Function that, when called, returns a new instance of a learn...
62598f4ceab8aa0e5d30b119
class Castle: <NEW_LINE> <INDENT> (STATE_STANDING, STATE_DESTROYED, STATE_EXPLODING) = range(3) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> global sprites <NEW_LINE> self.img_undamaged = sprites.subsurface(0, 15, 16, 16) <NEW_LINE> self.img_destroyed = sprites.subsurface(16, 15, 16, 16) <NEW_LINE> self.rect = py...
Player's castle/fortress
62598f4dd164cc6175820323
class UserProfile(AbstractBaseUser, PermissionsMixin): <NEW_LINE> <INDENT> email = models.EmailField(max_length=255, unique=True) <NEW_LINE> name = models.CharField(max_length=255) <NEW_LINE> is_active = models.BooleanField(default=True) <NEW_LINE> is_staff = models.BooleanField(default=False) <NEW_LINE> objects = User...
Represents a custom user profile inside our system. 018
62598f4deab8aa0e5d30b11f
class HSplit(HVLayout): <NEW_LINE> <INDENT> _DEFAULT_ORIENTATION = 'h' <NEW_LINE> _DEFAULT_MODE = 'split'
Horizontal layout that initially distributes the available space corresponding to the widget's flex values, and has draggable splitters. By default, this layout has a slightly larger spacing between the widgets. (I.e. an HVLayout with orientation 'h' and mode 'split'.)
62598f4dff9c53063f5199f4
class GophishClient(object): <NEW_LINE> <INDENT> def __init__(self, api_key, host=DEFAULT_URL, **kwargs): <NEW_LINE> <INDENT> self.api_key = api_key <NEW_LINE> if host.endswith('/'): <NEW_LINE> <INDENT> self.host = host <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self.host = host + '/' <NEW_LINE> <DEDENT> self._clien...
A standard HTTP REST client used by Gophish
62598f4d15fb5d323ce7e0d3
class Gt(Operator): <NEW_LINE> <INDENT> _precedence = 9 <NEW_LINE> def __init__(self, left, right, *args, **kwargs): <NEW_LINE> <INDENT> super(Gt, self).__init__(*args, **kwargs) <NEW_LINE> self.left = left <NEW_LINE> self.right = right <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> string = self._enclose(s...
The `>` expression.
62598f4d21a7993f00c65321
class ListOwners(ConsoleTask): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def register_options(cls, register): <NEW_LINE> <INDENT> super(ListOwners, cls).register_options(register) <NEW_LINE> register('--output-format', default='text', choices=['text', 'json'], help='Output format of results.') <NEW_LINE> <DEDENT> @cl...
Print targets that own a source file. $ pants targets -- path/to/my/source.java path/to/my:target1 another/path:target2
62598f4d462c4b4f79dbadad
class LinuxBridge(Switch): <NEW_LINE> <INDENT> def __init__(self, name, **kwargs): <NEW_LINE> <INDENT> Switch.__init__(self, name, **kwargs) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def setup(): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def start(self, controllers): <NEW_LINE> <INDENT> brctl = '/sbin/brctl' <NEW...
The Linux Bridge for Mininet. Much simpler than the OVSKernelSwitch and all its complex machinary.
62598f4d21a7993f00c65323
@pydantic.dataclasses.dataclass( frozen=True, config=type( 'Config', (), dict( arbitrary_types_allowed=True, ), ), ) <NEW_LINE> class CesionL0: <NEW_LINE> <INDENT> DATETIME_FIELDS_TZ: ClassVar[tz_utils.PytzTimezone] = SII_OFFICIAL_TZ <NEW_LINE> dte_key: dte_data_models.DteNaturalKey <NEW_LINE> seq: Optional[int] <NEW_L...
Data of a "cesión" (level 0). Its fields are enough to uniquely identify a "cesión" but nothing more. The class instances are immutable.
62598f4deab8aa0e5d30b125
class In(Operator): <NEW_LINE> <INDENT> _precedence = 8 <NEW_LINE> def __init__(self, left, right, *args, **kwargs): <NEW_LINE> <INDENT> super(In, self).__init__(*args, **kwargs) <NEW_LINE> self.left = left <NEW_LINE> self.right = right <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> string = self._enclose(s...
The `in` expression.
62598f4dbf627c535bcb0829
class PopupMessage(Dialog): <NEW_LINE> <INDENT> def __init__(self, text="", window=None, batch=None, group=None, theme=None, on_escape=None): <NEW_LINE> <INDENT> def on_ok(dialog=None): <NEW_LINE> <INDENT> if on_escape is not None: <NEW_LINE> <INDENT> on_escape(self) <NEW_LINE> <DEDENT> self.teardown() <NEW_LINE> <DEDE...
A simple fire-and-forget dialog.
62598f4d56b00c62f0fb1c66
class MyText(Text): <NEW_LINE> <INDENT> def draw(self, context): <NEW_LINE> <INDENT> Text.draw(self, context) <NEW_LINE> cr = context.cairo <NEW_LINE> w, h = text_extents(cr, self.text, multiline=self.multiline) <NEW_LINE> cr.rectangle(0, 0, w, h) <NEW_LINE> cr.set_source_rgba(.3, .3, 1., .6) <NEW_LINE> cr.stroke()
Text with experimental connection protocol.
62598f4d925a0f43d25e73e2
class Graph: <NEW_LINE> <INDENT> def __init__(self, edges=None, nodes=None): <NEW_LINE> <INDENT> self.nodes: List[int] = nodes if nodes is not None else [] <NEW_LINE> self.edges: List[Tuple[int, int]] = edges if edges is not None else [] <NEW_LINE> self.edges = list(map(tuple, map(sorted, self.edges))) <NEW_LINE> <DEDE...
Simple Undirected Graph Class
62598f4d5166f23b2e24278f
class Facter: <NEW_LINE> <INDENT> _facts = {} <NEW_LINE> __resolvers = {} <NEW_LINE> @staticmethod <NEW_LINE> def get(enumvar): <NEW_LINE> <INDENT> if enumvar in Facter._facts: <NEW_LINE> <INDENT> return Facter._facts[enumvar] <NEW_LINE> <DEDENT> elif enumvar in Facter.__resolvers: <NEW_LINE> <INDENT> resolved = Facter...
A nano version of Puppet's Facter
62598f4d56b00c62f0fb1c6a
class ItemCell(PropertyAsCellMapper): <NEW_LINE> <INDENT> def __init__(self,key): <NEW_LINE> <INDENT> self.subject = key <NEW_LINE> <DEDENT> def extract(self,ob): <NEW_LINE> <INDENT> return ob[self.subject] <NEW_LINE> <DEDENT> def _set(self,ob,value): <NEW_LINE> <INDENT> ob[self.subject] = value
Treat mapping key as a cell mapper
62598f4dd164cc6175820331
class BJ_Deck(Cards.Deck): <NEW_LINE> <INDENT> def populate(self): <NEW_LINE> <INDENT> for suit in BJ_Card.SUITS: <NEW_LINE> <INDENT> for rank in BJ_Card.RANKS: <NEW_LINE> <INDENT> self.cards.append(BJ_Card(rank, suit))
Колода для игры в БлекДжек
62598f4dbf627c535bcb082f
class PersonsFilmView(APIView): <NEW_LINE> <INDENT> def __get_object(self, film_id, cleaned_data): <NEW_LINE> <INDENT> filter = { 'film': film_id, } <NEW_LINE> if cleaned_data['type'] and cleaned_data['type'] != 'all': <NEW_LINE> <INDENT> filter.update({'p_type': dict(APP_FILM_PERSON_TYPES_OUR)[cleaned_data['type']]}) ...
Returns all persons by film
62598f4d21a7993f00c6532d
class BertForMultipleChoice(BertPreTrainedModel): <NEW_LINE> <INDENT> def __init__(self, config, num_choices): <NEW_LINE> <INDENT> super(BertForMultipleChoice, self).__init__(config) <NEW_LINE> self.num_choices = num_choices <NEW_LINE> self.bert = BertModel(config) <NEW_LINE> self.dropout = nn.Dropout(config.hidden_dro...
BERT model for multiple choice tasks. This module is composed of the BERT model with a linear layer on top of the pooled output. Params: `config`: a BertConfig class instance with the configuration to build a new model. `num_choices`: the number of classes for the classifier. Default = 2. Inputs: `input_i...
62598f4d507cdc57c63a4157
class SerializeMainLoop(SimpleExtension): <NEW_LINE> <INDENT> def __init__(self, path, save_separately=None, **kwargs): <NEW_LINE> <INDENT> kwargs.setdefault("after_training", True) <NEW_LINE> super(SerializeMainLoop, self).__init__(**kwargs) <NEW_LINE> self.path = path <NEW_LINE> self.save_separately = save_separately...
Saves a pickled version of the main loop to the disk. The pickled main loop can be later reloaded and training can be resumed. Makes a `SAVED_TO` record in the log with the serialization destination in the case of success and ``None`` in the case of failure. Parameters ---------- path : str The destination path ...
62598f4dbf627c535bcb0833
class ActivityRule(Rule): <NEW_LINE> <INDENT> def run(self, mix, boundaries): <NEW_LINE> <INDENT> tracks = Rule.getTracks(mix, boundaries) <NEW_LINE> noiseThreshold = 0.1 <NEW_LINE> silenceRatio = 0.1 <NEW_LINE> masterSignal = Signal([], times=[]) <NEW_LINE> for track in tracks: <NEW_LINE> <INDENT> postFXSignal = track...
some tracks contain empty segments (such as only vocal tracks). Make sure that those segments are actually overlaped with sound
62598f4d462c4b4f79dbadb9
class Solution2: <NEW_LINE> <INDENT> def get_size(self, head: ListNode) -> int: <NEW_LINE> <INDENT> counter = 0 <NEW_LINE> while head: <NEW_LINE> <INDENT> counter += 1 <NEW_LINE> head = head.next <NEW_LINE> <DEDENT> return counter <NEW_LINE> <DEDENT> def split(self, head: ListNode, size: int) -> ListNode or None: <NEW_...
Algorithm: Bottom Up Merge Sort 1) Start with splitting the list into sublists of size 1. Each adjacent pair of sublists of size 1 is merged in sorted order. After the first iteration, we get the sorted lists of size 2. A similar process is repeated for a sublist of size 2. In this way, we iteratively spl...
62598f4d15fb5d323ce7e0e3
class SpeedElixir(Elixir): <NEW_LINE> <INDENT> pass
Potion that temporarily boosts speed
62598f4deab8aa0e5d30b131
class MergeSortTest(SortTestCase): <NEW_LINE> <INDENT> def test_sort(self): <NEW_LINE> <INDENT> self.collection = MergeSort(self.collection) <NEW_LINE> self.collection.sort() <NEW_LINE> self.assertEqual(self.collection.items, range(25)) <NEW_LINE> self.assertEqual(self.collection.is_sorted(), True)
Tests the merge sort.
62598f4d0a366e3fb87dbd89
class Drive: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.service = self.connect() <NEW_LINE> self.PLAYLISTS_FOLDER_ID = self.get_id_by_name(PLAYLISTS_FOLDER_NAME) <NEW_LINE> <DEDENT> def connect(self): <NEW_LINE> <INDENT> store = file.Storage('token.json') <NEW_LINE> creds = store.get() <NEW_LINE> ...
This the class which provides the interface to handle the required operetions with the Google Drive Api. Attributes: service: The Drive API instance PLAYLISTS_FOLDER_ID (str): The Drive ID of the folder where the playlist are stored Methods: __init__: constructor, will dinitialize Drive service and ge...
62598f4d5166f23b2e242799
class GameLogic: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.game_cap = None <NEW_LINE> self.questions = [] <NEW_LINE> QuestionSelectionGui(self.create_question_list) <NEW_LINE> <DEDENT> def create_question_list(self, questions_loc, file_name, game_cap): <NEW_LINE> <INDENT> if not file_name: <NEW_L...
Runs the logic of the game: enables to choose the questions file, then play and then shows the questions asked along with their correct answers.
62598f4d711fe17d825dfab5
class DomesticMelonOrder(AbstractMelonOrder): <NEW_LINE> <INDENT> tax = 0.08 <NEW_LINE> order_type = "domestic"
A domestic (in the US) melon order.
62598f4d15fb5d323ce7e0e7
class Controller(object): <NEW_LINE> <INDENT> def index(self, req): <NEW_LINE> <INDENT> def build_version_object(version, path, status): <NEW_LINE> <INDENT> return { 'id': 'v%s' % version, 'status': status, 'links': [ { 'rel': 'self', 'href': '%s/%s/' % (req.host_url, path), }, ], } <NEW_LINE> <DEDENT> version_objs = [...
A wsgi controller that reports which API versions are supported.
62598f4dd164cc617582033b
class ConfuciusModel(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> abstract = True <NEW_LINE> app_label = 'confucius'
Base class for models which belong to confucius. Used mainly to avoid adding a Meta class with the right app_label for each model.
62598f4d5166f23b2e24279b
class AuditCaseCategoryRelation(object): <NEW_LINE> <INDENT> swagger_types = { 'primary_category_id': 'str', 'primary_category_name': 'str', 'sub_category_list': 'list[AuditCaseSubCategory]' } <NEW_LINE> attribute_map = { 'primary_category_id': 'primary_category_id', 'primary_category_name': 'primary_category_name', 's...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f4d21a7993f00c65335
class ProcessMedia(task.Task): <NEW_LINE> <INDENT> def run(self, media_id, feed_url): <NEW_LINE> <INDENT> entry = MediaEntry.query.get(media_id) <NEW_LINE> try: <NEW_LINE> <INDENT> entry.state = u'processing' <NEW_LINE> entry.save() <NEW_LINE> _log.debug('Processing {0}'.format(entry)) <NEW_LINE> proc_state = Processin...
Pass this entry off for processing.
62598f4dff9c53063f519a0e
class TestPerson(unittest.TestCase): <NEW_LINE> <INDENT> def test_fellow_inherits_person(self): <NEW_LINE> <INDENT> fellow = Fellow("ken", "N") <NEW_LINE> self.assertIsInstance(fellow, Person) <NEW_LINE> <DEDENT> def test_staff_inherits_person(self): <NEW_LINE> <INDENT> staff = Staff("jackson") <NEW_LINE> self.assertI...
test Room class
62598f4d21a7993f00c65339
class SBS_CMD_BQ_CC_AND_ADC(DecoratedEnum): <NEW_LINE> <INDENT> RefreshCounter = 0x000 <NEW_LINE> Status = 0x008 <NEW_LINE> CurrentCC = 0x010 <NEW_LINE> CellVoltage0 = 0x020 <NEW_LINE> CellVoltage1 = 0x030 <NEW_LINE> CellVoltage2 = 0x040 <NEW_LINE> CellVoltage3 = 0x050 <NEW_LINE> PACKVoltage = 0x060...
OutputCCnADC sub-command fields used in BQ40 family SBS chips
62598f4eeab8aa0e5d30b13b
class ModulePermission(BasePermission): <NEW_LINE> <INDENT> perms_map = { 'GET': ['%(app_label)s.view_%(model_name)s'], 'OPTIONS': ['%(app_label)s.view_%(model_name)s'], 'HEAD': ['%(app_label)s.view_%(model_name)s'], 'POST': ['%(app_label)s.view_%(model_name)s', '%(app_label)s.add_%(model_name)s'], 'PUT': ['%(app_label...
Permission object to check the module's permissions
62598f4e5166f23b2e2427a1
class TwoLayerNet(object): <NEW_LINE> <INDENT> def __init__(self, input_dim=3*32*32, hidden_dim=100, num_classes=10, weight_scale=1e-3, reg=0.0): <NEW_LINE> <INDENT> self.params = {} <NEW_LINE> self.reg = reg <NEW_LINE> D = input_dim <NEW_LINE> H = hidden_dim <NEW_LINE> C = num_classes <NEW_LINE> self.params['W1'] = we...
A two-layer fully-connected neural network with ReLU nonlinearity and softmax loss that uses a modular layer design. We assume an input dimension of D, a hidden dimension of H, and perform classification over C classes. The architecure should be affine - relu - affine - softmax. Note that this class does not implemen...
62598f4e711fe17d825dfabd
class PolygonVisual(BaseVisual): <NEW_LINE> <INDENT> _default_color = (.5, .5, .5, 1.) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super(PolygonVisual, self).__init__() <NEW_LINE> self.set_shader('polygon') <NEW_LINE> self.set_primitive_type('line_loop') <NEW_LINE> self.data_range = Range(NDC) <NEW_LINE> self.tr...
Polygon.
62598f4eeab8aa0e5d30b13d
class max(FloatingReduction): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> @ngjit <NEW_LINE> def _append(x, y, agg, field): <NEW_LINE> <INDENT> if np.isnan(agg[y, x]): <NEW_LINE> <INDENT> agg[y, x] = field <NEW_LINE> <DEDENT> elif agg[y, x] < field: <NEW_LINE> <INDENT> agg[y, x] = field <NEW_LINE> <DEDENT> <DEDENT> @st...
Maximum value of all elements in ``column``. Parameters ---------- column : str Name of the column to aggregate over. Column data type must be numeric. ``NaN`` values in the column are skipped.
62598f4e0a366e3fb87dbd96
class DataExportConfig(AppConfig): <NEW_LINE> <INDENT> name = "data_export"
Class for data_export configuration
62598f4e507cdc57c63a4167
class Solution: <NEW_LINE> <INDENT> def letterCasePermutation(self, S): <NEW_LINE> <INDENT> out = [] <NEW_LINE> self.helper(S, 0, out) <NEW_LINE> <DEDENT> def helper(self, S, i, out): <NEW_LINE> <INDENT> if i >= len(S): <NEW_LINE> <INDENT> out.append(S) <NEW_LINE> return <NEW_LINE> <DEDENT> lower, upper = list(S), list...
@param S: a string @return: return a list of strings
62598f4ebf627c535bcb0844
class vizinhos_args(object): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.I32, 'id', None, None, ), ) <NEW_LINE> def __init__(self, id=None,): <NEW_LINE> <INDENT> self.id = id <NEW_LINE> <DEDENT> def read(self, iprot): <NEW_LINE> <INDENT> if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.C...
Attributes: - id
62598f4e21a7993f00c65341
class NummerAanduidingObject(AdresBaseClass, ObjectMixin, Object): <NEW_LINE> <INDENT> indicatie_hoofdadres = models.CharField(max_length=1, choices=JaNee.choices, help_text='Indicatie of de NUMMERAANDUIDING een hoofdadres is van het gerelateerde VERBLIJFSOBJECT, ' 'STANDPLAATS of LIGPLAATS' ) <NEW_LINE> identificatiec...
De aan het RSGB ontleende gegevens van een NUMMERAANDUIDING die in het RGBZ gebruikt worden bij deze specialisatie van OBJECT. Zie voor de specificaties van deze gegevens het RSGB.
62598f4e5166f23b2e2427a9
class PhysicalObject(SpatialObject): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(PhysicalObject, self).__init__() <NEW_LINE> self.height = IntervalCell() <NEW_LINE> self.width = IntervalCell()
Represents objects that occupy space
62598f4eeab8aa0e5d30b143
class ImbalancedDatasetSampler(torch.utils.data.sampler.Sampler): <NEW_LINE> <INDENT> def __init__(self, dataset, indices=None, num_samples=None): <NEW_LINE> <INDENT> self.indices = list(range(len(dataset))) if indices is None else indices <NEW_LINE> self.num_samples = len(self.indices) if num_sam...
Samples elements randomly from a given list of indices for imbalanced dataset Arguments: indices (list, optional): a list of indices num_samples (int, optional): number of samples to draw
62598f4e15fb5d323ce7e0f7
class TestSchemaApi: <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> self.app = Flask(__name__) <NEW_LINE> self.hypermedia = HyperMedia() <NEW_LINE> self.hypermedia.register_schema_api(self.app) <NEW_LINE> self.hypermedia.load_schema = Mock() <NEW_LINE> self.hypermedia.get_all_schemas = Mock() <NEW_LINE> self....
Tests for SchemaApi
62598f4e5166f23b2e2427ab
class OBJECT_OT_Botao_Cancel(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "import.sound_animation_botao_cancel" <NEW_LINE> bl_label = "CANCEL" <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> context.scene.imp_sound_to_anim.cancel_button_hit=True <NEW_LINE> return{'FINISHED'} <NEW_LINE> <DEDENT> def i...
Cancel Actual Operation
62598f4eff9c53063f519a1e
class FixtureLookupError(LookupError): <NEW_LINE> <INDENT> def __init__(self, argname, request, msg=None): <NEW_LINE> <INDENT> self.argname = argname <NEW_LINE> self.request = request <NEW_LINE> self.fixturestack = request._get_fixturestack() <NEW_LINE> self.msg = msg <NEW_LINE> <DEDENT> def formatrepr(self): <NEW_LINE...
could not return a requested Fixture (missing or invalid).
62598f4e507cdc57c63a4171
class ShardStateTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> os.environ["APPLICATION_ID"] = "my-app" <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> del os.environ["APPLICATION_ID"] <NEW_LINE> <DEDENT> def testAccessors(self): <NEW_LINE> <INDENT> shard = model.ShardState...
Tests model.ShardState.
62598f4e711fe17d825dfacd
class VehicleFuelEfficiency(EObject, metaclass=MetaEClass): <NEW_LINE> <INDENT> vehicleType = EAttribute(eType=VehicleTypeEnum, derived=False, changeable=True) <NEW_LINE> fuel = EAttribute(eType=MobilityFuelTypeEnum, derived=False, changeable=True) <NEW_LINE> efficiency = EAttribute(eType=EDouble, derived=False, change...
Information about vehicles, fuels and efficiency, used in MobilityFuelInformation
62598f4e462c4b4f79dbadd7
class ClassroomData(object): <NEW_LINE> <INDENT> def classroom_id(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def week(self, week_type): <NEW_LINE> <INDENT> raise NotImplementedError()
Data for classroom
62598f4eff9c53063f519a24
class ContinuousRule(Rule): <NEW_LINE> <INDENT> def __init__(self, attr_name, greater, value, inclusive=False): <NEW_LINE> <INDENT> self.attr_name = attr_name <NEW_LINE> self.greater = greater <NEW_LINE> self.value = value <NEW_LINE> self.inclusive = inclusive <NEW_LINE> <DEDENT> def merge_with(self, rule): <NEW_LINE> ...
Continuous rule class for handling numeric rules. Parameters ---------- attr_name : str greater : bool Should indicate whether the variable must be greater than the value. value : int inclusive : bool, optional Should the variable range include the value or not (LT <> LTE | GT <> GTE). Default is False. E...
62598f4ebf627c535bcb0854
class Question(Post): <NEW_LINE> <INDENT> accepted_answer_key = ndb.KeyProperty(kind=Answer) <NEW_LINE> @classmethod <NEW_LINE> def can_be_deleted(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def all(self): <NEW_LINE> <INDENT> return self.query().order(-self.timestamp) <NEW_LINE> <...
A User asks a Question
62598f4e0a366e3fb87dbda8
class DecodeCache( tfx_namedtuple.namedtuple('DecodeCache', ['dataset_key', 'cache_key', 'coder', 'label']), nodes.OperationDef): <NEW_LINE> <INDENT> __slots__ = () <NEW_LINE> def get_field_str(self, field_name): <NEW_LINE> <INDENT> if field_name == 'cache_key': <NEW_LINE> <INDENT> return '<bytes>' <NEW_LINE> <DEDENT> ...
OperationDef for decoding a cache instance. Fields: coder: An instance of CacheCoder used to decode cache. label: A unique label for this operation.
62598f4e796e427e5384db6f
class Logistic(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.w = None <NEW_LINE> self.b = None <NEW_LINE> <DEDENT> def fit(self, X, y, epochs=200, lr=0.005, l=0.01, show_loss=False): <NEW_LINE> <INDENT> X = X.transpose() <NEW_LINE> Y = y.reshape(1, -1) <NEW_LINE> n, m = X.shape <NEW_LINE> w = np.r...
Logistic regression with cross entropy loss
62598f4e15fb5d323ce7e107
class FeatureTypeAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_per_page = 100 <NEW_LINE> fields = [ 'name', 'feature_type', ] <NEW_LINE> list_display = [ 'name', 'feature_type', ] <NEW_LINE> filter_horizontal = [] <NEW_LINE> list_filter = ['feature_type'] <NEW_LINE> inlines = [FeatureInline]
Manages admin interface for data groups
62598f4eeab8aa0e5d30b155
class SelectableEnumAction(Action): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> choices: [ArgsParseEnum] = kwargs.pop('choices', None) <NEW_LINE> choices: list[ArgsParseEnum] <NEW_LINE> if choices is None: <NEW_LINE> <INDENT> raise ValueError('Choices must have something in it') <NEW_LI...
As argparse does not have a smooth way of handling enums as options. This action replaces the default way of handling enum options, in a more pretty and user friendly way.
62598f4e925a0f43d25e740f
class Solution: <NEW_LINE> <INDENT> def maxSubArray(self, nums): <NEW_LINE> <INDENT> if not nums: <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDENT> result = -sys.maxsize <NEW_LINE> ant = 0 <NEW_LINE> for i in range(len(nums)): <NEW_LINE> <INDENT> if ant < 0: ant = 0 <NEW_LINE> ant += nums[i] <NEW_LINE> result = max(ant,...
给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。 示例: 输入: [-2,1,-3,4,-1,2,1,-5,4], 输出: 6 解释: 连续子数组 [4,-1,2,1] 的和最大,为 6。 进阶: 如果你已经实现复杂度为 O(n) 的解法,尝试使用更为精妙的分治法求解。
62598f4e15fb5d323ce7e10b
class Documented: <NEW_LINE> <INDENT> def method_1(): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def method_2(): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def method_3(): <NEW_LINE> <INDENT> pass
Docstring
62598f4e462c4b4f79dbade1
class Car(): <NEW_LINE> <INDENT> def __init__(self, make,model,year): <NEW_LINE> <INDENT> self.make = make <NEW_LINE> self.model = model <NEW_LINE> self.year = year <NEW_LINE> self.odometer_reading = 0 <NEW_LINE> self.gas = 20 <NEW_LINE> <DEDENT> def get_descriptive_name(self): <NEW_LINE> <INDENT> long_name = str(self....
汽车父类
62598f4e796e427e5384db75
class GetSubscribersInputSet(InputSet): <NEW_LINE> <INDENT> def set_AccessTokenSecret(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'AccessTokenSecret', value) <NEW_LINE> <DEDENT> def set_AccessToken(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'AccessToken', value) <NEW_LINE> <DEDENT> def ...
An InputSet with methods appropriate for specifying the inputs to the GetSubscribers Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
62598f4e0a366e3fb87dbdb0
class UploadOther(BaseFile, UploadFile, AddFile): <NEW_LINE> <INDENT> def __init__(self, path, file): <NEW_LINE> <INDENT> super().__init__(path, file) <NEW_LINE> <DEDENT> def upload(self): <NEW_LINE> <INDENT> self.clear_path(self.path) <NEW_LINE> file_dir = os.path.join(self.path, self.file.filename) <NEW_LINE> self.fi...
Upload all files except archives
62598f4e21a7993f00c65358
class MusicContinue: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> print('Downloading model bundle. This will take less than a minute...') <NEW_LINE> note_seq.notebook_utils.download_bundle('basic_rnn.mag', './content/') <NEW_LINE> print("Initializing Melody RNN...") <NEW_LINE> bundle = sequence_generator...
Author: Tanish and Jenny Last Modified: 02/01/21 Version: 2.1 Class to wrap the sequence model from Magenta to continue music sequences
62598f4e56b00c62f0fb1c9a
class OneTimeReceiver(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.call_counter = 0 <NEW_LINE> self.call_args = None <NEW_LINE> <DEDENT> def __call__(self, signal, sender, **kwargs): <NEW_LINE> <INDENT> if kwargs['db'] == SYNCDB_DATABASE: <NEW_LINE> <INDENT> self.call_counter = self.call_co...
Special receiver for handle the fact that test runner calls syncdb for several databases and several times for some of them.
62598f4e15fb5d323ce7e10d
class ListViewFrame(accessibles.Frame): <NEW_LINE> <INDENT> CHECKBOX = "MultiSelect" <NEW_LINE> def __init__(self, accessible): <NEW_LINE> <INDENT> super(ListViewFrame, self).__init__(accessible) <NEW_LINE> self.label = self.findLabel(None) <NEW_LINE> self.checkbox = self.findCheckBox(self.CHECKBOX) <NEW_LINE> self.tre...
the profile of the listview_list sample
62598f4f0a366e3fb87dbdb2
class BooksRu(PartnerBase): <NEW_LINE> <INDENT> alias: str = 'booksru' <NEW_LINE> title: str = 'books.ru' <NEW_LINE> link_mutator: str = '?partner={partner_id}' <NEW_LINE> @classmethod <NEW_LINE> def get_price(cls, page_soup: BeautifulSoup) -> str: <NEW_LINE> <INDENT> price = '' <NEW_LINE> if page_soup: <NEW_LINE> <IND...
Класс реализует работу по партнёрской программе сайта books.ru.
62598f4f21a7993f00c6535c
class SearchResultsPageLocators(object): <NEW_LINE> <INDENT> pass
A class for search results locators. All search results locators should come here.
62598f4f925a0f43d25e7419
class AddGroup(windowClass, baseClass): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> if uiTool.windowExists(parent, 'addGroupWindow'): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> super(AddGroup, self).__init__(parent) <NEW_LINE> self.setupUi(self) <NEW_LINE> self.show() <NEW_LINE> <DEDENT...
user control pannel...
62598f4fd164cc6175820367
class Buttom(Wall): <NEW_LINE> <INDENT> def __init__(self, game): <NEW_LINE> <INDENT> a = Vector2D(0, game.height) <NEW_LINE> n = Vector2D(1, 0) <NEW_LINE> super().__init__(game, a, n) <NEW_LINE> <DEDENT> def on_collision(self, ball): <NEW_LINE> <INDENT> ball.destory()
Represents the buttom of the canvas.
62598f4f5166f23b2e2427c7
class Ovdc: <NEW_LINE> <INDENT> def __new__(cls, client: vcd_client.Client): <NEW_LINE> <INDENT> api_version = client.get_vcd_api_version() <NEW_LINE> if api_version < vcd_client.VcdApiVersionObj.VERSION_35.value: <NEW_LINE> <INDENT> return MetadataBasedOvdc(client) <NEW_LINE> <DEDENT> elif api_version >= vcd_client.Vc...
Returns the ovdc class as determined by API version.
62598f4f925a0f43d25e741d
class Shoe(object): <NEW_LINE> <INDENT> reshuffle = False <NEW_LINE> def __init__(self, decks): <NEW_LINE> <INDENT> self.count = 0 <NEW_LINE> self.count_history = [] <NEW_LINE> self.ideal_count = {} <NEW_LINE> self.decks = decks <NEW_LINE> self.cards = self.init_cards() <NEW_LINE> self.init_count() <NEW_LINE> <DEDENT> ...
Represents the shoe, which consists of a number of card decks.
62598f4fff9c53063f519a3a
class Method(Attribute): <NEW_LINE> <INDENT> positional = required = () <NEW_LINE> _optional = varargs = kwargs = None <NEW_LINE> def _get_optional(self): <NEW_LINE> <INDENT> if self._optional is None: <NEW_LINE> <INDENT> return {} <NEW_LINE> <DEDENT> return self._optional <NEW_LINE> <DEDENT> def _set_optional(self, op...
Method interfaces The idea here is that you have objects that describe methods. This provides an opportunity for rich meta-data.
62598f4f796e427e5384db81
class Batch(object): <NEW_LINE> <INDENT> def __init__(self, data=None, dataset=None, device=None, train=True): <NEW_LINE> <INDENT> if data is not None: <NEW_LINE> <INDENT> self.batch_size = len(data) <NEW_LINE> self.dataset = dataset <NEW_LINE> self.train = train <NEW_LINE> for (name, field) in dataset.fields.items(): ...
Defines a batch of examples along with its Fields. Attributes: batch_size: Number of examples in the batch. dataset: A reference to the dataset object the examples come from (which itself contains the dataset's Field objects). train: Whether the batch is from a training set. Also stores the Variab...
62598f4f56b00c62f0fb1ca6
class SysViewEventContext(): <NEW_LINE> <INDENT> def __init__(self, handle, irq, name=''): <NEW_LINE> <INDENT> self.handle = handle <NEW_LINE> self.irq = irq <NEW_LINE> self.name = name
SystemView event context.
62598f4f507cdc57c63a418d
class EligibilityTrace(object): <NEW_LINE> <INDENT> def __init__(self, minTraceValue = 0.01, replacingTraces = True): <NEW_LINE> <INDENT> self.minTraceValue = minTraceValue <NEW_LINE> self.replacingTraces = replacingTraces <NEW_LINE> self.traces = defaultdict(float) <NEW_LINE> <DEDENT> def getTraces(self): <NEW_LINE> <...
A class that implements eligibility traces.
62598f4f711fe17d825dfae8
class PyRedis(PythonPackage): <NEW_LINE> <INDENT> pypi = "redis/redis-3.3.8.tar.gz" <NEW_LINE> version('3.5.3', sha256='0e7e0cfca8660dea8b7d5cd8c4f6c5e29e11f31158c0b0ae91a397f00e5a05a2') <NEW_LINE> version('3.5.0', sha256='7378105cd8ea20c4edc49f028581e830c01ad5f00be851def0f4bc616a83cd89') <NEW_LINE> version('3.3.8', sh...
The Python interface to the Redis key-value store.
62598f4f462c4b4f79dbadef
class ArmPlot(GraphicsBlock): <NEW_LINE> <INDENT> nin = 1 <NEW_LINE> nout = 0 <NEW_LINE> inlabels = ('q',) <NEW_LINE> def __init__(self, robot=None, *inputs, q0=None, backend=None, **kwargs): <NEW_LINE> <INDENT> super().__init__(inputs=inputs, **kwargs) <NEW_LINE> self.inport_names(("q",)) <NEW_LINE> if q0 is None: <NE...
:blockname:`ARMPLOT` .. table:: :align: left +--------+---------+---------+ | inputs | outputs | states | +--------+---------+---------+ | 1 | 0 | 0 | +--------+---------+---------+ | ndarray| | | +--------+---------+---------+
62598f4feab8aa0e5d30b169
class HandshakeType(TLSEnum): <NEW_LINE> <INDENT> hello_request = 0 <NEW_LINE> client_hello = 1 <NEW_LINE> server_hello = 2 <NEW_LINE> certificate = 11 <NEW_LINE> server_key_exchange = 12 <NEW_LINE> certificate_request = 13 <NEW_LINE> server_hello_done = 14 <NEW_LINE> certificate_verify = 15 <NEW_LINE> client_key_excha...
Message types in TLS Handshake protocol
62598f4f462c4b4f79dbadf1
class RandomSampleCrop(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.sample_options = ( None, (0.1, None), (0.3, None), (0.7, None), (0.9, None), (None, None), ) <NEW_LINE> <DEDENT> def __call__(self, image, boxes=None, labels=None): <NEW_LINE> <INDENT> height, width, _ = image.shape <NEW_LI...
Crop Arguments: img (Image): the image being input during training boxes (Tensor): the original bounding boxes in pt form labels (Tensor): the class labels for each bbox mode (float tuple): the min and max jaccard overlaps Return: (img, boxes, classes) img (Image): the cropped image ...
62598f4f796e427e5384db85
@gin.configurable <NEW_LINE> class NormalizedConv1D(tf.keras.layers.Layer): <NEW_LINE> <INDENT> def __init__(self, filters: int, kernel_size: int, strides: int, padding: int, use_bias: bool, input_shape: Tuple[int], kernel_initializer, kernel_regularizer, name: str, trainable): <NEW_LINE> <INDENT> super().__init__(name...
A Conv1D which kernel is forced to have L2 norm of 1.
62598f4f167d2b6e312b6373