query stringlengths 33 521 | document stringlengths 8 49.6k | metadata dict | negatives sequencelengths 5 101 | negative_scores sequencelengths 5 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Compute the matrixvector product y = Cu where C is a circulant matrix All matrices are real | def circulant_multiplication(u, a):
return real(ifft(fft(a)*fft(u))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def covar(fx,cx):\n \n fx = np.array(fx)\n cx = np.array(cx)\n \n shape_fx = fx.shape\n shape_cx = cx.shape\n \n \n if shape_fx[1] != shape_cx[0]:\n print('-----------------------------------------')\n print(\"Shapes of fx and cx cannot be multiplied:\")\n print(shap... | [
"0.650418",
"0.650212",
"0.6441079",
"0.6313763",
"0.6310517",
"0.62949276",
"0.62782884",
"0.62631303",
"0.61975265",
"0.6096459",
"0.608041",
"0.606508",
"0.6038961",
"0.6011421",
"0.60068315",
"0.59920776",
"0.59303707",
"0.58836865",
"0.5879482",
"0.58772385",
"0.58575416... | 0.6389226 | 3 |
Compute the matrixvector product y = Tu where T is a Toeplitz matrix All matrices are real | def toeplitz_multiplication(u, c, r=None):
n = len(u)
if r is None:
r = c
u1 = zeros((2*n))
u1[0:n] = u
c = np.concatenate((c, [0], r[-1:0:-1]))
y1 = circulant_multiplication(u1, c)
return y1[0:n] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def matrix_vector_prod(m,u):\n each_product = []\n for v in m:\n each_product.append(dot_prod(v, u))\n return each_product",
"def matmul(x, y):\n if len(list(y.size())) == 2:\n # if one of them is a vector (i.e. wanting to do MV mult)\n z = torch.zeros(2, x.size()[1], dtype=torch... | [
"0.7003199",
"0.6513981",
"0.64759356",
"0.6454179",
"0.6377554",
"0.6326698",
"0.6245358",
"0.620894",
"0.6208685",
"0.61977005",
"0.6195611",
"0.61694974",
"0.6168602",
"0.6134469",
"0.6106113",
"0.60868716",
"0.6082444",
"0.60823506",
"0.6070701",
"0.60688484",
"0.6063607"... | 0.63380134 | 5 |
Read in labels from digitStruct.mat file to create a dict of image file name and corresponding labels | def read_labels(digitstruct_file):
labels = dict()
for dsObj in tdqm(yieldNextDigitStruct(digitstruct_file), ncols=50):
image_labels = []
for bbox in dsObj.bboxList:
image_labels.append(bbox.label)
labels[dsObj.name] = image_labels
return labels | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_imagenet_as_dict(self):\n real_file_path = os.path.realpath(self.map_file)\n if not os.path.exists(real_file_path):\n raise IOError(\"map file {} not exists\".format(self.map_file))\n\n label_dict = {}\n with open(real_file_path) as fp:\n line = fp.readlin... | [
"0.7442581",
"0.67145514",
"0.6680717",
"0.66700083",
"0.6651974",
"0.6599294",
"0.65706545",
"0.6568262",
"0.65624034",
"0.65466106",
"0.6527709",
"0.65229243",
"0.65100825",
"0.6500305",
"0.649048",
"0.6466592",
"0.6466018",
"0.6442053",
"0.6429563",
"0.6409631",
"0.6398935... | 0.8415674 | 0 |
"ref CLRS pg326, solution to the basic supply chain problem using the book notation for variables na(...TRUNCATED) | "def fastestWay( a, t, e, x, n ):\n import pdb;pdb.set_trace() \n f1.append( ( e[0] , 1 ) )\n (...TRUNCATED) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | ["def exercise_b2_39():\r\n pass","def exercise_b2_113():\r\n pass","def exercise_b2_93():\r\n(...TRUNCATED) | ["0.5789567","0.5612758","0.56002617","0.5582453","0.5527549","0.5454671","0.5450963","0.5440792","0(...TRUNCATED) | 0.0 | -1 |
This function computes the fundamental matrix by computing the SVD of Ax = 0 ; 8point algorithm | "def computeFundamentalMatrix(pts1, pts2):\n A = np.empty((8, 9))\n for i in range(len(pts1)-1(...TRUNCATED) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | ["def svd0(A):\n M,N = A.shape\n if M>N: return sla.svd(A, full_matrices=True)\n else: return s(...TRUNCATED) | ["0.66048837","0.6466162","0.6259937","0.6250825","0.62505597","0.62274474","0.6104567","0.6089218",(...TRUNCATED) | 0.68444854 | 0 |
"Leverages the 8point algorithm and implement RANSAC algorithm to find the inliers and the best fund(...TRUNCATED) | "def getInlierRANSAC(pts1, pts2):\n # global finalFundamentalMatrix\n iterations = 50\n thr(...TRUNCATED) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | ["def ransac(data, hypothesis, metric, sample_size, num_iter, inlier_thresh):\n N,d = data.shape\(...TRUNCATED) | ["0.6203597","0.5916464","0.5894118","0.5867515","0.5715989","0.56956524","0.56905115","0.5686345","(...TRUNCATED) | 0.699575 | 0 |
"=========================================================== DateFormatedSQL(x) ====================(...TRUNCATED) | "def DateFormatedSQL(x):\n x=[i[0] for i in x]\n \n x1=[]\n for i in x:\n if len((...TRUNCATED) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | ["def change_format_from_input_to_datetime(list_d_t_t):\n data_output = []\n\n for row in list(...TRUNCATED) | ["0.66734904","0.65000284","0.6259414","0.59757656","0.5600508","0.5579302","0.5578522","0.5551475",(...TRUNCATED) | 0.7940835 | 0 |
"=========================================================== dateformated(x) =======================(...TRUNCATED) | "def DateFormated(x):\n \n x1=[]\n for i in x:\n if len(i)==19:\n x1.appe(...TRUNCATED) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | ["def change_format_from_input_to_datetime(list_d_t_t):\n data_output = []\n\n for row in list(...TRUNCATED) | ["0.73220545","0.6644235","0.64673054","0.63785565","0.6323779","0.63159305","0.6256937","0.6174311"(...TRUNCATED) | 0.75249213 | 0 |
Mimic the & operator in R. This has to have Expression objects to be involved to work | "def _op_and_(self, left: Any, right: Any) -> Any:\n if isinstance(left, list):\n (...TRUNCATED) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | ["def AND(f, g):\n def _and(x):\n return f(x) & g(x)\n return _and","def and_(a, b):","(...TRUNCATED) | ["0.6913351","0.6844835","0.6834847","0.68041515","0.6614185","0.6585983","0.65602845","0.65299505",(...TRUNCATED) | 0.62697506 | 20 |
Mimic the & operator in R. This has to have Expression objects to be involved to work | "def _op_or_(self, left: Any, right: Any) -> Any:\n if isinstance(left, list):\n r(...TRUNCATED) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | ["def AND(f, g):\n def _and(x):\n return f(x) & g(x)\n return _and","def and_(a, b):","(...TRUNCATED) | ["0.6913351","0.6844835","0.6834847","0.68041515","0.6614185","0.6585983","0.65602845","0.65299505",(...TRUNCATED) | 0.0 | -1 |
YAML Metadata Warning:The task_categories "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
- Downloads last month
- 127