code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class DeviceInterfaces(db.Model, DbMixin): <NEW_LINE> <INDENT> friendly_name = "Device Interfaces" <NEW_LINE> __tablename__ = "deviceinterfaces" <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> name = db.Column(db.String()) <NEW_LINE> addr = db.Column(db.String()) <NEW_LINE> netmask = db.Column(db.Str... | List all interfaces from network device.
Link to configuration table with configuration_id
One entry per interfaces | 62598f99bd1bec0571e14f6f |
class CargoDelete(LoginRequiredMixin,GroupRequiredMixin,SuccessMessageMixin,DeleteView): <NEW_LINE> <INDENT> model = Cargos <NEW_LINE> template_name = "cargos.delete.html" <NEW_LINE> success_message = "Se eliminó el cargo con éxito" <NEW_LINE> success_url = reverse_lazy('administrador:cargo_list') <NEW_LINE> group_requ... | !
Clase que gestiona el borrado de consultas
@date 20-02-2018
@version 1.0.0 | 62598f993539df3088ecc00c |
class SRS(PoundSeparatedCommand): <NEW_LINE> <INDENT> pass | select ringer sound. | 62598f99f548e778e596b302 |
class JoueurAlgo(Joueur): <NEW_LINE> <INDENT> def __init__(self, nom): <NEW_LINE> <INDENT> super().__init__(nom) <NEW_LINE> <DEDENT> def choisir_des_algo(self): <NEW_LINE> <INDENT> obj = [4, 2, 1] <NEW_LINE> val_a_relancer = [] <NEW_LINE> for i, d in enumerate(self.combinaison_actuelle.representant): <NEW_LINE> <INDENT... | Joueur contrôlé par ordinateur avec stratégie de type 1 avec objectif 421 | 62598f99097d151d1a2c0d7b |
class InteractionTypePrefixer: <NEW_LINE> <INDENT> def __init__(self, col_to_transform: int, prefixer_col_index: int): <NEW_LINE> <INDENT> self.col_to_transform = col_to_transform <NEW_LINE> self.prefixer_col_index = prefixer_col_index <NEW_LINE> <DEDENT> def __call__(self, row_x): <NEW_LINE> <INDENT> row_x[self.col_to... | Prefixes the interaction type to a column..
Given a row , col_to_transform is 0 and prefixer_col_index is 3:
["This is sample entity1 entity1", "entity1", "entity2", "phosphorylation"]
:returns
['QUERYphosphorylation This is sample entity1 entity1', 'entity1', 'entity2', 'phosphorylation'] | 62598f99f7d966606f747d3e |
class Config: <NEW_LINE> <INDENT> def db(self): <NEW_LINE> <INDENT> return DB( self.host[7:], self.public_credential, self.private_credential ) <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def load(path=defaultConfigPath): <NEW_LINE> <INDENT> with open(path) as config_file: <NEW_LINE> <INDENT> config = json.load(config... | host string
public_credential string
private_credential string
user_id string | 62598f99009cb60464d0127c |
class JSONRPCCustomError(JSONRPCObject): <NEW_LINE> <INDENT> def __init__(self, code, message, request_id=None): <NEW_LINE> <INDENT> JSONRPCObject.__init__(self) <NEW_LINE> self.id = request_id <NEW_LINE> self.error = {"code": code, "message": message} | Error response for an custom error.
:param code: JSON-RPC error code
:param message: JSON-RPC error message
:param request_id: JSON-RPC identifier (optional) | 62598f994a966d76dd5eec38 |
class StatusPageSingle(View, Controller): <NEW_LINE> <INDENT> template_name = 'templates/status_page_single.html' <NEW_LINE> @redirect_if_not_installed <NEW_LINE> def get(self, request, uri): <NEW_LINE> <INDENT> self.__status_page_module = StatusPageModule() <NEW_LINE> incident = self.__status_page_module.get_incident_... | Status Page Single Page Controller | 62598f99460517430c431f05 |
class BackupOptions(CsvOption): <NEW_LINE> <INDENT> EXCLUSIVE_BACKUP = "exclusive_backup" <NEW_LINE> CONCURRENT_BACKUP = "concurrent_backup" <NEW_LINE> EXTERNAL_CONFIGURATION = "external_configuration" <NEW_LINE> value_list = [EXCLUSIVE_BACKUP, CONCURRENT_BACKUP, EXTERNAL_CONFIGURATION] <NEW_LINE> conflicts = { EXCLUSI... | Extends CsvOption class providing all the details for the backup_options
field | 62598f9967a9b606de545d2c |
class DefaultSection(nrn.Section): <NEW_LINE> <INDENT> def __init__(self, name, mechanism='hh'): <NEW_LINE> <INDENT> nrn.Section.__init__(self) <NEW_LINE> self.name = name <NEW_LINE> self.L = 18 <NEW_LINE> self.diam = 18 <NEW_LINE> self.Ra = 100 <NEW_LINE> self.cm = 1 <NEW_LINE> self.insert('hh') <NEW_LINE> self.gl_hh ... | Defines the default values for all the somas we will use | 62598f993cc13d1c6d4654c3 |
class ShopList(ProductList): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> <DEDENT> def add_product(self, product, amount=1, price=0): <NEW_LINE> <INDENT> if self.contains(product.name): <NEW_LINE> <INDENT> amount += self.plist[product.name][1] <NEW_LINE> <DEDENT> self.plist[... | A class used for containing a list of Shops | 62598f99004d5f362081eea8 |
class TestTreeNodeGetterFunctions: <NEW_LINE> <INDENT> def test_id_type(self, tree_node_instance): <NEW_LINE> <INDENT> assert isinstance(getattr(tree_node_instance, "id"), int) <NEW_LINE> <DEDENT> def test_id_value(self, tree_node_instance, tree_node_instance_data): <NEW_LINE> <INDENT> assert getattr(tree_node_instance... | Use this class to test the 'TreeNode' class to test the getters made.
This function is used for testing the getters for the 'TreeNode' class. This
tests to make sure the getters return the correct values and types. | 62598f9945492302aabfc230 |
class CorusPageIndex(ndb.Model): <NEW_LINE> <INDENT> created = ndb.DateTimeProperty(auto_now_add=True) <NEW_LINE> updated = ndb.DateTimeProperty(auto_now=True) <NEW_LINE> number_of_versions = ndb.IntegerProperty(default=1, indexed=False) <NEW_LINE> published_versions = ndb.IntegerProperty(repeated=True, indexed=False) ... | ID: actual page path like "content/about-us" *without* a version #
Need to write this model and the new CorusPageVersion in a txn | 62598f99a79ad16197769dbb |
class Player: <NEW_LINE> <INDENT> def __init__(self, player_name: str, x: int, y: int) -> None: <NEW_LINE> <INDENT> self.name = player_name <NEW_LINE> self.x = x <NEW_LINE> self.y = y <NEW_LINE> <DEDENT> def move(self, new_coordinates: tuple) -> None: <NEW_LINE> <INDENT> self.x, self.y = new_coordinates[0], new_coordin... | Create a Player that can play MazeGame. | 62598f9901c39578d7f12ad5 |
class Image: <NEW_LINE> <INDENT> def __init__(self, img: PImage.Image): <NEW_LINE> <INDENT> self.img = img <NEW_LINE> <DEDENT> def __eq__(self, other): <NEW_LINE> <INDENT> if not isinstance(other, Image): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> a = np.asarray(self.img) <NEW_LINE> b = np.asarray(other.img) ... | Our representation of an image, implemented as a wrapper around a standard
Pillow image. | 62598f99baa26c4b54d4f009 |
class InstanceInfo(ndb.Model): <NEW_LINE> <INDENT> name = ndb.StringProperty() <NEW_LINE> role = ndb.StringProperty() <NEW_LINE> rpckey = ndb.StringProperty() <NEW_LINE> external_ip = ndb.StringProperty() <NEW_LINE> internal_ip = ndb.StringProperty() <NEW_LINE> status = ndb.StringProperty(choices=set([ InstanceStatus.P... | Datastore model to represent single Compute Engine instance. | 62598f9963b5f9789fe84ece |
class AdminViews(admin.ModelAdmin): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> super(AdminViews, self).__init__(*args, **kwargs) <NEW_LINE> self.direct_links = [] <NEW_LINE> self.local_view_names = [] <NEW_LINE> self.output_urls = [] <NEW_LINE> <DEDENT> def get_urls(self): <NEW_LINE> <... | Standard admin subclass to handle easily adding views to
the Django admin for an app | 62598f99cc0a2c111447ad64 |
class Background: <NEW_LINE> <INDENT> BLACK = 40 <NEW_LINE> RED = 41 <NEW_LINE> GREEN = 42 <NEW_LINE> YELLOW = 43 <NEW_LINE> BLUE = 44 <NEW_LINE> PURPLE = 45 <NEW_LINE> CYAN = 46 <NEW_LINE> WHITE = 47 | Terminal background colours. | 62598f998e71fb1e983bb80d |
class UserProfile(AbstractBaseUser): <NEW_LINE> <INDENT> username = None <NEW_LINE> email = models.EmailField(max_length=255, unique=True) <NEW_LINE> is_active = models.BooleanField(default=True) <NEW_LINE> is_staff = models.BooleanField(default=True) <NEW_LINE> USERNAME_FIELD = 'email' <NEW_LINE> REQUIRED_FIELDS = [] ... | Database model for user in system | 62598f9929b78933be269f89 |
class PostForm(forms.ModelForm): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Post <NEW_LINE> fields = ('title', 'text',) | Create a form that makes blog posts easier to work with. | 62598f9926068e7796d4c6bb |
class SimpleRedirectURIFactory(object): <NEW_LINE> <INDENT> implements(IRedirectURIFactory) <NEW_LINE> def __init__(self, **redirectURIs): <NEW_LINE> <INDENT> self._uris = redirectURIs <NEW_LINE> <DEDENT> def getRedirectURI(self, clientIdentifier): <NEW_LINE> <INDENT> uri = self._uris.get(clientIdentifier) <NEW_LINE> r... | A simplistic, in-memory redirect URI factory.
This is a wrapper around a dictionary. | 62598f994e4d56256637217b |
class BuildingRecruit(Base, ResourcesMixin): <NEW_LINE> <INDENT> __tablename__ = 'building_recruits' <NEW_LINE> building_type_id = Column( Integer, ForeignKey('building_types.id'), nullable=False ) <NEW_LINE> unit_type_id = Column( Integer, ForeignKey('unit_types.id'), nullable=False ) <NEW_LINE> pop_time = Column(Inte... | Provides a link betwene building and unit types, allowing buildings
to provide units. Resources are used during reruitment. | 62598f998da39b475be02f3c |
class JSPopup(URLResource): <NEW_LINE> <INDENT> default_params = {'tag': 'a', 'target': '_blank'} <NEW_LINE> def _add_vars(self, vars): <NEW_LINE> <INDENT> button = self <NEW_LINE> for var in ('width', 'height', 'stripped', 'content'): <NEW_LINE> <INDENT> if var in vars: <NEW_LINE> <INDENT> button = button.param(**{var... | >>> u = URL('/')
>>> u = u / 'view'
>>> j = u.js_popup(content='view')
>>> j.html
'<a href="/view" onclick="window.open('/view', '_blank'); return false" target="_blank">view</a>' | 62598f992c8b7c6e89bd3528 |
class SaveDeveloperInfo(Object): <NEW_LINE> <INDENT> ID = 0x9a5f6e95 <NEW_LINE> def __init__(self, vk_id: int, name: str, phone_number: str, age: int, city: str): <NEW_LINE> <INDENT> self.vk_id = vk_id <NEW_LINE> self.name = name <NEW_LINE> self.phone_number = phone_number <NEW_LINE> self.age = age <NEW_LINE> self.city... | Attributes:
ID: ``0x9a5f6e95``
Args:
vk_id: ``int`` ``32-bit``
name: ``str``
phone_number: ``str``
age: ``int`` ``32-bit``
city: ``str``
Raises:
:obj:`Error <pyrogram.Error>`
Returns:
``bool`` | 62598f999c8ee8231304001b |
class CmdArpScanPlugin(core.PluginBase): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> core.PluginBase.__init__(self) <NEW_LINE> self.id = "arp-scan" <NEW_LINE> self.name = "arp-scan network scanner" <NEW_LINE> self.plugin_version = "0.0.1" <NEW_LINE> self.version = "1.8.1" <NEW_LINE> self.framework_versi... | This plugin handles arp-scan command.
Basically inserts into the tree the ouput of this tool | 62598f99eab8aa0e5d30badc |
class TestSimpleDAO(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> print('Preapre test for SimpleDAO') <NEW_LINE> self.con = sqlite3.connect('test.db') <NEW_LINE> self.cur = self.con.cursor() <NEW_LINE> self.cur.execute("CREATE TABLE IF NOT EXISTS Members(Name text, Age integer);") <NEW_LI... | sqlite db 에 대한 DAO 클래스에 대한 유닛테스트 | 62598f99379a373c97d98d6c |
class ManagementConfiguration(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'st... | The container for solution.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Resource location.
:type location: str
:param propert... | 62598f99be8e80087fbbedb8 |
class PersonalPattern(Model): <NEW_LINE> <INDENT> def __init__(self, duty: List[object]=None, unavailability: List[object]=None): <NEW_LINE> <INDENT> self.openapi_types = { 'duty': List[object], 'unavailability': List[object] } <NEW_LINE> self.attribute_map = { 'duty': 'duty', 'unavailability': 'unavailability' } <NEW_... | NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Do not edit the class manually. | 62598f993c8af77a43b67de9 |
class PackageHandler(ContentHandler): <NEW_LINE> <INDENT> def install(self, conduit, units, options): <NEW_LINE> <INDENT> report = PackageReport() <NEW_LINE> pkg = self.__impl(conduit, options) <NEW_LINE> names = [] <NEW_LINE> for unit_key in units: <NEW_LINE> <INDENT> unit_dict = { 'name': unit_key['name'], 'epoch': '... | The package (rpm) content handler.
@ivar cfg: configuration
@type cfg: dict | 62598f99435de62698e9bb4d |
class ZCMLLayer(ComponentRegistryLayer): <NEW_LINE> <INDENT> defaultBases = (zca.ZCML_DIRECTIVES,) <NEW_LINE> def setUp(self): <NEW_LINE> <INDENT> super(ZCMLLayer, self).setUp() <NEW_LINE> import ftw.upgrade.tests <NEW_LINE> self.load_zcml_file('test.zcml', ftw.upgrade.tests) | A layer which only sets up the zcml, but does not start a zope
instance. | 62598f99bde94217f3707516 |
class Bullet(pygame.sprite.Sprite): <NEW_LINE> <INDENT> def __init__(self, center, speed=2.0, bullet_range=screen_height/2, size=5, layer=100): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._layer = layer <NEW_LINE> self.centerx = center[0] <NEW_LINE> self.centery = center[1] <NEW_LINE> self.bullet_range = bul... | This class represents a bullet
It derives from the "Sprite" class in Pygame | 62598f9901c39578d7f12ad6 |
class VerisureSmartcam(Camera): <NEW_LINE> <INDENT> def __init__(self, hass, device_label, directory_path): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self._device_label = device_label <NEW_LINE> self._directory_path = directory_path <NEW_LINE> self._image = None <NEW_LINE> self._image_id = None <NEW_LINE> hass.... | Representation of a Verisure camera. | 62598f99cb5e8a47e493c020 |
class MacClipboard(Clipboard): <NEW_LINE> <INDENT> def paste(self): <NEW_LINE> <INDENT> return ( subprocess.check_output('pbpaste').decode(ENCODING, 'replace') .replace(u'\r\n', u'\r').replace(u'\n', u'\r') ) <NEW_LINE> <DEDENT> def copy(self, text): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> p = subprocess.Popen('pb... | Clipboard handling for OSX. | 62598f99a219f33f346c6573 |
@type_checked <NEW_LINE> class ManageOfferSuccessResult: <NEW_LINE> <INDENT> def __init__( self, offers_claimed: List[ClaimAtom], offer: ManageOfferSuccessResultOffer, ) -> None: <NEW_LINE> <INDENT> if offers_claimed and len(offers_claimed) > 4294967295: <NEW_LINE> <INDENT> raise ValueError( f"The maximum length of `of... | XDR Source Code::
struct ManageOfferSuccessResult
{
// offers that got claimed while creating this offer
ClaimAtom offersClaimed<>;
union switch (ManageOfferEffect effect)
{
case MANAGE_OFFER_CREATED:
case MANAGE_OFFER_UPDATED:
OfferEntry offer;
... | 62598f993eb6a72ae038a397 |
class DescribeCdnDataRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.StartTime = None <NEW_LINE> self.EndTime = None <NEW_LINE> self.Metric = None <NEW_LINE> self.Domains = None <NEW_LINE> self.Project = None <NEW_LINE> self.Interval = None <NEW_LINE> self.Detail = None <NEW_LIN... | DescribeCdnData request structure.
| 62598f99a17c0f6771d5bf94 |
class Attribute(object): <NEW_LINE> <INDENT> def __init__(self, attr_name, schema): <NEW_LINE> <INDENT> self.name = attr_name <NEW_LINE> self.schema = Schema.from_attribute(schema) <NEW_LINE> <DEDENT> def support_status(self): <NEW_LINE> <INDENT> return self.schema.support_status <NEW_LINE> <DEDENT> def as_output(self,... | An Attribute schema. | 62598f99ac7a0e7691f72265 |
class Stack: <NEW_LINE> <INDENT> _items = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.items = [] <NEW_LINE> <DEDENT> def isEmpty(self): <NEW_LINE> <INDENT> return self.items == [] <NEW_LINE> <DEDENT> def push(self, item): <NEW_LINE> <INDENT> return self.items.append(item) <NEW_LINE> <DEDENT> def pop(se... | Stack implementation in python | 62598f990a50d4780f705131 |
class Tuple(TypeOperator): <NEW_LINE> <INDENT> def __init__(self, types): <NEW_LINE> <INDENT> super().__init__(tuple, types) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return f'({", ".join(map(show_type, self.types))})' | N-ary constructor which builds tuple types | 62598f993cc13d1c6d4654c5 |
class FTPUserGroupAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('name', 'permission') <NEW_LINE> search_fields = ('name', 'permission') | Admin class for FTPUserGroup
| 62598f998da39b475be02f3d |
class DatabaseInfoGUI(wx.Dialog): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> wx.Dialog.__init__(self, parent, title='Database Information') <NEW_LINE> self.parent = parent <NEW_LINE> self.panel = wx.Panel(self) <NEW_LINE> sizer = wx.BoxSizer(wx.VERTICAL) <NEW_LINE> self.txt_dbname = wx.StaticTe... | Displays number of entries in current database; allows for loading new database files
mkak 2017.03.23 | 62598f99b7558d5895463388 |
class Reference: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.number = "" <NEW_LINE> self.bases = "" <NEW_LINE> self.authors = "" <NEW_LINE> self.consrtm = "" <NEW_LINE> self.title = "" <NEW_LINE> self.journal = "" <NEW_LINE> self.medline_id = "" <NEW_LINE> self.pubmed_id = "" <NEW_LINE> self.remark... | Hold information from a GenBank reference.
Attributes:
- number - The number of the reference in the listing of references.
- bases - The bases in the sequence the reference refers to.
- authors - String with all of the authors.
- consrtm - Consortium the authors belong to.
- title - The title of the reference.
... | 62598f991f037a2d8b9e3e3e |
class TerminalBlock(ExtraDataBlock): <NEW_LINE> <INDENT> pass | Represents a Terminal block. | 62598f997047854f4633f13b |
class ResBlock(nn.Layer): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, strides, data_format="channels_last", **kwargs): <NEW_LINE> <INDENT> super(ResBlock, self).__init__(**kwargs) <NEW_LINE> self.conv1 = conv3x3_block( in_channels=in_channels, out_channels=out_channels, strides=strides, data_forma... | Simple ResNet block for residual path in ResNet unit.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
strides : int or tuple/list of 2 int
Strides of the convolution.
data_format : str, default 'channels_last'
The ordering of the dimensio... | 62598f99a05bb46b3848a5d9 |
class Sale2Goods(models.Model): <NEW_LINE> <INDENT> order = models.ForeignKey(to=SaleOrder, on_delete=models.CASCADE, verbose_name='销售单', help_text='销售单') <NEW_LINE> goods = models.ForeignKey(to=GoodsManage, related_name='goods_in_sl', on_delete=models.SET_NULL, null=True, verbose_name='商品', help_text='商品') <NEW_LINE> ... | 销售单商品中间表 | 62598f994e4d56256637217d |
class GoRuntimeInstanceFactory(instance.InstanceFactory): <NEW_LINE> <INDENT> START_URL_MAP = appinfo.URLMap( url='/_ah/start', script='_go_app', login='admin') <NEW_LINE> WARMUP_URL_MAP = appinfo.URLMap( url='/_ah/warmup', script='_go_app', login='admin') <NEW_LINE> FILE_CHANGE_INSTANCE_RESTART_POLICY = instance.ALWAY... | A factory that creates new Go runtime Instances. | 62598f99596a8972361279db |
class DeltaScan(DeltaListScan): <NEW_LINE> <INDENT> _fields = ['detectors', 'motor', 'start', 'stop', 'num'] <NEW_LINE> _derived_fields = DeltaListScan._derived_fields + ['steps'] <NEW_LINE> @property <NEW_LINE> def steps(self): <NEW_LINE> <INDENT> return np.linspace(self.start, self.stop, self.num) | Delta (relative) scan over one variable in equally spaced steps
Parameters
----------
detectors : list
list of 'readable' objects
motor : object
any 'setable' object (motor, temp controller, etc.)
start : float
starting position of motor
stop : float
ending position of motor
num : int
number of ste... | 62598f99eab8aa0e5d30badf |
class HDF5Matrix(object): <NEW_LINE> <INDENT> refs = defaultdict(int) <NEW_LINE> def __init__(self, datapath, dataset, start=0, end=None, normalizer=None): <NEW_LINE> <INDENT> if h5py is None: <NEW_LINE> <INDENT> raise ImportError('The use of HDF5Matrix requires ' 'HDF5 and h5py installed.') <NEW_LINE> <DEDENT> if data... | Representation of HDF5 dataset to be used instead of a Numpy array.
# Example
```python
x_data = HDF5Matrix('input/file.hdf5', 'data')
model.predict(x_data)
```
Providing `start` and `end` allows use of a slice of the dataset.
Optionally, a normalizer function (or lambda) can be given. This will
be called o... | 62598f99baa26c4b54d4f00c |
class BlacklistFilter(logging.Filter): <NEW_LINE> <INDENT> def __init__(self, names): <NEW_LINE> <INDENT> self._filters = [ logging.Filter(name) for name in names ] <NEW_LINE> <DEDENT> def filter(self, record): <NEW_LINE> <INDENT> return all(not log_filter.filter(record) for log_filter in self._filters) | Blacklists the provided loggers (and their children) from logging. | 62598f9956ac1b37e6301f4c |
class RastermcdaDialogTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.dialog = RastermcdaDialog(None) <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> self.dialog = None <NEW_LINE> <DEDENT> def test_dialog_ok(self): <NEW_LINE> <INDENT> button = self.dialog.button_box.bu... | Test dialog works. | 62598f993c8af77a43b67dea |
class TZ(VCardProperty): <NEW_LINE> <INDENT> pass | The time zone of the vCard object. | 62598f99fff4ab517ebcd548 |
class TempFile(StringIO): <NEW_LINE> <INDENT> def __init__(self, ref, callback, initial=""): <NEW_LINE> <INDENT> StringIO.__init__(self, initial) <NEW_LINE> self.ref = ref <NEW_LINE> self.callback = callback <NEW_LINE> self._is_closed = False <NEW_LINE> <DEDENT> def __enter__(self): <NEW_LINE> <INDENT> return self <NEW... | Temporary file-like object that stores itself in the filesystem
when closed or deleted.
Since files are stored as a string, some file-like object must be used when
the user is reading or writing, and this is it. It's a wrapper around the
data when reading/writing to an existing file, and automatically updates
the dat... | 62598f99e5267d203ee6b66a |
class KenLM: <NEW_LINE> <INDENT> def __init__(self, blm_path): <NEW_LINE> <INDENT> import kenlm <NEW_LINE> self.lm = kenlm.LanguageModel(blm_path) <NEW_LINE> <DEDENT> @tools.methdispatch <NEW_LINE> @lru_cache() <NEW_LINE> def __getitem__(self, tags): <NEW_LINE> <INDENT> return self.lm.score(tags, bos=False, eos=False) ... | KenLM Language Model | 62598f99379a373c97d98d6f |
class DeciderTests(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.pump = Pump('127.0.0.1', 8000) <NEW_LINE> self.actions = { 'PUMP_IN': self.pump.PUMP_IN, 'PUMP_OUT': self.pump.PUMP_OUT, 'PUMP_OFF': self.pump.PUMP_OFF, } <NEW_LINE> self.decider = Decider(5, 0.1) <NEW_LINE> <DEDENT> de... | Unit tests for the Decider class | 62598f99cb5e8a47e493c021 |
@register_dataset <NEW_LINE> @dataclass(frozen=True) <NEW_LINE> class M4DailyDatasetConfig(GluonTsDatasetConfig): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def name(cls) -> str: <NEW_LINE> <INDENT> return "m4_daily" <NEW_LINE> <DEDENT> @property <NEW_LINE> def max_training_time(self) -> int: <NEW_LINE> <INDENT> retur... | The dataset configuration for the `m4_daily` dataset. | 62598f99cc0a2c111447ad67 |
class PassportElementErrorSourceTranslationFile(Object): <NEW_LINE> <INDENT> ID = "passportElementErrorSourceTranslationFile" <NEW_LINE> def __init__(self, file_index, **kwargs): <NEW_LINE> <INDENT> self.file_index = file_index <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(q: dict, *args) -> "PassportElementErr... | One of files with the translation of the document contains an error. The error will be considered resolved when the file changes
Attributes:
ID (:obj:`str`): ``PassportElementErrorSourceTranslationFile``
Args:
file_index (:obj:`int`):
Index of a file with the error
Returns:
PassportElementErrorS... | 62598f997d847024c075c12d |
class InvoiceCollection(Resource): <NEW_LINE> <INDENT> schema = { "charge_invoice": "Invoice", "credit_invoices": ["Invoice"], "object": str, } | Attributes
----------
charge_invoice : Invoice
credit_invoices : :obj:`list` of :obj:`Invoice`
Credit invoices
object : str
Object type | 62598f99851cf427c66b8022 |
class DBProperty(Base): <NEW_LINE> <INDENT> __tablename__ = "property" <NEW_LINE> key = Column(String, primary_key=True) <NEW_LINE> value = Column(String) <NEW_LINE> collection_path = Column( String, ForeignKey("collection.path"), primary_key=True) <NEW_LINE> collection = relationship( "DBCollection", backref="properti... | Table of collection's properties. | 62598f99d6c5a102081e1e9f |
class Decay(Section): <NEW_LINE> <INDENT> @property <NEW_LINE> @attribute <NEW_LINE> def function(self): <NEW_LINE> <INDENT> return "function", str <NEW_LINE> <DEDENT> @function.setter <NEW_LINE> @attribute_setter(attrib_type=str) <NEW_LINE> def function(self, value): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @prope... | Description of decay of all intervention effects. Documentation:
see DecayFunction type or http://code.google.com/p/openmalaria/wiki/ModelDecayFunctions
https://github.com/SwissTPH/openmalaria/wiki/GeneratedSchema32Doc#decay-n4 | 62598f998e7ae83300ee8df8 |
class Chatter: <NEW_LINE> <INDENT> def __init__(self, serial_port='/dev/ttyACM0', from_user='TO_DEV', to_user=None, to_user_dir=None, serial_timeout=0.01, baud_rate=9600): <NEW_LINE> <INDENT> platformName = platform.system() <NEW_LINE> if platformName.find('Windows',0) == -1: <NEW_LINE> <INDENT> if os.path.exists(from_... | Object to manage chat between serial device and user.
The user may write text to an input pipe, and it will be relayed to
the device on every `update` call.
Additionally, anything received from the device will be written to an
output file and optionally echoed to stdout on every `update` call.
Call `close` to shut d... | 62598f99460517430c431f07 |
class Stack(list): <NEW_LINE> <INDENT> push = list.append | creating stack | 62598f991b99ca400228f3da |
class FirstQuality(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'bitrate': {'required': True}, } <NEW_LINE> _attribute_map = { 'bitrate': {'key': 'bitrate', 'type': 'int'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(FirstQuality, self).__init__(**kwargs) <NEW_LINE> self.b... | Filter First Quality.
All required parameters must be populated in order to send to Azure.
:param bitrate: Required. The first quality bitrate.
:type bitrate: int | 62598f9991f36d47f2230d4d |
class IPhoneNumber(zope.schema.interfaces.ITextLine): <NEW_LINE> <INDENT> pass | Phone number schema field
| 62598f993cc13d1c6d4654c7 |
class StaveProject: <NEW_LINE> <INDENT> PROJECT_META_FILE = ".project_meta.json" <NEW_LINE> NAME_FIELD = "project_name" <NEW_LINE> TYPE_FIELD = "project_type" <NEW_LINE> ONTO_FIELD = "ontology" <NEW_LINE> CONF_FIELD = "project_configs" <NEW_LINE> MULT_FIELD = "multi_ontology" <NEW_LINE> def __init__(self, project_path:... | Base class that defines the format of serialized project metadata.
It specifies the name (PROJECT_META_FILE) of file that stores the
metadata and the structure (****_FIELD) of json object.
It is extensible to support new structure/fields, which can be
registered in this class. | 62598f9945492302aabfc234 |
class GetStickerSet(Object): <NEW_LINE> <INDENT> ID = 0x2619a90e <NEW_LINE> def __init__(self, stickerset): <NEW_LINE> <INDENT> self.stickerset = stickerset <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def read(b: BytesIO, *args) -> "GetStickerSet": <NEW_LINE> <INDENT> stickerset = Object.read(b) <NEW_LINE> return GetS... | Attributes:
ID: ``0x2619a90e``
Args:
stickerset: Either :obj:`InputStickerSetEmpty <pyrogram.api.types.InputStickerSetEmpty>`, :obj:`InputStickerSetID <pyrogram.api.types.InputStickerSetID>` or :obj:`InputStickerSetShortName <pyrogram.api.types.InputStickerSetShortName>`
Raises:
:obj:`Error <pyrogram.Erro... | 62598f991f037a2d8b9e3e40 |
class TestAuthorizedTokenListView(TestAuthorizedTokenViews): <NEW_LINE> <INDENT> def test_list_view_authorization_required(self): <NEW_LINE> <INDENT> response = self.client.get(reverse('oauth2_provider:authorized-token-list')) <NEW_LINE> self.assertEqual(response.status_code, 302) <NEW_LINE> self.assertTrue('/accounts/... | Tests for the Authorized Token ListView | 62598f99cc0a2c111447ad68 |
class CodeMessageException(RuntimeError): <NEW_LINE> <INDENT> def __init__(self, code, msg): <NEW_LINE> <INDENT> super(CodeMessageException, self).__init__("%d: %s" % (code, msg)) <NEW_LINE> self.code = code <NEW_LINE> self.msg = msg <NEW_LINE> self.response_code_message = None <NEW_LINE> <DEDENT> def error_dict(self):... | An exception with integer code and message string attributes. | 62598f997cff6e4e811b577c |
class Worker(QtCore.QObject): <NEW_LINE> <INDENT> sigStartWork = QtCore.pyqtSignal() <NEW_LINE> sigUpdate = QtCore.pyqtSignal(int) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.sigStartWork.connect(self.work) <NEW_LINE> <DEDENT> @QtCore.pyqtSlot() <NEW_LINE> def work(self): <NEW_... | Use blocking sleep-calls to periodically emit a signal.
This thread uses blocking sleep-calls to simulate time consuming
operations that will block the GUI when run in the main thread. | 62598f9976e4537e8c3ef311 |
class ResourceTags(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(ResourceTags, self).__init__(**kwargs) <NEW_LINE> self.tags = kwargs.get('tags', None) | List of key value pairs that describe the resource. This will overwrite the existing tags.
:param tags: A set of tags. Resource tags.
:type tags: dict[str, str] | 62598f994e4d56256637217f |
class PortChannelEvent_registerIDL_result(object): <NEW_LINE> <INDENT> thrift_spec = ((0, TType.STRUCT, 'success', (Shared.ttypes.EventHandleIDL, Shared.ttypes.EventHandleIDL.thrift_spec), None), (1, TType.STRUCT, 'e', (Shared.ttypes.ExceptionIDL, Shared.ttypes.ExceptionIDL.thrift_spec), None)) <NEW_LINE> def __init__(... | Attributes:
- success
- e | 62598f9932920d7e50bc5db3 |
class TableAPIView(APIView): <NEW_LINE> <INDENT> @property <NEW_LINE> def client(self): <NEW_LINE> <INDENT> return OTSClient(settings.OTS_ENDPOINT, settings.OTS_ID, settings.OTS_SECRET, settings.OTS_INSTANCE) <NEW_LINE> <DEDENT> def post(self,request): <NEW_LINE> <INDENT> table_name = "user_message_log_table" <NEW_LINE... | 表操作 | 62598f9944b2445a339b681a |
class MountPoints2Plugin(interface.WindowsRegistryPlugin): <NEW_LINE> <INDENT> NAME = 'explorer_mountpoints2' <NEW_LINE> DATA_FORMAT = 'Windows Explorer mount points Registry data' <NEW_LINE> FILTERS = frozenset([ interface.WindowsRegistryKeyPathFilter( 'HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\... | Windows Registry plugin for parsing the MountPoints2 key. | 62598f99d268445f26639a32 |
class TestWarehouseServiceTypeApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = Infoplus.api.warehouse_service_type_api.WarehouseServiceTypeApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_add_warehouse_service_type(self): <NEW... | WarehouseServiceTypeApi unit test stubs | 62598f99dd821e528d6d8c91 |
class Spider(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Spider, self).__init__() <NEW_LINE> self.urlmanager = url_manager.UrlManager() <NEW_LINE> self.downloader = html_downloader.HtmlDownloader() <NEW_LINE> self.parser = html_parser.HtmlParser() <NEW_LINE> self.outputer = html_outputer.... | docstring for Spider | 62598f99435de62698e9bb51 |
@base.ReleaseTracks(base.ReleaseTrack.BETA) <NEW_LINE> class ComputeBeta(base.Group): <NEW_LINE> <INDENT> detailed_help = DETAILED_HELP <NEW_LINE> @staticmethod <NEW_LINE> def Args(parser): <NEW_LINE> <INDENT> parser.add_argument( '--endpoint', help=argparse.SUPPRESS, action=actions.StoreProperty(properties.VALUES.endp... | Read and manipulate Google Compute Engine resources. | 62598f996e29344779b003b7 |
class Advec(object): <NEW_LINE> <INDENT> _DERIV_CLS = FiniteDeriv <NEW_LINE> def _arr_gradient(self): <NEW_LINE> <INDENT> return self._deriv_obj.deriv() <NEW_LINE> <DEDENT> def __init__(self, flow, arr, dim, coord=None, spacing=1, order=2, fill_edge=True): <NEW_LINE> <INDENT> self.flow = flow <NEW_LINE> self.arr = arr ... | Base class for advection. | 62598f99e5267d203ee6b66c |
class UserView(generics.RetrieveAPIView): <NEW_LINE> <INDENT> serializer_class = serializers.UserSerializer <NEW_LINE> def get_object(self): <NEW_LINE> <INDENT> return self.request.user | Retrieve basic user infomation for enabling certain feature in the app
But do not rely on this information to do permission check
API itself need to handle permission | 62598f9994891a1f408b959f |
class Rhombus(Parallelogram): <NEW_LINE> <INDENT> def __init__(self, base, theta): <NEW_LINE> <INDENT> Parallelogram.__init__(self, base, base, theta) <NEW_LINE> self._name = 'Rhombus' | A class that represents a rhombus | 62598f99a219f33f346c6577 |
class dirs(object): <NEW_LINE> <INDENT> def __init__(self, map, skip=None): <NEW_LINE> <INDENT> self._dirs = {} <NEW_LINE> addpath = self.addpath <NEW_LINE> if safehasattr(map, 'iteritems') and skip is not None: <NEW_LINE> <INDENT> for f, s in map.iteritems(): <NEW_LINE> <INDENT> if s[0] != skip: <NEW_LINE> <INDENT> ad... | a multiset of directory names from a dirstate or manifest | 62598f997d847024c075c12f |
class IntStrategy(SearchStrategy): <NEW_LINE> <INDENT> def from_basic(self, data): <NEW_LINE> <INDENT> return integer_or_bad(data) <NEW_LINE> <DEDENT> def to_basic(self, template): <NEW_LINE> <INDENT> return text_type(template) <NEW_LINE> <DEDENT> def simplifiers(self, random, template): <NEW_LINE> <INDENT> yield self.... | A generic strategy for integer types that provides the basic methods
other than produce.
Subclasses should provide the produce method. | 62598f99d7e4931a7ef3bdf5 |
class PostProcessorImportError(ViseronError): <NEW_LINE> <INDENT> def __init__(self, processor: str) -> None: <NEW_LINE> <INDENT> super().__init__(self) <NEW_LINE> self.processor = processor <NEW_LINE> <DEDENT> def __str__(self) -> str: <NEW_LINE> <INDENT> return ( f"Could not import post processor {self.processor}. Ch... | Raised when a post processor cannot be imported properly. | 62598f99f7d966606f747d44 |
class FilterApi(object): <NEW_LINE> <INDENT> def __init__(self, api_client=None): <NEW_LINE> <INDENT> if api_client is None: <NEW_LINE> <INDENT> api_client = ApiClient() <NEW_LINE> <DEDENT> self.api_client = api_client <NEW_LINE> <DEDENT> def filter_list(self, **kwargs): <NEW_LINE> <INDENT> kwargs['_return_http_data_on... | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen | 62598f99851cf427c66b8024 |
class ICourcellesUrbanDataimportLayer(IDefaultPloneLayer): <NEW_LINE> <INDENT> pass | Marker interface that defines a Zope 3 browser layer. | 62598f99f548e778e596b308 |
class NytimesMobileStory(_NewsBrowsingStory): <NEW_LINE> <INDENT> NAME = 'browse:news:nytimes' <NEW_LINE> URL = 'http://mobile.nytimes.com' <NEW_LINE> ITEM_SELECTOR = '.sfgAsset-link' <NEW_LINE> ITEMS_TO_VISIT = 2 <NEW_LINE> SUPPORTED_PLATFORMS = platforms.MOBILE_ONLY | The third top website in http://www.alexa.com/topsites/category/News | 62598f992ae34c7f260aae3e |
class ConversionFailure(Exception): <NEW_LINE> <INDENT> pass | Unexplained failure. | 62598f9930bbd72246469824 |
class ServiceUtilsPlugin(colony.Plugin): <NEW_LINE> <INDENT> id = "pt.hive.colony.plugins.service.utils" <NEW_LINE> name = "Service Utils" <NEW_LINE> description = "The plugin that offers a utils for services" <NEW_LINE> version = "1.0.0" <NEW_LINE> author = "Hive Solutions Lda. <development@hive.pt>" <NEW_LINE> platfo... | The main class for the Service Utils plugin. | 62598f996fb2d068a7693ce2 |
class UARTChannel(object): <NEW_LINE> <INDENT> _parser = Embedded(Struct("UARTChannel", LFloat32('tx_throughput'), LFloat32('rx_throughput'), ULInt16('crc_error_count'), ULInt16('io_error_count'), ULInt8('tx_buffer_level'), ULInt8('rx_buffer_level'),)) <NEW_LINE> __slots__ = [ 'tx_throughput', 'rx_throughput', 'crc_err... | UARTChannel.
Throughput, utilization, and error counts on the RX/TX buffers
of this UART channel. The reported percentage values require to
be normalized.
Parameters
----------
tx_throughput : float
UART transmit throughput
rx_throughput : float
UART receive throughput
crc_error_count : int
... | 62598f995f7d997b871f928c |
class FooException(Exception): <NEW_LINE> <INDENT> class InternalFoo(object): <NEW_LINE> <INDENT> pass | Docstring of :class:`format.rst.foo.FooException`.
Another class of :mod:`format.rst.foo` module. | 62598f993539df3088ecc013 |
class BaseConfig(object): <NEW_LINE> <INDENT> SECRET_KEY = os.environ.get('SECRET_KEY') <NEW_LINE> SQLALCHEMY_TRACK_MODIFICATIONS = False <NEW_LINE> WTF_CSRF_ENABLED = False <NEW_LINE> REDIS_URL = 'redis://redis:6379/0' <NEW_LINE> QUEUES = ['default'] | Base configuration. | 62598f9967a9b606de545d32 |
class Control(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def configure(self, parameters): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def launch(self, deployable_type_id, site, allocation, count=1, extravars=None, caller=None): <NEW_LINE> <INDENT>... | This is the superclass for any implementation of the control object that
is passed to the decision engine. The control object is a way for the
engine to make requests to the EPU Controller, like to send launch
requests to the Provisioner.
The abc (abstract base class) module is not present in Python 2.5 but
Control s... | 62598f998da39b475be02f41 |
class Request(URLMixin): <NEW_LINE> <INDENT> method = None <NEW_LINE> def __init__(self, url, method, content_type=None, body=None, request=None, headers=None): <NEW_LINE> <INDENT> self._request = request <NEW_LINE> self.body = body <NEW_LINE> self.url = url <NEW_LINE> self.method = method <NEW_LINE> self.content_type ... | Generic request object. All supported requests are normalized to an
instance of Request. | 62598f9945492302aabfc236 |
class Expresion_param(ExpresionNumerica): <NEW_LINE> <INDENT> def __init__(self, id, linea =0, columna=0) : <NEW_LINE> <INDENT> self.id = id <NEW_LINE> self.linea = linea <NEW_LINE> self.columna = columna | Esta clase representa la expresión parametro, ra o valor de retorno | 62598f9907f4c71912baf1a9 |
class SUBEVENTS(object): <NEW_LINE> <INDENT> MOVE = 0 | Secondary event types that add resolution to the limited quantity "official" user events.
Examples here include breaking down what a UI_EVENT actually means or further specifying the kind of action an
Entity took to make the event more coherent and more likely to reach the intended recipient. | 62598f9921bff66bcd7229c2 |
class Stack: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.top = None | Trida stack reprezentuje zasobnik.
Atributy:
top reference na vrchni prvek v zasobniku | 62598f993617ad0b5ee05eac |
class QRCodes(Model_index): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Model_index.__init__(self, model.QRCode) <NEW_LINE> <DEDENT> def bulkload_table(self, table): <NEW_LINE> <INDENT> for row in table: <NEW_LINE> <INDENT> row['kwartetsluggy'] = lib.slugify(row['kwartet']) <NEW_LINE> row['kaartsluggy']... | Read QRCode entities from the datastore
into a dict of QRCode objects | 62598f9955399d3f0562627e |
class LoginAttempt(models.Model): <NEW_LINE> <INDENT> username = models.CharField(_('username'), max_length=100, db_index=True) <NEW_LINE> source_address = models.GenericIPAddressField( _('source address'), protocol='both', db_index=True) <NEW_LINE> hostname = models.CharField(_('hostname'), max_length=100) <NEW_LINE> ... | Track logins. | 62598f990c0af96317c560e1 |
class TestNotificationRuleApi(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.api = opsgenie_swagger.api.notification_rule_api.NotificationRuleApi() <NEW_LINE> <DEDENT> def tearDown(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def test_change_notification_rule_order(self): <NEW_... | NotificationRuleApi unit test stubs | 62598f996aa9bd52df0d4c2b |
class Tanh(ActivationFunc): <NEW_LINE> <INDENT> __slots__ = tuple() <NEW_LINE> def __call__( self, linear_activation: numpy.ndarray ) -> (numpy.ndarray, numpy.ndarray): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> activation = numpy.tanh(linear_activation) <NEW_LINE> derivative = 1.0 - activation * activation <NEW... | Tanh output unit. | 62598f991f5feb6acb162980 |
class TaintedAnnotation(claripy.Annotation): <NEW_LINE> <INDENT> @property <NEW_LINE> def eliminatable(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> @property <NEW_LINE> def relocatable(self): <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> def relocate(self, src, dst): <NEW_LINE> <INDENT> srcAnnotati... | Annotation for doing taint-tracking in angr. | 62598f99462c4b4f79dbb768 |
class InventoryCollections(QThread): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> QThread.__init__(self, parent) <NEW_LINE> self.signal = SIGNAL("collection_inventory_complete") <NEW_LINE> self.cdb = parent.opts.gui.current_db <NEW_LINE> self.cfl = get_cc_mapping('collections', 'field', None) <NE... | Build a list of books with collection assignments | 62598f999c8ee8231304001e |
class ApproximateQAgent(PacmanQAgent): <NEW_LINE> <INDENT> def __init__(self, extractor='IdentityExtractor', **args): <NEW_LINE> <INDENT> self.featExtractor = util.lookup(extractor, globals())() <NEW_LINE> PacmanQAgent.__init__(self, **args) <NEW_LINE> self.weights = util.Counter() <NEW_LINE> <DEDENT> def getWeights(se... | ApproximateQLearningAgent
You should only have to overwrite getQValue
and update. All other QLearningAgent functions
should work as is. | 62598f99d268445f26639a33 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.