code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class SupplyHold: <NEW_LINE> <INDENT> def __init__(self, supplies, crew_manager): <NEW_LINE> <INDENT> self.supplies = supplies <NEW_LINE> self.crew_manager = crew_manager <NEW_LINE> <DEDENT> def load_supplies(self, amount): <NEW_LINE> <INDENT> self.supplies += amount <NEW_LINE> <DEDENT> def distribute_supplies_to_crew(...
물자 창고 클래스
62598f999c8ee82313040016
class Policy: <NEW_LINE> <INDENT> def zero_policy(state): <NEW_LINE> <INDENT> return np.array([0, 0]) <NEW_LINE> <DEDENT> def linear_policy(speed): <NEW_LINE> <INDENT> return lambda state: np.array([speed, 0]) <NEW_LINE> <DEDENT> def random_policy(v_sd, kw): <NEW_LINE> <INDENT> v = v_sd <NEW_LINE> if np.random.random()...
Policy class contains several simple policy implementations for SE2 moving targets.
62598f99442bda511e95c1b4
class MpQueueLogger(Logger): <NEW_LINE> <INDENT> def __init__(self, q, level=None, **context): <NEW_LINE> <INDENT> super(MpQueueLogger, self).__init__(level, **context) <NEW_LINE> self._q = q <NEW_LINE> <DEDENT> def _write_to_log(self, details): <NEW_LINE> <INDENT> self._q.put(details) <NEW_LINE> <DEDENT> def end_loggi...
logger implementation which routes log entries to a multiprocessing queue. The queue must be provided in the ctor.
62598f9924f1403a92685759
class PureZipDownloader: <NEW_LINE> <INDENT> def __init__(self, url: str, target: str, verbose: bool=True): <NEW_LINE> <INDENT> self.url = url <NEW_LINE> self.target = Path(target).expanduser() <NEW_LINE> self.verbose = verbose <NEW_LINE> return <NEW_LINE> <DEDENT> def download(self) -> None: <NEW_LINE> <INDENT> if not...
Downloads a zip file and unpacks it Args: url: URL to the zip file target: directory to unzip the contents into verbose: whether to emit statements
62598f99cb5e8a47e493c01b
class Dataset(): <NEW_LINE> <INDENT> def __init__(self, data_path, min_count=0): <NEW_LINE> <INDENT> assert os.path.isfile(data_path), "No file found at %s"%data_path <NEW_LINE> assert min_count >= 0, "Min count cannot be negative" <NEW_LINE> self.min_count = min_count <NEW_LINE> self.generate_word_sequences(data_path)...
Class to create a pre-processed dataset from a text file. Given a path to a text file (containing plain text), this class assigns unique integer indexes to each word that appears at least min_count times in the text. No method is supposed to be called by the user. A Dataset object should be passed to a Sampler, which ...
62598f9930bbd7224646981d
class BaseDevice(metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> sampling_frequency = 500 <NEW_LINE> shape = (1,) <NEW_LINE> ctype = None <NEW_LINE> def __init__(self, clock=mono_clock.get_time): <NEW_LINE> <INDENT> self._local = True <NEW_LINE> self.clock = clock <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def read...
Abstract base class for input devices. Attributes ---------- sampling_frequency: int Expected sampling frequency of the device, used by toon.input.MpDevice for preallocation. We preallocate for 1 second of data (e.g. 500 samples for a sampling_frequency of 500 Hz). Notes ----- The user supplies `enter` and `ex...
62598f998e71fb1e983bb804
class LacountsESRIGeoportalHarvester(DCATRDFHarvester): <NEW_LINE> <INDENT> def modify_package_dict(self, package_dict, dcat_dict, harvest_object): <NEW_LINE> <INDENT> existing_package = self._get_existing_dataset(harvest_object.guid) <NEW_LINE> helpers.process_package(package_dict, existing_package, harvest_object) <N...
A CKAN Harvester for ESRI Geoportals.
62598f99507cdc57c63a4ae4
class PyFinish(ExecutionControlCommandBase): <NEW_LINE> <INDENT> invoke = dont_suppress_errors(ExecutionControlCommandBase.finish)
Execute until function returns to a caller.
62598f992ae34c7f260aae30
class TestCaseWithIni(Pep8CompliantTestCase): <NEW_LINE> <INDENT> ini_file_path = None <NEW_LINE> def set_up(self): <NEW_LINE> <INDENT> self.ini = EverestIni(self.ini_file_path) <NEW_LINE> <DEDENT> def tear_down(self): <NEW_LINE> <INDENT> super(TestCaseWithIni, self).tear_down() <NEW_LINE> try: <NEW_LINE> <INDENT> del ...
Use this for unit tests that need access to settings specified in an .ini file. :ivar ini: The ini file parser. This will only be set up if the `ini_file_path` and `ini_section_name` class variables were set up sensibly.
62598f9945492302aabfc227
class DeleteInvitesView(QuerysetForRoleMixin, delete.DeleteView): <NEW_LINE> <INDENT> def get_object_preview(self): <NEW_LINE> <INDENT> generictoken = self.get_object() <NEW_LINE> return u'{} - {}'.format( generictoken.metadata['email'], defaultfilters.date(generictoken.created_datetime, 'DATETIME_FORMAT') )
View used to delete existing invites.
62598f99c432627299fa2d25
class GetPropertyKeyInputSet(InputSet): <NEW_LINE> <INDENT> def set_AppID(self, value): <NEW_LINE> <INDENT> super(GetPropertyKeyInputSet, self)._set_input('AppID', value) <NEW_LINE> <DEDENT> def set_AppKey(self, value): <NEW_LINE> <INDENT> super(GetPropertyKeyInputSet, self)._set_input('AppKey', value) <NEW_LINE> <DEDE...
An InputSet with methods appropriate for specifying the inputs to the GetPropertyKey Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
62598f990a50d4780f705127
class UseExistingRepository(RepositoryAcquisitionPolicy): <NEW_LINE> <INDENT> def __init__(self, repository, stack_on=None, stack_on_pwd=None, require_stacking=False): <NEW_LINE> <INDENT> super(UseExistingRepository, self).__init__( stack_on, stack_on_pwd, require_stacking) <NEW_LINE> self._repository = repository <NEW...
A policy of reusing an existing repository
62598f9967a9b606de545d24
class DeductionRateType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'DeductionRateType') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('http://ddex.net/xml/20100121/ddex.xsd', 469, 4) <NEW_LINE> _Documentation ...
A Type of DeductionRate.
62598f993cc13d1c6d4654bb
class SlaveChannel(Channel, ABC): <NEW_LINE> <INDENT> supported_message_types: Set[MsgType] = set() <NEW_LINE> suggested_reactions: Optional[Sequence[ReactionName]] = None <NEW_LINE> def get_extra_functions(self) -> Dict[ExtraCommandName, Callable]: <NEW_LINE> <INDENT> methods = {} <NEW_LINE> for mName in dir(self): <N...
The abstract slave channel class. All slave channels MUST inherit this class. Attributes: supported_message_types (Set[:class:`~.constants.MsgType`]): Types of messages that the slave channel accepts as incoming messages. Master channels may use this value to decide what type of messages to...
62598f9916aa5153ce40024d
class World: <NEW_LINE> <INDENT> def __init__(self, cores, kernel, log=binarylog.BinaryLog(io.BytesIO()), *, local_timer_scheduling): <NEW_LINE> <INDENT> if cores > 1: <NEW_LINE> <INDENT> raise RuntimeError('Does not support more than 1 core yet.') <NEW_LINE> <DEDENT> self.cores = [cpucore.Core(idx, kernel._scheduler_t...
The world keeps data to enable execution.
62598f99627d3e7fe0e06bfa
class LoginTypePanel(LoginBasePanel): <NEW_LINE> <INDENT> def __init__(self, weixinapp): <NEW_LINE> <INDENT> super(LoginTypePanel, self).__init__(weixinapp) <NEW_LINE> self.update_locator({'用微信号/QQ号/邮箱登录': {'type': Button, 'root': self, 'locator': QPath('/Text="用微信号/QQ号/邮箱登录"')}, }) <NEW_LINE> <DEDENT> def login_by_oth...
登录面板
62598f997047854f4633f131
class ResultsNotFound(ChiakiException): <NEW_LINE> <INDENT> pass
Exception raised when a search returns some form of "not found"
62598f998e71fb1e983bb805
class Angle(Float): <NEW_LINE> <INDENT> pass
Angle type property.
62598f9991af0d3eaad39b59
class Encoder(nn.Module): <NEW_LINE> <INDENT> def __init__(self, obj): <NEW_LINE> <INDENT> super(Encoder, self).__init__() <NEW_LINE> self.obj = obj <NEW_LINE> self.word_embeddings = nn.Embedding(obj.vocab_size, obj.embedding_dim) <NEW_LINE> self.word_embeddings.weight.requires_grad = False <NEW_LINE> self.lstm = nn.LS...
Encoder containing the embedding plus LSTM layers. Note ---- The classifying linear layer has been separated out of the LSTM class so this class is now called Encoder.
62598f9976e4537e8c3ef305
class DynamicScope(object): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> self.parent = parent <NEW_LINE> self.symbols = dict() <NEW_LINE> <DEDENT> def get(self, symbol): <NEW_LINE> <INDENT> if symbol in self.symbols: <NEW_LINE> <INDENT> return self.symbols[symbol] <NEW_LINE> <DEDENT> elif self.pa...
Keep track of a variable scope dynamically, for the sake of simulating lexical scope in a PFA document (ironically).
62598f990c0af96317c560d4
class DonorPSSMOptions(ParameterOptions): <NEW_LINE> <INDENT> def __init__(self): pass
Empty class to assemble DonorSite PSSM settings
62598f99e5267d203ee6b660
class ChunksQueue(DataQueue): <NEW_LINE> <INDENT> @asyncio.coroutine <NEW_LINE> def read(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return (yield from super().read()) <NEW_LINE> <DEDENT> except EofStream: <NEW_LINE> <INDENT> return EOF_MARKER <NEW_LINE> <DEDENT> <DEDENT> readany = read
Like a :class:`DataQueue`, but for binary chunked data transfer.
62598f9963d6d428bbee250e
class LabelFun(object): <NEW_LINE> <INDENT> def __init__(self, label_def, sample_motif=None): <NEW_LINE> <INDENT> self.label_def = label_def <NEW_LINE> <DEDENT> def __call__(self, m): <NEW_LINE> <INDENT> motif_attributes = dict((name, getattr(m, name)) for name in dir(m) if not name.startswith('_')) <NEW_LINE> return s...
Call to get motif label from motif.
62598f993c8af77a43b67de5
class HyperlogCommands(CommandsProtocol): <NEW_LINE> <INDENT> def pfadd(self, name: KeyT, *values: EncodableT) -> ResponseT: <NEW_LINE> <INDENT> return self.execute_command("PFADD", name, *values) <NEW_LINE> <DEDENT> def pfcount(self, *sources: KeyT) -> ResponseT: <NEW_LINE> <INDENT> return self.execute_command("PFCOUN...
Redis commands of HyperLogLogs data type. see: https://redis.io/topics/data-types-intro#hyperloglogs
62598f99d58c6744b42dc179
class TestSetup(unittest.TestCase): <NEW_LINE> <INDENT> layer = RER_BANDI_INTEGRATION_TESTING <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> self.portal = self.layer['portal'] <NEW_LINE> if get_installer: <NEW_LINE> <INDENT> self.installer = get_installer(self.portal, self.layer['request']) <NEW_LINE> <DEDENT> else: <...
Test that rer.bandi is properly installed.
62598f99bd1bec0571e14f6c
class AddCommentForm(ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = im.IssueComment <NEW_LINE> fields = ['issue', 'user','comment']
This form is used for adding comments to issues
62598f998c0ade5d55dc3537
class MoveDetect(object): <NEW_LINE> <INDENT> def __init__(self, stream, width, height, config_settings): <NEW_LINE> <INDENT> self._min_area = config_settings['min_area'] <NEW_LINE> self._blur_size = config_settings['blur_size'] <NEW_LINE> self._threshold_sensitivity = config_settings['threshold_sensitivity'] <NEW_LINE...
Classe de deteccao de movimento
62598f994527f215b58e9c35
class FroggyScreenManager(ScreenManager): <NEW_LINE> <INDENT> def key_press_handler(self, window, key, *_): <NEW_LINE> <INDENT> if key == 27: <NEW_LINE> <INDENT> if self.current == 'home': <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> elif self.current == 'froggy': <NEW_LINE> <INDENT> self.current = 'summary' <N...
Holds all the screens and settings for transitions.
62598f99a219f33f346c656b
class MoveError(Exception): <NEW_LINE> <INDENT> def __init__(self, map_state, move): <NEW_LINE> <INDENT> self.expression = map_state <NEW_LINE> self.message = move
Attributes: mapState -- State of the map on which it failed move -- tried move that failed
62598f9945492302aabfc229
class TestXMLParser(unittest.TestCase): <NEW_LINE> <INDENT> def test_returns_valid_value(self): <NEW_LINE> <INDENT> result = getUniqueElementValueFromXmlString( '<?xml version="1.0" encoding="UTF-8"?><foo>bar</foo>', 'foo') <NEW_LINE> self.assertEqual(result, 'bar') <NEW_LINE> <DEDENT> def test_date_to_iso8601(self): <...
Test the XML parser utility function
62598f99a8ecb03325870f5b
class ListAttestorsRequest(proto.Message): <NEW_LINE> <INDENT> parent = proto.Field( proto.STRING, number=1, ) <NEW_LINE> page_size = proto.Field( proto.INT32, number=2, ) <NEW_LINE> page_token = proto.Field( proto.STRING, number=3, )
Request message for [BinauthzManagementService.ListAttestors][]. Attributes: parent (str): Required. The resource name of the project associated with the [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format ``projects/*``. page_size (int): Requested p...
62598f994a966d76dd5eec32
class CrossTableManager(models.Manager): <NEW_LINE> <INDENT> def get_query_set(self): <NEW_LINE> <INDENT> return CrossTableQuerySet(self.model) <NEW_LINE> <DEDENT> def crosstable(self, x_field, y_field, cross_fields, x_values=None, y_values=None): <NEW_LINE> <INDENT> return self.get_query_set().crosstable(x_field, y_fi...
Manager to add support to cross table functions with 3 fields from a model class. Cross tables are matrix where you have an X field for rows, Y field for columns and a VALUE field for coordinates between X for Y to relate them.
62598f9907f4c71912baf19d
class ScrapyIllegalException(Exception): <NEW_LINE> <INDENT> pass
Exception(その他エラー)を定義する
62598f9956b00c62f0fb2601
class Directions(Enum): <NEW_LINE> <INDENT> UP = '1' <NEW_LINE> LEFT = '2' <NEW_LINE> RIGHT = '3' <NEW_LINE> DOWN = '4'
Directions Class
62598f991f037a2d8b9e3e36
class DiscreteActorCriticSplit(torch.nn.Module): <NEW_LINE> <INDENT> def __init__(self, actor, critic, add_softmax=True): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.actor = actor <NEW_LINE> self.critic = critic <NEW_LINE> self.add_softmax = add_softmax <NEW_LINE> <DEDENT> def forward(self, states): <NEW_LIN...
Wrapper class that keeps discrete actor and critic as separate networks.
62598f996aa9bd52df0d4c1f
class Timeout(Exception): <NEW_LINE> <INDENT> pass
Raised when an operation times out
62598f9916aa5153ce40024f
class Task(models.Model): <NEW_LINE> <INDENT> facility = models.ForeignKey('Facility', verbose_name=_(u"facility"), related_name='tasks') <NEW_LINE> name = models.CharField(max_length=256, verbose_name=_(u'name')) <NEW_LINE> description = models.TextField(blank=True, verbose_name=_(u'description')) <NEW_LINE> class Met...
Tasks that are to be done at the facilities. Has foreign key to facility, name and description.
62598f9910dbd63aa1c70908
class WPSPropertyValue(ByteParser): <NEW_LINE> <INDENT> header = StructureProperty(0, 'header') <NEW_LINE> def _parse_continue(self, structure, result): <NEW_LINE> <INDENT> if not super()._parse_continue(structure, result): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> return not (structure == 'header' and self....
Base class for WPS Property Values (name, integer) that implements check for header ValueSize as 0x00
62598f993617ad0b5ee05ea0
class MyDDNSServer(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.reset() <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> self.run_called = True <NEW_LINE> if self._exception is not None: <NEW_LINE> <INDENT> self.exception_raised = True <NEW_LINE> raise self._exception <NEW_LINE> <DEDENT> <D...
Fake DDNS server used to test the main() function
62598f99d486a94d0ba2bd27
class DeleteUserInputSet(InputSet): <NEW_LINE> <INDENT> def set_Email(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'Email', value) <NEW_LINE> <DEDENT> def set_ID(self, value): <NEW_LINE> <INDENT> InputSet._set_input(self, 'ID', value) <NEW_LINE> <DEDENT> def set_Password(self, value): <NEW_LINE> <INDENT>...
An InputSet with methods appropriate for specifying the inputs to the DeleteUser Choreo. The InputSet object is used to specify input parameters when executing this Choreo.
62598f9929b78933be269f86
class ExecutionLocals(AttributeFlatGroupedMapping): <NEW_LINE> <INDENT> def process_resource_definition(self, resource_definition): <NEW_LINE> <INDENT> return resource_definition(vars_=self)() <NEW_LINE> <DEDENT> def __getitem__(self, key): <NEW_LINE> <INDENT> value = super().__getitem__(key) <NEW_LINE> if isinstance(v...
This should be constructed from a FlatGroupedMapping that has grouped all the relevant resource definitions mapping defined for the current endpoint plus the extracted values from the route. The __getitem__ method will automatically instantiate all resource definitions using values provided by itself.
62598f997cff6e4e811b5772
class TestCommand(Command): <NEW_LINE> <INDENT> def handle(self): <NEW_LINE> <INDENT> result = nose.run(argv=['', '--with-specplugin', '--exe'])
Tests the chatbot test
62598f994e4d562566372175
class StdTransversal(Transversal): <NEW_LINE> <INDENT> def __init__(self, prime): <NEW_LINE> <INDENT> self.prime = prime <NEW_LINE> <DEDENT> def get_repr(self, n): <NEW_LINE> <INDENT> return n.value % self.prime
The transversal 0,...,prime - 1 For example for prime = 5: 0, 1, 2, 3, 4
62598f9932920d7e50bc5da8
class KHIVABackend(Enum): <NEW_LINE> <INDENT> KHIVA_BACKEND_DEFAULT = 0 <NEW_LINE> KHIVA_BACKEND_CPU = 1 <NEW_LINE> KHIVA_BACKEND_CUDA = 2 <NEW_LINE> KHIVA_BACKEND_OPENCL = 4
KHIVA Backend.
62598f9923849d37ff850e19
@ClassFactory.register(ClassType.CALLBACK) <NEW_LINE> class ModelTuner(Callback): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Callback, self).__init__() <NEW_LINE> self.priority = 250 <NEW_LINE> <DEDENT> def init_trainer(self, logs=None): <NEW_LINE> <INDENT> self._reset_classifier_model() <NEW_LIN...
Callback that saves the evaluated Performance.
62598f99090684286d593582
class NeighbourRequestTimer(Thread): <NEW_LINE> <INDENT> def __init__(self, request_time: int, slip_commands: SerialCommands): <NEW_LINE> <INDENT> Thread.__init__(self) <NEW_LINE> self._neighbours_request_time = request_time <NEW_LINE> self._slip_commands = slip_commands <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <I...
Timer for sending request periodically over serial line
62598f990c0af96317c560d6
class AcyclicGraphDFS: <NEW_LINE> <INDENT> def __init__(self, graph): <NEW_LINE> <INDENT> self.graph = graph <NEW_LINE> self.color = dict(((node, "WHITE") for node in self.graph.iternodes())) <NEW_LINE> self.parent = dict(((node, None) for node in self.graph.iternodes())) <NEW_LINE> recursionlimit = sys.getrecursionlim...
Cycles detection in graphs based on DFS. ValueError is raised for cyclic graphs. Attributes ---------- graph : input graph color : dict with nodes, private parent : dict (DFS tree) Notes ----- Based on: Cormen, T. H., Leiserson, C. E., Rivest, R. L., and Stein, C., 2009, Introduction to Algorithms, third editi...
62598f9963d6d428bbee2510
class Geolocation(object): <NEW_LINE> <INDENT> def __init__(self, geoloc_option=None, options_override=False): <NEW_LINE> <INDENT> self._geolocation_enabled = self._check_if_geolocation_should_be_used(geoloc_option, options_override) <NEW_LINE> provider_id = constants.GEOLOC_DEFAULT_PROVIDER <NEW_LINE> if geoloc_option...
Top level geolocation handler.
62598f99e5267d203ee6b662
class CheckOkWithSittingContext(GameContext) : <NEW_LINE> <INDENT> messages = ["""Really?""", """Are sure you want to sit on [a $x]? It's probably fairly dirty!""", """This is your last chance: do you really want to sit on [the $x]?"""] <NEW_LINE> been_here = [False] <NEW_LINE> def __init__(self, parent, floor) : <NEW...
This is a context to enter to do some kind of affirmation interaction, printing out the messages one at a time from "messages", continuing if the player says something like "yes" or keeps trying to sit. The "are we ok with sitting" flag checks whether the sitting action enters this context. The "are we ok with sittin...
62598f99d58c6744b42dc17a
class LearningAgent(Agent): <NEW_LINE> <INDENT> def __init__(self, env, learning=False, epsilon=1.0, alpha=0.5): <NEW_LINE> <INDENT> super(LearningAgent, self).__init__(env) <NEW_LINE> self.planner = RoutePlanner(self.env, self) <NEW_LINE> self.valid_actions = self.env.valid_actions <NEW_LINE> self.learning = learning ...
An agent that learns to drive in the Smartcab world. This is the object you will be modifying.
62598f99f7d966606f747d39
class LockAdmin(admin.AdminHandler): <NEW_LINE> <INDENT> @admin.AdminHandler.XsrfProtected('lock_admin') <NEW_LINE> def post(self): <NEW_LINE> <INDENT> if not self.IsAdminUser(): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> lock_type = self.request.get('lock_type') <NEW_LINE> if lock_type not in LOCK_TYPES: <NEW_LINE...
Handler for /admin/lock_admin.
62598f9930bbd7224646981f
class AnalysisBase(metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> @abc.abstractmethod <NEW_LINE> def search_class(self, args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def search_property(self, args): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def search_...
Basic analysis class Provides abstract methods how to interact with the results. Every inheriting class has to implement these methods.
62598f99cc0a2c111447ad5f
class LineSeries(_BaseSeries): <NEW_LINE> <INDENT> @property <NEW_LINE> def smooth(self): <NEW_LINE> <INDENT> smooth = self._element.smooth <NEW_LINE> if smooth is None: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return smooth.val <NEW_LINE> <DEDENT> @smooth.setter <NEW_LINE> def smooth(self, value): <NEW_LINE...
A data point series belonging to a line plot.
62598f99d7e4931a7ef3bdeb
class MSplitWidget(object): <NEW_LINE> <INDENT> pass
The mixin class that contains common code for toolkit specific implementations of the ISplitWidget interface.
62598f99507cdc57c63a4ae8
class NoSuchService(ClientHashMapError): <NEW_LINE> <INDENT> def __init__(self, name=None, uuid=None): <NEW_LINE> <INDENT> super(NoSuchService, self).__init__( _("No such service: %(name)s (UUID: %(uuid)s)") % {'name': name, 'uuid': uuid}) <NEW_LINE> self.name = name <NEW_LINE> self.uuid = uuid
Raised when the service doesn't exist.
62598f9945492302aabfc22b
class MessageModelTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> User.query.delete() <NEW_LINE> Message.query.delete() <NEW_LINE> Follows.query.delete() <NEW_LINE> Like.query.delete() <NEW_LINE> self.client = app.test_client() <NEW_LINE> user = User(**USER_DATA) <NEW_LINE> db.session.add(u...
Tests for message model
62598f99097d151d1a2c0d77
class SecurityGroupServerRpcCallback(object): <NEW_LINE> <INDENT> target = oslo_messaging.Target(version='1.2', namespace=constants.RPC_NAMESPACE_SECGROUP) <NEW_LINE> @property <NEW_LINE> def plugin(self): <NEW_LINE> <INDENT> return directory.get_plugin() <NEW_LINE> <DEDENT> def _get_devices_info(self, context, devices...
Callback for SecurityGroup agent RPC in plugin implementations. This class implements the server side of an rpc interface. The client side can be found in SecurityGroupServerRpcApi. For more information on changing rpc interfaces, see doc/source/contributor/internals/rpc_api.rst.
62598f990a50d4780f70512b
class Interval(Enum): <NEW_LINE> <INDENT> MINUTE_1 = '1m' <NEW_LINE> MINUTE_3 = '3m' <NEW_LINE> MINUTE_5 = '5m' <NEW_LINE> MINUTE_15 = '15m' <NEW_LINE> MINUTE_30 = '30m' <NEW_LINE> HOUR_1 = '1h' <NEW_LINE> HOUR_2 = '2h' <NEW_LINE> HOUR_4 = '4h' <NEW_LINE> HOUR_6 = '6h' <NEW_LINE> HOUR_8 = '8h' <NEW_LINE> HOUR_12 = '12h...
Interval for klines
62598f9960cbc95b0636409d
class _TFSave(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(_TFSave, self).__init__() <NEW_LINE> self.graph = tf.Graph() <NEW_LINE> self.sess = tf.Session(graph=self.graph) <NEW_LINE> <DEDENT> def save(self, file_path, verbose=0): <NEW_LINE> <INDENT> with self.graph.as_default() as g: <NEW_LINE> ...
An abstract class to store and save Tensorflow data. Provides : a graph, a session linked to the graph, saving and loading.
62598f9901c39578d7f12ad1
class Model0(PredictionModel): <NEW_LINE> <INDENT> def predict(self, *args): <NEW_LINE> <INDENT> return 0
Baseline model (always 0)
62598f9916aa5153ce400251
class _TempEIPConfig(object): <NEW_LINE> <INDENT> def __init__(self, flags, path, ports): <NEW_LINE> <INDENT> self._flags = flags <NEW_LINE> self._path = path <NEW_LINE> self._ports = ports <NEW_LINE> <DEDENT> def get_gateway_ports(self, idx): <NEW_LINE> <INDENT> return self._ports <NEW_LINE> <DEDENT> def get_openvpn_c...
Current EIP code on bitmask depends on EIPConfig object, this temporary implementation helps on the transition.
62598f99a79ad16197769db7
class BaseFraction: <NEW_LINE> <INDENT> def __init__(self, members): <NEW_LINE> <INDENT> self.members = members <NEW_LINE> <DEDENT> def scalar_product_hint(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def function_space_hint(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def derive(self, order): <NEW_LINE> ...
Abstract base class representing a basis that can be used to describe functions of several variables.
62598f9910dbd63aa1c7090a
class logs: <NEW_LINE> <INDENT> def __init__(self, hostname=None, version=None, appname=None, profile=None): <NEW_LINE> <INDENT> self.hostname = hostname <NEW_LINE> self.version = version <NEW_LINE> self.appname = appname <NEW_LINE> self.profile = profile <NEW_LINE> self.output = sys.stdout <NEW_LINE> <DEDENT> def __ca...
logging class
62598f9955399d3f05626274
class InvalidQueryResultTypeError(TavernException): <NEW_LINE> <INDENT> pass
Searched for a value in data but it was not a 'simple' type
62598f9991af0d3eaad39b5d
class IfSubHandler(DefaultActionHandler): <NEW_LINE> <INDENT> def handle_action_elif(self, line, start, end): <NEW_LINE> <INDENT> expr = self.parser.parse_expr(start, end) <NEW_LINE> node = self.parser.pop_nodestack() <NEW_LINE> node.add_elif(expr) <NEW_LINE> self.parser.push_nodestack(node.nodes) <NEW_LINE> <DEDENT> d...
Handle stuff under if
62598f9926068e7796d4c6b7
class TestDeleteUserRoute(_RouteTestFramework): <NEW_LINE> <INDENT> @property <NEW_LINE> def route_info(self) -> Tuple[str, List[str], Optional[str], bool]: <NEW_LINE> <INDENT> return "/delete_user", ["POST"], None, True <NEW_LINE> <DEDENT> def test_successful_requests(self): <NEW_LINE> <INDENT> self.login() <NEW_LINE>...
Class that tests the /delete_user route
62598f9921a7993f00c65cd5
class SeparateRotationNode(ArmLogicTreeNode): <NEW_LINE> <INDENT> bl_idname = 'LNSeparateRotationNode' <NEW_LINE> bl_label = 'Separate Rotation' <NEW_LINE> arm_section = 'rotation' <NEW_LINE> arm_version = 1 <NEW_LINE> def arm_init(self, context): <NEW_LINE> <INDENT> self.add_input('ArmRotationSocket', 'Angle') <NEW_LI...
Decompose a rotation into one of its mathematical representations
62598f99d53ae8145f9181e1
class ReshapeLayer(Layer): <NEW_LINE> <INDENT> def __init__(self, prev_layer, shape, name='reshape'): <NEW_LINE> <INDENT> super(ReshapeLayer, self).__init__(prev_layer=prev_layer, name=name) <NEW_LINE> if not shape: <NEW_LINE> <INDENT> raise ValueError("Shape list can not be empty") <NEW_LINE> <DEDENT> self.outputs = t...
A layer that reshapes a given tensor. Parameters ---------- prev_layer : :class:`Layer` Previous layer shape : tuple of int The output shape, see ``tf.reshape``. name : str A unique layer name. Examples -------- >>> import tensorflow as tf >>> import itl as tl >>> x = tf.placeholder(tf.float32, shape=(Non...
62598f99dd821e528d6d8c88
class ImproperlyConfigured(Exception): <NEW_LINE> <INDENT> pass
Insights is improperly configured If settings file is not present, it will raise this exception
62598f9932920d7e50bc5dab
class ReleaseVCS(object): <NEW_LINE> <INDENT> def __init__(self, path): <NEW_LINE> <INDENT> assert(self.is_valid_root(path)) <NEW_LINE> self.path = path <NEW_LINE> self.package = get_developer_package(path) <NEW_LINE> self.type_settings = self.package.config.plugins.release_vcs <NEW_LINE> self.settings = self.type_sett...
A version control system (VCS) used to release Rez packages.
62598f990c0af96317c560d8
class RegisterGradient(object): <NEW_LINE> <INDENT> def __init__(self, op_type): <NEW_LINE> <INDENT> if not isinstance(op_type, six.string_types): <NEW_LINE> <INDENT> raise TypeError("op_type must be a string") <NEW_LINE> <DEDENT> self._op_type = op_type <NEW_LINE> <DEDENT> def __call__(self, f): <NEW_LINE> <INDENT> _g...
A decorator for registering the gradient function for an op type. This decorator is only used when defining a new op type. For an op with `m` inputs and `n` outputs, the gradient function is a function that takes the original `Operation` and `n` `Output` objects (representing the gradients with respect to each output ...
62598f99baa26c4b54d4f006
class ReadAndPorcessObjectDeliveryList(smach.StateMachine): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> smach.StateMachine.__init__(self, ['fetch_and_deliver', 'finished_list', preempted, aborted], input_keys=['in_list', 'in_list_marker'], output_keys=['object_name_out', 'delivery_location_out', 'list_m...
This SM That takes in a list of vectors, where for each object there is a location where to take that object. It basicaly take object 1 to location A, 2 to B and so on. Finishes when it has delivered all the objects in the list that are also in its POI memory banks. If a non memorised previously object is in the list i...
62598f99d58c6744b42dc17b
class IfNode(Node): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.nodetype = 'if' <NEW_LINE> self.expr = None <NEW_LINE> self.body = [] <NEW_LINE> self.elseBody = []
expr - FunctionCallNode body - nodes elseBody - nodes
62598f9924f1403a9268575c
class L7RulePUT(base.BaseType): <NEW_LINE> <INDENT> type = wtypes.wsattr( wtypes.Enum(str, *constants.SUPPORTED_L7RULE_TYPES)) <NEW_LINE> compare_type = wtypes.wsattr( wtypes.Enum(str, *constants.SUPPORTED_L7RULE_COMPARE_TYPES)) <NEW_LINE> key = wtypes.wsattr(wtypes.StringType(max_length=255)) <NEW_LINE> value = wtypes...
Defines attributes that are acceptable of a PUT request.
62598f998c0ade5d55dc3539
class TestUser: <NEW_LINE> <INDENT> @database_only <NEW_LINE> def test_new_user(self, db): <NEW_LINE> <INDENT> api._assert_absent(db, model.User, 'bob') <NEW_LINE> api.user_create('bob', 'foo') <NEW_LINE> <DEDENT> @database_only <NEW_LINE> def test_duplicate_user(self, db): <NEW_LINE> <INDENT> api.user_create('alice', ...
Tests for the haas.api.user_* functions.
62598f99f7d966606f747d3b
class LauncherFilterWidget(QWidget): <NEW_LINE> <INDENT> def __init__(self, menu, parent=None): <NEW_LINE> <INDENT> QWidget.__init__(self, parent) <NEW_LINE> mainLayout = QHBoxLayout(self) <NEW_LINE> self.setLayout(mainLayout) <NEW_LINE> self.searchInput = LauncherFilterLineEdit(menu, self) <NEW_LINE> self.searchInput....
Filter menu widget which opens search when return is pressed
62598f998e71fb1e983bb80a
class MetadataStandard(db.EmbeddedDocument): <NEW_LINE> <INDENT> name = db.StringField(max_length=20, required=True) <NEW_LINE> reference = db.URLField()
Which standard the metadata follows: no explicit restrictions, but at this point will be either DDI or EML. The URL will point to a linkable code book. Again, no explicit restrictions, but it would be great if it were a URL that linked to basic documentation plus could be hashed for a namespace, e.g. http://example.com...
62598f993539df3088ecc00a
class _QuerySymbol(simpledialog._QueryDialog): <NEW_LINE> <INDENT> def validate(self): <NEW_LINE> <INDENT> string = self.entry.get() <NEW_LINE> if len(string) is 1: <NEW_LINE> <INDENT> return 1 <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> messagebox.showwarning("Wrong value", "Please enter one symbol", parent=self) <N...
Internal class for asking a symbol when user want add or search it
62598f992ae34c7f260aae36
class php(interface.resource,res_utls): <NEW_LINE> <INDENT> bin = "/usr/bin/php" <NEW_LINE> ini = "" <NEW_LINE> script = None <NEW_LINE> args = "" <NEW_LINE> run = "start" <NEW_LINE> def _before(self,context) : <NEW_LINE> <INDENT> self.ini = res_utls.value(self.ini) <NEW_LINE> self.bin = res_utls.value(sel...
!R.php: ini : "${PHP_INI}" script : "demo.php " args : "" run = "start"
62598f99507cdc57c63a4aea
class HasEndedMayCertifyTestCase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(HasEndedMayCertifyTestCase, self).setUp() <NEW_LINE> system = DummySystem(load_error_modules=True) <NEW_LINE> past_end = (datetime.now() - timedelta(days=12)).strftime("%Y-%m-%dT%H:%M:00") <NEW_LINE> futu...
Double check the semantics around when to finalize courses.
62598f99f548e778e596b300
class Constant(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def settings(): <NEW_LINE> <INDENT> return dict( cookie_secret = "HEREISTHESECRETVALUE", login_url = "/login" )
Here is the constant object and value.
62598f99097d151d1a2c0d79
class TestXenonntPmtError(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 make_instance(self, include_optional): <NEW_LINE> <INDENT> if include_optional : <NEW_LINE> <INDENT> return XenonntPmtError...
XenonntPmtError unit test stubs
62598f99925a0f43d25e7d91
class hull_white_1factor_process(ornstein_uhlenbeck_process): <NEW_LINE> <INDENT> pass
hull_white_1factor_process(paths=1, vshape=(), dtype=None, rng=None, steps=None, i0=0, info=None, getinfo=True, method='euler', x0=0., theta=0., k=1., sigma=1., dw=None, corr=None, rho=None) 1-factor Hull-White process (F=1 Hull-White process with F-index collapsed to a scalar). See ``hull_white_process`` class docume...
62598f99236d856c2adc92e3
class Disk(models.Model): <NEW_LINE> <INDENT> slot = models.CharField('插槽位', max_length=8) <NEW_LINE> model = models.CharField('磁盘型号', max_length=32) <NEW_LINE> capacity = models.FloatField('磁盘容量GB') <NEW_LINE> pd_type = models.CharField('磁盘类型', max_length=32) <NEW_LINE> server_obj = models.ForeignKey('Server', on_dele...
硬盘信息
62598f993539df3088ecc00b
class RedisMixin(object): <NEW_LINE> <INDENT> redis_key = None <NEW_LINE> redis_batch_size = None <NEW_LINE> redis_encoding = None <NEW_LINE> server = None <NEW_LINE> def start_requests(self): <NEW_LINE> <INDENT> return self.next_requests() <NEW_LINE> <DEDENT> def setup_redis(self, crawler=None): <NEW_LINE> <INDENT> if...
Mixin class to implement reading urls from a redis queue.
62598f994e4d562566372178
class ComptesConfig(AppConfig): <NEW_LINE> <INDENT> default_auto_field = "django.db.models.BigAutoField" <NEW_LINE> name = "comptes"
Application configuration for comptes.
62598f9960cbc95b0636409f
class Solution2: <NEW_LINE> <INDENT> def allPathsSourceTarget(self, graph): <NEW_LINE> <INDENT> N = len(graph) <NEW_LINE> path = [0] <NEW_LINE> result = [] <NEW_LINE> def dfs(curr): <NEW_LINE> <INDENT> if curr == N - 1: <NEW_LINE> <INDENT> result.append(path[:]) <NEW_LINE> return <NEW_LINE> <DEDENT> for next in graph[c...
@param graph: a 2D array @return: all possible paths from node 0 to node N-1
62598f99004d5f362081eea7
class InvalidParams(PeerError): <NEW_LINE> <INDENT> pass
Code -32602
62598f99b7558d5895463384
@endpoints.api(name='presepasendpoints', version='v1') <NEW_LINE> class PresepasApi(remote.Service): <NEW_LINE> <INDENT> @endpoints.method(WisdomMessageRequest, WisdomMessageResponse, path = "wisdom/new", name = "insert") <NEW_LINE> def insert_wisdom(self, request): <NEW_LINE> <INDENT> if not request.text: <NEW_LINE> <...
API v1.
62598f996aa9bd52df0d4c22
class DeliveryTest(TestCase): <NEW_LINE> <INDENT> def test(self): <NEW_LINE> <INDENT> wxa = Wxa() <NEW_LINE> order_id = random.randint(1000, 9999) <NEW_LINE> delivery_id = 'ZTO' <NEW_LINE> waybill_id = '' <NEW_LINE> res = wxa.get_delivery(delivery_id, waybill_id, order_id) <NEW_LINE> logger.debug(res) <NEW_LINE> self.a...
测试物流信息
62598f9955399d3f05626276
class Maint: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def _json_2_obj(p_json): <NEW_LINE> <INDENT> l_obj = RoomInformation <NEW_LINE> l_obj.Name = p_json['Name'] <NEW_LINE> l_obj.Key = 0 <NEW_LINE> l_obj.UUID = p_json['UUID'] <NEW_LINE> l_obj.Comment = p_json['Comment'] <NEW_LINE> l_obj.Corner = Coords._get_coords(...
Maintain the room internal database.
62598f99435de62698e9bb4a
class EmailProperty(_CoercingProperty): <NEW_LINE> <INDENT> data_type = Email
A property whose values are Email instances.
62598f9910dbd63aa1c7090c
class Projection(models.Model): <NEW_LINE> <INDENT> datetime = models.DateTimeField(auto_now_add=True) <NEW_LINE> json = models.TextField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> ordering = ("-datetime",) <NEW_LINE> get_latest_by = "datetime" <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return f"{self...
Mondesi's projected season totals from FanGraphs.
62598f99d53ae8145f9181e3
class AccessMethod(AWSProperty): <NEW_LINE> <INDENT> props: PropsDictType = { "AccessMethodType": (str, False), "CustomObjectIdentifier": (str, False), }
`AccessMethod <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-accessmethod.html>`__
62598f9976e4537e8c3ef30b
class TestCasesItems(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.list_data = ListItems() <NEW_LINE> self.list_data.list_items = [{'owner': 'random', 'list': 'List 1', 'name': 'Item 1', 'quantity': '2', 'price': '200'}, {'owner': 'random', 'list': 'List 1', 'name': 'Item 2', 'quanti...
Test cases for shopping list items
62598f9956ac1b37e6301f4a
class ForetDone(ModelView): <NEW_LINE> <INDENT> __name__ = 'download_shape.foret.done'
Import Done
62598f990c0af96317c560da
class _CommandEquipment: <NEW_LINE> <INDENT> def GetResources(self): <NEW_LINE> <INDENT> return {'Pixmap' : 'Arch_Equipment', 'MenuText': QT_TRANSLATE_NOOP("Arch_Equipment","Equipment"), 'Accel': "E, Q", 'ToolTip': QT_TRANSLATE_NOOP("Arch_Equipment","Creates an equipment object from a selected object (Part or Mesh)")}...
the Arch Equipment command definition
62598f996e29344779b003b1
class UserCreate(APIView): <NEW_LINE> <INDENT> permission_classes = [permissions.AllowAny] <NEW_LINE> def post(self, request, format=None): <NEW_LINE> <INDENT> user_data = json.loads(request.body.decode('utf-8')) <NEW_LINE> user_create = UserSerializer(data=user_data) <NEW_LINE> if user_create.is_valid(): <NEW_LINE> <I...
Post: acpets json user details
62598f99bde94217f3707515
class Meta: <NEW_LINE> <INDENT> model = PostBlog <NEW_LINE> fields = ['title', 'body']
Contiene el modelo que necesita el template
62598f998e71fb1e983bb80c
class BasicExceptionHandler(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def print_stack(thread_id, thread, stack, fh=sys.stderr, indent=0): <NEW_LINE> <INDENT> def print_indented(msg): <NEW_LINE> <INDENT> print('%s%s' % (' '*indent, msg), file=fh) <NEW_LINE> <DEDENT> print_indented('Thread%s: %s (%s, %d)' % (...
Threaded stack trace exception handling that leverages twitter.common.log if it is available. To use: from twitter.common.exceptions import BasicExceptionHandler BasicExceptionHandler.install() Then raise away!
62598f99a219f33f346c6571