Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
64
64
pair_id
stringlengths
64
64
question
large_stringlengths
7
27.8k
answer
large_stringlengths
9
5.47M
question_type
stringclasses
1 value
answer_type
stringclasses
1 value
task
stringclasses
1 value
language
stringclasses
1 value
query_language
stringclasses
1 value
label
int8
1
1
relevance_score
float64
1
1
source
stringclasses
1 value
source_config
stringclasses
1 value
source_split
stringclasses
1 value
source_revision
stringclasses
1 value
source_row_id
stringlengths
22
26
query_id
stringlengths
22
26
answer_id
stringlengths
22
26
license
stringclasses
1 value
repository
stringclasses
1 value
path
stringclasses
1 value
url
stringclasses
1 value
metadata
large_stringlengths
410
1.72k
record_kind
stringclasses
1 value
split
stringclasses
1 value
content_id
unknown
d3dbe71f6945fece7d6368a30c244b157585a1822bba4e0f00ccaeb1f2f72f92
cbb9b04505e1401cb9304c621b5aabf44031cebbb988f50cbc49fcfaa0f2066b
Returns the value of the 'go_package' option of the first .proto file found in the same directory as projectFile
func detectGoPackageForProject(projectFile string) (string, error) { var goPkg string projectDir := filepath.Dir(projectFile) if err := filepath.Walk(projectDir, func(protoFile string, info os.FileInfo, err error) error { // already set if goPkg != "" { return nil } if !strings.HasSuffix(protoFile, ".prot...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:0
shard-00000.jsonl.gz:0
shard-00000.jsonl.gz:0
apache-2.0
{"document_rank":"0","document_score":"0.7273096","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6514599","0.6418956","0.62568474","0.6100058","0.6059389","0.6033528","0.5760218","0.571393","0.56766814","0.56747204","0.55886865","0.55810106","0.557109...
default
train
[ 148, 41, 164, 41, 207, 171, 220, 93, 161, 42, 230, 124, 38, 161, 229, 211, 162, 152, 36, 115, 195, 99, 33, 131, 113, 222, 19, 85, 190, 146, 82, 223 ]
68f15f66884e7b46a8b3e989ea20b9eb869c9a1e7ba42cde11a2a467ba10a237
bbf7737083650150a507225633b166fb064379bbb98b26819a0b909f2773c8d2
NewQueueManager instantiates a new QueueManager object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed
func NewQueueManager(name string, clusters []string, aliasQueues []AliasQueue, remoteQueues []RemoteQueue, clusterQueues []ClusterQueue, ) *QueueManager { this := QueueManager{} this.Name = name this.Clusters = clusters this.AliasQueues = aliasQueues this.RemoteQueues = remoteQueues this.ClusterQueues = clusterQu...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:1
shard-00000.jsonl.gz:1
shard-00000.jsonl.gz:1
apache-2.0
{"document_rank":"1","document_score":"0.6490378","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6894487","0.6460588","0.6222042","0.61513555","0.6091006","0.606205","0.60386145","0.6006943","0.59639966","0.594565","0.5942067","0.59363455","0.5910915"...
default
train
[ 27, 93, 220, 215, 69, 66, 243, 186, 198, 153, 49, 222, 79, 43, 6, 185, 18, 22, 27, 52, 231, 75, 47, 211, 218, 208, 189, 140, 248, 97, 132, 72 ]
d760f4a4eaf2164cb055e5f9db84617d7dfe237865d07a63194a351e4f153976
c695145a6f53a9c77712e47273f41dc4ad1908f10798a6a09a649bc8f1bc066c
NewQueueManagerWithDefaults instantiates a new QueueManager object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set
func NewQueueManagerWithDefaults() *QueueManager { this := QueueManager{} return &this }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:2
shard-00000.jsonl.gz:2
shard-00000.jsonl.gz:2
apache-2.0
{"document_rank":"0","document_score":"0.7690877","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6368561","0.5929313","0.5928396","0.59103316","0.5819523","0.58130354","0.5753316","0.5739753","0.568538","0.5661701","0.5606484","0.5487868","0.54643965"...
default
train
[ 41, 210, 92, 117, 146, 107, 120, 238, 167, 25, 90, 135, 197, 76, 171, 152, 88, 98, 61, 14, 56, 133, 154, 35, 2, 35, 240, 209, 232, 1, 54, 20 ]
b538c939ca5d80301c2bda6c4b3d7522a040b3900502ec6326a1fdae541fc51f
701741be39dc4bc28c2755fd1784804f7ce2877d4e331003c027762b4e065081
GetName returns the Name field value
func (o *QueueManager) GetName() string { if o == nil { var ret string return ret } return o.Name }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:3
shard-00000.jsonl.gz:3
shard-00000.jsonl.gz:3
apache-2.0
{"document_rank":"-1","document_score":"0.0","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.8270152","0.79907626","0.7765679","0.76368356","0.7604266","0.7600852","0.75710016","0.7564642","0.7548394","0.75191027","0.7517443","0.7511258","0.7505484","0...
default
train
[ 80, 84, 128, 240, 32, 17, 133, 29, 68, 75, 228, 4, 73, 71, 75, 181, 61, 163, 133, 252, 197, 127, 18, 218, 21, 217, 151, 228, 15, 166, 118, 69 ]
f181a79324b599c57d2ec7cc6816d2b037af5a8876f000ee646787b0e7816d42
706b1dff0f6f1aaad65cbfe081fefade361243570bc19248a183c84ebd0602ab
GetNameOk returns a tuple with the Name field value and a boolean to check if the value has been set.
func (o *QueueManager) GetNameOk() (*string, bool) { if o == nil { return nil, false } return &o.Name, true }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:4
shard-00000.jsonl.gz:4
shard-00000.jsonl.gz:4
apache-2.0
{"document_rank":"-1","document_score":"0.0","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.78737646","0.7743277","0.76780003","0.76587296","0.7625746","0.7576448","0.7566445","0.754901","0.7547995","0.7547995","0.7546563","0.7531728","0.74989444","0....
default
train
[ 158, 137, 121, 8, 70, 29, 53, 244, 189, 137, 93, 58, 199, 55, 149, 158, 102, 38, 220, 235, 185, 163, 245, 139, 193, 223, 133, 243, 252, 162, 210, 185 ]
5ddba455ab957fcd7dcb618bda7b462291f3cfa67cb03aceb7aa76ae852c5e02
ac2150588dcc816bf8fd3fe1d3d514c95dce483e2e72e38bd11d80df747bb7d9
SetName sets field value
func (o *QueueManager) SetName(v string) { o.Name = v }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:5
shard-00000.jsonl.gz:5
shard-00000.jsonl.gz:5
apache-2.0
{"document_rank":"-1","document_score":"0.0","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6978644","0.67127097","0.6554158","0.6535701","0.648949","0.6488116","0.64872724","0.64611167","0.641035","0.63914317","0.6386742","0.6377272","0.63651955","0....
default
train
[ 176, 219, 230, 116, 103, 186, 36, 122, 6, 102, 80, 29, 39, 43, 176, 75, 241, 205, 43, 22, 97, 143, 56, 117, 83, 46, 75, 11, 144, 197, 99, 17 ]
2e666b7bec99489a2132811f223f59fa353709583a836fd3ef75a70ea334a7a4
89ccab462f1123666dac2550588fdcd7c474c774b0a501d0035b818c5939691d
GetClusters returns the Clusters field value
func (o *QueueManager) GetClusters() []string { if o == nil { var ret []string return ret } return o.Clusters }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:6
shard-00000.jsonl.gz:6
shard-00000.jsonl.gz:6
apache-2.0
{"document_rank":"0","document_score":"0.76226926","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.7150111","0.70848936","0.7050372","0.69830257","0.69812804","0.68225586","0.6785897","0.67075115","0.67008924","0.66717374","0.6653548","0.6628853","0.65...
default
train
[ 229, 119, 235, 124, 199, 112, 253, 242, 181, 234, 166, 25, 220, 183, 229, 224, 203, 233, 222, 238, 196, 172, 3, 56, 216, 64, 183, 198, 13, 238, 54, 179 ]
bc1f0e9264f37d745fa29782a09d6df89789bba844c0f6989835a68d15f13f30
25a9b7328c6535b3b2885510230f3e1fdebbfdf10c36585843e0ce3de7e8d95a
GetClustersOk returns a tuple with the Clusters field value and a boolean to check if the value has been set.
func (o *QueueManager) GetClustersOk() (*[]string, bool) { if o == nil { return nil, false } return &o.Clusters, true }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:7
shard-00000.jsonl.gz:7
shard-00000.jsonl.gz:7
apache-2.0
{"document_rank":"0","document_score":"0.8224033","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6719827","0.65017885","0.6465093","0.646219","0.6398727","0.63660103","0.63552487","0.63049424","0.627333","0.62654936","0.62586135","0.6258082","0.621213...
default
train
[ 190, 191, 22, 49, 80, 197, 15, 220, 163, 91, 108, 19, 36, 75, 220, 66, 201, 39, 211, 229, 244, 145, 126, 156, 201, 26, 157, 194, 88, 247, 22, 165 ]
2379b1e722d454fb2c3a6f62bc0e4634038687b581a8feb8ce95b6f61a5edc70
4344f8cf1fb7d77725f89e4d706a2e2ab37fe154897e4281a85645b667f49dbd
SetClusters sets field value
func (o *QueueManager) SetClusters(v []string) { o.Clusters = v }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:8
shard-00000.jsonl.gz:8
shard-00000.jsonl.gz:8
apache-2.0
{"document_rank":"0","document_score":"0.680183","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.623222","0.5735698","0.55403745","0.5447475","0.5413994","0.5402886","0.53507334","0.5320656","0.5263007","0.5236094","0.52265227","0.52218485","0.52067995...
default
train
[ 14, 81, 9, 86, 216, 127, 7, 158, 239, 157, 72, 55, 166, 37, 141, 37, 129, 111, 38, 21, 152, 160, 255, 184, 169, 220, 85, 216, 200, 89, 51, 200 ]
834d5a95faf9990af1ebba514268f41764d41c22dc2dbccd1766403fe82a1641
9c47b480a2f985b9a7f1d00139ad1425155b9e9deaede0a0877ddbbcbd5faa84
GetAliasQueues returns the AliasQueues field value
func (o *QueueManager) GetAliasQueues() []AliasQueue { if o == nil { var ret []AliasQueue return ret } return o.AliasQueues }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:9
shard-00000.jsonl.gz:9
shard-00000.jsonl.gz:9
apache-2.0
{"document_rank":"0","document_score":"0.7781025","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.69151425","0.6435573","0.6247431","0.6227677","0.6098082","0.59897524","0.58581173","0.5692911","0.56441885","0.5639317","0.5635707","0.54951936","0.54639...
default
train
[ 170, 112, 245, 105, 103, 222, 227, 200, 0, 130, 86, 207, 193, 69, 155, 132, 109, 89, 31, 191, 246, 63, 135, 65, 250, 222, 179, 217, 32, 159, 159, 142 ]
f94e7c3d41fb29ba6fee4bccdcc3a4f181ed51eddb2f4462be7ebacd72ec61c2
93852321aefa674f692b0f4929fa2cd367961a0b014df38f5bf529d99ce35149
GetAliasQueuesOk returns a tuple with the AliasQueues field value and a boolean to check if the value has been set.
func (o *QueueManager) GetAliasQueuesOk() (*[]AliasQueue, bool) { if o == nil { return nil, false } return &o.AliasQueues, true }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:10
shard-00000.jsonl.gz:10
shard-00000.jsonl.gz:10
apache-2.0
{"document_rank":"0","document_score":"0.8438502","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.62684894","0.6182187","0.6036427","0.5732854","0.55811864","0.5505796","0.5485279","0.54428786","0.535559","0.5352854","0.52992433","0.5274927","0.5233722...
default
train
[ 192, 77, 167, 135, 182, 104, 96, 128, 88, 167, 42, 11, 211, 249, 26, 11, 150, 122, 185, 189, 163, 174, 224, 112, 115, 240, 106, 160, 80, 196, 109, 112 ]
aa2f2c58f25f96ef0a43269b26125fe7e15e5a959bb8dfd6749ed5e0109362c7
f3aba8a651a0e8dcf868bd569f671b8bdbca4ce6260238cb75be6771a9912b02
SetAliasQueues sets field value
func (o *QueueManager) SetAliasQueues(v []AliasQueue) { o.AliasQueues = v }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:11
shard-00000.jsonl.gz:11
shard-00000.jsonl.gz:11
apache-2.0
{"document_rank":"0","document_score":"0.6917118","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.58699656","0.5864439","0.5774504","0.57054865","0.56945664","0.5664903","0.5560596","0.5487568","0.54635847","0.54438704","0.54421866","0.54008865","0.536...
default
train
[ 154, 91, 216, 124, 140, 71, 151, 71, 55, 202, 229, 35, 31, 246, 45, 114, 246, 211, 56, 120, 8, 253, 29, 148, 223, 49, 59, 243, 238, 117, 12, 148 ]
1db5c5ee91708a9d88e428bd932967f7e9d0fa522714402b83e7b2f59bdc7cc4
845559559d27b2d26a8899046468f0521e13d0f7cb312fe4cf1b07f2f44c12d1
GetRemoteQueues returns the RemoteQueues field value
func (o *QueueManager) GetRemoteQueues() []RemoteQueue { if o == nil { var ret []RemoteQueue return ret } return o.RemoteQueues }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:12
shard-00000.jsonl.gz:12
shard-00000.jsonl.gz:12
apache-2.0
{"document_rank":"0","document_score":"0.76292956","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.71619385","0.61695373","0.6127869","0.6031343","0.5995589","0.5916818","0.58918214","0.5793508","0.57635283","0.57260025","0.57182837","0.56593096","0.55...
default
train
[ 223, 79, 104, 186, 36, 111, 3, 177, 84, 195, 237, 12, 164, 129, 56, 168, 2, 175, 179, 185, 24, 197, 101, 168, 24, 182, 198, 45, 254, 155, 8, 55 ]
18571a055ba77b209e5d962a9ecbc6ef77304811ec956507fceeb3f438c50036
2a64739bae92c6147b8fb0754ab7b8a002183d777ea983e8539c5bb4216a4f84
GetRemoteQueuesOk returns a tuple with the RemoteQueues field value and a boolean to check if the value has been set.
func (o *QueueManager) GetRemoteQueuesOk() (*[]RemoteQueue, bool) { if o == nil { return nil, false } return &o.RemoteQueues, true }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:13
shard-00000.jsonl.gz:13
shard-00000.jsonl.gz:13
apache-2.0
{"document_rank":"0","document_score":"0.8458737","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.63053876","0.61726433","0.5913533","0.5784514","0.57285035","0.533683","0.53098166","0.52802896","0.5174174","0.5162988","0.5104646","0.50820893","0.50446...
default
train
[ 119, 104, 48, 92, 5, 210, 131, 74, 175, 54, 139, 187, 225, 55, 110, 91, 190, 182, 192, 186, 74, 105, 19, 176, 165, 29, 151, 149, 128, 13, 185, 177 ]
a7068f435d6803ab9d52638f067ed2c123f28d131d674915cf91f217ae31a3fe
28f55b51a2cff9a79928bd9b140204a1a76920879c429b10b20e33affdd08136
SetRemoteQueues sets field value
func (o *QueueManager) SetRemoteQueues(v []RemoteQueue) { o.RemoteQueues = v }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:14
shard-00000.jsonl.gz:14
shard-00000.jsonl.gz:14
apache-2.0
{"document_rank":"0","document_score":"0.68890077","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6111192","0.59353924","0.5917593","0.59074235","0.584018","0.5630969","0.56206805","0.5559726","0.547905","0.53623676","0.53450924","0.5335673","0.527478...
default
train
[ 83, 224, 142, 144, 7, 193, 173, 145, 28, 43, 107, 131, 159, 245, 34, 86, 90, 0, 17, 36, 29, 176, 17, 155, 28, 235, 124, 102, 71, 174, 220, 232 ]
119962764ceb5ca01401cd08b0db31c1b900c85eb47b35ebdfbb9605f50ea471
16964698adf27d9833153db2248d44b168bebb4adb931004c7a0eb9940c24c97
GetClusterQueues returns the ClusterQueues field value
func (o *QueueManager) GetClusterQueues() []ClusterQueue { if o == nil { var ret []ClusterQueue return ret } return o.ClusterQueues }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:15
shard-00000.jsonl.gz:15
shard-00000.jsonl.gz:15
apache-2.0
{"document_rank":"0","document_score":"0.741813","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6691833","0.6425696","0.6164038","0.6133957","0.6117693","0.6031181","0.60217136","0.5825728","0.57695156","0.57689","0.5742274","0.56948394","0.55601054",...
default
train
[ 75, 234, 72, 107, 239, 149, 124, 141, 95, 112, 49, 152, 35, 244, 30, 123, 182, 170, 199, 29, 136, 118, 20, 61, 85, 22, 7, 59, 155, 86, 46, 21 ]
4e79d51964278e189bea3cdf3731e688486dee1d7100932ba3c5f7624b082f53
1420b9e2e9679ed19b816333c8a1e039bcc2feb353d82034ee46bd48590cd175
GetClusterQueuesOk returns a tuple with the ClusterQueues field value and a boolean to check if the value has been set.
func (o *QueueManager) GetClusterQueuesOk() (*[]ClusterQueue, bool) { if o == nil { return nil, false } return &o.ClusterQueues, true }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:16
shard-00000.jsonl.gz:16
shard-00000.jsonl.gz:16
apache-2.0
{"document_rank":"0","document_score":"0.832443","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.64735645","0.64523965","0.6035547","0.58038056","0.53999776","0.53208125","0.5234418","0.5219659","0.5205979","0.51352835","0.5088557","0.5061583","0.50474...
default
train
[ 128, 149, 241, 31, 54, 149, 96, 105, 113, 205, 215, 232, 75, 250, 199, 39, 127, 89, 135, 123, 197, 23, 222, 126, 17, 210, 88, 145, 98, 72, 137, 200 ]
20c0eca3782aa2352dc0d46f7599bc3d0866df490f3fc01df994b484284f3e2d
3033967f6767d20f8882413df55731b581f0880b7563dd102e385dae92075a7b
SetClusterQueues sets field value
func (o *QueueManager) SetClusterQueues(v []ClusterQueue) { o.ClusterQueues = v }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:17
shard-00000.jsonl.gz:17
shard-00000.jsonl.gz:17
apache-2.0
{"document_rank":"2","document_score":"0.6035805","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.60655606","0.60586584","0.5939442","0.58560574","0.57875776","0.5729049","0.5456519","0.54093945","0.52865255","0.5281743","0.5238613","0.520454","0.52021...
default
train
[ 204, 167, 50, 197, 169, 54, 8, 241, 174, 232, 65, 113, 7, 132, 166, 41, 165, 215, 47, 8, 10, 89, 229, 40, 138, 94, 243, 1, 240, 170, 222, 177 ]
1dab70b44b4f45546cefc9fd0aa20c56ff7a0cf979ae71eab4dd79d3e991ad2e
58d8d2bcc66d32c0b4f0fcd76f790d95a8d3d73fd8af039b176c1beeab447753
Is the tiploc one for this station
func (bf *boardFilter) atStation(tpl string) bool { for _, s := range bf.res.Station { if s == tpl { return true } } return false }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:18
shard-00000.jsonl.gz:18
shard-00000.jsonl.gz:18
apache-2.0
{"document_rank":"11","document_score":"0.5378452","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.67006546","0.66539073","0.63916194","0.59491193","0.56473047","0.5592531","0.55731654","0.55731654","0.54852706","0.54088384","0.54081464","0.5377661","0...
default
train
[ 166, 43, 121, 15, 176, 228, 235, 10, 61, 203, 156, 169, 174, 105, 65, 1, 46, 111, 183, 77, 193, 178, 145, 107, 104, 35, 185, 145, 92, 153, 1, 166 ]
5a968b459484613c7434a816828baa26f972e6d7f85916f089e0479150bf5975
27a334031684b90236ac2c4fb019d01f5462de018b40aa678f20f9bb90525f12
Does the service call at a specific station
func (bf *boardFilter) callsAt(callingPoints []darwind3.CallingPoint, tpls []string) bool { for _, cp := range callingPoints { for _, tpl := range tpls { if tpl == cp.Tiploc { return true } } } return false }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:19
shard-00000.jsonl.gz:19
shard-00000.jsonl.gz:19
apache-2.0
{"document_rank":"-1","document_score":"0.0","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.59751016","0.59400904","0.5820535","0.5803581","0.57665825","0.56083244","0.5489674","0.5329984","0.5267891","0.5153535","0.5140189","0.510179","0.50758654","0...
default
train
[ 3, 143, 104, 26, 181, 197, 180, 99, 91, 95, 143, 200, 82, 96, 3, 104, 178, 139, 237, 104, 58, 18, 93, 48, 186, 62, 22, 172, 198, 113, 190, 171 ]
b23c92140ca6fd3ab8ee12396772445ad657ff071a12af56c14b2abee5963faa
e7c57cc777245201ec02e6186fe45406be3ea1be9ee3219d2a2611e19f269197
Add a tiploc to the result so that it will be included in the tiploc map
func (bf *boardFilter) addTiploc(tiploc string) { if tiploc != "" { bf.tiplocs[tiploc] = nil } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:20
shard-00000.jsonl.gz:20
shard-00000.jsonl.gz:20
apache-2.0
{"document_rank":"0","document_score":"0.66976255","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6330537","0.5318772","0.49911645","0.49783835","0.48557892","0.48480755","0.48384988","0.48337668","0.47259057","0.47020352","0.4641511","0.4637678","0.4...
default
train
[ 13, 75, 80, 104, 75, 236, 73, 219, 37, 205, 165, 144, 235, 178, 22, 100, 242, 71, 128, 57, 56, 165, 93, 140, 10, 232, 44, 125, 220, 249, 28, 175 ]
1a9fb8b31dab03b9482eb8d518328c22f84999e6668fed14bf81d82d82f9b6c2
701736c3fd4fffc6fb689155f27ba649e265d2bd2914c3880b4bf55162ba0b26
Add a ViaResolveRequest to the response
func (bf *boardFilter) addVia(rid, dest string) *darwinref.ViaResolveRequest { viaRequest := &darwinref.ViaResolveRequest{ Crs: bf.station.Crs, Destination: dest, } bf.vias[rid] = viaRequest return viaRequest }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:21
shard-00000.jsonl.gz:21
shard-00000.jsonl.gz:21
apache-2.0
{"document_rank":"17","document_score":"0.48631617","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.60127324","0.57031727","0.5662719","0.55577856","0.54912895","0.54861164","0.5339197","0.5312581","0.5171849","0.51083773","0.5107675","0.505698","0.502...
default
train
[ 60, 56, 161, 220, 198, 77, 3, 203, 247, 187, 14, 105, 112, 179, 204, 163, 40, 123, 118, 135, 148, 104, 85, 111, 96, 141, 212, 245, 37, 150, 178, 226 ]
567544fa48f05c340e2eafc975bcf616644525c169f488e0f02c497742da9266
e07f049999951c0fdcd786b7cca7cd8a2af3334140a0faf5e6b31d44c72416ad
Process calling points so that we generate the appropriate via and include their tiplocs
func (bf *boardFilter) processCallingPoints(s ldb.Service) { if len(s.CallingPoints) > 0 { viaRequest := bf.addVia(s.RID, s.CallingPoints[len(s.CallingPoints)-1].Tiploc) for _, cp := range s.CallingPoints { bf.addTiploc(cp.Tiploc) viaRequest.AppendTiploc(cp.Tiploc) } } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:22
shard-00000.jsonl.gz:22
shard-00000.jsonl.gz:22
apache-2.0
{"document_rank":"0","document_score":"0.72903216","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.5804814","0.55561084","0.54828817","0.54530644","0.5207425","0.51024735","0.5098401","0.50678176","0.5043976","0.50209445","0.49973452","0.49861223","0.4...
default
train
[ 179, 225, 116, 82, 16, 76, 149, 227, 158, 234, 162, 130, 109, 106, 156, 226, 19, 244, 23, 151, 146, 229, 196, 62, 96, 101, 57, 197, 74, 94, 165, 93 ]
2b4fbbbff764a36dd38f2fc7062d5324c5f4c18f3b29d63ffb5d293c8e152ffd
3e74e83807f32c6c2786e86f85e14cc80c6e909f8a155850e3674bb43e1c0d40
Process any associations, pulling in their schedules
func (bf *boardFilter) processAssociations(s ldb.Service) { for _, assoc := range s.Associations { assoc.AddTiplocs(bf.tiplocs) //if assoc.IsJoin() || assoc.IsSplit() { ar := assoc.Main.RID ai := assoc.Main.LocInd if ar == s.RID { ar = assoc.Assoc.RID ai = assoc.Assoc.LocInd } // Resolve the sche...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:23
shard-00000.jsonl.gz:23
shard-00000.jsonl.gz:23
apache-2.0
{"document_rank":"0","document_score":"0.6897732","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.56238943","0.52930427","0.523047","0.5199952","0.5147988","0.5058819","0.50440824","0.5031958","0.50148183","0.49584836","0.492599","0.48424038","0.479395...
default
train
[ 46, 88, 173, 157, 65, 226, 48, 123, 81, 131, 181, 106, 205, 70, 62, 73, 3, 29, 174, 161, 95, 17, 30, 105, 4, 213, 148, 207, 6, 239, 51, 176 ]
ccd683da03b0dded6391a5cdf367811a409dc1cd98e3d551584962de92e7faac
d2554bc2a3ca4d1a22dd75addfff8517d03e7acf4a9c58a93d5d3a04d9529f3f
acceptService returns true if the service is to be accepted, false if it's to be ignored
func (bf *boardFilter) acceptService(service ldb.Service) bool { // Original requirement, must have an RID if service.RID == "" { return false } // remove terminating services if bf.terminated && bf.atStation(service.Destination) { return false } if bf.callAt && !bf.callsAt(service.CallingPoints, bf.callAt...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:24
shard-00000.jsonl.gz:24
shard-00000.jsonl.gz:24
apache-2.0
{"document_rank":"0","document_score":"0.75590676","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.63734","0.6060541","0.59677523","0.58842057","0.5720938","0.5569348","0.5523225","0.54433316","0.5340439","0.53300637","0.5299485","0.5284296","0.52749",...
default
train
[ 55, 40, 7, 187, 173, 69, 118, 66, 89, 148, 183, 8, 166, 129, 117, 5, 81, 189, 224, 12, 77, 73, 8, 134, 166, 110, 2, 225, 113, 165, 135, 136 ]
f4586dc35619fe2721d8afc874a193d7c7713b14ef72ffe30ade4bc6c4b21855
05841905ca7eb6d4391141906a59416d46872b6baa03eb051f7f55da487b3e69
NewSettingsDialog(parent widgets.QWidget, flags) is automatically generated
func (sd *SettingsDialog) OpenSettingsDialog() { if !sd.isDisplayInited { sd.__init_display() } sd.populateFields() sd.Open() }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:25
shard-00000.jsonl.gz:25
shard-00000.jsonl.gz:25
apache-2.0
{"document_rank":"5","document_score":"0.56048965","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6050621","0.6031621","0.5928538","0.58055913","0.57716674","0.51237786","0.5116521","0.51071554","0.5070288","0.49982792","0.4967534","0.4916568","0.4900...
default
train
[ 251, 242, 140, 222, 212, 36, 238, 49, 159, 44, 207, 246, 26, 110, 205, 252, 83, 71, 73, 83, 149, 115, 15, 21, 46, 172, 204, 233, 51, 159, 235, 81 ]
cb3b08b83ae6279a9450127437c2f336267b6dfe00488365db80a289755a5a6e
e82eb025c9c8ca4e84185f279e18eec6f823e06073c61782c525d9e636eb66fd
/ Send file to server in app dir, used for making dockercompose and nginx configuration available.
func Upload( src, dest string ) ( err error ) { cfg, err := config.Read() if err != nil { return } connString := "leo-deploy@" + cfg.ServerName dest = connString + ":apps/" + cfg.AppName + "/" + dest fmt.Printf( "Copying %s into %s\n", src, dest ) out, err := exec.Command( "scp", src, dest ).CombinedOutput() fm...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:26
shard-00000.jsonl.gz:26
shard-00000.jsonl.gz:26
apache-2.0
{"document_rank":"-1","document_score":"0.0","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.68540484","0.64961594","0.6205975","0.6052243","0.5979095","0.5941416","0.5835912","0.58248794","0.5780296","0.5768345","0.5687944","0.5671151","0.56280226","0...
default
train
[ 20, 121, 226, 109, 145, 117, 68, 180, 23, 69, 249, 116, 25, 227, 214, 70, 28, 119, 3, 108, 16, 204, 165, 47, 115, 193, 145, 61, 73, 126, 59, 168 ]
4e99cf5f2c74405d9e0ea4c2c323eab28b1f4dc47d3d39e16a4924e2d424e3d6
69ce265b6624fe47532b3858ffdf15bc215331a91ca83813dc084056e3ddbc07
List all the known records
func (s *sqlStore) List(opts ...store.ListOption) ([]string, error) { options := store.ListOptions{ Order: store.OrderAsc, } for _, o := range opts { o(&options) } db, queries, err := s.db(options.Database, options.Table) if err != nil { return nil, err } pattern := "%" if options.Prefix != "" { patte...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:27
shard-00000.jsonl.gz:27
shard-00000.jsonl.gz:27
apache-2.0
{"document_rank":"43","document_score":"0.58201265","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6895555","0.6680016","0.66310436","0.6533258","0.6475071","0.64534694","0.64447963","0.6441886","0.64385545","0.63736784","0.6371333","0.6340122","0.630...
default
train
[ 187, 200, 157, 37, 223, 58, 133, 250, 158, 56, 7, 3, 75, 100, 147, 18, 31, 251, 172, 136, 33, 15, 43, 190, 170, 192, 236, 8, 124, 211, 87, 39 ]
67dad1396113cfefb91e5bc97dfdf4ce2cac6d661c0c96653986cfe25699348e
539ebef99f8279cac6b0814f6eca4d13521170ad238c8838765a455bbc5e46df
rowsToRecords converts from pgx.Rows to []store.Record
func (s *sqlStore) rowsToRecords(rows pgx.Rows) ([]*store.Record, error) { var records []*store.Record for rows.Next() { var expiry *time.Time record := &store.Record{} metadata := make(Metadata) if err := rows.Scan(&record.Key, &record.Value, &metadata, &expiry); err != nil { return records, err } ...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:29
shard-00000.jsonl.gz:29
shard-00000.jsonl.gz:29
apache-2.0
{"document_rank":"0","document_score":"0.8269437","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6726777","0.67042124","0.62163883","0.6109386","0.6026409","0.59923404","0.58899695","0.58857733","0.5779613","0.5778647","0.5747893","0.56930035","0.5691...
default
train
[ 119, 122, 119, 15, 249, 66, 134, 235, 131, 176, 14, 187, 173, 142, 33, 59, 35, 144, 31, 183, 19, 160, 172, 147, 200, 3, 152, 227, 115, 58, 165, 159 ]
d858a0756c070fdca642045c8bcebae2257447b5e4ba4a22b217bb081ba578f7
ed12537caeb2afcfa38335c847354742cf630518265b00190aad923f426f3c1c
Read a single key
func (s *sqlStore) Read(key string, opts ...store.ReadOption) ([]*store.Record, error) { options := store.ReadOptions{ Order: store.OrderAsc, } for _, o := range opts { o(&options) } db, queries, err := s.db(options.Database, options.Table) if err != nil { return nil, err } // read one record if !optio...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:30
shard-00000.jsonl.gz:30
shard-00000.jsonl.gz:30
apache-2.0
{"document_rank":"-1","document_score":"0.0","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.7725113","0.7333868","0.7230678","0.7222155","0.7193259","0.71848077","0.71133333","0.7095759","0.7083336","0.6862008","0.68467087","0.68404","0.67486924","0.6...
default
train
[ 23, 65, 75, 79, 17, 183, 174, 192, 158, 20, 180, 68, 202, 171, 79, 139, 199, 45, 156, 121, 255, 155, 164, 94, 136, 191, 57, 37, 128, 65, 25, 166 ]
135946652f622785e1ad3d86d5d2352aae9a948318cdf8f2e997a31763dcc5ba
f894610def6807aa3cd67bd15523fa94ba3b2496e5576087f775911578be41bd
Delete records with keys
func (s *sqlStore) Delete(key string, opts ...store.DeleteOption) error { var options store.DeleteOptions for _, o := range opts { o(&options) } db, queries, err := s.db(options.Database, options.Table) if err != nil { return err } _, err = db.Exec(s.options.Context, queries.Delete, key) return err }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:31
shard-00000.jsonl.gz:31
shard-00000.jsonl.gz:31
apache-2.0
{"document_rank":"77","document_score":"0.56412256","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6760398","0.66280895","0.65578467","0.65088505","0.6401223","0.63470906","0.63015383","0.6252232","0.6213148","0.6193571","0.6180504","0.61795783","0.61...
default
train
[ 39, 233, 243, 229, 135, 35, 119, 71, 13, 180, 3, 31, 85, 171, 198, 21, 186, 213, 19, 255, 30, 137, 239, 109, 206, 87, 209, 17, 153, 150, 12, 166 ]
332878f875fce3de7fe13a270bb9a715cc44e50922e12d119ba9385c0d03f032
f646016808a1e0295199fbfe05ff56d764d04ce1dc5c51aabbeec5a17111dc0b
NewStore returns a new micro Store backed by sql
func NewStore(opts ...store.Option) store.Store { options := store.Options{ Database: defaultDatabase, Table: defaultTable, } for _, o := range opts { o(&options) } // new store s := new(sqlStore) s.options = options s.databases = make(map[string]DB) s.re = regexp.MustCompile("[^a-zA-Z0-9]+") go s...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:32
shard-00000.jsonl.gz:32
shard-00000.jsonl.gz:32
apache-2.0
{"document_rank":"39","document_score":"0.6265493","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.7291816","0.6905972","0.6899488","0.67929655","0.67790884","0.67777205","0.6675343","0.665811","0.6637835","0.66238797","0.6618824","0.66062766","0.66013...
default
train
[ 104, 222, 40, 14, 65, 25, 180, 244, 33, 51, 30, 131, 99, 104, 138, 80, 147, 199, 237, 213, 82, 14, 10, 19, 108, 17, 47, 193, 189, 223, 182, 169 ]
86c97ee8d061976ced02c8046a85c3ff9e42ac2b35d9e087d1bff3565f05f914
fbf149dcafbf95d2f700a77415888fe2511e79b68ab2487273aa5a37ad0ee28f
Easier getters to check whether those commands should be started or not
func (d *DB) startHourly(key string) bool { // Try to load this key, if not present then it can be started lastCall, err := d.loadTime(key) if err != nil { Log.Println("Command: ", key, " was never called") return true } return int(time.Since(lastCall).Hours()) > 0 }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:33
shard-00000.jsonl.gz:33
shard-00000.jsonl.gz:33
apache-2.0
{"document_rank":"-1","document_score":"0.0","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6994663","0.6508269","0.6502186","0.63603437","0.6129595","0.6112796","0.6082147","0.60248846","0.6018903","0.5977348","0.5970306","0.5944507","0.59397984","0....
default
train
[ 84, 81, 28, 11, 237, 51, 34, 207, 62, 26, 171, 221, 155, 230, 17, 143, 71, 23, 84, 221, 125, 34, 220, 195, 163, 72, 136, 241, 71, 215, 130, 3 ]
678b9f71f346ccc7a6b81a5892af59240d46129e69ea64b4bce23fbdaf46ea43
23d8f9047a84c3e70e2bf31b11267af829a75504386b319c8bd9d93ec09e21db
findConflict finds the index of the conflict. It returns the first pair of conflicting entries between the existing entries and the given entries, if there are any. If there is no conflicting entries, and the existing entries contains all the given entries, zero will be returned. If there is no conflicting entries, but...
func (l *LogStore) findConflict(entries []*pb.Entry) uint64 { // TODO: 会有第0个冲突么? for _, ne := range entries { if !l.matchTerm(ne.Index, ne.Term) { if ne.Index <= l.lastIndex() { l.logger.Info("log found conflict", zap.Uint64("conflictIndex", ne.Index), zap.Uint64("conflictTerm", ne.Term), zap....
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:34
shard-00000.jsonl.gz:34
shard-00000.jsonl.gz:34
apache-2.0
{"document_rank":"0","document_score":"0.6421718","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.46936142","0.42734542","0.42118675","0.41973543","0.41771796","0.41696936","0.41489935","0.41426665","0.41424075","0.41103593","0.4097609","0.40779626","0...
default
train
[ 126, 87, 160, 179, 171, 45, 117, 193, 227, 54, 24, 158, 153, 3, 157, 249, 16, 192, 51, 211, 220, 31, 193, 125, 82, 219, 16, 198, 112, 223, 20, 21 ]
70eba278de82f88891b6ee7fe5a57e638f70ca412b70f176cdf5c5f1f17be1d9
cf1c45e31245be59f2ca75a540fe1770a7be45d2967fda27c93827fa67c00d15
New creates a new crawler
func New(ctx context.Context, logger yolo.Logger, client *http.Client, filter FilterFunc, mapper Mapper) *Crawler { return &Crawler{ ctx: ctx, logger: logger, client: client, filter: filter, mapper: mapper, visitChan: make(chan visit, visitChanBuffer), toVisit: make(map[string]struct{}), } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:35
shard-00000.jsonl.gz:35
shard-00000.jsonl.gz:35
apache-2.0
{"document_rank":"8","document_score":"0.69358087","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.73082036","0.72865236","0.7228419","0.7207095","0.719269","0.70568573","0.7003078","0.6945463","0.68530333","0.6658365","0.6632175","0.6534232","0.639279...
default
train
[ 0, 175, 182, 156, 107, 210, 204, 39, 81, 160, 107, 246, 255, 182, 109, 0, 29, 9, 86, 137, 209, 88, 169, 197, 131, 71, 25, 97, 53, 140, 246, 193 ]
04372c735c3604369cc3e0536f1724c8da808fe6f6251a0c98953ea91cc7cb88
99afbb2f7b4e6cc3fa738b4d4376f5fe08eeb7955c88ab10da793ca160a2875c
Add adds one or more previously unadded urls to crawler to visit. source can be nil to indicate root. Returns a list of errors if any occured.
func (c *Crawler) Add(source *url.URL, uri ...*url.URL) []error { var errs []error for _, u := range uri { var err error u := u u.Fragment = "" // reset fragment, we don't want it messing our visited list if source != nil { u = source.ResolveReference(u) } if u.Scheme != "http" && u.Scheme != "http...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:36
shard-00000.jsonl.gz:36
shard-00000.jsonl.gz:36
apache-2.0
{"document_rank":"0","document_score":"0.7516235","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.5309802","0.52734095","0.52264124","0.5196098","0.51324165","0.5123398","0.5056944","0.496427","0.49161023","0.48829758","0.48795125","0.4875261","0.48127...
default
train
[ 111, 40, 116, 63, 247, 166, 206, 79, 140, 198, 246, 123, 242, 245, 78, 249, 84, 237, 59, 118, 219, 3, 154, 156, 61, 58, 36, 43, 23, 102, 125, 220 ]
a8e8c4d1ab259f7eb676e4cf6a84ded36e10fc860782e7c32a45354b9bb63368
d7998c3c412d564a3e5f1800d2bcc304237e33feb04daa5605ff5eca58a310fc
Run launches the worker pool and blocks until they all finish.
func (c *Crawler) Run(numWorkers int) { // Here we create a new cancellable context to control goroutines and requests. // We can't just rely on the parent context because we want to shutdown goroutines if there's no activity for some time. // Closing the channel would introduce "send on closed chan" errors since c...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:37
shard-00000.jsonl.gz:37
shard-00000.jsonl.gz:37
apache-2.0
{"document_rank":"-1","document_score":"0.0","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.8138579","0.7590641","0.7388474","0.7091481","0.70803887","0.7080261","0.6920038","0.6850398","0.67854327","0.67674756","0.67474246","0.668862","0.6676274","0....
default
train
[ 178, 104, 172, 87, 5, 4, 17, 218, 81, 203, 224, 65, 37, 243, 7, 186, 148, 80, 241, 201, 236, 194, 36, 128, 92, 235, 92, 229, 244, 132, 116, 202 ]
6c5d9945e8400eb4efbb66d4275faedee43bc3284dfa7ef421d99bd360629396
715fd5525697dea5ad78df0258a0fa9933dcd97adab7c57561fd806a6c8ad310
getSourcegraphVersion queries the Sourcegraph GraphQL API to get the current version of the Sourcegraph instance.
func (svc *Service) getSourcegraphVersion(ctx context.Context) (string, error) { var result struct { Site struct { ProductVersion string } } ok, err := svc.client.NewQuery(sourcegraphVersionQuery).Do(ctx, &result) if err != nil || !ok { return "", err } return result.Site.ProductVersion, err }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:38
shard-00000.jsonl.gz:38
shard-00000.jsonl.gz:38
apache-2.0
{"document_rank":"0","document_score":"0.80999446","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.5781868","0.5636606","0.5636606","0.5576799","0.55693847","0.5562794","0.55050653","0.549268","0.54771435","0.5471268","0.5450064","0.5450064","0.5440955...
default
train
[ 222, 89, 200, 149, 44, 21, 126, 162, 204, 0, 50, 17, 147, 141, 42, 45, 28, 228, 57, 40, 134, 66, 205, 13, 144, 189, 106, 56, 208, 167, 110, 105 ]
b87f2b5756dedc954f6d8fa9c28e21acb435539e55a49d6d6261a807b2bb8b96
e51b765b4b72c7322f6dcbb16a9e0f302f07a884c1b2a5571aa952e687cc313d
DetermineFeatureFlags fetches the version of the configured Sourcegraph instance and then sets flags on the Service itself to use features available in that version, e.g. gzip compression.
func (svc *Service) DetermineFeatureFlags(ctx context.Context) error { version, err := svc.getSourcegraphVersion(ctx) if err != nil { return errors.Wrap(err, "failed to query Sourcegraph version to check for available features") } return svc.features.setFromVersion(version) }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:39
shard-00000.jsonl.gz:39
shard-00000.jsonl.gz:39
apache-2.0
{"document_rank":"0","document_score":"0.78591985","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6283442","0.58581585","0.5759627","0.56996477","0.56361234","0.5633944","0.5601203","0.5553357","0.5548972","0.55474377","0.53957814","0.53191704","0.527...
default
train
[ 224, 156, 45, 89, 110, 83, 223, 89, 158, 246, 158, 66, 178, 221, 190, 185, 28, 132, 116, 97, 197, 130, 183, 24, 12, 126, 139, 99, 31, 228, 61, 157 ]
92415a7fe1b9a79c4423a58f7daf90b1e249aba296df280f806712d77b9eed40
7f4bfbb167a1b43ea50c14defd1432bfb590e6cd7d5df27a51b7f71b2df483df
Handler maps the different existing endpoints with the functions they must call
func Handler(a adding.Service, l listing.Service, d deleting.Service) *gin.Engine { router := gin.Default() router.GET("/movies", listMovies(l)) router.GET("/movies/:id", getMovie(l)) router.POST("/movies", addMovie(a)) router.DELETE("/movies/:id", deleteMovie(d)) return router }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:40
shard-00000.jsonl.gz:40
shard-00000.jsonl.gz:40
apache-2.0
{"document_rank":"-1","document_score":"0.0","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.66714734","0.6644675","0.635691","0.6305351","0.62427664","0.6203105","0.61850226","0.61681867","0.616791","0.6160118","0.6154112","0.6140186","0.61255753","0....
default
train
[ 232, 77, 56, 25, 104, 59, 253, 226, 155, 34, 151, 120, 4, 86, 221, 119, 231, 249, 243, 175, 158, 159, 103, 124, 161, 178, 34, 111, 170, 38, 122, 245 ]
5ade659aa8bc946d62d04d48f6de26d6786ec674af4bc00488a11a98250660ee
2611ede268480717b6d55bf47c993c0e9d0eb7a242468b41a3615dd86586f8a0
ApplyOptions applies given opts and returns the resulting Options. This function should not be used directly by end users; it's only exposed as a side effect of Option.
func ApplyOptions(opt ...Option) Options { opts := Options{ MaxTraversalLinks: math.MaxInt64, //default: traverse all MaxAllowedHeaderSize: carv1.DefaultMaxAllowedHeaderSize, MaxAllowedSectionSize: carv1.DefaultMaxAllowedSectionSize, } for _, o := range opt { o(&opts) } // Set defaults for zero valued...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:41
shard-00000.jsonl.gz:41
shard-00000.jsonl.gz:41
apache-2.0
{"document_rank":"7","document_score":"0.6390833","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.7181345","0.7011728","0.66453886","0.6608931","0.66003937","0.6593034","0.6515448","0.6360162","0.6322618","0.63175213","0.6217988","0.6186789","0.6160557...
default
train
[ 139, 235, 4, 130, 176, 177, 25, 124, 194, 240, 253, 171, 28, 235, 34, 177, 106, 75, 222, 141, 255, 74, 107, 144, 106, 167, 99, 57, 240, 145, 194, 54 ]
a156bfba496918b061650df20fad7c4cb0c0a0ef37980507c18e024080d43a61
37ea4fecea325fca1bae378444df0b1535b556eb77548d770303c367534d2396
ZeroLengthSectionAsEOF sets whether to allow the CARv1 decoder to treat a zerolength section as the end of the input CAR file. For example, this can be useful to allow "null padding" after a CARv1 without knowing where the padding begins.
func ZeroLengthSectionAsEOF(enable bool) Option { return func(o *Options) { o.ZeroLengthSectionAsEOF = enable } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:42
shard-00000.jsonl.gz:42
shard-00000.jsonl.gz:42
apache-2.0
{"document_rank":"0","document_score":"0.81493616","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.52038777","0.4886099","0.46940255","0.45598406","0.45515433","0.44806105","0.44333175","0.44333175","0.44333175","0.44333175","0.44333175","0.4400239","0...
default
train
[ 132, 35, 128, 24, 44, 191, 64, 36, 52, 204, 189, 170, 238, 134, 17, 249, 151, 163, 238, 254, 105, 5, 196, 5, 180, 253, 104, 7, 154, 229, 9, 65 ]
64c2f4604a2b4ad0f4056df14a924519f52c250eaeb8dac56c30838c1be0e022
53fbd3b04b2fa7f0cc14528a1d835f570822b3ee06df96499191fabe1d52eced
UseDataPadding sets the padding to be added between CARv2 header and its data payload on Finalize.
func UseDataPadding(p uint64) Option { return func(o *Options) { o.DataPadding = p } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:43
shard-00000.jsonl.gz:43
shard-00000.jsonl.gz:43
apache-2.0
{"document_rank":"0","document_score":"0.7320334","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.5258283","0.4555469","0.4480234","0.44573864","0.43533745","0.4337491","0.4326558","0.42585558","0.42437828","0.42047027","0.41544282","0.41253066","0.412...
default
train
[ 243, 192, 88, 15, 151, 200, 130, 246, 228, 63, 181, 144, 67, 51, 186, 108, 118, 42, 222, 231, 246, 149, 1, 30, 210, 215, 191, 119, 37, 244, 255, 141 ]
f1839b2b7667e8c5266751678c7bb94444e87a3c476748137956898197119d37
5206bd27849cbefba21c6bca535050dd887ccf4ca645b94e3c2e103d07e79332
UseIndexPadding sets the padding between data payload and its index on Finalize.
func UseIndexPadding(p uint64) Option { return func(o *Options) { o.IndexPadding = p } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:44
shard-00000.jsonl.gz:44
shard-00000.jsonl.gz:44
apache-2.0
{"document_rank":"0","document_score":"0.7548068","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.496226","0.49470598","0.49359372","0.4929836","0.48813668","0.48754716","0.48505393","0.47770718","0.47507846","0.4717412","0.47086638","0.47060275","0.46...
default
train
[ 170, 210, 81, 224, 126, 196, 63, 4, 61, 166, 68, 45, 95, 212, 109, 165, 33, 21, 206, 137, 20, 143, 99, 153, 58, 26, 185, 152, 158, 156, 237, 158 ]
49548e4a18ff444c0889a872515428bb7dab44a14a1c7d4a0839347a59285b90
7c3d401fc692b2c04d0e2eef1aa6b4cea93cc5a98faa4fdf68ea4778ecc6b2a6
UseIndexCodec sets the codec used for index generation.
func UseIndexCodec(c multicodec.Code) Option { return func(o *Options) { o.IndexCodec = c } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:45
shard-00000.jsonl.gz:45
shard-00000.jsonl.gz:45
apache-2.0
{"document_rank":"0","document_score":"0.8574102","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.5502938","0.52192473","0.51957196","0.51697326","0.5116415","0.5042837","0.50319487","0.48964846","0.48657367","0.48536038","0.48389342","0.4827276","0.48...
default
train
[ 181, 105, 167, 4, 45, 187, 55, 14, 58, 18, 236, 62, 163, 57, 217, 160, 108, 16, 10, 88, 238, 61, 98, 125, 211, 0, 104, 222, 185, 223, 115, 90 ]
34e264116b07ec4c8ebf7cb5880308decd12cb04bbe35b70a5fe17589c5ff2a9
4fa4c248564264c10e2f9fd2dcab73f1ac1879476a47f8a433dec01236260e20
WithoutIndex flags that no index should be included in generation.
func WithoutIndex() Option { return func(o *Options) { o.IndexCodec = index.CarIndexNone } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:46
shard-00000.jsonl.gz:46
shard-00000.jsonl.gz:46
apache-2.0
{"document_rank":"0","document_score":"0.7322742","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.62528235","0.6120058","0.6103179","0.5899328","0.5636369","0.56347483","0.56101","0.5556883","0.54259133","0.5418361","0.54178435","0.53887594","0.5346785...
default
train
[ 166, 48, 113, 222, 103, 121, 21, 234, 163, 179, 226, 2, 135, 60, 108, 157, 157, 202, 44, 26, 97, 94, 10, 4, 191, 54, 93, 196, 160, 229, 97, 143 ]
f52274dfd7db4e9c9349dc88c04dfbacb034263a567366199214367bdb70f2fd
fc77f0ccb88e7b861c13be729b44e3715e200ec4a52b6782ddd5ffb4189efa4e
StoreIdentityCIDs sets whether to persist sections that are referenced by CIDs with multihash.IDENTITY digest. When writing CAR files with this option, Characteristics.IsFullyIndexed will be set. By default, the blockstore interface will always return true for Has() called with identity CIDs, but when this option is tu...
func StoreIdentityCIDs(b bool) Option { return func(o *Options) { o.StoreIdentityCIDs = b } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:47
shard-00000.jsonl.gz:47
shard-00000.jsonl.gz:47
apache-2.0
{"document_rank":"0","document_score":"0.7659749","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.5328413","0.48285127","0.46915764","0.460706","0.45859408","0.45038688","0.4317314","0.43106538","0.4235155","0.42342368","0.42137128","0.41937977","0.418...
default
train
[ 216, 8, 8, 32, 91, 57, 251, 200, 253, 115, 33, 48, 140, 195, 24, 238, 48, 98, 142, 215, 226, 220, 160, 222, 245, 114, 228, 66, 164, 59, 128, 219 ]
e63578021808ddfb3fdab619b5ab9bfbba9c206e5280f66c32573be89d203379
bdd4ba801eaa00977ca2786f36eca31ed8c17b628ce9c350086dae110682d860
MaxIndexCidSize specifies the maximum allowed size for indexed CIDs in bytes. Indexing a CID with larger than the allowed size results in ErrCidTooLarge error.
func MaxIndexCidSize(s uint64) Option { return func(o *Options) { o.MaxIndexCidSize = s } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:48
shard-00000.jsonl.gz:48
shard-00000.jsonl.gz:48
apache-2.0
{"document_rank":"0","document_score":"0.8566187","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.54128367","0.5239222","0.5225754","0.5207175","0.517067","0.5167994","0.51654756","0.514978","0.5139812","0.5123632","0.51004505","0.5087268","0.50867826"...
default
train
[ 222, 73, 47, 39, 152, 105, 175, 59, 223, 231, 70, 237, 63, 63, 87, 24, 123, 93, 102, 249, 22, 227, 30, 43, 181, 204, 253, 7, 22, 59, 149, 22 ]
54ed7c602868bd16dfdd4dbd49d8361886e9964a9d4ad818aeb91d10e03fccc2
c5aa12ad1c7dd0f0c2aef0a27ed05f690d47175f467f7c778f0b2a5924befc2e
WithTraversalPrototypeChooser specifies the prototype chooser that should be used when performing traversals in writes from a linksystem.
func WithTraversalPrototypeChooser(t traversal.LinkTargetNodePrototypeChooser) Option { return func(o *Options) { o.TraversalPrototypeChooser = t } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:49
shard-00000.jsonl.gz:49
shard-00000.jsonl.gz:49
apache-2.0
{"document_rank":"0","document_score":"0.7862286","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.39877933","0.39078513","0.38892928","0.374556","0.37302673","0.36932385","0.35834628","0.33725303","0.336618","0.33358172","0.33044896","0.32975402","0.32...
default
train
[ 36, 108, 137, 234, 234, 160, 1, 13, 209, 191, 235, 253, 227, 79, 247, 87, 49, 173, 80, 166, 100, 96, 71, 254, 235, 109, 244, 218, 78, 197, 96, 35 ]
2d590df77b63c57d996d7b22d4ad081eadda6ad9e2b4b06fdbe475f91e3d3a24
03e53c648522de0fa9bb634e27e58345c8c162747fd720c7a80e464ddb3b61f7
WithTrustedCAR specifies whether CIDs match the block data as they are read from the CAR files.
func WithTrustedCAR(t bool) Option { return func(o *Options) { o.TrustedCAR = t } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:50
shard-00000.jsonl.gz:50
shard-00000.jsonl.gz:50
apache-2.0
{"document_rank":"0","document_score":"0.7244435","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.5050521","0.46469218","0.44809136","0.4400281","0.43353248","0.43324968","0.42241368","0.41937608","0.41843116","0.41048527","0.4037473","0.40296867","0.4...
default
train
[ 9, 235, 112, 129, 159, 52, 229, 132, 67, 149, 177, 9, 152, 130, 168, 47, 155, 80, 76, 179, 83, 150, 128, 185, 179, 110, 229, 228, 200, 41, 238, 241 ]
694d5b33a3d9468394617c995f688ed1b324ca54142c977a3aa8ca70d8243f2a
a2828f04dbc8970c6c15e0728c4fbe00a69ba74c786697b3369ac015091323d0
MaxAllowedHeaderSize overrides the default maximum size (of 32 MiB) that a CARv1 decode (including within a CARv2 container) will allow a header to be without erroring.
func MaxAllowedHeaderSize(max uint64) Option { return func(o *Options) { o.MaxAllowedHeaderSize = max } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:51
shard-00000.jsonl.gz:51
shard-00000.jsonl.gz:51
apache-2.0
{"document_rank":"0","document_score":"0.7392962","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.67647296","0.63822037","0.60273457","0.5796491","0.5741116","0.5712794","0.5712794","0.55037737","0.54724437","0.54210025","0.54210025","0.54165447","0.53...
default
train
[ 120, 134, 131, 83, 191, 134, 214, 113, 56, 203, 231, 104, 13, 180, 53, 206, 202, 52, 121, 110, 210, 162, 226, 219, 70, 224, 114, 210, 62, 84, 201, 207 ]
0e0bb1f5e12835b521dda7bb737f58e99de3167290674b0333daad736605e1e4
9b4e70c87896875e0a864031300ff91462adb9d7e012de409a12200706a0585a
MaxAllowedSectionSize overrides the default maximum size (of 8 MiB) that a CARv1 decode (including within a CARv2 container) will allow a header to be without erroring. Typically IPLD blocks should be under 2 MiB (ideally under 1 MiB), so unless atypical data is expected, this should not be a large value.
func MaxAllowedSectionSize(max uint64) Option { return func(o *Options) { o.MaxAllowedSectionSize = max } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:52
shard-00000.jsonl.gz:52
shard-00000.jsonl.gz:52
apache-2.0
{"document_rank":"0","document_score":"0.6830897","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.64527285","0.56640345","0.5559902","0.5421008","0.5421008","0.5341554","0.5331863","0.53089076","0.519577","0.5166597","0.51638806","0.5088928","0.5074577...
default
train
[ 209, 141, 20, 19, 161, 189, 75, 138, 100, 150, 213, 250, 61, 142, 179, 60, 207, 179, 173, 205, 137, 124, 25, 192, 2, 144, 190, 86, 230, 103, 242, 54 ]
df40e4140b039894628cf98b9b9c9a81a27c53dc298b7d93b76fa33086b6a362
d091425ca9a89d717fd2acede4a1beed2fbd6c282dd9f8e5370f9f69e1fb59b6
WriteAsCarV1 is a write option which makes a CAR interface (blockstore or storage) write the output as a CARv1 only, with no CARv2 header or index. Indexing is used internally during write but is discarded upon finalization. Note that this option only affects the storage interfaces (blockstore or storage), and is ignor...
func WriteAsCarV1(asCarV1 bool) Option { return func(o *Options) { o.WriteAsCarV1 = asCarV1 } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:53
shard-00000.jsonl.gz:53
shard-00000.jsonl.gz:53
apache-2.0
{"document_rank":"0","document_score":"0.8315218","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.48664775","0.44362253","0.43605676","0.43476164","0.4318693","0.42778337","0.42568678","0.4225701","0.4217781","0.41908678","0.41819924","0.41723937","0.4...
default
train
[ 238, 197, 239, 98, 93, 90, 247, 15, 60, 78, 25, 142, 85, 232, 167, 76, 247, 111, 9, 83, 88, 115, 128, 224, 107, 97, 26, 165, 114, 61, 88, 180 ]
1ef79589a9f3fb5e2601b7c7bc3fe0e7324cd0f64260e1cbe5509d08475023a6
13ed405d2df9e0beffe37a774067c47ec6f7f97c4cd26ae7d4f723f08e2a6da3
AllowDuplicatePuts is a write option which makes a CAR interface (blockstore or storage) not deduplicate blocks in Put and PutMany. The default is to deduplicate, which matches the current semantics of goipfsblockstore v1. Note that this option only affects the storage interfaces (blockstore or storage), and is ignored...
func AllowDuplicatePuts(allow bool) Option { return func(o *Options) { o.BlockstoreAllowDuplicatePuts = allow } }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:54
shard-00000.jsonl.gz:54
shard-00000.jsonl.gz:54
apache-2.0
{"document_rank":"0","document_score":"0.8344131","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.5433435","0.51779854","0.5121265","0.45189086","0.44898877","0.43579203","0.43035212","0.42886138","0.4212644","0.4183098","0.4140767","0.4131019","0.4093...
default
train
[ 231, 178, 155, 104, 142, 185, 13, 15, 120, 26, 154, 191, 82, 81, 96, 163, 25, 180, 28, 221, 100, 139, 19, 245, 173, 219, 84, 204, 12, 141, 138, 94 ]
5652fbc5b119b13e06c673aa4f3f677c71629fd8321a54f4101a3fcc2f218ec5
1177293da3561ea3da469a118c49118914a65047222bbbd039ca51b563769d55
Hours returns the duration as a floating point number of hours.
func (d Duration) Hours() float64 { return time.Duration(d).Hours() }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:55
shard-00000.jsonl.gz:55
shard-00000.jsonl.gz:55
apache-2.0
{"document_rank":"2","document_score":"0.73899436","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.8240469","0.7533591","0.7021137","0.6808942","0.6702991","0.64857084","0.6369934","0.6315462","0.62868947","0.6244098","0.6225003","0.61721426","0.609861...
default
train
[ 119, 179, 54, 247, 92, 107, 107, 86, 4, 60, 167, 11, 29, 157, 17, 224, 96, 238, 227, 222, 104, 244, 15, 144, 210, 218, 244, 142, 2, 174, 143, 6 ]
eeac6ecc4745a52e482a0e0b943f88e42a79eb6c701075da9c700e62e1b4fe3d
755c1de479176d98cefc6e08a8fd81ba1835232bd78172e09ce6980fb15b305a
Minutes returns the duration as a floating point number of minutes.
func (d Duration) Minutes() float64 { return time.Duration(d).Minutes() }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:56
shard-00000.jsonl.gz:56
shard-00000.jsonl.gz:56
apache-2.0
{"document_rank":"0","document_score":"0.6980067","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.67800033","0.67238533","0.671037","0.671037","0.6626685","0.64240044","0.6328356","0.61948246","0.6168142","0.6068626","0.6063561","0.6036192","0.6029605"...
default
train
[ 125, 137, 100, 207, 71, 230, 216, 248, 100, 111, 196, 129, 218, 7, 107, 204, 72, 68, 206, 164, 66, 217, 19, 123, 38, 8, 55, 30, 177, 137, 79, 195 ]
e1ecbac88dd0f2ad040765f95d20c100c66ddf39d18f1af79dfcd077fbc24875
2a1c580c43ec9dfb128653e523543192ac076d94203fa4aa0aae91aa1691bb52
Nanoseconds returns the duration as an integer nanosecond count.
func (d Duration) Nanoseconds() int64 { return time.Duration(d).Nanoseconds() }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:57
shard-00000.jsonl.gz:57
shard-00000.jsonl.gz:57
apache-2.0
{"document_rank":"0","document_score":"0.81052667","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.7365707","0.71677697","0.71562576","0.7091952","0.68987876","0.68987876","0.68987876","0.68987876","0.6809148","0.66780186","0.66759145","0.6439207","0.6...
default
train
[ 179, 191, 185, 102, 159, 253, 10, 56, 236, 110, 185, 71, 10, 222, 186, 29, 143, 127, 104, 174, 83, 90, 55, 121, 14, 99, 163, 14, 161, 242, 184, 192 ]
a5770af302db14fcc9c44b5c7042cabc847057271888ef350f580bc24d84ed91
96d966cde3c6722b109f8c0313c36cbee075f51e22e267d32e9bbd24c2fea520
Returns a string representation of the duration in russian language
func (d Duration) String() (result string) { var seconds, minutes, hours int seconds = int(d.Seconds()) if seconds > 60 { minutes = (seconds - seconds%60) / 60 seconds = seconds % 60 } if minutes > 59 { hours = (minutes - minutes%60) / 60 minutes = minutes - hours*60 result = numberInString(hours, false)...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:59
shard-00000.jsonl.gz:59
shard-00000.jsonl.gz:59
apache-2.0
{"document_rank":"13","document_score":"0.5642375","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6247409","0.61673176","0.58863103","0.58602095","0.58570576","0.5843788","0.57781535","0.57749504","0.5758013","0.5729817","0.57266206","0.56786615","0.5...
default
train
[ 177, 42, 135, 243, 238, 198, 247, 47, 118, 143, 2, 67, 92, 220, 53, 251, 125, 224, 46, 66, 70, 89, 250, 34, 40, 210, 47, 173, 100, 52, 198, 28 ]
953c2641076af9d5a8bcd94632f28638a2b1b403112558627d7fc33ea96d9396
ca5ef3f996d418a44c42ae6f27510cebf9090a53ac9f174a220688bcc5a76978
Returns a string representation of the approximate duration in russian language
func (d Duration) StringApproximate() (result string) { var seconds, minutes, hours, days, months, years int seconds = int(d.Seconds()) if seconds > 60 { minutes = int(d.Minutes()) } if minutes > 59 { hours = int(d.Hours()) minutes = minutes - hours*60 } if hours > 24 { days = (hours - hours%24) / 24 h...
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:60
shard-00000.jsonl.gz:60
shard-00000.jsonl.gz:60
apache-2.0
{"document_rank":"0","document_score":"0.6517362","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.6004345","0.5819394","0.5691862","0.5682199","0.5630542","0.55865556","0.5574526","0.5537256","0.5509831","0.5462976","0.5461879","0.5460645","0.54367495"...
default
train
[ 12, 51, 211, 230, 12, 11, 118, 177, 150, 80, 83, 18, 201, 251, 2, 222, 180, 107, 46, 248, 65, 157, 152, 254, 77, 163, 9, 61, 201, 86, 4, 74 ]
a3e68095bc989570819059fb3a21bcd3bdf640f68874495d663d5296324216af
44837fc5b71515216d4688e7a5d537b6a2797d68bc9866cc0d4e7932e53ca6ff
AddLabel adds a label to the specified PR or issue
func (fc *fakeClient) AddLabel(owner, repo string, number int, label string) error { fc.added = append(fc.added, label) fc.labels = append(fc.labels, label) return nil }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:61
shard-00000.jsonl.gz:61
shard-00000.jsonl.gz:61
apache-2.0
{"document_rank":"3","document_score":"0.72734094","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.75481737","0.75481737","0.7350045","0.71433645","0.7023004","0.6740278","0.655589","0.64857525","0.6314333","0.62937886","0.62546927","0.62197626","0.619...
default
train
[ 70, 195, 66, 202, 233, 82, 250, 229, 8, 223, 224, 64, 68, 144, 64, 49, 228, 189, 145, 229, 115, 142, 81, 249, 96, 228, 235, 111, 187, 224, 135, 61 ]
9892b33e61804655a810b3626f04f66091f35856bc21b6ec420fcb956d2de7c5
60651a9f4358eb475dc72c11726ecd57403d31471bd5b39c0d8b5ceef429ca23
RemoveLabel removes the label from the specified PR or issue
func (fc *fakeClient) RemoveLabel(owner, repo string, number int, label string) error { fc.removed = append(fc.removed, label) // remove from existing labels for k, v := range fc.labels { if label == v { fc.labels = append(fc.labels[:k], fc.labels[k+1:]...) break } } return nil }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:62
shard-00000.jsonl.gz:62
shard-00000.jsonl.gz:62
apache-2.0
{"document_rank":"2","document_score":"0.7706561","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.7710544","0.7710544","0.7190297","0.7131391","0.69650364","0.6953825","0.68455964","0.66010845","0.65678805","0.6539643","0.63907325","0.63030523","0.6289...
default
train
[ 73, 10, 55, 205, 241, 161, 39, 116, 226, 5, 202, 55, 167, 64, 210, 30, 155, 140, 83, 191, 143, 181, 41, 39, 6, 61, 177, 121, 212, 51, 94, 62 ]
adb1646a4b19e279ce5e80dd46f6ce6c21a8522252662d56d28e70f809e70eca
2622082799137be61abd1d990a7b55b494a2843a0a7fc67f9014fcd1795cddd7
GetIssueLabels gets the current labels on the specified PR or issue
func (fc *fakeClient) GetIssueLabels(owner, repo string, number int) ([]github.Label, error) { var la []github.Label for _, l := range fc.labels { la = append(la, github.Label{Name: l}) } return la, nil }
text
code
text_to_code
go
en
1
1
nomic-ai/cornstack-go-v1
default
train
570a654bad26af77c7a9f8d719ff3549105da5f9
shard-00000.jsonl.gz:63
shard-00000.jsonl.gz:63
shard-00000.jsonl.gz:63
apache-2.0
{"document_rank":"0","document_score":"0.8116904","metadata":{"objective":{"paired":[],"self":[],"triplet":[["query","document","negatives"]]}},"negative_scores":["0.8113356","0.7227975","0.70755315","0.7042123","0.70022243","0.6956072","0.69555527","0.6602383","0.65491056","0.65308553","0.6387276","0.63280463","0.6320...
default
train
[ 8, 158, 204, 157, 53, 248, 8, 77, 57, 233, 40, 130, 220, 94, 232, 217, 61, 128, 241, 44, 103, 124, 46, 225, 6, 56, 219, 0, 127, 137, 252, 129 ]
End of preview. Expand in Data Studio

Code QA Unified

88,234,786 unique positive query–answer pairs, including 86,686,806 text-to-code retrieval pairs. Curated by Jordan Legg. Maintained by Takara AI.

from datasets import load_dataset
ds = load_dataset("takara-ai/code-qa-unified", "code_search", split="train", streaming=True)

Use streaming=True to iterate without loading the full dataset into memory.

Contents

Configuration Pairs Content
default 88,234,786 All positive QA pairs
code_search 86,686,806 Natural-language queries paired with code
other_qa 1,547,980 Other positive QA tasks

Each configuration has one train split. The dataset combines existing sources under a common schema with exact-pair deduplication, pinned provenance and evaluation-overlap filtering.

Curation and provenance

Rows preserve question and answer text, source repository/configuration/split/revision, original IDs, language, license, repository/path/URL, JSON metadata and a binary SHA-256 content_id. Repository and path coverage varies by source.

Exact duplicates are identified by question and answer hashes plus ordered field types, with line endings normalized. Multiple questions per code and multiple positive answers per question remain separate pairs. Filtering preserves retained field values.

Included sources declare MIT, Apache-2.0, CC BY 4.0 or CC BY-SA 4.0. Sources with unspecified, custom, noncommercial or no-derivatives terms are excluded. Rows with other or unrecognised license identifiers are omitted, including unknown original-code licenses in the Shuu collections. This filter excluded 7,639,316 pairs. The publication audit records counts and decisions.

Licensing and attribution

Upstream creators retain credit for the code, queries, annotations, translations and source datasets. ATTRIBUTIONS.md lists pinned sources; CITATIONS.md contains their citations. Source cards and available notices are preserved in upstream-cards/ and upstream-notices/.

LICENSES.md records source-specific terms. Original code may carry separate repository licenses. Required copyright notices, license texts and change disclosures must be retained; CC BY-SA material remains subject to applicable share-alike conditions. The collection does not relicense upstream material.

Evaluation overlap and limitations

Pairs were checked against 1,538 evaluation queries and 2,059 positive documents from takarajordan/code-search-eval-audited at revision 50b8424c85cf929d3075dbbaa2bc34b4cd8c589a. Exact matches and lexical shingle Jaccard ≥0.90 matches were excluded, checking both fields in either direction.

The overlap checks cover that evaluation companion only. Semantic near-duplicates and repository-level overlap may remain. Positive labels have not been independently verified for relevance or execution correctness.

Credential cleanup excluded 118 credential-bearing or dependent provenance records from the source build. Those checks covered two reported upstream keys.

Files and audit

files.json lists public shards, row counts, sizes and SHA-256 checksums. build/publication-audit.json records the pinned input and filtering policy.

Downloads last month
-