code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class Caption(ContainedText): <NEW_LINE> <INDENT> def __init__(self, table, parentviewer, attrs): <NEW_LINE> <INDENT> ContainedText.__init__(self, table, parentviewer, attrs) <NEW_LINE> self._tw.config(relief=FLAT, borderwidth=0) <NEW_LINE> def conv_align(val): <NEW_LINE> <INDENT> return grailutil.conv_enumeration( gra...
A table caption element.
62598fba97e22403b383b080
class WebHookMethod(Enum): <NEW_LINE> <INDENT> GET = "GET" <NEW_LINE> POST = "POST"
WebHook Method
62598fba26068e7796d4cad3
class TweetAnalyzer(): <NEW_LINE> <INDENT> def clean_tweet(self, tweet): <NEW_LINE> <INDENT> return ' '.join(re.sub("(@[A-Za-z0-9]+)|([^0-9A-Za-z \t])|(\w+:\/\/\S+)", " ", tweet).split()) <NEW_LINE> <DEDENT> def analyze_sentiment(self, tweet): <NEW_LINE> <INDENT> analysis = TextBlob(self.clean_tweet(tweet)) <NEW_LINE> ...
Functionality for analyzing and categorizing content from tweets.
62598fba5fcc89381b266209
class MapInputHandler(object): <NEW_LINE> <INDENT> def __init__(self, pInputFilePath, pPointClass = None, pSegmentClass = None): <NEW_LINE> <INDENT> self._inputFilePath = pInputFilePath <NEW_LINE> self._pointClass = tuple if pPointClass is None else pPointClass <NEW_LINE> self._segmentClass = tuple if pSegmentClass is ...
Handles the parsing of a file which contains a street network.
62598fba4527f215b58ea04f
class cubicInterpFunction: <NEW_LINE> <INDENT> def __init__(self, y0, dy0, y1, dy1): <NEW_LINE> <INDENT> y3 = y1 <NEW_LINE> y1 = y0 + dy0/3.0 <NEW_LINE> y2 = y3 - dy1/3.0 <NEW_LINE> self.Y = y0, y1, y2, y3 <NEW_LINE> <DEDENT> def __call__(self, t): <NEW_LINE> <INDENT> mt = 1-t <NEW_LINE> y0, y1, y2, y3 = self.Y <NEW_LI...
Create an interpolating function between two points with a cubic polynomial. Like :func:`makeInterpFuncs`, but only uses the first derivatives.
62598fba377c676e912f6e2d
class TensorBoard(Callback): <NEW_LINE> <INDENT> def __init__(self, log_dir='./logs', histogram_freq=0): <NEW_LINE> <INDENT> super(Callback, self).__init__() <NEW_LINE> if K._BACKEND != 'tensorflow': <NEW_LINE> <INDENT> raise Exception('TensorBoard callback only works ' 'with the TensorFlow backend.') <NEW_LINE> <DEDEN...
Tensorboard basic visualizations. This callback writes a log for TensorBoard, which allows you to visualize dynamic graphs of your training and test metrics, as well as activation histograms for the different layers in your model. TensorBoard is a visualization tool provided with TensorFlow. If you have installed Te...
62598fbaf548e778e596b720
class Application(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.api = falcon.API() <NEW_LINE> self.trigger_manager = TriggerManager() <NEW_LINE> self.reload_config() <NEW_LINE> self.bootstrap = None <NEW_LINE> signal.signal(signal.SIGINT, self.on_shutdown) <NEW_LINE> <DEDENT> def on_shutdown...
Main class, control application life-cycle and routing
62598fbad7e4931a7ef3c210
class _ExceptionProxy(object): <NEW_LINE> <INDENT> def __getattr__(self, name): <NEW_LINE> <INDENT> raise ValueError("Zip file has been closed") <NEW_LINE> <DEDENT> def __setattr__(self, name, value): <NEW_LINE> <INDENT> raise ValueError("Zip file has been closed") <NEW_LINE> <DEDENT> def __bool__(self): <NEW_LINE> <IN...
A placeholder for an object that may no longer be used.
62598fba4428ac0f6e65869d
class Get_friends_number(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.headers = util.headers <NEW_LINE> self.base_url = util.parse_friends_url() <NEW_LINE> util.check_path('friends') <NEW_LINE> print('Start to get friends list and save it for ./friends folder') <NEW_LINE> <DEDENT> def get_f...
Use to get one's friends from their qzone's entry list
62598fba44b2445a339b6a32
class XmlNs0ChangeUserGroupRequest(object): <NEW_LINE> <INDENT> swagger_types = { 'name': 'str' } <NEW_LINE> attribute_map = { 'name': 'name' } <NEW_LINE> def __init__(self, name=None): <NEW_LINE> <INDENT> self._name = None <NEW_LINE> self.discriminator = None <NEW_LINE> if name is not None: <NEW_LINE> <INDENT> self.na...
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
62598fbad486a94d0ba2c149
class ShowPool(neutronV20.ShowCommand): <NEW_LINE> <INDENT> resource = 'pool'
Show information of a given pool.
62598fba627d3e7fe0e0702d
class MongoError(Exception): <NEW_LINE> <INDENT> pass
Base MongoDB error.
62598fba091ae35668704d9d
class Formula(Computation): <NEW_LINE> <INDENT> def __init__(self, data_type, func, cast=True): <NEW_LINE> <INDENT> self._data_type = data_type <NEW_LINE> self._func = func <NEW_LINE> self._cast = cast <NEW_LINE> <DEDENT> def get_computed_data_type(self, table): <NEW_LINE> <INDENT> return self._data_type <NEW_LINE> <DE...
A simple drop-in computation that can apply any function to rows. :param data_type: The data type this formula will return. :param func: The function to be applied to each row. Must return a valid value for the specified data type. :param cast: If ``True``, each return value will be cast to the specifi...
62598fba283ffb24f3cf39ff
class MainPage(webapp2.RequestHandler): <NEW_LINE> <INDENT> def get(self): <NEW_LINE> <INDENT> template = JINJA_ENVIRONMENT.get_template('index.html') <NEW_LINE> now = datetime.utcnow() <NEW_LINE> now = now.replace(tzinfo=pytz.utc) <NEW_LINE> real_localtz = datetime.astimezone(now, pytz.timezone('America/New_York')) <N...
Renders the main page of the Wellesley Daily Dish application with the current menu for each dining hall displayed.
62598fba60cbc95b063644b9
class Handler(ABC): <NEW_LINE> <INDENT> @abstractmethod <NEW_LINE> def set_next(self, handler: 'Handler') -> 'Handler': <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @abstractmethod <NEW_LINE> def handle(self, request) -> Optional[str]: <NEW_LINE> <INDENT> pass
Интерфейс Обработчика объявляет метод построения цепочки обработчиков. Он также объявляет метод для выполнения запроса.
62598fbaad47b63b2c5a79cf
class SignalHandler(tornado.web.RequestHandler): <NEW_LINE> <INDENT> def initialize(self, pipes): <NEW_LINE> <INDENT> self.pipes = pipes <NEW_LINE> <DEDENT> def put(self, pid, signal): <NEW_LINE> <INDENT> self.pipes.repository[pid].send(signal)
API handler to send signals to pipes
62598fba4527f215b58ea050
class Metadata(ImpactFunctionMetadata): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def get_metadata(): <NEW_LINE> <INDENT> dict_meta = { 'id': 'EarthQuakeBuildingImpactFunction', 'name': tr('Earthquake Building Impact Function'), 'impact': tr('Be affected'), 'author': 'N/A', 'date_implemented': 'N/A', 'overview': tr(...
Metadata for Earthquake Building Impact Function. .. versionadded:: 2.1 We only need to re-implement get_metadata(), all other behaviours are inherited from the abstract base class.
62598fba7047854f4633f551
class Log(Actor): <NEW_LINE> <INDENT> def exception_handler(self, action_function, args): <NEW_LINE> <INDENT> exception_token = args[0] <NEW_LINE> return action_function(self, "Exception '%s'" % (exception_token,)) <NEW_LINE> <DEDENT> @manage(['loglevel']) <NEW_LINE> def init(self, loglevel): <NEW_LINE> <INDENT> self.l...
Write data to calvin log using specified loglevel. Supported loglevels: INFO, WARNING, ERROR Input: data : data to be logger
62598fba91f36d47f2230f68
class PerlinNoise1DShader(StrokeShader): <NEW_LINE> <INDENT> def __init__(self, freq=10, amp=10, oct=4, angle=radians(45), seed=-1): <NEW_LINE> <INDENT> StrokeShader.__init__(self) <NEW_LINE> self.noise = Noise(seed) <NEW_LINE> self.freq = freq <NEW_LINE> self.amp = amp <NEW_LINE> self.oct = oct <NEW_LINE> self.dir = V...
Displaces the stroke using the curvilinear abscissa. This means that lines with the same length and sampling interval will be identically distorded.
62598fbaf548e778e596b721
class YandexMarketSite(models.Model): <NEW_LINE> <INDENT> u <NEW_LINE> site = models.ForeignKey(Site, verbose_name=_('Site'), unique=True) <NEW_LINE> name = models.CharField(max_length=200, verbose_name=_('Name')) <NEW_LINE> company = models.CharField(max_length=200, verbose_name=_('Company')) <NEW_LINE> url = models.U...
Настройки сайта для вывода товаров в Яндекс.Маркет
62598fba7d847024c075c538
class Deprecated(BaseAdmonition): <NEW_LINE> <INDENT> node_class = deprecated_node <NEW_LINE> has_content = True <NEW_LINE> required_arguments = 0 <NEW_LINE> optional_arguments = 0 <NEW_LINE> final_argument_whitespace = False <NEW_LINE> option_spec = { 'class': directives.class_option, } <NEW_LINE> def run(self): <NEW_...
A deprecated entry, displayed (if configured) in the form of an admonition.
62598fba3539df3088ecc428
class ServerGroupsManager(base.ManagerWithFind): <NEW_LINE> <INDENT> resource_class = ServerGroup <NEW_LINE> def list(self, all_projects=False): <NEW_LINE> <INDENT> all = '?all_projects' if all_projects else '' <NEW_LINE> return self._list('/os-server-groups%s' % all, 'server_groups') <NEW_LINE> <DEDENT> def get(self, ...
Manage :class:`ServerGroup` resources.
62598fba67a9b606de54614e
class CheckBaselineForDisallowedIssuesTest(unittest.TestCase): <NEW_LINE> <INDENT> baseline_xml = minidom.parseString( '<?xml version="1.0" encoding="utf-8"?>\n' '<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">\n' ' <issue id="foo" message="foo is evil" errorLine1="foo()">\n' ' ...
Unit tests for check_baseline_for_disallowed_issues function.
62598fba92d797404e388c21
class RestorableMongodbCollectionGetResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type'...
An Azure Cosmos DB MongoDB collection event. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: The unique resource Identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vart...
62598fba099cdd3c636754a0
class BlueShard3(BlueShard, _Model): <NEW_LINE> <INDENT> __tablename__ = 'blue_shard_3'
Bluetooth shard 3.
62598fba1b99ca400228f5ef
class Corner(NonGoal): <NEW_LINE> <INDENT> def __init__(self, a, b, foot, success=True, **kwargs): <NEW_LINE> <INDENT> arrow = "->,head_length=0.6,head_width=0.4" <NEW_LINE> super(Corner, self).__init__(a, b, foot, success, event_type="corner", arrowstyle=arrow, **kwargs)
Representa um escanteio
62598fba7b180e01f3e4910d
class InceptionAUnit(nn.Module): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> super(InceptionAUnit, self).__init__() <NEW_LINE> self.scale = 0.17 <NEW_LINE> in_channels = 320 <NEW_LINE> self.branches = Concurrent() <NEW_LINE> self.branches.add_module("branch1", Conv1x1Branch( in_channels=in_channels, out...
InceptionResNetV2 type Inception-A unit.
62598fba56ac1b37e630236a
class GenericCardTypeWidget(CardTypeWidget): <NEW_LINE> <INDENT> component_type = "generic_card_type_widget"
A card type widget that can be used as fallback when no dedicated widget exists.
62598fba56b00c62f0fb2a37
class _Tokenizer(object): <NEW_LINE> <INDENT> def __init__(self, **kwargs): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def tokenize(self, sent): <NEW_LINE> <INDENT> raise NotImplementedError <NEW_LINE> <DEDENT> def detokenize(self, tokens): <NEW_LINE> <INDENT> raise NotImplementedError
The abstract class of Tokenizer Implement ```tokenize``` method to split a string of sentence into tokens. Implement ```detokenize``` method to combine tokens into a whole sentence. ```special_tokens``` stores some helper tokens to describe and restore the tokenizing.
62598fba5fdd1c0f98e5e10d
class UnSupportedOperation(LexicalParserException): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> LexicalParserException.__init__(self, "Операция не поддерживается для данных значений")
Исключение "Неподдерживаемая операция"
62598fbafff4ab517ebcd960
class FDGuest(Guest): <NEW_LINE> <INDENT> def __init__(self, tdl, config, auto, output_disk, nicmodel, clockoffset, mousetype, diskbus, macaddress): <NEW_LINE> <INDENT> Guest.__init__(self, tdl, config, auto, output_disk, nicmodel, clockoffset, mousetype, diskbus, False, True, macaddress) <NEW_LINE> self.orig_floppy = ...
Class for guest installation via floppy disk.
62598fba956e5f7376df573c
class SearchService(object): <NEW_LINE> <INDENT> @staticmethod <NEW_LINE> def Search(request_iterator, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): <NEW_LINE> <INDENT> return grpc.experimental.stream_stream(requ...
Missing associated documentation comment in .proto file.
62598fbae1aae11d1e7ce8e3
class SlotsTransferAdminPage(base.GSoCRequestHandler): <NEW_LINE> <INDENT> access_checker = access.PROGRAM_ADMINISTRATOR_ACCESS_CHECKER <NEW_LINE> def djangoURLPatterns(self): <NEW_LINE> <INDENT> return [ gsoc_url_patterns.url( r'admin/slots/transfer/%s$' % url_patterns.PROGRAM, self, name='gsoc_admin_slots_transfer'),...
View for the the list of slot transfer requests.
62598fbabe383301e025397a
class SaldoAtualCliente(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> Dialog() <NEW_LINE> self.janela = tk.Tk() <NEW_LINE> self.janela.resizable(False, False) <NEW_LINE> self.bg = "#cccccc" <NEW_LINE> self.box_nome = Box(self.janela, text="Nome", bg=self.bg) <NEW_LINE> self.box_saldo = Box(self.janela,...
Mostra os dados do cliente.
62598fba627d3e7fe0e0702f
class pol2Comp(ScannableMotionBase): <NEW_LINE> <INDENT> def __init__(self,name,_dettans, _tthp, _thp,devices,help=None): <NEW_LINE> <INDENT> self.setName(name) <NEW_LINE> if help is not None: self.__doc__+='\nHelp specific to '+self.name+':\n'+help <NEW_LINE> self.setInputNames([name]) <NEW_LINE> self.setExtraNames(['...
PA compensation device
62598fba60cbc95b063644bb
class WebSession(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.sess = requests.Session() <NEW_LINE> header = "%s v%s, %s" % (etac.NAME, etac.VERSION, etac.AUTHOR) <NEW_LINE> self.sess.headers.update({"User-Agent": header}) <NEW_LINE> <DEDENT> def get(self, url, params=None): <NEW_LINE> <INDE...
Class for downloading files from the web.
62598fba76e4537e8c3ef724
class StringJscTestSuite(unittest.TestCase): <NEW_LINE> <INDENT> __example_jsc = '"variable_root":"value_root"' <NEW_LINE> def test_load_empty(self): <NEW_LINE> <INDENT> self.assertIsNone(jsonsimpleconfig.loads("")) <NEW_LINE> <DEDENT> def test_load_example_jsc(self): <NEW_LINE> <INDENT> self.assertIsNotNone(jsonsimple...
String base JSC test cases.
62598fbaa219f33f346c6983
class Conc(specs_lib.Composable): <NEW_LINE> <INDENT> def __init__(self, dim, *args): <NEW_LINE> <INDENT> self.dim = dim <NEW_LINE> self.funs = args <NEW_LINE> <DEDENT> def funcall(self, x): <NEW_LINE> <INDENT> outputs = [f.funcall(x) for f in self.funs] <NEW_LINE> return tf.concat(self.dim, outputs)
Implements tensor concatenation in network specifications.
62598fba55399d3f05626691
class Pad2DImageBbox(DetectionAugmentation): <NEW_LINE> <INDENT> def __init__(self, pPad): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.p = pPad <NEW_LINE> <DEDENT> def apply(self, input_record): <NEW_LINE> <INDENT> p = self.p <NEW_LINE> image = input_record["image"] <NEW_LINE> gt_bbox = input_record["gt_bbox...
input: image, ndarray(h, w, rgb) gt_bbox, ndarry(n, 5) output: image, ndarray(h, w, rgb) gt_bbox, ndarray(max_num_gt, 5)
62598fba3d592f4c4edbb03b
class WSpecType(Enum): <NEW_LINE> <INDENT> NO = 0 <NEW_LINE> ARCHIVE = 1 <NEW_LINE> SCRIPT = 2 <NEW_LINE> BOTH = 3
Type of Kaldi stype write specifiers.
62598fba5fc7496912d4833a
class subFileOld: <NEW_LINE> <INDENT> def __init__(self, data, pts, fexp, txyxy): <NEW_LINE> <INDENT> y_dat_pos = 32 <NEW_LINE> self.subflgs, self.subexp, self.subindx, self.subtime, self.subnext, self.subnois, self.subnpts, self.subscan, ...
Processes each subfile passed to it, extracts header information and data information and places them in data members. Used for the old format where the y-values are stored in an odd way Data ---- x: x-data (optional) y: y-data
62598fba63b5f9789fe852ec
class YesNo(_Symbol): <NEW_LINE> <INDENT> _attrMap = AttrMap(BASE=_Symbol, tickcolor = AttrMapValue(isColor), crosscolor = AttrMapValue(isColor), testValue = AttrMapValue(isBoolean), ) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> self.x = 0 <NEW_LINE> self.y = 0 <NEW_LINE> self.size = 100 <NEW_LINE> self.tickcolo...
This widget draw a tickbox or crossbox depending on 'testValue'. If this widget is supplied with a 'True' or 1 as a value for testValue, it will use the tickbox widget. Otherwise, it will produce a crossbox. possible attributes: 'x', 'y', 'size', 'tickcolor', 'crosscolor', 'testValue'
62598fba3317a56b869be60d
class DSMREntity(SensorEntity): <NEW_LINE> <INDENT> def __init__(self, name, device_name, device_serial, obis, config, force_update): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._obis = obis <NEW_LINE> self._config = config <NEW_LINE> self.telegram = {} <NEW_LINE> self._device_name = device_name <NEW_LINE> se...
Entity reading values from DSMR telegram.
62598fbaf548e778e596b724
class QueenAnt(ScubaThrower): <NEW_LINE> <INDENT> name = 'Queen' <NEW_LINE> food_cost = 7 <NEW_LINE> is_Queen = True <NEW_LINE> implemented = True <NEW_LINE> def __init__(self, armor = 1): <NEW_LINE> <INDENT> if self.is_Queen: <NEW_LINE> <INDENT> self.is_Queen = True <NEW_LINE> QueenAnt.is_Queen = False <NEW_LINE> <DED...
The Queen of the colony. The game is over if a bee enters her place.
62598fba5fdd1c0f98e5e10e
class OperatorFamilyToSqlTestCase(InputMapToSqlTestCase): <NEW_LINE> <INDENT> def test_create_operfam(self): <NEW_LINE> <INDENT> inmap = self.std_map() <NEW_LINE> inmap['schema sd'].update({'operator family of1 using btree': {}}) <NEW_LINE> sql = self.to_sql(inmap) <NEW_LINE> assert fix_indent(sql[0]) == CREATE_STMT <N...
Test SQL generation from input operators
62598fba97e22403b383b085
class Salesman(Employee): <NEW_LINE> <INDENT> def __init__(self,name,sales = 0): <NEW_LINE> <INDENT> self._name = name <NEW_LINE> self._sales = sales <NEW_LINE> <DEDENT> @property <NEW_LINE> def sales(self): <NEW_LINE> <INDENT> return self._sales <NEW_LINE> <DEDENT> @sales.setter <NEW_LINE> def sales(self,sales): <NEW_...
销售
62598fba4428ac0f6e6586a1
class CommitWithoutParent(SSZZException): <NEW_LINE> <INDENT> pass
Base Class for gitutils exceptions.
62598fba9c8ee82313040233
class UserSetting(Base): <NEW_LINE> <INDENT> __tablename__ = 'np_settings_user' <NEW_LINE> __table_args__ = ( Comment('NetProfile UI user settings'), Index('np_settings_user_u_us', 'uid', 'name', unique=True), Index('np_settings_user_i_name', 'name'), { 'mysql_engine': 'InnoDB', 'mysql_charset': 'utf8', 'info': ...
Per-user application settings.
62598fba5fdd1c0f98e5e10f
class RateLimitExceeded(RuntimeError): <NEW_LINE> <INDENT> def __init__(self, calls, period): <NEW_LINE> <INDENT> super(RateLimitExceeded, self).__init__( "Exceeded rate limit of [%s] calls every [%s] seconds." % (calls, period) )
A request failed because it exceeded the client-side rate limit.
62598fba44b2445a339b6a34
class EditRouteView(UpdateView): <NEW_LINE> <INDENT> model = Route <NEW_LINE> fields = [ 'name', 'description', ] <NEW_LINE> template_name = 'tracker_device/edit_route.html' <NEW_LINE> success_url = reverse_lazy('profile') <NEW_LINE> def dispatch(self, request, *args, **kwargs): <NEW_LINE> <INDENT> auth_errors = verify...
View for editing a route.
62598fbaadb09d7d5dc0a6fb
@pytest.mark.draft <NEW_LINE> @pytest.mark.components <NEW_LINE> @pytest.allure.story('Broadcasts') <NEW_LINE> @pytest.allure.feature('POST') <NEW_LINE> class Test_PFE_Components(object): <NEW_LINE> <INDENT> @pytest.allure.link('https://jira.qumu.com/browse/TC-44497') <NEW_LINE> @pytest.mark.Broadcasts <NEW_LINE> @pyte...
PFE Broadcasts test cases.
62598fbae5267d203ee6ba7e
class ActivityDataset(Dataset): <NEW_LINE> <INDENT> images_dir = "../JIGSAWS/Suturing/pictures/" <NEW_LINE> labels_dir = '../JIGSAWS/Suturing/transcriptions/' <NEW_LINE> def __init__(self, images_dir, trial_name, trial_dir, labels_dir, transform=None): <NEW_LINE> <INDENT> self.landmarks_frame = preDataProcessing.load_l...
Face Landmarks dataset.
62598fba167d2b6e312b70f4
class Host(Base): <NEW_LINE> <INDENT> __tablename__ = 'host' <NEW_LINE> network_ip = Column(String(16), primary_key=True, nullable=False) <NEW_LINE> mac_address = Column(String(18), nullable=True, unique=True) <NEW_LINE> name = Column(String) <NEW_LINE> inclusion_date = Column(String(20)) <NEW_LINE> scantime = Column(I...
Classe que define um ativo de rede
62598fba71ff763f4b5e78f8
class RidgeModelWrapper(BaseModelWrapper, ExplainableMixin): <NEW_LINE> <INDENT> tasks = [Tasks.REGRESSION] <NEW_LINE> algorithm = Algorithms.RIDGE <NEW_LINE> r_args = None <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> r_args = self._r_args if self._r_args is not None else {ModelParams.RANDOM_STATE: 777} <NEW_LINE...
Wrapper for ridge regression.
62598fbaf9cc0f698b1c538d
class APIReturn(object): <NEW_LINE> <INDENT> def __init__(self, obj, ok=True): <NEW_LINE> <INDENT> self.obj = obj <NEW_LINE> self.text = dumps(obj) <NEW_LINE> self.ok = ok <NEW_LINE> <DEDENT> def json(self): <NEW_LINE> <INDENT> return self.obj
Spoofs returned response from Canvas SDK. Has response.ok property and JSON contents
62598fba097d151d1a2c11b2
class MSBFirstGetter(): <NEW_LINE> <INDENT> def __init__(self, decoder, bitcount): <NEW_LINE> <INDENT> self.layers = [[AdaptiveBitGetter(decoder) for _ in range(1<<layer)] for layer in range(bitcount)] <NEW_LINE> <DEDENT> def get_value(self): <NEW_LINE> <INDENT> value = 0 <NEW_LINE> for layer in self.layers: <NEW_LINE>...
Reads a numbers from an BinaryArithmeticDecoder that are binarized using MSB first binary representation. The context used when reading a bit depends on all the earlier bits read for this number. So the MSB is always obtained using the same context, while the second-most significant bit is obtained using different cont...
62598fbaad47b63b2c5a79d3
class RecordMethods(dataobj.DataObj): <NEW_LINE> <INDENT> @property <NEW_LINE> def apc_records(self): <NEW_LINE> <INDENT> return self._get_list("record.jm:apc") <NEW_LINE> <DEDENT> @apc_records.setter <NEW_LINE> def apc_records(self, val): <NEW_LINE> <INDENT> self._set_with_struct("record.jm:apc", val) <NEW_LINE> <DEDE...
Super-class which defines methods useful for interrogating model objects which contain APC record data
62598fba55399d3f05626693
class SignedOffBy(CommitRule): <NEW_LINE> <INDENT> name = "body-requires-signed-off-by" <NEW_LINE> id = "UC2" <NEW_LINE> def validate(self, commit): <NEW_LINE> <INDENT> flags = re.UNICODE <NEW_LINE> flags |= re.IGNORECASE <NEW_LINE> for line in commit.message.body: <NEW_LINE> <INDENT> if line.lower().startswith("signed...
This rule will enforce that each commit contains a "Signed-off-by" line. We keep things simple here and just check whether the commit body contains a line that starts with "Signed-off-by".
62598fba4a966d76dd5ef052
class DomainListRequired(object): <NEW_LINE> <INDENT> openapi_types = { 'errors': 'DomainListRequiredErrors' } <NEW_LINE> attribute_map = { 'errors': 'errors' } <NEW_LINE> def __init__(self, errors=None, local_vars_configuration=None): <NEW_LINE> <INDENT> if local_vars_configuration is None: <NEW_LINE> <INDENT> local_v...
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.
62598fba63b5f9789fe852ee
class GPU_Problem(Problem): <NEW_LINE> <INDENT> def Kernel_code(self): <NEW_LINE> <INDENT> return("This should be some kernel code")
The frame of any "live" problem, but in GPU
62598fba099cdd3c636754a2
class USB2000(Parameters): <NEW_LINE> <INDENT> xmin_default = 430.0 <NEW_LINE> xmax_default = 680.0 <NEW_LINE> valid_minmax_default = (339.0, 1024.0) <NEW_LINE> sub_base_default = True <NEW_LINE> bline_fit_default = True <NEW_LINE> fit_regions_default = ((345.0, 395.0), (900.0, 1000.0))
Define some shared parameters between ocean optics spectrometers.
62598fba1b99ca400228f5f1
class GlobalUpload(object): <NEW_LINE> <INDENT> def __init__(self, file_dict): <NEW_LINE> <INDENT> path = uploader.get_storage_path() <NEW_LINE> if not path: <NEW_LINE> <INDENT> self.storage_path = None <NEW_LINE> return <NEW_LINE> <DEDENT> self.storage_path = os.path.join(path, 'global') <NEW_LINE> try: <NEW_LINE> <IN...
This is heavily based on ckan.logic.uploader.ResourceUpload
62598fba7b180e01f3e4910f
class DatabasePrincipalAssignmentListResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _attribute_map = { 'value': {'key': 'value', 'type': '[DatabasePrincipalAssignment]'}, } <NEW_LINE> def __init__( self, *, value: Optional[List["DatabasePrincipalAssignment"]] = None, **kwargs ): <NEW_LINE> <INDENT> super(Datab...
The list Kusto database principal assignments operation response. :ivar value: The list of Kusto database principal assignments. :vartype value: list[~azure.mgmt.synapse.models.DatabasePrincipalAssignment]
62598fba4c3428357761a43b
@final <NEW_LINE> class SameAliasImportViolation(ASTViolation): <NEW_LINE> <INDENT> error_template = 'Found same alias import: {0}' <NEW_LINE> code = 113
Forbids to use the same alias as the original name in imports. Reasoning: Why would you even do this in the first place? Example:: # Correct: from os import path # Wrong: from os import path as path .. versionadded:: 0.1.0
62598fba283ffb24f3cf3a04
class SpinnMachineInvalidParameterException(SpinnMachineException): <NEW_LINE> <INDENT> def __init__(self, parameter, value, problem): <NEW_LINE> <INDENT> super(SpinnMachineInvalidParameterException, self).__init__( "It is invalid to set {} to {}: {}".format( parameter, value, problem)) <NEW_LINE> self._parameter = par...
Indicates that there is a problem with a parameter value
62598fba66673b3332c30551
class EditFormView(LoginRequiredMixin,FormView): <NEW_LINE> <INDENT> success_url="/user/user-dashboard/" <NEW_LINE> template_name="user-edit-form.html" <NEW_LINE> form_class=AccountEditForm <NEW_LINE> def get_initial(self): <NEW_LINE> <INDENT> user_obj=self.request.user <NEW_LINE> initial={ "email":user_obj.customer.C...
user edit details
62598fba498bea3a75a57ca4
class stackProfileTimeSeries(plotBase.stackPlotBase): <NEW_LINE> <INDENT> def addPlot(self, tag, **kwargs): <NEW_LINE> <INDENT> kw = dict(self.defArgs) <NEW_LINE> kw.update(kwargs) <NEW_LINE> plot = profileTimeSeries(**kw) <NEW_LINE> plotBase.stackPlotBase.addPlot(self, plot, tag) <NEW_LINE> <DEDENT> def addSample(self...
A class for stacking multiple profiles in the same plot.
62598fbaaad79263cf42e955
class Review(): <NEW_LINE> <INDENT> def __init__(self, mongo_doc): <NEW_LINE> <INDENT> self.review_id = mongo_doc['review_id'] <NEW_LINE> self.user_id = mongo_doc['user_id'] <NEW_LINE> self.business_id = mongo_doc['business_id'] <NEW_LINE> self.stars = mongo_doc['stars']
Encapsulates the Review attributes and inherits from Entity
62598fbaadb09d7d5dc0a6fd
class ExtendedInterpolationEnvConfig(ExtendedInterpolationConfig): <NEW_LINE> <INDENT> def __init__(self, *args, remove_vars: bool = None, env: dict = None, env_sec: str = 'env', **kwargs): <NEW_LINE> <INDENT> if 'default_expect' not in kwargs: <NEW_LINE> <INDENT> kwargs['default_expect'] = True <NEW_LINE> <DEDENT> sel...
A ``Config`` implementation that creates a section called ``env`` with environment variables passed.
62598fbae5267d203ee6ba80
class MultiplexTest(Test): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.compile_code() <NEW_LINE> self.set_hugepages() <NEW_LINE> self.set_numa_balance() <NEW_LINE> self.assembly_vm() <NEW_LINE> os_type = self.params.get('os_type', default='linux') <NEW_LINE> if os_type == 'windows': <NEW_LINE> <INDENT...
Execute a test that uses provided parameters (for multiplexing testing). :param *: All params are only logged, they have no special meaning
62598fba76e4537e8c3ef728
class TreeNode(object): <NEW_LINE> <INDENT> def __init__(self, feature=None, label=None, root=None, children=None): <NEW_LINE> <INDENT> self.feature = feature <NEW_LINE> self.label = label <NEW_LINE> self.root = root <NEW_LINE> self.children = children
Decision Tree Node Each node has multi branches.
62598fba55399d3f05626695
class Platform(object): <NEW_LINE> <INDENT> def __init__( self, large_compute_support=True, altair_support=True, max_memory_GB=8.0, max_processors=2, temp_directory="/tmp", ): <NEW_LINE> <INDENT> self._large_compute_support = large_compute_support <NEW_LINE> self._altair_support = altair_support <NEW_LINE> self._max_me...
Represents platform capabilities
62598fba91f36d47f2230f6b
class MaximaFunction(BuiltinFunction): <NEW_LINE> <INDENT> def __init__(self, name, nargs=2, conversions={}): <NEW_LINE> <INDENT> c = dict(maxima=name) <NEW_LINE> c.update(conversions) <NEW_LINE> BuiltinFunction.__init__(self, name=name, nargs=nargs, conversions=c) <NEW_LINE> <DEDENT> def _maxima_init_evaled_(self, *ar...
EXAMPLES:: sage: from sage.functions.special import MaximaFunction sage: f = MaximaFunction("jacobi_sn") sage: f(1,1) tanh(1) sage: f(1/2,1/2).n() 0.470750473655657
62598fba5fcc89381b26620d
class AlpinoCorpusReader(BracketParseCorpusReader): <NEW_LINE> <INDENT> def __init__(self, root, encoding="ISO-8859-1", tagset=None): <NEW_LINE> <INDENT> BracketParseCorpusReader.__init__( self, root, r"alpino\.xml", detect_blocks="blankline", encoding=encoding, tagset=tagset, ) <NEW_LINE> <DEDENT> def _normalize(self,...
Reader for the Alpino Dutch Treebank. This corpus has a lexical breakdown structure embedded, as read by _parse Unfortunately this puts punctuation and some other words out of the sentence order in the xml element tree. This is no good for tag_ and word_ _tag and _word will be overridden to use a non-default new parame...
62598fba7047854f4633f557
class AudioFile: <NEW_LINE> <INDENT> chunk = 1024 <NEW_LINE> def __init__(self, file, wait=1): <NEW_LINE> <INDENT> self.wf = wave.open(file, 'rb') <NEW_LINE> self.p = pyaudio.PyAudio() <NEW_LINE> self.stream = self.p.open( format=self.p.get_format_from_width(self.wf.getsampwidth()), channels=self.wf.getnchannels(), rat...
adapted to be asynchronous from elliotjreed.com/article.php?read=play_a_sound_wav_audio_file_in_python3
62598fba26068e7796d4cadb
class InsertionSort: <NEW_LINE> <INDENT> def __call__(self, given_list): <NEW_LINE> <INDENT> for key_pos in range(1, len(given_list)): <NEW_LINE> <INDENT> key_value = self.get_value(given_list, key_pos) <NEW_LINE> scan_pos = key_pos - 1 <NEW_LINE> scan_pos = self.inner_loop(given_list, key_value, scan_pos) <NEW_LINE> g...
The Insertion sort
62598fba3539df3088ecc42e
class Employee(): <NEW_LINE> <INDENT> def __init__(self, f_name, l_name, salary): <NEW_LINE> <INDENT> self.f_name = f_name <NEW_LINE> self.l_name = l_name <NEW_LINE> self.salary = salary <NEW_LINE> <DEDENT> def give_raise(self, money=5000): <NEW_LINE> <INDENT> self.salary += money <NEW_LINE> return self.salary
关于年薪管理的一次模拟
62598fba57b8e32f525081de
class StructureSetRoiData(object): <NEW_LINE> <INDENT> def __init__(self, roi_item, data): <NEW_LINE> <INDENT> self._roi_item = roi_item <NEW_LINE> self._structure_set = roi_item._structure_set <NEW_LINE> self._workspace_id = roi_item._structure_set._workspace_id <NEW_LINE> self._requestor = roi_item._requestor <NEW_LI...
This class represents the data for a stucture set ROI. It's returned by calls to the :meth:`proknow.Patients.StructureSetRoiItem.get_data` method. Note: For information on how to use contour data, please check out the :ref:`contouring-data` guide. Attributes: contours (list): The list of contours for the ...
62598fbad7e4931a7ef3c218
class LoadingTest(TestCase): <NEW_LINE> <INDENT> def setUp(self): <NEW_LINE> <INDENT> self.url = "https://docs.google.com/spreadsheet/pub?key=0AprNP7zjIYS1dEhXRnRVTDRfRlRVcFdnVlhTcEk1N3c&single=true&gid=0&output=csv" <NEW_LINE> <DEDENT> def test_load_victims(self): <NEW_LINE> <INDENT> data = urllib2.urlopen(self.url).r...
Tests related to data loading.
62598fba63d6d428bbee2932
class ModelOptions(object): <NEW_LINE> <INDENT> fields = None <NEW_LINE> exclude = None <NEW_LINE> fieldsets = None <NEW_LINE> ordering = None
Describes how to represent a Model for a Controller.
62598fba32920d7e50bc61d0
class Request(object): <NEW_LINE> <INDENT> def __init__(self, _reactor, deferred, url, agent='dAmnViper/dA/api/request', response=None): <NEW_LINE> <INDENT> self._reactor = _reactor <NEW_LINE> self.d = deferred <NEW_LINE> self.agent = agent <NEW_LINE> self.url = url <NEW_LINE> self.agent = agent <NEW_LINE> self.respons...
Send an API request. This is a helper object to send requests to API methods. A deferred method must be provided, as this object will call the deferred with the response from the api request.
62598fba099cdd3c636754a3
class ActivityList(abc_learning_objects.ActivityList, osid_objects.OsidList): <NEW_LINE> <INDENT> def get_next_activity(self): <NEW_LINE> <INDENT> return self.next() <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT> return self._get_next_object(Activity) <NEW_LINE> <DEDENT> next_activity = property(fget=get_next_...
Like all ``OsidLists,`` ``ActivityList`` provides a means for accessing ``Activity`` elements sequentially either one at a time or many at a time. Examples: while (al.hasNext()) { Activity activity = al.getNextActivity(); } or while (al.hasNext()) { Activity[] activities = al.getNextActivities(al.available(...
62598fba1b99ca400228f5f2
class EmittingOutputStream(QObject): <NEW_LINE> <INDENT> stream_signal = pyqtSignal(str) <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> <DEDENT> def write(self, text: object) -> None: <NEW_LINE> <INDENT> self.stream_signal.emit(str(text)) <NEW_LINE> <DEDENT> def flush(self): <NEW_LINE>...
Implementation of a stream to handle logging messages to a Qt widget.
62598fba7c178a314d78d621
class Metrics: <NEW_LINE> <INDENT> def __init__(self, initval=0): <NEW_LINE> <INDENT> self.cnt = Value("i", initval) <NEW_LINE> self.prev = Value("i", initval) <NEW_LINE> self.latency = Value("i", initval) <NEW_LINE> self.lock = Lock() <NEW_LINE> <DEDENT> def inc_cnt(self): <NEW_LINE> <INDENT> with self.lock: <NEW_LINE...
Thread safe variables to capture metrics
62598fba56ac1b37e6302370
class UnitFloat(Float): <NEW_LINE> <INDENT> def __convert__(self, value): <NEW_LINE> <INDENT> if isinstance(value, basestring): <NEW_LINE> <INDENT> value = value.rstrip(string.ascii_letters) <NEW_LINE> <DEDENT> return float(value)
Represents a floating point type. If a unit is present in the string representation, it will get stripped.
62598fba9f2886367281893c
class ForceReply(base.TelegramObject): <NEW_LINE> <INDENT> force_reply: base.Boolean = fields.Field(default=True) <NEW_LINE> selective: base.Boolean = fields.Field() <NEW_LINE> @classmethod <NEW_LINE> def create(cls, selective: typing.Optional[base.Boolean] = None): <NEW_LINE> <INDENT> return cls(selective=selective)
Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot‘s message and tapped ’Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Example: A po...
62598fbaec188e330fdf8a14
class Filter: <NEW_LINE> <INDENT> def __init__(self, field: str, value: str, case: bool): <NEW_LINE> <INDENT> if value and value[0] in SEARCH_MODIFIERS: <NEW_LINE> <INDENT> modifier, value = value[0], value[1:] <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> modifier = "" <NEW_LINE> <DEDENT> self.field = field.replace("....
Represent a search filter in a `GenericQuery`
62598fbad268445f26639c46
class InlineForeignKeyCacheMixin(object): <NEW_LINE> <INDENT> def formfield_for_foreignkey(self, db_field, request, **kwargs): <NEW_LINE> <INDENT> formfield = super().formfield_for_foreignkey(db_field, request, **kwargs) <NEW_LINE> cache_key = "repanier_field{}".format(db_field.name) <NEW_LINE> cache_value = cache.get(...
Cache foreignkey choices in the request object to prevent unnecessary queries.
62598fbabe383301e0253980
class TrialBalance(models.Model): <NEW_LINE> <INDENT> _name = "trial.balance" <NEW_LINE> _order = 'subject_code' <NEW_LINE> _description = u'科目余额表' <NEW_LINE> @api.one <NEW_LINE> @api.depends('cumulative_occurrence_debit', 'cumulative_occurrence_credit', 'ending_balance_debit', 'ending_balance_credit', 'subject_name_id...
科目余额表
62598fba2c8b7c6e89bd3949
class PackageVersionAlreadyPresentError(ThothPythonExceptionError): <NEW_LINE> <INDENT> pass
An exception raised when adding a package in specific version that is already present.
62598fbaa219f33f346c6989
@vdm_module('n1', 'n2') <NEW_LINE> class fibonacci: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.n1 = 0 <NEW_LINE> self.n2 = 1 <NEW_LINE> <DEDENT> @vdm_method <NEW_LINE> def next(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @vdm_test <NEW_LINE> def prev(self): <NEW_LINE> <INDENT> n = self.n2 ...
state State of n1 : nat n2 : nat init s == s = mk_State(0, 1) end operations next : () ==> nat next() == (dcl n : nat := n1 + n2; n1 := n2; n2 := n; return n) post RESULT = n1~ + n2~ and n1 = n2~ and n2 = RESULT; prev : () ==> nat prev() == (dcl n : nat := n2 - n1; n2 := n1; n1 := n; re...
62598fba55399d3f05626697
class Entries: <NEW_LINE> <INDENT> def _doc_to_entry(self, run_start_doc): <NEW_LINE> <INDENT> uid = run_start_doc['uid'] <NEW_LINE> run_start_doc.pop('_id') <NEW_LINE> entry_metadata = {'start': run_start_doc, 'stop': catalog._get_run_stop(uid)} <NEW_LINE> args = dict( run_start_doc=run_start_doc, get_run_stop=partial...
Mock the dict interface around a MongoDB query result.
62598fba796e427e5384e919
class DecodeObject: <NEW_LINE> <INDENT> __slots__ = ('name', 'getter', 'properties') <NEW_LINE> def __init__(self, name, getter=None): <NEW_LINE> <INDENT> assert isinstance(name, str), 'Invalid name %s' % name <NEW_LINE> assert getter is None or callable(getter), 'Invalid getter %s' % getter <NEW_LINE> self.name = name...
Exploit for object decoding.
62598fba3539df3088ecc430
class StepFailedException(Exception): <NEW_LINE> <INDENT> _FIELDS = ('reason', 'step_num', 'num_steps', 'step_desc') <NEW_LINE> def __init__( self, reason=None, step_num=None, num_steps=None, step_desc=None): <NEW_LINE> <INDENT> self.reason = reason <NEW_LINE> self.step_num = step_num <NEW_LINE> self.num_steps = num_st...
Exception to throw when a step fails. This will automatically be caught and converted to an error message by :py:meth:`mrjob.job.MRJob.run`, but you may wish to catch it if you :ref:`run your job programatically <runners-programmatically>`.
62598fbacc40096d6161a29b
class FilesWriter(Writer): <NEW_LINE> <INDENT> def __init__( self, codec=None, bitrate=None, output_sample_rate=44100, stem_names=None, multiprocess=False, synchronous=True ): <NEW_LINE> <INDENT> self.codec = codec <NEW_LINE> self.bitrate = bitrate <NEW_LINE> self.output_sample_rate = output_sample_rate <NEW_LINE> self...
Save Stems as multiple files Takes stems tensor and write into multiple files. Args: codec: str Specifies ffmpeg codec being used. Defaults to `None` which automatically selects default codec for each container bitrate: int, optional Bitrate in Bits per second. Defaults to `None` o...
62598fba7d847024c075c540
class ComputeCapabilitiesFilter(filters.BaseHostFilter): <NEW_LINE> <INDENT> run_filter_once_per_request = True <NEW_LINE> def _satisfies_extra_specs(self, host_state, instance_type): <NEW_LINE> <INDENT> if 'extra_specs' not in instance_type: <NEW_LINE> <INDENT> return True <NEW_LINE> <DEDENT> for key, req in instance_...
HostFilter hard-coded to work with InstanceType records.
62598fba01c39578d7f12efe
class GenerateIAMPolicy: <NEW_LINE> <INDENT> CLINAME = "generate-iam-policy" <NEW_LINE> def __init__( self, output_file: str = "./cfn_stack_policy.json", project_root: str = "./" ): <NEW_LINE> <INDENT> project_root_path = Path(project_root).expanduser().resolve() <NEW_LINE> config = Config.create(project_root=project_r...
[ALPHA] Introspects CFN Template(s) and generates an IAM policy necessary to successfully launch the template(s)
62598fba63d6d428bbee2934
class ManejadorArbolDirectorios(object): <NEW_LINE> <INDENT> _manejadoresDirectorios = None <NEW_LINE> def __init__(self, directorios): <NEW_LINE> <INDENT> self._manejadoresDirectorios = [] <NEW_LINE> for i in directorios: <NEW_LINE> <INDENT> self._manejadoresDirectorios = ManejadorArbolDirectorios(direc...
Objeto contenedor de varios arboles de directorios
62598fba099cdd3c636754a4
class ProjectTagIndex(ListView): <NEW_LINE> <INDENT> model = Project <NEW_LINE> def get_queryset(self): <NEW_LINE> <INDENT> queryset = Project.objects.public(self.request.user) <NEW_LINE> self.tag = get_object_or_404(Tag, slug=self.kwargs.get('tag')) <NEW_LINE> queryset = queryset.filter(tags__slug__in=[self.tag.slug])...
List view of public :py:class:`Project` instances.
62598fba92d797404e388c25
class RegressionTestCase( IntegrationTest ): <NEW_LINE> <INDENT> def setUp( self ): <NEW_LINE> <INDENT> super( RegressionTestCase, self ).setUp() <NEW_LINE> gLogger.setLevel('DEBUG') <NEW_LINE> self.dirac = Dirac() <NEW_LINE> exeScriptLoc = find_all( 'exe-script.py', '..', '/DIRAC/tests/Workflow/Regression' )[0] <NEW_L...
Base class for the Regression test cases
62598fba4c3428357761a43f