code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class RotateSwitchingMarkovChain(RotateGaussianMarkovChain): <NEW_LINE> <INDENT> def __init__(self, X, B, Z, B_rotator): <NEW_LINE> <INDENT> self.X_node = X <NEW_LINE> self.B_node = B <NEW_LINE> self.Z_node = Z._convert(CategoricalMoments) <NEW_LINE> self.B_rotator = B_rotator <NEW_LINE> (N,D) = self.X_node.dims[0] <NE...
Rotation for :class:`bayespy.nodes.VaryingGaussianMarkovChain` Assume the following model. Constant, unit isotropic innovation noise. :math:`A_n = B_{z_n}` Gaussian B: (..., K, D) x (D) Categorical Z: (..., N-1) x (K) GaussianMarkovChain X: (...) x (N,D) No plates for X.
62598f9f56ac1b37e6301ff8
class Array(LLike): <NEW_LINE> <INDENT> o, c = '(array ', ')'
An n-dimensional array.
62598f9ff7d966606f747df5
class State(garlicsim.data_structures.State): <NEW_LINE> <INDENT> def __init__(self, players, round=-1, match=0, n_rounds=7): <NEW_LINE> <INDENT> assert -1 <= round <= (n_rounds - 1) <NEW_LINE> self.round = round <NEW_LINE> assert 0 <= match <= infinity <NEW_LINE> self.match = match <NEW_LINE> assert all(isinstance(pla...
World state. A frozen moment in time in the simulation world.
62598f9f1f037a2d8b9e3ef5
class Entry(object): <NEW_LINE> <INDENT> def __init__(self, value, dirty, modified=None, updated=None): <NEW_LINE> <INDENT> self.value = value <NEW_LINE> self.dirty = dirty <NEW_LINE> self.updated = updated if updated != None else time.time() <NEW_LINE> self.modified = modified if modified != None else time.time()
Cache entry.
62598f9f30dc7b766599f65b
class BisectCurrentUnitTests(BisectTestCase): <NEW_LINE> <INDENT> def testShowLog(self): <NEW_LINE> <INDENT> sio = StringIO() <NEW_LINE> cmds.BisectCurrent().show_rev_log(out=sio) <NEW_LINE> <DEDENT> def testShowLogSubtree(self): <NEW_LINE> <INDENT> current = cmds.BisectCurrent() <NEW_LINE> current.switch(self.subtree_...
Test the BisectCurrent class.
62598f9f7b25080760ed72b6
class Restream(Subconstruct): <NEW_LINE> <INDENT> __slots__ = ["stream_reader", "stream_writer", "resizer"] <NEW_LINE> def __init__(self, subcon, stream_reader, stream_writer, resizer): <NEW_LINE> <INDENT> super(Restream, self).__init__(subcon) <NEW_LINE> self.stream_reader = stream_reader <NEW_LINE> self.stream_writer...
Wraps the stream with a read-wrapper (for parsing) or a write-wrapper (for building). The stream wrapper can buffer the data internally, reading it from- or writing it to the underlying stream as needed. For example, BitStreamReader reads whole bytes from the underlying stream, but returns them as individual bits. .. ...
62598f9fa8ecb0332587101b
class HostingComDriver(VCloudNodeDriver): <NEW_LINE> <INDENT> connectionCls = HostingComConnection
vCloud node driver for Hosting.com
62598f9fcc0a2c111447ae1b
class DateTimeField(Field): <NEW_LINE> <INDENT> def to_python(self, value): <NEW_LINE> <INDENT> if value is None: <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> return dateparser.parse(value)
Parses a datetime string to a string
62598f9f009cb60464d01333
class PageOffsetParser(SGMLParser): <NEW_LINE> <INDENT> def __init__(self, input_file, mapping): <NEW_LINE> <INDENT> input_file.seek(0) <NEW_LINE> self.input_file = input_file <NEW_LINE> self.mapping = mapping <NEW_LINE> self.current_offset = 0 <NEW_LINE> self.count = 0 <NEW_LINE> SGMLParser.__init__(self) <NEW_LINE> <...
Parser to compute offsets for <page> starts by document index
62598f9f090684286d5935e1
class Plugin(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> if Ice.getType(self) == _M_Ice.Plugin: <NEW_LINE> <INDENT> raise RuntimeError('Ice.Plugin is an abstract class') <NEW_LINE> <DEDENT> <DEDENT> def initialize(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def destroy(self): <NEW_LINE>...
A communicator plug-in. A plug-in generally adds a feature to a communicator, such as support for a protocol. The communicator loads its plug-ins in two stages: the first stage creates the plug-ins, and the second stage invokes Plugin.initialize on each one.
62598f9f627d3e7fe0e06cb9
class ScatteringActivities(ScatteringData, _VibAct): <NEW_LINE> <INDENT> associated_genres = ( "ramanactiv", "ramact", "raman1", "roa1", "raman2", "roa2", "raman3", "roa3", ) <NEW_LINE> _full_name_ref = dict( ramanactiv="Raman scatt. activities", ramact="Raman scatt. activities", roa1="ROA inten. ICPu/SCPu(180)", raman...
For handling scattering spectral activity data. .. list-table:: Genres associated with this class: :width: 100% * - ramanactiv - ramact - raman1 - roa1 * - raman2 - roa2 - raman3 - roa3
62598f9f2ae34c7f260aaeef
class StockViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Stock.objects.all() <NEW_LINE> serializer_class = StockSerializer
This viewset automatically provides `list`, `create`, `retrieve`, `update` and `destroy` actions.
62598f9f6e29344779b0046a
class DemoException(Exception): <NEW_LINE> <INDENT> pass
Test exception
62598f9f498bea3a75a57930
class CalculateWindow(FirstTypeWindow): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> FirstTypeWindow.__init__(self) <NEW_LINE> self.title("Calculate checksum") <NEW_LINE> self.firstLabelField("Fill text field") <NEW_LINE> self.mesText = self.firstTextField() <NEW_LINE> self.secondLabelField("Or choose a ...
Class, which describes window, where you can calculate checksum.
62598f9f30bbd7224646987e
class TupleTypeInfo(TypeInformation): <NEW_LINE> <INDENT> def __init__(self, field_types: List[TypeInformation]): <NEW_LINE> <INDENT> self._field_types = field_types <NEW_LINE> super(TupleTypeInfo, self).__init__() <NEW_LINE> <DEDENT> def get_field_types(self) -> List[TypeInformation]: <NEW_LINE> <INDENT> return self._...
TypeInformation for Tuple.
62598f9f4527f215b58e9cf3
class Players(DeclarativeBase): <NEW_LINE> <INDENT> __tablename__ = "players" <NEW_LINE> id = Column(Integer, primary_key=True) <NEW_LINE> name = Column('name', String) <NEW_LINE> player_url = Column('player_url', String, nullable=True) <NEW_LINE> position = Column('position', String, nullable=True) <NEW_LINE> age = Co...
Sqlalchemy Players model
62598f9f76e4537e8c3ef3c6
class Visits(object): <NEW_LINE> <INDENT> def __init__(self, client): <NEW_LINE> <INDENT> self.client = client <NEW_LINE> <DEDENT> def query_by_ids(self, ids=None, **kwargs): <NEW_LINE> <INDENT> kwargs['ids'] = ids.replace(' ', '') <NEW_LINE> response = self._get(path='/do/query', params=kwargs) <NEW_LINE> result = res...
A class to query and use Pardot visits. Visit field reference: http://developer.pardot.com/kb/object-field-references/#visit
62598f9f21a7993f00c65d93
class NluEnrichmentRelations(object): <NEW_LINE> <INDENT> def __init__(self, model=None): <NEW_LINE> <INDENT> self.model = model <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def _from_dict(cls, _dict): <NEW_LINE> <INDENT> args = {} <NEW_LINE> if 'model' in _dict: <NEW_LINE> <INDENT> args['model'] = _dict.get('model') <N...
An object specifying the relations enrichment and related parameters. :attr str model: (optional) *For use with `natural_language_understanding` enrichments only.* The enrichement model to use with relationship extraction. May be a custom model provided by Watson Knowledge Studio, the public model for use with Knowled...
62598f9f4e4d562566372233
@patch_getnameinfo <NEW_LINE> class _TestKeysignHostBasedAuth(ServerTestCase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> async def start_server(cls): <NEW_LINE> <INDENT> return await cls.create_server(_HostBasedServer, known_client_hosts='known_hosts') <NEW_LINE> <DEDENT> @async_context_manager <NEW_LINE> async def _...
Unit tests for host-based authentication using ssh-keysign
62598f9fcc0a2c111447ae1c
class TextFormatResponse(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.swaggerTypes = { 'TextFormat': 'TextFormat', 'Code': 'str', 'Status': 'str' } <NEW_LINE> self.attributeMap = { 'TextFormat': 'TextFormat','Code': 'Code','Status': 'Status'} <NEW_LINE> self.TextFormat = None <NEW_LINE> sel...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598f9f8e71fb1e983bb8c6
class GetToken(Resource): <NEW_LINE> <INDENT> decorators = [auth.login_required] <NEW_LINE> def get(self): <NEW_LINE> <INDENT> token = g.user.generate_auth_token() <NEW_LINE> return jsonify({"token": token.decode("ascii")})
Usage: for browser to request a token
62598f9f009cb60464d01334
@export <NEW_LINE> class Biaxial110(CartesianStrain): <NEW_LINE> <INDENT> def __init__(self, C11, C12, C44, zeta): <NEW_LINE> <INDENT> ezz = 1 <NEW_LINE> exx = (2 * C44 - C12) / (2 * C44 + C11 + C12) <NEW_LINE> exy = (-C11 - 2 * C12) / (2 * C44 + C11 + C12) <NEW_LINE> deformation_matrix = np.array([[exx, exy, 0], [exy,...
Bi-axial [110] strain for III-V semiconductors.
62598f9f92d797404e388a6e
class UpDateAnswer(MethodView): <NEW_LINE> <INDENT> @jwt_required <NEW_LINE> def put(self, qstn_id, ans_id): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> qstn_id_validation = validate.validate_entered_id(qstn_id) <NEW_LINE> if qstn_id_validation: <NEW_LINE> <INDENT> return qstn_id_validation <NEW_LINE> <DEDENT> ans_id_...
class to update an answer to a question
62598f9f67a9b606de545dd9
class DsrMessageType (pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin): <NEW_LINE> <INDENT> _ExpandedName = pyxb.namespace.ExpandedName(Namespace, 'DsrMessageType') <NEW_LINE> _XSDLocation = pyxb.utils.utility.Location('http://ddex.net/xml/20120404/ddex.xsd', 1794, 3) <NEW_LINE> _Documentation = 'A ...
A ddex:Type of ddex:Message in the Sales Reporting Message Suite Standard.
62598f9f7cff6e4e811b5833
class RastriginFunction(MultiModalFunction): <NEW_LINE> <INDENT> def __init__(self, xdim = 1, a = 1, xopt = None): <NEW_LINE> <INDENT> self.a = a <NEW_LINE> FunctionEnvironment.__init__(self, xdim, xopt) <NEW_LINE> <DEDENT> def f(self, x): <NEW_LINE> <INDENT> s = 0 <NEW_LINE> for i, xi in enumerate(x): <NEW_LINE> <INDE...
A classical multimodal benchmark with plenty of local minima, globally arranged on a bowl.
62598f9fd6c5a102081e1f55
class Config(object): <NEW_LINE> <INDENT> SECRET_KEY = os.environ.get("SECRET_KEY") or "I_want_to_have_insane_coding_skills_254" <NEW_LINE> MAIN_URL = os.getenv("DB_URL")
This class carries all of courier_app configurations.
62598f9f3c8af77a43b67e47
class Options: <NEW_LINE> <INDENT> def __init__(self) -> None: <NEW_LINE> <INDENT> self._args: argparse.Namespace = None <NEW_LINE> self.parse(sys.argv) <NEW_LINE> <DEDENT> def get_archiver(self) -> command_mod.Command: <NEW_LINE> <INDENT> return self._archiver <NEW_LINE> <DEDENT> def get_archives(self) -> List[str]: <...
Options class
62598f9fe64d504609df92c0
class TestCSVFileBase(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self, test_header=None, test_in_data=None): <NEW_LINE> <INDENT> self.test_header = test_header or 'ett|två|tre|fyra|fem|lista' <NEW_LINE> self.test_in_data = test_in_data or 'ett|två|tre|fyra|fem|lista\n' ' 1|2|3|4||1;2;3;;4;5...
Test base for open_csv_file, csv_file_to_dict and dict_to_csv_file.
62598f9f442bda511e95c26b
class Main(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.silent = "-s" in sys.argv <NEW_LINE> self.login = "-l" in sys.argv <NEW_LINE> self.users = [ arg.capitalize() for arg in sys.argv[1:] if "-" not in arg ] <NEW_LINE> if not self.users: <NEW_LINE> <INDENT> sys.exit("Запуск без пользовате...
Запуск бота
62598f9fbd1bec0571e14fcb
class HierarchyError(Exception): <NEW_LINE> <INDENT> pass
Gets thrown when something is wrong with the parameter hierarchy.
62598f9f3539df3088ecc0c5
class TestNodeCommand(test_v2_engine.BaseCLITest): <NEW_LINE> <INDENT> def test_node_list(self): <NEW_LINE> <INDENT> args = 'node list' <NEW_LINE> self.exec_v2_command(args) <NEW_LINE> self.m_get_client.assert_called_once_with('node', mock.ANY) <NEW_LINE> self.m_client.get_all.assert_called_once_with(environment_id=Non...
Tests for fuel2 node * commands.
62598f9f460517430c431f63
class UserChoiceField(forms.ModelChoiceField): <NEW_LINE> <INDENT> def label_from_instance(self, obj): <NEW_LINE> <INDENT> label = obj.get_full_name() <NEW_LINE> if label.strip(): <NEW_LINE> <INDENT> return label <NEW_LINE> <DEDENT> return super(UserChoiceField, self).label_from_instance(obj)
A ModelChoiceField for User models which shows the full name if available
62598f9f67a9b606de545dda
class DumpSchemaUI(metaclass=ABCMeta): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def dumped_schema(self, schema): <NEW_LINE> <INDENT> pass
Abstract base class for UI for DumpSchema.
62598f9f498bea3a75a57931
class LocalVeritasPropertiesSubmitter(LocalVeritasSubmitter): <NEW_LINE> <INDENT> def _submit_job(self,inpfn,outfn="stdout",jobname="",loc=""): <NEW_LINE> <INDENT> exe = BIN+"properties < %s"%inpfn <NEW_LINE> prep_commands = [] <NEW_LINE> final_commands = [] <NEW_LINE> if self.nn != 1 or self.np != 1: <NEW_LINE> <INDEN...
Fully defined submission class. Defines interaction with specific program to be run.
62598f9f6e29344779b0046c
class AzureSpnExposure(Vulnerability, Event): <NEW_LINE> <INDENT> def __init__(self, container, evidence=""): <NEW_LINE> <INDENT> Vulnerability.__init__( self, Azure, "Azure SPN Exposure", category=MountServicePrincipalTechnique, vid="KHV004", ) <NEW_LINE> self.container = container <NEW_LINE> self.evidence = evidence
The SPN is exposed, potentially allowing an attacker to gain access to the Azure subscription
62598f9f8a43f66fc4bf1f8c
class CfdConsoleProcess: <NEW_LINE> <INDENT> def __init__(self, finishedHook=None, stdoutHook=None, stderrHook=None): <NEW_LINE> <INDENT> self.process = QtCore.QProcess() <NEW_LINE> self.finishedHook = finishedHook <NEW_LINE> self.stdoutHook = stdoutHook <NEW_LINE> self.stderrHook = stderrHook <NEW_LINE> self.process.f...
Class to run a console process asynchronously, printing output and errors to the FreeCAD console and allowing clean termination in Linux and Windows
62598f9f32920d7e50bc5e66
class Order(models.Model): <NEW_LINE> <INDENT> product = models.ForeignKey(Product, related_name=_("orders")) <NEW_LINE> quantity = models.IntegerField(_("Product Quantity")) <NEW_LINE> amount = models.DecimalField(_("Total Amount"), max_digits=6, decimal_places=2) <NEW_LINE> delivery_status = models.CharField(_("Deliv...
models to store final order data
62598f9f1b99ca400228f436
class AppendCellsRequest(TypedDict): <NEW_LINE> <INDENT> fields: str <NEW_LINE> rows: List[RowData] <NEW_LINE> sheetId: int
Adds new cells after the last row with data in a sheet, inserting new rows into the sheet if necessary.
62598f9f91f36d47f2230da9
class SchemaChanges(CoClass): <NEW_LINE> <INDENT> _reg_clsid_ = GUID('{ED337BE8-C03C-4D0B-A29F-727565609B4E}') <NEW_LINE> _idlflags_ = [] <NEW_LINE> _typelib_path_ = typelib_path <NEW_LINE> _reg_typelib_ = ('{A7C74158-1062-4664-B404-8694D490FCD1}', 10, 2)
Esri Schema Changes object.
62598f9f38b623060ffa8ea4
class ContainerViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = Container.objects.all() <NEW_LINE> serializer_class = ContainerSerializer <NEW_LINE> ordering_fields = ('name',) <NEW_LINE> ordering = 'name'
A list of containers
62598f9f8da39b475be02ff0
class FileSelectorPage(ccwx.xrcwiz.XrcWizPage): <NEW_LINE> <INDENT> zope.interface.implements(p6.ui.interfaces.IWizardPage) <NEW_LINE> def __init__(self, parent, headline=_('Select Your Files')): <NEW_LINE> <INDENT> ccwx.xrcwiz.XrcWizPage.__init__(self, parent, os.path.join(p6.api.getResourceDir(), "p6.xrc"), "FILE_SEL...
Page which displays a file selector and publishes events when items are selected or deselected.
62598f9f1f037a2d8b9e3ef9
class Tip(models.Model): <NEW_LINE> <INDENT> text = models.TextField() <NEW_LINE> has_links = models.BooleanField(default=False, help_text=u'Needed for escaping characters') <NEW_LINE> datetime_since = models.DateTimeField(auto_now_add=True, help_text=u'Since when is available for publishing') <NEW_LINE> datetime_until...
Tips to show in the page. `text` is the text to be shown with autoescape off, so links are allowed. `datetime_since` date since when will be available `datetime_until` date since won't be available
62598f9f596a897236127a8d
class InterpretationWorkProduct(DictField): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(InterpretationWorkProduct, self).__init__( additional_properties=True, )
Some information about the interpretation of a work product
62598f9f67a9b606de545ddb
class Abspath_Field(URI_Field): <NEW_LINE> <INDENT> def get_links(self, links, resource, field_name, languages): <NEW_LINE> <INDENT> return get_abspath_links(self, links, resource, field_name, languages) <NEW_LINE> <DEDENT> def update_links(self, resource, field_name, source, target, languages, old_base, new_base): <NE...
Same that URI_Field but when we update links we use abspath
62598f9f097d151d1a2c0e3a
class Parallelio(CMakePackage): <NEW_LINE> <INDENT> homepage = "https://ncar.github.io/ParallelIO/" <NEW_LINE> url = "https://github.com/NCAR/ParallelIO/archive/pio2_5_2.tar.gz" <NEW_LINE> maintainers = ['tkameyama'] <NEW_LINE> version('2_5_2', sha256='935bc120ef3bf4fe09fb8bfdf788d05fb201a125d7346bf6b09e27ac3b5f34...
The Parallel IO libraries (PIO) are high-level parallel I/O C and Fortran libraries for applications that need to do netCDF I/O from large numbers of processors on a HPC system.
62598f9f2ae34c7f260aaef2
class Colors(str): <NEW_LINE> <INDENT> NAVIGABLE_CELL = '#fff' <NEW_LINE> OBSTACLE_CELL = '#aaa' <NEW_LINE> SHELVE_CELL = '#ffcc00' <NEW_LINE> PATH_CELL = '#007aff' <NEW_LINE> TARGET_BOOK_CELL = '#4cd964' <NEW_LINE> TITLE_FONT = '#5856d6' <NEW_LINE> CHEVRON = '#ff3b30' <NEW_LINE> PATH_LINE = CHEVRON
Colors based on "Apple Human Interface Guidelines - Colors" (https://developer.apple.com/ios/human-interface-guidelines/visual-design/color/)
62598f9fa79ad16197769e77
class BufferedPipe (object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self._lock = threading.Lock() <NEW_LINE> self._cv = threading.Condition(self._lock) <NEW_LINE> self._event = None <NEW_LINE> self._buffer = array.array('B') <NEW_LINE> self._closed = False <NEW_LINE> <DEDENT> def set_event(self, ev...
A buffer that obeys normal read (with timeout) & close semantics for a file or socket, but is fed data from another thread. This is used by `.Channel`.
62598f9fbd1bec0571e14fcc
class ChemicalSearchResultSet(ResultSet): <NEW_LINE> <INDENT> def getJSONFromString(self, str): <NEW_LINE> <INDENT> return json.loads(str) <NEW_LINE> <DEDENT> def get_Response(self): <NEW_LINE> <INDENT> return self._output.get('Response', None)
A ResultSet with methods tailored to the values returned by the ChemicalSearch Choreo. The ResultSet object is used to retrieve the results of a Choreo execution.
62598f9f67a9b606de545ddc
class EnvironmentResolver: <NEW_LINE> <INDENT> def clean(self, value): <NEW_LINE> <INDENT> return re.sub(r'[^a-z0-9]', '_', value, flags=re.I) <NEW_LINE> <DEDENT> def get(self, credential): <NEW_LINE> <INDENT> if 'name' in credential.parameters and 'provider' in credential.parameters: <NEW_LINE> <INDENT> key = self.cle...
Resolve values from the environment.
62598f9fbe383301e0253608
class BgpServiceCommunityListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[BgpServiceCommunity]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["BgpServiceCommunity"]] = None, next_link: Optiona...
Response for the ListServiceCommunity API service call. :param value: A list of service community resources. :type value: list[~azure.mgmt.network.v2020_03_01.models.BgpServiceCommunity] :param next_link: The URL to get the next set of results. :type next_link: str
62598f9f435de62698e9bc06
class _DateParameterBase(Parameter): <NEW_LINE> <INDENT> def __init__(self, interval=1, start=None, **kwargs): <NEW_LINE> <INDENT> super(_DateParameterBase, self).__init__(**kwargs) <NEW_LINE> self.interval = interval <NEW_LINE> self.start = start if start is not None else _UNIX_EPOCH.date() <NEW_LINE> <DEDENT> @proper...
Base class Parameter for date (not datetime).
62598f9f435de62698e9bc05
class AdWordsHeaderHandlerTest(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.adwords_client = mock.Mock() <NEW_LINE> self.header_handler = googleads.adwords._AdWordsHeaderHandler( self.adwords_client, 'v12345') <NEW_LINE> <DEDENT> def testSetHeaders(self): <NEW_LINE> <INDENT> suds_cl...
Tests for the googleads.adwords._AdWordsHeaderHandler class.
62598f9fd7e4931a7ef3beab
class BaseTeamSchema(ModelSchema): <NEW_LINE> <INDENT> class Meta: <NEW_LINE> <INDENT> model = Team <NEW_LINE> fields = ( 'id', 'title', ) <NEW_LINE> dump_only = ( 'id', )
Base team schema exposes only the most general fields.
62598f9fcb5e8a47e493c07e
class SplineRegression(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.betas = None <NEW_LINE> self.intercepts = None <NEW_LINE> self.cutpoints = None <NEW_LINE> self._betas = None <NEW_LINE> <DEDENT> def fit(self, xs, ys, cutpoints = []): <NEW_LINE> <INDENT> if isinstance(xs, np.ndarray) and ...
Class which implements linear regression using simple splines to fit non-linear patterns
62598f9f60cbc95b0636415f
class MaxWidth(MaxExtent): <NEW_LINE> <INDENT> def __init__(self, artist_list): <NEW_LINE> <INDENT> super().__init__(artist_list, "width")
Size whose absolute part is the largest width of the given *artist_list*.
62598f9f9c8ee82313040077
class AcceptPreferenceList(PreferenceList): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> super(AcceptPreferenceList, self).__init__(AcceptPreference, **kwargs)
Subclass of :class:`PreferenceList` for HTTP ``Accept`` headers.
62598f9f097d151d1a2c0e3b
class ExceptionInfo(object): <NEW_LINE> <INDENT> tb_info_type = TracebackInfo <NEW_LINE> def __init__(self, exc_type, exc_msg, tb_info): <NEW_LINE> <INDENT> self.exc_type = exc_type <NEW_LINE> self.exc_msg = exc_msg <NEW_LINE> self.tb_info = tb_info <NEW_LINE> <DEDENT> @classmethod <NEW_LINE> def from_exc_info(cls, exc...
An ExceptionInfo object ties together three main fields suitable for representing an instance of an exception: The exception type name, a string representation of the exception itself (the exception message), and information about the traceback (stored as a :class:`TracebackInfo` object). These fields line up with :fu...
62598f9f01c39578d7f12b90
class Conjugated(XForm): <NEW_LINE> <INDENT> def __init__(self, original, conjugate_by): <NEW_LINE> <INDENT> self.A = original <NEW_LINE> self.B = conjugate_by <NEW_LINE> self.B_inv = conjugate_by.inverse <NEW_LINE> if self.B_inv is None: <NEW_LINE> <INDENT> raise ValueError("conjugate_by must have an inverse") <NEW_LI...
Conjugate XForm A by an invertible XForm B by applying: C = B * A * B^(-1) This is useful for changing coordinate systems. For example, to apply a radial scaling, conjugate by a transformation to Cylindrical coordinates (well, in this case a Conjugated(Scale(scale_factor, 1, 1), CylindricalToCartesian())
62598f9f30bbd72246469880
class IEC104_IO_C_RP_NA_1_IOA(IEC104_IO_C_RP_NA_1): <NEW_LINE> <INDENT> name = 'C_RP_NA_1 (+ioa)' <NEW_LINE> fields_desc = [LEThreeBytesField('information_object_address', 0)] + IEC104_IO_C_RP_NA_1.fields_desc
extended version of IEC104_IO_C_RP_NA_1 containing an individual information object address
62598f9f442bda511e95c26e
class NumpyEncoder(json.JSONEncoder): <NEW_LINE> <INDENT> def default(self, obj): <NEW_LINE> <INDENT> if isinstance(obj, np.ndarray): <NEW_LINE> <INDENT> if obj.flags['C_CONTIGUOUS']: <NEW_LINE> <INDENT> obj_data = obj.data <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> cont_obj = np.ascontiguousarray(obj) <NEW_LINE> as...
JSON encoder that supports numpy arrays. References ---------- http://stackoverflow.com/a/24375113/1150961
62598f9ff8510a7c17d7e081
class Solution: <NEW_LINE> <INDENT> def search(self, A, target): <NEW_LINE> <INDENT> start, end = 0, len(A) - 1 <NEW_LINE> while(start <= end): <NEW_LINE> <INDENT> i = (start + end) / 2 <NEW_LINE> if (A[i] == target): <NEW_LINE> <INDENT> return i <NEW_LINE> <DEDENT> if (A[i] > A[start]): <NEW_LINE> <INDENT> if(target >...
@param A : a list of integers @param target : an integer to be searched @return : an integer
62598f9f0c0af96317c56194
class Product(models.Model): <NEW_LINE> <INDENT> category = models.ForeignKey(Category, related_name='products', on_delete=models.DO_NOTHING, verbose_name='Категория товара') <NEW_LINE> name = models.CharField(max_length=200, db_index=True, verbose_name='Имя товара') <NEW_LINE> slug = models.SlugField(max_length=200, d...
The product
62598f9f56b00c62f0fb26c3
class TestCompareXLSXFiles(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.maxDiff = None <NEW_LINE> filename = 'set_column08.xlsx' <NEW_LINE> test_dir = 'xlsxwriter/test/comparison/' <NEW_LINE> self.image_dir = test_dir + 'images/' <NEW_LINE> self.got_filename = test_dir + '_test_' + ...
Test file created by XlsxWriter against a file created by Excel.
62598f9f6aa9bd52df0d4cde
class Pitch(mlbgame.object.Object): <NEW_LINE> <INDENT> def nice_output(self): <NEW_LINE> <INDENT> return 'Pitch: {0} at {1}: {2}'.format( self.pitch_type, self.start_speed, self.des) <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return self.nice_output()
Class that holds information about individual pitches. Properties: des des_es pitch_type start_speed sv_id type Additional properties if `self._endpoint == 'innings'`: id code tfs tfs_zulu x y event_num sv_id play_guid end_speed sz_top sz_bot ...
62598f9f38b623060ffa8ea6
@python_2_unicode_compatible <NEW_LINE> class BrowserIDException(Exception): <NEW_LINE> <INDENT> def __init__(self, exc): <NEW_LINE> <INDENT> self.exc = exc <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return six.text_type(self.exc)
Raised when there is an issue verifying an assertion.
62598f9f1f037a2d8b9e3efb
@dataclass <NEW_LINE> class P148HasComponent: <NEW_LINE> <INDENT> URI = "http://erlangen-crm.org/current/P148_has_component"
Scope note: This property associates an instance of E89 Propositional Object with a structural part of it that is by itself an instance of E89 Propositional Object. This property is transitive Examples: - Dante's "Divine Comedy" (E89) has component Dante's "Hell" (E89) In First Order Logic: P148(x,y) &#8835; E89(x)...
62598f9f7cff6e4e811b5837
class MessageThread(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'message_threads' <NEW_LINE> id = db.Column(db.Integer, primary_key=True) <NEW_LINE> user1 = db.Column(db.Integer, db.ForeignKey('users.id')) <NEW_LINE> user2 = db.Column(db.Integer, db.ForeignKey('users.id')) <NEW_LINE> title = db.Column(db.Unicode, nu...
Database model for message threads. Contains: - id: int, auto-incremented. - user1: int, foreign key. - user2: int, foreign key. - title: string. Optional. - order_id: int, foreign key (if about an order).
62598f9f3eb6a72ae038a455
class LaunchWindow(models.Model): <NEW_LINE> <INDENT> name = models.CharField(max_length=255) <NEW_LINE> description = models.TextField() <NEW_LINE> cron_format = models.CharField(max_length=255, blank=True, null=True) <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.name
Defines a period of time that deployments can be made in
62598f9f67a9b606de545ddd
class BasePolicy(object): <NEW_LINE> <INDENT> __metaclass__ = abc.ABCMeta <NEW_LINE> @abc.abstractmethod <NEW_LINE> def get_action(self, state): <NEW_LINE> <INDENT> raise NotImplemented <NEW_LINE> <DEDENT> @abc.abstractmethod <NEW_LINE> def evaluate(self, state): <NEW_LINE> <INDENT> raise NotImplemented
Base Policy
62598f9f24f1403a926857bc
class PathAccessError(AttributeError, KeyError, IndexError, GlomError): <NEW_LINE> <INDENT> def __init__(self, exc, path, part_idx): <NEW_LINE> <INDENT> self.exc = exc <NEW_LINE> self.path = path <NEW_LINE> self.part_idx = part_idx <NEW_LINE> <DEDENT> def __repr__(self): <NEW_LINE> <INDENT> cn = self.__class__.__name__...
This :exc:`GlomError` subtype represents a failure to access an attribute as dictated by the spec. The most commonly-seen error when using glom, it maintains a copy of the original exception and produces a readable error message for easy debugging. If you see this error, you may want to: * Check the target data is...
62598f9f009cb60464d01339
class WalletTransactionIdempotencyKey(ModelSimple): <NEW_LINE> <INDENT> allowed_values = { } <NEW_LINE> validations = { ('value',): { 'max_length': 128, 'min_length': 1, }, } <NEW_LINE> additional_properties_type = None <NEW_LINE> _nullable = False <NEW_LINE> @cached_property <NEW_LINE> def openapi_types(): <NEW_LINE> ...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Attributes: allowed_values (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict with a capitalized key describing the a...
62598f9fd7e4931a7ef3beac
class ColorFormatter(logging.Formatter): <NEW_LINE> <INDENT> _levelMap = _levelMap <NEW_LINE> _tagMap = _tagMap <NEW_LINE> def __init__(self, fmt=None, datefmt=None): <NEW_LINE> <INDENT> if fmt is None: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> elif isinstance(fmt, dict): <NEW_LINE> <INDENT> for level in fmt: <NEW_L...
ColorFormater Class
62598f9fb7558d5895463442
class GDALRasterBase(GDALBase): <NEW_LINE> <INDENT> @property <NEW_LINE> def metadata(self): <NEW_LINE> <INDENT> if not capi.get_ds_metadata_domain_list: <NEW_LINE> <INDENT> raise ValueError('GDAL ≥ 1.11 is required for using the metadata property.') <NEW_LINE> <DEDENT> domain_list = ['DEFAULT'] <NEW_LINE> meta_list = ...
Attributes that exist on both GDALRaster and GDALBand.
62598f9f4f6381625f1993c6
class Linker(Executor): <NEW_LINE> <INDENT> def can_handle(self, directive): <NEW_LINE> <INDENT> return directive == 'link' <NEW_LINE> <DEDENT> def handle(self, directive, data): <NEW_LINE> <INDENT> if directive != 'link': <NEW_LINE> <INDENT> raise ValueError('Linker cannot handle directive %s' % directive) <NEW_LINE> ...
Symbolically links dotfiles.
62598f9f66656f66f7d5a205
class RazerChromaHDK(_RazerDeviceBrightnessSuspend): <NEW_LINE> <INDENT> USB_VID = 0x1532 <NEW_LINE> USB_PID = 0x0F09 <NEW_LINE> HAS_MATRIX = True <NEW_LINE> MATRIX_DIMS = [4, 16] <NEW_LINE> METHODS = ['get_device_type_accessory', 'set_static_effect', 'set_wave_effect', 'set_spectrum_effect', 'set_none_effect', 'set_br...
Class for the Razer Chroma Hardware Development Kit (HDK)
62598f9f435de62698e9bc08
class HistogramMetricFamily(Metric): <NEW_LINE> <INDENT> def __init__(self, name, documentation, buckets=None, sum_value=None, labels=None): <NEW_LINE> <INDENT> Metric.__init__(self, name, documentation, 'histogram') <NEW_LINE> if (sum_value is None) != (buckets is None): <NEW_LINE> <INDENT> raise ValueError('buckets a...
A single histogram and its samples. For use by custom collectors.
62598f9f442bda511e95c26f
class GraphicBox(object): <NEW_LINE> <INDENT> def __init__(self, image): <NEW_LINE> <INDENT> surface = image.load() <NEW_LINE> iw, self.th = surface.get_size() <NEW_LINE> self.tw = iw / 9 <NEW_LINE> names = "nw ne sw se n e s w c".split() <NEW_LINE> tiles = [ surface.subsurface((i*self.tw, 0, self.tw, self.th)) for i i...
Generic class for drawing graphical boxes load it, then draw it wherever needed
62598f9f3539df3088ecc0c9
class SamDBTestCase(TestCaseInTempDir): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> super(SamDBTestCase, self).setUp() <NEW_LINE> self.session = system_session() <NEW_LINE> logger = logging.getLogger("selftest") <NEW_LINE> domain = "dsdb" <NEW_LINE> realm = "dsdb.samba.example.com" <NEW_LINE> host_name = "...
Base-class for tests with a Sam Database. This is used by the Samba SamDB-tests, but e.g. also by the OpenChange provisioning tests (which need a Sam).
62598f9fc432627299fa2ded
class RubStyle(Style): <NEW_LINE> <INDENT> default_style = 'autumn' <NEW_LINE> styles = { Whitespace: '#bbbbbb', Comment: 'italic #818181', Comment.Preproc: 'noitalic #4c8317', Comment.Special: 'italic #003560', Keyword: 'bold #003560', Keyword...
A style based on the Corporate Design of the Ruhr-University Bochum.
62598f9f097d151d1a2c0e3d
class PoCSimulationResultNotFoundException(SkipableSimulatorException): <NEW_LINE> <INDENT> pass
This exception is raised if the expected PoC simulation result string was not found in the simulator's output.
62598f9fa17c0f6771d5c04e
class patient_PatientRepresent(S3Represent): <NEW_LINE> <INDENT> def lookup_rows(self, key, values, fields=[]): <NEW_LINE> <INDENT> table = self.table <NEW_LINE> ptable = current.s3db.pr_person <NEW_LINE> count = len(values) <NEW_LINE> if count == 1: <NEW_LINE> <INDENT> query = (key == values[0]) <NEW_LINE> <DEDENT> el...
Representation of Patient names by their full name
62598f9fa219f33f346c662e
class DepCheckProduces(Actor): <NEW_LINE> <INDENT> name = 'dep_check_produces' <NEW_LINE> consumes = () <NEW_LINE> produces = (DepCheck1, DepCheck3) <NEW_LINE> tags = (FirstPhaseTag, WorkflowApiTestWorkflowTag) <NEW_LINE> def process(self): <NEW_LINE> <INDENT> self.produce(DepCheck1(), DepCheck3())
Produces messages DepCheck1 and DepCheck3 which are going to be consumed by the DepCheckAPI1 and DepCheckAPI3 APIs.
62598f9f32920d7e50bc5e6a
class IOHandler: <NEW_LINE> <INDENT> __metaclass__ = ABCMeta <NEW_LINE> @abstractmethod <NEW_LINE> def fileno(self): <NEW_LINE> <INDENT> return None <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def is_readable(self): <NEW_LINE> <INDENT> return False <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def wait_for_readabil...
Wrapper for a socket or a file descriptor to be used in event loop or for I/O threads.
62598f9ff8510a7c17d7e082
class VSEQF_UL_QuickMarkerPresetList(bpy.types.UIList): <NEW_LINE> <INDENT> def draw_item(self, context, layout, data, item, icon, active_data, active_propname): <NEW_LINE> <INDENT> del context, data, icon, active_data, active_propname <NEW_LINE> split = layout.split(factor=.9, align=True) <NEW_LINE> split.operator('vs...
Draws an editable list of QuickMarker presets
62598f9f0c0af96317c56196
class DPPError(Exception): <NEW_LINE> <INDENT> pass
Error thrown for DPP violations.
62598f9f3d592f4c4edbace3
class ChangeEvent(BaseObject): <NEW_LINE> <INDENT> def __init__(self, api=None, field_name=None, id=None, previous_value=None, type=None, value=None, **kwargs): <NEW_LINE> <INDENT> self.api = api <NEW_LINE> self.field_name = field_name <NEW_LINE> self.id = id <NEW_LINE> self.previous_value = previous_value <NEW_LINE> s...
###################################################################### # Do not modify, this class is autogenerated by gen_classes.py # ######################################################################
62598f9fbaa26c4b54d4f0c4
class BackupFileHandler(BaseHandler): <NEW_LINE> <INDENT> allowed_methods = ('GET', 'POST', 'PUT', 'DELETE') <NEW_LINE> model = BackupFile <NEW_LINE> def read(self, request, backupid=None): <NEW_LINE> <INDENT> if backupid: <NEW_LINE> <INDENT> return BackupFile.objects.get(id=backupid) <NEW_LINE> <DEDENT> return {} <NEW...
The piston handler for the :class:`.BackupFile` class BackupFiles are used internally by MServe for replication. This handler allows saving, upodating and reading of a BackupFile object and the related file.
62598f9f6aa9bd52df0d4ce0
class Courier(models.Model): <NEW_LINE> <INDENT> CourierId = models.AutoField(primary_key=True) <NEW_LINE> UserId = models.ForeignKey(User, on_delete=models.CASCADE) <NEW_LINE> CourierName = models.CharField(max_length=200, unique=True)
Класс для табилцы в БД с курьерами.
62598f9fa8370b77170f01f9
class LoggerManager(Singleton): <NEW_LINE> <INDENT> def init(self, debug=False): <NEW_LINE> <INDENT> path = os.environ[LOGGING_CONFIG_ENVIRONMENT_VARIABLE] if LOGGING_CONFIG_ENVIRONMENT_VARIABLE in os.environ else None <NEW_LINE> haveenv = path and os.path.isfile(path) <NEW_LINE> if path and not haveenv: <NEW_LINE> <IN...
Logger Manager. Provides an interface to configure logging at runtime.
62598f9f91f36d47f2230dab
class CreateView(LoginRequiredMixin, NextMixin, FormMessageMixin, generic.CreateView): <NEW_LINE> <INDENT> model = Comment <NEW_LINE> form_class = CommentCreateForm <NEW_LINE> form_valid_message = _("The comment has been created successfully.") <NEW_LINE> @property <NEW_LINE> def default_next_url(self): <NEW_LINE> <IND...
Add a comment to the given present.
62598f9f16aa5153ce400315
class ProgressBar(wx.Gauge): <NEW_LINE> <INDENT> def __init__(self, parent): <NEW_LINE> <INDENT> wx.Gauge.__init__(self, parent, -1, 100) <NEW_LINE> self.parent = parent <NEW_LINE> self._Layout() <NEW_LINE> self.__bind_events() <NEW_LINE> <DEDENT> def __bind_events(self): <NEW_LINE> <INDENT> sub = Publisher.subscribe <...
Progress bar / gauge.
62598f9f8e7ae83300ee8eb5
class DirectoryNode(StorageNode): <NEW_LINE> <INDENT> @retryable_transaction() <NEW_LINE> @fsync_commit <NEW_LINE> def make_file(self, name): <NEW_LINE> <INDENT> self._load() <NEW_LINE> return self._gateway.make_file(self.id, name) <NEW_LINE> <DEDENT> @retryable_transaction() <NEW_LINE> @fsync_commit <NEW_LINE> def mak...
DAO for a Directory.
62598f9fe76e3b2f99fd884d
class Calculator(): <NEW_LINE> <INDENT> def add(self, firstOperand, secondOperand): <NEW_LINE> <INDENT> return firstOperand + secondOperand <NEW_LINE> <DEDENT> def subtract(self, firstOperand, secondOperand): <NEW_LINE> <INDENT> return firstOperand - secondOperand <NEW_LINE> <DEDENT> def multiply(self, firstOperand, se...
Performs the four basic mathematical operations Methods: add(number, number) subtract(number, number) multiply(number, number) divide(number,number)
62598f9f1f037a2d8b9e3efd
class MagikUI(webapp2.RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> index_file = os.path.dirname(__file__) + "/../templates/index.html" <NEW_LINE> self.response.out.write(file(index_file).read()) <NEW_LINE> <DEDENT> def post(self): <NEW_LINE> <INDENT> cloud_name = self.request.get('cloud') <NE...
MagikUI provides handlers that display a web interface to the Magik API. Specifically, it exposes a route that renders a web page to let users fill in data needed to issue a request (the GET route), and another route that performs the request (the POST route).
62598f9f91af0d3eaad39c21
class TermListView(RESTDispatch): <NEW_LINE> <INDENT> def get(self, request, *args, **kwargs): <NEW_LINE> <INDENT> curr_term = get_current_active_term() <NEW_LINE> terms = { 'current': curr_term.json_data(), 'next': get_term_after(curr_term).json_data(), } <NEW_LINE> return self.json_response({'terms': terms})
Retrieves a list of Terms.
62598f9f009cb60464d0133a
class AttributeAlreadyChanged(MCVirtException): <NEW_LINE> <INDENT> pass
Attribute, user is trying to change, has already changed.
62598f9f3617ad0b5ee05f67
class Cliques(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.egonets='../egonets/' <NEW_LINE> self.edge_set='./edges/' <NEW_LINE> self.training_set='../Training/' <NEW_LINE> self.testing_egonets='./test_egonets/' <NEW_LINE> self.edge_set='./edges/' <NEW_LINE> self.cliques='./cliques/' <NEW_LINE> <D...
Constructs max-cliques of various sizes over all test_egonets files
62598f9f56ac1b37e6302001
class KNNEvaluator(object): <NEW_LINE> <INDENT> def __init__(self, distance, k=3): <NEW_LINE> <INDENT> self._distance = distance <NEW_LINE> self._k = k <NEW_LINE> <DEDENT> def evaluate(self, evaluation_series, reference_set, *args): <NEW_LINE> <INDENT> distances = [self._distance(evaluation_series, s) for s in referenc...
k-Nearest Neighbors evaluator. Currently uses brute force to find the kNN distnce - this is the best we can do without extra information about the distance function.
62598f9f460517430c431f66
class DeleteFunctionResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> self.RequestId = params.get("RequestId")
DeleteFunction response structure.
62598f9ff548e778e596b3c3
class Pitch(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'pitches' <NEW_LINE> id = db.Column(db.Integer, primary_key = True) <NEW_LINE> category = db.Column(db.String(255)) <NEW_LINE> title = db.Column(db.String(255)) <NEW_LINE> posted = db.Column(db.DateTime,default=datetime.utcnow) <NEW_LINE> likes = db.Column(db.I...
Pitch class to define the pitch objects
62598f9fd53ae8145f9182a4