code stringlengths 4 4.48k | docstring stringlengths 1 6.45k | _id stringlengths 24 24 |
|---|---|---|
class GeneratingCommand(SearchCommand): <NEW_LINE> <INDENT> def generate(self): <NEW_LINE> <INDENT> raise NotImplementedError('GeneratingCommand.generate(self, records)') <NEW_LINE> <DEDENT> def _prepare(self, argv, input_file): <NEW_LINE> <INDENT> ConfigurationSettings = type(self).ConfigurationSettings <NEW_LINE> arg... | Generates events based on command arguments.
Generating commands receive no input and must be the first command on a
pipeline. By default Splunk will run your command locally on a search head:
:<source lang=python>@Configuration()</source>
You can change the default behavior by configuring your generating command
fo... | 6259907ddc8b845886d5501d |
class DocumentForm(forms.ModelForm): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> can_create_tags = kwargs.pop('can_create_tags', False) <NEW_LINE> can_archive = kwargs.pop('can_archive', False) <NEW_LINE> super(DocumentForm, self).__init__(*args, **kwargs) <NEW_LINE> tags_field = self.f... | Form to create/edit a document. | 6259907da8370b77170f1e32 |
class gffObject(object): <NEW_LINE> <INDENT> def __init__(self, seqid, source, type, start, end, score, strand, phase, attributes): <NEW_LINE> <INDENT> self._seqid = seqid <NEW_LINE> self._source = source <NEW_LINE> self._type = type <NEW_LINE> self._start = start <NEW_LINE> self._end = end <NEW_LINE> self._score = sco... | "seqid" (gff column 1) landmark for coordinate system
"source" (gff column 2) source db/program etc
"type" (gff column 3) term from the Sequence Ontology
"start"(gff column 4) relative to the landmark seqid
"end" (gff column 5) 1-based integer coordinates
"score" (gff column 6) float
"strand" (gff column 7) +/i/./? for... | 6259907d99fddb7c1ca63b09 |
class Config(dict): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> dict.__init__(self, *args, **kwargs) <NEW_LINE> <DEDENT> def load_file(self, file_name): <NEW_LINE> <INDENT> log.info("loading config singleton from file {n}".format(n=file_name)) <NEW_LINE> data = yaml.load(open(file_name,... | Configuration dictionary | 6259907e7d847024c075de40 |
class FieldInputMixin(FieldInput, Win): <NEW_LINE> <INDENT> def __init__(self, field): <NEW_LINE> <INDENT> FieldInput.__init__(self, field) <NEW_LINE> Win.__init__(self) <NEW_LINE> <DEDENT> def resize(self, height, width, y, x): <NEW_LINE> <INDENT> self._resize(height, width, y, x) <NEW_LINE> <DEDENT> def set_color(sel... | Mix both FieldInput and Win | 6259907ea8370b77170f1e33 |
class LegacySubContributionMapping(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'legacy_subcontribution_id_map' <NEW_LINE> __table_args__ = {'schema': 'events'} <NEW_LINE> event_id = db.Column( db.Integer, db.ForeignKey('events.events.id'), primary_key=True, autoincrement=False ) <NEW_LINE> legacy_contribution_id = d... | Legacy subcontribution id mapping
Legacy subcontributions had ids unique only within their event
and contribution. This table maps those ids to the new globally
unique subcontribution id. | 6259907e7047854f46340e18 |
class Discriminator(nn.Module): <NEW_LINE> <INDENT> def __init__(self, image_size=256, down_size=64): <NEW_LINE> <INDENT> super(Discriminator, self).__init__() <NEW_LINE> self.image_size = image_size <NEW_LINE> self.down_size = down_size <NEW_LINE> self.num_down = int(math.log2(self.image_size // self.down_size)) <NEW_... | CartoonGAN Discriminator | 6259907e8a349b6b43687cc0 |
class NSNitroNserrMaxSvcEntityBindingOnSvcgroup(NSNitroBaseErrors): <NEW_LINE> <INDENT> pass | Nitro error code 435
Maximum services bound to service group exceeded | 6259907e56ac1b37e6303a14 |
class ClassDetailView(DetailView): <NEW_LINE> <INDENT> queryset = Class.objects.annotate(count_students=Count('students')) <NEW_LINE> template_name = "myschool/myclass_detail.html" <NEW_LINE> def get_context_data(self, **kwargs): <NEW_LINE> <INDENT> context = super(ClassDetailView, self).get_context_data(**kwargs) <NEW... | show details of a specific class | 6259907ebe7bc26dc9252b87 |
class Task101Test(unittest.TestCase): <NEW_LINE> <INDENT> def test_this_year(self): <NEW_LINE> <INDENT> self.assertEqual(days_in_year(2015), 365) <NEW_LINE> <DEDENT> def test_leap_year(self): <NEW_LINE> <INDENT> self.assertEqual(days_in_year(2012), 366) <NEW_LINE> <DEDENT> def test_century_turn_non_leap(self): <NEW_LIN... | Testy do zadania 101 | 6259907e3617ad0b5ee07bb1 |
class DXTestDocument(Item): <NEW_LINE> <INDENT> exclude_from_nav = False | A Dexterity based test type containing a set of standard fields. | 6259907eaad79263cf43021d |
class Compare(VyperNode): <NEW_LINE> <INDENT> __slots__ = ("left", "op", "right") <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> if len(kwargs["ops"]) > 1 or len(kwargs["comparators"]) > 1: <NEW_LINE> <INDENT> _raise_syntax_exc("Cannot have a comparison with more than two elements", kwargs) <NEW_LI... | A comparison of two values.
Attributes
----------
left : VyperNode
The left-hand value in the comparison.
op : VyperNode
The comparison operator.
right : VyperNode
The right-hand value in the comparison. | 6259907e099cdd3c6367612b |
class FabberClException(FabberException): <NEW_LINE> <INDENT> def __init__(self, stdout="", returncode=-1, outdir=None, log=""): <NEW_LINE> <INDENT> grabnext = False <NEW_LINE> msg = "" <NEW_LINE> for line in stdout.splitlines(): <NEW_LINE> <INDENT> if line == "": <NEW_LINE> <INDENT> continue <NEW_LINE> <DEDENT> elif g... | Exception originating from the command line
We try to read the logfile and also attempt to
determine the message from the stdout | 6259907e97e22403b383c964 |
class Array_opt(): <NEW_LINE> <INDENT> def __init__(self, gamma_tilt_deg=[]): <NEW_LINE> <INDENT> self.gamma_n, self.gamma_tilt_deg = [], gamma_tilt_deg <NEW_LINE> self.gamma_tilt_deg_diff, self.psi_n = [], [] <NEW_LINE> self.Gamma_aud, self.thr_dist = [], [] <NEW_LINE> self.num_iter = ... | Class to create an object with optimized array data. | 6259907e67a9b606de5477d8 |
class ResetAndRunTestcaseTest(helpers.ExtendedTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.setup_fake_filesystem() <NEW_LINE> os.makedirs(main.CHROMIUM_OUT) <NEW_LINE> os.makedirs(main.CLUSTERFUZZ_CACHE_DIR) <NEW_LINE> helpers.patch(self, [ 'daemon.stackdriver_logging.send_run', 'daemon.main... | Tests the reset_and_run_testcase method. | 6259907e656771135c48ad62 |
class PassivePlayer(Player): <NEW_LINE> <INDENT> def get_attack_areas(self, grid, match_state, *args, **kwargs): <NEW_LINE> <INDENT> return None | A lazy AI player that never attacks (for testing). | 6259907e7b180e01f3e49d97 |
class Host(object): <NEW_LINE> <INDENT> def __init__(self, authport=1812, acctport=1813, coaport=3799, dict=None): <NEW_LINE> <INDENT> self.dict = dict <NEW_LINE> self.authport = authport <NEW_LINE> self.acctport = acctport <NEW_LINE> self.coaport = coaport <NEW_LINE> <DEDENT> def CreatePacket(self, **args): <NEW_LINE>... | Generic RADIUS capable host.
:ivar dict: RADIUS dictionary
:type dict: pyrad.dictionary.Dictionary
:ivar authport: port to listen on for authentication packets
:type authport: integer
:ivar acctport: port to listen on for accounting packets
:type acctport: integer | 6259907e76e4537e8c3f0fe4 |
class CommandlineTest(VimivTestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def setUpClass(cls): <NEW_LINE> <INDENT> cls.init_test(cls) <NEW_LINE> cls.search = cls.vimiv["commandline"].search <NEW_LINE> <DEDENT> def setUp(self): <NEW_LINE> <INDENT> self.working_directory = os.getcwd() <NEW_LINE> <DEDENT> def tear... | Command Line Tests. | 6259907e92d797404e38988e |
class QueryExternalContactListResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.PageData = None <NEW_LINE> self.NextCursor = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("PageData") is not None: <NEW_L... | QueryExternalContactList返回参数结构体
| 6259907edc8b845886d5501f |
class Client(Resource): <NEW_LINE> <INDENT> @jwt_required() <NEW_LINE> def get(self, name): <NEW_LINE> <INDENT> client = ClientModel.select(name) <NEW_LINE> if client: <NEW_LINE> <INDENT> return client.json(), 200 <NEW_LINE> <DEDENT> return {'message': 'Client not found'}, 404 <NEW_LINE> <DEDENT> @jwt_required() <NEW_L... | Client endpoint for url/client/<string:name> | 6259907e5fdd1c0f98e5f9e4 |
class MovingObject2D: <NEW_LINE> <INDENT> def __init__(self, initialPosition): <NEW_LINE> <INDENT> self.x = initialPosition[0] <NEW_LINE> self.y = initialPosition[1] <NEW_LINE> <DEDENT> def setPosition(self, newPosition): <NEW_LINE> <INDENT> self.x, self.y = newPosition <NEW_LINE> <DEDENT> def getPosition(self): <NEW_L... | I think pygame object do not support non integer positions so I made this
to make handle the positions. | 6259907e796e427e538501df |
class Movie(): <NEW_LINE> <INDENT> def __init__(self, movie_title, movie_year, movie_storyline, movie_thoughts, poster_image, trailer_youtube): <NEW_LINE> <INDENT> self.title = movie_title <NEW_LINE> self.year = movie_year <NEW_LINE> self.storyline = movie_storyline <NEW_LINE> self.thoughts = movie_thoughts <NEW_LINE> ... | Create an instance of the class `Movie`.
Creates an instance of the class `Movie` which will be used in a
dynamically populated movie trailer website.
Args:
movie_title: A movie title
movie_year: The year the movie was made
movie_storyline: A short official summary of the movie from
IMDb
movie_tho... | 6259907e3d592f4c4edbc891 |
class CollisionMask(): <NEW_LINE> <INDENT> x = 0 <NEW_LINE> y = 0 <NEW_LINE> width = 0 <NEW_LINE> height = 0 <NEW_LINE> x_offset = 0 <NEW_LINE> y_offset = 0 <NEW_LINE> def __init__(self, width, height, x_offset, y_offset): <NEW_LINE> <INDENT> self.width = width <NEW_LINE> self.height = height <NEW_LINE> self.x_offset =... | This is a rectangle used for collision detection. | 6259907e4a966d76dd5f094b |
class PNGWidget(BaseWidget): <NEW_LINE> <INDENT> def __init__(self, run_dir_options, fig=None, output_widget=None, **kwargs): <NEW_LINE> <INDENT> BaseWidget.__init__(self, PNGMPL, run_dir_options, fig, output_widget, **kwargs) <NEW_LINE> <DEDENT> def _create_sim_dropdown(self, options): <NEW_LINE> <INDENT> sim_drop = w... | From within jupyter notebook this widget can be used in the following way:
%matplotlib widget
import matplotlib.pyplot as plt
plt.ioff() # deactivate instant plotting is necessary!
from picongpu.plugins.jupyter_widgets import PNGWidget
display(PNGWidget(run_dir_options="path/to/outputs")) | 6259907e5166f23b2e244e3d |
class CreditsPage(ScrollView): <NEW_LINE> <INDENT> pass | Credits ScrollView that autoscrolls through Credits.
Has a Back(Button) to reutrn you to MainMenu() when done. | 6259907e7cff6e4e811b74a5 |
@registries.ZIGBEE_CHANNEL_REGISTRY.register( measurement.CarbonMonoxideConcentration.cluster_id ) <NEW_LINE> class CarbonMonoxideConcentration(ZigbeeChannel): <NEW_LINE> <INDENT> REPORT_CONFIG = [ { "attr": "measured_value", "config": (REPORT_CONFIG_MIN_INT, REPORT_CONFIG_MAX_INT, 0.000001), } ] | Carbon Monoxide measurement channel. | 6259907eaad79263cf43021f |
class NIOVDE(NIO): <NEW_LINE> <INDENT> def __init__(self, hypervisor, control_file, local_file): <NEW_LINE> <INDENT> name = 'vde-{}'.format(uuid.uuid4()) <NEW_LINE> self._control_file = control_file <NEW_LINE> self._local_file = local_file <NEW_LINE> super().__init__(name, hypervisor) <NEW_LINE> <DEDENT> async def crea... | Dynamips VDE NIO.
:param hypervisor: Dynamips hypervisor instance
:param control_file: VDE control filename
:param local_file: VDE local filename | 6259907e71ff763f4b5e9212 |
class RecordCommandTestCase(BaseCommandTestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(RecordCommandTestCase, self).setUp() <NEW_LINE> self.record_cmd = RecordCommand(poolbot=self.poolbot) <NEW_LINE> <DEDENT> def test_match_handler(self): <NEW_LINE> <INDENT> text = '{term} beat <@USERID>'.form... | Tests for the RecordCommand class. | 6259907e67a9b606de5477d9 |
class SubmissionDelegate(DeclarativeMappedObject): <NEW_LINE> <INDENT> __tablename__ = 'submission_delegate' <NEW_LINE> __table_args__ = ( UniqueConstraint('user_id', 'delegate_id'), {'mysql_engine': 'InnoDB'}) <NEW_LINE> id = Column(Integer, nullable=False, primary_key=True) <NEW_LINE> user_id = Column(Integer, Foreig... | A simple N:N mapping between users and their submission delegates | 6259907e4527f215b58eb6d3 |
class XenAPISRSelectionTestCase(stubs.XenAPITestBase): <NEW_LINE> <INDENT> def test_safe_find_sr_raise_exception(self): <NEW_LINE> <INDENT> self.flags(sr_matching_filter='yadayadayada') <NEW_LINE> stubs.stubout_session(self.stubs, stubs.FakeSessionForVMTests) <NEW_LINE> session = xenapi_conn.XenAPISession('test_url', '... | Unit tests for testing we find the right SR. | 6259907ed486a94d0ba2da1d |
class CorsRule(AWSProperty): <NEW_LINE> <INDENT> props: PropsDictType = { "AllowedHeaders": ([str], False), "AllowedMethods": ([str], False), "AllowedOrigins": ([str], False), "ExposeHeaders": ([str], False), "MaxAgeSeconds": (integer, False), } | `CorsRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediastore-container-corsrule.html>`__ | 6259907e91f36d47f2231bc1 |
class Component: <NEW_LINE> <INDENT> version = "0.1" <NEW_LINE> def __init__(self, component_id: int, component_name: str) -> None: <NEW_LINE> <INDENT> self.__id: int = component_id <NEW_LINE> self.__name: str = component_name <NEW_LINE> self.__sensors: List[Sensor] = [] <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LIN... | Class describing a sensor or actor component built into an instrument | 6259907e56b00c62f0fb433a |
class UtmMixin(models.AbstractModel): <NEW_LINE> <INDENT> _name = 'utm.mixin' <NEW_LINE> _description = 'UTM Mixin' <NEW_LINE> campaign_id = fields.Many2one('utm.campaign', 'Campaign', help="This is a name that helps you keep track of your different campaign efforts, e.g. Fall_Drive, Christmas_Special") <NEW_LINE> sour... | Mixin class for objects which can be tracked by marketing. | 6259907e5fdd1c0f98e5f9e6 |
class Sprite: <NEW_LINE> <INDENT> def __init__(self, item, x=0, y=0, theta=0, scale=1): <NEW_LINE> <INDENT> self.item = item <NEW_LINE> self.origPixmap = self.item.pixmap() <NEW_LINE> self.x = x <NEW_LINE> self.y = y <NEW_LINE> self.theta = theta <NEW_LINE> self.scale = scale <NEW_LINE> self.item.setTransformOriginPoi... | Pour gérer tous les objets avec des images
Chaque objet a 2 positions :
- sa position sur le plateau (self.x, self.y)
- sa position dans la fenêtre (self.item.x(), self.item.Y()) | 6259907e442bda511e95da8a |
@dataclass <NEW_LINE> class AppSettings: <NEW_LINE> <INDENT> starting_credits: int <NEW_LINE> go_cost: int <NEW_LINE> image_scale: int <NEW_LINE> assets: dict | Holds the app settings | 6259907e7d847024c075de44 |
class ServicemanagementServicesConfigsGetRequest(_messages.Message): <NEW_LINE> <INDENT> configId = _messages.StringField(1, required=True) <NEW_LINE> serviceName = _messages.StringField(2, required=True) | A ServicemanagementServicesConfigsGetRequest object.
Fields:
configId: The id of the service config resource. Optional. If it is not
specified, the latest version of config will be returned.
serviceName: The name of the service. See the `ServiceManager` overview
for naming requirements. For example: `exa... | 6259907e7c178a314d78e91e |
class Event: <NEW_LINE> <INDENT> def __init__(self, osuAPI, display_html, beatmap_id, beatmapset_id, date, epicfactor): <NEW_LINE> <INDENT> self.osuAPI = osuAPI <NEW_LINE> self.displayHTML = display_html <NEW_LINE> self.beatmapID = beatmap_id <NEW_LINE> self.beatmapsetID = beatmapset_id <NEW_LINE> self.beatmapSet = sel... | Represents an "event". Meant to be subclassed | 6259907e796e427e538501e1 |
class StartParser(object): <NEW_LINE> <INDENT> def __init__(self, subparser, parent_parser): <NEW_LINE> <INDENT> self.parent_subparser = subparser <NEW_LINE> self.parent_parser = parent_parser <NEW_LINE> self.start_parser = self.parent_subparser.add_parser( 'start', help='Start VM', parents=[self.parent_parser]) <NEW_L... | Handle VM start parser. | 6259907eaad79263cf430221 |
class LoginView(GenericAPIView): <NEW_LINE> <INDENT> permission_classes = (AllowAny,) <NEW_LINE> serializer_class = LoginSerializer <NEW_LINE> token_model = TokenModel <NEW_LINE> @sensitive_post_parameters_m <NEW_LINE> def dispatch(self, *args, **kwargs): <NEW_LINE> <INDENT> return super(LoginView, self).dispatch(*args... | Check the credentials and return the REST Token
if the credentials are valid and authenticated.
Calls Django Auth login method to register User ID
in Django session framework
Accept the following POST parameters: username, password
Return the REST Framework Token Object's key. | 6259907ea05bb46b3848be5c |
class ReactionSet(object): <NEW_LINE> <INDENT> def __init__(self, reactions): <NEW_LINE> <INDENT> self.reactions = reactions <NEW_LINE> self.trails = set() <NEW_LINE> self.supersets = set() <NEW_LINE> self.subsets = set() <NEW_LINE> self.organisms = set() <NEW_LINE> <DEDENT> def add_trail(self, trail): <NEW_LINE> <INDE... | Represents a CoMetGeNe trail as a reaction set. | 6259907ebf627c535bcb2f39 |
class Post(BaseModel): <NEW_LINE> <INDENT> class StatusChoices(models.TextChoices): <NEW_LINE> <INDENT> PUBLIC = 'PU', _('Public') <NEW_LINE> PRIVATE = 'PR', _('Private') <NEW_LINE> TRASH = 'TR', _('Trash') <NEW_LINE> <DEDENT> title = models.CharField('title', max_length=140) <NEW_LINE> slug_name = models.SlugField(uni... | Post model.
| 6259907e7b180e01f3e49d99 |
class NoPythonFiles(Exception): <NEW_LINE> <INDENT> pass | There is no python files to build | 6259907eaad79263cf430222 |
class NetworkNotifyEvent(wx.PyEvent): <NEW_LINE> <INDENT> def __init__(self, state): <NEW_LINE> <INDENT> wx.PyEvent.__init__(self) <NEW_LINE> self.SetEventType(EVT_NETWORK_NOTIFY_ID) <NEW_LINE> self.data = state | Simple event to tell the GUI to update the network notification icon. | 6259907e76e4537e8c3f0fe8 |
class TloInd: <NEW_LINE> <INDENT> def __init__(self, x): <NEW_LINE> <INDENT> self.x = x <NEW_LINE> self._cost = None <NEW_LINE> <DEDENT> def setCost(self, cost): <NEW_LINE> <INDENT> self._cost = cost <NEW_LINE> <DEDENT> def cost(self): <NEW_LINE> <INDENT> return self._cost | Merely an association of an opt point with a cost. | 6259907e5fc7496912d48f9f |
class Toluene(object): <NEW_LINE> <INDENT> mol_wt = 92.1 <NEW_LINE> density = 866.0 <NEW_LINE> k_ow = 1000.0 | The measured values of the known aromatic, toluene | 6259907e97e22403b383c969 |
class _StaticQuantizationUInt8Transformation(object): <NEW_LINE> <INDENT> def Prepare(self, emitter, registers, kernel_m, kernel_n, lhs, rhs): <NEW_LINE> <INDENT> emitter.EmitNewline() <NEW_LINE> emitter.EmitComment('StaticQuantization::Prepare') <NEW_LINE> lhs_offset = _ReadParams(emitter, registers, lhs, kernel_m, 4)... | Calculate quantized values and cast back to uint8. | 6259907e5fcc89381b266e90 |
class OverSampler(DatasetMixin): <NEW_LINE> <INDENT> def __init__(self, dataset, min_samples=5, virtual_size=10000): <NEW_LINE> <INDENT> assert hasattr(dataset, 'all_labels') <NEW_LINE> self.dataset = dataset <NEW_LINE> self.virtual_size = virtual_size <NEW_LINE> samples_per_class = defaultdict(int) <NEW_LINE> self.cla... | Dataset wrapper to enagle oversampling. | 6259907e63b5f9789fe86bd0 |
class TemplateHelper(ServerPlugin): <NEW_LINE> <INDENT> __serverplugin__ = 'TemplateHelper' <NEW_LINE> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> ServerPlugin.__init__(self, *args, **kwargs) <NEW_LINE> dummy = HelperModule("foo.py", None) <NEW_LINE> self.reserved_keywords = dir(dummy) <NEW_LINE> self.rese... | ``bcfg2-lint`` plugin to ensure that all :ref:`TemplateHelper
<server-plugins-connectors-templatehelper>` modules are valid.
This can check for:
* A TemplateHelper module that cannot be imported due to syntax or
other compile-time errors;
* A TemplateHelper module that does not have an ``__export__``
attribute, or... | 6259907eaad79263cf430223 |
@dataclass <NEW_LINE> class Retry: <NEW_LINE> <INDENT> attempts: int = 1 <NEW_LINE> delay: float = 0.1 <NEW_LINE> backoff: float = 2.0 <NEW_LINE> jitter: float = 0.1 <NEW_LINE> async def sleep(self, *, layer: Layer, attempt: int) -> None: <NEW_LINE> <INDENT> sleep = layer.configuration.retry.delay * (layer.configuratio... | Configure a Layer to retry on failure using exponential backoff.
Notes:
Computes the retry backoff with:
>>> sleep = <delay> * (<backoff> ** (attempt - 1))
>>> sleep = sleep + random(0, sleep * <jitter>)
Usage::
@flow.register(retry=Retry(...)) | 6259907e4428ac0f6e659f98 |
class BackendRule(_messages.Message): <NEW_LINE> <INDENT> class PathTranslationValueValuesEnum(_messages.Enum): <NEW_LINE> <INDENT> PATH_TRANSLATION_UNSPECIFIED = 0 <NEW_LINE> CONSTANT_ADDRESS = 1 <NEW_LINE> APPEND_PATH_TO_ADDRESS = 2 <NEW_LINE> <DEDENT> address = _messages.StringField(1) <NEW_LINE> deadline = _message... | A backend rule provides configuration for an individual API element.
Enums:
PathTranslationValueValuesEnum:
Fields:
address: The address of the API backend.
deadline: The number of seconds to wait for a response from a request.
The default deadline for gRPC is infinite (no deadline) and HTTP
requests is... | 6259907ebf627c535bcb2f3b |
class AvailableProvidersList(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'countries': {'required': True}, } <NEW_LINE> _attribute_map = { 'countries': {'key': 'countries', 'type': '[AvailableProvidersListCountry]'}, } <NEW_LINE> def __init__( self, **kwargs ): <NEW_LINE> <INDENT> super(AvailablePro... | List of available countries with details.
All required parameters must be populated in order to send to Azure.
:param countries: Required. List of available countries.
:type countries: list[~azure.mgmt.network.v2020_03_01.models.AvailableProvidersListCountry] | 6259907eaad79263cf430224 |
class Dumper: <NEW_LINE> <INDENT> def __init__(self, api, types): <NEW_LINE> <INDENT> self.api = api <NEW_LINE> self.types = types <NEW_LINE> <DEDENT> def dumperFactory(self): <NEW_LINE> <INDENT> return ValueDumper() <NEW_LINE> <DEDENT> def dump(self): <NEW_LINE> <INDENT> self.header() <NEW_LINE> for module in api.modu... | Base class to orchestrate the code generation of state object dumpers. | 6259907e7d43ff248742814a |
@python_2_unicode_compatible <NEW_LINE> class UserProfile(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField( User, related_name='profile', on_delete=models.CASCADE) <NEW_LINE> title = models.CharField(max_length=256, null=True, blank=True) <NEW_LINE> institution = models.TextField() <NEW_LINE> referred_by ... | UserProfile adds extra information to a user,
and associates the user with a group, school,
and country. | 6259907e92d797404e389891 |
@register_plugin <NEW_LINE> class CantReach(Exception): <NEW_LINE> <INDENT> def __init__(self, message): <NEW_LINE> <INDENT> super().__init__(message) | Raises when cant find path | 6259907e23849d37ff852b23 |
class PowerLawFlux(object): <NEW_LINE> <INDENT> def __init__(self, emin, emax, phi0, gamma): <NEW_LINE> <INDENT> self.emin = emin <NEW_LINE> self.emax = emax <NEW_LINE> self.gamma = gamma <NEW_LINE> self.phi0 = phi0 <NEW_LINE> <DEDENT> @staticmethod <NEW_LINE> def E2_1E8(energy): <NEW_LINE> <INDENT> return 1e-8*np.powe... | A flux only dependent on the energy of a particle, following a power law. Defined in
an energy interval [emin, emax] with fluence phi0 and spectral index gamma | 6259907eec188e330fdfa313 |
class RegistroC791(Registro): <NEW_LINE> <INDENT> campos = [ CampoFixo(1, 'REG', 'C791'), Campo(2, 'UF'), CampoNumerico(3, 'VL_BC_ICMS_ST'), CampoNumerico(4, 'VL_ICMS_ST'), ] <NEW_LINE> nivel = 4 | REGISTRO DE INFORMAÇÕES DE ST POR UF | 6259907e32920d7e50bc7aac |
class ReverseStyleTransformation(StyleTransformation): <NEW_LINE> <INDENT> def transform_attrs(self, attrs: Attrs) -> Attrs: <NEW_LINE> <INDENT> return attrs._replace(reverse=not attrs.reverse) | Swap the 'reverse' attribute.
(This is still experimental.) | 6259907e283ffb24f3cf530b |
class Solution: <NEW_LINE> <INDENT> def removeElement(self, A, elem): <NEW_LINE> <INDENT> st, lenA = 0, len(A) <NEW_LINE> while st < lenA: <NEW_LINE> <INDENT> if A[st] == elem: <NEW_LINE> <INDENT> del A[st] <NEW_LINE> lenA -= 1 <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> st += 1 <NEW_LINE> <DEDENT> <DEDENT> return le... | @param A: A list of integers
@param elem: An integer
@return: The new length after remove | 6259907e3617ad0b5ee07bba |
class IWebhookDeliveryAttemptSucceededEvent(IWebhookDeliveryAttemptResolvedEvent): <NEW_LINE> <INDENT> pass | A delivery attempt succeeded.
The ``succeeded`` attribute will be true. | 6259907ef548e778e596cffd |
class RandomContrast(object): <NEW_LINE> <INDENT> def __init__(self, lower=0.5, upper=1.5): <NEW_LINE> <INDENT> super(RandomContrast, self).__init__() <NEW_LINE> self.lower = lower <NEW_LINE> self.upper = upper <NEW_LINE> assert self.upper >= self.lower, 'contrast upper must be >= lower.' <NEW_LINE> assert self.lower >... | This class adjusts the contrast of the image. This multiplies a random
constant to the pixel values of the image. | 6259907ef548e778e596cffe |
class ChemicalPotential(dict, MSONable): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> d = dict(*args, **kwargs) <NEW_LINE> super(ChemicalPotential, self).__init__((get_el_sp(k), v) for k, v in d.items()) <NEW_LINE> if len(d) != len(self): <NEW_LINE> <INDENT> raise ValueError("Duplicate p... | Class to represent set of chemical potentials. Can be:
multiplied/divided by a Number
multiplied by a Composition (returns an energy)
added/subtracted with other ChemicalPotentials. | 6259907e23849d37ff852b25 |
class HTTPBadRequestException(HTTPException): <NEW_LINE> <INDENT> STATUS = 400 <NEW_LINE> def __init__(self, status, reason, data): <NEW_LINE> <INDENT> super().__init__(status, reason, data) | classdocs | 6259907e97e22403b383c96d |
class Data_Getter_Pred: <NEW_LINE> <INDENT> def __init__(self, loggerObj): <NEW_LINE> <INDENT> self.prediction_file='Prediction_FileFromDB/InputFile.csv' <NEW_LINE> self.loggerObj = loggerObj <NEW_LINE> self.features = ['family', 'product-type', 'steel', 'carbon', 'hardness', 'temper_rolling', 'condition', 'formability... | This class shall be used for obtaining the data from the source for prediction.
Written By: iNeuron Intelligence
Version: 1.0
Revisions: None | 6259907e5fcc89381b266e92 |
class Splitter(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.folds = 5 <NEW_LINE> self.min_playlist_size = 10 <NEW_LINE> self.test_size = 100 <NEW_LINE> <DEDENT> def cross_validation(self, interaction): <NEW_LINE> <INDENT> sample_list = [] <NEW_LINE> target_list = [] <NEW_LINE> for i in range(0, s... | A Splitter is used to split the given Dataset | 6259907e3d592f4c4edbc895 |
class GenerateToken(View): <NEW_LINE> <INDENT> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> session_token = request.GET.get('session_token') <NEW_LINE> user_token = generate_token(session_token) <NEW_LINE> data = simplejson.dumps({'token':user_token}) <NEW_LINE> return HttpRespo... | Purpose of this view is to generate a token given a session_token | 6259907e55399d3f05627f82 |
class RandomCrop(object): <NEW_LINE> <INDENT> def __init__(self, output_size): <NEW_LINE> <INDENT> assert isinstance(output_size, (int, tuple)) <NEW_LINE> if isinstance(output_size, int): <NEW_LINE> <INDENT> self.output_size = (output_size, output_size) <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> assert len(output_si... | Crop randomly the image in a sample.
Args:
output_size (tuple or int): Desired output size. If int, square crop
is made. | 6259907e66673b3332c31e6d |
@toolbar_pool.register <NEW_LINE> class PlaceholderToolbar(CMSToolbar): <NEW_LINE> <INDENT> def populate(self): <NEW_LINE> <INDENT> self.page = get_page_draft(self.request.current_page) <NEW_LINE> <DEDENT> def post_template_populate(self): <NEW_LINE> <INDENT> super().post_template_populate() <NEW_LINE> self.add_wizard_... | Adds placeholder edit buttons if placeholders or static placeholders are detected in the template | 6259907ef548e778e596cfff |
class TypographyPlugin(Plugin): <NEW_LINE> <INDENT> NNBSP = u' ' <NEW_LINE> def __init__(self, site): <NEW_LINE> <INDENT> from typogrify import filters <NEW_LINE> original_process_ignores = filters.process_ignores <NEW_LINE> filters.applyfilters = lambda text: self.owntypo(filters.smartypants(text)) <NEW_LINE> f... | Monkey-patch typogrify to correctly handle french punctuation and
various other aspects not handled by typogrify. | 6259907e5fdd1c0f98e5f9ed |
class UserList(APIView): <NEW_LINE> <INDENT> def get(self, request, format=None): <NEW_LINE> <INDENT> users = Student.objects.all() <NEW_LINE> serializer = UserSerializer(users, many=True) <NEW_LINE> return Response(serializer.data) <NEW_LINE> <DEDENT> def post(self, request, format=None): <NEW_LINE> <INDENT> serialize... | List all users, or create a new user. | 6259907e1b99ca400229026c |
class Expected: <NEW_LINE> <INDENT> def __init__(self, status: int, tokens: List[str], **kwargs): <NEW_LINE> <INDENT> self.status = status <NEW_LINE> self.tokens = tokens <NEW_LINE> for key, value in kwargs.items(): <NEW_LINE> <INDENT> setattr(self, key, value) | Result object type for parametrized tests. Expand as necessary... | 6259907e796e427e538501e9 |
class Tag(models.Model): <NEW_LINE> <INDENT> title = models.CharField(max_length=100) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = u"Тег" <NEW_LINE> verbose_name_plural = u"Теги" <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def all(cls): <NEW_LINE> <INDENT> return cls.objects.all() <NEW_LINE> <DEDENT> def g... | Tag
Keyword arguments:
@param title: name for tag | 6259907e4a966d76dd5f0955 |
class LegacyRegistrationMapping(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'legacy_registration_map' <NEW_LINE> __table_args__ = {'schema': 'event_registration'} <NEW_LINE> event_id = db.Column( db.Integer, db.ForeignKey('events.events.id'), primary_key=True, autoincrement=False ) <NEW_LINE> legacy_registrant_id = ... | Legacy registration id/token mapping
Legacy registrations had tokens which are not compatible with the
new UUID-based ones. | 6259907e1f5feb6acb164668 |
class TestMethods(unittest.TestCase): <NEW_LINE> <INDENT> def test_activation(self): <NEW_LINE> <INDENT> network = NeuralNetwork(3, 2, 1, 0.5) <NEW_LINE> self.assertTrue(np.all(network.activation_function(0.5) == 1/(1+np.exp(-0.5)))) <NEW_LINE> <DEDENT> def test_train(self): <NEW_LINE> <INDENT> network = NeuralNetwork(... | def test_data_path(self):
# Test that file path to dataset has been unaltered
global data_path
self.assertTrue(data_path.lower() == 'bike-sharing-dataset/hour.csv')
def test_data_loaded(self):
# Test that data frame loaded
global rides
self.assertTrue(isinstance(rides, pd.DataFrame)) | 6259907e3346ee7daa338399 |
class Scanner: <NEW_LINE> <INDENT> def __init__(self, input_file): <NEW_LINE> <INDENT> self.input_string = input_file.read() <NEW_LINE> self.current_char_index = 0 <NEW_LINE> self.current_token = self.get_token() <NEW_LINE> <DEDENT> def skip_white_space(self): <NEW_LINE> <INDENT> while (self.current_char_index < len(se... | The interface comprises the methods lookahead and consume.
Other methods should not be called from outside of this class. | 6259907e4c3428357761bd29 |
class Disconnected(Event): <NEW_LINE> <INDENT> __slots__ = ['graceful', 'reason'] <NEW_LINE> name = 'disconnected' <NEW_LINE> def __init__(self, reason='closed', graceful=False): <NEW_LINE> <INDENT> self.reason = reason <NEW_LINE> self.graceful = graceful <NEW_LINE> super(Disconnected, self).__init__() <NEW_LINE> <DEDE... | Generated when a websocket connection has
been dropped.
:param str reason: A description of why the websocket was closed.
:param bool graceful: Flag indicating if the connection was dropped
gracefully (`True`), or disconnected due to a socket failure
(`False`) or other problem. | 6259907e2c8b7c6e89bd5255 |
class OpenIDHybridInterferenceTest(AuthorizationCodeGrantTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super().setUp() <NEW_LINE> self.auth = HybridGrant(request_validator=self.mock_validator) | Test that OpenID don't interfere with normal OAuth 2 flows. | 6259907e55399d3f05627f84 |
class FTIRhelp(QDialog, Ui_help_FTIR): <NEW_LINE> <INDENT> def __init__(self, root): <NEW_LINE> <INDENT> QDialog.__init__(self, root) <NEW_LINE> Ui_help_FTIR.__init__(self) <NEW_LINE> self.setupUi(self) | Help window with update logs. | 6259907e283ffb24f3cf5310 |
class Sorts(): <NEW_LINE> <INDENT> def __init__(self,mylist): <NEW_LINE> <INDENT> self.mylist = mylist <NEW_LINE> <DEDENT> def selection_sort(self): <NEW_LINE> <INDENT> left_list = list() <NEW_LINE> right_list = self.mylist <NEW_LINE> assert type(right_list) == list <NEW_LINE> x = len(right_list) <NEW_LINE> y = 1 <NEW_... | Contains three different sorting functions | 6259907efff4ab517ebcf288 |
class CATMAID_OP_material_randomize(Operator): <NEW_LINE> <INDENT> bl_idname = "material.randomize" <NEW_LINE> bl_label = "Assign (semi-) random colors" <NEW_LINE> bl_description = "Assign (semi-) random colors" <NEW_LINE> bl_options = {'UNDO'} <NEW_LINE> which_neurons: EnumProperty(name="Which Neurons?", items=[('Sele... | Assigns new semi-random colors to neurons | 6259907e4f6381625f19a1e6 |
class Puck(object): <NEW_LINE> <INDENT> def __init__(self, canvas, background): <NEW_LINE> <INDENT> self.background = background <NEW_LINE> self.screen = self.background.get_screen() <NEW_LINE> self.x, self.y = self.screen[0]/2, self.screen[1]/2 <NEW_LINE> self.can, self.w = canvas, self.background.get_goal_w()/12 <NEW... | canvas: tk.Canvas object.
background: Background object. | 6259907e4a966d76dd5f0957 |
@override_settings( LANGUAGES=( ('en', 'English'), ), LANGUAGE_CODE='en', TEMPLATE_LOADERS=global_settings.TEMPLATE_LOADERS, TEMPLATE_DIRS=( os.path.join(os.path.dirname(upath(__file__)), 'templates'), ), USE_TZ=False, PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',), ) <NEW_LINE> class AuthViewsTes... | Helper base class for all the follow test cases. | 6259907eaad79263cf43022b |
class CLine(GeometricalEntity): <NEW_LINE> <INDENT> def __init__(self, kw): <NEW_LINE> <INDENT> argDescription={"CLINE_0":Point, "CLINE_1":Point} <NEW_LINE> GeometricalEntity.__init__(self,kw, argDescription) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return "Construction line through point %s at %s " %... | A class for single point construction lines From Two points. | 6259907e4428ac0f6e659fa0 |
class CommandHandler: <NEW_LINE> <INDENT> def __init__(self , prefix , client): <NEW_LINE> <INDENT> queuehelper = QueueHelper() <NEW_LINE> self.commandlist = [ Ping() , Say() , Translate() , HelloWorld(), News(), Crypto(), Math(), Play(queuehelper), Playing(queuehelper), Queue(queuehelper), Shuffle(queuehelper), Hash()... | CommandHandler is used to call the correct command and handle help | 6259907ea05bb46b3848be61 |
class Pad(object): <NEW_LINE> <INDENT> def __init__(self, padding, fill=0, padding_mode='constant'): <NEW_LINE> <INDENT> assert isinstance(padding, (numbers.Number, tuple)) <NEW_LINE> assert isinstance(fill, (numbers.Number, str, tuple)) <NEW_LINE> assert padding_mode in ['constant', 'edge', 'reflect', 'symmetric'] <NE... | Pad the given PIL Image on all sides with the given "pad" value.
Args:
padding (int or tuple): Padding on each border. If a single int is provided this
is used to pad all borders. If tuple of length 2 is provided this is the padding
on left/right and top/bottom respectively. If a tuple of length 4 ... | 6259907e1b99ca400229026e |
class UserGenerator(PtbGenerator): <NEW_LINE> <INDENT> FIRST_NAMES = [ "James", "Mary", "John", "Patricia", "Robert", "Jennifer", "Michael", "Elizabeth", "William", "Linda", "David", "Barbara", "Richard", "Susan", "Joseph", "Jessica", "Thomas", "Margaret", "Charles", "Sarah" ] <NEW_LINE> LAST_NAMES = [ "Smith", "Johnso... | User generator class. placeholder for random names and mainly used
via it's get_user() method | 6259907e99fddb7c1ca63b11 |
class IMB(Benchmark): <NEW_LINE> <INDENT> DEFAULT_EXECUTABLE = 'IMB-MPI1' <NEW_LINE> PING_PONG = 'PingPong' <NEW_LINE> ALL_TO_ALL = 'Alltoallv' <NEW_LINE> ALL_GATHER = 'Allgather' <NEW_LINE> DEFAULT_CATEGORIES = [PING_PONG, ALL_TO_ALL, ALL_GATHER] <NEW_LINE> DEFAULT_ARGUMENTS = { ALL_GATHER: ["-npmin", "{process_count}... | Provides latency/bandwidth of the network.
the `srun_nodes` does not apply to the PingPong benchmark. | 6259907e7d43ff248742814e |
class HomeHandler(BaseHandler): <NEW_LINE> <INDENT> @web.authenticated <NEW_LINE> def get(self): <NEW_LINE> <INDENT> self.x = list() <NEW_LINE> self.mypath = "." <NEW_LINE> self.onlyfiles = [ f for f in listdir(join("/home", self.get_current_user().name, "dds-notebooks/notebooks")) if bool(re.search("\w+.ipynb",f))] <... | Render the user's home page. | 6259907ea8370b77170f1e42 |
class UserProfile(base_models.TimeStampedModel, Verification): <NEW_LINE> <INDENT> ACTIVATED = "ALREADY ACTIVATED" <NEW_LINE> user = models.OneToOneField( settings.AUTH_USER_MODEL, on_delete=models.CASCADE ) <NEW_LINE> verification_key = models.CharField( max_length=40 ) <NEW_LINE> image = models.ImageField(blank=True,... | A model for user profile that also stores verification key.
Any methods under User will reside here. | 6259907ed486a94d0ba2da29 |
@unique <NEW_LINE> class SpecialByte(Enum): <NEW_LINE> <INDENT> ESCAPE_BYTE = 0x7D <NEW_LINE> HEADER_BYTE = 0x7E <NEW_LINE> XON_BYTE = 0x11 <NEW_LINE> XOFF_BYTE = 0x13 <NEW_LINE> def __init__(self, code): <NEW_LINE> <INDENT> self.__code = code <NEW_LINE> <DEDENT> def __get_code(self): <NEW_LINE> <INDENT> return self.__... | Enumerates all the special bytes of the XBee protocol that must be escaped
when working on API 2 mode.
| Inherited properties:
| **name** (String): name (ID) of this SpecialByte.
| **value** (String): the value of this SpecialByte. | 6259907e7d847024c075de50 |
class RunnerIdentity(Identity): <NEW_LINE> <INDENT> pass | A corp identity card. | 6259907ee1aae11d1e7cf54b |
class BaseDeliveryEvent(BaseWebhookEvent): <NEW_LINE> <INDENT> def __init__(self, request, data): <NEW_LINE> <INDENT> super(BaseDeliveryEvent, self).__init__(request, data) <NEW_LINE> self.smtp_id = self.data['smtp-id'] | Basic interface shared for all delivery events
- bounce
- deferred
- delivered
- dropped
- processed | 6259907e5166f23b2e244e4b |
class OWNCommand(OWNMessage): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def parse(cls, data): <NEW_LINE> <INDENT> _match = re.match(r"^\*#?(?P<who>\d+)\*.+##$", data) <NEW_LINE> if _match: <NEW_LINE> <INDENT> _who = int(_match.group("who")) <NEW_LINE> if _who == 0: <NEW_LINE> <INDENT> return cls(data) <NEW_LINE> <DED... | This class is a subclass of messages.
All messages sent during a command session are commands.
Dividing this in a subclass provides better clarity | 6259907ef9cc0f698b1c6006 |
class BaseOrganizationQuerySet(models.QuerySet): <NEW_LINE> <INDENT> def for_user(self, user): <NEW_LINE> <INDENT> return self.filter( Q(owners__in=[user]) | Q(teams__members__in=[user]), ).distinct() <NEW_LINE> <DEDENT> def for_admin_user(self, user): <NEW_LINE> <INDENT> return self.filter(owners__in=[user],).distinct... | Organizations queryset. | 6259907e3617ad0b5ee07bc2 |
class Ligotools(Package): <NEW_LINE> <INDENT> homepage = "http://www.example.com" <NEW_LINE> url = "http://software.ligo.org/lscsoft/source/ligotools-1.1.0.tar.gz" <NEW_LINE> version('1.2.0', '6933a83410e0bab5c4f390a26b6cf816') <NEW_LINE> version('1.1.0', '57ec7134faf031ce84e409856150c00c') <NEW_LINE> version('1.0... | FIXME: Put a proper description of your package here. | 6259907e2c8b7c6e89bd5259 |
class BridgeRpcCallbacks(n_rpc.RpcCallback, dhcp_rpc_base.DhcpRpcCallbackMixin, l3_rpc_base.L3RpcCallbackMixin, sg_db_rpc.SecurityGroupServerRpcCallbackMixin): <NEW_LINE> <INDENT> RPC_API_VERSION = '1.1' <NEW_LINE> TAP_PREFIX_LEN = 3 <NEW_LINE> @classmethod <NEW_LINE> def get_port_from_device(cls, device): <NEW_LINE> <... | Agent callback. | 6259907e7cff6e4e811b74b4 |
class BilConDialog(ga._AnagDialog): <NEW_LINE> <INDENT> def __init__(self, *args, **kwargs): <NEW_LINE> <INDENT> if not kwargs.has_key('title') and len(args) < 3: <NEW_LINE> <INDENT> kwargs['title'] = FRAME_TITLE <NEW_LINE> <DEDENT> ga._AnagDialog.__init__(self, *args, **kwargs) <NEW_LINE> self.LoadAnagPanel(BilConPane... | Dialog Gestione tabella Conti di bilancio. | 6259907e60cbc95b06365aa6 |
class InventorySlot(Enum): <NEW_LINE> <INDENT> SMALL = "small" <NEW_LINE> MEDIUM = "medium" <NEW_LINE> BIG = "big" <NEW_LINE> HUGE = "huge" | A slot where unequipped items are stored. | 6259907e5fdd1c0f98e5f9f3 |
class LetterAdminView(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('id', 'title', 'summary') <NEW_LINE> list_filter = (('collection', RelatedDropdownFilter), ('repository', RelatedDropdownFilter), ('letter_type', RelatedDropdownFilter), ('commentary', RelatedDropdownFilter), ('location', RelatedDropdownFilter... | Customise the Letter section of the Django admin | 6259907ebf627c535bcb2f45 |
class Solution: <NEW_LINE> <INDENT> def convert_to_title(self, n: int) -> str: <NEW_LINE> <INDENT> s = "" <NEW_LINE> while n > 0: <NEW_LINE> <INDENT> n -= 1 <NEW_LINE> s = chr(n % 26 + ord('A')) + s <NEW_LINE> n //= 26 <NEW_LINE> <DEDENT> return s | Excel 表列名称 | 6259907e76e4537e8c3f0ff4 |
class Task: <NEW_LINE> <INDENT> bug_number = None <NEW_LINE> atoms = None <NEW_LINE> def __init__(self, task_spec): <NEW_LINE> <INDENT> bug_string, *atoms = task_spec.split('\n') <NEW_LINE> if not atoms: <NEW_LINE> <INDENT> raise ValueError("No atoms in '%s' task" % bug_string) <NEW_LINE> <DEDENT> self.bug_number ... | Task is a single bug to work on. As returned by getatoms.py | 6259907edc8b845886d5502f |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.