73 return NUM_TOKENS, complete_sentences
74
75
76def full_sents(ocr_text, transcript_text, remove_newlines=True, cut_off=0.70): 77 OCR_NUM_TOKENS, complete_sentences = get_complete_sentences(ocr_text)
78
79 OCR_NLP_SENTENCES_LENGTHS = [len(sentence) for sentence in complete_sentences]
283 main_worker(args.gpu, ngpus_per_node, args, writer)
284
285
286def main_worker(gpu, ngpus_per_node, args, writer=None):287 global best_acc1
288 args.gpu = gpu
289
65 self.stream = self.pa.open(**kwargs)
66 self.stream.start_stream()
67
68 def resample(self, data, input_rate): 69 """
70 Microphone may not support our native processing sampling rate, so
71 resample from input_rate to RATE_PROCESS here for webrtcvad and
4
5
6# implement mish activation function
7def f_mish(input, inplace=False): 8 """
9 Applies the mish function element-wise:
10 :math:`mish(x) = x * tanh(softplus(x)) = x * tanh(ln(1 + exp(x)))`
22 self,
23 slides_dir,
24 algorithm_name="kmeans",
25 num_centroids=20, 26 preference=None,
27 damping=0.5,
28 max_iter=200,
An unused argument can lead to confusions. It should be removed. If this variable is necessary, name the variable _
or start the name with unused
or _unused
.
def square(x, y=1):
return x * x
class MySubClass(MyClass):
def __init__(self, number):
self.value = 42 # argument `number` remains unused
def square(x):
return x * x
class MySubClass(MyClass):
def __init__(self, _):
self.value = 42