code stringlengths 1 18.2k |
|---|
def _effective_view_filter(self): """Returns the mongodb relationship filter for effective views""" if self._effective_view == EFFECTIVE: now = datetime.datetime.utcnow() return {'startDate': {'$$lte': now}, 'endDate': {'$$gte': now}} return {} |
def _view_filter(self): """ Returns the mongodb catalog filter for isolated or federated views. This also searches across all underlying catalogs in federated catalog views. Real authz for controlling access to underlying catalogs will need to be managed in an adapter above the pay grade of this implementation. """ if ... |
def walk(self): """ A generator that walking through all sub packages and sub modules. 1. current package object (包对象) 2. current package's parent (当前包对象的母包) 3. list of sub packages (所有子包) 4. list of sub modules (所有模块) """ yield ( self, self.parent, list(self.sub_packages.values()), list(self.sub_modules.values()), ) f... |
def _tree_view_builder(self, indent=0, is_root=True): """ Build a text to represent the package structure. """ def pad_text(indent): return " " * indent + "|-- " lines = list() if is_root: lines.append(SP_DIR) lines.append( "%s%s (%s)" % (pad_text(indent), self.shortname, self.fullname) ) indent += 1 # sub packages for... |
def get_object_map(self): """stub""" obj_map = self._payload.get_object_map() obj_map['assetContents'] = [] for asset_content in self.get_asset_contents(): obj_map['assetContents'].append(asset_content.object_map) return obj_map |
def get_data(self): """Gets the asset content data. return: (osid.transport.DataInputStream) - the length of the content data raise: OperationFailed - unable to complete request *compliance: mandatory -- This method must be implemented.* # gets you a file-like object...not sure if it will behave exactly as expected... ... |
def get_url(self): """Gets the URL associated with this content for web-based retrieval. return: (string) - the url for this data raise: IllegalState - ``has_url()`` is ``false`` *compliance: mandatory -- This method must be implemented.* """ # construct the URL from runtime's FILESYSTEM location param # plus what we k... |
def get_object_map(self): """stub""" obj_map = self._payload.get_object_map() obj_map.update({'url': self.get_url()}) # obj_map['recordTypeIds'].append(str(FILESYSTEM_ASSET_CONTENT_RECORD_TYPE)) return obj_map |
def set_data(self, data=None): """Sets the content data. arg: data (osid.transport.DataInputStream): the content data raise: InvalidArgument - ``data`` is invalid raise: NoAccess - ``Metadata.isReadOnly()`` is ``true`` raise: NullArgument - ``data`` is ``null`` *compliance: mandatory -- This method must be implemented.... |
set, also make a backup copy in the secondary_data_store_path if has_secondary_storage(): data.seek(0) if not os.path.isdir(secondary_data_store_path): os.makedirs(secondary_data_store_path) file_location = '{0}/{1}.{2}'.format(secondary_data_store_path, str(filename), extension) with open(file_location, 'wb') as file_... |
def clear_data(self): """Removes the content data. raise: NoAccess - ``Metadata.isRequired()`` is ``true`` or ``Metadata.isReadOnly()`` is ``true`` *compliance: mandatory -- This method must be implemented.* """ # Removes the item from filesystem and resets URL to '' url = self.get_url() # try to clear from payload fir... |
def run(m, w, trace=False, steps=1000, show_stack=3): """Runs an automaton, automatically selecting a search method.""" # Check to see whether run_pda can handle it. is_pda = True stack = None if not m.oneway: is_pda = False for s in range(m.num_stores): if s == m.input: pass elif m.has_cell(s): # anything with finite ... |
def run_bfs(m, w, trace=False, steps=1000): """Runs an automaton using breadth-first search.""" from .machines import Store, Configuration, Transition agenda = collections.deque() chart = {} # Initial configuration config = list(m.start_config) w = Store(w) config[m.input] = w config = Configuration(config) chart[confi... |
then rank all nodes by input position if m.oneway: for q in run.nodes: ql = list(q) run.nodes[q]['rank'] = ql.pop(m.input) run.nodes[q]['label'] = Configuration(ql) for i in range(len(w)+1): r = 'rank{}'.format(i) run.add_node(r, {'rank' : Store(w[i:]), 'style' : 'invisible'}) if i > 0: run.add_edge(rprev, r, {'color':... |
def run_pda(m, w, stack=2, trace=False, show_stack=3): """Runs a nondeterministic pushdown automaton using the cubic algorithm of: Bernard Lang, "Deterministic techniques for efficient non-deterministic parsers." doi:10.1007/3-540-06841-4_65 . `m`: the pushdown automaton `w`: the input string Store 1 is assumed to be t... |
xy'] [r, j, xy' => s, k, &] ---------------------------------------------- [q, i, yz => s, k, y'] Apply: applies a transition to child """ from .machines import Store, Configuration, Transition agenda = collections.deque() chart = set() index_left = collections.defaultdict(set) index_right = collections.defaultdict(set... |
> 0: run.add_edge(rprev, r, {'color': 'white', 'label' : w[i-1]}) rprev = r def get_node(parent, child): if parent is not None: # In the run graph, we don't show the parent, # but if there is one, add a ... child = list(child) child[stack] = Store(child[stack].values + ["..."], child[stack].position) return Configurati... |
in m.accept_configs: if aconfig.match(child) and (parent is None or len(child[stack]) == show_stack): add_node(parent, child, {'accept': True}) # The stack shows too many items (push) if len(child[stack]) > show_stack: grandchild = child.deepcopy() del grandchild[stack].values[-1] add(child, grandchild) index_right[chi... |
if transition.match(child): sister = transition.apply(child) add(parent, sister) backpointers[get_node(parent, sister)].add(get_node(parent, child)) # Add run edges only between configurations whose stack is # just right for config2 in run.nodes: for config1 in backpointers[config2]: run.add_edge(config1, config2) retu... |
def _append_zeros(self, initial_conditions, number_of_equations): """If not all intial conditions specified, append zeros to them TODO: is this really the best way to do this? """ if len(initial_conditions) < number_of_equations: initial_conditions = np.concatenate((initial_conditions, [0.0] * (self.problem.number_of_e... |
def simulate_system(self, parameters, initial_conditions, timepoints): """ Simulates the system for each of the timepoints, starting at initial_constants and initial_values values :param parameters: list of the initial values for the constants in the model. Must be in the same order as in the model :param initial_condi... |
def simulate_system(self, parameters, initial_conditions, timepoints): """ Simulates the system for each of the timepoints, starting at initial_constants and initial_values values :param parameters: list of the initial values for the constants in the model. Must be in the same order as in the model :param initial_condi... |
def start(self, **kwargs): """ Present the PTY of the container inside the current process. This will take over the current process' TTY until the container's PTY is closed. """ pty_stdin, pty_stdout, pty_stderr = self.sockets() pumps = [] if pty_stdin and self.interactive: pumps.append(io.Pump(io.Stream(self.stdin), p... |
def israw(self): """ Returns True if the PTY should operate in raw mode. If the container was not started with tty=True, this will return False. """ if self.raw is None: info = self.container_info() self.raw = self.stdout.isatty() and info['Config']['Tty'] return self.raw |
def resize(self, size=None): """ Resize the container's PTY. If `size` is not None, it must be a tuple of (height,width), otherwise it will be determined by the size of the current TTY. """ if not self.israw(): return size = size or tty.size(self.stdout) if size is not None: rows, cols = size try: self.client.resize(se... |
def get_type_data(name): """Return dictionary representation of type. Can be used to initialize primordium.type.primitives.Type """ name = name.upper() try: return { 'authority': 'birdland.mit.edu', 'namespace': 'currency format', 'identifier': name, 'domain': 'Currency Format Types', 'display_name': JEFFS_CURRENCY_FOR... |
def find_tf_idf(file_names=['./../test/testdata'],prev_file_path=None, dump_path=None): '''Function to create a TF-IDF list of dictionaries for a corpus of docs. If you opt for dumping the data, you can provide a file_path with .tfidfpkl extension(standard made for better understanding) and also re-generate a new tfidf... |
doc(line in a doc in this case) df = defaultdict(int) # this statement is useful for altering existant tf-idf file and adding new docs in itself.(## memory is now the biggest issue) if prev_file_path: print(TAG,'modifying over exising file.. @',prev_file_path) df,tf_idf = pickle.load(open(prev_file_path,'rb')) prev_doc... |
case) for doc in tf_idf: for key in doc: true_idf = math.log(len(tf_idf)/df[key]) true_tf = doc[key]/float(len(doc)) doc[key] = true_tf * true_idf print(TAG,'Total number of unique words in corpus',len(df),'( '+paint('++'+str(len(df)-prev_doc_count),'g')+' )' if prev_file_path else '') print(TAG,'Total number of docs i... |
def find_knn(tf_idf,input_word,k=WIN,rand_on=True): '''func that find k nearest neighbors of a spcified word from a given file of tf-idf values of words for list of docs. @Args: -- tfidf_file_name : File name for the .tfidfpkl file to be used for searching. input_word : word for which process need to be done. k : amoun... |
sorted(word_bag.items(), key=operator.itemgetter(1)) #reverse the order as to get words with large TF-IDF values(descending order) word_bag.reverse() for element in word_bag[:k]: #condition where the word_bag throws the same word as input...(highly likely, hence ignored) if element[0] == input_word or (bool(random.getr... |
def get(self, mac): """Get data from API as instance of ResponseModel. Keyword arguments: mac -- MAC address or OUI for searching """ data = { self._FORMAT_F: 'json', self._SEARCH_F: mac } response = self.__decode_str(self.__call_api(self.__url, data), 'utf-8') if len(response) > 0: return self.__parse(response) raise ... |
def get_raw_data(self, mac, response_format='json'): """Get data from API as string. Keyword arguments: mac -- MAC address or OUI for searching response_format -- supported types you can see on the https://macaddress.io """ data = { self._FORMAT_F: response_format, self._SEARCH_F: mac } response = self.__decode_str(sel... |
def get_vendor(self, mac): """Get vendor company name. Keyword arguments: mac -- MAC address or OUI for searching """ data = { self._SEARCH_F: mac, self._FORMAT_F: self._VERBOSE_T } response = self.__decode_str(self.__call_api(self.__url, data), 'utf-8') return response |
def has_provenance(self): """to handle deprecated mecqbank data""" if 'provenanceId' in self.my_osid_object._my_map: return bool(self.my_osid_object._my_map['provenanceId'] != '') else: return bool(self.my_osid_object._my_map['provenanceItemId'] != '') |
def get_provenance_id(self): """to handle deprecated mecqbank data""" if self.has_provenance(): if 'provenanceId' in self.my_osid_object._my_map: return self.my_osid_object._my_map['provenanceId'] else: return self.my_osid_object._my_map['provenanceItemId'] raise IllegalState() |
def get_provenance_parent(self): """stub""" if self.has_provenance(): collection = JSONClientValidated('assessment', collection='Item', runtime=self.my_osid_object._runtime) result = collection.find_one( {'_id': ObjectId(Id(self.get_provenance_id()).get_identifier())}) return Item(osid_object_map=result, runtime=self.m... |
def get_provenance_children(self): """stub""" if self.has_provenance_children(): collection = JSONClientValidated('assessment', collection='Item', runtime=self.my_osid_object._runtime) try: result = collection.find( {'provenanceId': self.my_osid_object.object_map['id']}) if result.count() == 0: raise KeyError except Ke... |
def get_solution(self, parameters=None): """stub""" if not self.has_solution(): raise IllegalState() return DisplayText(self.my_osid_object._my_map['solution']) |
def _init_metadata(self): """stub""" self._min_string_length = None self._max_string_length = None self._solution_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'solution'), 'element_label': 'Solution', 'required': False, 'read_only': False, 'linked': False, 'arr... |
def set_solution(self, text): """stub""" if not self.my_osid_object_form._is_valid_string( text, self.get_solution_metadata()): raise InvalidArgument('text') if is_string(text): self.my_osid_object_form._my_map['solution'] = { 'text': text, 'languageTypeId': str(DEFAULT_LANGUAGE_TYPE), 'scriptTypeId': str(DEFAULT_SCRIP... |
def clear_solution(self): """stub""" if 'solution' not in self.my_osid_object_form._my_map: raise NotFound() self.my_osid_object_form._my_map['solution'] = \ dict(self._solution_metadata['default_string_values'][0]) |
def clear_texts(self): """stub""" if self.get_texts_metadata().is_read_only(): raise NoAccess() self.my_osid_object_form._my_map['texts'] = \ self._texts_metadata['default_object_values'][0] |
def children(self, alias, bank_id): """ URL for getting or setting child relationships for the specified bank :param alias: :param bank_id: :return: """ return self._root + self._safe_alias(alias) + '/child/ids/' + str(bank_id) |
def hierarchy(self, alias=None): """ return the URL for the bank hierarchy itself :param alias: :return: """ if alias: return self._root + self._safe_alias(alias) else: return self._root |
def nodes(self, alias, depth=10, bank_id=None): """ URL for getting bulk nodes in hierarchy :param alias: :param depth: :return: """ if bank_id: return self._root + self._safe_alias(alias) + '/child/nodes/' + bank_id + '?descendentlevels=' + str(depth) else: return self._root + self._safe_alias(alias) + '/root/nodes?de... |
def parents(self, alias, bank_id): """ URL for getting or setting parent relationships for the specified bank :param alias: :param bank_id: :return: """ return self._root + self._safe_alias(alias) + '/parent/ids/' + bank_id |
def run_command(self, command, shell=True, env=None, execute='/bin/bash', return_code=None): """Run a shell command. The options available: * ``shell`` to be enabled or disabled, which provides the ability to execute arbitrary stings or not. if disabled commands must be in the format of a ``list`` * ``env`` is an envir... |
os.environ if self.debug is False: stdout = open(os.devnull, 'wb') else: stdout = subprocess.PIPE if return_code is None: return_code = [0] stderr = subprocess.PIPE process = subprocess.Popen( command, stdout=stdout, stderr=stderr, executable=execute, env=env, shell=shell ) output, error = process.communicate() if proc... |
def mkdir_p(self, path): """Python implementation of `mkdir -p <path>` :param path: ``str`` """ try: if not os.path.isdir(path): os.makedirs(path) self.log.info('Created Directory [ %s ]', path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise OSError( 'The provided path can... |
def write_file(self, filename, content): """Write a file. This is useful when writing a file that will fit within memory :param filename: ``str`` :param content: ``str`` """ with open(filename, 'wb') as f: self.log.debug(content) f.write(content) |
def write_file_lines(self, filename, contents): """Write a file. This is useful when writing a file that may not fit within memory. :param filename: ``str`` :param contents: ``list`` """ with open(filename, 'wb') as f: self.log.debug(contents) f.writelines(contents) |
def md5_checker(self, md5sum, local_file=None, file_object=None): """Return True if the local file and the provided `md5sum` are equal. If the processed file and the provided md5sum do not match an exception is raised indicating the failure. :param md5sum: ``str`` :param local_file: ``str`` :param file_object: ``BytesI... |
cloudlib.MD5CheckMismatch(msg) else: msg = '%s - CheckSumm verified for [ %s ]' % ( msg, local_file ) return True finally: self.log.debug(msg) |
def generate_signature(secret, verb, url, nonce, data): """Generate a request signature compatible with BitMEX.""" # Parse the url so we can remove the base and extract just the path. parsedURL = urllib.parse.urlparse(url) path = parsedURL.path if parsedURL.query: path = path + '?' + parsedURL.query # print "Computing ... |
def get_ticker(self): '''Return a ticker object. Generated from quote and trade.''' lastQuote = self.data['quote'][-1] lastTrade = self.data['trade'][-1] ticker = { "last": lastTrade['price'], "buy": lastQuote['bidPrice'], "sell": lastQuote['askPrice'], "mid": (float(lastQuote['bidPrice'] or 0) + float(lastQuote['askPr... |
def __connect(self, wsURL, symbol): '''Connect to the websocket in a thread.''' self.logger.debug("Starting thread") self.ws = websocket.WebSocketApp(wsURL, on_message=self.__on_message, on_close=self.__on_close, on_open=self.__on_open, on_error=self.__on_error, # We can login using email/pass or API key header=self.__... |
def __get_auth(self): '''Return auth headers. Will use API Keys if present in settings.''' if self.api_key == None and self.login == None: self.logger.error("No authentication provided! Unable to connect.") sys.exit(1) if self.api_key == None: self.logger.info("Authenticating with email/password.") return [ "email: " +... |
def __push_symbol(self, symbol): '''Ask the websocket for a symbol push. Gets instrument, orderBook, quote, and trade''' self.__send_command("getSymbol", symbol) while not {'instrument', 'trade', 'orderBook25'} <= set(self.data): sleep(0.1) |
def __send_command(self, command, args=[]): '''Send a raw command.''' self.ws.send(json.dumps({"op": command, "args": args})) |
def __on_message(self, ws, message): '''Handler for parsing WS messages.''' message = json.loads(message) self.logger.debug(json.dumps(message)) table = message['table'] if 'table' in message else None action = message['action'] if 'action' in message else None try: if 'subscribe' in message: self.logger.debug("Subscri... |
+= message['data'] elif action == 'update': self.logger.debug('%s: updating %s' % (table, message['data'])) # Locate the item in the collection and update it. for updateData in message['data']: item = findItemByKeys(self.keys[table], self.data[table], updateData) if not item: return # No item found to update. Could hap... |
def get_user_details(self, response): """Return user details from GitHub account""" account = response['account'] metadata = json.loads(account.get('json_metadata') or '{}') account['json_metadata'] = metadata return { 'id': account['id'], 'username': account['name'], 'name': metadata.get("profile", {}).get('name', '')... |
def user_data(self, access_token, *args, **kwargs): """Loads user data from service""" return self.get_json(self.USER_INFO_URL, method="POST", headers=self._get_headers(access_token)) |
def authenticate_admin(self, transport, account_name, password): """ Authenticates administrator using username and password. """ Authenticator.authenticate_admin(self, transport, account_name, password) auth_token = AuthToken() auth_token.account_name = account_name params = {sconstant.E_NAME: account_name, sconstant.... |
def authenticate(self, transport, account_name, password=None): """ Authenticates account using soap method. """ Authenticator.authenticate(self, transport, account_name, password) if password == None: return self.pre_auth(transport, account_name) else: return self.auth(transport, account_name, password) |
def auth(self, transport, account_name, password): """ Authenticates using username and password. """ auth_token = AuthToken() auth_token.account_name = account_name attrs = {sconstant.A_BY: sconstant.V_NAME} account = SOAPpy.Types.stringType(data=account_name, attrs=attrs) params = {sconstant.E_ACCOUNT: account, scons... |
def pre_auth(self, transport, account_name): """ Authenticates using username and domain key. """ auth_token = AuthToken() auth_token.account_name = account_name domain = util.get_domain(account_name) if domain == None: raise AuthException('Invalid auth token account') if domain in self.domains: domain_key = self.domai... |
= res.authToken auth_token.session_id = res.sessionId self.log.info('Authenticated account %s, session id %s' % (account_name, auth_token.session_id)) return auth_token |
def has_preview(self): """stub""" # I had to add the following check because file record types don't seem to be implemented # correctly for raw edx Question objects if ('fileIds' not in self.my_osid_object._my_map or 'preview' not in self.my_osid_object._my_map['fileIds'] or self.my_osid_object._my_map['fileIds']['prev... |
def _init_metadata(self): """stub""" super(PDFPreviewFormRecord, self)._init_metadata() self._preview_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'file'), 'element_label': 'File', 'instructions': 'accepts an Asset Id', 'required': True, 'read_only': False, 'li... |
def add_preview(self, preview_data, file_name): """stub""" label = 'preview' asset_type = PDF_PREVIEW_ASSET_TYPE asset_content_type = PDF_ASSET_CONTENT_GENUS_TYPE self.add_file(preview_data, label=label, asset_type=asset_type, asset_content_type=asset_content_type, asset_name=file_name, asset_description='A PDF file wi... |
def clear_preview(self): """stub""" try: rm = self.my_osid_object._get_provider_manager('REPOSITORY') except AttributeError: rm = self.my_osid_object_form._get_provider_manager('REPOSITORY') try: aas = rm.get_asset_admin_session_for_repository( Id(self.my_osid_object._my_map['assignedBankIds'][0])) except AttributeErro... |
def _init_map(self): """stub""" super(SimpleDifficultyItemFormRecord, self)._init_map() self.my_osid_object_form._my_map['texts']['difficulty'] = \ self._difficulty_metadata['default_string_values'][0] |
def _init_metadata(self): """stub""" super(SimpleDifficultyItemFormRecord, self)._init_metadata() self._min_string_length = None self._max_string_length = None self._difficulty_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'text'), 'element_label': 'Text', 'inst... |
def set_difficulty(self, difficulty): """stub""" if not is_string(difficulty): raise InvalidArgument('difficulty value must be a string') if difficulty.lower() not in ['low', 'medium', 'hard']: raise InvalidArgument('difficulty value must be low, medium, or hard') self.my_osid_object_form._my_map['texts']['difficulty']... |
def clear_difficulty(self): """stub""" if (self.get_difficulty_metadata().is_read_only() or self.get_difficulty_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['texts']['difficulty'] = \ self._difficulty_metadata['default_string_values'][0] |
def match_difficulty(self, value): """stub""" self._my_osid_query._add_match('texts.difficulty', str(value).lower(), True) |
def _init_map(self): """stub""" super(SourceItemFormRecord, self)._init_map() self.my_osid_object_form._my_map['texts']['source'] = \ self._source_metadata['default_string_values'][0] |
def _init_metadata(self): """stub""" super(SourceItemFormRecord, self)._init_metadata() self._min_string_length = None self._max_string_length = None self._source_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'text'), 'element_label': 'Text', 'instructions': 'en... |
def set_source(self, source): """stub""" if not is_string(source): raise InvalidArgument('source value must be a string') self.my_osid_object_form._my_map['texts']['source']['text'] = source |
def clear_source(self): """stub""" if (self.get_source_metadata().is_read_only() or self.get_source_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['texts']['source'] = \ self._source_metadata['default_string_values'][0] |
def is_published(self): """stub""" if 'published' not in self.my_osid_object._my_map: return False return bool(self.my_osid_object._my_map['published']) |
def _init_metadata(self): """stub""" self._published_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'published'), 'element_label': 'Published', 'instructions': 'flags if item is published or not', 'required': False, 'read_only': False, 'linked': False, 'array': F... |
def set_published(self, value=None): """stub""" if value is None: raise NullArgument() if self.get_published_metadata().is_read_only(): raise NoAccess() if not self.my_osid_object_form._is_valid_boolean(value): raise InvalidArgument() self.my_osid_object_form._my_map['published'] = value |
def clear_published(self): """stub""" if (self.get_published_metadata().is_read_only() or self.get_published_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['published'] = \ self._published_metadata['default_published_values'][0] |
def _init_map(self): """stub""" SimpleDifficultyItemFormRecord._init_map(self) SourceItemFormRecord._init_map(self) PDFPreviewFormRecord._init_map(self) PublishedFormRecord._init_map(self) ProvenanceFormRecord._init_map(self) super(MecQBankBaseMixin, self)._init_map() |
def _init_metadata(self): """stub""" SimpleDifficultyItemFormRecord._init_metadata(self) SourceItemFormRecord._init_metadata(self) PDFPreviewFormRecord._init_metadata(self) PublishedFormRecord._init_metadata(self) ProvenanceFormRecord._init_metadata(self) super(MecQBankBaseMixin, self)._init_metadata() |
def run(self): """For each file in noseOfYeti/specs, output nodes to represent each spec file""" tokens = [] for name, spec in (("Harpoon", HarpoonSpec().harpoon_spec), ("Image", HarpoonSpec().image_spec)): section = nodes.section() section['names'].append(name) section['ids'].append(name) header = nodes.title() header... |
def nodes_for_spec(self, spec): """ Determine nodes for an input_algorithms spec Taking into account nested specs """ tokens = [] if isinstance(spec, sb.create_spec): container = nodes.container(classes=["option_spec_option shortline blue-back"]) creates = spec.kls for name, option in sorted(spec.kwargs.items(), key=la... |
def get_log_entry_admin_session_for_log(self, log_id): """Gets the ``OsidSession`` associated with the log entry administrative service for the given log. arg: log_id (osid.id.Id): the ``Id`` of the ``Log`` return: (osid.logging.LogEntryAdminSession) - a ``LogEntryAdminSession`` raise: NotFound - no ``Log`` found by th... |
def get_logging_session(self, proxy): """Gets the ``OsidSession`` associated with the logging service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.logging.LoggingSession) - a ``LoggingSession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFailed - unable to complete request raise: Unimplemented ... |
def get_logging_session_for_log(self, log_id, proxy): """Gets the ``OsidSession`` associated with the logging service for the given log. arg: log_id (osid.id.Id): the ``Id`` of the ``Log`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.logging.LoggingSession) - a ``LoggingSession`` raise: NotFound - no ``Log`` fo... |
def get_log_entry_lookup_session(self, proxy): """Gets the ``OsidSession`` associated with the logging reading service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.logging.LogEntryLookupSession) - a ``LogEntryLookupSession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFailed - unable to complet... |
def get_log_entry_lookup_session_for_log(self, log_id, proxy): """Gets the ``OsidSession`` associated with the log reading service for the given log. arg: log_id (osid.id.Id): the ``Id`` of the ``Log`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.logging.LogEntryLookupSession) - a ``LogEntryLookupSession`` rais... |
def get_log_entry_query_session(self, proxy): """Gets the ``OsidSession`` associated with the logging entry query service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.logging.LogEntryQuerySession) - a ``LogEntryQuerySession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFailed - unable to comple... |
def get_log_entry_query_session_for_log(self, log_id, proxy): """Gets the ``OsidSession`` associated with the log entry query service for the given log. arg: log_id (osid.id.Id): the ``Id`` of the ``Log`` arg: proxy (osid.proxy.Proxy): a proxy return: (osid.logging.LogEntryQuerySession) - a ``LogEntryQuerySession`` rai... |
def get_log_entry_admin_session(self, proxy): """Gets the ``OsidSession`` associated with the logging entry administrative service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.logging.LogEntryAdminSession) - a ``LogEntryAdminSession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFailed - unable ... |
def get_log_entry_log_session(self, proxy): """Gets the session for retrieving log entry to log mappings. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.logging.LogEntryLogSession) - a ``LogEntryLogSession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFailed - unable to complete request raise: Uni... |
def get_log_entry_log_assignment_session(self, proxy): """Gets the session for assigning log entry to log mappings. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.logging.LogEntryLogAssignmentSession) - a ``LogEntryLogAssignmentSession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFailed - unable ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.