content
stringlengths
22
815k
id
int64
0
4.91M
def api_settings_gui(request): """Test utility.""" auth = get_auth(request) obj = SettingsGui(auth=auth) check_apiobj(authobj=auth, apiobj=obj) return obj
74,400
def test_left_sided_tree_with_two_nodes_root_has_child(empty_t): """If 2 nodes in left sided tree, root points to left child only.""" empty_t.insert(10) empty_t.insert(5) assert empty_t.root.left assert not empty_t.root.right
74,401
def _geometric_mean(array): """Calculate a geometric mean of numpy array of floats. Returns: float, unless array contains a ``nan``, then returns ``nan``. """ return numpy.prod(array)**(1./len(array))
74,402
def helicsCreateCore(type: str, name: str, init_string: str) -> HelicsCore: """ Create a `helics.HelicsCore`. **Parameters** - **`type`** - The type of the core to create. - **`name`** - The name of the core. It can be a nullptr or empty string to have a name automatically assigned. - **`init_...
74,403
def _complete_choices(msg, choice_range, prompt, all=False, back=True): """Return the complete message and choice list.""" choice_list = [str(i) for i in choice_range] if all: choice_list += ['a'] msg += '\n- a - All of the above.' if back: choice_list += ['b'] msg...
74,404
def is_snippet(abbr, doc_type = 'html'): """ Check is passed abbreviation is a snippet @return bool """ return get_snippet(doc_type, abbr) and True or False
74,405
def compute_entropy(x, k=1, norm='max', min_dist=0.): """ Estimates the entropy H of a random variable x (in nats) based on the kth-nearest neighbour distances between point samples. Implementation credits: Paul Brodersen @reference: Kozachenko, L., & Leonenko, N. (1987). Sample estimate of the ...
74,406
def building_data_one_per_par(collection,minlen=10,regression=False,time=False,subdir=None,save=False): """Builds the training and out-of-sample sets. Parameters ---------- collection : data in class format Returns ------- list x: list of Numpy data set, columns: differe...
74,407
def create_item(item_create: ItemCreate = Body(..., example=ItemFactory.mock_item)): """ create an item """ return item_service.create_item(item_create)
74,408
def problem_5_unit_tests(): """ """ # By default, the context list gets reset each time we enter the function. student.call('Account', 'My Checking', target="checking_account") assertEqual(student.call('checking_account.deposit', 400), 400) assertEqual(student.call('checking_account.deposit', 1...
74,409
def satellite_ref(sat): """ To load the band_names for referencing either LANDSAT8 or LANDSAT7 bands """ if sat == 'LANDSAT_8': sat_img = bands_ls8 elif sat == 'LANDSAT_7' or sat == 'LANDSAT_5': sat_img = bands_ls7 else: raise ValueError('Satellite data Not Supported') ...
74,410
def is_bitcode_file(path): """ Returns True if path contains a LLVM bitcode file, False if not. """ with open(path, 'rb') as f: return f.read(4) == b'BC\xc0\xde'
74,411
def licensed(name): """Ensure that Crowdstrike is licensed. .. note:: This state will ONLY license crowdstrike if it isn't licensed. This state should NOT be used to change the license. name: the customer id to license the machine with. """ ret = {'name': name, 'result': Tr...
74,412
def train_and_save_model(params, x, y, regression, context_nt, hyperparam_search_cross_val_num_splits, out_path): """Train and save a model. This trains across all train/validate (non-test) data. Args: params: dict of hyperparameters for model x: input data y: labels ...
74,413
def PEI_threshold(gp, u, idxU, boundsK): """find the minimum of the prediction for u fixed and compares it with the current evaluated minimum. It serves as the threshold for the PEI criterion :param gp: GaussianProcessRegressor :param u: value that is fixed :param idxU: index of u :param bo...
74,414
def gaussian_blur(x: np.ndarray, sigma: float, multichannel: bool = True, xrange: tuple = None) -> np.ndarray: """ Apply Gaussian blur. Parameters ---------- x Instance to be perturbed. sigma Standard deviation determining the strength of the blur. multichannel Wheth...
74,415
def check_plot_type(plot_type): """ Ensures that invalid plot types don't make it to plotting functions. Inputs: plot_type: (string) type of plot to be used. """ valid_plot_types = ["rots", "final_im", "intermediate"] if plot_type not in valid_plot_types: raise NotImplementedErr...
74,416
def is_vocalized(word): """Checks if the arabic word is vocalized. the word musn't have any spaces and pounctuations. @param word: arabic unicode char @type word: unicode @return: if the word is vocalized @rtype:Boolean """ if word.isalpha(): return False for char in word: ...
74,417
def request_extra_time(request): """creates sends an email to the responsible about the user has requested extra time """ # get logged in user as he review requester logged_in_user = get_logged_in_user(request) task_id = request.matchdict.get('id', -1) task = Task.query.filter(Task.id == ta...
74,418
def dataset_to_problem(file, X_cols = None, y_cols = None, T = 1): """ file (string or dataframe): file path or dataframe X (list of strings): y (list of strings): """ if(type(file) is str): tigerforecast_dir = get_tigerforecast_dir() datapath = os.path.join(tigerfore...
74,419
def _get_and_deflate( function: Callable, base_year: int, target_currency: str = None, col: str = "value", ) -> pd.DataFrame: """Get data using a specific function and apply an exchange rate and deflators if provided""" if target_currency is None: df = function() else: d...
74,420
def main(args=None): """Console script for sentry_onboarding.""" app.run() return 0
74,421
def print_stack_component_list( components: List[StackComponent], active_component_name: str ) -> None: """Prints a table with configuration options for a list of stack components. If a component is active (its name matches the `active_component_name`), it will be highlighted in a separate table column...
74,422
def predict_binary_write_output_to_file(exs: List[PersonExample], classifier: BinaryPersonClassifier, outfile: str): """ Runs prediction on exs and writes the outputs to outfile, one token per line :param exs: :param classifier: :param outfile: :return: """ f = open(outfile, 'w') for...
74,423
def responder(): """ Listen to webhooks. Returns ------- response : flask.Response object Response object that is used by default in Flask. """ response = Response(status=200) try: loan_data = request.get_json(force=True, silent=True) trading.buy_red_loan(lo...
74,424
def test_get_vehicles_info_with_region_input(): """ Test results for various URLs """ transport_proxy = YandexTransportProxy(SERVER_HOST, SERVER_PORT) # URL is None with pytest.raises(Exception): url = None transport_proxy.get_vehicles_info_with_region(url) # URL is Gibberis...
74,425
def equalization_line(data, key, equilibrium_point): """ Создание линии эквализации. Уравнение прямой с плавающей температурой является прямой с углом наклона, большим, чем 0 градусов. Таким образом, она выражается следующим равенством: y_float = kx = [y(f) - y(0)] / N * x, где а - время в конце, N ...
74,426
def pairwise_landmark_ranking_loss_step(model, data, search_space, criterion, args, change_model_spec_fn, module_forward_fn, rank_obj=None, pair_indicies=None): """ Compute the ranking loss: for landmark models, m1, m2, .......
74,427
def get_org_repo_owner(repo_id): """ Get owner of org repo. """ try: owner = seafserv_threaded_rpc.get_org_repo_owner(repo_id) except SearpcError: owner = None return owner
74,428
def remove_from_user_path(path: str): """ Remove **one** path from PATH of current user """ assert ';' not in path old_paths = get_user_path() new_paths = [i for i in old_paths if not is_same_file(i, path)] if new_paths != old_paths: return set_user_path(new_paths)
74,429
def read_one(activatorId): """ Responds to a request for /api/application_meta/{activatorId} :param application: activatorId :return: count of applications that match the acivatorId """ acount = Application.query.filter(Application.activatorId == activatorId).count() data = ...
74,430
def host_arch_cc(): """Host architecture check using the CC command.""" if sys.platform.startswith('aix'): # we only support gcc at this point and the default on AIX # would be xlc so hard code gcc k = cc_macros('gcc') else: k = cc_macros(os.environ.get('CC_host')) matchup = { '__aarch64__...
74,431
def server_role_def(role): """Defines various role objects""" server_roles = {'simple' : {'groups' : ['default', 'web'], 'ami' : 'precise64', 'role' : SimpleRole} } return server_roles[role]
74,432
def get_session(module): """Return System Object or Fail""" user_agent = '%(base)s %(class)s/%(version)s (%(platform)s)' % { 'base': USER_AGENT_BASE, 'class': __name__, 'version': VERSION, 'platform': platform.platform() } array_name = module.params['fa_url'] usernam...
74,433
def read_line_values_as_array(file_path, dtype, line_no): """ Reads in chemical potential multipliers """ success = True error = "" values = None if not check_file: success = False error = "File: %s cannot be found." % (file_path) else: try: f = open(file_path) ...
74,434
def comment_delete_answer(request, comment_id): """ HelloWorld 답글댓글삭제 """ comment = get_object_or_404(Comment, pk=comment_id) if request.user != comment.author: messages.error(request, '댓글삭제권한이 없습니다') return redirect('HelloWorld:detail', question_id=comment.answer.question.id) el...
74,435
def _conv_block(inputs, filters, alpha, kernel=(3, 3), strides=(1, 1), block_id=1): """Adds an initial convolution layer (with batch normalization and relu6). # Arguments inputs: Input tensor of shape `(rows, cols, 3)` (with `channels_last` data format) or (3, rows, cols) (with ...
74,436
def get_file_pattern() -> List[str]: """ Returns a list with all possible file patterns """ return ["*.pb", "*.data", "*.index"]
74,437
async def async_setup(hass: HomeAssistantType, config: OrderedDict) -> bool: """Set up songpal environment.""" conf = config.get(DOMAIN) if conf is None: return True for config_entry in conf: hass.async_create_task( hass.config_entries.flow.async_init( DOMAIN,...
74,438
def features_to_nonpadding(features, inputs_or_targets = 'inputs'): """See transformer.features_to_nonpadding.""" key = inputs_or_targets + '_segmentation' if features and key in features: return tf.minimum(tf.to_float(features[key]), 1.0) return None
74,439
def _make_inner_dense(sparse_nested_table, outer_inner_cards, default_value): """ Convert n sparse nested table dictionary's implicit default values in the innetables to real entries so that all possible assignments are present in the inner sub tables. :param sparse_nested_table: The nested dictionary ...
74,440
def xcafdoc_DatumRefGUID(*args): """ * Return GUIDs for TreeNode representing specified types of datum :rtype: Standard_GUID """ return _XCAFDoc.xcafdoc_DatumRefGUID(*args)
74,441
def get_cohort_dictionary(conn, table_name, year): """Get cohort dictionary.""" s = select([column("cohort_id"), column("features"), column("size")])\ .select_from(table("cohort"))\ .where(column("table") == table_name) if year is not None: s = s.where(column("year") == year) rs ...
74,442
def SceneItemListsAddItemLists(builder, itemLists): """This method is deprecated. Please switch to AddItemLists.""" return AddItemLists(builder, itemLists)
74,443
def native_median(data: Union[list, np.ndarray, pd.Series]) -> float: """ Calculate Median of a list. :param data: Input data. :type data: list, np.ndarray, or pd.Series :return: Returns the Median. :rtype: float :example: *None* :note: If multiple values have the same count, will retu...
74,444
def extract_tensor_batch(t, batch_size): """ batch extraction from tensor """ # extracs batch from first dimension (only works for 2D tensors) idx = torch.randperm(t.nelement()) return t.view(-1)[idx][:batch_size].view(batch_size,1)
74,445
def main(): """ """ try: print("hello world") except Exception as e: print("does not exist") print("Exception: {}".format(str(e))) sys.exit(1)
74,446
def main(): """Main function.""" # Print program info print('AlfheimDataset features program.') # Specify the list of files to read files = ['2013-11-03_tromso_stromsgodset_first_ONLY_ONE_MINUTE.csv']#'2013-11-03_tromso_stromsgodset_first.csv']#, '2013-11-03_tromso_stromsgodset_second.csv'] #...
74,447
def should_preserve(dir_name): """ Should the directory be preserved? :returns: True if the directory contains a file named '.preserve'; False otherwise """ preserve_path = os.path.join(dir_name, PRESERVE_FILE) if os.path.isdir(dir_name) and os.path.exists(preserve_path): ...
74,448
def do_upgrade(env, ver, db_backend, db): """ Add 'page_version' column to testcaseinplan table """ cursor = db.cursor() realm = 'testcaseinplan' cursor.execute("CREATE TEMPORARY TABLE %(realm)s_old AS SELECT * FROM %(realm)s" % {'realm': realm}) cursor.execute("DROP TABLE %(realm)s" % ...
74,449
def test_interactive_chooser_gives_correct_licenses(): """ Test that the chooser gives us the right licenses. Some of these may need to be updated as we release new version numbers! """ def _check_license_url_against_parameters(parameters, expected_url): """ See if the license's ur...
74,450
def prepare_bed_file(bed_file, output, ouf=False, save_rejected=None, only_chrom=None): """Return gene: exons dict.""" new_lines = [] rejected = [] names = Counter() # we need to make sure that all names are unique f = open(bed_file, "r") for num, line in enumerate(f, 1): line_data = l...
74,451
def handle_optional_login(func): """ Doesn't show error if no user logged in """ def handle(*args): user_g = users.get_current_user() if user_g: curr_user = user(email=user_g.email()) else: curr_user = None return func(*args, curr_user=curr_user) return handle
74,452
def charPresent(s, chars): """charpresent(s, chars) - returns 1 if ANY of the characters present in the string chars is found in the string s. If none are found, 0 is returned.""" for c in chars: if str.find(s, c) != -1: return True return False
74,453
def get_dimensions(model_dict): """Extract the dimensions of the model. Args: model_dict (dict): The model specification. See: :ref:`model_specs` Returns: dict: Dimensional information like n_states, n_periods, n_controls, n_mixtures. See :ref:`dimensions`. """ all_n_p...
74,454
def do_osd_remove(cs, args): """Removes an osd by id.""" osd = _find_osd(cs, args.osd) try: cs.osds.remove(osd) print("Succeed to remove osd named %s." % osd.osd_name) except: raise exceptions.CommandError("Failed to remove osd.")
74,455
def assign_rank(subs, rank, tree, rankdic, root=None, above=False, major=None, ambig=False): """Assign query to a fixed rank in a classification system. Parameters ---------- subs : set of str Subjects. rank : str Target rank. tree : dict Hierarchical cla...
74,456
def parse_rating(line): """ Parses a recommendation. Format: userId\tgender\tage\toccupation\tavg_rating\trmse\tlabels Parameters ---------- line : str The line that contains user information Returns ------- list : list A list containing gender, age, labels """ ...
74,457
def enterfn(fname, call=None): """ Start a new call of the given function type :param fname: Function name. All instances of the same function should execute the exact same sequence of instructions :param call: Call name. Should be globally unique (autogenerated if not given) :return: Call name ...
74,458
def receive_transcriptions(responses, transcript_q): """Iterates through STT server responses. First sends them to whatever GUI we are using (ASG, send over a socket). Then, if the request is a "final request", parse for wake words and commands The responses passed is a generator that will block until...
74,459
def compositeTextures(outTexPath : str, shipPath : str, textures : Dict[int, str], disabledLayers: List[int]): """Combine a list of textures into a single image, with respect to masks provided in shipPath. :param str outTexPath: Path to which the resulting texture should be saved, including file name and exten...
74,460
def delete_plugin(name): """ Delete all the versions of a plugin by name. Returns: None Raises: 404 - NotFoundError 500 - ChaliceViewError """ try: name = urllib.parse.unquote(name) print(f"Deleting plugin '{name}' and all its versions") plugi...
74,461
def err_ratio(cases): """calculate error ratio Args: cases: ([case,]) all cases in all parts Return: float """ return 1 - len(list(filter(lambda x: x['valid'], cases))) / len(cases)
74,462
def _ProcessPhaseCond(cond, alias, phase_alias, _snapshot_mode): """Convert gate:<phase_name> to SQL.""" op = cond.op if cond.op == ast_pb2.QueryOp.NE: op = ast_pb2.QueryOp.EQ elif cond.op == ast_pb2.QueryOp.NOT_TEXT_HAS: op = ast_pb2.QueryOp.TEXT_HAS cond_str, cond_args = _Compare( phase_alia...
74,463
def test_execute_success( mock_popen: MockerFixture, mock_command_checker: MockerFixture ) -> None: """It returns success messages.""" mock_command_checker.return_value = "" responses = poetry.PoetryUseCase().execute([REPO, REPO2], "poetry", ("version",)) assert len(responses) == 2 assert isin...
74,464
def get_feed_times_until_mount(pet_name: str, food_name: str) -> Union[int, NoReturn]: """ Return how often a pet needs to be fed until it turns into a mount. :param pet_name: the pet to be fed :param food_name: the food to give the pet :return: times to feed, or exit if feeding this pet is not pos...
74,465
def config_valid(loaded_config): """ Test if the given dictionary contains valid values for the r0_to_dl3 processing. Not all combinations are sensible! Parameters: ----------- loaded_config: dict Dictionary with the values in the config file Returns: -------- True if ...
74,466
def create_keymaps(raw_keymaps): """Create `Keymap` object from `raw_keymaps`.""" keymap_objs = [] for raw_keymap in raw_keymaps: try: keymap_obj = KeymapCreater.create(raw_keymap) keymap_objs.append(keymap_obj) except exception.InvalidKeymapException as e: ...
74,467
def atomic_sub(a: array[Any], i: int32, j: int32, k: int32, value: Any): """ Atomically subtract ``value`` onto the array at location given by indices. """ ...
74,468
def get_param_cols(columns): """ Get the columns that were provided in the file and return that list so we don't try to query non-existent cols Args: columns: The columns in the header of the provided file Returns: A dict containing all the FPDS query columns that the provi...
74,469
def depluralize(word): """Return the depluralized version of the word, along with a status flag. Parameters ---------- word : str The word which is to be depluralized. Returns ------- str The original word, if it is detected to be non-plural, or the depluralized ve...
74,470
def generate_text(n: int, **kwargs) -> List[str]: """ :param n: number of words :return: """ words = [generate_word(**kwargs) for _ in range(n)] return words
74,471
def share_with_org(project_ids, org, access_level, suppress_email_notification=False): """ Shares one or more DNAnexus projects with an organization. It appears that DNAnexus requires for the user that wants to share the org to first have ADMINISTER access on the project. Only then could he share the p...
74,472
def do_process_user_file_chunks(count, error_handler, skip_count, participant): """ Run through the files to process, pull their data, put it into s3 bins. Run the file through the appropriate logic path based on file type. If a file is empty put its ftp object to the empty_files_list, we can't de...
74,473
def TInt_GetInRng(*args): """ TInt_GetInRng(int const & Val, int const & Mn, int const & Mx) -> int Parameters: Val: int const & Mn: int const & Mx: int const & """ return _snap.TInt_GetInRng(*args)
74,474
async def room_data(room_id: int, redis: Redis = Depends(get_redis)): """Get the current state of the room. The clients maintain their own state, which _should_ each be accurate, but as not all clients may join before one of the clients start making changes to the room's state. """ return get_r...
74,475
def get_reference_model(model, endog, exog): """ Build an `UnobservedComponents` model using as reference the input `model`. We need an exactly similar object as `model` but instantiated with different `endog` and `exog`. Args ---- model: `UnobservedComponents`. Template model t...
74,476
def remove_suffix_ness(word): """ :param word: str of word to remove suffix from. :return: str of word with suffix removed & spelling adjusted. This function takes in a word and returns the base word with `ness` removed. """ # print(word[:-4]) word = word[:-4] if word[-1] == "i": ...
74,477
def _get_network_address(ip, mask=24): """ Return address of the IPv4 network for single IPv4 address with given mask. """ ip = ipaddress.ip_address(ip) return ipaddress.ip_network( '{}/{}'.format( ipaddress.ip_address(int(ip) & (2**32 - 1) << (32 - mask)), mask ...
74,478
def replaceSimpleSetter(lines, row, colStart, colEnd, newName): """Replace a call to a simple setter function with a reference to a property, e.g. foo.setBar(baz) -> foo.bar = baz The function identifier being replaced must be on line `row' and between `colStart' and `colEnd'. The opening parenthesis must follow ...
74,479
def check_exceptions(func: Union[Function, Callable[..., Any]]) -> None: """Checks all exceptions for the `Function` `func`. Args: func (Function): The Functions, whose exceptions raises are to be checked. """ with pytest.raises(TypeError) as excinfo: func(str_1=2) asser...
74,480
def happy_birthday(name, age:hug.types.number): """Says happy birthday to a user""" return "Happy {age} Birthday {name}!".format(**locals())
74,481
def get_admin_ids(bot, chat_id): """ Returns a list of admin IDs for a given chat. Results are cached for 1 hour. Private chats and groups with all_members_are_administrator flag are handled as empty admin list """ chat = bot.getChat(chat_id) if chat.type == "private" or chat.all_members_are_adm...
74,482
def nginx_log_monitor_loop(nginx_process: subprocess.Popen): """An endless loop to monitor nginx logs. Meant to be spawned as a greenlet. Will run every minute and if needed will dump the nginx logs and roll them if needed. Args: nginx_process (subprocess.Popen): the nginx process. Will send signal...
74,483
def downloadfiles(service: Any, dowid: str, name: str, dfilespath: str) -> None: """Download a file's content.""" request = service.files().get_media(fileId=dowid) fh = io.BytesIO() downloader = MediaIoBaseDownload(fh, request) done = False while done is False: status, done = downloader....
74,484
def multiply_conj(x, y): """Return x * conj(y) in complex form.""" x_real, x_imag = unpack(x) y_real, y_imag = unpack(y) yconj_real = y_real yconj_imag = -y_imag return torch.stack( [ x_real * yconj_real - x_imag * yconj_imag, x_imag * yconj_real + x_real * yconj_...
74,485
def read_results_file(filename): """ For n=3 with automatic interval selection, reads in the results file to get C Args: filename: location of results file Returns: C: list form of the second column of the result copy number profile """ with open(filename) as f: lines = ...
74,486
def find_data_paths(parent_group: h5py.Group, data_name: str, first_only: bool = False) -> List[str]: """ Returns list of data_paths to data with 'data_name'. If first_only is True, then will return the first found matching data_path as a string Args: parent_group (): Group to look for data in ...
74,487
def initial_models(petab_problem_yaml) -> List[Model]: """Models that can be used to initialize a search.""" initial_model_1 = Model( model_id='myModel1', petab_yaml=petab_problem_yaml, parameters={ 'k1': 0, 'k2': 0, 'k3': 0, }, criteri...
74,488
def log10(column): """ Computes the logarithm of the given value in base 10 """ return _with_expr(exprs.Log10, column)
74,489
def get_data_query( id: str = Query(..., title="Observatory code"), starttime: UTCDateTime = Query( None, title="Start Time", description="Time of first requested data. Default is start of current UTC day.", ), endtime: UTCDateTime = Query( None, title="End Time",...
74,490
def flow_schema(dps): """Return schema used in config flow.""" return { vol.Required(CONF_OPTIONS): str, vol.Optional(CONF_OPTIONS_FRIENDLY): str, }
74,491
def local_scheme(version): """Generate a PEP440 compatible version if PEP440_VERSION is enabled""" import os import setuptools_scm.version # only present during setup time return ( "" if "PEP440_VERSION" in os.environ else setuptools_scm.version.get_local_node_and_date(version...
74,492
def test_substancespecification_6(base_settings): """No. 6 tests collection for SubstanceSpecification. Test File: substancenucleicacid-example.json """ filename = base_settings["unittest_data_dir"] / "substancenucleicacid-example.json" inst = substancespecification.SubstanceSpecification.parse_file...
74,493
def dirname(path): """ Returns the directory in which a shapefile exists. """ # GitPython can't handle paths starting with "./". if path.startswith('./'): path = path[2:] if os.path.isdir(path): return path else: return os.path.dirname(path)
74,494
def serial_ports() -> List[str]: """List serial port names.""" if sys.platform.startswith("win"): ports = ["COM%s" % (i + 1) for i in range(256)] elif sys.platform.startswith("linux") or sys.platform.startswith("cygwin"): # this excludes your current terminal "/dev/tty" ports = glob....
74,495
def RFK2(X, Z): """This function computes RF kernel for two-layer ReLU neural networks via an analytic formula. Input: X: d times n_1 matrix, where d is the feature dimension and n_i are # obs. Z: d times n_2 matrix, where d is the feature dimension and n_i are # obs. output: C: The kernel matrix of size n_1 t...
74,496
def monkey_patch_praw_objs(reddit_url: str): """ monkeypatch praw models for better logging """ Submission.__rich_repr__ = generate_submission_rich_repr(reddit_url) Submission.__str__ = rich_to_str Comment.__rich_repr__ = comment_rich_repr Comment.__str__ = rich_to_str
74,497
def num_tiles_not_in_position(state): """ Calculates and returns the number of tiles which are not in their final positions. """ n = len(state) total = 0 for row in state: for tile in row: try: y = int(math.floor(float(tile)/n - (float(1)/n))) ...
74,498
def data_quality_item_html(item, caption=None, export_name='item'): """Create the HTML for a data quality item. The generated html looks as follows. <figure class="data-quality-item" data-export-name="... your export name here ..."> {... your data item content here ...} <figcaption> ...
74,499