text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (arr *varArray) String() string {
return fmt.Sprint(arr.vars)
} | [
-0.27452749013900757,
-1.5392149686813354,
-0.08482878655195236,
-0.04211012274026871,
-0.7200161218643188,
0.925484836101532,
0.14087583124637604,
-1.4123549461364746,
0.2030799835920334,
0.4061709940433502,
1.0113844871520996,
0.9935954809188843,
-0.2864722013473511,
1.1301360130310059,
... |
func (arr *varArray) Unmarshal(obj interface{}) error {
return fmt.Errorf("Not Supported")
} | [
-0.2518956959247589,
-0.03070114739239216,
0.6780744791030884,
0.6509813666343689,
-1.0194907188415527,
0.7242589592933655,
0.46263450384140015,
0.9363657832145691,
0.6945840120315552,
0.41567862033843994,
-0.04247964173555374,
0.43139025568962097,
-0.3015509247779846,
0.5613374710083008,
... |
func NewVariableArray(name string, vs []Variable) VariableArray {
return &varArray{
name: name,
vars: vs,
}
} | [
-0.19618858397006989,
-1.4614136219024658,
0.1257362812757492,
0.5802262425422668,
-0.657882034778595,
-0.06241445615887642,
-0.8160793781280518,
-0.19293174147605896,
-0.030437123030424118,
0.8091705441474915,
-1.3963265419006348,
0.7848078012466431,
-0.6978797316551208,
0.811417281627655... |
func (*SimpleRequest) Descriptor() ([]byte, []int) {
return file_grpc_exercises_ex3_streamserver_proto_server_stream_proto_rawDescGZIP(), []int{0}
} | [
-0.6507387161254883,
0.08620161563158035,
0.6544418334960938,
0.005244591273367405,
-0.22028152644634247,
0.1520080864429474,
0.1871677190065384,
0.5010549426078796,
0.3823087811470032,
-1.2303367853164673,
-0.29025527834892273,
0.8765102028846741,
-0.4716712534427643,
0.5645466446876526,
... |
func (*SimpleResponse) Descriptor() ([]byte, []int) {
return file_grpc_exercises_ex3_streamserver_proto_server_stream_proto_rawDescGZIP(), []int{1}
} | [
-0.1902371346950531,
-0.10015789419412613,
0.5319539904594421,
-0.14786899089813232,
-0.15219955146312714,
-0.2417922019958496,
0.6024752855300903,
0.45251262187957764,
0.7469674348831177,
-1.2573999166488647,
-0.9383535981178284,
0.027487564831972122,
-1.2746353149414062,
-0.1760582178831... |
func NewReplacement(start, stop int, word string) Replacement {
return Replacement{start, stop, word}
} | [
-0.638640284538269,
-0.972284197807312,
0.18988224864006042,
-0.36199405789375305,
-1.4835442304611206,
-0.370069682598114,
-0.0898497924208641,
0.4202611744403839,
0.08373228460550308,
0.5117006897926331,
-0.4342553913593292,
-0.3004225790500641,
-0.5710539221763611,
-0.16424588859081268,... |
func NewReplacer(word string, prevLevel, nextLevel int) *Replacer {
var repls []Replacement
levels := make([]int, len(word))
for i := 0; i < len(levels); i++ {
levels[i] = prevLevel
}
return &Replacer{word, repls, levels, nextLevel}
} | [
0.1248691976070404,
-0.03924905136227608,
0.3548536002635956,
-0.5614020824432373,
-1.6418339014053345,
-0.455397367477417,
-0.022987978532910347,
0.5757037997245789,
-0.45899084210395813,
0.061090074479579926,
0.2983039617538452,
0.4043271541595459,
-1.2516247034072876,
1.1968070268630981... |
func (r *Replacer) Replace(start, stop int, word string) {
r.ReplaceBy(NewReplacement(start, stop, word))
} | [
-0.8213898539543152,
-0.5106671452522278,
0.19530469179153442,
-0.13392551243305206,
-0.929309070110321,
-0.15460625290870667,
0.020985722541809082,
0.8553293943405151,
-0.5962154269218445,
0.40371090173721313,
-0.7515190839767456,
0.14322951436042786,
-0.93986976146698,
0.2122388929128646... |
func (r *Replacer) ReplaceBy(repls ...Replacement) {
r.repls = append(r.repls, repls...)
} | [
-0.4170667231082916,
0.02318469062447548,
0.3035893142223358,
-0.2875834107398987,
-0.18024417757987976,
0.5119771957397461,
-0.14316338300704956,
0.5163034200668335,
0.24827399849891663,
-0.09095222502946854,
-0.9964891076087952,
-0.5005706548690796,
-0.8155208826065063,
0.608493745326995... |
func (r *Replacer) commit() {
var buf bytes.Buffer
var levels []int
offset := 0
for _, repl := range r.repls {
start := repl.Start
stop := repl.Stop
word := repl.Word
// before replacement
buf.WriteString(r.word[offset:start])
levels = append(levels, r.levels[offset:start]...)
// replacement
buf.... | [
-0.028269534930586815,
-0.6690079569816589,
0.47180426120758057,
-1.5870260000228882,
-0.5387005805969238,
0.3240310251712799,
0.5853933691978455,
0.5479971170425415,
-0.8919203877449036,
1.3757938146591187,
0.11878888309001923,
0.49701881408691406,
-1.4917339086532593,
0.8334317803382874,... |
func (r *Replacer) String() string {
r.commit()
return r.word
} | [
0.3902362287044525,
0.22282937169075012,
0.04109664633870125,
-0.9430378675460815,
-0.42618006467819214,
0.3072548508644104,
1.0080986022949219,
-0.3363112509250641,
-0.20333878695964813,
0.4880746304988861,
-0.10277523100376129,
0.7896901369094849,
-1.737610936164856,
0.3626170754432678,
... |
func (r *Replacer) Subwords() []Subword {
r.commit()
var subwords []Subword
if len(r.levels) == 0 {
return subwords
}
level := r.levels[0]
var buf bytes.Buffer
for i, ch := range r.word {
if r.levels[i] != level {
subwords = append(subwords, New(buf.String(), level))
level = r.levels[i]
buf.Res... | [
0.28615912795066833,
0.04365053400397301,
0.3900511860847473,
-0.1850767880678177,
0.2992447316646576,
-0.15904168784618378,
-0.19841846823692322,
0.196294367313385,
-0.0976119264960289,
0.6806635856628418,
-0.7055428624153137,
1.0340436697006226,
-1.537221908569336,
1.0038530826568604,
... |
func (c *Call) Activate(vm *VM, target, locals, context Interface, msg *Message) Interface {
return c
} | [
-0.5372893214225769,
-0.0836850255727768,
0.3919159770011902,
-0.44492319226264954,
0.3744344115257263,
-0.05849112570285797,
-0.5213878154754639,
-0.16310082376003265,
0.09560719132423401,
0.5560165047645569,
0.4230841398239136,
1.1938124895095825,
-1.0661804676055908,
-0.2562509775161743... |
func (c *Call) Clone() Interface {
return &Call{
Object: Object{Slots: Slots{}, Protos: []Interface{c}},
Sender: c.Sender,
Activated: c.Activated,
Msg: c.Msg,
Target: c.Target,
Coroutine: c.Coroutine,
}
} | [
0.2554725408554077,
0.15665315091609955,
0.7671095728874207,
-0.04252608120441437,
-0.892570972442627,
1.0876864194869995,
-0.6066886782646179,
-1.3246861696243286,
0.2558457553386688,
0.8616403341293335,
-0.2314818799495697,
0.6445029377937317,
-1.1541597843170166,
-0.11976411938667297,
... |
func (vm *VM) NewCall(sender, actor Interface, msg *Message, target, context Interface) *Call {
return &Call{
Object: *vm.CoreInstance("Call"),
Sender: sender,
Activated: actor,
Msg: msg,
Target: target,
Context: context,
Coroutine: vm,
}
} | [
0.5087549090385437,
0.3102610111236572,
0.35164931416511536,
0.13323020935058594,
-0.7293344140052795,
0.4112519919872284,
-0.6894859075546265,
-0.22102905809879303,
0.529589831829071,
1.1152132749557495,
0.4772372543811798,
1.0287935733795166,
-0.6811540722846985,
0.13387835025787354,
-... |
func CallActivated(vm *VM, target, locals Interface, msg *Message) Interface {
return target.(*Call).Activated
} | [
-0.3931996524333954,
-0.30796316266059875,
0.36674851179122925,
-0.20199263095855713,
-0.2924218475818634,
-0.17133797705173492,
-0.833853006362915,
-0.30359920859336853,
0.6376399993896484,
0.5194373726844788,
-0.5225450992584229,
1.549444556236267,
-0.8635833263397217,
0.0294556487351655... |
func CallArgAt(vm *VM, target, locals Interface, msg *Message) Interface {
m := target.(*Call).Msg
v, stop := msg.NumberArgAt(vm, locals, 0)
if stop != nil {
return stop
}
r := m.ArgAt(int(v.Value))
if r != nil {
return r
}
return vm.Nil
} | [
-0.8832859396934509,
0.2701508104801178,
0.5104170441627502,
-1.0134882926940918,
-0.21220466494560242,
0.21342311799526215,
-0.775245189666748,
-0.9954929351806641,
-1.0725919008255005,
0.8223404288291931,
1.279042363166809,
0.8910911679267883,
-0.3171318471431732,
0.8153340220451355,
-... |
func CallArgCount(vm *VM, target, locals Interface, msg *Message) Interface {
return vm.NewNumber(float64(len(target.(*Call).Msg.Args)))
} | [
-0.2234286516904831,
0.9681987166404724,
0.5974686145782471,
-0.9014378786087036,
-0.20989365875720978,
0.1375638097524643,
-0.7062675952911377,
-0.2854163944721222,
-0.670946478843689,
0.9664252996444702,
0.1181630939245224,
0.5155780911445618,
-0.3655540645122528,
0.9294977784156799,
-... |
func CallCoroutine(vm *VM, target, locals Interface, msg *Message) Interface {
return target.(*Call).Coroutine
} | [
-0.09052622318267822,
0.32705411314964294,
0.25079378485679626,
-0.4526907503604889,
0.04246656596660614,
0.23715534806251526,
-0.9997859597206116,
-0.6702389121055603,
-0.7691167593002319,
1.3037629127502441,
0.28862661123275757,
0.5817223787307739,
-0.8794201016426086,
0.3962631821632385... |
func CallEvalArgAt(vm *VM, target, locals Interface, msg *Message) Interface {
c := target.(*Call)
v, stop := msg.NumberArgAt(vm, locals, 0)
if stop != nil {
return stop
}
return c.Msg.EvalArgAt(vm, c.Sender, int(v.Value))
} | [
-0.6861711144447327,
0.7324987053871155,
0.5022981762886047,
-1.3161307573318481,
-0.42208731174468994,
0.12147831916809082,
-0.9965460300445557,
-0.6324142217636108,
-0.5712600350379944,
0.8474019765853882,
1.0502715110778809,
0.9231182336807251,
-0.30238956212997437,
0.9395657777786255,
... |
func CallMessage(vm *VM, target, locals Interface, msg *Message) Interface {
return target.(*Call).Msg
} | [
-0.6749622821807861,
0.3134792447090149,
0.3195803165435791,
-0.2189965546131134,
-0.00149696902371943,
0.2731875479221344,
-1.3803077936172485,
-0.9510341286659241,
0.18944256007671356,
0.8044569492340088,
1.1449129581451416,
1.0505589246749878,
-0.9254280924797058,
1.0141475200653076,
... |
func CallSender(vm *VM, target, locals Interface, msg *Message) Interface {
return target.(*Call).Sender
} | [
-0.3075807988643646,
0.011256604455411434,
0.3477724492549896,
0.06873393803834915,
-0.46335121989250183,
-0.055830277502536774,
-1.2372227907180786,
-0.9708189964294434,
-0.021724766120314598,
0.33825111389160156,
0.20961882174015045,
0.6610070466995239,
-0.6525449156761169,
1.71639931201... |
func CallSlotContext(vm *VM, target, locals Interface, msg *Message) Interface {
return target.(*Call).Context
} | [
0.1993633508682251,
0.2570011019706726,
0.4305192828178406,
-0.8616111278533936,
-1.0418777465820312,
0.11717157065868378,
-0.3655957877635956,
-1.124866008758545,
0.5790728330612183,
0.6251649260520935,
0.7351271510124207,
1.2039254903793335,
-0.4742790162563324,
0.5120309591293335,
-1.... |
func CallTarget(vm *VM, target, locals Interface, msg *Message) Interface {
return target.(*Call).Target
} | [
-0.34535956382751465,
0.14895397424697876,
0.4866524934768677,
-0.4810393750667572,
-0.3591559827327728,
-0.037214457988739014,
-1.2311303615570068,
-1.0893460512161255,
0.22974684834480286,
0.5762250423431396,
1.4015555381774902,
1.2976428270339966,
-0.9600884914398193,
0.3982341885566711... |
func (c *Client) RegisterContainerImage(ctx context.Context, params *RegisterContainerImageInput, optFns ...func(*Options)) (*RegisterContainerImageOutput, error) {
if params == nil {
params = &RegisterContainerImageInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RegisterContainerImage", params, optFns... | [
-1.8247005939483643,
0.9990227222442627,
0.6173714995384216,
0.5013370513916016,
0.4155949056148529,
-0.9452888369560242,
0.5423597693443298,
-1.1052592992782593,
0.2668174207210541,
-0.09943259507417679,
-0.3788794279098511,
1.0241518020629883,
-0.4329708218574524,
0.15467563271522522,
... |
func (mcd *MetricFlowClusterDistribution) ExportClusters(protocolKey common.ProtocolKeyType) *common.ExportUnivariateClusterFormat {
return mcd.clusterDistribution.ExportClusters(protocolKey)
} | [
-0.28018149733543396,
0.5236601233482361,
0.03069617971777916,
0.11958712339401245,
0.20808032155036926,
0.006629503332078457,
0.8680062890052795,
-1.0330371856689453,
1.1260453462600708,
0.012807571329176426,
0.3135390281677246,
-0.003662822535261512,
-1.603942632675171,
0.223546981811523... |
func (mcd *MetricFlowClusterDistribution) GetProtocols() []common.Protocol {
return mcd.clusterDistribution.GetProtocols()
} | [
0.5873731970787048,
0.25553688406944275,
0.21933801472187042,
1.0317479372024536,
0.9434388875961304,
0.31355687975883484,
0.40861305594444275,
-1.2497159242630005,
0.7428465485572815,
-0.30362048745155334,
0.3201131224632263,
0.018700554966926575,
-0.6902204751968384,
0.3907560110092163,
... |
func (mcd *MetricFlowClusterDistribution) Name() string {
return "FlowClusterDistribution"
} | [
0.8655960559844971,
-1.1477859020233154,
0.185055673122406,
-0.12485633790493011,
-0.311628520488739,
0.10745041817426682,
0.731285035610199,
-0.43741875886917114,
-0.0688832551240921,
-0.013175942935049534,
0.5016542673110962,
-0.048584166914224625,
0.2484552264213562,
0.18439312279224396... |
func (mcd *MetricFlowClusterDistribution) PrintStatistic(verbose bool) {
fmt.Println("Metric Flow Cluster distribution:")
fmt.Print(mcd.clusterDistribution.GetStatistics(verbose))
} | [
1.306312084197998,
0.11216386407613754,
0.48114633560180664,
1.0459307432174683,
0.8971251845359802,
-0.13983793556690216,
-0.010822311043739319,
-0.26487553119659424,
-0.7539418339729309,
0.5065853595733643,
0.5394158959388733,
0.9553537368774414,
0.04350081458687782,
-0.19262230396270752... |
func CSIPlugins(ctx context.Context, cli client.Client, volume *rainbondv1alpha1.RainbondVolume) plugin.CSIPlugin {
name := "nfs-provisioner"
labels := rbdutil.LabelsForRainbond(map[string]string{
"name": name,
})
return &nfsPlugin{
ctx: ctx,
cli: cli,
name: name,
volume: volume,
labels: labels,... | [
0.009814796969294548,
-0.6768393516540527,
0.45976224541664124,
-0.09464164078235626,
0.17672313749790192,
0.3728531301021576,
-0.31394848227500916,
-0.8254417777061462,
0.6904118657112122,
0.5559169054031372,
-0.4327681064605713,
0.6453929543495178,
-1.260847568511963,
-0.2039902359247207... |
func SetExpressions(exprList map[int]*models.Expression) {
nowUnix := time.Now().Unix()
unitsLock.Lock()
for id, expr := range exprList {
unit := units[id]
if unit == nil {
unit, err := NewExprUnit(id, expr)
if err != nil {
log.Warn("new-exprunit-error", "id", id, "error", err)
continue
}
un... | [
-0.6802050471305847,
0.29943954944610596,
0.6109340786933899,
-0.01823207549750805,
0.0019730348140001297,
0.2975524365901947,
0.9303678870201111,
0.1666812300682068,
-0.7629724144935608,
0.43310701847076416,
-0.2727445363998413,
-0.22854642570018768,
-0.6227529644966125,
1.015990972518921... |
func GetUnit(muID int) *ExprUnit {
unitsLock.RLock()
defer unitsLock.RUnlock()
return units[muID]
} | [
-0.19673267006874084,
0.3046991527080536,
0.22909851372241974,
-0.1333620697259903,
-0.13137127459049225,
-0.4902929663658142,
0.44120797514915466,
-0.5403977036476135,
0.4059722423553467,
-0.7125688791275024,
0.6865617036819458,
1.5076428651809692,
-1.5777395963668823,
-0.730028510093689,... |
func JudgeSingle(metric *models.Metric) {
unitsLock.RLock()
ids := unitsAccepts[metric.Name]
if len(ids) > 0 {
for _, id := range ids {
unit := units[id]
if unit == nil {
continue
}
subKey, ok := unit.Accept(metric)
if !ok {
continue
}
unit.Check(subKey, metric)
}
}
unitsLock.RUnlo... | [
-0.4321039915084839,
0.5127161145210266,
0.5780043601989746,
0.5972988605499268,
0.1728116124868393,
1.0935441255569458,
0.6743777394294739,
0.803305447101593,
-0.9839397072792053,
0.06730224937200546,
0.6819890141487122,
0.22168637812137604,
-0.7667821049690247,
0.8966158032417297,
-1.0... |
func Judge(metrics []*models.Metric) {
for _, metric := range metrics {
JudgeSingle(metric)
}
} | [
0.34945809841156006,
-0.07727302610874176,
0.1357991099357605,
1.2147178649902344,
0.3417345881462097,
1.578073263168335,
0.4302830100059509,
0.6676629781723022,
-1.0454332828521729,
-0.41871505975723267,
0.5546007752418518,
-0.3589002192020416,
-0.6385596394538879,
1.3384302854537964,
-... |
func FirewallNamespace(client util.XapiClient) *Firewall {
return &Firewall{
ns: &namespace.Importable{
ImportPath: util.InterfaceImport,
Common: namespace.Common{
Singular: singular,
Plural: plural,
Client: client,
},
},
}
} | [
0.580305814743042,
0.6323801875114441,
0.23986457288265228,
-0.18909256160259247,
-1.0148833990097046,
-0.040831662714481354,
0.44225290417671204,
-1.2396777868270874,
1.1960088014602661,
-0.028168588876724243,
-1.2061522006988525,
-0.4366297125816345,
-0.5259312391281128,
0.81244480609893... |
func PanoramaNamespace(client util.XapiClient) *Panorama {
return &Panorama{
ns: &namespace.Importable{
ImportPath: util.InterfaceImport,
Common: namespace.Common{
Singular: singular,
Plural: plural,
Client: client,
},
},
}
} | [
0.4717866778373718,
0.1026681661605835,
0.26655906438827515,
0.034464385360479355,
-1.6531699895858765,
0.8444598317146301,
-0.3824600577354431,
-1.3291326761245728,
1.782162070274353,
0.13462461531162262,
-0.8926278948783875,
-0.04706606641411781,
-0.6397165060043335,
-0.7658997774124146,... |
func (rd *ReferenceDef) String() string {
cns := make([]string, 0, len(rd.IndexColNames))
for _, icn := range rd.IndexColNames {
cns = append(cns, icn.String())
}
return fmt.Sprintf("REFERENCES %s (%s)", rd.TableIdent, strings.Join(cns, ", "))
} | [
0.17934980988502502,
-0.34484177827835083,
0.4025425612926483,
-0.5426056385040283,
0.47508424520492554,
0.17193707823753357,
0.5659506320953369,
-1.7814050912857056,
-0.4555198848247528,
0.392334520816803,
0.33235782384872437,
0.5997040271759033,
-0.3654758930206299,
-0.002357194665819406... |
func (rd *ReferenceDef) Clone() *ReferenceDef {
cnames := make([]*IndexColName, 0, len(rd.IndexColNames))
for _, idxColName := range rd.IndexColNames {
t := *idxColName
cnames = append(cnames, &t)
}
return &ReferenceDef{TableIdent: rd.TableIdent, IndexColNames: cnames}
} | [
0.13356748223304749,
-0.36158519983291626,
0.5650590658187866,
0.40143412351608276,
-0.2730390727519989,
0.2833712697029114,
-0.07350337505340576,
-1.8633406162261963,
0.21890057623386383,
0.2575671672821045,
-0.036736808717250824,
0.4502643346786499,
-0.2616499960422516,
-0.37846940755844... |
func (icn *IndexColName) String() string {
if icn.Length >= 0 {
return fmt.Sprintf("%s(%d)", icn.ColumnName, icn.Length)
}
return icn.ColumnName
} | [
-0.38023650646209717,
-0.1581527441740036,
0.18851758539676666,
-0.4189269542694092,
-0.16782310605049133,
-0.33546116948127747,
1.07120943069458,
-0.9798319339752197,
-0.18223267793655396,
0.28410810232162476,
-0.37325170636177063,
0.02287348173558712,
-0.5822665691375732,
-1.099606990814... |
func (c *ColumnDef) String() string {
ans := []string{c.Name}
for _, x := range c.Constraints {
ans = append(ans, x.String())
}
return strings.Join(ans, " ")
} | [
0.25069889426231384,
-0.77602618932724,
0.27340197563171387,
0.0028857782017439604,
-0.2093101292848587,
0.6092575192451477,
0.13208714127540588,
-0.8151113986968994,
-0.9340768456459045,
0.6133952140808105,
-0.63390052318573,
0.32065853476524353,
-0.047325968742370605,
-0.2332966625690460... |
func ColumnDefToCol(offset int, colDef *ColumnDef) (*column.Col, []*TableConstraint, error) {
constraints := []*TableConstraint{}
col := &column.Col{
ColumnInfo: model.ColumnInfo{
Offset: offset,
Name: model.NewCIStr(colDef.Name),
FieldType: *colDef.Tp,
},
}
// Check and set TimestampFlag and ... | [
-0.12519057095050812,
-0.2917006313800812,
0.6884209513664246,
0.18348997831344604,
-0.24215278029441833,
-0.527570903301239,
0.5586198568344116,
-0.1843416839838028,
-1.0956759452819824,
0.05655338242650032,
-1.0514525175094604,
-0.1313687115907669,
0.3670378625392914,
0.05228564888238907... |
func (c *Cmd) Main() {
if c.Stdout == nil {
c.Stdout = os.Stdout
}
if c.Stderr == nil {
c.Stderr = os.Stderr
}
flags := c.Flags()
if flags.NArg() == 0 {
fmt.Fprintln(os.Stderr, intro)
if c.Intro != "" {
fmt.Fprintln(os.Stderr)
fmt.Fprintln(os.Stderr, c.Intro)
}
c.Exit(2)
}
cmd := flags.Arg(0)
... | [
0.4415190815925598,
-0.4647364020347595,
0.9939301013946533,
0.08407352864742279,
0.12535184621810913,
-0.23155680298805237,
0.12507888674736023,
-0.17689445614814758,
-0.4550083577632904,
-0.6107798218727112,
0.5312206745147705,
0.5789139270782471,
-0.27420467138290405,
1.1408551931381226... |
func (c *Cmd) Fatal(v ...interface{}) {
fmt.Fprintln(c.Stderr, v...)
c.Exit(1)
} | [
0.4419093728065491,
-0.6528935432434082,
0.3962591588497162,
0.6276149153709412,
0.3141798973083496,
1.0658588409423828,
-0.581409215927124,
0.007849287241697311,
-0.7659948468208313,
-0.4277289807796478,
0.5987829566001892,
0.6351384520530701,
0.34855175018310547,
1.0164765119552612,
0.... |
func (c *Cmd) Fatalf(format string, v ...interface{}) {
fmt.Fprintf(c.Stderr, format, v...)
fmt.Fprintln(c.Stderr)
c.Exit(1)
} | [
0.7017297148704529,
-0.759399950504303,
0.42951512336730957,
0.2806754410266876,
0.23852908611297607,
0.4613298773765564,
-0.44362470507621765,
0.17741625010967255,
-0.3004501760005951,
-0.3829471468925476,
0.9660227298736572,
0.3397766351699829,
0.46951258182525635,
0.7610266804695129,
... |
func (c *Cmd) Println(v ...interface{}) {
fmt.Fprintln(c.Stdout, v...)
} | [
0.7408904433250427,
-0.26430052518844604,
0.4094353914260864,
0.8303950428962708,
-0.1518901288509369,
-0.2206159234046936,
-0.11414165049791336,
-0.14415757358074188,
-0.6730683445930481,
-1.4302083253860474,
-0.3199789524078369,
0.08633890748023987,
0.5841819643974304,
1.1298996210098267... |
func (c *Cmd) Printf(format string, v ...interface{}) {
fmt.Fprintf(c.Stdout, format, v...)
} | [
0.8220204710960388,
-0.24502234160900116,
0.33421948552131653,
0.6647114157676697,
0.2594076097011566,
-0.3675970733165741,
-0.13718271255493164,
-0.03345285728573799,
-1.0383280515670776,
-1.227014183998108,
0.7024665474891663,
0.1776561439037323,
0.2717224359512329,
1.3843549489974976,
... |
func (c *Cmd) Exit(code int) {
for _, fn := range c.onexits {
fn()
}
os.Exit(code)
} | [
-0.3739154040813446,
0.7370969653129578,
0.2635936439037323,
-0.15796874463558197,
1.0811794996261597,
-0.024951146915555,
0.6845278143882751,
-0.3376482427120209,
-0.6200534701347351,
-0.3901936411857605,
-0.5232145190238953,
-0.7700383067131042,
0.012214458547532558,
1.6727371215820312,
... |
func (c *Cmd) Flags() *flag.FlagSet {
if c.flags == nil {
c.flags = flag.NewFlagSet("reflow", flag.ExitOnError)
c.flags.Usage = func() { c.usage(c.flags) }
c.flags.StringVar(&flow.Universe, "universe", "", "digest namespace")
c.flags.StringVar(&c.ConfigFile, "config", c.DefaultConfigFile, "path to configuratio... | [
0.3749435245990753,
0.42723557353019714,
0.7295228242874146,
-0.32407984137535095,
0.29882076382637024,
-0.2802095413208008,
0.35912200808525085,
-0.6799654364585876,
-0.41649314761161804,
-1.274070382118225,
0.2247602343559265,
0.36330386996269226,
-0.6372502446174622,
0.9644635915756226,... |
func increaseFDRlimit() error {
var l syscall.Rlimit
if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &l); err != nil {
return err
}
if l.Cur == l.Max {
// Already at soft max, nothing to do
return nil
}
l.Cur = l.Max
// The following is a workaround for this issue:
// https://github.com/golang/go/issu... | [
-0.23601563274860382,
0.48074671626091003,
0.7444748878479004,
0.06481437385082245,
-0.02928421087563038,
-1.053436517715454,
0.31426548957824707,
0.4908829927444458,
-0.45355892181396484,
-1.1990572214126587,
-0.27752572298049927,
0.343934029340744,
-0.2282629907131195,
0.8711245656013489... |
func (c *Cmd) CurrentPool(ctx context.Context) pool.Pool {
c.must(c.poolOnce.Do(func() error {
cluster, err := reflowruntime.ClusterInstance(c.Config)
if err != nil {
return err
}
if ec, ok := cluster.(*ec2cluster.Cluster); ok {
var wg sync.WaitGroup
ec.Start(ctx, &wg)
c.pool = ec
} else {
c.F... | [
-0.38395267724990845,
-0.8045172095298767,
0.5553025007247925,
0.13820874691009521,
0.2825082838535309,
0.6344480514526367,
1.0561126470565796,
-0.6295609474182129,
0.3663037121295929,
-0.21985511481761932,
0.9048354029655457,
1.2031382322311401,
0.023663019761443138,
-0.06811635941267014,... |
func newMovienightValidatingSessionManager() s5.ValidatingSessionManager {
result := &movienightValidatingSessionManager{}
result.SimpleSessionManager = s5.NewSimpleSessionManager(result)
return result
} | [
-0.8353342413902283,
-0.8037148714065552,
0.07417768985033035,
0.8395118713378906,
-1.5063817501068115,
-0.14865651726722717,
-1.1762735843658447,
-0.46177083253860474,
1.106076955795288,
-0.23400181531906128,
-1.1071363687515259,
-0.4303258955478668,
-0.8924545049667358,
0.874323487281799... |
func (self *movienightValidatingSessionManager) Generate(uniqId string) (interface{}, error) {
q, err := qbs.GetQbs()
if err != nil {
return nil, err
}
defer q.Close()
var ur wire.UserRecord
ur.UserUdid = uniqId
if err := q.Find(&ur); err != nil {
return nil, err
}
return &wire.SessionData{&ur}, nil
} | [
-0.6366437077522278,
0.3853708803653717,
0.46782514452934265,
0.193162202835083,
-1.0334577560424805,
0.4607623517513275,
-0.5570705533027649,
-0.4460980296134949,
0.7181593179702759,
-0.06097088009119034,
-0.3021881580352783,
-0.11786635220050812,
-0.3906690776348114,
0.5644496083259583,
... |
func (self *movienightValidatingSessionManager) ValidateCredentials(username, pwd string) (string, interface{}, error) {
q, err := qbs.GetQbs()
if err != nil {
return "", nil, err
}
defer q.Close()
var ur wire.UserRecord
u := strings.TrimSpace(username)
p := strings.TrimSpace(pwd)
if len(u) == 0 || len(p) ==... | [
-0.18801774084568024,
-0.32633474469184875,
0.5131635069847107,
-0.5333033204078674,
-0.7289838194847107,
0.14892464876174927,
-0.012370090931653976,
0.16929233074188232,
1.1642367839813232,
0.43223971128463745,
0.7278814315795898,
-0.15190933644771576,
-1.013674020767212,
0.49248242378234... |
func (self *movienightValidatingSessionManager) SendUserDetails(i interface{}, w http.ResponseWriter) error {
ur := i.(*wire.SessionData).LoggedInUser
ur.Password = ""
return s5.SendJson(w, ur)
} | [
-0.6974788904190063,
-0.3898317217826843,
0.32302674651145935,
0.9787003993988037,
-1.0590959787368774,
0.32961592078208923,
0.4106540083885193,
-1.0937526226043701,
0.7939316034317017,
0.8004676103591919,
-1.045051097869873,
0.09325264394283295,
-0.8813121318817139,
0.5233853459358215,
... |
func Assert(t Fatalf, have, want interface{}) {
if !reflect.DeepEqual(have, want) {
file, line := caller()
t.Fatalf(equal, file, line, "", have, have, want, want)
}
} | [
-0.19611616432666779,
0.022386569529771805,
0.44330763816833496,
-0.13949179649353027,
1.164272427558899,
0.7835526466369629,
-0.5051891207695007,
-0.3040529191493988,
-0.5726355314254761,
-0.9766183495521545,
-0.019544897601008415,
0.46438246965408325,
-0.5001470446586609,
1.3655990362167... |
func Refute(t Fatalf, have, want interface{}) {
if reflect.DeepEqual(have, want) {
file, line := caller()
t.Fatalf(unequal, file, line, "", have, have, want, want)
}
} | [
0.39858153462409973,
0.06560235470533371,
0.5794453620910645,
0.1262802630662918,
1.0340492725372314,
0.5437266230583191,
-0.5810748338699341,
-0.4509066641330719,
-0.6908099055290222,
-0.6091635823249817,
0.47744300961494446,
0.28496119379997253,
-0.20715145766735077,
1.0489195585250854,
... |
func caller() (file string, line int) {
var ok bool
_, file, line, ok = runtime.Caller(2)
if !ok {
file = "???"
line = 1
} else {
slash := strings.LastIndex(file, "/")
if slash >= 0 {
file = file[slash+1:]
}
}
return
} | [
-0.04722011089324951,
-0.7022125720977783,
0.6586102247238159,
0.8937714099884033,
-0.04812788590788841,
-0.1882597804069519,
-0.04100659117102623,
-0.26951372623443604,
-0.8290306329727173,
-0.7804511785507202,
0.3542104959487915,
-0.40729594230651855,
0.12086371332406998,
0.1696338951587... |
func exampleNum(n []int) string {
if len(n) == 1 {
return fmt.Sprintf("%d.", n[0])
}
return ""
} | [
0.09110573679208755,
0.849746584892273,
0.48801305890083313,
0.26763811707496643,
0.3294331729412079,
-0.04448346793651581,
0.2027473896741867,
-0.02043568342924118,
1.2580260038375854,
0.08144114166498184,
-0.02678157016634941,
0.06074560433626175,
1.0312827825546265,
0.6253461837768555,
... |
func ExampleOperationsClient_NewListPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armengagementfabric.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log... | [
0.2083522528409958,
-0.0009225635440088809,
0.5981072187423706,
-0.08937249332666397,
0.58626788854599,
-0.6236846446990967,
0.5999074578285217,
-0.09683627635240555,
0.6332818269729614,
0.12845765054225922,
0.1745540052652359,
-0.42177069187164307,
0.4376371204853058,
0.24541276693344116,... |
func HealthCheck(c buffalo.Context) error {
r := render.New(render.Options{})
return c.Render(200, r.String("OK"))
} | [
0.4950622320175171,
0.14184042811393738,
0.4668440818786621,
-0.18035642802715302,
0.7231010794639587,
0.7043041586875916,
0.5095966458320618,
0.37112581729888916,
0.08810992538928986,
-0.261341392993927,
1.1196134090423584,
0.8864137530326843,
0.2743573784828186,
-0.06777530163526535,
-... |
func (o *DeleteNetworksNetworkIDRatingGroupsRatingGroupIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 204:
result := NewDeleteNetworksNetworkIDRatingGroupsRatingGroupIDNoContent()
if err := result.readResponse(response, consu... | [
-0.4434620141983032,
0.06876733899116516,
0.4534111022949219,
0.24703815579414368,
-0.33489716053009033,
-0.941809356212616,
0.0011200520675629377,
-0.652616024017334,
0.17873550951480865,
0.41235896944999695,
1.0488731861114502,
-0.7946925163269043,
-1.6185448169708252,
0.4008593857288360... |
func NewDeleteNetworksNetworkIDRatingGroupsRatingGroupIDNoContent() *DeleteNetworksNetworkIDRatingGroupsRatingGroupIDNoContent {
return &DeleteNetworksNetworkIDRatingGroupsRatingGroupIDNoContent{}
} | [
0.5645468831062317,
1.0340746641159058,
-0.35671237111091614,
0.26858070492744446,
-0.5345861911773682,
0.1659720540046692,
-0.5116183757781982,
-1.642960548400879,
-0.49558332562446594,
-0.4391420781612396,
0.30303099751472473,
-0.8792771100997925,
-1.3855371475219727,
0.44310250878334045... |
func NewDeleteNetworksNetworkIDRatingGroupsRatingGroupIDDefault(code int) *DeleteNetworksNetworkIDRatingGroupsRatingGroupIDDefault {
return &DeleteNetworksNetworkIDRatingGroupsRatingGroupIDDefault{
_statusCode: code,
}
} | [
0.6250150203704834,
0.7173227667808533,
-0.2300800234079361,
0.3182927370071411,
1.06856369972229,
0.19130690395832062,
-0.6853986978530884,
-0.03462374955415726,
-0.13100306689739227,
0.3083052933216095,
0.23747266829013824,
-0.9287400245666504,
-1.571895956993103,
0.2246045470237732,
-... |
func (o *DeleteNetworksNetworkIDRatingGroupsRatingGroupIDDefault) Code() int {
return o._statusCode
} | [
0.009803210385143757,
1.580586552619934,
-0.02478799782693386,
0.20493516325950623,
1.079571008682251,
0.08785002678632736,
-0.36572030186653137,
0.18066896498203278,
-0.5506427884101868,
0.39428824186325073,
0.3975839614868164,
-0.7669346332550049,
-1.3254131078720093,
1.0267912149429321,... |
func info(z Shape) {
fmt.Println(z)
fmt.Println(z.area())
} | [
0.4715079367160797,
-1.1196624040603638,
0.5327741503715515,
-0.7089636921882629,
-0.23962119221687317,
0.4662278890609741,
0.9958590865135193,
-0.5408170223236084,
-0.35330137610435486,
0.05868072062730789,
-0.3691028654575348,
0.935197651386261,
1.283153772354126,
0.8539363145828247,
0... |
func VerifyCompatibleVersion(
cfg config.Persistence,
) error {
ds, ok := cfg.DataStores[cfg.DefaultStore]
if ok && ds.SQL != nil {
err := checkCompatibleVersion(*ds.SQL, mysql.Version)
if err != nil {
return err
}
}
ds, ok = cfg.DataStores[cfg.VisibilityStore]
if ok && ds.SQL != nil {
err := checkCom... | [
0.8390306830406189,
0.28425318002700806,
0.5975618958473206,
1.2889387607574463,
0.5281825661659241,
0.679608941078186,
0.2959427237510681,
0.5945422649383545,
0.4037588834762573,
0.5928515791893005,
-1.203505039215088,
-0.1240890845656395,
-0.432224303483963,
1.0643446445465088,
0.51470... |
func checkCompatibleVersion(
cfg config.SQL,
expectedVersion string,
) error {
connection, err := newConn(&sqlConnectParams{
host: cfg.ConnectAddr,
user: cfg.User,
password: cfg.Password,
driverName: cfg.DriverName,
database: cfg.DatabaseName,
})
if err != nil {
return fmt.Errorf("unab... | [
0.2605039179325104,
0.16362197697162628,
0.6076370477676392,
0.9753726124763489,
-0.46804913878440857,
0.5526707172393799,
-0.30485808849334717,
1.1622711420059204,
-0.3836922347545624,
1.1648457050323486,
-0.25091859698295593,
-0.29896247386932373,
-0.9766906499862671,
0.2997227609157562,... |
func setupSchema(cli *cli.Context) error {
params, err := parseConnectParams(cli)
if err != nil {
return handleErr(schema.NewConfigError(err.Error()))
}
conn, err := newConn(params)
if err != nil {
return handleErr(err)
}
defer conn.Close()
if err := schema.Setup(cli, conn); err != nil {
return handleErr(... | [
-0.895769476890564,
-0.23217615485191345,
0.9757742285728455,
0.589718222618103,
0.9965173006057739,
-0.6325587034225464,
-0.1339355856180191,
0.6901755928993225,
-0.7199334502220154,
0.633759081363678,
0.699982225894928,
-0.0244931410998106,
0.13048338890075684,
0.23014095425605774,
0.6... |
func updateSchema(cli *cli.Context) error {
params, err := parseConnectParams(cli)
if err != nil {
return handleErr(schema.NewConfigError(err.Error()))
}
if params.database == schema.DryrunDBName {
p := *params
if err := doCreateDatabase(p, p.database); err != nil {
return handleErr(fmt.Errorf("error creat... | [
-1.2097972631454468,
0.1187133640050888,
1.0432512760162354,
0.8361896872520447,
0.6340053677558899,
0.05195363983511925,
-0.08408308029174805,
0.5450677871704102,
-0.8018885850906372,
0.706055760383606,
0.16053836047649384,
0.5955060124397278,
-0.8006318807601929,
0.18582947552204132,
0... |
func createDatabase(cli *cli.Context) error {
params, err := parseConnectParams(cli)
if err != nil {
return handleErr(schema.NewConfigError(err.Error()))
}
database := cli.String(schema.CLIOptDatabase)
if database == "" {
return handleErr(schema.NewConfigError("missing " + flag(schema.CLIOptDatabase) + " argum... | [
-0.22170209884643555,
0.44588515162467957,
0.66960608959198,
0.8452509641647339,
1.1155093908309937,
0.6941647529602051,
-0.08856367319822311,
0.04313000664114952,
0.004656939301639795,
0.47489309310913086,
0.7753556370735168,
-0.5741215944290161,
-0.7921481728553772,
0.5104873180389404,
... |
func (p Printer) loadSubgraphs(ctx context.Context, g *graph.Graph, subgraphs SubgraphMap) {
printer, ok := p.pp.(SubgraphPrinter)
if !ok {
for _, node := range g.Vertices() {
addNodeToSubgraph(subgraphs, nil, node)
}
return
}
g.RootFirstWalk(ctx, func(meta *node.Node) error {
if sgMarker := printer.Ma... | [
0.32301050424575806,
0.4849569499492645,
0.6749565601348877,
0.7678048014640808,
-0.17275425791740417,
0.22469250857830048,
0.5042858719825745,
0.30133000016212463,
0.19160152971744537,
0.31600943207740784,
-0.7341095209121704,
0.7225481867790222,
-0.9249719381332397,
-0.09986366331577301,... |
func setSubgraphEndNode(subgraphs SubgraphMap, subgraphID SubgraphID, node string) {
if subgraphID == SubgraphBottomID {
return
}
if sg, found := subgraphs[subgraphID]; found {
sg.EndNodes = append(sg.EndNodes, node)
sg.Nodes = append(sg.Nodes, node)
subgraphs[subgraphID] = sg
}
} | [
-0.1384270042181015,
0.3605039417743683,
0.46984896063804626,
0.18166252970695496,
0.28156307339668274,
0.4652584493160248,
-0.5130460262298584,
0.3519141376018524,
-0.7379288673400879,
0.9174619317054749,
-1.099159598350525,
1.49988853931427,
-0.7350477576255798,
-0.0019332270603626966,
... |
func isSubgraphEnd(subgraphs SubgraphMap, id SubgraphID, node string) bool {
sg, found := subgraphs[id]
if !found {
return false
}
for endNodeIdx := range sg.EndNodes {
if node == sg.EndNodes[endNodeIdx] {
return true
}
}
return false
} | [
-0.19468744099140167,
0.08305428922176361,
0.7143832445144653,
0.8392823934555054,
-0.31778520345687866,
0.18949958682060242,
-0.7133516669273376,
0.12353456765413284,
-0.3859163522720337,
1.275272250175476,
-0.8138207197189331,
0.7694100141525269,
-0.7806826233863831,
-0.02568510361015796... |
func addNodeToSubgraph(subgraphs SubgraphMap, subgraphID SubgraphID, vertexID string) {
oldGraph, found := subgraphs[subgraphID]
if !found {
oldGraph.StartNode = &vertexID
oldGraph.ID = subgraphID
}
oldGraph.StartNode = &vertexID
oldGraph.Nodes = append(oldGraph.Nodes, vertexID)
subgraphs[subgraphID] = oldGra... | [
0.10139116644859314,
-0.24828925728797913,
0.6113360524177551,
0.10348591953516006,
0.5332374572753906,
0.775898277759552,
0.2047305703163147,
0.3804977238178253,
0.12925656139850616,
0.8035200238227844,
-0.16803297400474548,
1.8624155521392822,
-0.21975624561309814,
-0.5735793709754944,
... |
func (p Printer) drawSubgraph(g *graph.Graph, id SubgraphID, subgraph Subgraph) (Renderable, error) {
subgraphPrinter, spOK := p.pp.(SubgraphPrinter)
nodePrinter, npOK := p.pp.(NodePrinter)
if !spOK && !npOK {
return HiddenString(), nil
}
buffer := new(bytes.Buffer)
write := func(s Renderable) { buffer.WriteS... | [
0.18987277150154114,
0.26373547315597534,
0.7976104021072388,
0.23342350125312805,
-1.1576063632965088,
0.12208449840545654,
-0.4388858377933502,
-0.40348848700523376,
0.30175718665122986,
0.22141003608703613,
-0.6747578978538513,
1.2880496978759766,
-0.984356164932251,
-0.8082882165908813... |
func NewOptions() *options {
d := time.Minute
return &options{
testrunnerConfig: testrunner.Config{},
watchOptions: watch.Options{
PollInterval: &d,
},
}
} | [
0.4475843012332916,
-0.29467126727104187,
0.3504546880722046,
0.5624274015426636,
0.1830635666847229,
0.021791264414787292,
0.43195202946662903,
-0.8715388774871826,
0.5676430463790894,
-0.13400542736053467,
-0.07014881074428558,
-0.6121488809585571,
-0.5840222835540771,
0.6334027051925659... |
func (o *options) Validate() error {
if len(o.tmKubeconfigPath) == 0 {
return errors.New("tm-kubeconfig-path is required")
}
if len(o.testrunNamePrefix) == 0 {
return errors.New("testrun-prefix is required")
}
if len(o.testrunPath) == 0 {
return errors.New("file is required")
}
return nil
} | [
0.13885295391082764,
0.26914215087890625,
0.4838874340057373,
0.03879125043749809,
1.0664891004562378,
0.4328204393386841,
0.3182256817817688,
-0.5102562308311462,
-0.6073226928710938,
0.07137347757816315,
0.7969329357147217,
-0.49783095717430115,
-0.7918366193771362,
1.0730767250061035,
... |
func NewClientWithTarget(ctx context.Context, target string) (*Client, error) {
return NewClient(ctx, option.WithEndpoint(target))
} | [
-0.5632580518722534,
-1.1538286209106445,
0.01845679059624672,
-0.4063246548175812,
-0.5120364427566528,
-0.4975697994232178,
-0.6789810061454773,
-1.4343664646148682,
0.5115140080451965,
-0.24368131160736084,
0.17327389121055603,
0.22810053825378418,
0.042918384075164795,
-1.4258534908294... |
func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) {
conn, err := transport.DialInsecure(ctx, opts...)
if err != nil {
return nil, err
}
return &Client{
conn: conn,
client: todopb.NewTodoClient(conn),
}, nil
} | [
-0.25623568892478943,
0.6386044025421143,
0.5742282867431641,
0.5719286203384399,
-0.4168711304664612,
0.2119392603635788,
-0.2209242582321167,
-0.8946589827537537,
0.8246866464614868,
-0.32365652918815613,
-0.23286578059196472,
0.23941799998283386,
-0.2939114272594452,
-1.6795971393585205... |
func (c *Client) Conn() *grpc.ClientConn {
return c.conn
} | [
0.7655019164085388,
-0.7616327404975891,
0.02321307361125946,
0.8217272758483887,
-0.2465413361787796,
0.13710306584835052,
0.9633000493049622,
0.7566686868667603,
-0.35434040427207947,
-1.1649256944656372,
-0.06522201746702194,
0.7822721004486084,
0.3984929323196411,
-0.013634232804179192... |
func (c *Client) Close() {
if c.conn == nil {
return
}
c.conn.Close()
} | [
0.5605103373527527,
-0.21154719591140747,
0.21694377064704895,
-0.08925999701023102,
-0.023592617362737656,
0.028441080823540688,
0.2486439198255539,
-0.12379133701324463,
-1.2312939167022705,
-0.9837077856063843,
0.3336467146873474,
0.33215203881263733,
-1.3050124645233154,
0.689705491065... |
func (c *Client) ListTasks(ctx context.Context, in *todopb.TaskListRequest, opts ...grpc.CallOption) (todopb.Todo_ListTasksClient, error) {
return c.client.ListTasks(ctx, in, opts...)
} | [
-1.1134053468704224,
0.6987901329994202,
0.612078845500946,
0.4379596412181854,
0.6043421626091003,
0.294816255569458,
0.35612836480140686,
-0.872744083404541,
1.0172291994094849,
-0.6103007197380066,
-0.21587921679019928,
1.0510084629058838,
-0.22364851832389832,
-0.45318466424942017,
-... |
func (c *Client) GetTask(ctx context.Context, in *todopb.TaskQuery, opts ...grpc.CallOption) (*todopb.TaskResponse, error) {
return c.client.GetTask(ctx, in, opts...)
} | [
-0.7675547003746033,
0.979728102684021,
0.4205295145511627,
0.945787787437439,
0.8947525024414062,
-0.00033312232699245214,
0.4585128128528595,
-0.7826789021492004,
0.9799062609672546,
-0.2030383199453354,
-0.048194169998168945,
0.8425807952880859,
-0.3900572955608368,
-0.6416231393814087,... |
func (c *Client) CreateTask(ctx context.Context, in *todopb.TaskCreateRequest, opts ...grpc.CallOption) (*todopb.TaskResponse, error) {
return c.client.CreateTask(ctx, in, opts...)
} | [
-0.920329749584198,
0.5677422285079956,
0.4196659028530121,
0.39905598759651184,
1.156103491783142,
0.7003622651100159,
0.22949956357479095,
-0.7554556131362915,
0.5735379457473755,
-0.2819626033306122,
-0.4286743998527527,
0.3239339590072632,
-0.7129026055335999,
-0.16374114155769348,
-... |
func (c *Client) UpdateTask(ctx context.Context, in *todopb.TaskUpdateRequest, opts ...grpc.CallOption) (*todopb.TaskResponse, error) {
return c.client.UpdateTask(ctx, in, opts...)
} | [
-1.6993392705917358,
0.11037659645080566,
0.5211882591247559,
0.8839021325111389,
0.28931936621665955,
0.5201365351676941,
0.372940331697464,
-0.1838519275188446,
0.7439512014389038,
-0.02723322995007038,
-0.45497623085975647,
1.0301593542099,
-0.4790864884853363,
-0.6369408965110779,
-0... |
func (c *Client) DeleteTask(ctx context.Context, in *todopb.TaskQuery, opts ...grpc.CallOption) (*empty.Empty, error) {
return c.client.DeleteTask(ctx, in, opts...)
} | [
-0.6492570638656616,
1.1309075355529785,
0.5488882064819336,
0.6109387874603271,
0.7148934602737427,
0.5687880516052246,
0.15497539937496185,
-0.7890915274620056,
0.9694270491600037,
-1.0754691362380981,
0.10503540188074112,
1.2969156503677368,
-0.12266846746206284,
-0.22162728011608124,
... |
func NewMockIAccountController(ctrl *gomock.Controller) *MockIAccountController {
mock := &MockIAccountController{ctrl: ctrl}
mock.recorder = &MockIAccountControllerMockRecorder{mock}
return mock
} | [
0.4838489294052124,
0.05885081738233566,
0.11182884126901627,
0.017689736559987068,
0.07882745563983917,
-0.47734886407852173,
1.5568876266479492,
-0.5543792843818665,
0.7037796378135681,
-0.09361203759908676,
-0.26370465755462646,
-0.3686660826206207,
-0.05647993087768555,
0.0605320632457... |
func (m *MockIAccountController) EXPECT() *MockIAccountControllerMockRecorder {
return m.recorder
} | [
0.8411650061607361,
0.17718857526779175,
0.26488232612609863,
0.18319915235042572,
0.06891252100467682,
0.14719630777835846,
0.6186782121658325,
0.38264939188957214,
0.02118825353682041,
-1.1851612329483032,
0.6819231510162354,
-0.16937200725078583,
-0.9227097630500793,
0.3058473467826843,... |
func (m *MockIAccountController) NewAccount(c *gin.Context) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "NewAccount", c)
} | [
0.005418110638856888,
-0.24867834150791168,
0.020457549020648003,
0.8495522141456604,
1.161757469177246,
0.360123872756958,
1.6722831726074219,
0.015505272895097733,
0.10062440484762192,
-0.07833396643400192,
-0.19248302280902863,
-0.3288513123989105,
-0.1029285416007042,
0.99681156873703,... |
func (mr *MockIAccountControllerMockRecorder) NewAccount(c interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccount", reflect.TypeOf((*MockIAccountController)(nil).NewAccount), c)
} | [
0.3710901737213135,
0.2858397364616394,
-0.023848095908761024,
0.607467770576477,
-0.4800068736076355,
0.03841608390212059,
0.5343425273895264,
-1.002410888671875,
1.1232242584228516,
0.5681407451629639,
0.6434654593467712,
0.40186405181884766,
-0.558915376663208,
1.3244673013687134,
0.3... |
func (m *MockIAccountController) FindByID(id string) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "FindByID", id)
} | [
0.7755246758460999,
0.06699074059724808,
0.24868038296699524,
0.2043105661869049,
0.7119789719581604,
0.2519818842411041,
1.1669793128967285,
-0.7558773159980774,
-0.28915485739707947,
0.16735140979290009,
-0.743537187576294,
-0.7949322462081909,
-0.8428788781166077,
1.5593090057373047,
... |
func (mr *MockIAccountControllerMockRecorder) FindByID(id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindByID", reflect.TypeOf((*MockIAccountController)(nil).FindByID), id)
} | [
0.8632747530937195,
0.6474891304969788,
0.038490962237119675,
-0.1643630564212799,
-0.33140072226524353,
0.18717411160469055,
0.11296108365058899,
-1.4899872541427612,
0.471824049949646,
0.6124459505081177,
0.039757609367370605,
0.03665026277303696,
-1.1855579614639282,
1.7057608366012573,... |
func handleIdemixEnrollReq(ctx *serverRequestContextImpl) (interface{}, error) {
ca, err := ctx.GetCA()
if err != nil {
return nil, err
}
idemixEnrollResp, err := ca.issuer.IssueCredential(&idemixServerCtx{ctx})
if err != nil {
log.Errorf("Error processing the /idemix/credential request: %s", err.Error())
r... | [
-1.023928165435791,
-0.5465060472488403,
0.8528520464897156,
0.10064424574375153,
-0.36081480979919434,
0.21237853169441223,
0.27681466937065125,
-0.42811959981918335,
0.9413485527038574,
-0.28331825137138367,
-0.39482128620147705,
-0.04130100831389427,
-0.7639581561088562,
0.1262761056423... |
func newIdemixEnrollmentResponseNet(resp *idemix.EnrollmentResponse) api.IdemixEnrollmentResponseNet {
return api.IdemixEnrollmentResponseNet{
Nonce: resp.Nonce,
Attrs: resp.Attrs,
Credential: resp.Credential,
CRI: resp.CRI,
CAInfo: api.CAInfoResponseNet{}}
} | [
-0.49523690342903137,
-1.557059645652771,
0.4209277629852295,
-0.6330090761184692,
-0.5220848917961121,
-0.21359379589557648,
0.20628172159194946,
-0.30089810490608215,
0.8437175154685974,
-0.11207275837659836,
0.004520937334746122,
-0.363152414560318,
-0.030633138492703438,
-0.62188452482... |
func AssignIP(ipamConf types.RangeConfiguration, reservelist []types.IPReservation, containerID string, podRef string) (net.IPNet, []types.IPReservation, error) {
// Setup the basics here.
_, ipnet, _ := net.ParseCIDR(ipamConf.Range)
newip, updatedreservelist, err := IterateForAssignment(*ipnet, ipamConf.RangeStar... | [
-1.6697040796279907,
-0.35197535157203674,
0.3579995632171631,
0.6743004322052002,
0.06214366480708122,
-0.06418850272893906,
0.06924255192279816,
0.3744420111179352,
-0.04449450969696045,
0.7740237712860107,
0.2552262544631958,
-0.8656339049339294,
-0.03283880650997162,
-0.834873139858245... |
func DeallocateIP(reservelist []types.IPReservation, containerID string) ([]types.IPReservation, net.IP, error) {
updatedreservelist, hadip, err := IterateForDeallocation(reservelist, containerID, getMatchingIPReservationIndex)
if err != nil {
return nil, nil, err
}
logging.Debugf("Deallocating given previously... | [
-1.063688039779663,
0.2009873241186142,
0.46223658323287964,
0.11113923788070679,
0.06730398535728455,
-0.47017616033554077,
-0.18928885459899902,
0.20627404749393463,
1.2132110595703125,
0.44435474276542664,
0.6916227340698242,
-0.9427528381347656,
-0.059576231986284256,
-0.07321541756391... |
func IterateForDeallocation(
reservelist []types.IPReservation,
containerID string,
matchingFunction func(reservation []types.IPReservation, id string) int) ([]types.IPReservation, net.IP, error) {
foundidx := matchingFunction(reservelist, containerID)
// Check if it's a valid index
if foundidx < 0 {
return re... | [
-1.4838871955871582,
-0.3464784026145935,
0.5892659425735474,
-0.3098011612892151,
0.025171352550387383,
-1.0742857456207275,
0.009954444132745266,
0.38580623269081116,
0.3606257438659668,
0.5743997693061829,
0.6898184418678284,
-0.3018030524253845,
0.20884281396865845,
-0.8275121450424194... |
func IterateForAssignment(ipnet net.IPNet, rangeStart net.IP, rangeEnd net.IP, reserveList []types.IPReservation, excludeRanges []string, containerID string, podRef string) (net.IP, []types.IPReservation, error) {
// Get the valid range, delimited by the ipnet's first and last usable IP as well as the rangeStart and r... | [
-0.9089274406433105,
0.6103509068489075,
0.720170259475708,
-0.08927014470100403,
-0.43142709136009216,
-0.037477608770132065,
0.06231726333498955,
-0.281162828207016,
0.1895599067211151,
0.43587449193000793,
1.0536198616027832,
0.498069703578949,
-0.2246018797159195,
-0.30244478583335876,... |
func skipExcludedSubnets(ip net.IP, excluded []*net.IPNet) net.IP {
for _, subnet := range excluded {
if subnet.Contains(ip) {
broadcastIP := iphelpers.SubnetBroadcastIP(*subnet)
logging.Debugf("excluding %v and moving to the end of the excluded range: %v", subnet, broadcastIP)
return broadcastIP
}
}
re... | [
0.3984132409095764,
0.9330377578735352,
0.5623588562011719,
0.5820137858390808,
-1.1381806135177612,
1.4361428022384644,
0.034050069749355316,
-0.6168642044067383,
1.005374789237976,
-0.09367755800485611,
0.496124804019928,
1.0256704092025757,
-1.15244460105896,
-0.806899905204773,
0.055... |
func init() {
// Create the gym.wrappers.filter_observation Python module
wrappersModule := python.PyImport_ImportModule("gym.wrappers." +
"filter_observation")
defer wrappersModule.DecRef()
if wrappersModule == nil {
if python.PyErr_Occurred() != nil {
fmt.Println()
fmt.Println("========== Python Error =... | [
0.04963453486561775,
0.254115492105484,
0.8519899845123291,
-0.2603980600833893,
0.8802335858345032,
0.9025999903678894,
-0.05756521224975586,
-0.6370900869369507,
-0.4897044599056244,
0.7783612608909607,
-0.07079333066940308,
1.1891978979110718,
0.059149567037820816,
0.44602757692337036,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.