code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class TestInferPrefsByRatioDiffDepth(TestInferPrefsByRatio): <NEW_LINE> <INDENT> Nr_RANGE = (300000, 400000) <NEW_LINE> ATOL = 1e-3 <NEW_LINE> RTOL = 1e-3
Tests `dms_tools2.inferPrefsByRatio` with different depths. There is pseudocount scaling in this case. We handle this by calculating expected results without scaling and just relaxing tolerance while keeping depth close among samples.
62598fb3be383301e0253888
class BackwardsCompatibleMeta(type): <NEW_LINE> <INDENT> def __new__(mcs, clsname, bases, dct): <NEW_LINE> <INDENT> bcsv = dct.pop("_bcsv") if "_bcsv" in dct else {} <NEW_LINE> bcsm = dct.pop("_bcsm") if "_bcsm" in dct else {} <NEW_LINE> bcim = dct.pop("_bcim") if "_bcim" in dct else {} <NEW_LINE> bca = set(bcsv) | set...
Use this meta class if you have any static methods that need to be removed from the class, but at the same time need to still "work" to ensure backward compatibility. Declare `_bcsv` dictionary with variables that should be static and deprecated. Example: class A(backwards_compatible()): _bcsv = {"foo": 1...
62598fb3379a373c97d990a3
class RemindersApiListView(HeliumAPIView, CreateModelMixin, ListModelMixin): <NEW_LINE> <INDENT> serializer_class = ReminderSerializer <NEW_LINE> permission_classes = (IsAuthenticated,) <NEW_LINE> filter_class = ReminderFilter <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> if hasattr(self.request, 'user'): <NEW...
get: Return a list of all reminder instances for the authenticated user. For convenience, reminder instances on a GET are serialized to a depth of two to avoid the need for redundant API calls. post: Create a new reminder instance for the authenticated user. For more details pertaining to choice field values, [see he...
62598fb3fff4ab517ebcd874
class Mul(Instruction): <NEW_LINE> <INDENT> pass <NEW_LINE> def __init__(self, *operands, machine): <NEW_LINE> <INDENT> super().__init__('mul', *operands, machine=machine) <NEW_LINE> <DEDENT> def exec(self): <NEW_LINE> <INDENT> logexec(self) <NEW_LINE> self.pc += 1 <NEW_LINE> self.machine.registers[self.operands[0]] *=...
`mul X Y` sets register X to the result of multiplying the value contained in register X by the value of Y.
62598fb34e4d5625663724b5
class TestPack(PackTests): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> require_git_version((1, 5, 0)) <NEW_LINE> super(TestPack, self).setUp() <NEW_LINE> self._tempdir = tempfile.mkdtemp() <NEW_LINE> self.addCleanup(shutil.rmtree, self._tempdir) <NEW_LINE> <DEDENT> def test_copy(self): <NEW_LINE> <INDENT> ...
Compatibility tests for reading and writing pack files.
62598fb3d7e4931a7ef3c122
class FusedRingsTestSystem(SmallMoleculeLibraryTestSystem): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> self.molecules = ['c1ccccc1', 'c1ccc2ccccc2c1'] <NEW_LINE> super(FusedRingsTestSystem, self).__init__(**kwargs)
Simple test system containing fused rings (benzene <--> naphtalene) in explicit solvent.
62598fb37d847024c075c451
class ShellExecuteInfoW(Structure): <NEW_LINE> <INDENT> _fields_ = [ ("cbSize", DWORD), ("fMask", ULONG), ("hwnd", HWND), ("lpVerb", LPWSTR), ("lpFile", LPWSTR), ("lpParameters", LPWSTR), ("lpDirectory", LPWSTR), ("nShow", INT), ("hInstApp", HINSTANCE), ("lpIDList", LPVOID), ("lpClass", LPWSTR), ("hKeyClass", HKEY), ("...
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-shellexecuteinfow
62598fb37c178a314d78d52b
class Screen(Gtk.DrawingArea): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(Screen,self).__init__() <NEW_LINE> self.connect("draw", self.on_draw) <NEW_LINE> GObject.timeout_add(50, self.tick) <NEW_LINE> <DEDENT> def tick(self): <NEW_LINE> <INDENT> rect = self.get_allocation() <NEW_LINE> self.get_wi...
This class is a Drawing Area
62598fb399cbb53fe6830f62
class Application(Frame): <NEW_LINE> <INDENT> def __init__(self, master=None): <NEW_LINE> <INDENT> Frame.__init__(self, master) <NEW_LINE> self.pack() <NEW_LINE> self.createWidgets() <NEW_LINE> <DEDENT> def createWidgets(self): <NEW_LINE> <INDENT> top_frame = Frame(self) <NEW_LINE> self.text_in = Entry(top_frame) <NEW_...
Application main window class.
62598fb3bd1bec0571e15109
class Message(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> movie_id = db.Column(db.Integer) <NEW_LINE> talker = db.Column(db.String(20)) <NEW_LINE> message = db.Column(db.String(200))
留言板
62598fb3e1aae11d1e7ce86b
class Conference(db.Model): <NEW_LINE> <INDENT> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> number = db.Column(db.String(16), unique=True) <NEW_LINE> name = db.Column(db.Unicode(128)) <NEW_LINE> is_public = db.Column(db.Boolean) <NEW_LINE> conference_profile_id = db.Column(db.Integer, db.ForeignKey('confere...
Conference is an event held in in a Room
62598fb33317a56b869be593
class SlicerPythonLzmaTests(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 test_compressionDecompressionRoundtrip(self): <NEW_LINE> <INDENT> someText = "something..." <NEW_LINE> originalData = som...
This test verifies that Python is build with lzma enabled.
62598fb31f5feb6acb162cae
class HiddenLayer(object): <NEW_LINE> <INDENT> def __init__(self, rng, input, n_in, n_out, W=None, b=None, activation=T.nnet.sigmoid): <NEW_LINE> <INDENT> self.input = input <NEW_LINE> if W is None: <NEW_LINE> <INDENT> W_values = np.asarray(rng.uniform(low=-np.sqrt(6. / (n_in + n_out)), high=np.sqrt(6. / (n_in + n_out)...
Hidden layer class for a Multi-layer Perceptron.
62598fb3097d151d1a2c10bd
class InternationalMelonOrder(AbstractMelonOrder): <NEW_LINE> <INDENT> def __init__(self, species, qty, country_code): <NEW_LINE> <INDENT> super.__init__(self, species, qty, "international", 0.17) <NEW_LINE> self.country_code = country_code <NEW_LINE> <DEDENT> def get_country_code(self): <NEW_LINE> <INDENT> return self...
An international (non-US) melon order.
62598fb3e5267d203ee6b994
class Card: <NEW_LINE> <INDENT> RANKS = ["A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"] <NEW_LINE> SUITS = ["c", "d", "h", "s"] <NEW_LINE> def __init__(self, rank, suit): <NEW_LINE> <INDENT> self.rank = rank <NEW_LINE> self.suit = suit <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> rep = ...
A playing card.
62598fb338b623060ffa912c
class ActivateRuleRequest(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RuleId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RuleId = params.get("RuleId")
ActivateRule请求参数结构体
62598fb3f548e778e596b634
class CodeGenerator(object): <NEW_LINE> <INDENT> def __init__(self, indent, max_length, continuation, comment): <NEW_LINE> <INDENT> self._indent = indent <NEW_LINE> self.max_length = max_length <NEW_LINE> self.continuation = continuation <NEW_LINE> self.comment = comment <NEW_LINE> self.level = 0 <NEW_LINE> self.code =...
Simple class to handle code generation. Handles simple tasks such as indent/dedent and continuation symbols. Parameters ---------- indent : `str` Specification of the indent size/type. Typical choices may be ``" "*4`` or ``" "``. max_length : `int` Maximum length of a code line. continuation : ...
62598fb3a8370b77170f046c
class Cookbook(object): <NEW_LINE> <INDENT> def __init__(self, name, comment=None): <NEW_LINE> <INDENT> self.name = str(name) <NEW_LINE> self.comment = comment <NEW_LINE> self.resources = [] <NEW_LINE> self.files = {} <NEW_LINE> <DEDENT> def add(self, resource): <NEW_LINE> <INDENT> self.resources.append(resource) <NEW_...
A cookbook is a collection of Chef resources plus the files and other supporting objects needed to run it.
62598fb31b99ca400228f578
class JsgfRule(_object): <NEW_LINE> <INDENT> __swig_setmethods__ = {} <NEW_LINE> __setattr__ = lambda self, name, value: _swig_setattr(self, JsgfRule, name, value) <NEW_LINE> __swig_getmethods__ = {} <NEW_LINE> __getattr__ = lambda self, name: _swig_getattr(self, JsgfRule, name) <NEW_LINE> __repr__ = _swig_repr <NEW_LI...
Proxy of C JsgfRule struct.
62598fb363d6d428bbee283c
@_tag <NEW_LINE> class Object(HtmlEmbedded, HtmlFlow, HtmlInteractive, HtmlPalpable, HtmlPhrasing): <NEW_LINE> <INDENT> pass
Represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin. Categories: Interactive: if the element has a usemap attribute. Listed and submittable form-associated element: None. Content model: Zero or more param elements, then, transpare...
62598fb3a05bb46b3848a8fb
class sweep50(parameter): <NEW_LINE> <INDENT> pass
Horizontal tail plane sweep angle at half chord :Unit: [deg]
62598fb356ac1b37e630227a
class Auth: <NEW_LINE> <INDENT> access_level = None <NEW_LINE> last_auth_time = None <NEW_LINE> last_wrong_access_time = None <NEW_LINE> delay_get_access = 30 <NEW_LINE> delay_auth = 30 <NEW_LINE> access_map = None <NEW_LINE> @classmethod <NEW_LINE> def login(cls, login, password): <NEW_LINE> <INDENT> current_time = da...
Class that manages authentication and authorization
62598fb37047854f4633f46b
class UserAdminFormTestCase(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.user = mommy.prepare(settings.AUTH_USER_MODEL) <NEW_LINE> self.user.username="usuario" <NEW_LINE> self.user.set_password('123456') <NEW_LINE> self.user.save() <NEW_LINE> <DEDENT> def test_valid_form(self): <NEW_LINE> <I...
Class Testing Form UserAdminCreation
62598fb34e4d5625663724b6
class Development(Common): <NEW_LINE> <INDENT> DEBUG = True <NEW_LINE> ALLOWED_HOSTS = [] <NEW_LINE> INSTALLED_APPS = Common.INSTALLED_APPS + ( 'debug_toolbar', ) <NEW_LINE> EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' <NEW_LINE> DEBUG_TOOLBAR_PATCH_SETTINGS = values.BooleanValue(True) <NEW_LINE> CO...
The in-development settings and the default configuration.
62598fb3009cb60464d015b2
class StringResponseData(ResponseData): <NEW_LINE> <INDENT> def __init__(self, string): <NEW_LINE> <INDENT> self._size = len(string.encode("latin-1")) <NEW_LINE> self._reader = io.StringIO(string) <NEW_LINE> <DEDENT> def read(self, n): <NEW_LINE> <INDENT> return bytes(self._reader.read(n).encode("latin-1")) <NEW_LINE> ...
A convenience subclass of `ResponseData` that transforms an input String into a file-like object.
62598fb37d847024c075c452
class Spider(): <NEW_LINE> <INDENT> url = 'https://www.douyu.com/g_jdqs' <NEW_LINE> root_pattern = '<div class="DyListCover-info">([\s\S]*?)</div>' <NEW_LINE> name_pattern = '</svg>([\s\S]*?)</svg>([\s\S]*?)</h2>' <NEW_LINE> number_pattern = '</svg>([\s\S]*?)</span>' <NEW_LINE> def __fetch_content(self): <NEW_LINE> <IN...
url为网页地址,root_patter、name_pattern、number_pattern为获取信息的正则表达式规则
62598fb3167d2b6e312b7003
class VideoUnlockCb(ctypes.c_void_p): <NEW_LINE> <INDENT> pass
Callback prototype to unlock a picture buffer. When the video frame decoding is complete, the unlock callback is invoked. This callback might not be needed at all. It is only an indication that the application can now read the pixel values if it needs to. @warning: A picture buffer is unlocked after the picture is deco...
62598fb3bf627c535bcb1530
class MoleculeBoxModel(models.Model): <NEW_LINE> <INDENT> moleculeBox = PickledObjectField(null=True) <NEW_LINE> svg = models.TextField(null=True) <NEW_LINE> equalsTarget = models.BooleanField() <NEW_LINE> isStartingMaterial = models.BooleanField() <NEW_LINE> @classmethod <NEW_LINE> def create(cls, moleculeBoxObject, i...
MoleculeBoxModel Contains: foreignkey to a SynthesisProblemModel Contains: pickled moleculebox Contains: SVG representation
62598fb332920d7e50bc60e4
class FileLockTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self._tempFileID = tempfile.TemporaryFile() <NEW_LINE> <DEDENT> def testSharedLock(self): <NEW_LINE> <INDENT> flock = file_lock.SharedFileLock(self._tempFileID) <NEW_LINE> self.assertEqual(type(flock), file_lock._FileLock) <...
Unit tests for the file-lock utilities
62598fb3d7e4931a7ef3c124
class BarrierTaskContext(TaskContext): <NEW_LINE> <INDENT> _port = None <NEW_LINE> _secret = None <NEW_LINE> @classmethod <NEW_LINE> def _getOrCreate(cls): <NEW_LINE> <INDENT> if not isinstance(cls._taskContext, BarrierTaskContext): <NEW_LINE> <INDENT> cls._taskContext = object.__new__(cls) <NEW_LINE> <DEDENT> return c...
.. note:: Experimental A :class:`TaskContext` with extra contextual info and tooling for tasks in a barrier stage. Use :func:`BarrierTaskContext.get` to obtain the barrier context for a running barrier task. .. versionadded:: 2.4.0
62598fb38a349b6b436862cd
class MutateJobServiceStub(object): <NEW_LINE> <INDENT> def __init__(self, channel): <NEW_LINE> <INDENT> self.CreateMutateJob = channel.unary_unary( '/google.ads.googleads.v1.services.MutateJobService/CreateMutateJob', request_serializer=google_dot_ads_dot_googleads__v1_dot_proto_dot_services_dot_mutate__job__service__...
Proto file describing the MutateJobService. Service to manage mutate jobs.
62598fb3aad79263cf42e864
class ImageStreamParser(StreamParser): <NEW_LINE> <INDENT> def get_frame(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> frame = urllib.request.urlopen(self.url, timeout=5) <NEW_LINE> def handler(signum): <NEW_LINE> <INDENT> print('Signal handler called with signal', signum) <NEW_LINE> raise OSError("Couldn't open ...
Represent a parser for a camera image stream. This class subclasses the StreamParser class and inherits its attributes and constructor. Notes ----- A camera that provides an image stream is a camera that provides a URL to get the most recent frame (regardless of how recent it is). Hence, Parsing an image stream is as...
62598fb330dc7b766599f8dd
class Register(generics.GenericAPIView): <NEW_LINE> <INDENT> permission_classes = (AllowAny,) <NEW_LINE> serializer_class = UserRegisterSerializer <NEW_LINE> allowed_methods = ('POST', 'OPTIONS', 'HEAD') <NEW_LINE> def post_register(self): <NEW_LINE> <INDENT> auth_login(self.request, self.user) <NEW_LINE> <DEDENT> def ...
Creates User Account Returns: SESSION cookie on success and 201 status; Errors and 4xx status code on failure
62598fb363b5f9789fe851fa
class GetFile(function.Function): <NEW_LINE> <INDENT> def __init__(self, stack, fn_name, args): <NEW_LINE> <INDENT> super(GetFile, self).__init__(stack, fn_name, args) <NEW_LINE> self.files = self.stack.t.files if self.stack is not None else None <NEW_LINE> <DEDENT> def result(self): <NEW_LINE> <INDENT> assert self.fil...
A function for including a file inline. Takes the form:: get_file: <file_key> And resolves to the content stored in the files dictionary under the given key.
62598fb355399d3f056265ab
class ObjectFactory: <NEW_LINE> <INDENT> __type1Value1 = None <NEW_LINE> __type1Value2 = None <NEW_LINE> __type2Value1 = None <NEW_LINE> __type2Value2 = None <NEW_LINE> @staticmethod <NEW_LINE> def initialize(): <NEW_LINE> <INDENT> ObjectFactory.__type1Value1 = Type1(1) <NEW_LINE> ObjectFactory.__type1Value2 = Type1(2)...
Manages prototypes. Static factory, that encapsulates prototype initialization and then allows instatiation of the classes from these prototypes.
62598fb3e5267d203ee6b996
class RicercaAziende(Ricerca): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Ricerca.__init__(self, 'Promogest - Ricerca aziende', RicercaAziendeFilter(self)) <NEW_LINE> self.inserimento_togglebutton.set_sensitive(False) <NEW_LINE> <DEDENT> def insert(self, toggleButton, returnWindow): <NEW_LINE> <INDENT>...
Ricerca azienda
62598fb3f548e778e596b635
class PredictionConfidenceScore(ConfidenceQuantifier): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def takes_samples(cls) -> bool: <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def problem_type(cls) -> ProblemType: <NEW_LINE> <INDENT> return ProblemType.CLASSIFICATION <NEW_LINE> <DEDENT> ...
The Prediction Confidence Score is a confidence metric in one-shot classification. Inputs/activations have to be normalized using the softmax function over all classes. The class with the highest activation is chosen as prediction, the difference between the two highest activations is used as confidence quantification.
62598fb366673b3332c3045e
class Male(Agent): <NEW_LINE> <INDENT> __slots__=() <NEW_LINE> def __init__(self, params, attributes, timestepper, stats): <NEW_LINE> <INDENT> Agent.__init__(self, params, attributes, timestepper, stats) <NEW_LINE> <DEDENT> def step_activity(self, sim): <NEW_LINE> <INDENT> super(Male, self).step_activity(sim) <NEW_LINE...
subclass of agent corresponding to male agents
62598fb3cc0a2c111447b0a4
class TestCurveChecker(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.reference = bezier.CubicBezierCurve( (10, 30), (30, 30), (10, 10), (30, 10) ) <NEW_LINE> <DEDENT> def test_assert_continuous(self): <NEW_LINE> <INDENT> discountinuous_curve = bezier.CubicBezierCurve( (30, 40), (10, ...
CurveChecker tests
62598fb356ac1b37e630227d
class City(models.Model): <NEW_LINE> <INDENT> city = models.CharField(_('city'), max_length=100) <NEW_LINE> state = models.CharField(_('state'), max_length=100) <NEW_LINE> slug = models.SlugField(_('slug'), unique=True) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = _('city') <NEW_L...
City model.
62598fb3cc0a2c111447b0a5
class NetgroupParser(parser.FileParser): <NEW_LINE> <INDENT> output_types = ["User"] <NEW_LINE> supported_artifacts = ["NetgroupConfiguration"] <NEW_LINE> USERNAME_REGEX = r"^[a-z_][a-z0-9_-]{0,30}[$]?$" <NEW_LINE> @classmethod <NEW_LINE> def ParseLines(cls, lines): <NEW_LINE> <INDENT> users = set() <NEW_LINE> filter_r...
Parser that extracts users from a netgroup file.
62598fb3d7e4931a7ef3c127
class FixedBoundedFloatStrategy(FloatStrategy): <NEW_LINE> <INDENT> Parameter = namedtuple( 'Parameter', ('cut', 'leftwards') ) <NEW_LINE> def __init__(self, lower_bound, upper_bound): <NEW_LINE> <INDENT> SearchStrategy.__init__(self) <NEW_LINE> self.lower_bound = float(lower_bound) <NEW_LINE> self.upper_bound = float(...
A strategy for floats distributed between two endpoints. The conditional distribution tries to produce values clustered closer to one of the ends.
62598fb34a966d76dd5eef69
class DaemonError(Exception): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.msg = value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.msg)
Standard exception for a Daemon error. Very simplistic at the moment in that it only caters for situations where functionality is requested without a valid PID file specified. .. attribute:: msg An explanation of the error.
62598fb3d486a94d0ba2c063
class ProxyContainer: <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self._handle_manager: HandleManager = HandleManager() <NEW_LINE> self._object_proxies: ProxyList = [] <NEW_LINE> <DEDENT> def add_object(self, obj: Any) -> Handle: <NEW_LINE> <INDENT> handle: Handle = self._handle_manager.issue_ha...
Handle Managed Container
62598fb3dd821e528d6d8fc1
class Meta: <NEW_LINE> <INDENT> model = ProviderAuthentication <NEW_LINE> fields = ('uuid', 'provider_resource_name', 'credentials')
Metadata for the serializer.
62598fb38e7ae83300ee9136
class SelectorDIC(ModelSelector): <NEW_LINE> <INDENT> def select(self): <NEW_LINE> <INDENT> warnings.filterwarnings("ignore", category=DeprecationWarning) <NEW_LINE> highest_dic = float('-inf') <NEW_LINE> best_model = None <NEW_LINE> for i in range(self.min_n_components, self.max_n_components + 1): <NEW_LINE> <INDENT> ...
select best model based on Discriminative Information Criterion Biem, Alain. "A model selection criterion for classification: Application to hmm topology optimization." Document Analysis and Recognition, 2003. Proceedings. Seventh International Conference on. IEEE, 2003. http://citeseerx.ist.psu.edu/viewdoc/download?d...
62598fb330bbd722464699c2
class Disassembler(LLVMObject): <NEW_LINE> <INDENT> def __init__(self, triple): <NEW_LINE> <INDENT> ptr = lib.LLVMCreateDisasm(c_char_p(triple), c_void_p(None), c_int(0), callbacks['op_info'](0), callbacks['symbol_lookup'](0)) <NEW_LINE> if not ptr.contents: <NEW_LINE> <INDENT> raise Exception('Could not obtain disasse...
Represents a disassembler instance. Disassembler instances are tied to specific "triple," which must be defined at creation time. Disassembler instances can disassemble instructions from multiple sources.
62598fb3236d856c2adc9488
class MyfileAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> list_display = ('filename','filenumber','created_at','user_name','file_path',)
docstring for MMyfileAdmin
62598fb357b8e32f52508165
class SheetsReadException(SheetsLibException): <NEW_LINE> <INDENT> pass
Error Reading Sheets.
62598fb330dc7b766599f8df
class EasierToAskForgiveness1(X): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> try: X.__init__(self) <NEW_LINE> except AttributeError: pass
easier to ask forgiveness idiom for call-if-exists
62598fb371ff763f4b5e7806
class ExportW(bpy.types.Operator, ExportHelper): <NEW_LINE> <INDENT> bl_idname = "export_scene.w" <NEW_LINE> bl_label = 'Export W' <NEW_LINE> filename_ext = "" <NEW_LINE> filter_glob = StringProperty( default="*.w", options={'HIDDEN'}, ) <NEW_LINE> scale = FloatProperty(default=0.01, name = "Scale", min = 0.0005, max =...
Export to W file format (.w)
62598fb35fc7496912d482c5
class StructuredPacket(serial.threaded.Protocol): <NEW_LINE> <INDENT> HEADER = b'\x01\x02\x03\x04\x05' <NEW_LINE> def __init__(self, data_size): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.data_size = int(data_size) <NEW_LINE> <DEDENT> except ValueError as exc: <NEW_LINE> <INDENT> raise ValueError("Exepected arg ...
Read binary packets. Packets are expected to be fixed length have a header to mark its beginning.
62598fb3a17c0f6771d5c2c9
class Bucket(object): <NEW_LINE> <INDENT> def __init__(self, name, type_obj, bucket_id=None, alg='straw', crush_hash='rjenkins1'): <NEW_LINE> <INDENT> if bucket_id is not None and bucket_id >= 0: <NEW_LINE> <INDENT> raise ValueError('Expecting bucket_id to be a negative integer') <NEW_LINE> <DEDENT> if alg not in ('uni...
Represents a single bucket, its properties and items. Also keeps track of any parent buckets. Arguments: - name: Unique name for this bucket - id: Unique integer ID for this bucket - type_obj: Type object referring to the bucket's type - alg: CRUSH algorith (default: straw) - hash_name: Name of the hash to use (default...
62598fb3e5267d203ee6b998
class CreateSubscriptionRequest(object): <NEW_LINE> <INDENT> deserialized_types = { 'name': 'str', 'events': 'list[ask_smapi_model.v0.development_events.subscription.event.Event]', 'vendor_id': 'str', 'subscriber_id': 'str' } <NEW_LINE> attribute_map = { 'name': 'name', 'events': 'events', 'vendor_id': 'vendorId', 'sub...
:param name: Name of the subscription. :type name: (optional) str :param events: The list of events that the subscriber should be notified for. :type events: (optional) list[ask_smapi_model.v0.development_events.subscription.event.Event] :param vendor_id: The vendorId of the event publisher. :type vendor_id: (optional)...
62598fb3f548e778e596b638
class SpellCleanRefLists(pyffi.spells.nif.NifSpell): <NEW_LINE> <INDENT> SPELLNAME = "opt_cleanreflists" <NEW_LINE> READONLY = False <NEW_LINE> def datainspect(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> if self.data.header.has_block_type(NifFormat.NiPSysMeshEmitter): <NEW_LINE> <INDENT> return False <NEW_LINE>...
Remove empty and duplicate entries in reference lists.
62598fb37047854f4633f46e
class Grade(BaseCurricularAlignmentModel): <NEW_LINE> <INDENT> level = models.ForeignKey( Level, related_name='grades' ) <NEW_LINE> class Meta: <NEW_LINE> <INDENT> verbose_name = u'Grado' <NEW_LINE> verbose_name_plural = u'Grados'
Defines model for school grade in curricular alignment
62598fb360cbc95b063643da
class GridState(np.ndarray): <NEW_LINE> <INDENT> def __new__(cls, width, height): <NEW_LINE> <INDENT> obj = super().__new__(cls, (height, width), dtype=bool) <NEW_LINE> obj.fill(False) <NEW_LINE> return obj <NEW_LINE> <DEDENT> @property <NEW_LINE> def min_width(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> return...
A wrapper around a numpy array of booleans for storing the state of a ``Grid`` instance. That is, each element in the ``GridState`` stores whether or not the corresponding grid cell is populated (i.e. contains part of a ``DockableMixin`` widget). A numpy array in particular is used for this purpose chiefly for the con...
62598fb35fcc89381b266196
class CSVGenerator(ReportGenerator): <NEW_LINE> <INDENT> writer = None <NEW_LINE> writer_function = csv.writer <NEW_LINE> first_row_with_column_names = False <NEW_LINE> mimetype = 'text/csv' <NEW_LINE> def __init__(self, report, cache_enabled=None, writer=None, first_row_with_column_names=None, **kwargs): <NEW_LINE> <I...
This is a generator to output data in CSV format. This format can be imported as a spreadsheet to Excel, OpenOffice Calc, Google Docs Spreadsheet, and others. Attributes: * 'filename' - is the file path you can inform optionally to save text to. * 'writer' - is csv.writer function you can inform manually to m...
62598fb3283ffb24f3cf3920
class ParsedAdditiveExpressionList(ListRedirect): <NEW_LINE> <INDENT> def __init__(self,multiplicativeExprList): <NEW_LINE> <INDENT> if isinstance(multiplicativeExprList,list): <NEW_LINE> <INDENT> self._list = multiplicativeExprList <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> self._list = [multiplicativeExprList] <NE...
A list of MultiplicativeExpressions, joined by '+' or '-' s
62598fb39c8ee823130401bc
class Endpoint(BasicEndpoint): <NEW_LINE> <INDENT> def __init__(self, name: str, server_handler: Callable): <NEW_LINE> <INDENT> super().__init__(name, server_handler) <NEW_LINE> self.vertex = None <NEW_LINE> self.connections = {} <NEW_LINE> <DEDENT> def connect(self, endpoint_name: str): <NEW_LINE> <INDENT> self.connec...
Generic Endpoint, has all basic features including connection management, and endpoint resolution. This class can be inherited by any Endpoint that uses a connection to a Vertex.
62598fb34e4d5625663724ba
class AdvicesViewSet(BaseViewSet): <NEW_LINE> <INDENT> permission_code = 'advices' <NEW_LINE> queryset = Advices.objects.all().select_related('created_by','updated_by') <NEW_LINE> serializer_class = AdvicesSerializer <NEW_LINE> filter_class = AdvicesFilter <NEW_LINE> filter_backends = (OrderingFilter, DjangoFilterBacke...
Type diagnostic view FILTERS: 'id': ['exact'], 'description':['exact', 'icontains'], 'type_diagnostic':['exact',], 'created_at': ['exact', 'year', 'year__gte', 'year__lte', 'month', 'month__lte', 'month__gte', 'day', 'day__lte', 'day__gte', 'year__in', 'month__in', 'day__in'], 'created_...
62598fb356ac1b37e630227e
class LegacySyndicationFeed(AtomFeed): <NEW_LINE> <INDENT> def __init__(self, title, link, description, language=None, author_email=None, author_name=None, author_link=None, subtitle=None, categories=[], feed_url=None, feed_copyright=None): <NEW_LINE> <INDENT> atom_id = link <NEW_LINE> title = title <NEW_LINE> updated ...
Provides an SyndicationFeed-compatible interface in its __init__ and add_item but is really a new AtomFeed object.
62598fb37047854f4633f46f
class TeamStanding(models.Model): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> unique_together = ( 'source_timestamp', 'team_id', 'competition_id', 'season_id',) <NEW_LINE> <DEDENT> source_timestamp = models.DateTimeField() <NEW_LINE> team_id = models.IntegerField() <NEW_LINE> competition_id = models.IntegerFiel...
Represents a team's standing.
62598fb356ac1b37e630227f
class DownBlock(BaseBlock): <NEW_LINE> <INDENT> def __init__(self, in_channels, out_channels, bn_name=NormalizationType.BatchNormalize2d, activation_name=ActivationType.ReLU): <NEW_LINE> <INDENT> super().__init__(UNetBlockName.DownBlock) <NEW_LINE> self.maxpool_conv = nn.Sequential( nn.MaxPool2d(2), DoubleConv2d(in_cha...
Downscaling with maxpool then double conv
62598fb367a9b606de546062
class Test49(unittest.TestCase): <NEW_LINE> <INDENT> def test_v1_message_validation(self) -> None: <NEW_LINE> <INDENT> from_id = "me" <NEW_LINE> client = m49.ClientV1(from_id) <NEW_LINE> server = m49.ServerV1() <NEW_LINE> parsed_message = {"to_id": "you", "amount": 1000} <NEW_LINE> request = client.send(**parsed_messag...
CBC-MAC Message Forgery
62598fb33539df3088ecc346
class Client(object): <NEW_LINE> <INDENT> def __init__(self, robot_name): <NEW_LINE> <INDENT> action_name = "/" + robot_name + "/action_server/task" <NEW_LINE> self._action_client = actionlib.SimpleActionClient(action_name, action_server_msgs.msg.TaskAction) <NEW_LINE> rospy.loginfo("Waiting for task action server to c...
A client for the action server Wraps the client side of the actionlib interface so that it can be easily used in client side applications. Example: client = Client('amigo') semantics = "{'actions': [{'action': 'say', 'sentence': 'ROBOT_NAME'}]}" client.send_task(semantics)
62598fb3cc0a2c111447b0a7
class ConversionImpossible(Exception): <NEW_LINE> <INDENT> pass
Utility exception class used by conversion methods to signal that this object cannot be converted
62598fb3379a373c97d990a9
class Entity(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.position = None <NEW_LINE> self.inventory = None <NEW_LINE> self.in_inventory = None <NEW_LINE> self.is_solid = False <NEW_LINE> self.appearance = "?" <NEW_LINE> self.description = ""
An entity is a player, a mob, an item, a fireball, etc.
62598fb37d847024c075c456
@skip_check_grad_ci( reason="reduce_min is discontinuous non-derivable function," " its gradient check is not supported by unittest framework.") <NEW_LINE> class TestReduceMinOpMultiAxises(OpTest): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.op_type = "reduce_min" <NEW_LINE> self.inputs = {'X': np.ran...
Remove Min with subgradient from gradient check to confirm the success of CI.
62598fb326068e7796d4c9ea
class TestPad(QiskitTestCase): <NEW_LINE> <INDENT> def test_padding_empty_schedule(self): <NEW_LINE> <INDENT> self.assertEqual(pulse.Schedule(), pad(pulse.Schedule())) <NEW_LINE> <DEDENT> def test_padding_schedule(self): <NEW_LINE> <INDENT> delay = 10 <NEW_LINE> sched = (Delay(delay, DriveChannel(0)).shift(10) + Delay(...
Test padding of schedule with delays.
62598fb316aa5153ce400597
class VerifyVersionCommand(install): <NEW_LINE> <INDENT> def run(self): <NEW_LINE> <INDENT> tag = os.getenv("CIRCLE_TAG") <NEW_LINE> if tag != VERSION: <NEW_LINE> <INDENT> info = f"The git tag: '{tag}' does not match the package ver: '{VERSION}'" <NEW_LINE> sys.exit(info)
Custom command to verify that the git tag matches our VERSION.
62598fb399fddb7c1ca62e34
class HostManager(crud.CRUDClient): <NEW_LINE> <INDENT> key = 'host' <NEW_LINE> base_path = '/hosts' <NEW_LINE> resource_class = Host <NEW_LINE> def list(self, project_id, **kwargs): <NEW_LINE> <INDENT> kwargs['project'] = str(project_id) <NEW_LINE> super(HostManager, self).list(**kwargs)
A manager for hosts.
62598fb3cc40096d6161a223
class ParseMatcher(Matcher): <NEW_LINE> <INDENT> custom_types = {} <NEW_LINE> parser_class = parse.Parser <NEW_LINE> def __init__(self, func, pattern, step_type=None): <NEW_LINE> <INDENT> super(ParseMatcher, self).__init__(func, pattern, step_type) <NEW_LINE> self.parser = self.parser_class(pattern, self.custom_types) ...
Uses :class:`~parse.Parser` class to be able to use simpler parse expressions compared to normal regular expressions.
62598fb34c3428357761a34e
class ExpressRouteCircuitConnection(SubResource): <NEW_LINE> <INDENT> _validation = { 'etag': {'readonly': True}, 'type': {'readonly': True}, 'circuit_connection_status': {'readonly': True}, 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'na...
Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str :param name: The name of the resource that is unique within a resource group. This name can be used to access the r...
62598fb33d592f4c4edbaf55
class Meta: <NEW_LINE> <INDENT> icon = "Message" <NEW_LINE> references = {'user': 'user.email'} <NEW_LINE> model = Message <NEW_LINE> filters = 'user',
Tune the handler.
62598fb323849d37ff851148
class ToolbarOptionGreyedOrUnavailable(CFMEException): <NEW_LINE> <INDENT> pass
Raised when toolbar wants to click item that is greyed or unavailable
62598fb344b2445a339b69bc
class Dummy(): <NEW_LINE> <INDENT> def __init__(self, Class): <NEW_LINE> <INDENT> self.Class = Class <NEW_LINE> self.num_returns = None <NEW_LINE> <DEDENT> def dumb(self, *args, **kwargs): <NEW_LINE> <INDENT> if self.num_returns == 0: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> if self.num_returns == 1: <NEW_LINE> <IN...
Make a dummy object with Dummy(Class). You can replace any object of class Class with a Dummy object, and then any functions or variables in that class will do absolutely nothing. This is useful, for example, if you want to run a procedure without actually using any instruments. Expected uses: debugging or replotting d...
62598fb35fc7496912d482c6
class EpicsAuthorityNameValidator(TaurusAuthorityNameValidator): <NEW_LINE> <INDENT> scheme = '(ca|epics)' <NEW_LINE> authority = '//' <NEW_LINE> path = '(?!)' <NEW_LINE> query = '(?!)' <NEW_LINE> fragment = '(?!)' <NEW_LINE> def getNames(self, fullname, factory=None): <NEW_LINE> <INDENT> if self.isValid(fullname): <NE...
Validator for Epics authority names. For now, the only supported authority is "//":
62598fb391f36d47f2230ef2
class CajaPropertyPage: <NEW_LINE> <INDENT> def __init__(self, git_uri): <NEW_LINE> <INDENT> self._git = git.Git(git_uri) <NEW_LINE> self._watchdog = watchdog.WatchDog(self._git.dir) <NEW_LINE> self._watchdog.connect("refresh", self._refresh) <NEW_LINE> self._builder = Gtk.Builder() <NEW_LINE> self._builder.add_from_re...
Property page main widget class.
62598fb38e7ae83300ee9139
class CalendarTodoTestCase(ModuleTestCase): <NEW_LINE> <INDENT> module = 'calendar_todo'
Test Calendar Todo module
62598fb3097d151d1a2c10c3
class WXAuthUserNotLoggedAction(generics.GenericAPIView): <NEW_LINE> <INDENT> def get_object_by_openid(self, out_open_id): <NEW_LINE> <INDENT> return ConsumerUser.get_object(**{'out_open_id': out_open_id}) <NEW_LINE> <DEDENT> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> form = WXAuthCreateUserForm(requ...
微信用户注册(处于登录状态)
62598fb338b623060ffa9132
class StrEnum(enum.Enum): <NEW_LINE> <INDENT> foo = 'foo' <NEW_LINE> bar = 'bar'
string based enum class for testing message pack/unpack
62598fb37047854f4633f470
class GXChargeTable: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.index = None <NEW_LINE> self.chargePerUnit = 0
Online help: http://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
62598fb33539df3088ecc348
class PoolIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): <NEW_LINE> <INDENT> USER_ASSIGNED = "UserAssigned" <NEW_LINE> NONE = "None"
The type of identity used for the Batch Pool.
62598fb3009cb60464d015b8
class Time(attr.Attr): <NEW_LINE> <INDENT> def __init__(self, start, end): <NEW_LINE> <INDENT> attr.Attr.__init__(self) <NEW_LINE> self.start = start <NEW_LINE> self.end = end <NEW_LINE> <DEDENT> def collides(self, other): <NEW_LINE> <INDENT> return isinstance(other, Time) <NEW_LINE> <DEDENT> def __eq__(self, other): <...
Restrict query to time range between start and end.
62598fb3bf627c535bcb1536
class Cargo(Interface): <NEW_LINE> <INDENT> def __init__(self, token=None, key=None, secret=None, config=None): <NEW_LINE> <INDENT> super(Cargo, self).__init__(key=key, secret=secret, token=token, config=config) <NEW_LINE> self.address += 'cargo/v1/' <NEW_LINE> <DEDENT> def request(self, endpoint, verb=None, **req_kwar...
Wrapper for Deutsche Bahn's Cargo Delay Statistics API. Documentation at: https://developer.deutschebahn.com/store/apis/info?name=Fahrplan&version=v1&provider=DBOpenData
62598fb3460517430c4320a9
class MessageSendBreaker(object): <NEW_LINE> <INDENT> def __init__(self, app, allow): <NEW_LINE> <INDENT> self.app = app <NEW_LINE> self.allow = allow <NEW_LINE> self._send_message_via_window = self.app.send_message_via_window <NEW_LINE> self._messages_sent = 0 <NEW_LINE> <DEDENT> def patch_app(self): <NEW_LINE> <INDEN...
A helper to break message sending during a bulk send.
62598fb326068e7796d4c9ec
class CustomerFollowUp(models.Model): <NEW_LINE> <INDENT> customer = models.ForeignKey('CustomerInfo') <NEW_LINE> content = models.TextField(verbose_name='跟踪内容') <NEW_LINE> user = models.ForeignKey('UserProfile', verbose_name='跟进人') <NEW_LINE> status_choices = ((0, '近期无报名计划'), (1, '一个月内报名'), (2, '2周内报名'), (3, '已报名')) <...
客户跟踪记录表
62598fb37d847024c075c459
class Solution: <NEW_LINE> <INDENT> def longestCommonPrefix(self, strs: list[str]) -> str: <NEW_LINE> <INDENT> if len(strs) == 0: <NEW_LINE> <INDENT> return "" <NEW_LINE> <DEDENT> s = strs[0] <NEW_LINE> for i in range(1, len(strs)): <NEW_LINE> <INDENT> while strs[i].find(s) != 0: <NEW_LINE> <INDENT> s = s[:-1] <NEW_LIN...
1、本题目求最长公共前缀,我们可以采用字符串A和B相比较求出最长前缀,再与C比较 以此类推,求出最终的最长前缀 2、现在问题变成了求两个字符串的最长公共前缀,这样如果我们从第一个字符开始比较 的话,与C比较时候会再次从第一个字符比较增加不必要的开销,所以我们选择整体比较, 如果整体不同则去掉末尾一个字符。
62598fb38a43f66fc4bf2211
class ReadExcel(object): <NEW_LINE> <INDENT> def __init__(self, file_name, sheet_name): <NEW_LINE> <INDENT> self.file_name = file_name <NEW_LINE> self.sheet_name = sheet_name <NEW_LINE> <DEDENT> def open(self): <NEW_LINE> <INDENT> self.wb = openpyxl.load_workbook(self.file_name) <NEW_LINE> self.sh = self.wb[self.sheet_...
读取excel中的用例数据
62598fb3851cf427c66b834d
class SupportedLanguagesVocabulary(object): <NEW_LINE> <INDENT> implements(IVocabularyFactory) <NEW_LINE> def __call__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> canonical_language = context.getCanonical().Language() <NEW_LINE> portal_languages = getToolByName(context, 'portal_languages') <NE...
Vocabulary that returns all supported languages of the site except for the canonical language
62598fb3f9cc0f698b1c5316
class JobSchema(_dao_utils.TimestampedSchemaMixin, _dao_utils.Schema): <NEW_LINE> <INDENT> key = {'type': 'TEXT', 'primary_key': True, 'default': _dao_utils.generate_key} <NEW_LINE> status = {'type': 'TEXT'}
Fields for job records.
62598fb3dd821e528d6d8fc5
class TransmissionViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Transmission.objects.all() <NEW_LINE> serializer_class = TransmissionSerializer <NEW_LINE> def perform_create(self, serializer): <NEW_LINE> <INDENT> serializer.save(created_by=self.request.user, updated_by=self.request.user) <NEW_LINE> <DE...
This viewset automatically provides `list` and `detail` actions.
62598fb323849d37ff85114a
class GmfSet(object): <NEW_LINE> <INDENT> def __init__(self, gmfset, investigation_time): <NEW_LINE> <INDENT> self.gmfset = gmfset <NEW_LINE> self.investigation_time = investigation_time <NEW_LINE> self.stochastic_event_set_id = 1 <NEW_LINE> <DEDENT> def __iter__(self): <NEW_LINE> <INDENT> return iter(self.gmfset) <NEW...
Small wrapper around the list of Gmf objects associated to the given SES.
62598fb363b5f9789fe85200
class SystemSize(object): <NEW_LINE> <INDENT> def __init__(self, source_dir): <NEW_LINE> <INDENT> self.source_dir = source_dir <NEW_LINE> <DEDENT> def customize(self, size, requested_filesystem): <NEW_LINE> <INDENT> if requested_filesystem: <NEW_LINE> <INDENT> if requested_filesystem.startswith('ext'): <NEW_LINE> <INDE...
Provide source tree size information Attributes * :attr:`source_dir` source directory path name
62598fb355399d3f056265b1
class RPCManager(object): <NEW_LINE> <INDENT> def __init__(self, freqtrade) -> None: <NEW_LINE> <INDENT> self.registered_modules: List[RPC] = [] <NEW_LINE> if freqtrade.config['telegram'].get('enabled', False): <NEW_LINE> <INDENT> logger.info('Enabling rpc.telegram ...') <NEW_LINE> from freqtrade.rpc.telegram import Te...
Class to manage RPC objects (Telegram, Slack, ...)
62598fb3097d151d1a2c10c5
class Or(object): <NEW_LINE> <INDENT> def __init__(self, *args): <NEW_LINE> <INDENT> self.fields = args <NEW_LINE> <DEDENT> def inside(self, entries): <NEW_LINE> <INDENT> content = map(entries.get, self.fields) <NEW_LINE> assert any(content), "Or({}) not found in {}".format(self.fields, entries) <NEW_LINE> return filte...
>>> _or = Or('foo', 'bar') >>> _or.inside({'foo': 'foo', 'baz': 'baz'}) 'foo' >>> _or.inside({'foo': 'foo', 'bar': 'baz'}) 'foo' >>> _or.inside({'buz': 'buz', 'baz': 'baz'}) Traceback (most recent call last): ... AssertionError: Or(('foo', 'bar')) not found in {'buz': 'buz', 'baz': 'baz'}
62598fb3a17c0f6771d5c2cd
class add_result(object): <NEW_LINE> <INDENT> thrift_spec = ( None, (1, TType.STRUCT, 'ire', (InvalidRequestException, InvalidRequestException.thrift_spec), None, ), (2, TType.STRUCT, 'ue', (UnavailableException, UnavailableException.thrift_spec), None, ), (3, TType.STRUCT, 'te', (TimedOutException, TimedOutException.t...
Attributes: - ire - ue - te
62598fb3fff4ab517ebcd87d
class Stack(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.st = [] <NEW_LINE> self.top = -1 <NEW_LINE> <DEDENT> def push(self,data): <NEW_LINE> <INDENT> self.st.append(data) <NEW_LINE> self.top += 1 <NEW_LINE> <DEDENT> def pop(self): <NEW_LINE> <INDENT> self.top -= 1 <NEW_LINE> if self.top < 0: <NE...
An ADT for stact
62598fb32ae34c7f260ab17a
class TagModelTests(TestCase): <NEW_LINE> <INDENT> def tearDown(self): <NEW_LINE> <INDENT> Tag.objects.all().delete() <NEW_LINE> <DEDENT> def test_tag(self): <NEW_LINE> <INDENT> tag = Tag(text='foo_tag') <NEW_LINE> tag.save() <NEW_LINE> self.assertEqual(str(tag), 'foo_tag') <NEW_LINE> <DEDENT> def test_tag_no_text(self...
Tag Model test cases.
62598fb366673b3332c30464