content stringlengths 42 6.51k |
|---|
def unicode_to_lua(unicode):
"""Produces an escaped decimal encoding of a unicode string."""
decimal = [''] + [str(int(x)) for x in unicode.encode()]
return '\\'.join(decimal) |
def try_multi(method, repeats=5, default_value=None, **kwargs):
"""
Will attempt to call method a number of times, returning the
results if successful.
"""
for i in range(repeats):
try:
return method(**kwargs)
except Exception as e:
pass
return default_val... |
def binarygcd(a, b):
"""
Return the greatest common divisor of 2 integers a and b
by binary gcd algorithm.
"""
if a < b:
a, b = b, a
if b == 0:
return a
a, b = b, a % b
if b == 0:
return a
k = 0
while not a&1 and not b&1:
k += 1
a >>= 1
... |
def binarySearch(key, a):
"""
Binary searching for an integer in a sorted array of integers
Time complexity: O(log(N))
"""
lo = 0
hi = len(a) - 1
while lo <= hi:
# Key is in a[lo..hi] or not present.
mid = lo + (hi - lo) / 2
# One 3-way compare:
if key < a[... |
def nanosec_to_hours(ns):
"""Convert nanoseconds to hours
:param ns: Number of nanoseconds
:type ns: into
:returns: ns/(1000000000.0*60*60)
:rtype: int
"""
return ns / (1000000000.0 * 60 * 60) |
def get_parameter_repr(parameter) -> str:
"""Function to get parameter representation"""
try:
parameter_str = repr(parameter)
# pylint: disable=broad-except
except Exception:
parameter_str = "<unable to get parameter repr>"
return parameter_str |
def page_rank_vector(item):
"""Convert the partitioned data for a word to a
tuple containing the word and the number of occurances.
"""
key, occurances = item
return (key, sum(occurances)) |
def get_output_artifact_location(job):
"""
Returns the expected S3 destination location of the output artifact.
The Lambda function needs to place an output artifact there.
"""
output_artifact = job["data"]["outputArtifacts"][0]
output_location = output_artifact["location"]["s3Location"]
o... |
def encoded(normalized: list) -> str:
"""
The coded message is obtained by reading down the columns going left to right.
:param normalized:
:return:
"""
str_encoded: list = list()
for col in range(len(normalized[0])):
str_row: str = ''
for row in range(len(normalized)):
... |
def replaceNewlines(string, newlineChar):
"""There's probably a way to do this with string functions but I was lazy.
Replace all instances of \r or \n in a string with something else."""
if newlineChar in string:
segments = string.split(newlineChar)
string = ""
for segment in... |
def y_intersection(line_slope, intercept, x_value):
"""
Finds the y value of the line (y = mx + b) at point x and returns the point
This basically solves y = mx + b
:param line_slope: slope of the line (m)
:param intercept: the intercept of the line (b)
:param x_value: the value to be used (sub... |
def rreplace(s, old, new, occurrence):
"""
Function which replaces a string occurence
in a string from the end of the string.
"""
return new.join(s.rsplit(old, occurrence)) |
def remove_item(d: dict, k: str or list):
"""
Remove key, value pair from dictionary.
Python function for removing a (key, value) pair from a dictionary.
One or multiple keys may be provided using either a single string
or a list of strings.
Parameters
----------
d: dict
... |
def hms2deg(_str, delim=':'):
""" Convert hex coordinates into degrees """
if _str[0] == '-':
neg = -1
_str = _str[1:]
else:
neg = 1
_str = _str.split(delim)
return neg * ((((float(_str[-1]) / 60. + float(_str[1])) / 60. + float(_str[0])) / 24. * 360.)) |
def calculate_right_exterior(root, is_exterior):
"""
Build right exterior
"""
if root is None:
return []
if is_exterior:
ls = []
if root.right is not None:
ls.extend(calculate_right_exterior(root.left, False))
ls.extend(calculate_right_exterior(root.r... |
def chunk(buf, data_type=0x16):
"""This function is used to pack data values into a block of data that
make up part of the BLE payload per Bluetooth Core Specifications."""
return bytearray([len(buf) + 1, data_type & 0xFF]) + buf |
def map_diameter(c):
""" Compute the diameter """
return 1. / 3. * float((c + 1) * (c - 1)) |
def string(mat):
""" Convert the Cartesian matrix
"""
if mat is not None:
mat_str = ''
for row in mat:
mat_str += ' '.join('{0:>8.3f}'.format(val) for val in row)
mat_str += '\n'
mat_str.rstrip()
else:
mat_str = ''
return mat_str |
def make_rpc_name(name):
"""
Convert python compatible name to Transmission RPC name.
"""
return name.replace('_', '-') |
def to_geojson_format(services):
"""Convert a services list in a geojson formated dict.
Args:
services (list): Services with a geojson formated 'the_geom' field.
Returns:
dict: Formated like a geojson file.
"""
geojson_dict = {"type": "FeatureCollection",
"featur... |
def read_folds_info(folds_info_file):
"""
Read lines containing 2 sets of comma-separated integers, with sets separated by '|'.
"""
with open(folds_info_file, 'r') as f:
lines = [l[:-1] for l in f.readlines() if '|' in l]
return [dict(
train=[int(n) for n in tr_str.split(',')],
... |
def GetFlagNames(bitmask, bitmask_dict, default_key=None):
"""Returns a list based on bitmask_dict corresponding to set bits in bitmask.
Args:
bitmask: Integer containing a bitmask of desired fields.
bitmask_dict: Dictionary with power-of-two integer keys and values
containing names of the correspo... |
def first_bad_pair(sequence, k):
"""Return the first index of a pair of elements in sequence[]
for indices k-1, k+1, k+2, k+3, ... where the earlier element is
not less than the later element. If no such pair exists, return -1."""
if 0 < k < len(sequence) - 1:
if sequence[k-1] >= sequence[k+1]:
... |
def sort_keyed_tuple_data(keyed_tuple):
"""
keyed_tuple:
(<key>, <data to be sorted (must be a list)>)
"""
key = keyed_tuple[0]
data_list = list(keyed_tuple[1])
data_list.sort() # in-place
return data_list |
def np_function(var1, var2, long_var_name='hi'):
"""This function does nothing.
Parameters
----------
var1 : array_like
This is a type.
var2 : int
This is another var.
Long_variable_name : {'hi', 'ho'}, optional
Choices in brackets, default first when optional.
Retu... |
def van_der_corput(n, base=2):
"""Returns the nth element of the van der Corput sequence with the given
base."""
vdc, denom = 0.0, 1.0
while n:
denom *= base
n, rem = divmod(n, base)
vdc += rem / denom
return vdc |
def get_build_chain(deps, build_root):
"""
Get the full depth list of builds depending from a build node.
"""
build_chain = [build_root]
if build_root in deps:
for dep in deps[build_root]:
build_chain.extend(get_build_chain(deps, dep))
return build_chain |
def flatten_dict(d, *, sep="."):
"""
Flattens nested dicts into dotted names.
"""
def _flatten(items):
for k, v in items:
if isinstance(v, dict):
for kk, vv in _flatten(v.items()):
yield k + sep + kk, vv
else:
yield k, v... |
def max_value(tab):
"""
Brief: computes the max with positiv value
Args:
tab: a liste of numeric value exepcts at least one positive valus, raise expection
Return: the max value
Raises :
ValueError if no positive value is found
"""
if not(isinstance(tab, list)):
rai... |
def _get_adapter_name_and_ip_address(network_adapters, mac_address):
"""Get the adapter name based on the MAC address."""
adapter_name = None
ip_address = None
for network_adapter in network_adapters:
if network_adapter['mac-address'] == mac_address.lower():
adapter_name = network_ad... |
def remove_query_string(url):
"""
Removes query string from a url
:param url: string with a url
:return: clean base url
"""
if not isinstance(url, str):
raise TypeError('Argument must be a string')
return url.split('?')[0] |
def _roundFloatNumber(data, decimal_length) -> float:
"""
Function Description :
_roundFloatNumber : provide float value with n decimal digit number
accept data tobe rounded number and decimal_length as the number of
decimal digit number
EXAMPLE ARGS : (data = 2.43527, decimal... |
def get_number_of_annotations_per_label(annotations, labels):
"""
Gets the number of annotations per label
:param annotations: a list of labelled (annotated) examples
:param labels: a list of labels used when annotated
:return: annotations_count: a dictionary of counts per label
"""
annotati... |
def _get_key_name(fname):
"""An internal function used to determine the type of the current dataset.
'original' - untouched data (not returned by this function)
'seq' - sequencer result
'tsne_10' - TNSE with p=10
'tsne_50' - TNSE with p=50
'tsne_100' - TNSE with p=100
"""
file = str(fna... |
def __step_search(total_cells:int,greatest_common_divisor:int,ncells_per_block:int,denominator:float,direction:str='forward'):
"""Searches for the right step size that leads to block splits with the same greatest common divisor. Same greatest common denominator means you will always have the same multi-grid when yo... |
def cumsum(t):
"""Computes the cumulative sum of the numbers in t.
t: list of numbers
returns: list of numbers
"""
total = 0
res = []
for x in t:
total += x
res.append(total)
return res |
def version2number(s):
"""
Translates a legible NIF version number to the packed-byte numeric representation. For example, "10.0.1.0" is translated to 0x0A000100.
@param s: The version string to translate into numeric form.
@type s: string
@return The resulting numeric version of the given vers... |
def calc_latitude_shift(screen_height: int, percent_hidden: float) -> float:
"""Return the amount to shift latitude per row of screenshots."""
# return -0.000002051 * screen_height * (1 - percent_hidden)
return -0.000002051 * screen_height * (1 - percent_hidden) * 2.1
# return -0.00002051 * screen_heigh... |
def LoadWavSpeakerInfo(info_file):
"""return dict of wav: spk_list"""
info_file = open(info_file, "r", encoding="utf-8")
raw_info = list(map((lambda x: x.split("\t")), (info_file.read()).split("\n")))
wav_spk_info = {}
for mapping in raw_info[1:]:
if len(mapping) < 2:
continue
... |
def collect_number_input(count=1):
"""
This method will collect the number inputs
"""
index = 0
numbers = []
while index < count:
numbers.append(int(input(f'Enter the number {index+1}: ')))
index += 1
return numbers |
def rivers_with_station(stations):
"""Created a sorted list of Rivers with stations on them"""
# Initialise rivers list
rivers = []
# Add river to list from station, if river is not present
for station in stations:
if station.river in rivers:
pass
else:
river... |
def extract_impression_id(line, assert_first_line=False):
"""
Extracts the impression_id from a line
"""
if type(line) == bytes:
line = line.decode()
return line[:line.index("|")].strip() |
def reformat_nse(data):
"""
Reformats the nse data to global standard
:param data: unformatted data
:return: Formatted data
"""
for key,val in data.items():
data[key] = {
"NSE": val
}
return data |
def _prepare_args(xs):
"""Converts `xs` to a list if necessary."""
if isinstance(xs, (list, tuple)):
return xs, True
else:
return [xs], False |
def _startsTheLine(text: str, pos: int) -> bool:
"""Returns True if the line contains only blanks to
the left to the pos"""
prevNewLinePos = text.rfind("\n", 0, pos + 1)
# if this is the first string, we'll get prevNewLinePos=-1.
# But we still can get the followining substring:
lineStart = text[prevNewLinePos +... |
def box_overlap(box1, box2, resolution, padding=0):
"""Incoming format is y1, x1, y2, x2.
Padding is optional, but can improve post-processing.
"""
box1_ymin, box1_xmin, box1_ymax, box1_xmax = box1
box2_ymin, box2_xmin, box2_ymax, box2_xmax = box2
if box1_ymin == resolution[1]:
box1_ymin... |
def create_dates_list(state_dates, dates_string, key, start_capital):
"""
Create a dict used to update x_axis values and string.
:param state_dates: boolean, show or not dates on axis
:param dates_string: list of dates plotted
:param key: string, type of graph
:param start_capital: float
"... |
def ad_hoc_binning(
intensity,
bin_caps=[2, 20],
bin_labels=['low', 'medium', 'high']
):
"""Implements ad-hoc binning (3 bins) for nighttime lights
Parameters
----------
intensity : float
The nighttime light intensity of a single pixel
bin_caps : list
Maximum values per ... |
def split_seq(seq, size):
""" Split up seq in pieces of size """
return [seq[i:i + size] for i in range(0, len(seq), size)] |
def to_base_2(x):
"""x is a positive integer. Returns a list that is x in base 2.
For instance, 22 becomes [1, 0, 1, 1, 0] and 0 becomes []"""
x = int(x)
result = []
while x > 0:
if x % 2:
result.append(1)
else:
result.append(0)
x = x // 2
result.r... |
def read_file(path):
"""Get the contents of a file in a memory-safe way.
:param path: The file to read.
:type path: str
:rtype: str
"""
try:
with open(path, "rb") as f:
content = f.read()
f.close()
return content
except IOError:
return "" |
def convert_time(tm):
"""
Converts a given time to seconds
Time can be presented as just seconds (does nothing)
or of the format HH:MM:SS.MICROSECONDS
"""
seconds=0 #our accumulator
scale=1 #used when converting minutes, hours
micro="0" #add back any microseconds given
tm=str(tm)
if '.' in tm:
tm,micro = tm... |
def md_photo_location_uri(image_uri):
"""The URI of the location where a photo was taken."""
return image_uri+"/location" |
def local_frame_indices(local_first, nlocal, frame_offset, frame_size):
"""Compute frame overlap with local data.
Args:
local_first (int): the first sample of the local data.
nlocal (int): the number of local samples.
frame_offset (int): the first sample of the frame.
frame_size... |
def findconnector(cycle_sets):
"""Determine the index of the connector cycle for a Type-II-like motif, or None if the cycles do not comprise such a motif."""
for connector_c, connector in enumerate(cycle_sets):
other1 = cycle_sets[(connector_c + 1) % 3]
other2 = cycle_sets[(connector_c + 2) % 3]... |
def is_formula(s):
"""Determine if string is a formula."""
return s[0] == '=' if len(s) > 0 else False |
def map_faiss_idx_to_file_and_line(idx, ID_dict):
"""
return the File ID and line number given the faiss returned index
the ID_dict format: key = file ID, value = (start line ID, number of lines in this file)
the start line ID is the accumulated line number in previous files
"""
keys = [... |
def kelvtofar(kelvin):
""" This function converts kelvin to fahrenheit, with kelvin as parameter."""
fahrenheit = (kelvin * 1.8) - 459.67
return fahrenheit |
def line_p(x,p):
"""
Straight line: a + b*x
Parameters
----------
x : float or array_like of floats
independent variable
p : iterable of floats
parameters (`len(p)=2`)
`p[0]` a
`p[1]` b
Returns
-------
float
function value(s)
"""
re... |
def close_time(km,brevet_distance):
"""
input:
km
brevet_distance is one of the standered distances
200,300,400,600,1000 km
output:
Closing time in minutes
"""
## brevet_dict[brevet_distance]=[max_time,min_speed]
brevet_max = { 200:810, 300:1200,400:1620,600:... |
def hashable(a):
"""
Turn some unhashable objects into hashable ones.
"""
if isinstance(a, dict):
return hashable(a.items())
try:
return tuple(map(hashable, a))
except:
return a |
def _p(pp, name):
"""
make prefix-appended name
"""
return '%s_%s'%(pp, name) |
def rgb_to_hex(rgb):
"""
:param rgb : RBG color in tuple of 3
:return : Hex color string
"""
r, g, b = rgb
def clamp(x):
return max(0, min(x, 255))
return "{0:02x}{1:02x}{2:02x}".format(clamp(r), clamp(g), clamp(b)) |
def write_int_ranges(int_values, in_hex=True, sep=' '):
"""From a set or list of ints, generate a string representation that can be
parsed by parse_int_ranges to return the original values (not
order_preserving)."""
if not int_values:
return ''
num_list = []
if type(int_values) is not list:
int_v... |
def get_channel_name_default(channel_id):
"""get default out direct"""
channel_dict = {"0": "console", "1": "monitor", "2": "loghost", "3": "trapbuffer", "4": "logbuffer",
"5": "snmpagent", "6": "channel6", "7": "channel7", "8": "channel8", "9": "channel9"}
channel_name_default = channe... |
def digits(n):
"""
>>> digits(0)
Traceback (most recent call last):
...
ValueError: '0' is not a positive integer
>>> digits(1)
[1]
>>> digits(12)
[1, 2]
>>> digits(333)
[3, 3, 3]
>>> digits(123456)
[1, 2, 3, 4, 5, 6]
"""
if n < 1:
raise ValueErro... |
def is_big_number(st):
"""
a replacement for isnumeric in cases where the number has ',' in it
"""
st = st.replace(" ", '')
st = st.replace(",", '')
return st.isnumeric() |
def get_wildcard_constraints(image_types):
"""Return a wildcard_constraints dict for snakemake to use, containing
all the wildcards that are in the dynamically grabbed inputs
Parameters
----------
image_types : dict
Returns
-------
Dict containing wildcard constraints for all wildc... |
def utf_encode(data):
""" Encode string as UTF-8 """
if isinstance(data, bytes):
return data
try:
encoded = data.encode('utf-8')
return encoded
except ValueError:
return data |
def spinChainProductSum(spins):
"""
Calculate the Ising nearest neighbor interactions of a spin chain, periodic boundary condition(PBC).
Parameters
----------
spins : list of ints or floats
The given spin under PBC.
Returns
float
The nearest neighbor interactions(products).... |
def vec_to_text_line(label, vec):
"""
Output a labeled vector as a line in a fastText-style text format.
"""
cells = [label] + ['%4.4f' % val for val in vec]
return ' '.join(cells) |
def _url_as_filename(url: str) -> str:
"""Return a version of the url optimized for local development.
If the url is a `file://` url, it will return the remaining part
of the url so it can be used as a local file path. For example,
'file:///logs/example.txt' will be converted to
'/logs/example.txt'... |
def sort_by_priority(iterable, reverse=False, default_priority=10):
"""
Return a list or objects sorted by a priority value.
"""
return sorted(iterable, reverse=reverse, key=lambda o: getattr(o, 'priority', default_priority)) |
def evaluate_line(a: float, b: float, x: float) -> float:
"""Evaluate the linear function y = a + bx for the given a, b.
>>> result = evaluate_line(5.0, 1.0, 10.0) # y = 5.0 + 1.0 * 10.0,
>>> result == 15
True
"""
return a + b * x |
def mph_to_kt(val):
"""
Converts mph to knots; accepts numeric or string
"""
try:
return int(float(val) * 0.868976)
except (TypeError, ValueError):
return val * 0.868976 |
def IndexToRDId(idx, leadText='RDCmpd'):
""" Converts an integer index into an RDId
The format of the ID is:
leadText-xxx-xxx-xxx-y
The number blocks are zero padded and the final digit (y)
is a checksum:
>>> str(IndexToRDId(9))
'RDCmpd-000-009-9'
>>> str(IndexToRDId(9009))
'RDCmpd-009-009-8'
A... |
def lorentzian(x, height=1., center=0., width=1.):
""" defined such that height is the height when x==x0 """
halfWSquared = (width/2.)**2
return (height * halfWSquared) / ((x - center)**2 + halfWSquared) |
def diff_first_last(L, *opArg):
"""
(list) -> boolean
Precondition: len(L) >= 2
Returns True if the first item of the list is different from the last; else returns False.
>>> diff_first_last([3, 4, 2, 8, 3])
False
>>> diff_first_last(['apple', 'banana', 'pear'])
True
>>> diff_first... |
def format_response(event):
"""Determine what response to provide based upon event data.
Args:
event: A dictionary with the event data.
"""
event_type = event['type']
text = ""
senderName = event['user']['displayName']
# Case 1: The bot was added to a room
if event_type == 'AD... |
def make_divisible(v, divisor=3, min_value=1):
"""
forked from slim:
https://github.com/tensorflow/models/blob/\
0344c5503ee55e24f0de7f37336a6e08f10976fd/\
research/slim/nets/mobilenet/mobilenet.py#L62-L69
"""
if min_value is None:
min_value = divisor
new_v = max(min_value, int(v... |
def nprevzero(N, k, ncache):
""" Return true if any previous result was zero """
for ix in range(k - 1, 2, -1):
# print(ix)
p = ncache['full'].get('N%dk%d' % (N, ix), -1)
# p = ncache['full'].get('N%dk%d' % (N, ix), -1)
if p == 0:
return True
return False |
def _ListUnion(list_1, list_2):
"""Returns the union of two lists.
Python sets can have a non-deterministic iteration order. In some
contexts, this could lead to TensorFlow producing two different
programs when the same Python script is run twice. In these contexts
we use lists instead of sets.
This funct... |
def chembl_problematic_case(key: str) -> bool:
"""
When generating the statistics on ChEMBL, some KeyError exceptions were generated if not checking for
this special case.
"""
allowed_key_beginnings = {"[#6R", "[#7R"}
tokens = key.split("]")
return "=" in key and tokens[0] not in allowed_k... |
def _dict_to_dotenv(env_dict):
"""
Converts a ``dict`` to a .env formatted str.
Parameters
----------
env_dict : dict
Key value dictionary representing env variables.
Returns
-------
str
Str representing a .env formatted file structure.
Author
------
Ri... |
def color_variant(hex_color, bright_factor=1):
"""
Takes a color in HEX format #FF00FF and produces a lighter or darker variant
:param hex_color: color to change
:type hex_color: str
:param bright_factor: factor to change the color brightness [0 ... 1]
:type bright_fa... |
def calc_d(D_o, t, inner=False):
"""Return the outer or inner diameter [m].
:param float D_o: Outer diameter [m]
:param float t: Layer thickness [m]
:param boolean inner: Select diameter
"""
if inner:
return D_o - 2 * t
else:
return D_o + 2 * t |
def ReadBinaryFile(name):
"""Read a binary file and return the content, return None if error occured
"""
try:
fBinary = open(name, 'rb')
except:
return None
try:
content = fBinary.read()
except:
return None
finally:
fBinary.close()
return content |
def filterUsage(resource, value):
"""
Indicates how the filter criteria is used.
E.g., if this parameter is not provided, the Retrieve operation is for generic retrieve operation.
If filterUsage is provided, the Retrieve operation is for resource <discovery>.
:param resource:
:type resource:
... |
def logical_name(session, Type='String', RepCap='', AttrID=1050305, buffsize=2048, action=['Get', '']):
"""[Logical Name <string>]
Logical Name identifies a driver session in the Configuration Store. If Logical Name is not empty, the driver was initialized from information in the driver session.
If it is e... |
def _days_to_next_order(avg_latency, std_latency, recency):
"""Estimate the number of days to a customer's next order using latency.
Args:
avg_latency (float): Average latency in days
std_latency (float): Standard deviation of latency in days
recency (float): Recency in days
Returns... |
def _pack_beta_into_dict(betaX, betaY, beta):
"""Return a dictionary for beta."""
bet = {
"betaX": betaX,
"betaY": betaY,
"beta": beta
}
return bet |
def n2str(num):
""" convert a number into a short string"""
if abs(num) < 1 and abs(num) > 1e-50 or abs(num) > 1E4:
numFormat = ".2e"
elif abs(round(num) - num) < 0.001 or abs(num) > 1E4:
numFormat = ".0f"
elif abs(num) > 1E1:
numFormat = ".1f"
else:
numFormat = ".2f... |
def parse_name(name):
"""Parse the name of a benchmark"""
s = name.split('/')
return [s[0], [int(i) for i in s[1:]]] |
def is_col_sorted_nb(col_arr):
"""Check whether the column array is sorted."""
for i in range(len(col_arr) - 1):
if col_arr[i + 1] < col_arr[i]:
return False
return True |
def get_ldev(obj):
"""Get the LDEV number from the given object and return it as integer."""
if not obj:
return None
ldev = obj.get('provider_location')
if not ldev or not ldev.isdigit():
return None
return int(ldev) |
def inconsistent_typical_range_stations(stations):
"""Given list of stations, returns list of stations with inconsistent data"""
inconsiststations = []
for i in stations:
if i.typical_range_consistent() == False:
inconsiststations.append(i)
return inconsiststations |
def ctof(temp_c):
"""Convert temperature from celsius to fahrenheit"""
return temp_c * (9/5) + 32 |
def generate_labels_review(band_info):
"""
Takes in a list of tuples of four values containing name,
starting year, dot number, and instrument. Generates a label
based on these values and returns a dictionary with keys
being a person's name and the values being the generated label.
Dictionary is... |
def flatten(list):
"""Flatten a list of elements into a uniqu list
Author: Christophe Simonis (christophe@tinyerp.com)
Examples:
>>> flatten(['a'])
['a']
>>> flatten('b')
['b']
>>> flatten( [] )
[]
>>> flatten( [[], [[]]] )
[]
>>> flatten( [[['a','b'], 'c'], 'd', ['e', [... |
def text_compare(one, two):
"""Compares the contents of two XML text attributes."""
if not one and not two:
return True
return (one or "").strip() == (two or "").strip() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.