code stringlengths 1 18.2k |
|---|
def part_datasheet(self, part, command=None, path=None): ''' downloads and/or shows the datasheet of a given part command: if set will use it to open the datasheet. path: if set will download the file under that path. if path is given alone, the file will only get downloaded, if command is given alone, the file will be... |
= path+'/'+result['mpn']+'-'+datasheet['url'].split('/')[-1] download_file(datasheet['url'], out) print('Datasheet file saved as {}.'.format(out)) if command: subprocess.call([command, out]) finally: if not path: shutil.rmtree(path) return ReturnValues.OK |
def part_show(self, part, printout=False): ''' Opens/shows the aggregator's URI for the part. printout: if set, only printout the URI, do not open the browser. ''' result = self._e.parts_match( queries=[{'mpn_or_sku': part}], exact_only=True, show_mpn=True, show_octopart_url=True ) if result[1][0]['hits'] == 0: print("... |
def autoescape(context, nodelist, setting): """ Force autoescape behaviour for this block. """ old_setting = context.autoescape context.autoescape = setting output = nodelist.render(context) context.autoescape = old_setting if setting: return mark_safe(output) else: return output |
def debug(context): """ Outputs a whole load of debugging information, including the current context and imported modules. Sample usage:: <pre> {% debug %} </pre> """ from pprint import pformat output = [pformat(val) for val in context] output.append('\n\n') output.append(pformat(sys.modules)) return ''.join(output) |
def filter(context, nodelist, filter_exp): """ Filters the contents of the block through variable filters. Filters can also be piped through each other, and they can have arguments -- just like in variable syntax. Sample usage:: {% filter force_escape|lower %} This text will be HTML-escaped, and will appear in lowercas... |
def regroup(target, expression): """ Regroups a list of alike objects by a common attribute. This complex tag is best illustrated by use of an example: say that ``people`` is a list of ``Person`` objects that have ``first_name``, ``last_name``, and ``gender`` attributes, and you'd like to display a list that looks like... |
variable with a list of objects with ``grouper`` and ``list`` attributes. ``grouper`` contains the item that was grouped by; ``list`` contains the list of objects that share that ``grouper``. In this case, ``grouper`` would be ``Male``, ``Female`` and ``Unknown``, and ``list`` is the list of people with those genders. ... |
{'grouper': key, 'list': list(val)} for key, val in groupby(obj_list, lambda v, f=expression.resolve: f(v, True)) ] |
def now(format_string): """ Displays the date, formatted according to the given string. Uses the same format as PHP's ``date()`` function; see http://php.net/date for all the possible values. Sample usage:: It is {% now "jS F Y H:i" %} """ from datetime import datetime from django.utils.dateformat import DateFormat ret... |
def spaceless(context, nodelists): """ Removes whitespace between HTML tags, including tab and newline characters. Example usage:: {% spaceless %} <p> <a href="foo/">Foo</a> </p> {% endspaceless %} This example would return this HTML:: <p><a href="foo/">Foo</a></p> Only space between *tags* is normalized -- not space b... |
def widthratio(value, maxvalue, max_width): """ For creating bar charts and such, this tag calculates the ratio of a given value to a maximum value, and then applies that ratio to a constant. For example:: <img src='bar.gif' height='10' width='{% widthratio this_value max_value 100 %}' /> Above, if ``this_value`` is 17... |
def with_(context, nodelist, val): """ Adds a value to the context (inside of this block) for caching and easy access. For example:: {% with person.some_sql_method as total %} {{ total }} object{{ total|pluralize }} {% endwith %} """ context.push() context[self.name] = val output = nodelist.render(context) context.pop(... |
def _intersect(start1, end1, start2, end2): """ Returns the intersection of two intervals. Returns (None,None) if the intersection is empty. :param int start1: The start date of the first interval. :param int end1: The end date of the first interval. :param int start2: The start date of the second interval. :param int ... |
def _additional_rows_date2int(self, keys, rows): """ Replaces start and end dates of the additional date intervals in the row set with their integer representation :param list[tuple[str,str]] keys: The other keys with start and end date. :param list[dict[str,T]] rows: The list of rows. :rtype: list[dict[str,T]] """ for... |
def _intersection(self, keys, rows): """ Computes the intersection of the date intervals of two or more reference data sets. If the intersection is empty the row is removed from the group. :param list[tuple[str,str]] keys: The other keys with start and end date. :param list[dict[str,T]] rows: The list of rows. :rtype: ... |
ret.append(row) return ret |
def merge(self, keys): """ Merges the join on pseudo keys of two or more reference data sets. :param list[tuple[str,str]] keys: For each data set the keys of the start and end date. """ deletes = [] for pseudo_key, rows in self._rows.items(): self._additional_rows_date2int(keys, rows) rows = self._intersection(keys, ro... |
def run(self, timeout = 0): """ Run a proactor loop and return new socket events. Timeout is a timedelta object, 0 if active coros or None. """ # poll timeout param is a integer number of miliseconds (seconds/1000). ptimeout = int( timeout.days * 86400000 + timeout.microseconds / 1000 + timeout.seconds * 1000 if timeou... |
= act else: sleep(timeout) |
def make_map(): """Create, configure and return the routes Mapper""" map = Mapper(directory=config['pylons.paths']['controllers'], always_scan=config['debug']) # The ErrorController route (handles 404/500 error pages); it should # likely stay at the top, ensuring it can always be resolved map.connect('error/:action/:id... |
def make_frame(self, frame, birthframe, startframe, stopframe, deathframe, noiseframe=None): """ :param frame: current frame :param birthframe: frame where this animation starts returning something other than None :param startframe: frame where animation starts to evolve :param stopframe: frame where animation is compl... |
def to_serializable_value(self): """ Run through all fields of the object and parse the values :return: :rtype: dict """ return { name: field.to_serializable_value() for name, field in self.value.__dict__.items() if isinstance(field, Field) and self.value } |
def encode(self): """ Just iterate over the child elements and append them to the current element :return: the encoded element :rtype: xml.etree.ElementTree.Element """ element = ElementTree.Element( self.name, attrib={'type': FieldConstants.ARRAY}, ) for item in self.value: element.append(item.encode()) return element |
def constraints_stmt(stmt, env=None): """ Since a statement may define new names or return an expression , the constraints that result are in a ConstrainedEnv mapping names to types, with constraints, and maybe having a return type (which is a constrained type) """ env = env or {} if isinstance(stmt, ast.FunctionDef): ... |
elif isinstance(stmt, ast.Assign): if len(stmt.targets) > 1: raise NotImplementedError('Cannot generate constraints for multi-target assignments yet') expr_result = constraints_expr(stmt.value, env=env) target = stmt.targets[0].id # For an assignment, we actually generate a fresh variable so that it can be the union of... |
def requires_product_environment(func, *args, **kws): """ task decorator that makes sure that the product environment of django_productline is activated: -context is bound -features have been composed """ from django_productline import startup startup.select_product() return func(*args, **kws) |
def set_site(): """ This method is part of the prepare_data helper. Sets the site. Default implementation uses localhost. For production settings refine this helper. :return: """ from django.contrib.sites.models import Site from django.conf import settings # Initially set localhost as default domain # site = Site.objec... |
def djpl_compilemessages(): """ Compile messages hook for django_productline, this task checks for the activated languages in settings.LANGUAGES. It runs the standard django compilemessages management command with the -l parameter. Example language setting: LANGUAGES = [ ('en', 'English'), ('de', 'Deutsch') ] Remarks: ... |
for lang in languages: args.extend(['--locale', str(lang)]) tasks.manage(*args) |
def export_data(target_path): """ Exports the data of an application - media files plus database, :param: target_path: :return: a zip archive """ tasks.export_data_dir(target_path) tasks.export_database(target_path) tasks.export_context(target_path) return target_path |
def import_data(target_zip): """ Import data from given zip-arc, this means database + __data__ :param target_zip: :param backup_zip_path: :return: """ from django_productline.context import PRODUCT_CONTEXT tasks.import_data_dir(target_zip) # product context is not reloaded if context file is changed tasks.import_datab... |
def export_data_dir(target_path): """ Exports the media files of the application and bundles a zip archive :return: the target path of the zip archive """ from django_productline import utils from django.conf import settings utils.zipdir(settings.PRODUCT_CONTEXT.DATA_DIR, target_path, wrapdir='__data__') print('... wro... |
def import_data_dir(target_zip): """ Imports the data specified by param <target_zip>. Renames the data dir if it already exists and unpacks the zip sub dir __data__ directly within the current active product. :param target_zip: string path to the zip file. """ from django_productline.context import PRODUCT_CONTEXT new... |
def mv_data_dir(target): """ Move data_dir to {target} location, refineable in case data_dir is a mounted volume or object storage and needs special treatments :return: """ from django_productline.context import PRODUCT_CONTEXT os.rename(PRODUCT_CONTEXT.DATA_DIR, target) |
def export_context(target_zip): """ Append context.json to target_zip """ from django_productline import utils context_file = tasks.get_context_path() return utils.create_or_append_to_zip(context_file, target_zip, 'context.json') |
def import_context(target_zip): """ Overwrite old context.json, use context.json from target_zip :param target_zip: :return: """ context_path = tasks.get_context_path() with zipfile.ZipFile(target_zip) as unzipped_data: with open(context_path, 'w') as context: context.write(unzipped_data.read('context.json')) |
def get_context_template(): """ Features which require configuration parameters in the product context need to refine this method and update the context with their own data. """ import random return { 'SITE_ID': 1, 'SECRET_KEY': ''.join( [random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'... |
def create_data_dir(): """ Creates the DATA_DIR. :return: """ from django_productline.context import PRODUCT_CONTEXT if not os.path.exists(PRODUCT_CONTEXT.DATA_DIR): os.mkdir(PRODUCT_CONTEXT.DATA_DIR) print('*** Created DATA_DIR in %s' % PRODUCT_CONTEXT.DATA_DIR) else: print('...DATA_DIR already exists.') |
def generate_context(force_overwrite=False, drop_secret_key=False): """ Generates context.json """ print('... generating context') context_fp = '%s/context.json' % os.environ['PRODUCT_DIR'] context = {} if os.path.isfile(context_fp): print('... augment existing context.json') with open(context_fp, 'r') as context_f: co... |
def clear_tables_for_loaddata(confirm=None): """ Clears al tables in order to loaddata properly. :param string: :return: """ from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Permission from django.contrib.sites.models import Site if confirm != 'yes': print('Please enter ... |
def inject_context(context): """ Updates context.json with data from JSON-string given as param. :param context: :return: """ context_path = tasks.get_context_path() try: new_context = json.loads(context) except ValueError: print('Couldn\'t load context parameter') return with open(context_path) as jsonfile: try: jsond... |
def write_composer_operation_log(filename): """ Writes the composed operation log from featuremonkey's Composer to a json file. :param filename: :return: """ from featuremonkey.tracing import serializer from featuremonkey.tracing.logger import OPERATION_LOG ol = copy.deepcopy(OPERATION_LOG) ol = serializer.serialize_op... |
def search(cls, term=None, page=0, **criteria): """ Search a list of the model If you use "term": - Returns a collection of people that have a name matching the term passed in through the URL. If you use "criteria": - returns people who match your search criteria. Search by any criteria you can on the Contacts tab, inc... |
params['criteria[{}]'.format(key)] = value return fields.ListField(name=cls.ENDPOINT, init_class=cls).decode( cls.element_from_string( cls._get_request( endpoint=cls.ENDPOINT + '/search', params=params ).text ) ) |
def _delim_accum(control_files, filename_template, keys=None, exclude_keys=None, separator=DEFAULT_SEP, missing_action='fail'): """ Accumulator for delimited files Combines each file with values from JSON dictionary in same directory :param iterable control_files: Iterable of control files :param filename_template: A t... |
((k, v) for k, v in control.items() if k in keys))) yield row_dict if missing_action == 'warn': map_fn = _warn_on_io(map_fn) return itertools.chain.from_iterable(nest_map(control_files, map_fn)) |
def delim(arguments): """ Execute delim action. :param arguments: Parsed command line arguments from :func:`main` """ if bool(arguments.control_files) == bool(arguments.directory): raise ValueError( 'Exactly one of control_files and `-d` must be specified.') if arguments.directory: arguments.control_files.extend(contro... |
def main(args=sys.argv[1:]): """ Command-line interface for nestagg """ parser = argparse.ArgumentParser(description="""Aggregate results of nestly runs""") subparsers = parser.add_subparsers() delim_parser = subparsers.add_parser('delim', help="""Combine control files with delimited files.""") delim_parser.set_default... |
help="""Files are tab-separated""") delim_parser.add_argument('-o', '--output', default=sys.stdout, type=argparse.FileType('w'), help="""Output file [default: stdout]""") arguments = parser.parse_args() arguments.func(arguments) |
def delete(self): """ Deletes the object :return: :rtype: None """ return self._delete_request(endpoint=self.ENDPOINT + '/' + str(self.id)) |
def make_frame(self, frame, birthframe, startframe, stopframe, deathframe, noiseframe=None): """ animation happens between startframe and stopframe the value is None before aliveframe, and after deathframe * if aliveframe is not specified it defaults to startframe * if deathframe is not specified it defaults to stopfra... |
noise_val = self.noise_fn(newval, nf) else: noise_val = 0 return newval + noise_val |
def recv(self, bufsize, **kws): """Receive data from the socket. The return value is a string representing the data received. The amount of data may be less than the ammount specified by _bufsize_. """ return Recv(self, bufsize, timeout=self._timeout, **kws) |
def sendall(self, data, **kws): """Send data to the socket. The socket must be connected to a remote socket. All the data is guaranteed to be sent.""" return SendAll(self, data, timeout=self._timeout, **kws) |
def parse_owl_rdf(iri): """Parses an OWL resource that's encoded in OWL/RDF into a NetworkX directional graph :param str iri: The location of the OWL resource to be parsed by Ontospy :type iri: str :rtype: network.DiGraph """ g = nx.DiGraph(IRI=iri) o = Ontospy(iri) for cls in o.classes: g.add_node(cls.locale, type='Cl... |
def linlin(value, in_min, in_max, out_min, out_max, clip=True): """ maps value \in [in_min,in_max] linearly to the corresponding value \in [out_min, out_max] (extrapolating if needed) e.g. linlin(0.3,0,1,10,20) = 13 :param value: value to be mapped :param in_min: input range minimum :param in_max: input range maximum :... |
value - (in_min + in_max)) / float(in_max - in_min))) / 2.0 if clip: output = Mapping.clip_value(output, out_min, out_max) return output |
def linexp(value, in_min, in_max, out_min, out_max, clip=True): """ maps value \in linear range [in_min,in_max] corresponding value \in exponential range [out_min, out_max] (extrapolating if needed) :param value: value to be mapped :param in_min: input range minimum :param in_max: input range maximum :param out_min: wh... |
= Mapping.clip_value(output, out_min, out_max) return output |
def find_models_and_delete_search_index(self, model, force, exec_models, check_only): """ Finds models to execute and these models' exist search indexes are deleted. For other operations, necessary models are gathered to list(exec_models) Args: model: model to execute force(bool): True or False if True, all given model... |
do!" % index_name) return elif check_only and schema != new_schema: print("Schema %s is not up to date, migrate this model!" % index_name) return except: import traceback traceback.print_exc() bucket.set_property('search_index', 'foo_index') try: client.delete_search_index(index_name) except RiakError as e: if 'notfoun... |
def creating_schema_and_index(self, models, func): """ Executes given functions with given models. Args: models: models to execute func: function name to execute Returns: """ waiting_models = [] self.base_thread.do_with_submit(func, models, waiting_models, threads=self.threads) if waiting_models: print("WAITING MODELS ... |
def create_schema(self, model, waiting_models): """ Creates search schemas. Args: model: model to execute waiting_models: if riak can't return response immediately, model is taken to queue. After first execution session, method is executed with waiting models and controlled. And be ensured that all given models are exe... |
def create_index(self, model, waiting_models): """ Creates search indexes. Args: model: model to execute waiting_models: if riak can't return response immediately, model is taken to queue. After first execution session, method is executed with waiting models and controlled. And be ensured that all given models are exec... |
def create_report(self): """ creates a text report for the human user :return: str """ if self.report: self.report += "\n Operation took %s secs" % round( time.time() - self.t1) else: self.report = "Operation failed: %s \n" % self.report return self.report |
def compile_schema(fields): """ joins schema fields with base solr schema :param list[str] fields: field list :return: compiled schema :rtype: byte """ path = os.path.dirname(os.path.realpath(__file__)) # path = os.path.dirname( # os.path.abspath(inspect.getfile(inspect.currentframe()))) with codecs.open("%s/solr_schem... |
def func2(q1, q2): """ to demonstrate debugging on exception """ a = q1/q2 if q2 == 5: z = 100 IPS() # start embedded ipython shell in the local scope # -> explore global namespace return a |
def save_model(self, model, meta_data=None, index_fields=None): """ saves the model instance to riak Args: meta (dict): JSON serializable meta data for logging of save operation. {'lorem': 'ipsum', 'dolar': 5} index_fields (list): Tuple list for secondary indexing keys in riak (with 'bin' or 'int'). [('lorem','bin'),('... |
def _make_model(self, data, key=None): """ Creates a model instance with the given data. Args: data: Model data returned from DB. key: Object key Returns: pyoko.Model object. """ if data['deleted'] and not self.adapter.want_deleted: raise ObjectDoesNotExist('Deleted object returned') model = self._model_class(self._cur... |
def filter(self, all_records=False, **filters): """ Applies given query filters. If wanted result is more than specified size, exception is raised about using all() method instead of filter. Args: all_records (bool): **filters: Query filters as keyword arguments. Returns: Self. Queryset object. Examples: >>> Person.obj... |
def exclude(self, **filters): """ Applies query filters for excluding matching records from result set. Args: **filters: Query filters as keyword arguments. Returns: Self. Queryset object. Examples: >>> Person.objects.exclude(age=None) >>> Person.objects.filter(name__startswith='jo').exclude(age__lte=16) """ exclude = ... |
def get_or_create(self, defaults=None, **kwargs): """ Looks up an object with the given kwargs, creating a new one if necessary. Args: defaults (dict): Used when we create a new object. Must map to fields of the model. \*\*kwargs: Used both for filtering and new object creation. Returns: A tuple of (object, created), w... |
except ObjectDoesNotExist: pass data = defaults or {} data.update(kwargs) return self._model_class(**data).blocking_save(), True |
def delete_if_exists(self, **kwargs): """ Deletes an object if it exists in database according to given query parameters and returns True otherwise does nothing and returns False. Args: **kwargs: query parameters Returns(bool): True or False """ try: self.get(**kwargs).blocking_delete() return True except ObjectDoesNot... |
def update(self, **kwargs): """ Updates the matching objects for specified fields. Note: Post/pre save hooks and signals will NOT triggered. Unlike RDBMS systems, this method makes individual save calls to backend DB store. So this is exists as more of a comfortable utility method and not a performance enhancement. Key... |
def get(self, key=None, **kwargs): """ Ensures that only one result is returned from DB and raises an exception otherwise. Can work in 3 different way. - If no argument is given, only does "ensuring about one and only object" job. - If key given as only argument, retrieves the object from DB. - if query filters given, ... |
def delete(self): """ Deletes all objects that matches to the queryset. Note: Unlike RDBMS systems, this method makes individual save calls to backend DB store. So this is exists as more of a comfortable utility method and not a performance enhancement. Returns: List of deleted objects or None if *confirm* not set. Exa... |
def values_list(self, *args, **kwargs): """ Returns list of values for given fields. Since this will implicitly use data() method, it's more efficient than simply looping through model instances. Args: flatten (bool): True. Flatten if there is only one field name given. Returns ['one','two', 'three'] instead of [['one'... |
def values(self, *args): """ Returns list of dicts (field names as keys) for given fields. Args: \*args: List of fields to be returned as dict. Returns: list of dicts for given fields. Example: >>> Person.objects.filter(age__gte=16, name__startswith='jo').values('name', 'lastname') """ return [dict(zip(args, values_lis... |
def dump(self): """ Dump raw JSON output of matching queryset objects. Returns: List of dicts. """ results = [] for data in self.data(): results.append(data) return results |
def or_filter(self, **filters): """ Works like "filter" but joins given filters with OR operator. Args: **filters: Query filters as keyword arguments. Returns: Self. Queryset object. Example: >>> Person.objects.or_filter(age__gte=16, name__startswith='jo') """ clone = copy.deepcopy(self) clone.adapter.add_query([("OR_Q... |
def OR(self): """ Switches default query joiner from " AND " to " OR " Returns: Self. Queryset object. """ clone = copy.deepcopy(self) clone.adapter._QUERY_GLUE = ' OR ' return clone |
def search_on(self, *fields, **query): """ Search for query on given fields. Query modifier can be one of these: * exact * contains * startswith * endswith * range * lte * gte Args: \*fields (str): Field list to be searched on \*\*query: Search query. While it's implemented as \*\*kwargs we only support one (first) key... |
def order_by(self, *args): """ Applies query ordering. Args: **args: Order by fields names. Defaults to ascending, prepend with hypen (-) for desecending ordering. Returns: Self. Queryset object. Examples: >>> Person.objects.order_by('-name', 'join_date') """ clone = copy.deepcopy(self) clone.adapter.ordered = True if ... |
def set_params(self, **params): """ add/update solr query parameters """ clone = copy.deepcopy(self) clone.adapter.set_params(**params) return clone |
def data(self): """ return (data_dict, key) tuple instead of models instances """ clone = copy.deepcopy(self) clone._cfg['rtype'] = ReturnType.Object return clone |
def raw(self, query): """ make a raw query Args: query (str): solr query \*\*params: solr parameters """ clone = copy.deepcopy(self) clone.adapter._pre_compiled_query = query clone.adapter.compiled_query = query return clone |
def userForCert(store, cert): """Gets the user for the given certificate. """ return store.findUnique(User, User.email == emailForCert(cert)) |
def user(self): """The current user. This property is cached in the ``_user`` attribute. """ if self._user is not None: return self._user cert = self.transport.getPeerCertificate() self._user = user = userForCert(self.store, cert) return user |
def getContext(self): """Creates a context. This will make contexts using ``SSLv23_METHOD``. This is because OpenSSL thought it would be a good idea to have ``TLSv1_METHOD`` mean "only use TLSv1.0" -- specifically, it disables TLSv1.2. Since we don't want to use SSLv2 and v3, we set OP_NO_SSLv2|OP_NO_SSLv3. Additionall... |
def _verify(self, connection, cert, errorNumber, errorDepth, returnCode): """Verify a certificate. """ try: user = userForCert(self.store, cert) except ItemNotFound: log.msg("Connection attempt by {0!r}, but no user with that " "e-mail address was found, cert digest was {1}" .format(emailForCert(cert), cert.digest("sha... |
def tablename_from_link(klass, link): """ Helper method for URL's that look like /api/now/v1/table/FOO/sys_id etc. """ arr = link.split("/") i = arr.index("table") tn = arr[i+1] return tn |
def links(self): """ returns {attr1: href, attr2: href2} """ dlinks = {} for key, value in self.__dict__.items(): if isinstance(value, dict) and value['link']: dlinks[key] = value['link'] return dlinks |
def run(path, code, params=None, ignore=None, select=None, **meta): """Pylint code checking. :return list: List of errors. """ logger.debug('Start pylint') clear_cache = params.pop('clear_cache', False) if clear_cache: MANAGER.astroid_cache.clear() class Reporter(BaseReporter): def __init__(self): self.errors = [] supe... |
def rate_limit(max_interval=20, sampling=3, f=lambda x: x): '''x rises by 1 from 0 on each iteraton, back to 0 on triggering. f(x) should rise up to f(max_interval) in some way (with default "f(x)=x" probability rises lineary with 100% chance on "x=max_interval"). "sampling" affect probablility in an "c=1-(1-c0)*(1-c1)... |
def get_line_segments(line): """ Split up a line into lhs, rhs, comment, flags lhs ist defined as the leftmost assignment (line does not need to be an assignment) :param line: :return: lhs, rhs, comment """ line = line.strip() tokens = tk.generate_tokens(io.StringIO(line).readline) equality_signs = [-1] comment_tuple =... |
def custom_display(lhs, rhs): """ lhs: left hand side rhs: right hand side This function serves to inject the string for the left hand side of an assignment """ # This code is mainly copied from IPython/display.py # (IPython version 2.3.0) kwargs = {} raw = kwargs.get('raw', False) include = kwargs.get('include') exclu... |
%s' %type(lhs)) new_format_dict = {} for key, value in list(format_dict.items()): if 'text/plain' in key: prefix = "{} := ".format(lhs) if value.startswith("array") or value.startswith("matrix"): value = format_np_array(value, len(prefix)) new_value = prefix + value new_format_dict[key] = new_value elif 'text/latex' in... |
me) publish_display_data(data=new_format_dict, metadata=md_dict) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.