code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class FakeBazel(object): <NEW_LINE> <INDENT> def __init__(self, bazel_binary_path, bazelrc): <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> def command(self, command_name, args=None, collect_memory=False): <NEW_LINE> <INDENT> args = args or [] <NEW_LINE> fake_log('Executing Bazel command: bazel %s %s' % (command_name, ... | Fake class for utils.Bazel | 62598ff24c3428357761ab5e |
class _EnchantObject(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._this = None <NEW_LINE> if _e is not None: <NEW_LINE> <INDENT> self._init_this() <NEW_LINE> <DEDENT> <DEDENT> def _check_this(self,msg=None): <NEW_LINE> <INDENT> if self._this is None: <NEW_LINE> <INDENT> if msg is None: <NEW... | Base class for enchant objects.
This class implements some general functionality for interfacing with
the '_enchant' C-library in a consistent way. All public objects
from the 'enchant' module are subclasses of this class.
All enchant objects have an attribute '_this' which contains the
pointer to the underlying C-l... | 62598ff23cc13d1c6d466007 |
class PlayerCellInfo(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.is_hidden = True <NEW_LINE> self._adjacent_mines = 0 <NEW_LINE> self.is_flagged = False <NEW_LINE> <DEDENT> def count_adjacent_mines(self): <NEW_LINE> <INDENT> if(self.is_hidden): <NEW_LINE> <INDENT> return 0 <NEW_LINE> <DEDE... | Representation of what a player knows about a specific game cell
Lack's any hidden internal game state information | 62598ff226238365f5fad417 |
class STMTRS(Aggregate): <NEW_LINE> <INDENT> curdef = OneOf(*CURRENCY_CODES, required=True) <NEW_LINE> bankacctfrom = SubAggregate(BANKACCTFROM, required=True) <NEW_LINE> banktranlist = SubAggregate(BANKTRANLIST) <NEW_LINE> banktranlistp = Unsupported() <NEW_LINE> ledgerbal = SubAggregate(LEDGERBAL, required=True) <NEW... | OFX section 11.4.2.2 | 62598ff2187af65679d2a054 |
class EditForm(base.EditForm): <NEW_LINE> <INDENT> form_fields = form.Fields(IBannersPortlet) <NEW_LINE> form_fields['banner_folder'].custom_widget = UberSelectionWidget | Edit form for the banners portlet. | 62598ff326238365f5fad41b |
class SVCDescriptor(): <NEW_LINE> <INDENT> def __init__(self, name, display_name, username, ip, port): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self.display_name = display_name <NEW_LINE> self.username = username <NEW_LINE> self.ip = ip <NEW_LINE> self.port = port <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE... | This class captures enough information to describe a SVC/Storwize
controller. It is passed to SVC-related exceptions (SVCException
subclasses), so that the consumers of the exception can easily tell which
storage provider the exception originated from. | 62598ff3187af65679d2a055 |
class TestSimplifyVersion(object): <NEW_LINE> <INDENT> def test_normal_releases(self): <NEW_LINE> <INDENT> assert barman.utils.simplify_version("9.1.2") == "9.1" <NEW_LINE> assert barman.utils.simplify_version("10.1") == "10" <NEW_LINE> <DEDENT> def test_dev_releases(self): <NEW_LINE> <INDENT> assert barman.utils.simpl... | Tests for simplify_version function | 62598ff3187af65679d2a056 |
class Nurse(Enemy): <NEW_LINE> <INDENT> def __init__(self, g, pos): <NEW_LINE> <INDENT> Enemy.__init__(self, g, pos, 'nurse') <NEW_LINE> hitSoundFile = os.path.join("effects", "critter6.wav") <NEW_LINE> self.birdhit = pygame.mixer.Sound(hitSoundFile) <NEW_LINE> self.health = 2 <NEW_LINE> self.speed = 4 <NEW_LINE> self... | Nurse. runs around trying to stab you
| 62598ff3627d3e7fe0e07765 |
@attr('shard_1') <NEW_LINE> class BadComponentTest(ContainerBase): <NEW_LINE> <INDENT> __test__ = False <NEW_LINE> def get_bad_html_content(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def populate_course_fixture(self, course_fixture): <NEW_LINE> <INDENT> course_fixture.add_children( XBlockFixtureDesc('chapter',... | Tests that components with bad content do not break the Unit page. | 62598ff34c3428357761ab6c |
class StdOutListener(StreamListener): <NEW_LINE> <INDENT> def on_data(self, raw_data): <NEW_LINE> <INDENT> print(raw_data) <NEW_LINE> return True <NEW_LINE> <DEDENT> def on_error(self, status_code): <NEW_LINE> <INDENT> print(status_code) | Docstring | 62598ff33cc13d1c6d466015 |
class UpdateAPIView(mixins.UpdateModelMixin, GenericAPIView): <NEW_LINE> <INDENT> def put(self, request, *args, **kwargs): <NEW_LINE> <INDENT> return self.update(request, *args, **kwargs) <NEW_LINE> <DEDENT> def patch(self, request, *args, **kwargs): <NEW_LINE> <INDENT> return self.partial_update(request, *args, **kwar... | Adaptation of DRF UpdateAPIView | 62598ff326238365f5fad425 |
class PyNodesSocket(bpy.types.NodeSocket, NodeSocket): <NEW_LINE> <INDENT> bl_idname = "PyNodesSocket" <NEW_LINE> parameter_types = parameter_types_all | Generic pynodes socket | 62598ff34c3428357761ab70 |
class Polyhedron_QQ_polymake(Polyhedron_polymake, Polyhedron_QQ): <NEW_LINE> <INDENT> pass | Polyhedra over `\QQ` with polymake.
INPUT:
- ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``
- ``Hrep`` -- a list ``[ieqs, eqns]`` or ``None``
EXAMPLES::
sage: p = Polyhedron(vertices=[(0,0),(1,0),(0,1)], # optional - polymake
....: rays=[(1,1)], lines=[],
....:... | 62598ff3091ae356687054e4 |
class Sampling(tf.keras.layers.Layer): <NEW_LINE> <INDENT> def call(self, inputs): <NEW_LINE> <INDENT> z_mean, z_log_var = inputs <NEW_LINE> batch = tf.shape(z_mean)[0] <NEW_LINE> dim = tf.shape(z_mean)[1] <NEW_LINE> epsilon = tf.keras.backend.random_normal(shape=(batch, dim)) <NEW_LINE> return z_mean + tf.exp(0.5 * z_... | Uses (z_mean, z_log_var) to sample z, the vector encoding a digit. | 62598ff3627d3e7fe0e0776d |
@dns.immutable.immutable <NEW_LINE> class SPF(dns.rdtypes.txtbase.TXTBase): <NEW_LINE> <INDENT> pass | SPF record | 62598ff34c3428357761ab76 |
class AgentExtRpcCallback(object): <NEW_LINE> <INDENT> RPC_API_VERSION = '1.0' <NEW_LINE> START_TIME = timeutils.utcnow() <NEW_LINE> def __init__(self, plugin=None): <NEW_LINE> <INDENT> self.plugin = plugin <NEW_LINE> <DEDENT> def report_state(self, context, **kwargs): <NEW_LINE> <INDENT> time = kwargs['time'] <NEW_LIN... | Processes the rpc report in plugin implementations. | 62598ff3627d3e7fe0e0776f |
class UrlBase(object): <NEW_LINE> <INDENT> def __init__(self, source=None): <NEW_LINE> <INDENT> self.urls = list(map(Url, source.urls)) if source else [] <NEW_LINE> <DEDENT> def serialize(self): <NEW_LINE> <INDENT> return [url.serialize() for url in self.urls] <NEW_LINE> <DEDENT> def to_struct(self): <NEW_LINE> <INDENT... | Base class for url-aware objects. | 62598ff315fb5d323ce7f612 |
class ServiceThread(threading.Thread): <NEW_LINE> <INDENT> def __init__(self, service): <NEW_LINE> <INDENT> super(ServiceThread, self).__init__() <NEW_LINE> self.service = service <NEW_LINE> self.log = log_register('service_thread') <NEW_LINE> self._started = False <NEW_LINE> <DEDENT> def start(self): <NEW_LINE> <INDEN... | Sometimes a single service may have multiple threads of execution. Use this
class rather than the bare threading.Thread to help Chroma keep track of your threads.
This wraps a Thread-like object which has a `run` and `stop` method, passed in at
construction time` | 62598ff3c4546d3d9def76ee |
class EB_OpenSSL(ConfigureMake): <NEW_LINE> <INDENT> def configure_step(self, cmd_prefix=''): <NEW_LINE> <INDENT> cmd = "%s %s./config --prefix=%s threads shared %s" % (self.cfg['preconfigopts'], cmd_prefix, self.installdir, self.cfg['configopts']) <NEW_LINE> (out, _) = run_cmd(cmd, log_all=True, simple=False) <NEW_LIN... | Support for building OpenSSL | 62598ff33cc13d1c6d466021 |
class BasePlugin(SimpleItem, PropertyManager): <NEW_LINE> <INDENT> zmi_icon = 'fas fa-puzzle-piece' <NEW_LINE> security = ClassSecurityInfo() <NEW_LINE> manage_options = (({'label': 'Activate', 'action': 'manage_activateInterfacesForm'},) + SimpleItem.manage_options + PropertyManager.manage_options) <NEW_LINE> prefix =... | Base class for all PluggableAuthService Plugins
| 62598ff3627d3e7fe0e07777 |
class TenantRequestFactoryTestCase(TestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> tenant = TenantModel(schema_name="tenant1") <NEW_LINE> tenant.save(verbosity=0) <NEW_LINE> DomainModel.objects.create(tenant=tenant, domain="tenant1.test.com", is_primary=True) <NEW_LINE> c... | Test the behavior of the TenantRequestFactory. | 62598ff3ad47b63b2c5a8127 |
class BaseModel(gobject.GObject): <NEW_LINE> <INDENT> __gtype_name__ = "BaseModel" <NEW_LINE> __gsignals__ = { "loaded": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ()), "saved": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ()), } <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> gobject.GObject.__init__(self) <NE... | Base class for all models. | 62598ff326238365f5fad435 |
class ImageInfo(JObject): <NEW_LINE> <INDENT> NO_COLOR = None <NEW_LINE> HISTOGRAM_MATCHING_OFF = 'off' <NEW_LINE> HISTOGRAM_MATCHING_EQUALIZE = 'equalize' <NEW_LINE> HISTOGRAM_MATCHING_NORMALIZE = 'normalize' <NEW_LINE> def __init__(self, obj): <NEW_LINE> <INDENT> JObject.__init__(self, obj) <NEW_LINE> <DEDENT> def __... | This class contains information about how a product's raster data node is displayed as an image. | 62598ff4187af65679d2a064 |
class EDTestCasePluginUnitExecShiftImagev1_0(EDTestCasePluginUnit): <NEW_LINE> <INDENT> def __init__(self, _strTestName=None): <NEW_LINE> <INDENT> EDTestCasePluginUnit.__init__(self, "EDPluginExecShiftImagev1_0") <NEW_LINE> <DEDENT> def testCheckParameters(self): <NEW_LINE> <INDENT> xsDataInput = XSDataInputShiftImage(... | Those are all units tests for the EDNA Exec plugin ShiftImagev1_0 | 62598ff43cc13d1c6d466029 |
class BrownbagUserListView(generics.ListAPIView): <NEW_LINE> <INDENT> serializer_class = UserSerializer <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> return User.objects.filter(brownbag__isnull=True) | A view for getting a list of users who have not done brownbag | 62598ff4627d3e7fe0e0777d |
class Ui_client_gui(object): <NEW_LINE> <INDENT> def setupUi(self, client_gui): <NEW_LINE> <INDENT> client_gui.setObjectName("client_gui") <NEW_LINE> client_gui.resize(384, 256) <NEW_LINE> self.centralwidget = QtGui.QWidget(client_gui) <NEW_LINE> self.centralwidget.setObjectName("centralwidget") <NEW_LINE> self.gridLay... | Class for the client GUI | 62598ff4ad47b63b2c5a812c |
class MusicObject(dict): <NEW_LINE> <INDENT> def __init__(self, id, name, kind, full): <NEW_LINE> <INDENT> self['id'] = id <NEW_LINE> self['name'] = name <NEW_LINE> self['kind'] = kind <NEW_LINE> self['full'] = full <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def play(songs, breakpoint=-1): <NEW_LINE> <INDENT> conf_pa... | A dict representing a song, artist, or album. | 62598ff4187af65679d2a065 |
class SimpleDataExplorer: <NEW_LINE> <INDENT> def __init__(self, **params): <NEW_LINE> <INDENT> self._raw_data = pd.DataFrame() <NEW_LINE> self._columns_slice = [] <NEW_LINE> self._report_file = '' <NEW_LINE> self._boxplot_group = '' <NEW_LINE> self._parse_args(**params) <NEW_LINE> <DEDENT> def _parse_args(self, **para... | Calculates statistics on provided data set. | 62598ff426238365f5fad43b |
class OrderOperationRecord(models.Model): <NEW_LINE> <INDENT> order_sn = models.CharField(max_length=17, verbose_name='订单号', help_text='订单号') <NEW_LINE> status = models.IntegerField(choices=OPERATION_STATUS, default=1, verbose_name='订单状态', help_text='订单状态') <NEW_LINE> operator = models.IntegerField(default=0, verbose_n... | 订单状态操作记录表 | 62598ff4627d3e7fe0e0777f |
class WorkflowResult(AttributeClass): <NEW_LINE> <INDENT> workflow_id = Attribute( docstring="The id of the workflow associated with this result.", type_hint=str, ) <NEW_LINE> value = Attribute( docstring="The estimated value of the property and the uncertainty " "in that value.", type_hint=unit.Measurement, optional=T... | The result of executing a `Workflow` as part of a
`WorkflowGraph`. | 62598ff4091ae356687054f8 |
@method_decorator(admin_login_required, name='dispatch') <NEW_LINE> class AdminDeleteClient(generics.DestroyAPIView): <NEW_LINE> <INDENT> serializer_class = ClientListSerializer <NEW_LINE> model = ClientModel <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.query_params = None <NEW_LINE> self.return_response = R... | Admin view for Deleting a single client | 62598ff426238365f5fad443 |
class Spider(Firefox): <NEW_LINE> <INDENT> def __init__(self, name, home_page): <NEW_LINE> <INDENT> super(Spider, self).__init__(name, home_page) <NEW_LINE> <DEDENT> def parse_page(self): <NEW_LINE> <INDENT> news_ele = self.driver.find_element_by_id('news') <NEW_LINE> news_ele = news_ele.find_elements_by_class_name('Q-... | docstring for Spider | 62598ff43cc13d1c6d466033 |
class ParsableErrorMiddleware(object): <NEW_LINE> <INDENT> def __init__(self, app): <NEW_LINE> <INDENT> self.app = app <NEW_LINE> <DEDENT> def __call__(self, environ, start_response): <NEW_LINE> <INDENT> state = {} <NEW_LINE> def replacement_start_response(status, headers, exc_info=None): <NEW_LINE> <INDENT> try: <NEW_... | Replace error body with something the client can parse. | 62598ff44c3428357761ab8e |
class Cell(object): <NEW_LINE> <INDENT> def __init__(self, pos, cell_type, edm_cells, province, town_flag=False): <NEW_LINE> <INDENT> self.pos = pos <NEW_LINE> if not len(edm_cells) == 6: <NEW_LINE> <INDENT> return <NEW_LINE> <DEDENT> self.edm_cells = edm_cells <NEW_LINE> if not province: <NEW_LINE> <INDENT> return <NE... | The map consists of a 2-dimensional array (dict) of cells
there is no smaller step on the map than a cell | 62598ff426238365f5fad445 |
class Delete(base.DeleteCommand): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> command_lib.AddNamespaceResourceArg(parser, 'to delete') <NEW_LINE> <DEDENT> def Run(self, args): <NEW_LINE> <INDENT> namespace_ref = args.CONCEPTS.namespace.Parse() <NEW_LINE> namespace_name = namespace... | Delete a Kubernetes Managed Namespace. | 62598ff44c3428357761ab90 |
class DateRange(object): <NEW_LINE> <INDENT> def __init__(self, start, end): <NEW_LINE> <INDENT> self.start = min(start, end) <NEW_LINE> self.end = max(start, end) <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return 'DateRange({start} to {end})'.format(start=self.start, end=self.end) <NEW_LINE> <DEDENT> ... | DateRange object.
Taking start, end as input. | 62598ff4091ae35668705502 |
class FancyTriMesh(LUTBase): <NEW_LINE> <INDENT> scalar_visibility = Bool(False, desc='show scalar visibility') <NEW_LINE> color = vtk_color_trait((0.5, 1.0, 0.5)) <NEW_LINE> tube_radius = Float(0.0, desc='radius of the tubes') <NEW_LINE> sphere_radius = Float(0.0, desc='radius of the spheres') <NEW_LINE> tube_filter =... | Shows a mesh of triangles and draws the edges as tubes and
points as balls. | 62598ff4c4546d3d9def76fa |
class AcousticGuitarFractionFeature(InstrumentFractionFeature): <NEW_LINE> <INDENT> id = 'I12' <NEW_LINE> def __init__(self, dataOrStream=None, *arguments, **keywords): <NEW_LINE> <INDENT> super().__init__(dataOrStream=dataOrStream, *arguments, **keywords) <NEW_LINE> self.name = 'Acoustic Guitar Fraction' <NEW_LINE> se... | A feature extractor that extracts the fraction of all Note Ons belonging to
acoustic guitar patches (General MIDI patches 25 and 26).
>>> s1 = stream.Stream()
>>> s1.append(instrument.AcousticGuitar())
>>> s1.repeatAppend(note.Note(), 3)
>>> s1.append(instrument.Tuba())
>>> s1.append(note.Note())
>>> fe = features.jSy... | 62598ff4091ae35668705504 |
class Antecedente(BaseModel): <NEW_LINE> <INDENT> patologicos = models.TextField(u'Patológicos', blank=True) <NEW_LINE> quirurgicos = models.TextField(u'Quirúrgicos', blank=True) <NEW_LINE> traumaticos = models.TextField(u'Traumáticos', blank=True) <NEW_LINE> alergicos = models.TextField(u'Alérgicos', blank=True) <NEW_... | Representa la historia médica del paciente.
Contiene datos médicos y relevantes sobre el paciente. | 62598ff4187af65679d2a06c |
class JoinRideSerializer(serializers.ModelSerializer): <NEW_LINE> <INDENT> passenger = serializers.IntegerField() <NEW_LINE> class Meta: <NEW_LINE> <INDENT> model = Ride <NEW_LINE> fields = ('passenger',) <NEW_LINE> <DEDENT> def validate_passenger(self, data): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> user = User.ob... | Join ride serializer | 62598ff4c4546d3d9def76fc |
class Base64JsonField(models.TextField): <NEW_LINE> <INDENT> __metaclass__ = models.SubfieldBase <NEW_LINE> def get_prep_value(self, value): <NEW_LINE> <INDENT> if value is not None: <NEW_LINE> <INDENT> return 'base64:' + base64.encodestring(json.dumps(value)) <NEW_LINE> <DEDENT> <DEDENT> def to_python(self, value): <N... | Base64JsonField is a custom field intended to store a JSON data in a Base64 format to a text column in relational
databases. Stored data are first serialized into a JSON string representation and then encoded into a Base64 format.
When retrieving this data, same logic is applied in a reverse order. | 62598ff4187af65679d2a06e |
class TriggerTimeSeriesDataPlot(TimeSeriesDataPlot): <NEW_LINE> <INDENT> type = 'trigger-timeseries' <NEW_LINE> data = 'triggers' <NEW_LINE> def process(self): <NEW_LINE> <INDENT> (plot, axes) = self.init_plot() <NEW_LINE> ax = axes[0] <NEW_LINE> labels = self.pargs.pop('labels', self.channels) <NEW_LINE> if isinstance... | Custom time-series plot to handle discontiguous `TimeSeries`.
| 62598ff43cc13d1c6d46603d |
@config(compat="linux", cat="manage", tags=["hide", "rootkit", "stealth"]) <NEW_LINE> class HideProcessModule(PupyModule): <NEW_LINE> <INDENT> dependencies=["pupystealth"] <NEW_LINE> def init_argparse(self): <NEW_LINE> <INDENT> self.arg_parser = PupyArgumentParser(prog="hide_process", description=self.__doc__) <NEW_LIN... | Edit current process argv & env not to look suspicious | 62598ff44c3428357761ab98 |
class Module: <NEW_LINE> <INDENT> def __init__(self, name: str, owner = None): <NEW_LINE> <INDENT> self.name = name <NEW_LINE> self._owner = owner <NEW_LINE> self.ports: Dict[str, Port] = {} <NEW_LINE> self.gates: Dict[str, Gate] = {} <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> return "{}{}('{}')".forma... | Modules are used to model components that interact with each other, as
for example network stack layers.
A module has a number of ports and gates that can be used to exchange
data with it and connect it to other modules.
Modules provide the methods :meth:`_addPort` and :meth:`_addGate` that
allow to add ports and gates... | 62598ff4ad47b63b2c5a8140 |
class ClonesRecombModel(Target): <NEW_LINE> <INDENT> def __init__(self, infile, outfile): <NEW_LINE> <INDENT> Target.__init__(self) <NEW_LINE> self.infile = infile <NEW_LINE> self.outfile = outfile <NEW_LINE> <DEDENT> def run(self): <NEW_LINE> <INDENT> clones = pickle.load(gzip.open(self.infile, 'rb')) <NEW_LINE> recom... | Get the recomb_model related counts for a subset of clones
Return a "RecomModel" obj picked to outfile | 62598ff43cc13d1c6d46603f |
class IntegrationTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> cleanTestDir() <NEW_LINE> self.dirac = Dirac() <NEW_LINE> gLogger.setLevel("DEBUG") <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass | Base class for the integration and regression tests | 62598ff4c4546d3d9def76ff |
class DeleteContact(Choreography): <NEW_LINE> <INDENT> def __init__(self, temboo_session): <NEW_LINE> <INDENT> Choreography.__init__(self, temboo_session, '/Library/Google/Contacts/DeleteContact') <NEW_LINE> <DEDENT> def new_input_set(self): <NEW_LINE> <INDENT> return DeleteContactInputSet() <NEW_LINE> <DEDENT> def _ma... | Create a new instance of the DeleteContact Choreography. A TembooSession object, containing a valid
set of Temboo credentials, must be supplied. | 62598ff4627d3e7fe0e07795 |
class ActiveCache(object): <NEW_LINE> <INDENT> __cached_value__ = None <NEW_LINE> __initialised__ = False <NEW_LINE> def __init__(self, start_immediate=False): <NEW_LINE> <INDENT> self.running = False <NEW_LINE> self.notify_queues = [] <NEW_LINE> if start_immediate: <NEW_LINE> <INDENT> self.start() <NEW_LINE> <DEDENT> ... | Abstract class (requires an implementation of `refresh_cache`) that
caches the result of `refresh_cache` and actively refreshes it whenever a
trigger occurs (as managed by the implementation of `trigger`).
The regeneration happens off thread and when complete the cache reference
is updated. Thus there is never a block... | 62598ff4187af65679d2a072 |
class OpensStreetMapService(MapService): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> MapService.__init__(self) <NEW_LINE> <DEDENT> def calc_url(self): <NEW_LINE> <INDENT> place = self._get_first_place()[0] <NEW_LINE> latitude, longitude = self._lat_lon(place) <NEW_LINE> if longitude and latitude: <NEW_L... | Map service using http://openstreetmap.org
Resource: http://wiki.openstreetmap.org/wiki/Nominatim | 62598ff4ad47b63b2c5a8147 |
class DBForm(object): <NEW_LINE> <INDENT> def fetch_data(self, req): <NEW_LINE> <INDENT> data = req.GET.mixed() <NEW_LINE> filter = dict((col.name, data.get(col.name)) for col in sa.orm.class_mapper(self.entity).primary_key) <NEW_LINE> self.value = req.GET and self.entity.query.filter_by(**filter).first() or None <NEW_... | Base mixin class for DB related form widgets
Provides helper methods for fetching and storing data to a model | 62598ff4627d3e7fe0e07799 |
class World(object): <NEW_LINE> <INDENT> def add_foodspot(self, foodspot): <NEW_LINE> <INDENT> self.foodspots.add((foodspot.x, foodspot.y)) <NEW_LINE> <DEDENT> def remove_foodspot(self, foodspot): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.foodspots.remove((foodspot.x,foodspot.y)) <NEW_LINE> <DEDENT> except KeyE... | Objekt för spelplan
Objektet har koll på ytor på spelplanen som är tillgängliga att
lägga ut mat på. Objektet ser även till att lägga ut äpplet på
spelplanen samt sparar äpplets koordinat. Koordinaten sparas för
att kunna kontrollera när ormens huvud kolliderar med äpplet.
Objektet är superklass till Namedialog som a... | 62598ff526238365f5fad45d |
class DimMapping(object): <NEW_LINE> <INDENT> def __init__(self, dimension, regex='(.*)', separator=None): <NEW_LINE> <INDENT> self.dimension = dimension <NEW_LINE> self.regex = regex <NEW_LINE> self.separator = separator <NEW_LINE> self.cregex = re.compile(regex) if regex != '(.*)' else None <NEW_LINE> <DEDENT> def ma... | Describes how to transform dictionary like metadata attached to a metric into Monasca dimensions
| 62598ff5091ae35668705519 |
class oaiharvest_production_sync(oaiharvest_harvest_repositories): <NEW_LINE> <INDENT> object_type = "workflow" <NEW_LINE> record_workflow = "oaiharvest_production_sync_record" <NEW_LINE> workflow = [ write_something_generic("Initialization", [task_update_progress, write_message]), init_harvesting, write_something_gene... | Main workflow for harvesting arXiv via OAI-PMH (oaiharvester). | 62598ff53cc13d1c6d46604f |
class ID_ (pyxb.binding.basis.complexTypeDefinition): <NEW_LINE> <INDENT> _TypeDefinition = pyxb.binding.datatypes.ID <NEW_LINE> _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE <NEW_LINE> _Abstract = False <NEW_LINE> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'ID') <NEW_LINE> _XSDLocat... | Complex type {http://schemas.xmlsoap.org/soap/encoding/}ID with content type SIMPLE | 62598ff5c4546d3d9def7706 |
class MacOSXTTSPlugin(plugin.TTSPlugin): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> plugin.TTSPlugin.__init__(self, *args, **kwargs) <NEW_LINE> self._logger = logging.getLogger(__name__) <NEW_LINE> self._logger.warning("This TTS plugin doesn't have multilanguage " + "support!") <NEW_LI... | Uses the OS X built-in 'say' command | 62598ff5c4546d3d9def7707 |
class ServerSettings(BaseSettings): <NEW_LINE> <INDENT> def _add_console_arguments(self): <NEW_LINE> <INDENT> super(ServerSettings, self)._add_console_arguments() <NEW_LINE> self._parser.add_argument( '--style', default='Nematus', help='API style; see `README.md` (default: Nematus)') <NEW_LINE> self._parser.add_argumen... | Console interface for server mode
Most parameters required in default mode are provided with each translation
request to the server (see `nematus/server/request.py`). | 62598ff5627d3e7fe0e077a9 |
class VIEW3D_OT_imperial_measurement(bpy.types.Operator): <NEW_LINE> <INDENT> bl_idname = "object.imperial_measure" <NEW_LINE> bl_label = "Imperial Measurement" <NEW_LINE> bl_options = { 'REGISTER', 'UNDO' } <NEW_LINE> def execute(self, context): <NEW_LINE> <INDENT> scene = context.scene <NEW_LINE> bpy.context.scene.un... | Sets World Units to Imperial to input Inches and Feet | 62598ff5c4546d3d9def7709 |
class EventMapper(object): <NEW_LINE> <INDENT> event_mapper = {"CUSTOMER": (Customers, CustomersMapper, CustomerData), "SITE_VISIT": (SiteVisits, SiteVisitMapper, SiteVisitDataStore), "ORDER": (Orders, OrderMapper,OrderData), "IMAGE": (ImageUpload, ImageMapper, ImageData)} <NEW_LINE> def __init__(self, logger=None): <N... | Class creates in-memory data structure
and evaluates top x valued customers
using simple ltv | 62598ff53cc13d1c6d466058 |
class TwitterListener(StreamListener): <NEW_LINE> <INDENT> def __init__(self, fetched_tweets_filename): <NEW_LINE> <INDENT> self.fetched_tweets_filename = fetched_tweets_filename <NEW_LINE> <DEDENT> def on_data(self, data): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> print(data) <NEW_LINE> with open(self.fetched_tweet... | "
A basic listener class that fetches the data from the API | 62598ff5627d3e7fe0e077ab |
class TransportProtocolAdapter(TransportAdapter): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(TransportProtocolAdapter, self).__init__() <NEW_LINE> protocol_scenarios = [ ('HTTP/1.0', dict(_protocol_version='HTTP/1.0')), ('HTTP/1.1', dict(_protocol_version='HTTP/1.1')), ] <NEW_LINE> self.scenari... | Generate the same test for each protocol implementation.
In addition to the transport adaptatation that we inherit from. | 62598ff5c4546d3d9def770a |
class FastaFile(object): <NEW_LINE> <INDENT> def __init__(self, filename): <NEW_LINE> <INDENT> self.filename = filename <NEW_LINE> self._fasta_file = None <NEW_LINE> try: <NEW_LINE> <INDENT> with g2g_utils.silence(filter_fai, sys.stderr): <NEW_LINE> <INDENT> self._fasta_file = pysam.FastaFile(self.filename) <NEW_LINE> ... | Encapsulate a Fasta file
Delegation used with `pysam.FastaFile` | 62598ff515fb5d323ce7f650 |
class ModelValidator(object): <NEW_LINE> <INDENT> def __init__(self, validator, my_latest_bet, latest_bets, target_estimate): <NEW_LINE> <INDENT> self.model_of = validator <NEW_LINE> self.weight = validator.weight <NEW_LINE> self.my_latest_bet = my_latest_bet <NEW_LINE> self.target_estimate = target_estimate <NEW_LINE>... | Simulates a model validator. | 62598ff5ad47b63b2c5a8160 |
class AisleTurnEnv(PlanEnv): <NEW_LINE> <INDENT> def __init__(self, config): <NEW_LINE> <INDENT> self._config = config <NEW_LINE> path, costmap = path_and_costmap_from_config(config) <NEW_LINE> super(AisleTurnEnv, self).__init__(costmap, path, config.env_params) <NEW_LINE> <DEDENT> def get_robot(self): <NEW_LINE> <INDE... | Robotic Planning Environment in which the task
is to turn right into an aisle based on provided
config (of type AisleTurnEnvParams), that specifies
the geometry of the turn. | 62598ff54c3428357761abbd |
class User: <NEW_LINE> <INDENT> def __init__(self, username, password): <NEW_LINE> <INDENT> self.username=username <NEW_LINE> self.password=password | used to create an object containing username and password | 62598ff515fb5d323ce7f657 |
class TestWriteFile(object): <NEW_LINE> <INDENT> def setup(self): <NEW_LINE> <INDENT> self.r1 = remote.Remote('r1', ssh=Mock()) <NEW_LINE> self.c = cluster.Cluster( remotes=[ (self.r1, ['foo', 'bar']), ], ) <NEW_LINE> <DEDENT> @patch("teuthology.orchestra.remote.RemoteShell.write_file") <NEW_LINE> def test_write_file(s... | Tests for cluster.write_file | 62598ff5187af65679d2a082 |
class USAddress(models.Model): <NEW_LINE> <INDENT> address_lines = JSONField(default=empty_list) <NEW_LINE> street = models.CharField(max_length=128, null=True) <NEW_LINE> city = models.CharField(max_length=64, null=True) <NEW_LINE> state = USPostalCodeField(null=True) <NEW_LINE> zip_code = models.CharField(max_length=... | An abstract representation of a United States Address. | 62598ff5627d3e7fe0e077b9 |
class DeleteReferenceImageRequest(proto.Message): <NEW_LINE> <INDENT> name = proto.Field(proto.STRING, number=1,) | Request message for the ``DeleteReferenceImage`` method.
Attributes:
name (str):
Required. The resource name of the reference image to
delete.
Format is:
``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`` | 62598ff63cc13d1c6d466068 |
class TestListingElectricalaudioB5(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.board_id = 6 <NEW_LINE> self.posts_per_page = 20 <NEW_LINE> self.html_path = os.path.join('tests', 'electricalaudio.f5.htm') <NEW_LINE> with open(self.html_path, 'r') as f: <NEW_LINE> <INDENT> self.page_... | phpBB v3
http://www.electricalaudio.com/phpBB3/viewforum.php?f=5
Normal viewforum page | 62598ff6ad47b63b2c5a816a |
class IReadWriteTestsMixin: <NEW_LINE> <INDENT> def getFileReader(self, content): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def getFileWriter(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> def getFileContent(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NE... | Generic tests for the C{IReadFile} and C{IWriteFile} interfaces. | 62598ff64c3428357761abc6 |
class OrgHomeView(View): <NEW_LINE> <INDENT> def get(self, request, org_id): <NEW_LINE> <INDENT> current_page = "home" <NEW_LINE> courses_org = CourseOrg.objects.get(id=int(org_id)) <NEW_LINE> has_fav = False <NEW_LINE> if request.user.is_authenticated(): <NEW_LINE> <INDENT> if UserFavorite.objects.filter(user=request.... | 机构首页 | 62598ff64c3428357761abc8 |
class componentSettings(MayaQWidgetDockableMixin, guide.componentMainSettings): <NEW_LINE> <INDENT> def __init__(self, parent=None): <NEW_LINE> <INDENT> self.toolName = TYPE <NEW_LINE> pyqt.deleteInstances(self, MayaQDockWidget) <NEW_LINE> super(self.__class__, self).__init__(parent=parent) <NEW_LINE> self.setup_compon... | Create the component setting window | 62598ff6c4546d3d9def7715 |
class translate(_edit_command): <NEW_LINE> <INDENT> def __init__(self, language): <NEW_LINE> <INDENT> if language not in ly.pitch.pitchInfo: <NEW_LINE> <INDENT> raise ValueError() <NEW_LINE> <DEDENT> self.language = language <NEW_LINE> <DEDENT> def edit(self, opts, cursor): <NEW_LINE> <INDENT> import ly.pitch.translate... | translate pitch names | 62598ff615fb5d323ce7f661 |
class DynamicAllowedContentFTI(FactoryTypeInformation): <NEW_LINE> <INDENT> meta_type = "DynamicAllowedContentFTI for InnerContentContainer" <NEW_LINE> security = ClassSecurityInfo() <NEW_LINE> security.declarePublic('allowType') <NEW_LINE> def allowType(self, contentType): <NEW_LINE> <INDENT> atool = getToolByName(sel... | Allow content to be added if it implements BaseInnercontentProxy | 62598ff6091ae3566870553a |
class VariableItem(Item): <NEW_LINE> <INDENT> __slots__ = ('_name', '_getitem_func') <NEW_LINE> def __init__(self, name, getitem_func=operator.getitem): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._getitem_func = getitem_func <NEW_LINE> <DEDENT> def evaluate(self, ns): <NEW_LINE> <INDENT> try: <NEW_LINE> <IND... | A named variable that's accessed in the namespace.
If a getitem_func is given, it is called when this item is accessed using
the item syntax ``[n]``, with this item as first argument, and then the
specified index. | 62598ff64c3428357761abca |
class UserState: <NEW_LINE> <INDENT> __slots__ = [ 'user', 'level', 'points', 'actual_coins', 'potential_coins', 'achievements', 'last_changed' ] <NEW_LINE> def __init__(self, user: User, level: int, points: Decimal, actual_coins: Decimal, potential_coins: Decimal, achievements: list, last_changed: datetime) -> None: <... | An aggregation of all the stuff user has gotten working on projects so far. | 62598ff6627d3e7fe0e077c5 |
class IsOwnerOrAdmin(permissions.BasePermission): <NEW_LINE> <INDENT> def has_object_permission(self, request, view, obj): <NEW_LINE> <INDENT> if request.user.is_staff: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> return obj.username == request.user.username | Custom permission to only allow owners of an object to edit.
Admin users however have access to all. | 62598ff64c3428357761abce |
class SerializerTestCase(TestCase): <NEW_LINE> <INDENT> def test_create_method(self): <NEW_LINE> <INDENT> raise NotImplementedError() | Serializer tests - Only testing the create method because everything else is inherited from DRF | 62598ff6187af65679d2a08a |
class SetForest(object): <NEW_LINE> <INDENT> def __init__(self, items): <NEW_LINE> <INDENT> self.nodes = {item: SetForestNode(item) for item in items} <NEW_LINE> <DEDENT> def find(self, item): <NEW_LINE> <INDENT> node = self.nodes[item] <NEW_LINE> if node.data is not node.parent: <NEW_LINE> <INDENT> node.parent = self.... | Implementation of a Disjoint Set Forest to use the Union-Find
algorithms. | 62598ff6ad47b63b2c5a8176 |
class XMLReader(): <NEW_LINE> <INDENT> def __init__(self, xml): <NEW_LINE> <INDENT> self.ns_tei = {'tei': "http://www.tei-c.org/ns/1.0"} <NEW_LINE> self.ns_xml = {'xml': "http://www.w3.org/XML/1998/namespace"} <NEW_LINE> self.ns_tcf = {'tcf': "http://www.dspin.de/data/textcorpus"} <NEW_LINE> self.nsmap = { 'tei': "http... | a class to read an process tei-documents | 62598ff615fb5d323ce7f667 |
class TestMonetaryFormat(TestOdootilCommon): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> super(TestMonetaryFormat, cls).setUpClass() <NEW_LINE> cls.currency = cls.env.ref('base.EUR') <NEW_LINE> cls.language = cls.env.ref('base.lang_en') <NEW_LINE> cls.get_monetary_format = cls.O... | Class to test monetary formating. | 62598ff626238365f5fad489 |
class TestDocumentAssignmentResponse(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 Docu... | DocumentAssignmentResponse unit test stubs | 62598ff63cc13d1c6d46607a |
class NagiosPlugins(object): <NEW_LINE> <INDENT> def __init__(self, config_file): <NEW_LINE> <INDENT> self.plugins = configurator.read(config_file, configspec='configspecs/nagios_plugins.cfg', list_values=False) <NEW_LINE> <DEDENT> def launch_plugin(self): <NEW_LINE> <INDENT> for plugin in self.plugins: <NEW_LINE> <IND... | Class to handle each nagios-plugin | 62598ff615fb5d323ce7f66d |
class Package(setup_boilerplate.Package): <NEW_LINE> <INDENT> name = 'benchmarker' <NEW_LINE> description = 'performance benchamrking framework' <NEW_LINE> url = "https://benchmarker.blackbird.pw/" <NEW_LINE> classifiers = [ 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Intended Audience :: Science/Rese... | Package metadata. | 62598ff6c4546d3d9def771c |
class BalancedGradientBoostingClassifier(BaseBalancedClassifier): <NEW_LINE> <INDENT> def __init__(self, loss='deviance', learning_rate=0.1, n_estimators=100, subsample=1.0, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0., max_depth=3, init=None, random_state=None, max_features=None, verbose=0, max... | Ensemble of gradient boosting classifiers trained on data where ratio of classes is close to 50%.
Multiple datasets are created such that samples of one class appear roughly as often as
samples of the other class in each dataset. A gradient boosting classifier is trained on
each balanced dataset.
Parameters
---------... | 62598ff615fb5d323ce7f66f |
@widgets.register <NEW_LINE> class TimeSeriesViewer(widgets.DOMWidget): <NEW_LINE> <INDENT> _view_name = Unicode('TimeSeriesView').tag(sync=True) <NEW_LINE> _model_name = Unicode('TimeSeriesModel').tag(sync=True) <NEW_LINE> _view_module = Unicode('tfma_widget_js').tag(sync=True) <NEW_LINE> _model_module = Unicode('tfma... | The time series visualization widget. | 62598ff63cc13d1c6d466080 |
class StateHandler(tornado.web.RequestHandler): <NEW_LINE> <INDENT> def initialize(self, pipes): <NEW_LINE> <INDENT> self.pipes = pipes <NEW_LINE> <DEDENT> def get(self, pid, service_name): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> pipe = self.pipes.repository[pid] <NEW_LINE> state = None <NEW_LINE> services = pipe.... | API handler to get back pipe states
| 62598ff60a366e3fb87dd328 |
class RiskFire(Risk): <NEW_LINE> <INDENT> risk_type = RiskType.FIRE <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.start_date = '2015-01-01' <NEW_LINE> self.end_date = '2018-01-01' <NEW_LINE> self.dataset_name = 'FIRMS' <NEW_LINE> self.dataset_band_name = 'T21' <NEW_LINE> self.range_min = 300 <NEW_LINE> self.r... | Fire risk | 62598ff6c4546d3d9def7720 |
class RandomStrategy(Strategy): <NEW_LINE> <INDENT> def insert(self, pnode, token, per_salience_list): <NEW_LINE> <INDENT> rand_index = random.randrange(0, len(per_salience_list)) <NEW_LINE> per_salience_list.insert(rand_index, (pnode, token)) <NEW_LINE> <DEDENT> def resort(self, per_saliance_list): <NEW_LINE> <INDENT>... | Inserisce gli elementi in ordine casuale
di attivazione per gli elementi con lo stesso salience | 62598ff64c3428357761abe0 |
class DQN_Ensemble(BaseBstrapDQN): <NEW_LINE> <INDENT> def _act_train(self, agent_net, name): <NEW_LINE> <INDENT> action = self._act_eval_vote(agent_net, name) <NEW_LINE> self.plot_conf.set_train_spec(dict(eval_actions=self.plot_conf.true_eval_spec["eval_actions"])) <NEW_LINE> return dict(action=action) <NEW_LINE> <DED... | Ensemble policy from Boostrapped DQN | 62598ff63cc13d1c6d466086 |
class Param(object): <NEW_LINE> <INDENT> def __init__(self, variable, default=None, name=None, mutable=False, strict=False, allow_downcast=None, implicit=None, borrow=None): <NEW_LINE> <INDENT> self.variable = variable <NEW_LINE> self.default = default <NEW_LINE> self.name = name <NEW_LINE> self.mutable = mutable <NEW_... | Parameters
----------
variable
A variable in an expression graph to use as a compiled-function
parameter.
default
The default value to use at call-time (can also be a Container where
the function will find a value at call-time).
name : str
A string to identify this parameter from function kwargs.
mu... | 62598ff6091ae35668705552 |
class LeafNode(Node): <NEW_LINE> <INDENT> def __init__(self, vector, dimension, depth,right_child=None,left_child=None,ID = None): <NEW_LINE> <INDENT> super(LeafNode, self).__init__(dimension, depth,right_child,left_child,ID) <NEW_LINE> self.vector = vector | This is a class that encodes a node within a kd-tree. Will have a right and left neighbor, which are also nodes.
The node object also keeps track of which dimension data structure it is in. | 62598ff6c4546d3d9def7722 |
class Label(PygameWidget): <NEW_LINE> <INDENT> def __init__(self, text, font="Times New Roman", size=36, bold=False, color=(10, 10, 10)): <NEW_LINE> <INDENT> self.text = text <NEW_LINE> self.font = pygame.font.SysFont(font, size) <NEW_LINE> self.color = color <NEW_LINE> self.setBold(bold) <NEW_LINE> <DEDENT> def buildS... | Represents a text label displayed via Pygame | 62598ff7091ae35668705554 |
class Literal(Expression): <NEW_LINE> <INDENT> pass | Un valor literal como 2, 2.5, o "dos" | 62598ff715fb5d323ce7f67b |
class TableParser(BoundedParser): <NEW_LINE> <INDENT> headers = ContainerConfig.table['headers'] <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> BoundedParser.__init__(self) <NEW_LINE> self.columns = list() <NEW_LINE> <DEDENT> def parseheader(self, reader): <NEW_LINE> <INDENT> reader.nextline() <NEW_LINE> while self... | Parse the whole table | 62598ff726238365f5fad49b |
class Conferences(object): <NEW_LINE> <INDENT> openapi_types = { 'copyright': 'str', 'teams': 'list[Conference]' } <NEW_LINE> attribute_map = { 'copyright': 'copyright', 'teams': 'teams' } <NEW_LINE> def __init__(self, copyright=None, teams=None): <NEW_LINE> <INDENT> self._copyright = None <NEW_LINE> self._teams = None... | NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually. | 62598ff7091ae35668705558 |
class ListMemberAppsResult(bb.Struct): <NEW_LINE> <INDENT> __slots__ = [ '_linked_api_apps_value', '_linked_api_apps_present', ] <NEW_LINE> _has_required_fields = True <NEW_LINE> def __init__(self, linked_api_apps=None): <NEW_LINE> <INDENT> self._linked_api_apps_value = None <NEW_LINE> self._linked_api_apps_present = F... | :ivar team.ListMemberAppsResult.linked_api_apps: List of third party
applications linked by this team member. | 62598ff7627d3e7fe0e077e1 |
class ProjectListBox(npyscreen.BoxTitle): <NEW_LINE> <INDENT> _contained_widget = ProjectList | Box holding the ProjectList. | 62598ff7091ae3566870555a |
class ProductionConfig(BaseConfig): <NEW_LINE> <INDENT> SQLALCHEMY_TRACK_MODIFICATIONS = False <NEW_LINE> LOG_FORMAT = "json" | Production configuration | 62598ff7c4546d3d9def7726 |
class ParticleFilter(InferenceModule): <NEW_LINE> <INDENT> def __init__(self, ghostAgent, numParticles=300): <NEW_LINE> <INDENT> InferenceModule.__init__(self, ghostAgent); <NEW_LINE> self.setNumParticles(numParticles) <NEW_LINE> <DEDENT> def setNumParticles(self, numParticles): <NEW_LINE> <INDENT> self.numParticles = ... | A particle filter for approximately tracking a single ghost.
Useful helper functions will include random.choice, which chooses
an element from a list uniformly at random, and util.sample, which
samples a key from a Counter by treating its values as probabilities. | 62598ff7627d3e7fe0e077e3 |
class OptionsError(Error): <NEW_LINE> <INDENT> pass | Error with the options framework. | 62598ff715fb5d323ce7f683 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.