repo stringlengths 7 54 | path stringlengths 4 107 | func_name stringlengths 1 73 | original_string stringlengths 75 300 | language stringclasses 1
value | code stringlengths 75 300 | code_tokens sequencelengths 19 93 | docstring stringlengths 1 208 | docstring_tokens sequencelengths 1 64 | sha stringlengths 40 40 | url stringlengths 91 211 | partition stringclasses 3
values | summary stringlengths 4 350 | obf_code stringlengths 7.85k 8.71k | code_len int64 75 300 | obf_code_len int64 7.85k 8.71k | input_ids sequencelengths 9.02k 9.02k | attention_mask sequencelengths 9.02k 9.02k | labels sequencelengths 512 512 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hobson/aima | aima/learning.py | leave1out | def leave1out(learner, dataset):
"Leave one out cross-validation over the dataset."
return cross_validation(learner, dataset, k=len(dataset.examples)) | python | def leave1out(learner, dataset):
"Leave one out cross-validation over the dataset."
return cross_validation(learner, dataset, k=len(dataset.examples)) | [
"def",
"leave1out",
"(",
"learner",
",",
"dataset",
")",
":",
"return",
"cross_validation",
"(",
"learner",
",",
"dataset",
",",
"k",
"=",
"len",
"(",
"dataset",
".",
"examples",
")",
")"
] | Leave one out cross-validation over the dataset. | [
"Leave",
"one",
"out",
"cross",
"-",
"validation",
"over",
"the",
"dataset",
"."
] | 3572b2fb92039b4a1abe384be8545560fbd3d470 | https://github.com/hobson/aima/blob/3572b2fb92039b4a1abe384be8545560fbd3d470/aima/learning.py#L545-L547 | valid | Leave one out cross - validation over the dataset. | GE0fj113KEZj,R1e_Wi6c21TG,iLlFPtXR4N3a,t0j5xAwNRKPM,t7XCrg1tKKUH,LZ9gvdrtvPCR,QvJukK71NdMz,m0JDgmQ_1V4y,nbHJCH8ietey,sL9knfPcsjtf,KV2xUGG8wbmv,MVDeJ0RtG5Qj,yxHQN8TaYaPk,xathlSo6uCGj,BS_U1HKsfwJn,RiDuLsf3pB9C,IfMukturIx4N,glSVRL9uky9k,ZUG6stqnuEy9,Y6lGjsmY0rwp,vHmek3AlViyF,qVpv73ngjx74,w417dfFoNTPY,OpAhDOt4OWYe,vVWSmZCA... | 158 | 8,367 | [
1,
758,
947,
21935,
340,
30,
17788,
20,
74,
78,
23379,
6859,
62,
78,
16,
54,
21,
73,
67,
59,
77,
26,
71,
5340,
56,
43,
16,
77,
48,
80,
42,
16484,
60,
54,
24,
50,
23,
69,
16,
88,
20,
78,
25,
21703,
91,
50,
54,
47,
12728,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
536,
8851,
21,
659,
12,
298,
24834,
16,
3709,
4672,
203,
565,
315,
21300,
1245,
596,
6828,
17,
8685,
1879,
326,
3709,
1199,
203,
565,
327,
6828,
67,
8685,
12,
298,
24834,
16,
3709,
16,
417,
33,
1897,
12,
8682,
18,
16858,
3719,
... |
senaite/senaite.core | bika/lims/browser/analysisrequest/manage_analyses.py | AnalysisRequestAnalysesView.get_results_range | def get_results_range(self):
"""Get the results Range from the AR
"""
spec = self.context.getResultsRange()
if spec:
return dicts_to_dict(spec, "keyword")
return ResultsRangeDict() | python | def get_results_range(self):
"""Get the results Range from the AR
"""
spec = self.context.getResultsRange()
if spec:
return dicts_to_dict(spec, "keyword")
return ResultsRangeDict() | [
"def",
"get_results_range",
"(",
"self",
")",
":",
"spec",
"=",
"self",
".",
"context",
".",
"getResultsRange",
"(",
")",
"if",
"spec",
":",
"return",
"dicts_to_dict",
"(",
"spec",
",",
"\"keyword\"",
")",
"return",
"ResultsRangeDict",
"(",
")"
] | Get the results Range from the AR | [
"Get",
"the",
"results",
"Range",
"from",
"the",
"AR"
] | 7602ce2ea2f9e81eb34e20ce17b98a3e70713f85 | https://github.com/senaite/senaite.core/blob/7602ce2ea2f9e81eb34e20ce17b98a3e70713f85/bika/lims/browser/analysisrequest/manage_analyses.py#L144-L150 | train | Get the results Range from the AR
| TO48QtFeZyfU,TntdrosRm2ds,Z8m4XqyGhK41,jxJzdWX2jbe5,qXV5naGkI6fe,MNiDLg_4Q_pg,cMO_XVt3QoR_,sV1y6cdjyLuN,cBTH4DxiJp7B,uTKssqGgJz0_,n_DQpokLjJ2n,ouZ4OUXVuzVt,wBMbpwolK0Vj,YpKiA3w6Kz4P,UdLD32XMnwZ5,VoJUxmTZ820b,o9cEC2Ltq6tI,x4AAP0l1pA8O,Y3pZ4YEVEH3u,YObUb87AjwYZ,LOOh0muwtYiv,HkW5Al8aes5I,GC3fK2Io8bkr,WnJGL7cRCgNl,ySyBIjB6... | 232 | 8,259 | [
1,
758,
947,
21935,
340,
30,
8493,
8875,
23310,
2954,
62,
93,
74,
57,
16,
56,
496,
72,
6973,
54,
81,
22,
2377,
16,
62,
28,
81,
24,
60,
85,
93,
43,
76,
47,
9803,
16,
78,
92,
46,
94,
72,
59,
60,
22,
78,
2196,
25,
16,
85,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
536,
336,
67,
4717,
67,
3676,
12,
2890,
4672,
203,
3639,
3536,
967,
326,
1686,
8086,
628,
326,
6052,
203,
3639,
3536,
203,
3639,
857,
273,
365,
18,
2472,
18,
588,
3447,
2655,
1435,
203,
3639,
309,
857,
30,
203,
5411,
327,
15838... |
marrabld/planarradpy | libplanarradpy/planrad.py | BioOpticalParameters.build_a | def build_a(self):
"""Calculates the total absorption from water, phytoplankton and CDOM
a = awater + acdom + aphi
"""
lg.info('Building total absorption')
self.a = self.a_water + self.a_cdom + self.a_phi | python | def build_a(self):
"""Calculates the total absorption from water, phytoplankton and CDOM
a = awater + acdom + aphi
"""
lg.info('Building total absorption')
self.a = self.a_water + self.a_cdom + self.a_phi | [
"def",
"build_a",
"(",
"self",
")",
":",
"lg",
".",
"info",
"(",
"'Building total absorption'",
")",
"self",
".",
"a",
"=",
"self",
".",
"a_water",
"+",
"self",
".",
"a_cdom",
"+",
"self",
".",
"a_phi"
] | Calculates the total absorption from water, phytoplankton and CDOM
a = awater + acdom + aphi | [
"Calculates",
"the",
"total",
"absorption",
"from",
"water",
"phytoplankton",
"and",
"CDOM"
] | 5095d1cb98d4f67a7c3108c9282f2d59253e89a8 | https://github.com/marrabld/planarradpy/blob/5095d1cb98d4f67a7c3108c9282f2d59253e89a8/libplanarradpy/planrad.py#L496-L502 | test | Calculates the total absorption from water phytoplankton and CDOM
a | GE0fj113KEZj,R1e_Wi6c21TG,iLlFPtXR4N3a,t0j5xAwNRKPM,t7XCrg1tKKUH,LZ9gvdrtvPCR,QvJukK71NdMz,m0JDgmQ_1V4y,nbHJCH8ietey,sL9knfPcsjtf,KV2xUGG8wbmv,MVDeJ0RtG5Qj,yxHQN8TaYaPk,xathlSo6uCGj,BS_U1HKsfwJn,RiDuLsf3pB9C,IfMukturIx4N,glSVRL9uky9k,ZUG6stqnuEy9,Y6lGjsmY0rwp,vHmek3AlViyF,qVpv73ngjx74,w417dfFoNTPY,OpAhDOt4OWYe,vVWSmZCA... | 245 | 8,699 | [
1,
758,
947,
21935,
340,
30,
17788,
20,
74,
78,
23379,
6859,
62,
78,
16,
54,
21,
73,
67,
59,
77,
26,
71,
5340,
56,
43,
16,
77,
48,
80,
42,
16484,
60,
54,
24,
50,
23,
69,
16,
88,
20,
78,
25,
21703,
91,
50,
54,
47,
12728,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
536,
1361,
67,
69,
12,
2890,
4672,
203,
3639,
3536,
10587,
326,
2078,
2417,
280,
375,
628,
16313,
16,
1844,
93,
869,
412,
2304,
1917,
471,
385,
8168,
203,
203,
3639,
279,
273,
1690,
2045,
397,
1721,
9859,
397,
513,
12266,
203,
... |
gofed/gofedlib | gofedlib/graphs/graphutils.py | GraphUtils.truncateGraph | "def truncateGraph(graph, root_nodes):\n\t\t\"\"\"Create a set of all nodes containg the root_nodes (...TRUNCATED) | python | "def truncateGraph(graph, root_nodes):\n\t\t\"\"\"Create a set of all nodes containg the root_nodes (...TRUNCATED) | ["def","truncateGraph","(","graph",",","root_nodes",")",":","subgraph","=","Graph","(",")","for","no(...TRUNCATED) | Create a set of all nodes containg the root_nodes and
all nodes reacheable from them | ["Create","a","set","of","all","nodes","containg","the","root_nodes","and","all","nodes","reacheable(...TRUNCATED) | 0674c248fe3d8706f98f912996b65af469f96b10 | "https://github.com/gofed/gofedlib/blob/0674c248fe3d8706f98f912996b65af469f96b10/gofedlib/graphs/gra(...TRUNCATED) | train | "Create a set of all nodes containg the root_nodes and\n\t\t all nodes reacheable from them and re(...TRUNCATED) | "Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MM(...TRUNCATED) | 297 | 8,282 | [1,758,947,21935,340,30,453,89,27,62,26,45,46,39,75,44,23,69,16,4227,41,44,60,38,53,60,89,40,89,76,1(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,536,10310,4137,12,4660,16,1365,67,4690,4672,203,202,202,8395,1684,279,444,434,777,2199,466,69,310(...TRUNCATED) |
fy0/slim | slim/base/view.py | AbstractSQLView._call_handle | "async def _call_handle(self, func, *args):\n \"\"\" call and check result of handle_query/re(...TRUNCATED) | python | "async def _call_handle(self, func, *args):\n \"\"\" call and check result of handle_query/re(...TRUNCATED) | ["async","def","_call_handle","(","self",",","func",",","*","args",")",":","await","async_call","(",(...TRUNCATED) | call and check result of handle_query/read/insert/update | [
"call",
"and",
"check",
"result",
"of",
"handle_query",
"/",
"read",
"/",
"insert",
"/",
"update"
] | 9951a910750888dbe7dd3e98acae9c40efae0689 | "https://github.com/fy0/slim/blob/9951a910750888dbe7dd3e98acae9c40efae0689/slim/base/view.py#L586-L5(...TRUNCATED) | valid | call and check result of handle_query | "GE0fj113KEZj,R1e_Wi6c21TG,iLlFPtXR4N3a,t0j5xAwNRKPM,t7XCrg1tKKUH,LZ9gvdrtvPCR,QvJukK71NdMz,m0JDgmQ_(...TRUNCATED) | 223 | 8,384 | [1,758,947,21935,340,30,17788,20,74,78,23379,6859,62,78,16,54,21,73,67,59,77,26,71,5340,56,43,16,77,(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,3810,1652,389,1991,67,4110,12,2890,16,1326,16,380,1968,4672,203,3639,3536,745,471,866,563,434,164(...TRUNCATED) |
log2timeline/dfvfs | dfvfs/vfs/gzip_file_entry.py | GzipFileEntry.modification_time | "def modification_time(self):\n \"\"\"dfdatetime.DateTimeValues: modification time or None if not(...TRUNCATED) | python | "def modification_time(self):\n \"\"\"dfdatetime.DateTimeValues: modification time or None if not(...TRUNCATED) | ["def","modification_time","(","self",")",":","timestamps","=","self",".","_gzip_file",".","modifica(...TRUNCATED) | dfdatetime.DateTimeValues: modification time or None if not available. | [
"dfdatetime",
".",
"DateTimeValues",
":",
"modification",
"time",
"or",
"None",
"if",
"not",
"available",
"."
] | 2b3ccd115f9901d89f383397d4a1376a873c83c4 | "https://github.com/log2timeline/dfvfs/blob/2b3ccd115f9901d89f383397d4a1376a873c83c4/dfvfs/vfs/gzip_(...TRUNCATED) | train | Returns the modification time of the gzipped file or None if not available. | "TO48QtFeZyfU,TntdrosRm2ds,Z8m4XqyGhK41,jxJzdWX2jbe5,qXV5naGkI6fe,MNiDLg_4Q_pg,cMO_XVt3QoR_,sV1y6cdj(...TRUNCATED) | 270 | 8,599 | [1,758,947,21935,340,30,8493,8875,23310,2954,62,93,74,57,16,56,496,72,6973,54,81,22,2377,16,62,28,81(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,536,11544,67,957,12,2890,4672,203,565,3536,2180,6585,18,5096,1972,30,11544,813,578,599,309,486,23(...TRUNCATED) |
inveniosoftware/invenio-formatter | invenio_formatter/context_processors/badges.py | generate_badge_png | "def generate_badge_png(title, value, color='#007ec6'):\n \"\"\"Generate the badge in PNG format.(...TRUNCATED) | python | "def generate_badge_png(title, value, color='#007ec6'):\n \"\"\"Generate the badge in PNG format.(...TRUNCATED) | ["def","generate_badge_png","(","title",",","value",",","color","=","'#007ec6'",")",":","badge","=",(...TRUNCATED) | Generate the badge in PNG format. | [
"Generate",
"the",
"badge",
"in",
"PNG",
"format",
"."
] | aa25f36742e809f05e116b52e8255cdb362e5642 | "https://github.com/inveniosoftware/invenio-formatter/blob/aa25f36742e809f05e116b52e8255cdb362e5642/(...TRUNCATED) | train | Generate the badge in PNG format. | "LjwPKMFx9SVN,LxB5Q4T8kB4a,NwsU5pwfBnpD,X8HOW0lvt93Y,gLkJwKvtqijO,OwkkkFSBEkuY,rl0hiewnGLjY,ctZuZQM4(...TRUNCATED) | 185 | 8,627 | [1,758,947,21935,340,30,511,78,91,8784,13542,92,29,23927,50,16,48,20029,25,53,24,56,28,79,38,24,69,1(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,536,2103,67,21245,67,6446,12,2649,16,460,16,2036,2218,7,713,27,557,26,11,4672,203,565,3536,4625,3(...TRUNCATED) |
pypa/setuptools | setuptools/dist.py | Distribution._set_feature | "def _set_feature(self, name, status):\n \"\"\"Set feature's inclusion status\"\"\"\n (...TRUNCATED) | python | "def _set_feature(self, name, status):\n \"\"\"Set feature's inclusion status\"\"\"\n (...TRUNCATED) | ["def","_set_feature","(","self",",","name",",","status",")",":","setattr","(","self",",","self","."(...TRUNCATED) | Set feature's inclusion status | [
"Set",
"feature",
"s",
"inclusion",
"status"
] | 83c667e0b2a98193851c07115d1af65011ed0fb6 | "https://github.com/pypa/setuptools/blob/83c667e0b2a98193851c07115d1af65011ed0fb6/setuptools/dist.py(...TRUNCATED) | train | Set the feature s inclusion status | "Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MM(...TRUNCATED) | 142 | 8,348 | [1,758,947,21935,340,30,453,89,27,62,26,45,46,39,75,44,23,69,16,4227,41,44,60,38,53,60,89,40,89,76,1(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,536,389,542,67,7238,12,2890,16,508,16,1267,4672,203,3639,3536,694,2572,1807,26485,1267,8395,203,3(...TRUNCATED) |
bitesofcode/projexui | projexui/widgets/xorbrecordbox.py | XOrbRecordBox.focusInEvent | "def focusInEvent(self, event):\r\n \"\"\"\r\n When this widget loses focus, try to em(...TRUNCATED) | python | "def focusInEvent(self, event):\r\n \"\"\"\r\n When this widget loses focus, try to em(...TRUNCATED) | ["def","focusInEvent","(","self",",","event",")",":","self",".","_changedRecord","=","-","1","super"(...TRUNCATED) | When this widget loses focus, try to emit the record changed event
signal. | ["When","this","widget","loses","focus","try","to","emit","the","record","changed","event","signal",(...TRUNCATED) | f18a73bec84df90b034ca69b9deea118dbedfc4d | "https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widg(...TRUNCATED) | train | Called by the event handler when the record is changed. | "Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MM(...TRUNCATED) | 239 | 8,434 | [1,758,947,21935,340,30,453,89,27,62,26,45,46,39,75,44,23,69,16,4227,41,44,60,38,53,60,89,40,89,76,1(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,536,7155,382,1133,12,2890,16,871,4672,206,203,3639,3536,206,203,3639,5203,333,3604,437,2420,7155,(...TRUNCATED) |
senaite/senaite.core | bika/lims/browser/contact.py | ContactLoginDetailsView.add_status_message | "def add_status_message(self, message, severity=\"info\"):\n \"\"\"Set a portal message\n (...TRUNCATED) | python | "def add_status_message(self, message, severity=\"info\"):\n \"\"\"Set a portal message\n (...TRUNCATED) | ["def","add_status_message","(","self",",","message",",","severity","=","\"info\"",")",":","self",".(...TRUNCATED) | Set a portal message | [
"Set",
"a",
"portal",
"message"
] | 7602ce2ea2f9e81eb34e20ce17b98a3e70713f85 | "https://github.com/senaite/senaite.core/blob/7602ce2ea2f9e81eb34e20ce17b98a3e70713f85/bika/lims/bro(...TRUNCATED) | train | Add a status message to the portal message | "TO48QtFeZyfU,TntdrosRm2ds,Z8m4XqyGhK41,jxJzdWX2jbe5,qXV5naGkI6fe,MNiDLg_4Q_pg,cMO_XVt3QoR_,sV1y6cdj(...TRUNCATED) | 168 | 8,386 | [1,758,947,21935,340,30,8493,8875,23310,2954,62,93,74,57,16,56,496,72,6973,54,81,22,2377,16,62,28,81(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,536,527,67,2327,67,2150,12,2890,16,883,16,11426,1546,1376,6,4672,203,3639,3536,694,279,11899,883,(...TRUNCATED) |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 7