code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class EmbeddingsLoader(): <NEW_LINE> <INDENT> def __init__(self,filename): <NEW_LINE> <INDENT> f = open(filename,'r') <NEW_LINE> self.word_to_id = dict() <NEW_LINE> self.embeddings = [] <NEW_LINE> self.emb_dim = -1 <NEW_LINE> for i,line in enumerate(f): <NEW_LINE> <INDENT> line_s = line.split() <NEW_LINE> if len(line_s...
Loads embeddings that follow the format: WORD1 E11 E12 .... E1N WORD2 E21 E22 .... E2N
6259904a07d97122c421808a
class IofloMaster(object): <NEW_LINE> <INDENT> def __init__(self, opts): <NEW_LINE> <INDENT> self.opts = opts <NEW_LINE> self.preloads = explode_opts(self.opts) <NEW_LINE> <DEDENT> def _make_workers(self): <NEW_LINE> <INDENT> for ind in range(int(self.opts['worker_threads'])): <NEW_LINE> <INDENT> proc = multiprocessing...
IofloMaster Class
6259904ab830903b9686ee6e
class MacHiddenFrame(BufferFrame): <NEW_LINE> <INDENT> preferences_tab = None <NEW_LINE> def initPositionAndSize(self): <NEW_LINE> <INDENT> pos = (90000, 90000) <NEW_LINE> size = (int(self.classprefs.width), int(self.classprefs.height)) <NEW_LINE> return pos, size <NEW_LINE> <DEDENT> def initRegisterWindow(self): <NEW_...
Special frame used to keep the OS X application open even if there are no visible frames on the screen. On other platforms, the application quits when the last frame is deleted, but on OS X the application typically stays active with the ability to load files or handle files dropped onto the dock.
6259904a16aa5153ce4018d5
class BEGIN(BaseFrame): <NEW_LINE> <INDENT> required_headers=("transaction",) <NEW_LINE> def __init__(self, **kwargs): <NEW_LINE> <INDENT> BaseFrame.__init__(self, **kwargs)
BEGIN is used to start a transaction. Transactions in this case apply to sending and acknowledging - any messages sent or acknowledged during a transaction will be processed atomically based on the transaction. headers: REQUIRED: transaction OPTIONAL: none
6259904aec188e330fdf9c85
class CloningDetail(LoginRequiredMixin, DetailView): <NEW_LINE> <INDENT> model = Cloning <NEW_LINE> template_name = 'cloning_detail.html' <NEW_LINE> template_object_name = 'cloning'
This view is for viewing Cloning.
6259904a15baa7234946337a
class NumpyDataset(Dataset): <NEW_LINE> <INDENT> def __init__(self, fname, key=None, order_file=None, revert=False, **kwargs): <NEW_LINE> <INDENT> self.path = Path(fname) <NEW_LINE> if not self.path.exists(): <NEW_LINE> <INDENT> raise RuntimeError('{} does not exist.'.format(self.path)) <NEW_LINE> <DEDENT> if self.path...
A PyTorch dataset for Numpy .npy/npz serialized tensor files. The serialized tensor's first dimension should be the batch dimension. Arguments: fname (str or Path): A string or ``pathlib.Path`` object for the relevant numpy file. key (str, optional): If `fname` is `.npz` file, its relevant `key` ...
6259904a73bcbd0ca4bcb671
class SizeLink(object): <NEW_LINE> <INDENT> WIDTH = WIDTH <NEW_LINE> HEIGHT = HEIGHT <NEW_LINE> def __init__(self, follower, follower_dim, followee, followee_dim=None, ratio=1.0): <NEW_LINE> <INDENT> if follower_dim not in DIMENSIONS: <NEW_LINE> <INDENT> raise ValueError("invalid follower dimension - %s" % (follower_di...
Helper class for setting the width or height (follower_dim) of a widget (follower) relative to another widget's (followee) width or height (followee_dim). Do not use links on widgets whose parents are layouts that automatically try to resize them, as this will lead to unexpected results due to conflicts between the lin...
6259904ae64d504609df9dc4
class TestInterface(unittest.TestCase): <NEW_LINE> <INDENT> pass
Tests all publicly available classes of slap Classes are checked *if* they implement interface and if the implementation is correct.
6259904ad6c5a102081e3505
class Soldado: <NEW_LINE> <INDENT> def __init__(self, posX, posY,direction, hp, vel, alc, damage, band): <NEW_LINE> <INDENT> self.posX=posX <NEW_LINE> self.posY=posY <NEW_LINE> self.direction=direction <NEW_LINE> self.hp=hp <NEW_LINE> self.vel=vel <NEW_LINE> self.alc=alc <NEW_LINE> self.damage=damage <NEW_LINE> self.ba...
posX: posición en el eje x posY: posición en el eje y direction: dirección en la que se moverá la unidad 1=arriba, 2=derecha, 3=abajo, 4=izquierda hp: puntos de vida vel: velocidad alc: alcance damage: daño band: bando (1,2)
6259904ad53ae8145f919849
class OrderError(FlumineException): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> super(OrderError, self).__init__(message)
Exception raised if incorrect order/order_type requested.
6259904ab57a9660fecd2e66
class WorkbookResource(TrackedResource): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type...
An azure resource object. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/provi...
6259904a21a7993f00c67352
class TestPaginatedDatasets(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 testPaginatedDatasets(self): <NEW_LINE> <INDENT> pass
PaginatedDatasets unit test stubs
6259904aa79ad1619776b469
class A0(Base): <NEW_LINE> <INDENT> _attrinfos = { 'x0': { 'writable': False }, 'z0': { 'writable': False }, 'k0': { 'writable': True }, 'creation_time': { 'writable': False }, '_prop0': {}, '_getter_called': {}, '_setter_called': {}, '_a0': { 'writable': False }, 'cpp_int': { 'cpp_setter': 'set_cpp_int' }, 'cpp_unlink...
This is a class that inherit directly from Base Parameters ---------- x0 : `int` This is doc of x0 from A0 y0 : `float` This is doc of y0 from A0 z0 : `float` This is doc of z0 from A0. z0 is not writable in A0 but will be writable in A1 k0 : `float` This is doc of k0 from A0. k0 is writable in ...
6259904b10dbd63aa1c71fc5
@run_for_test_types(TEST_TYPE, 'matlab') <NEW_LINE> class TestRegressionMatlab(TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.results_dir = os.path.join(os.path.dirname(__file__), 'fitbenchmarking_results') <NEW_LINE> <DEDENT> def test_results_consistent_all(self): <...
Regression tests for the Fitbenchmarking software with matlab fitting software
6259904bb830903b9686ee6f
class TestListDetail(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 testListDetail(self): <NEW_LINE> <INDENT> pass
ListDetail unit test stubs
6259904bbaa26c4b54d50694
class Loader(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> client = MongoClient(os.environ.get('DB_PORT_27017_TCP_ADDR', 'localhost'), 27017) <NEW_LINE> self.db = client.target_database <NEW_LINE> <DEDENT> def load(self, data): <NEW_LINE> <INDENT> table_name = type(data).__name__.lower() <NEW_LIN...
Load valid data or errors to database When instantiating Loader connection to db is established.
6259904b29b78933be26aab7
class EmbeddingDot: <NEW_LINE> <INDENT> def __init__(self, W): <NEW_LINE> <INDENT> self.embed = Embedding(W) <NEW_LINE> self.params = self.embed.params <NEW_LINE> self.grads = self.embed.grads <NEW_LINE> self.cache = None <NEW_LINE> <DEDENT> def forward(self, h, idx): <NEW_LINE> <INDENT> target_W = self.embed.forward(i...
EmbeddingDot class is one of key parts of NegativeSampling algorithm Without performing matrix product, EmbeddingDot class just selects the target row from Embedding matrix and perform dot product so that it has better performance than naive wrod2vec algorithm.
6259904b4e696a045264e815
class LibjpegTurbo(VProject): <NEW_LINE> <INDENT> NAME = 'libjpeg_turbo' <NEW_LINE> GROUP = 'c_projects' <NEW_LINE> DOMAIN = ProjectDomains.FILE_FORMAT <NEW_LINE> SOURCE = [ PaperConfigSpecificGit( project_name="libjpeg_turbo", remote="https://github.com/libjpeg-turbo/libjpeg-turbo", local="libjpeg-turbo", refspec="ori...
libjpeg-turbo is a JPEG image codec.
6259904b3eb6a72ae038ba45
@ClassFactory.register(ClassType.NETWORK) <NEW_LINE> class Squeeze(Module, OperatorSerializable): <NEW_LINE> <INDENT> def __init__(self, dim=0): <NEW_LINE> <INDENT> self.dim = dim <NEW_LINE> super(Squeeze, self).__init__() <NEW_LINE> <DEDENT> def __call__(self, inputs, **kwargs): <NEW_LINE> <INDENT> return tf.squeeze(i...
Class of Squeeze.
6259904b3cc13d1c6d466b22
class UserServiceServicer(object): <NEW_LINE> <INDENT> def Get(self, request, context): <NEW_LINE> <INDENT> context.set_code(grpc.StatusCode.UNIMPLEMENTED) <NEW_LINE> context.set_details('Method not implemented!') <NEW_LINE> raise NotImplementedError('Method not implemented!') <NEW_LINE> <DEDENT> def List(self, request...
A set of methods for managing PostgreSQL User resources.
6259904b6fece00bbacccda2
class NetworkAndComputeLister(NetDetectionMixin, command.Lister, metaclass=abc.ABCMeta): <NEW_LINE> <INDENT> pass
Network and Compute Lister Lister class for commands that support implementation via the network or compute endpoint. Such commands have different implementations for take_action() and may even have different arguments.
6259904b73bcbd0ca4bcb672
class Evaluation(Model): <NEW_LINE> <INDENT> def __init__(self, type_id: int=None, type_name: str=None, value: int=None): <NEW_LINE> <INDENT> self.swagger_types = { 'type_id': int, 'type_name': str, 'value': int } <NEW_LINE> self.attribute_map = { 'type_id': 'type_id', 'type_name': 'type_name', 'value': 'value' } <NEW_...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
6259904bcb5e8a47e493cb7c
class BinaryOpNode(OpNode): <NEW_LINE> <INDENT> def __init__(self, name: str, out_rel: rel.Relation, left_parent: OpNode, right_parent: OpNode): <NEW_LINE> <INDENT> super(BinaryOpNode, self).__init__(name, out_rel) <NEW_LINE> self.left_parent = left_parent <NEW_LINE> self.right_parent = right_parent <NEW_LINE> if self....
An OpNode with exactly two parents (e.g. - Join).
6259904bd6c5a102081e3507
class CompilationEnvironment: <NEW_LINE> <INDENT> context_name = None <NEW_LINE> columns = None <NEW_LINE> functions = None <NEW_LINE> def get_column(self, name): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return self.columns[name]() <NEW_LINE> <DEDENT> except KeyError: <NEW_LINE> <INDENT> raise CompilationError("Inv...
Base class for all compilation contexts. A compilation context provides column accessors specific to the particular row objects that we will access.
6259904bac7a0e7691f738c6
class TestExtensionsV1beta1ScaleStatus(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 testExtensionsV1beta1ScaleStatus(self): <NEW_LINE> <INDENT> model = kubernetes.client.models.extensions_v1beta...
ExtensionsV1beta1ScaleStatus unit test stubs
6259904b287bf620b6272fd4
class client_pool(list): <NEW_LINE> <INDENT> def __init__(self, *, name='default_pool', priority=0, weight=1): <NEW_LINE> <INDENT> self.pool_name = name <NEW_LINE> self.priority = priority <NEW_LINE> self.current_number = 0 <NEW_LINE> self.past_clients = [] <NEW_LINE> if weight < 0: <NEW_LINE> <INDENT> raise ValueError...
一个队列 通过继承增加对象池应有的功能
6259904b07f4c71912bb081f
class BoundingBoxInput(basic.BBoxInput): <NEW_LINE> <INDENT> def __init__(self, identifier, title, crss, abstract='', dimensions=2, metadata=None, min_occurs=1, max_occurs=1, as_reference=False, mode=MODE.NONE): <NEW_LINE> <INDENT> if metadata is None: <NEW_LINE> <INDENT> metadata = [] <NEW_LINE> <DEDENT> basic.BBoxInp...
:param identifier: The name of this input. :param data_type: Type of literal input (e.g. `string`, `float`...). :param crss: List of supported coordinate reference system (e.g. ['EPSG:4326'])
6259904bd53ae8145f91984c
class GoToRandomLocation(GoTo): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> GoTo.__init__(self, None) <NEW_LINE> <DEDENT> def execute(self): <NEW_LINE> <INDENT> if self.destination is None: <NEW_LINE> <INDENT> self.destination = Location(self.character.get_random_destination()) <NEW_LINE> <DEDENT> retur...
Command that makes a character go to a location chosen at random.
6259904bb57a9660fecd2e68
class Module_Scores(Collection): <NEW_LINE> <INDENT> def __init__(self, monitor): <NEW_LINE> <INDENT> super(Module_Scores, self).__init__(monitor) <NEW_LINE> fixed = self._meta_data['uri'].replace('_', '-') <NEW_LINE> self._meta_data['uri'] = fixed <NEW_LINE> self._meta_data['allowed_lazy_attributes'] = [Module_Score] ...
BIG-IP module scores monitor collection.
6259904b0a366e3fb87dddd1
class TestSizeViolation(PkgDirCheckBase): <NEW_LINE> <INDENT> def test_files_under_size_limit(self): <NEW_LINE> <INDENT> pkg = self.mk_pkg() <NEW_LINE> for name, size in (('small', 1024*10), ('limit', 1024*20-1)): <NEW_LINE> <INDENT> with open(pjoin(self.filesdir, name), 'w') as f: <NEW_LINE> <INDENT> f.seek(size) <NEW...
Check SizeViolation results.
6259904bbaa26c4b54d50696
class Gromacs(CMakePackage): <NEW_LINE> <INDENT> homepage = 'http://www.gromacs.org' <NEW_LINE> url = 'http://ftp.gromacs.org/gromacs/gromacs-5.1.2.tar.gz' <NEW_LINE> version('2016.3', 'e9e3a41bd123b52fbcc6b32d09f8202b') <NEW_LINE> version('5.1.4', 'ba2e34d59b3982603b4935d650c08040') <NEW_LINE> version('5.1.2', '614d0b...
GROMACS (GROningen MAchine for Chemical Simulations) is a molecular dynamics package primarily designed for simulations of proteins, lipids and nucleic acids. It was originally developed in the Biophysical Chemistry department of University of Groningen, and is now maintained by contributors in universities and researc...
6259904b8da39b475be045dc
class Tasks(_Tasks): <NEW_LINE> <INDENT> def set_parent(self, task_id, params={}, **options): <NEW_LINE> <INDENT> path = '/tasks/%s/setParent' % (task_id) <NEW_LINE> return self.client.post(path, params, **options)
Tasks resource
6259904b507cdc57c63a618b
class LineEndingWrapper(object): <NEW_LINE> <INDENT> def __init__(self, output): <NEW_LINE> <INDENT> self.__output = output <NEW_LINE> <DEDENT> def write(self, s): <NEW_LINE> <INDENT> self.__output.write(s.replace('\r\n', '\n').replace('\r', '\n')) <NEW_LINE> <DEDENT> def flush(self): <NEW_LINE> <INDENT> self.__output....
Replace line endings to work with sys.stdout. It seems that sys.stdout expects only '\n' as the line ending, no matter the platform. Otherwise, we get repeated line endings.
6259904be76e3b2f99fd9df6
class UpstreamServerProtocol(protocol.Protocol): <NEW_LINE> <INDENT> def __init__(self, network_component): <NEW_LINE> <INDENT> self.network_component = network_component <NEW_LINE> <DEDENT> def connectionMade(self): <NEW_LINE> <INDENT> self.network_component.conn_condition.acquire() <NEW_LINE> self.network_component.c...
CLient standard protocol
6259904b8e71fb1e983bceb1
class Project(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=32, default='') <NEW_LINE> desc = models.TextField(max_length=256, null=True) <NEW_LINE> create_time = models.DateTimeField(auto_now=True) <NEW_LINE> members = models.ManyToManyField(MyUser, blank=True)
Each User has many projects called project, each project also contains one or more images.
6259904bd7e4931a7ef3d462
class IPRangesField(models.TextField): <NEW_LINE> <INDENT> def __init__(self, *args, store_text=True, **kwargs): <NEW_LINE> <INDENT> self.store_text = store_text <NEW_LINE> super(IPRangesField, self).__init__(*args, **kwargs) <NEW_LINE> <DEDENT> def to_python(self, value): <NEW_LINE> <INDENT> if isinstance(value, IPRan...
Database field to store IP-address ranges in different syntax but unambiguous meaning. Supported notation derives from the possible parameters to iptools.IpRangeList (see http://python-iptools.readthedocs.org/en/latest/).
6259904b6e29344779b01a2d
class MailTypeTranslationInlineAdmin(admin.TabularInline): <NEW_LINE> <INDENT> verbose_name = _("Translation") <NEW_LINE> verbose_name_plural = _("Translations") <NEW_LINE> model = MailTypeTranslation <NEW_LINE> max_num = len(settings.LANGUAGES) <NEW_LINE> formfield_overrides = {models.TextField: {'widget': admin.widge...
Administration inline des traductions de types de courrier
6259904b16aa5153ce4018d9
class FormsetDataTable(FormsetDataTableMixin, horizon_tables.DataTable): <NEW_LINE> <INDENT> pass
A DataTable with support for Django Formsets. Note that :attr:`horizon.tables.DataTableOptions.row_class` and :attr:`horizon.tables.DataTaleOptions.cell_class` are overwritten in this class, so setting them in ``Meta`` has no effect. .. attribute:: formset_class A class made with ``django.forms.formsets.formset_...
6259904b0a50d4780f7067b3
class Paddle: <NEW_LINE> <INDENT> def __init__(self, x, y, width, height): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.width = width <NEW_LINE> self.height = height <NEW_LINE> self.color = (255,255,255) <NEW_LINE> self.vx = 0.0 <NEW_LINE> <DEDENT> def update(self): <NEW_LINE> <INDENT> self.x +=...
Encode the state of the paddle in Brick Breaker
6259904b7d847024c075d7be
class SetDevicePowerCycles(TestMixins.SetUInt32Mixin, OptionalParameterTestFixture): <NEW_LINE> <INDENT> CATEGORY = TestCategory.POWER_LAMP_SETTINGS <NEW_LINE> PID = 'DEVICE_POWER_CYCLES' <NEW_LINE> EXPECTED_FIELD = 'power_cycles' <NEW_LINE> REQUIRES = ['power_cycles'] <NEW_LINE> def OldValue(self): <NEW_LINE> <INDENT>...
Attempt to SET the device power_cycles.
6259904bec188e330fdf9c89
class RenderCommentFormNode(CommentFormNode): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def handle_token(cls, parser, token): <NEW_LINE> <INDENT> tokens = token.split_contents() <NEW_LINE> if tokens[1] != 'for': <NEW_LINE> <INDENT> raise template.TemplateSyntaxError("Second argument in %r tag must be 'for'" % tokens[...
Render the comment form directly
6259904b63d6d428bbee3bb6
class APITests(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> app.config['TESTING'] = True <NEW_LINE> app.config['WTF_CSRF_ENABLED'] = False <NEW_LINE> app.config['DEBUG'] = False <NEW_LINE> app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, TEST_DB) <N...
API test cases.
6259904b15baa7234946337e
class QuickSubscriber(object): <NEW_LINE> <INDENT> def __init__(self, topic_name=None, msg_class=Image, n_messages=1, verbose=False, tf_parent_frame=None, tf_timeout=1., tf_skip_if_no_tf=True): <NEW_LINE> <INDENT> if topic_name is None: <NEW_LINE> <INDENT> print("Usage: q = QuickSubscriber(topic_name, msg_class ,n_mess...
Quickly extracts messages
6259904b50485f2cf55dc377
class PhononMoment: <NEW_LINE> <INDENT> def __init__(self, frequencies, weights, eigenvectors=None): <NEW_LINE> <INDENT> self._frequencies = frequencies <NEW_LINE> self._eigenvectors = eigenvectors <NEW_LINE> self._weights = weights <NEW_LINE> self._fmin = None <NEW_LINE> self._fmax = None <NEW_LINE> self.set_frequency...
Calculate phonon state moments. Attributes ---------- moment : float or ndarray Phonon state moment of specified order (float) or projected phonon state moment of specified order (ndarray).
6259904b07f4c71912bb0821
class PythonOrgSearch(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.driver = webdriver.Chrome('C:\SeleniumDrivers\Chrome\chromedriver.exe') <NEW_LINE> self.driver.get("https://www.python.org") <NEW_LINE> <DEDENT> def test_search_in_python_org(self): <NEW_LINE> <INDENT> main_page = py...
A sample test class to show how page object works
6259904b3c8af77a43b68934
class Mul(BinaryOp): <NEW_LINE> <INDENT> prec = 2 <NEW_LINE> def __init__(self, A, B): <NEW_LINE> <INDENT> if A.shape[1] != B.shape[0]: <NEW_LINE> <INDENT> raise ValueError("Cannot perform the operation on a %s-tensor with a %s-tensor." % (A.shape, B.shape)) <NEW_LINE> <DEDENT> super(Mul, self).__init__(A, B) <NEW_LINE...
Abstract SLATE class representing the interior product or two tensors. By interior product, we mean an operation that results in a tensor of equal or lower rank via performing a contraction on arguments. This includes Matrix-Matrix and Matrix-Vector multiplication. :arg A: a :class:`TensorBase` object. :arg B: another...
6259904b0a366e3fb87dddd3
class DictionaryConfig(FermenatorConfig): <NEW_LINE> <INDENT> def get_relay_config(self): <NEW_LINE> <INDENT> return self._config['relays'] <NEW_LINE> <DEDENT> def get_datasource_config(self): <NEW_LINE> <INDENT> return self._config['datasources'] <NEW_LINE> <DEDENT> def get_beer_configuration(self): <NEW_LINE> <INDENT...
Directly provide a dictionary of configuration to this class. Object references should be in the text form rather than class instances. Essentially, this class is designed to be passed config read out of a yaml or json file, or passed directly from testing code. When instantiating this config, you should directly pass...
6259904b8da39b475be045de
class SimulationTimeCondition(py_trees.behaviour.Behaviour): <NEW_LINE> <INDENT> def __init__(self, timeout, success_rule="greater_than", name="SimulationTimeCondition"): <NEW_LINE> <INDENT> super(SimulationTimeCondition, self).__init__(name) <NEW_LINE> self.logger.debug("%s.__init__()" % (self.__class__.__name__)) <NE...
This class contains an atomic simulation time condition behavior. It uses the CARLA game time, not the system time which is used by the py_trees timer. Returns, if the provided success_rule (greater_than, less_than, equal_to) was successfully evaluated
6259904b507cdc57c63a618d
class SnippetDetail(APIView): <NEW_LINE> <INDENT> def get_object(self, pk): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return Snippet.objects.get(pk=pk) <NEW_LINE> <DEDENT> except Snippet.DoesNotExist: <NEW_LINE> <INDENT> raise Http404 <NEW_LINE> <DEDENT> <DEDENT> def get(self, request, pk, format=None): <NEW_LINE> <...
Snippet detail view as a class
6259904b8e05c05ec3f6f851
class PlanNotFoundError(AppError): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> message = ''.join(['Plan not found: ', message]) <NEW_LINE> super().__init__(message)
This class using when user try to find plan whick doesn't exists
6259904b435de62698e9d1f5
class ApacheThriftPyGen(ApacheThriftGenBase): <NEW_LINE> <INDENT> gentarget_type = PythonThriftLibrary <NEW_LINE> thrift_generator = 'py' <NEW_LINE> default_gen_options_map = { 'new_style': None } <NEW_LINE> sources_globs = ('**/*',) <NEW_LINE> def synthetic_target_type(self, target): <NEW_LINE> <INDENT> return PythonL...
Generate Python source files from thrift IDL files.
6259904b15baa7234946337f
class UserSerializer2(serializers.HyperlinkedModelSerializer): <NEW_LINE> <INDENT> snippets = serializers.HyperlinkedRelatedField(view_name='snippet-detail', many=True, read_only=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = User <NEW_LINE> fields = ('url', 'id', 'username', 'snippets')
用户序列化
6259904bcb5e8a47e493cb7e
class Parameter(TypeContainer): <NEW_LINE> <INDENT> def __init__(self, argname, typenode, direction=None, transfer=None, nullable=False, optional=False, allow_none=False, scope=None, caller_allocates=False, not_nullable=False): <NEW_LINE> <INDENT> TypeContainer.__init__(self, typenode, nullable, not_nullable, transfer,...
An argument to a function.
6259904bf7d966606f7492b0
class Profile: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.running = False <NEW_LINE> self.total = 0 <NEW_LINE> self.t0 = None <NEW_LINE> <DEDENT> def start(self,stopLast=False): <NEW_LINE> <INDENT> if self.running: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> self.running = True <NEW_LINE> self....
Object representing each timer for ParallelProfiler
6259904b3c8af77a43b68935
class TestRentControlStatus(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 testRentControlStatus(self): <NEW_LINE> <INDENT> pass
RentControlStatus unit test stubs
6259904b63b5f9789fe8655c
class AskbotTestCase(TestCase): <NEW_LINE> <INDENT> def create_user( self, username = 'user', email = None, notification_schedule = None, date_joined = None, status = 'a' ): <NEW_LINE> <INDENT> assert(username is not None) <NEW_LINE> assert(not hasattr(self, username)) <NEW_LINE> if email is None: <NEW_LINE> <INDENT> e...
adds some askbot-specific methods to django TestCase class
6259904bd4950a0f3b11183a
class Decimal(Number): <NEW_LINE> <INDENT> num_type = decimal.Decimal <NEW_LINE> default_error_messages = { 'special': 'Special numeric values (nan or infinity) are not permitted.', } <NEW_LINE> def __init__(self, places=None, rounding=None, allow_nan=False, as_string=False, **kwargs): <NEW_LINE> <INDENT> self.places =...
A field that (de)serializes to the Python ``decimal.Decimal`` type. It's safe to use when dealing with money values, percentages, ratios or other numbers where precision is critical. .. warning:: This field serializes to a `decimal.Decimal` object by default. If you need to render your data as JSON, keep in m...
6259904b8a349b6b4368763e
class Patient(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=100, verbose_name="Nome do paciente") <NEW_LINE> mother_name = models.CharField( max_length=100, verbose_name="Nome da mãe", null=True, blank=True) <NEW_LINE> address = models.CharField(max_length=300, verbose_name="Endereço") <NEW_LINE...
Patient model
6259904b23e79379d538d8ee
class Strecke: <NEW_LINE> <INDENT> def __init__(self, p1: Punkt, p2: Punkt) -> None: <NEW_LINE> <INDENT> assert isinstance(p1, Punkt) <NEW_LINE> assert isinstance(p2, Punkt) <NEW_LINE> self.p1 = p1 <NEW_LINE> self.p2 = p2 <NEW_LINE> <DEDENT> def __repr__(self) -> str: <NEW_LINE> <INDENT> return "{} - {}".format(self.p1...
Eine Strecke ist eine Linie zwischen zwei Punkten. Sie hat keine Richtung.
6259904b6e29344779b01a31
class ReadOnlyDict(IterableUserDict): <NEW_LINE> <INDENT> def __init__(self, source=None): <NEW_LINE> <INDENT> self.data = {} <NEW_LINE> if source: <NEW_LINE> <INDENT> self.data.update(source) <NEW_LINE> <DEDENT> <DEDENT> def __setitem__(self, key, item): <NEW_LINE> <INDENT> raise TypeError() <NEW_LINE> <DEDENT> def __...
A read-only dict.
6259904b29b78933be26aaba
class MetricsCounter: <NEW_LINE> <INDENT> def __init__(self, metric_name: str, count: int, description: str = ""): <NEW_LINE> <INDENT> self.__metric_name = metric_name <NEW_LINE> self.__count = count <NEW_LINE> self.__description = description <NEW_LINE> self.__start_time_seconds = None <NEW_LINE> self.__stop_time_seco...
Counter to be used as a with statement.
6259904b4e696a045264e818
class TowerContext(object): <NEW_LINE> <INDENT> def __init__(self, distribution_strategy, tower_id): <NEW_LINE> <INDENT> self._distribution_strategy = distribution_strategy <NEW_LINE> self._thread_context = _InTowerThreadMode(self) <NEW_LINE> self._tower_id = tower_id <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE>...
DistributionStrategy API inside a `call_for_each_tower()` call.
6259904b004d5f362081f9df
class KalturaTagService(KalturaServiceBase): <NEW_LINE> <INDENT> def __init__(self, client = None): <NEW_LINE> <INDENT> KalturaServiceBase.__init__(self, client) <NEW_LINE> <DEDENT> def search(self, tagFilter, pager = NotImplemented): <NEW_LINE> <INDENT> kparams = KalturaParams() <NEW_LINE> kparams.addObjectIfDefined("...
Search object tags
6259904b73bcbd0ca4bcb678
class AutoSizeParams(VegaLiteSchema): <NEW_LINE> <INDENT> _schema = {'$ref': '#/definitions/AutoSizeParams'} <NEW_LINE> def __init__(self, contains=Undefined, resize=Undefined, type=Undefined, **kwds): <NEW_LINE> <INDENT> super(AutoSizeParams, self).__init__(contains=contains, resize=resize, type=type, **kwds)
AutoSizeParams schema wrapper Mapping(required=[]) Attributes ---------- contains : enum('content', 'padding') Determines how size calculation should be performed, one of ``"content"`` or ``"padding"``. The default setting ( ``"content"`` ) interprets the width and height settings as the data rectangle (...
6259904b7cff6e4e811b6e2b
class UserEntity(Base): <NEW_LINE> <INDENT> pass
The user object.
6259904b29b78933be26aabb
class CountryAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('name', 'formal_name', 'country_code', 'number_of_photos') <NEW_LINE> list_editable = ('formal_name',) <NEW_LINE> list_select_related = True <NEW_LINE> search_fields = ('name', 'formal_name')
Django model admin for ``flother.apps.places.models.Country``.
6259904bd10714528d69f086
class LivingEntity(Entity): <NEW_LINE> <INDENT> def __init__(self, health=1, max_health=1, *groups, **kwargs): <NEW_LINE> <INDENT> super().__init__(*groups, **kwargs) <NEW_LINE> self.health = health <NEW_LINE> self.max_health = max_health <NEW_LINE> <DEDENT> def damage(self, amt): <NEW_LINE> <INDENT> self.health -= amt...
LivingEntity represents an entity that has health and can be in a living or dead state based on it's current health.
6259904b26068e7796d4dd35
class DefaultBunch(Bunch, defaultdict): <NEW_LINE> <INDENT> pass
Generic attribute container that also is a dict.
6259904bec188e330fdf9c8f
class CachedFile: <NEW_LINE> <INDENT> def __init__(self, file_or_url: str, cache_dir: Optional[Path] = None): <NEW_LINE> <INDENT> url = urlparse(file_or_url) <NEW_LINE> if url.scheme: <NEW_LINE> <INDENT> path = Path(url.path) <NEW_LINE> self.url = file_or_url <NEW_LINE> self.url_parsed = url <NEW_LINE> self.path = None...
Loads data from an URL, optionally caching it.
6259904b63d6d428bbee3bbc
class Loader(BaseComponent): <NEW_LINE> <INDENT> channel = "loader" <NEW_LINE> def __init__(self, auto_register=True, init_args=None, init_kwargs=None, paths=None, channel=channel): <NEW_LINE> <INDENT> super(Loader, self).__init__(channel=channel) <NEW_LINE> self._auto_register = auto_register <NEW_LINE> self._init_arg...
Create a new Loader Component Creates a new Loader Component that enables dynamic loading of components from modules either in local paths, eggs or zip archives.
6259904b96565a6dacd2d982
class HDFSClient: <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def generate_temp_files(need_certificate=NEED_CERTIFICATE): <NEW_LINE> <INDENT> if need_certificate: <NEW_LINE> <INDENT> with krbcontext(using_keytab=True, keytab_file=KEYTAB_PATH, principal=PRINCIPAL): <NEW_LINE> <INDENT> for node in HDFS.NODES: <NEW_LINE>...
using Kerberos authentication for downloading feature data
6259904b4428ac0f6e659923
class Dummy_Gaze_Mapper(Gaze_Mapping_Plugin): <NEW_LINE> <INDENT> def __init__(self, g_pool): <NEW_LINE> <INDENT> super(Dummy_Gaze_Mapper, self).__init__(g_pool) <NEW_LINE> <DEDENT> def update(self,frame,events): <NEW_LINE> <INDENT> gaze_pts = [] <NEW_LINE> for p in events['pupil_positions']: <NEW_LINE> <INDENT> if p['...
docstring for Dummy_Gaze_Mapper
6259904b30dc7b76659a0c26
class Watcher(VerboseObject): <NEW_LINE> <INDENT> def handle_broadcast_message(self, message, game): <NEW_LINE> <INDENT> self.handle_message("handle_broadcast", message, game) <NEW_LINE> <DEDENT> def handle_server_message(self, message, game, recipient): <NEW_LINE> <INDENT> self.handle_message("handle_server", message,...
Game message watcher. Contains simple handlers to pass messages to any handler methods defined in subclasses. More functionality may be included if deemed worthwhile to several watchers.
6259904b0fa83653e46f62d0
class NumArray: <NEW_LINE> <INDENT> def __init__(self, nums): <NEW_LINE> <INDENT> def fillST(st, cur, nums, start, end): <NEW_LINE> <INDENT> if start==end: <NEW_LINE> <INDENT> st[cur] = nums[start] <NEW_LINE> return st[cur] <NEW_LINE> <DEDENT> mid = start+(end-start)//2 <NEW_LINE> left = fillST(st, 2*cur, nums, start, ...
Thoughts: 1. Segment tree
6259904bb57a9660fecd2e6f
class TZlibTransportFactory(object): <NEW_LINE> <INDENT> _last_trans = None <NEW_LINE> _last_z = None <NEW_LINE> def getTransport(self, trans, compresslevel=9): <NEW_LINE> <INDENT> if trans == self._last_trans: <NEW_LINE> <INDENT> return self._last_z <NEW_LINE> <DEDENT> ztrans = TZlibTransport(trans, compresslevel) <NE...
Factory transport that builds zlib compressed transports. This factory caches the last single client/transport that it was passed and returns the same TZlibTransport object that was created. This caching means the TServer class will get the _same_ transport object for both input and output transports from this factor...
6259904bac7a0e7691f738ce
class RandomChannelSwap: <NEW_LINE> <INDENT> def __init__(self, prob=0.5): <NEW_LINE> <INDENT> self.prob = prob <NEW_LINE> self.permutations = ((0, 2, 1), (1, 0, 2), (1, 2, 0), (2, 0, 1), (2, 1, 0)) <NEW_LINE> self.swap_channels = ChannelSwap(order=(0, 1, 2)) <NEW_LINE> <DEDENT> def __call__(self, image, labels=None): ...
Randomly swaps the channels of RGB images. Important: Expects RGB input.
6259904b8e71fb1e983bceb8
class Alien(Sprite): <NEW_LINE> <INDENT> def __init__(self,ai_settings,screen): <NEW_LINE> <INDENT> super(Alien, self).__init__() <NEW_LINE> self.screen =screen <NEW_LINE> self.ai_settings = ai_settings <NEW_LINE> self.image = pygame.image.load('images/wxr.bmp') <NEW_LINE> self.rect = self.image.get_rect() <NEW_LINE> s...
表示单个外星人的类
6259904bbe383301e0254c0e
class Automaton(object): <NEW_LINE> <INDENT> def __init__(self, states, transitions, start_state): <NEW_LINE> <INDENT> if start_state not in states: <NEW_LINE> <INDENT> raise RuntimeError('Invalid start_state') <NEW_LINE> <DEDENT> self.states = dict((s, []) for s in states) <NEW_LINE> self.start_state = start_state <NE...
Create an automaton from a list of states and transitions. @states = maps State's to maps from @end_state to Transition
6259904b10dbd63aa1c71fd0
class IOauthVncbizSettings(Interface): <NEW_LINE> <INDENT> client_id = schema.ASCIILine( title = _(u'client_id' , default=u'Vncbiz client ID'), description = _(u'help_client_id' , default=u"Alternatively, you can of course use the ID of an existing app."), required = True, default = '', ) <NEW_LINE> auth_url = schema.U...
OAuth Vncbiz registry settings
6259904b23e79379d538d8f1
class CFlight(model.CEventsModel): <NEW_LINE> <INDENT> def __init__(self, fs_callsign): <NEW_LINE> <INDENT> super(CFlight, self).__init__() <NEW_LINE> self.s_name = "Flight event" <NEW_LINE> self.__s_callsign = fs_callsign <NEW_LINE> <DEDENT> @property <NEW_LINE> def s_callsign(self): <NEW_LINE> <INDENT> return self.__...
CFlight event class
6259904b379a373c97d9a41d
class AccountViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> lookup_field = 'username' <NEW_LINE> queryset = Account.objects.all() <NEW_LINE> serializer_class = AccountSerializer <NEW_LINE> def get_permissions(self): <NEW_LINE> <INDENT> if self.request.method in permissions.SAFE_METHODS: <NEW_LINE> <INDENT> return ...
Combined RESTful view for Account model.
6259904b07d97122c4218096
class Finding(Ebay): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(Finding, self).__init__(**kwargs) <NEW_LINE> domain = 'svcs.sandbox.ebay.com' if self.sandbox else 'svcs.ebay.com' <NEW_LINE> new = { 'siteid': self.global_ids[self.kwargs['country']]['countryabbr'], 'domain': domain, 'vers...
An eBay Finding API object
6259904b8e05c05ec3f6f854
class ImageRepository(ATCTBTreeFolder): <NEW_LINE> <INDENT> implements(IImageRepository) <NEW_LINE> schema = ImageRepositorySchema <NEW_LINE> security = ClassSecurityInfo() <NEW_LINE> __implements__ = updateInterfaces(ATCTBTreeFolder.__implemented__, IATBTreeFolder)
A repository to store images.
6259904b24f1403a926862c7
class RMda(RPackage): <NEW_LINE> <INDENT> homepage = "https://cran.r-project.org/package=mda" <NEW_LINE> url = "https://cran.r-project.org/src/contrib/mda_0.4-9.tar.gz" <NEW_LINE> list_url = "https://cran.r-project.org/src/contrib/Archive/mda" <NEW_LINE> version('0.4-9', '2ce1446c4a013e0ebcc1099a00269ad9') <NEW_LI...
Mixture and flexible discriminant analysis, multivariate adaptive regression splines (MARS), BRUTO.
6259904b94891a1f408ba0ef
class DagsterExecutionPlanSnapshotNotFoundError(DagsterError): <NEW_LINE> <INDENT> pass
Thrown when an expected execution plan snapshot could not be found on a PipelineRun.
6259904be76e3b2f99fd9dff
class Layer_Dropout: <NEW_LINE> <INDENT> def __init__(self, rate): <NEW_LINE> <INDENT> self.rate = 1 - rate <NEW_LINE> <DEDENT> def forward(self, values, training=True): <NEW_LINE> <INDENT> self.input = values <NEW_LINE> if not training: <NEW_LINE> <INDENT> self.output = values.copy() <NEW_LINE> return <NEW_LINE> <DEDE...
Layer_Dropout(rate) rate = amount of neurons you intend to disable
6259904bd10714528d69f087
class Md5Test(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.target = '.unittest.md5' <NEW_LINE> self.md5 = '098f6bcd4621d373cade4e832627b4f6' <NEW_LINE> open(self.target, 'w').write("test") <NEW_LINE> <DEDENT> def test_md5(self): <NEW_LINE> <INDENT> self.assertEqual(checksum.md5(self...
test md5 module
6259904b73bcbd0ca4bcb67c
class RNNEncoder(NeuralLayer): <NEW_LINE> <INDENT> def __init__(self, hidden_size, keep_prob): <NEW_LINE> <INDENT> self.hidden_size = hidden_size <NEW_LINE> self.keep_prob = keep_prob <NEW_LINE> self.rnn_cell_fw = tf.contrib.rnn.GRUCell(self.hidden_size) <NEW_LINE> self.rnn_cell_fw = tf.contrib.rnn.DropoutWrapper(self....
General-purpose module to encode a sequence using a RNN. It feeds the input through a RNN and returns all the hidden states. Note: In lecture 8, we talked about how you might use a RNN as an "encoder" to get a single, fixed size vector representation of a sequence (e.g. by taking element-wise max of hidden states). He...
6259904bdc8b845886d549b1
class Kwant: <NEW_LINE> <INDENT> def __init__(self, rent): <NEW_LINE> <INDENT> self.rent = rent <NEW_LINE> self.ked_s = [] <NEW_LINE> self.esy_leeff = False <NEW_LINE> self.trgr_d = False <NEW_LINE> self.trgr_ked = Gleff_s.d <NEW_LINE> self.kan_hasy = set([Gleff_s.t, Gleff_s.d, Gleff_s.f])
container for one or more leeff nods representing a quantity
6259904b1f037a2d8b9e5266
class User(AbstractUser): <NEW_LINE> <INDENT> name = CharField(_("Name of User"), blank=True, max_length=255) <NEW_LINE> def get_absolute_url(self): <NEW_LINE> <INDENT> return reverse("users:detail", kwargs={"username": self.username})
Default user for wgblog.
6259904bb5575c28eb7136c3
class _GradientNorm(StoppingCriteria): <NEW_LINE> <INDENT> def __init__(self, epsilon): <NEW_LINE> <INDENT> self.epsilon = epsilon <NEW_LINE> <DEDENT> def stopping_criterion(self, x, objective, **kwargs): <NEW_LINE> <INDENT> g = objective.gradient(x) <NEW_LINE> return np.linalg.norm(g) <= self.epsilon
Check if the L2 norm of the gradient is small Use the fact that, f(x) - f(x*) <= (1/2m)||g||_2^2 where g = gradient[f](x) m = strong convexity parameter of f
6259904b76d4e153a661dc71
class SigmaX(ObservableBase): <NEW_LINE> <INDENT> def __init__(self, absolute=False): <NEW_LINE> <INDENT> self.name = "SigmaX" <NEW_LINE> self.symbol = "X" <NEW_LINE> self.absolute = absolute <NEW_LINE> <DEDENT> def apply(self, nn_state, samples): <NEW_LINE> <INDENT> samples = samples.to(device=nn_state.device) <NEW_LI...
The :math:`\sigma_x` observable Computes the average magnetization in the X direction of a spin chain. :param absolute: Specifies whether to estimate the absolute magnetization. :type absolute: bool
6259904b50485f2cf55dc37f
class PoSTagger(Thread): <NEW_LINE> <INDENT> def __init__(self, data): <NEW_LINE> <INDENT> self.kwargs = data <NEW_LINE> Thread.__init__(kwargs=data) <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> import nltk <NEW_LINE> if not self.kwargs["sent"]: <NEW_LINE> <INDENT> raise RuntimeError("PosTagger expected 'sent...
Class that provides some functions/operations in multi-threads
6259904b0c0af96317c5775b
class DataGenerator(keras.utils.Sequence): <NEW_LINE> <INDENT> def __init__(self, data_path, dataset_name, batch_size=32, stop_after_batch=None): <NEW_LINE> <INDENT> self.data_file = h5py.File(data_path, "r") <NEW_LINE> self.X_name = "X_" + dataset_name <NEW_LINE> self.y_name = "y_" + dataset_name <NEW_LINE> self.n_exa...
Reads data iteratively as batches from h5f file
6259904b0fa83653e46f62d2
class halfnorm_gen(rv_continuous): <NEW_LINE> <INDENT> def _rvs(self): <NEW_LINE> <INDENT> return abs(self._random_state.standard_normal(size=self._size)) <NEW_LINE> <DEDENT> def _pdf(self, x): <NEW_LINE> <INDENT> return np.sqrt(2.0/np.pi)*np.exp(-x*x/2.0) <NEW_LINE> <DEDENT> def _logpdf(self, x): <NEW_LINE> <INDENT> r...
A half-normal continuous random variable. %(before_notes)s Notes ----- The probability density function for `halfnorm` is: .. math:: f(x) = \sqrt{2/\pi} e^{-\frac{x^2}{2}} for :math:`x > 0`. `halfnorm` is a special case of :math`\chi` with ``df == 1``. %(after_notes)s %(example)s
6259904b3617ad0b5ee07533
class OrderAdapter(BaseOrderAdapter): <NEW_LINE> <INDENT> adapts(IOrder) <NEW_LINE> implements(IOrderAdapter) <NEW_LINE> def articles(self): <NEW_LINE> <INDENT> res = [] <NEW_LINE> utility = getUtility(IUnicodeUtility) <NEW_LINE> shopping_site = IShoppingSite(self.context) <NEW_LINE> vat_adapter = IVATAdapter(self.cont...
Adapter for content type: collective.cart.core.Order
6259904b8e71fb1e983bceba
class CaseLoggerPlugin(object): <NEW_LINE> <INDENT> @pytest.hookimpl(tryfirst=True, hookwrapper=True) <NEW_LINE> def pytest_runtest_makereport(self, item, call): <NEW_LINE> <INDENT> yield <NEW_LINE> if call.when == "call": <NEW_LINE> <INDENT> item.excinfo = call.excinfo <NEW_LINE> <DEDENT> <DEDENT> @pytest.fixture(auto...
Base class for caselogger plugin functionality.
6259904bac7a0e7691f738d0
class AudioNN(nn.Module): <NEW_LINE> <INDENT> def __init__(self, base_input_size=6373, input_size=300, hidden_size=64, dropout=0.5, audio_model='saved_models/audio_model'): <NEW_LINE> <INDENT> super(AudioNN, self).__init__() <NEW_LINE> self.lin = nn.Linear(base_input_size, input_size) <NEW_LINE> self.relu = nn.ReLU() <...
NN that trains audio features - used for signular model (may remove through nn for complete model)
6259904bd53ae8145f919856
class TestUpdateSkills(APITestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.profile = create_profile(0) <NEW_LINE> self.skill1 = create_skill("Python") <NEW_LINE> self.skill2 = create_skill("PHP") <NEW_LINE> self.skill3 = create_skill("HTML") <NEW_LINE> self.profile_skill1 = ProfileSkill.objects....
Model tests for updating skills
6259904b498bea3a75a58f15
class Package(object): <NEW_LINE> <INDENT> def __init__(self, options={}): <NEW_LINE> <INDENT> self.options = options <NEW_LINE> <DEDENT> def start(self, path=None): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def check(self): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def f...
Base abstact analysis package.
6259904bbaa26c4b54d5069f