content stringlengths 42 6.51k |
|---|
def convert_bw(black_white, sepia):
""" 5. black-white or sepia """
if black_white == 1:
command = "-colorspace Gray"
elif black_white == 2:
command = "-sepia-tone " + str(int(sepia)) + "%"
else:
command = ""
return command |
def Xor(a, b):
"""Return a ^ b as a byte string where a and b are byte strings."""
# pad shorter byte string with zeros to make length equal
return bytes(bytearray([x ^ y for (x, y) in zip(bytearray(a), bytearray(b))])) |
def any_fulfill(collection, condition):
"""checks if any element of collection returns true for condition """
a = False
index = 0
while not a and index < len(collection):
a = condition(collection[index])
index += 1
return a |
def unwrap(string):
"""Changes string to array."""
return [c for c in string] |
def obtain_valid_object(obj_class, **kwargs):
"""
Try to obtain a valid instance of obj_class, using those args of kwargs that
can be given to its __init__ function.
"""
try:
obj = obj_class(**kwargs)
except TypeError:
obj = obj_class()
args_okay = {}
for arg in k... |
def _on_load_callback(n_clicks, **kwargs):
"""
This gets triggered on load; we use it to fix loading screen
"""
return "loading-non-main", False |
def set2seq(ms) :
"""
bijection from sets to sequences
"""
rs=[]
s=0
for m in ms :
rs.append(m-s)
s=m+1
return rs |
def is_pubspec(path_or_view):
"""Returns `True` if @path_or_view is 'pubspec.yaml'.
"""
try:
if path_or_view.file_name() is None:
return
return path_or_view.file_name().endswith('pubspec.yaml')
except AttributeError:
return path_or_view.endswith('pubspec.yaml') |
def replace_variable(target, variable_arg, params_dict_arg):
"""function to enable resolving the pointer variables"""
if '{{%s}}' % variable_arg == params_dict_arg[variable_arg]:
exit(4)
else:
output = target.replace('{{%s}}' % variable_arg, params_dict_arg[variable_arg])
return output |
def join_path(path1, path2):
"""Join two paths, assuming that they share an end.
A path is a list of nodes.
"""
if path1[-1] == path2[0]:
return path1 + path2[1:]
elif path2[-1] == path1[0]:
return path2 + path1[1:]
elif path1[-1] == path2[-1]:
return path1 + path2[1::-1]... |
def get_device_type(device_type=0):
"""Return the device type from a device_type list."""
device_types = {
0: "Unknown",
1: "Classic - BR/EDR devices",
2: "Low Energy - LE-only",
3: "Dual Mode - BR/EDR/LE",
}
if device_type in [1, 2, 3]:
return_value = device_type... |
def safe_issubclass(cls, classinfo) -> bool:
"""Check if the input type is a subclass of the given class.
Args:
cls (type): input type.
classinfo (type): parent class.
Returns:
bool: True if the input type is a subclass of the given class
"""
try:
r = issubclass(cls... |
def bestandslezer(bestandsnaam):
"""
:param bestandsnaam: Dit is het excelbestand waarin de 100 sequenties
stonden
:return: een lijst met alle headers en een lijst met alle sequenties
"""
bestand = open(bestandsnaam)
headers = []
sequenties = []
for line in bestand:
lines = l... |
def should_preserve_falsy_metadata_value(value):
"""There are falsy values we want to keep as metadata."""
# pylint:disable=g-explicit-bool-comparison, singleton-comparison
return value in (0, 0.0, False)
# pylint:enable=g-explicit-bool-comparison, singleton-comparison |
def _get_lists(latest_list, handled_list):
"""Keeps track of clients which have had their bootdev reset to 'default'
inputs:
latest_list: (list) List of ip addresses from the latest cobbler status
returns: those client ip addreses that are newly found in new_list, and the
cumulative list of ... |
def count_letter(content, letter):
"""Counts the number of times `letter` appears in `content`.
Args:
content (str): The string to search.
letter (str): The letter to search for.
Returns:
int
"""
if (not isinstance(letter, str)) or len(letter) != 1:
raise ValueError('`let... |
def get_value_of_agent_in_alloc(value_of_the_whole_items: dict, amount_of_the_items: dict) -> float:
"""
>>> get_value_of_agent_in_alloc({'x':1, 'y':2, 'z':3},{'x':0.5, 'y':0.5, 'z':0.5})
3.0
>>> get_value_of_agent_in_alloc({'x':1, 'y':2, 'z':3, 'p':9},{'x':0.1, 'y':0.5, 'z':0.8, 'p':0.7})
9.8
"... |
def merge_count(A, B):
"""
Merges two lists, counting how many inversions there are and returning both
the count and the merged list. Necessary for Count Sort
"""
S = []
c = 0
while (len(A) > 0) or (len(B) > 0):
# When one of them is len 0, just keep appending the one that is n... |
def f(x):
""" int -> int """
#y : int
y = 1
#a : int
a = x + 1
return y |
def missing_global(name):
"""
Determina si la variable existe de forma global.
"""
return name not in globals() |
def size_str_to_num(s):
"""
parses 'maxsize' input
"""
suffix_one = {'M':10**6, 'G':10**9}
suffix_two = { x + 'B': suffix_one[x] for x in suffix_one.keys()}
if s[-1] in suffix_one:
txtnum = s[0:-1]
pwr = suffix_one[s[-1]]
elif s[-2:] in suffix_two:
txtnum = ... |
def parse(words):
"""Split a list of words into a list of commands"""
sep = ','
commands = []
while sep in words:
index = words.index(sep)
commands.append(words[:index])
del words[:index + 1]
if words:
commands.append(words)
return commands |
def process_port_ref_shorthand(port, port_key='port'):
"""Parse shorthand form of port reference into a dictionary"""
if type(port) is str:
parts = port.split('/')
port = {
'short_name': port,
'component': parts[0],
port_key: parts[1]
}
else:
... |
def url_to_name(url):
"""Take a LinkedIn profile url and return the name id
Parameters
----------
url : str
LinkedIn profile url
"""
return url.strip('/').split('/')[-1] |
def _format_name(name):
"""Parse name string into dictionary.
Parameters
----------
name : str
Returns
-------
parsed name : dict
"""
name_dict = {"base": "", "sups": "", "subs": "", "power": "", "d": "", "units": ""}
if "**" in name:
parsename, power = name.split("**"... |
def parse_gerber_number(strnumber, int_digits, frac_digits, zeros):
"""
Parse a single number of Gerber coordinates.
:param strnumber: String containing a number in decimal digits
from a coordinate data block, possibly with a leading sign.
:type strnumber: str
:param int_digits: Number of digit... |
def dict_get(inp,*subfields):
"""Find the value of the provided sequence of keys in the dictionary, if available.
Retrieve the value of the dictionary in a sequence of keys if it is available.
Otherwise it provides as default value the last item of the sequence ``subfields``.
Args:
inp (dict): ... |
def stringToHex (s):
"""Convert the given string to a hexadecimal version of itself,
since the seed passed to totp() needs it in this form."""
return ''.join("{:02x}".format(ord(c)) for c in s) |
def contains_ordered(lst, order):
"""
Checks if `order` sequence exists in `lst` in the defined order.
"""
prev_idx = -1
try:
for item in order:
idx = lst.index(item)
if idx <= prev_idx:
return False
prev_idx = idx
except ValueError:
... |
def get_conjunctions(tokens):
"""Identify, color and count conjunctions that connect to main clauses"""
# identify conjunctions
conj = [t for t in tokens if t.lemma in ['und','aber','sondern','denn','oder','doch', 'sowie'] and \
t.full_pos == 'KON' and t.function == 'kon' and
len(... |
def get_app_name(module: str) -> str:
"""Given the value of ``__module__`` dunder attr, return the
name of the top level module i.e. the app name.
Example::
>>get_app_name('MyApp.urls.resolvers')
'MyApp'
"""
return module.split(".")[0] |
def format_bytes(size):
"""
Convert bytes to human-readable units
Taken from: https://stackoverflow.com/a/49361727
...
Arguments
---------
size : int
File size
Returns
-------
fsize : int
Formatted file size
unit : str
Unit in whi... |
def warning(sisaPeringatan, userGuessed, duplicateGuess, display):
"""
Fungsi ini ditujukan untuk
operasi warning (peringatan)
"""
sisaPeringatan += 1
if not userGuessed.isalpha():
print("Simbol ini tidak diperbolehkan. Kamu kena Peringatan!!" + display)
elif userGuessed in duplicat... |
def drop_prefix(prefix, text):
"""drop prefix from text if it exists.
Args:
prefix: the prefix to drop.
text: the full string.
"""
if text.startswith(prefix):
return text[len(prefix):]
return text |
def is_non_negative(input_dict):
"""Check if the input dictionary values are non negative.
Args:
input_dict (dict): dictionary.
Returns:
bool: boolean variable indicating whether dict values are non negative or not.
"""
return all(value >= 0 for value in input_dict.values()) |
def _make_row_data_frame(term, col):
"""Make row data
Make new vocabulary for DataFrame format at term.
:param term:
:type term: strstr
:param col:
:type col: integer
:rtype: list
"""
if col == 11:
row = [
term,
term,
None,
N... |
def walk_json_field_safe(obj, *fields):
""" for example a=[{"a": {"b": 2}}]
walk_json_field_safe(a, 0, "a", "b") will get 2
walk_json_field_safe(a, 0, "not_exist") will get None
"""
try:
for f in fields:
obj = obj[f]
return obj
except:
return None |
def get_token_path(token_name):
"""
Format the token name into a token path.
Returns:
The token path
"""
return "tokens.{}".format(token_name) |
def parse_member_info(member):
"""Parse out the components of an IAM policy binding member.
Args:
member (str): An IAM policy member, of the format
"{membertype}:{email address}".
Returns:
str: The member type.
str: The name portion of the member.
str: The domai... |
def parse_word_not(text):
"""Type converter for "not " (followed by one/more spaces)."""
return text.strip() == 'not' |
def hex_dump(string):
"""Dumps data as hexstrings"""
return ' '.join(["%0.2X" % ord(x) for x in string]) |
def unique(s):
"""Implement an algorithm to determine if a string has all unique characters."""
# O(n) time, O(n) space
explored = set()
for char in s:
if char in explored:
return False
explored.add(char)
return True |
def nonspecific(rna_id, sequence, min_length, max_length):
"""
Compute all the fragment sequences in case of nonspecific cleavage, based on the info selected by the user
on minimum and maximum length for the sequences generated from nonspecific cleavage
"""
output_sequences, seq_list = [], list(sequ... |
def combine(batch):
"""
>>> combine(['ls -l', 'echo foo'])
'set -x; ( ls -l; ) && ( echo foo; )'
"""
return 'set -x; ' + (' && '.join(
'( %s; )' % (cmd,)
for cmd in batch
)) |
def get_tally_mode(data):
"""
get tally mode: 0 = off, 4 = dark, 5 = bright
"""
data = data.hex()
return int(data[5]) |
def _title(profile):
"""Process a title of a fig."""
if profile['operation'] == 'differential':
p1, p2 = profile['profiles']
return 'differential ({}, {})'.format(_title(p1), _title(p2))
elif profile['operation'] == 'local feature':
p = profile['profile']
return 'local featur... |
def parse_console_interface(console_interface):
"""
parse console interface
Foramt:
line_number.baud.flow_control_option
Example:
27.9600.0
"""
fields = console_interface.split('.')
return fields[0], fields[1], fields[2] |
def clean_dict_values(d: dict, rogue_values: list) -> dict:
"""
OUT OF PLACE bad value removal
"""
return {key: value for key, value in d.items() if not value in rogue_values} |
def html_horizontal(closing_tag=True):
"""
Get HTML horizontal divider.
:param closing_tag: If a closing tag should be added.
:type closing_tag: Optional[bool]
:return: The HTML tag (the divider).
:rtype: str
"""
if closing_tag:
return "<hr></hr>"
return "<hr>" |
def do_truncatewords(s, length=15, end='...'):
"""
Truncates a string after a certain number of words. Takes an optional
argument of what should be used to notify that the string has been
truncated, defaulting to ellipsis (...)
Newlines in the string will be stripped.
https://github.com/Shopify/... |
def _dump_scan_to_string(run_lengthed_lists):
"""Dump the whole scan into a 'binary' string."""
scan_string = ''
for run_length in run_lengthed_lists:
for mag, literal in run_length:
scan_string += mag + literal
return scan_string |
def check_extra_coords_names(coordinates, extra_coords_names):
"""
Check extra_coords_names against coordinates.
Also, convert ``extra_coords_names`` to a tuple if it's a single string.
Assume that there are extra coordinates on the ``coordinates`` tuple.
Examples
--------
>>> import nump... |
def build_html_component(html_string, title):
"""
This function builds the html string for a component.
:param html_string: html_string of the component
:param title: Title of the html component
:return: html_string
"""
html = """
<div class="row">
<div class="col-md-12">
... |
def multiple_align(genes, alignment, settings):
""" """
inputs = [genes]
outputs = [alignment]
options = {
'cores': 2,
'memory': '2g',
'account': 'NChain',
'walltime': '02:00:00'
}
spec = '''
source activate prank
prank -d={} -o={} {}
'''.format(gene... |
def dice_calc(x, y):
"""calculates dice coefficients 2 lists of mutated gene names (x, y)"""
x_and_y = [gene for gene in x if gene in y]
if len(x) <= 0 or len(y) <=0:
return -1
dice_value = (2.0 * len(x_and_y)) / (len(x) + len(y))
return dice_value |
def to_pt(value, units, dpi=96):
"""
convert length from given units to pt
Arguments
---------
value : float
length in measurement units
units : str
unit type (e.g. "pt", "px", "in", "cm", "mm")
dpi : float / int
dots per inch (conversion between inches and px)
... |
def RGBDimtoRGB(R, G, B, Dim):
""" convert RGBDim to RGB color
:warning: When Dim is 0, no more color component information encoded
:warning: Prefer RGBDimtoHSV function
:param R: red value (0;255)
:param G: green value (0;255)
:param B: blue value (0;255)
:param Dim: brightness value (0.0;1... |
def island_counter(islands):
"""
Iterates through a 2D matrix to find all islands of connecting 1s
"""
if len(islands) <= 0:
return 0
if type(islands) is not list or type(islands[0]) is not list:
return None
visited = set()
total_islands = 0
def check_for_island(x, y):
... |
def psub(text):
"""
Wraps some text in an annoying <p class="sub"> tag.
"""
return '<p class="sub">%s</p>' % text |
def validate_ECG_image_timestamp(in_dict):
"""Validates the inputs of the incoming dictionary
This function receives a dictionary as input. Within this
dictionary are a patient's medical record number as well
as a specific timestamp for that patient. This function
checks to ensure that the medical ... |
def bytes_replace(byte_str, start_idx, stop_idx, replacement):
"""
Replaces given portion of the byte string with the replacement, returns new array
:param bytes:
:param start_idx:
:param stop_idx:
:param replacement:
:return:
"""
return byte_str[:start_idx] + replacement + byte_str[... |
def clean_collect_field(collect_field):
"""
WTF python escaping!?
>>> clean_collect_field('foo\\\\bar')
'foo\\\\\\\\bar'
>>> clean_collect_field("foo'bar")
"foo\\\\\'bar"
"""
return collect_field.replace('\\', '\\\\').replace("'", "\\'") |
def split_verses(verses):
""" With a string of multiple verses, split on verses
>>> split_verses("[1] Verse1 [2] Verse2")
["Verse1", "Verse2"]
"""
import re
verses_list = re.split("\[\d+\]", verses)
verses_list = [verse.strip() for verse in verses_list if verse.strip()]
retur... |
def app_folders(proj_name):
"""Create a list with the project folder tree
Args:
proj_name (str): the name of the project, where the code will be hosted
Returns:
folder_list (list): list containing the main folder tree
"""
folders_list = [
f"{proj_name}",
f"{proj_name... |
def merge_dictionaries_deep(a: dict, b: dict, path=None):
"""merges b into a"""
if path is None:
path = []
for key in b:
if key in a:
if isinstance(a[key], dict) and isinstance(b[key], dict):
merge_dictionaries_deep(a[key], b[key], path + [str(key)])
e... |
def two_plus_oval(rule_obj):
"""
For a rule object, check if it has two or more OVALs.
"""
rule_id = rule_obj['id']
check = len(rule_obj['ovals']) >= 2
if check:
return "\trule_id:%s has two or more OVALs: %s" % (rule_id, ','.join(rule_obj['ovals'])) |
def sql_safe_string(string):
"""Process a string and strip non-safe chars from it for SQL."""
safe_chars = [32, ] # space
[safe_chars.append(i) for i in range(48, 58)] # 0 to 9
[safe_chars.append(i) for i in range(65, 91)] # A to Z
[safe_chars.append(i) for i in range(97, 122)] # a to z
if ... |
def reverse_deal_into_new_stack(nb_cards, position):
"""Same as single_deal_into_new_stack."""
return (-position - 1) % nb_cards |
def isArray(v, N=None):
"""Check if v is an array or a vector, with optional size.
Examples
--------
>>> import pygimli as pg
>>> print(pg.isArray([0, 1]))
True
>>> print(pg.isArray(np.array(5)))
True
>>> print(pg.isArray(pg.Vector(5)))
True
>>> print(pg.isArray(pg.Vector(5)... |
def _hemi_direction(hemisphere):
"""Return `1` for 'north' and `-1` for 'south'"""
return {'north': 1, 'south': -1}[hemisphere] |
def _fconvert(value):
"""
Convert one tile from a number to a pentomino character
"""
return {523: 'U', 39: 'N', 15: 'F', 135: 'W', 23: 'P', 267: 'L',
139: 'Z', 77: 'T', 85: 'Y', 43: 'V', 33033: 'I', 29: 'X'}[value] |
def pair_imagenames(url_band_1, url_band_2):
"""
This function makes sure that the images resulting from searching the data catalog
correspond to the same date and picture.
"""
matched_images = {}
for url_info in url_band_1:
imageinfo = url_info.split("/")[-2]
if imageinfo not in... |
def resolve_table_name(dataset_connection_info):
"""
In Snowflake, the namespace (database and schema) is inferred from the current database (or catalog in DSS terms) and schema in use for the session.
We only qualify the table name with the Dataset catalog and schema if explicitly defined. Otherwise, Snowf... |
def loc_to_jsonpointer(lst) -> str:
"""Convert a list of string keys and int indices to a JSON Pointer string."""
return "/" + "/".join(map(str, lst)) |
def ShortHash(rc, stdout, stderr):
"""Stores the shortened hash from stdout into the property pkg_buildnum."""
# Now that we're using git and our patchlevel is not unique (we're using
# just the date) we add the short hash as the build #.
short = "0x" + stdout[:7]
return {'pkg_buildnum': short} |
def find_all_indexes(text, pattern, indexes=None, index=0, iterator=0):
"""Return a list of starting indexes of all occurrences of pattern in text,
or an empty list if not found.
Runtime, worst case: O(n), n is len(text)
Runtime, best case: O(1), if text == ''
Space Complexity: O(n), appending to in... |
def clean_int_value_from_dict_object(dict_object, dict_name, dict_key, post_errors, none_allowed=False, no_key_allowed=False):
"""
This function takes a target dictionary and returns the integer value given by the given key.
Returns None if key if not found and appends any error messages to the post_errors ... |
def binary_cubic_coefficients_from_invariants(discriminant, invariant_choice='default'):
"""
Reconstruct a binary cubic from the value of its discriminant.
INPUT:
- ``discriminant`` -- The value of the discriminant of the
binary cubic.
- ``invariant_choice`` -- The type of invariants provid... |
def point2str ( pnt ):
""" point2str( pnt )
format a 3d data point (list of 3 floating values) for output to a .scad file.
Also used to do equality comparison between data points.
@param pnt - list containing the x,y,z data point coordinates
@returns '[{x}, {y}, {z}]' with coordinate values forma... |
def score_vs30_delta(
vs30_delta_value, vs30_delta_min_acceptable=0, vs30_delta_max_acceptable=600
):
"""
:param vs30_delta_value: vs30 value to be scored
:param vs30_delta_min_acceptable: minimum vs30 value in the scoring range (saturates at 0)
:param vs30_delta_max_acceptable: maximum vs30 value i... |
def read_until(string, untilseq=""):
"""
Read until you find sequence.
@param string str: string you are reading.
@param untilseq: sequence to stop when it's next to read.
"""
idx = string.index(untilseq)
return string[:idx] |
def AnalyzeScanResults(input_api, whitelisted_files, offending_files):
"""Compares whitelist contents with the results of file scanning.
input_api: InputAPI of presubmit scripts.
whitelisted_files: Whitelisted files list.
offending_files: Files that contain 3rd party code.
Returns:
A triplet of "unk... |
def horizontal_speed(distance, seconds):
"""compute integer speed for a distance traveled in some number of seconds"""
return(int(3600.0 * distance / seconds)) |
def none_str(value, none_value=""):
"""Turn value into a string, special case None to empty string."""
if value is None:
return none_value
else:
return str(value) |
def create_node_string(nodes, node_prefix, node_pad):
"""'30-40, 80-90'"""
node_string = ""
for nodepair in nodes.split(","):
split = nodepair.split("-")
start = int(split[0])
end = int(split[1]) + 1
for node_num in range(start, end):
node_string += node_prefix + ... |
def header_exists(header_name, headers):
"""Check that a header is present."""
return header_name.lower() in (k.lower() for (k, _) in headers) |
def split_naf_header_attrs(attrs):
"""Split input attributes in public or fileDesc attributes
Parameters
----------
attrs : dict
dictionary of public/fileDesc attributes
Returns
-------
a tuple of attribute dictionaries for fileDesc and public
Raises
------
KeyError: i... |
def _generate_barcode_ids(info_iter):
"""Create unique barcode IDs assigned to sequences
"""
bc_type = "SampleSheet"
barcodes = list(set([x[-1] for x in info_iter]))
barcodes.sort()
barcode_ids = {}
for i, bc in enumerate(barcodes):
barcode_ids[bc] = (bc_type, i+1)
return barcode... |
def CourantNumber(CFL, Dimension):
"""Return the Courant Number.(this function needs modification)."""
if Dimension.upper() == '1D':
convX = CFL # convection coefficient for the x-term.
print('Calculating coefficient in the convective equation: Completed.')
return convX
elif... |
def cards_value(cards):
""" assign values to cards, aces default to 11
:param cards: cards (rank, suit)
:return: total value of all cards
"""
card_value = 0
aces = 0
for card in cards:
if card[0] in ['J', 'Q', 'K']:
card_value += 10
elif card[0:2] == '10':
... |
def _string_key_to_int(param):
"""For a given dictionary, convert all strings that represent a number into an int."""
new_dict = {}
if isinstance(param, list):
return [_string_key_to_int(element) for element in param]
elif isinstance(param, dict):
for key, value in param.items():
... |
def is_shape(obj, ndim=None):
"""Check if an object is a shape, i.e., a n-dimension (n positive) tuple with positive values.
Parameters
----------
obj : tuple
The object to be checked if it is a shape.
ndim : int, optional
The expected number of dimensions. Default value is None.
... |
def bbox_clip(x1, y1, x2, y2, boundary, min_sz=10):
"""boundary (H,W)"""
x1_new = max(0, min(x1, boundary[1] - min_sz))
y1_new = max(0, min(y1, boundary[0] - min_sz))
x2_new = max(min_sz, min(x2, boundary[1]))
y2_new = max(min_sz, min(y2, boundary[0]))
return x1_new, y1_new, x2_new, y2_new |
def world_to_index(x, y, origin, resolution, width):
""" Convert World coordinates to index """
x = (x - origin[0]) / resolution
y = (y - origin[1]) / resolution
return y * width + x |
def find_stages(document):
"""
Find **stages** in document.
Args:
document (dict): validated spline document loaded from a yaml file.
Returns:
list: stages as a part of the spline document or an empty list if not given.
>>> find_stages({'pipeline': [{'stage(Prepare)':1}, {'stage(... |
def implies(a: bool, b: bool) -> bool:
"""Implication (IF...THEN)"""
return (not a) or b |
def decorator_parameter_names_are_valid(parameter_names, decorator_kwargs):
"""Returns False if parameter_names are not contained in decorator_kwargs
or if 'return_type' is not contained in decorator_kwargs, True
otherwise."""
if not set(parameter_names) <= set(decorator_kwargs):
return False
... |
def get_bboxes(annotations: list) -> list:
"""Get a list of all bounding boxes in an image."""
return [ann['bbox'] for ann in annotations] |
def add_headers(x, y):
"""
Add new headers.
:param x: a dict with headers for the API
:type x: dict
:param y: a dict with headers for the API
:type y: dict
:return: a dict with headers merged
:rtype: dict
"""
z = x.copy()
z.update(y)
return z |
def patch_cmass_output(lst, index=0):
"""
Parameters
----------
lst : list of tuples
output of afni.CenterMass()
index : int
index in the list of tuples
Returns
-------
tuple
one set of center of mass coordinates
"""
if len(lst) <= index:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.