text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (r *RPC) UpsArtMetas(c context.Context, arg *model.ArgUpsArts, res *map[int64][]*model.Meta) (err error) {
if arg.Pn < 1 {
arg.Pn = 1
}
var (
start = (arg.Pn - 1) * arg.Ps
end = start + arg.Ps - 1
)
*res, err = r.s.UpsArticleMetas(c, arg.Mids, start, end)
return
} | [
-1.4493526220321655,
-0.043402671813964844,
0.6304038763046265,
-0.24928855895996094,
-0.07433035969734192,
-0.3381030857563019,
0.10495626926422119,
0.1739123910665512,
-0.15375469624996185,
0.49125996232032776,
-0.2743178904056549,
0.2317383587360382,
-0.16387833654880524,
0.015159375034... |
func (r *RPC) UpArtMetas(c context.Context, arg *model.ArgUpArts, res *model.UpArtMetas) (err error) {
if arg.Pn < 1 {
arg.Pn = 1
}
if arg.Ps <= 0 {
err = ecode.RequestErr
return
}
var rr *model.UpArtMetas
if rr, err = r.s.UpArticleMetas(c, arg.Mid, arg.Pn, arg.Ps, arg.Sort); err == nil {
*res = *rr
}
r... | [
-1.3174268007278442,
-0.1809997409582138,
0.8128271102905273,
-0.377373069524765,
-0.10877908021211624,
0.18897369503974915,
-0.09748861938714981,
-0.22657185792922974,
-0.21610838174819946,
0.5782007575035095,
-0.20605908334255219,
0.5809054970741272,
-0.4830017685890198,
-0.1468601077795... |
func (r *RPC) ArticleMetas(c context.Context, arg *model.ArgAids, res *map[int64]*model.Meta) (err error) {
*res, err = r.s.ArticleMetas(c, arg.Aids)
return
} | [
-1.3373947143554688,
0.012450861744582653,
0.2470857948064804,
-0.5550392270088196,
-0.18408074975013733,
0.24716784060001373,
-0.36646172404289246,
-0.42078840732574463,
-0.3600325286388397,
0.6389056444168091,
0.1990182101726532,
1.104469895362854,
-0.13458843529224396,
0.168418094515800... |
func (r *RPC) UpdateRecommends(c context.Context, arg *model.ArgIP, res *struct{}) (err error) {
err = r.s.UpdateRecommends(c)
return
} | [
-1.4510060548782349,
-0.19640915095806122,
0.28334641456604004,
0.10950276255607605,
0.2529515326023102,
0.5739310383796692,
-0.008408934809267521,
-0.39203783869743347,
-0.2626142203807831,
1.0555113554000854,
-0.3380458652973175,
0.8550986051559448,
-1.2698384523391724,
-0.40515825152397... |
func (r *RPC) Recommends(c context.Context, arg *model.ArgRecommends, res *[]*model.Meta) (err error) {
rs, err := r.s.Recommends(c, arg.Cid, arg.Pn, arg.Ps, arg.Aids, arg.Sort)
if err != nil {
return
}
for _, r := range rs {
*res = append(*res, &r.Meta)
}
return
} | [
-0.619027316570282,
0.24725866317749023,
0.45244714617729187,
-0.1188567727804184,
0.8584859371185303,
-0.2417178750038147,
-1.3474547863006592,
-1.1301651000976562,
-0.8223257660865784,
1.002514362335205,
0.6247377991676331,
1.2078824043273926,
-0.456525057554245,
0.013331154361367226,
... |
func (r *RPC) AddArtDraft(c context.Context, arg *model.ArgArticle, res *int64) (err error) {
d := model.TransformDraft(arg)
*res, err = r.s.AddArtDraft(c, d)
return
} | [
-0.3881476819515228,
0.44068285822868347,
0.3586791753768921,
-1.2072172164916992,
0.13977696001529694,
0.7229858040809631,
0.0608367919921875,
-0.33998316526412964,
0.256355881690979,
-0.9891428351402283,
-0.047176238149404526,
0.5088752508163452,
-0.18056721985340118,
0.11230281740427017... |
func (r *RPC) ArtDraft(c context.Context, arg *model.ArgAidMid, res *model.Draft) (err error) {
var v *model.Draft
if v, err = r.s.ArtDraft(c, arg.Aid, arg.Mid); err == nil && v != nil {
*res = *v
}
return
} | [
-0.1859389841556549,
0.036955125629901886,
0.195624440908432,
-1.373740315437317,
0.09124787896871567,
0.9381717443466187,
-0.1676870584487915,
-1.186909556388855,
0.5386602282524109,
0.10415186733007431,
0.4553341865539551,
1.301254391670227,
-0.36691251397132874,
0.06368129700422287,
-... |
func (r *RPC) UpperDrafts(c context.Context, arg *model.ArgUpDraft, res *model.Drafts) (err error) {
var v *model.Drafts
if v, err = r.s.UpperDrafts(c, arg.Mid, arg.Pn, arg.Ps); err == nil && v != nil {
*res = *v
}
return
} | [
-0.47951915860176086,
0.37249836325645447,
0.48801618814468384,
-0.7344126105308533,
0.3302156925201416,
0.10060739517211914,
0.06748659908771515,
-0.4105830490589142,
0.5124981999397278,
0.0808168426156044,
0.08135712146759033,
0.722719669342041,
-0.8805602788925171,
-0.3334214985370636,
... |
func (r *RPC) ArticleRemainCount(c context.Context, arg *model.ArgMid, res *int) (err error) {
*res, err = r.s.ArticleRemainCount(c, arg.Mid)
return
} | [
-0.5793366432189941,
-0.1576429158449173,
0.3924822211265564,
-1.0197303295135498,
0.03014151006937027,
0.09215269237756729,
0.7762831449508667,
-0.11549867689609528,
-0.20959500968456268,
0.541281521320343,
-0.6814445853233337,
-0.1505730152130127,
-0.8885176777839661,
0.08162195235490799... |
func (r *RPC) DelRecommendArtCache(c context.Context, arg *model.ArgAidCid, res *struct{}) (err error) {
err = r.s.DelRecommendArtCache(c, arg.Aid, arg.Cid)
return
} | [
-0.07757610082626343,
-0.1451549381017685,
0.4243638515472412,
-0.31139233708381653,
-0.9298469424247742,
0.5527454018592834,
0.19060076773166656,
-0.3763469159603119,
0.04175928607583046,
0.7890024185180664,
0.4298464357852936,
0.8984220623970032,
-0.39810624718666077,
0.28878799080848694... |
func (r *RPC) Favorites(c context.Context, arg *model.ArgFav, res *[]*model.Favorite) (err error) {
*res, _, err = r.s.ValidFavs(c, arg.Mid, 0, arg.Pn, arg.Ps, arg.RealIP)
return
} | [
-0.9002401828765869,
0.6417762041091919,
0.40392357110977173,
0.5661559104919434,
0.6464503407478333,
-0.3807562291622162,
-0.5133681297302246,
-0.738062858581543,
-0.21720044314861298,
0.17696581780910492,
-0.5927721858024597,
0.06192062795162201,
-0.5012648105621338,
-0.22335579991340637... |
func (r *RPC) UpdateAuthorCache(c context.Context, arg *model.ArgAuthor, res *struct{}) (err error) {
err = r.s.UpdateAuthorCache(c, arg.Mid)
return
} | [
-0.9972175359725952,
-0.6907050013542175,
0.2918161451816559,
0.48515045642852783,
-0.7409363985061646,
0.04195445403456688,
0.5007597208023071,
0.053392842411994934,
0.3074773848056793,
0.6458455920219421,
-0.14998820424079895,
0.49078622460365295,
-0.9249337315559387,
-0.0753924474120140... |
func (r *RPC) UpdateSortCache(c context.Context, arg *model.ArgSort, res *struct{}) (err error) {
err = r.s.UpdateSortCache(c, arg.Aid, arg.Changed, arg.RealIP)
return
} | [
-0.9832508563995361,
-0.6389420628547668,
0.3073500692844391,
0.050891682505607605,
-0.8666918873786926,
-0.0016420180909335613,
0.333148330450058,
-0.4953190088272095,
0.06631968915462494,
0.7761303186416626,
-0.11200112849473953,
-0.1322273313999176,
-1.0199419260025024,
0.00445364508777... |
func (r *RPC) IsAuthor(c context.Context, arg *model.ArgMid, res *bool) (err error) {
*res, _, err = r.s.IsAuthor(c, arg.Mid)
return
} | [
-1.2166577577590942,
-0.5513439774513245,
0.5813427567481995,
0.5947555303573608,
-0.029413213953375816,
0.018226422369480133,
0.6394938826560974,
0.3247282803058624,
0.638364851474762,
0.727233350276947,
0.12841688096523285,
0.07463065534830093,
-0.9578251242637634,
0.13821016252040863,
... |
func (r *RPC) NewArticleCount(c context.Context, arg *model.ArgNewArt, res *int64) (err error) {
*res, err = r.s.NewArticleCount(c, arg.PubTime)
return
} | [
-0.5671563148498535,
-0.5885302424430847,
0.3320483863353729,
-0.2229660302400589,
-0.5401042699813843,
-0.15415562689304352,
0.16727693378925323,
-0.19278395175933838,
-0.6131993532180786,
0.3659445643424988,
-0.7588807344436646,
0.8055890202522278,
-0.6264890432357788,
-0.010909840464591... |
func (r *RPC) HadLikesByMid(c context.Context, arg *model.ArgMidAids, res *map[int64]int8) (err error) {
*res, err = r.s.HadLikesByMid(c, arg.Mid, arg.Aids)
return
} | [
1.1269608736038208,
-0.19217263162136078,
0.4561186730861664,
-0.3860643804073334,
-0.3753257989883423,
0.13624140620231628,
-0.11544574052095413,
-0.6632248759269714,
0.3014225363731384,
0.0923420861363411,
0.3644678294658661,
1.2257403135299683,
-1.6129040718078613,
0.6667615175247192,
... |
func (r *RPC) UpMoreArts(c context.Context, arg *model.ArgAid, res *[]*model.Meta) (err error) {
*res, err = r.s.MoreArts(c, arg.Aid)
return
} | [
-0.7182171940803528,
-0.4837925434112549,
0.4179414212703705,
-1.3028794527053833,
0.21297556161880493,
0.014263997785747051,
-0.20925745368003845,
-1.3742989301681519,
0.4895418584346771,
0.4945838749408722,
-0.17589004337787628,
0.6580078601837158,
-0.2349211871623993,
0.4787599742412567... |
func (r *RPC) CreationUpStat(c context.Context, arg *model.ArgMid, res *model.UpStat) (err error) {
*res, err = r.s.UpStat(c, arg.Mid)
return
} | [
-0.6296587586402893,
-0.33062028884887695,
0.40634751319885254,
-0.38963115215301514,
0.19998955726623535,
0.6254517436027527,
0.12965275347232819,
-1.4901713132858276,
-0.24684901535511017,
-0.005560003221035004,
-0.2724657356739044,
-0.12049008160829544,
-0.24260050058364868,
0.165135204... |
func (r *RPC) CreationUpThirtyDayStat(c context.Context, arg *model.ArgMid, res *[]*model.ThirtyDayArticle) (err error) {
*res, err = r.s.UpThirtyDayStat(c, arg.Mid)
return
} | [
-0.5591363906860352,
0.11799469590187073,
0.2977299988269806,
-1.3192071914672852,
1.0822787284851074,
0.6047912836074829,
0.3394404947757721,
-1.432492733001709,
-0.49838143587112427,
-0.309239000082016,
-0.09456586837768555,
0.48452481627464294,
0.09981680661439896,
0.2240143120288849,
... |
func (r *RPC) UpLists(c context.Context, arg *model.ArgMid, res *model.UpLists) (err error) {
*res, err = r.s.UpLists(c, arg.Mid, model.ListSortPtime)
return
} | [
-1.0367984771728516,
-0.28087425231933594,
0.32770252227783203,
-0.279390424489975,
0.2179025560617447,
0.21624954044818878,
-0.010425712913274765,
-0.70756995677948,
0.9330459237098694,
1.0272414684295654,
-0.18420007824897766,
-0.34856241941452026,
-1.0258127450942993,
0.539007306098938,... |
func (r *RPC) RebuildAllListReadCount(c context.Context, arg *struct{}, res *struct{}) (err error) {
r.s.RebuildAllListReadCount(c)
return
} | [
-0.7166103720664978,
-0.53789883852005,
0.41927167773246765,
0.09519097208976746,
-1.2155927419662476,
-0.1391364187002182,
-0.4560047686100006,
0.882706880569458,
1.1237469911575317,
-0.5835655927658081,
-0.28274670243263245,
0.4648258686065674,
-0.3736964166164398,
0.11354870349168777,
... |
func GetAnswer(input []day2.PasswordPolicySet) int {
count := 0
for _, element := range input {
if !isValid(element) {
continue
}
count++
}
return count
} | [
-0.4442571997642517,
0.2978123426437378,
0.5948244333267212,
0.18837778270244598,
-0.30071136355400085,
0.7193116545677185,
-0.2104569375514984,
0.02479012869298458,
0.08097723871469498,
0.16319908201694489,
0.22727076709270477,
-0.17568102478981018,
-1.2205579280853271,
0.8401269912719727... |
func (mu *MedicalfileUpdate) Where(ps ...predicate.Medicalfile) *MedicalfileUpdate {
mu.predicates = append(mu.predicates, ps...)
return mu
} | [
0.637428879737854,
-0.9728116989135742,
0.28323981165885925,
-0.3157947361469269,
-0.41566595435142517,
1.065799593925476,
-0.34920406341552734,
0.37817052006721497,
-1.1860463619232178,
-0.9974270462989807,
1.2670797109603882,
0.6385019421577454,
-0.36184564232826233,
-0.3056209087371826,... |
func (mu *MedicalfileUpdate) SetDetail(s string) *MedicalfileUpdate {
mu.mutation.SetDetail(s)
return mu
} | [
0.3946142792701721,
0.23458872735500336,
0.09646455943584442,
1.0456209182739258,
0.17724213004112244,
0.32851165533065796,
0.41583237051963806,
0.6623934507369995,
0.27041369676589966,
-0.7267383933067322,
-0.8293409943580627,
-0.010093186981976032,
-0.14395883679389954,
0.166552305221557... |
func (mu *MedicalfileUpdate) SetAddedTime(t time.Time) *MedicalfileUpdate {
mu.mutation.SetAddedTime(t)
return mu
} | [
-0.6915372014045715,
-0.04463524743914604,
0.10792198032140732,
0.4327911138534546,
-0.10278885811567307,
1.1249953508377075,
-0.3542572259902954,
0.1551981270313263,
0.02254435233771801,
-0.7325314283370972,
-0.10717033594846725,
-0.5724847912788391,
-0.8852535486221313,
1.078836321830749... |
func (mu *MedicalfileUpdate) SetDentistID(id int) *MedicalfileUpdate {
mu.mutation.SetDentistID(id)
return mu
} | [
-1.0688831806182861,
-1.1666637659072876,
0.2228824347257614,
0.6789345145225525,
-0.3059512674808502,
0.9770059585571289,
-0.0841427594423294,
0.6979090571403503,
1.6513999700546265,
0.5333403944969177,
-1.1453913450241089,
-0.01457806583493948,
-0.09727475792169571,
0.722339928150177,
... |
func (mu *MedicalfileUpdate) SetNillableDentistID(id *int) *MedicalfileUpdate {
if id != nil {
mu = mu.SetDentistID(*id)
}
return mu
} | [
-0.2409093976020813,
-0.8348419666290283,
0.07334938645362854,
-0.14259721338748932,
-1.0586271286010742,
0.6854205131530762,
-0.15381555259227753,
1.0800087451934814,
1.2403502464294434,
-0.17859865725040436,
-0.6450648903846741,
0.26219138503074646,
-1.0674437284469604,
0.961862385272979... |
func (mu *MedicalfileUpdate) SetDentist(d *Dentist) *MedicalfileUpdate {
return mu.SetDentistID(d.ID)
} | [
-0.6539574861526489,
-0.7019932866096497,
0.27949750423431396,
0.6046761870384216,
0.11451207846403122,
0.3482736349105835,
-0.10003222525119781,
0.5043348073959351,
0.7564342617988586,
-0.4869166612625122,
-0.6459357738494873,
-0.24835070967674255,
0.08945167809724808,
0.3310025930404663,... |
func (mu *MedicalfileUpdate) SetPatientID(id int) *MedicalfileUpdate {
mu.mutation.SetPatientID(id)
return mu
} | [
-0.5189418792724609,
-0.641990065574646,
-0.029069161042571068,
0.8251450061798096,
-0.48903003334999084,
1.1605263948440552,
0.16348451375961304,
0.6120910048484802,
0.36583900451660156,
-0.17359603941440582,
0.0004849433898925781,
0.0666346400976181,
-0.3923395574092865,
0.85242199897766... |
func (mu *MedicalfileUpdate) SetNillablePatientID(id *int) *MedicalfileUpdate {
if id != nil {
mu = mu.SetPatientID(*id)
}
return mu
} | [
0.4444057047367096,
-0.36826086044311523,
0.024425577372312546,
-0.2731829583644867,
-1.355959415435791,
0.573021411895752,
-0.2514532804489136,
0.43383800983428955,
-0.04884657263755798,
0.17383043467998505,
0.29185256361961365,
0.41923096776008606,
-0.9527334570884705,
0.7642971277236938... |
func (mu *MedicalfileUpdate) SetPatient(p *Patient) *MedicalfileUpdate {
return mu.SetPatientID(p.ID)
} | [
-0.30346617102622986,
-0.19410866498947144,
0.1595330834388733,
0.14751490950584412,
-0.6478803753852844,
0.843774139881134,
-0.014148163609206676,
0.21901822090148926,
-0.24083560705184937,
-1.4813165664672852,
0.5451342463493347,
-0.23967908322811127,
-0.618247926235199,
-0.0324197523295... |
func (mu *MedicalfileUpdate) SetEmployeeID(id int) *MedicalfileUpdate {
mu.mutation.SetEmployeeID(id)
return mu
} | [
-0.8540691137313843,
-0.8628668785095215,
-0.009966172277927399,
0.34653401374816895,
-0.2500951290130615,
1.0745134353637695,
0.39875006675720215,
0.9091273546218872,
0.02935921773314476,
0.18468140065670013,
-0.7692224383354187,
0.03498861566185951,
-0.6032209396362305,
1.692283034324646... |
func (mu *MedicalfileUpdate) SetNillableEmployeeID(id *int) *MedicalfileUpdate {
if id != nil {
mu = mu.SetEmployeeID(*id)
}
return mu
} | [
0.18800576031208038,
-0.608454167842865,
0.24636302888393402,
0.005586667917668819,
-0.9223282337188721,
0.7378661036491394,
0.061713650822639465,
0.4682733118534088,
-0.20110976696014404,
0.2908002734184265,
0.15660269558429718,
0.2536213994026184,
-1.3466721773147583,
1.3026925325393677,... |
func (mu *MedicalfileUpdate) SetEmployee(e *Employee) *MedicalfileUpdate {
return mu.SetEmployeeID(e.ID)
} | [
0.032582078129053116,
-0.60748291015625,
0.31350597739219666,
0.47001078724861145,
0.021252386271953583,
1.1123380661010742,
0.30288559198379517,
0.6446378231048584,
-0.7368162870407104,
-0.3536053001880646,
-0.007137805689126253,
-0.4086756706237793,
-0.38421115279197693,
0.77115410566329... |
func (mu *MedicalfileUpdate) Mutation() *MedicalfileMutation {
return mu.mutation
} | [
-0.1806439906358719,
-1.3669310808181763,
0.23918785154819489,
0.8611541390419006,
0.16421379148960114,
0.7271177768707275,
0.43055519461631775,
0.10316541790962219,
0.6065104007720947,
-1.0778847932815552,
0.9865005016326904,
-0.5209152102470398,
-0.47292616963386536,
-0.39190733432769775... |
func (mu *MedicalfileUpdate) ClearDentist() *MedicalfileUpdate {
mu.mutation.ClearDentist()
return mu
} | [
-0.9614385366439819,
-0.8395877480506897,
0.21505619585514069,
0.7701332569122314,
-0.4329281151294708,
0.725238561630249,
-0.1344708502292633,
0.03271153196692467,
0.8889867663383484,
0.6327410936355591,
-0.2611096203327179,
0.23544445633888245,
-0.017060263082385063,
-0.814860999584198,
... |
func (mu *MedicalfileUpdate) ClearPatient() *MedicalfileUpdate {
mu.mutation.ClearPatient()
return mu
} | [
-0.6018101572990417,
0.0754242017865181,
0.15527525544166565,
0.4887952208518982,
-1.2294690608978271,
1.1397030353546143,
-0.20052577555179596,
-0.4051879048347473,
0.05436565354466438,
-0.5690085291862488,
1.0536205768585205,
0.23722417652606964,
-0.32298293709754944,
-0.7133162021636963... |
func (mu *MedicalfileUpdate) ClearEmployee() *MedicalfileUpdate {
mu.mutation.ClearEmployee()
return mu
} | [
-0.2912347912788391,
-0.21778860688209534,
0.049523502588272095,
0.8216115832328796,
-1.056085467338562,
1.355881690979004,
0.1163344606757164,
0.018257111310958862,
-0.3784230947494507,
0.10995390266180038,
0.27206501364707947,
-0.17552931606769562,
-0.6780291199684143,
0.0526777952909469... |
func (mu *MedicalfileUpdate) Save(ctx context.Context) (int, error) {
if v, ok := mu.mutation.Detail(); ok {
if err := medicalfile.DetailValidator(v); err != nil {
return 0, &ValidationError{Name: "detail", err: fmt.Errorf("ent: validator failed for field \"detail\": %w", err)}
}
}
var (
err error
a... | [
-0.5742161870002747,
0.182119682431221,
0.7417664527893066,
0.07229442894458771,
0.3607007563114166,
-0.5939525365829468,
0.7031779885292053,
-0.07325159013271332,
-1.1059514284133911,
-0.06710530072450638,
0.19893236458301544,
-0.26189807057380676,
-0.7026900053024292,
0.29317858815193176... |
func (mu *MedicalfileUpdate) SaveX(ctx context.Context) int {
affected, err := mu.Save(ctx)
if err != nil {
panic(err)
}
return affected
} | [
-0.368240088224411,
0.5722898244857788,
0.6027482151985168,
0.3794403672218323,
-0.4990084767341614,
0.7492216229438782,
-0.6086930632591248,
0.6644145250320435,
0.4430377185344696,
-0.3889774680137634,
-0.5930504202842712,
-0.4508829414844513,
-0.8033588528633118,
-0.14455826580524445,
... |
func (mu *MedicalfileUpdate) Exec(ctx context.Context) error {
_, err := mu.Save(ctx)
return err
} | [
0.35836249589920044,
-0.3799789249897003,
0.5176281332969666,
0.39364102482795715,
0.29235732555389404,
1.203609585762024,
-0.5900430083274841,
0.07338161021471024,
-0.39688238501548767,
-0.09570492058992386,
0.44399937987327576,
-0.3676692843437195,
-0.46748480200767517,
-0.43584069609642... |
func (mu *MedicalfileUpdate) ExecX(ctx context.Context) {
if err := mu.Exec(ctx); err != nil {
panic(err)
}
} | [
0.8131504654884338,
0.1663745492696762,
0.5946856737136841,
0.4548013210296631,
-0.16078636050224304,
1.2588497400283813,
-0.9094162583351135,
0.16998611390590668,
0.09758094698190689,
-0.6244906187057495,
0.8060591220855713,
0.3116498291492462,
0.11483949422836304,
-0.10012567043304443,
... |
func (muo *MedicalfileUpdateOne) SetDetail(s string) *MedicalfileUpdateOne {
muo.mutation.SetDetail(s)
return muo
} | [
0.3895857036113739,
0.4554559588432312,
0.16664767265319824,
1.2281185388565063,
0.2507726550102234,
0.4976562261581421,
0.4056142270565033,
0.835600733757019,
0.33316275477409363,
-0.7940511703491211,
-0.7862836122512817,
0.08300034701824188,
-0.15410608053207397,
0.2238302379846573,
-0... |
func (muo *MedicalfileUpdateOne) SetAddedTime(t time.Time) *MedicalfileUpdateOne {
muo.mutation.SetAddedTime(t)
return muo
} | [
-0.6917844414710999,
0.15545302629470825,
0.14938312768936157,
0.6338281035423279,
-0.06386631727218628,
1.1715011596679688,
-0.3170758783817291,
0.3654588758945465,
0.038972750306129456,
-0.8037485480308533,
-0.16644693911075592,
-0.41515469551086426,
-0.8261706233024597,
0.85631239414215... |
func (muo *MedicalfileUpdateOne) SetDentistID(id int) *MedicalfileUpdateOne {
muo.mutation.SetDentistID(id)
return muo
} | [
-1.0673015117645264,
-0.957229733467102,
0.28250229358673096,
0.983299970626831,
-0.27067431807518005,
1.0151280164718628,
-0.1558830738067627,
0.8742153644561768,
1.6740745306015015,
0.5142372250556946,
-1.2724056243896484,
0.0058375149965286255,
-0.10287141054868698,
0.7011957764625549,
... |
func (muo *MedicalfileUpdateOne) SetNillableDentistID(id *int) *MedicalfileUpdateOne {
if id != nil {
muo = muo.SetDentistID(*id)
}
return muo
} | [
-0.16411571204662323,
-0.6619870662689209,
0.14838671684265137,
-0.04029812291264534,
-1.1273939609527588,
0.7117056846618652,
-0.02287089079618454,
1.1597028970718384,
1.4510014057159424,
-0.22385452687740326,
-0.8269635438919067,
0.34614720940589905,
-1.081349492073059,
0.831333100795745... |
func (muo *MedicalfileUpdateOne) SetDentist(d *Dentist) *MedicalfileUpdateOne {
return muo.SetDentistID(d.ID)
} | [
-0.6612343788146973,
-0.3320022523403168,
0.35205915570259094,
0.8579078316688538,
0.222087100148201,
0.35845860838890076,
0.0761600062251091,
0.6580830812454224,
0.78275066614151,
-0.6733891367912292,
-0.769085168838501,
-0.17638546228408813,
-0.05410134419798851,
0.28913459181785583,
-... |
func (muo *MedicalfileUpdateOne) SetPatientID(id int) *MedicalfileUpdateOne {
muo.mutation.SetPatientID(id)
return muo
} | [
-0.5787619948387146,
-0.3924288749694824,
0.05265611782670021,
1.0825486183166504,
-0.43811625242233276,
1.1568920612335205,
0.10584957897663116,
0.8179823160171509,
0.38357800245285034,
-0.27583587169647217,
-0.09004344791173935,
0.16100846230983734,
-0.47786766290664673,
0.82645767927169... |
func (muo *MedicalfileUpdateOne) SetNillablePatientID(id *int) *MedicalfileUpdateOne {
if id != nil {
muo = muo.SetPatientID(*id)
}
return muo
} | [
0.4987296164035797,
-0.08164733648300171,
0.12070991843938828,
-0.178473562002182,
-1.3604856729507446,
0.6248040199279785,
-0.1407996416091919,
0.5409814119338989,
0.09613154828548431,
0.18654592335224152,
0.21662096679210663,
0.43240076303482056,
-0.9650778770446777,
0.5165560841560364,
... |
func (muo *MedicalfileUpdateOne) SetPatient(p *Patient) *MedicalfileUpdateOne {
return muo.SetPatientID(p.ID)
} | [
-0.2534095346927643,
0.25254639983177185,
0.26224285364151,
0.4364393651485443,
-0.45763930678367615,
0.7210130095481873,
0.26761728525161743,
0.44664254784584045,
-0.13346821069717407,
-1.6778372526168823,
0.4082931876182556,
-0.17355871200561523,
-0.7104023098945618,
-0.1171397864818573,... |
func (muo *MedicalfileUpdateOne) SetEmployeeID(id int) *MedicalfileUpdateOne {
muo.mutation.SetEmployeeID(id)
return muo
} | [
-0.7736934423446655,
-0.7420450448989868,
0.09837975353002548,
0.6216006875038147,
-0.25765687227249146,
1.1998547315597534,
0.2896323502063751,
1.1031445264816284,
0.013096271082758904,
0.07907045632600784,
-0.8634468913078308,
0.1232646182179451,
-0.6529414653778076,
1.603508710861206,
... |
func (muo *MedicalfileUpdateOne) SetNillableEmployeeID(id *int) *MedicalfileUpdateOne {
if id != nil {
muo = muo.SetEmployeeID(*id)
}
return muo
} | [
0.2182871699333191,
-0.3942042887210846,
0.31596100330352783,
0.17617583274841309,
-0.947062611579895,
0.7428686618804932,
0.07309667766094208,
0.5696316957473755,
-0.11187152564525604,
0.2776724100112915,
-0.03213595226407051,
0.3032209575176239,
-1.4050381183624268,
1.1312588453292847,
... |
func (muo *MedicalfileUpdateOne) SetEmployee(e *Employee) *MedicalfileUpdateOne {
return muo.SetEmployeeID(e.ID)
} | [
0.10586366802453995,
-0.22370925545692444,
0.43616119027137756,
0.7206021547317505,
0.018255306407809258,
1.1069971323013306,
0.48036444187164307,
0.8114562034606934,
-0.6969358921051025,
-0.5885809659957886,
-0.12688395380973816,
-0.3268800675868988,
-0.480299174785614,
0.6929084062576294... |
func (muo *MedicalfileUpdateOne) Mutation() *MedicalfileMutation {
return muo.mutation
} | [
-0.23320764303207397,
-0.8740869760513306,
0.29643768072128296,
0.9571868777275085,
0.4064439535140991,
0.5762909650802612,
0.5445255041122437,
0.2963005602359772,
0.6550158262252808,
-1.0556819438934326,
0.6467293500900269,
-0.5104802846908569,
-0.6572506427764893,
-0.42137545347213745,
... |
func (muo *MedicalfileUpdateOne) ClearDentist() *MedicalfileUpdateOne {
muo.mutation.ClearDentist()
return muo
} | [
-0.8678969740867615,
-0.5767053961753845,
0.2488696128129959,
1.0602810382843018,
-0.2266627550125122,
0.7034971117973328,
-0.09130962938070297,
0.22355322539806366,
0.8522090911865234,
0.4836285710334778,
-0.4165249466896057,
0.2948445975780487,
-0.076888307929039,
-0.8564143180847168,
... |
func (muo *MedicalfileUpdateOne) ClearPatient() *MedicalfileUpdateOne {
muo.mutation.ClearPatient()
return muo
} | [
-0.5417506694793701,
0.30725061893463135,
0.16246360540390015,
0.7144175171852112,
-1.0287351608276367,
1.0301692485809326,
-0.17660412192344666,
-0.2044171839952469,
0.11534833908081055,
-0.7272897958755493,
0.9033735990524292,
0.3027023673057556,
-0.2975347638130188,
-0.6753808259963989,... |
func (muo *MedicalfileUpdateOne) ClearEmployee() *MedicalfileUpdateOne {
muo.mutation.ClearEmployee()
return muo
} | [
-0.2701077163219452,
-0.016002411022782326,
0.11357244849205017,
1.0697208642959595,
-0.9474779963493347,
1.3459079265594482,
0.08549284934997559,
0.14772729575634003,
-0.3820957839488983,
0.06182935833930969,
0.18674127757549286,
-0.07419431209564209,
-0.6297061443328857,
0.07461643218994... |
func (muo *MedicalfileUpdateOne) Save(ctx context.Context) (*Medicalfile, error) {
if v, ok := muo.mutation.Detail(); ok {
if err := medicalfile.DetailValidator(v); err != nil {
return nil, &ValidationError{Name: "detail", err: fmt.Errorf("ent: validator failed for field \"detail\": %w", err)}
}
}
var (
er... | [
-0.2848445177078247,
0.04355265945196152,
0.5901851058006287,
-0.008202054537832737,
0.5032797455787659,
-0.12658289074897766,
0.34409865736961365,
-0.23856481909751892,
-0.7796596884727478,
0.04194680601358414,
0.3645562529563904,
-0.031005194410681725,
-0.691065788269043,
0.0402067266404... |
func (muo *MedicalfileUpdateOne) SaveX(ctx context.Context) *Medicalfile {
m, err := muo.Save(ctx)
if err != nil {
panic(err)
}
return m
} | [
-0.06585699319839478,
0.2592073380947113,
0.43671852350234985,
0.6093423366546631,
-0.5778771638870239,
1.142065167427063,
-0.9285311698913574,
0.11322429031133652,
0.5049576163291931,
-0.5716491937637329,
-0.4995148181915283,
-0.39203885197639465,
-0.7044044733047485,
-0.3509337306022644,... |
func (muo *MedicalfileUpdateOne) Exec(ctx context.Context) error {
_, err := muo.Save(ctx)
return err
} | [
0.28075703978538513,
-0.02087141014635563,
0.5836154222488403,
0.6659426093101501,
0.4448941648006439,
1.120164394378662,
-0.3445069193840027,
0.08587121218442917,
-0.18987403810024261,
-0.15230143070220947,
0.21571946144104004,
-0.3444960415363312,
-0.6953189373016357,
-0.3904941380023956... |
func (muo *MedicalfileUpdateOne) ExecX(ctx context.Context) {
if err := muo.Exec(ctx); err != nil {
panic(err)
}
} | [
0.735117495059967,
0.4211881458759308,
0.6961721777915955,
0.7067434787750244,
-0.06932340562343597,
1.2060108184814453,
-0.8288633227348328,
0.20229320228099823,
0.18825340270996094,
-0.5128275752067566,
0.544814944267273,
0.4749540686607361,
-0.04090214893221855,
-0.17907990515232086,
... |
func (r *AWSS3Bucket_SseKmsEncryptedObjects) AWSCloudFormationType() string {
return "AWS::S3::Bucket.SseKmsEncryptedObjects"
} | [
0.4263855218887329,
0.26923608779907227,
0.45017972588539124,
0.04964222013950348,
0.37364131212234497,
0.1273028701543808,
0.16719095408916473,
-0.4558314383029938,
0.193884015083313,
0.44227278232574463,
-0.5649276375770569,
0.21097669005393982,
0.2213660180568695,
0.5560207962989807,
... |
func AddWebhook(ctx context.Context, w *Webhook) error {
return db.Bun().RunInTx(ctx, nil, func(ctx context.Context, tx bun.Tx) error {
_, err := tx.NewInsert().Model(w).Exec(ctx)
if err != nil {
return err
}
for _, t := range w.Triggers {
t.WebhookID = w.ID
}
if len(w.Triggers) != 0 {
_, err = t... | [
0.14180609583854675,
0.2860136330127716,
1.0454152822494507,
0.4344329535961151,
0.7062563896179199,
0.22334152460098267,
0.5733183026313782,
0.40658268332481384,
0.13046225905418396,
-0.4336641728878021,
-0.371288925409317,
-1.1591719388961792,
-0.8392289280891418,
0.8541011214256287,
-... |
func GetWebhook(ctx context.Context, webhookID int) (*Webhook, error) {
webhook := Webhook{}
err := db.Bun().NewSelect().
Model(&webhook).
Relation("Triggers").
Where("id = ?", webhookID).
Scan(ctx)
if err != nil {
return nil, err
}
return &webhook, nil
} | [
1.1394531726837158,
0.628259003162384,
0.6158672571182251,
0.6947486400604248,
0.5813969373703003,
-0.6491507291793823,
0.23688657581806183,
0.010073295794427395,
0.3892594873905182,
-0.7258279323577881,
-0.21160872280597687,
0.378435879945755,
-0.40452876687049866,
0.019677959382534027,
... |
func GetWebhooks(ctx context.Context) (Webhooks, error) {
webhooks := Webhooks{}
err := db.Bun().NewSelect().
Model(&webhooks).
Relation("Triggers").
Scan(ctx)
if err != nil {
return nil, err
}
return webhooks, nil
} | [
0.22509603202342987,
0.6635894775390625,
0.5693318247795105,
0.8684172630310059,
0.6217350959777832,
-0.4676222801208496,
0.12409573793411255,
-0.3711002469062805,
0.062293507158756256,
-0.7984046339988708,
-0.2732599377632141,
0.12893998622894287,
-0.844283938407898,
-0.07912631332874298,... |
func DeleteWebhook(ctx context.Context, id WebhookID) error {
_, err := db.Bun().NewDelete().Model((*Webhook)(nil)).Where("id = ?", id).Exec(ctx)
if err != nil {
return err
}
return nil
} | [
0.7905119061470032,
0.2699165344238281,
0.38601237535476685,
0.7879445552825928,
0.9642103910446167,
0.2092503011226654,
0.31739917397499084,
0.40528300404548645,
0.11046760529279709,
-0.2702904939651489,
-0.5397472977638245,
-0.24739794433116913,
-0.5066726803779602,
1.0676954984664917,
... |
func ReportExperimentStateChanged(
ctx context.Context, e model.Experiment, activeConfig expconf.ExperimentConfig,
) error {
defer func() {
if rec := recover(); rec != nil {
log.Errorf("uncaught error in webhook report: %v", rec)
}
}()
var ts []Trigger
switch err := db.Bun().NewSelect().Model(&ts).Relation... | [
-0.05533589795231819,
0.6184890270233154,
0.6173956990242004,
-0.3075640797615051,
1.0409802198410034,
-0.4374118149280548,
0.8255274891853333,
0.12984682619571686,
0.12967655062675476,
0.7842047214508057,
-0.20731569826602936,
-0.22854889929294586,
-0.45533379912376404,
0.4952521920204162... |
func TestRelationship(t *testing.T) {
defer tests.Recover(t)
} | [
0.7647385001182556,
0.460032194852829,
0.5039736032485962,
0.6962969303131104,
1.1331912279129028,
0.7376390695571899,
0.9425317645072937,
-0.2604716420173645,
0.8188402056694031,
-1.1259503364562988,
-0.3478950560092926,
-1.0232139825820923,
-0.9221508502960205,
-0.7900816798210144,
-0.... |
func (s *Service) CreateBlob(c context.Context, req *blobpb.CreateBlobRequest) (*blobpb.CreateBlobResponse, error) {
aid := id.AccountID(req.AccountId)
br, err := s.Mongo.CreateBlob(c, aid)
if err != nil {
s.Logger.Error("cannot create blob", zap.Error(err))
return nil, status.Error(codes.Internal, "")
}
u, e... | [
-0.4894648492336273,
-0.022904900833964348,
0.8943575620651245,
0.6190366148948669,
0.1845945566892624,
0.7978107929229736,
0.12702901661396027,
-0.27718281745910645,
0.4651012718677521,
0.3941700756549835,
-0.29174667596817017,
-0.5913252830505371,
-1.0735074281692505,
-0.0646701157093048... |
func (s *Service) GetBlob(c context.Context, req *blobpb.GetBlobRequest) (*blobpb.GetBlobResponse, error) {
br, err := s.getBlobRecord(c, id.BlobID(req.Id))
if err != nil {
return nil, err
}
r, err := s.Storage.Get(c, br.Path)
if r != nil {
defer r.Close()
}
if err != nil {
return nil, status.Errorf(codes... | [
-0.24478834867477417,
-0.28002938628196716,
1.0762829780578613,
0.6330094933509827,
0.5629457831382751,
0.26109686493873596,
-0.0667581856250763,
-0.9148160815238953,
0.4065800905227661,
0.15086369216442108,
0.32069504261016846,
0.6460652351379395,
-0.9073504209518433,
-0.46539080142974854... |
func (s *Service) GetBlobURL(c context.Context, req *blobpb.GetBlobURLRequest) (*blobpb.GetBlobURLResponse, error) {
br, err := s.getBlobRecord(c, id.BlobID(req.Id))
if err != nil {
return nil, err
}
u, err := s.Storage.SignURL(c, http.MethodGet, br.Path, secToDuration(req.TimeoutSec))
if err != nil {
return ... | [
-0.49837082624435425,
-0.07033707946538925,
1.053470492362976,
1.1925562620162964,
0.5232728719711304,
0.3960743844509125,
-0.15943409502506256,
-0.3139197826385498,
-0.36280953884124756,
0.5886666178703308,
-0.3600255250930786,
0.3581450283527374,
-0.7180325984954834,
0.05535119026899338,... |
func GetList(pageNumber, minRating int, sort, order string) ([]Movie, error) {
v := url.Values{}
v.Set("limit", "50")
v.Set("sort_by", sort)
v.Set("order_by", order)
v.Set("minimum_rating", strconv.Itoa(minRating))
v.Set("page", strconv.Itoa(pageNumber))
URL := fmt.Sprintf("%s/list_movies.json?%s", APIEndpoint, ... | [
-1.2287064790725708,
-0.12449230998754501,
0.7308005690574646,
0.42254796624183655,
0.7152495384216309,
-0.6697937846183777,
-1.3995939493179321,
0.00885394960641861,
0.060469698160886765,
0.6772639155387878,
-0.6944618225097656,
1.1599239110946655,
-0.32717666029930115,
0.5655862092971802... |
func Status() error {
v := url.Values{}
v.Set("limit", "1")
v.Set("sort_by", SortByPeers)
v.Set("order_by", OrderDesc)
v.Set("minimum_rating", "6")
URL := fmt.Sprintf("%s/list_movies.json?%s", APIEndpoint, v.Encode())
movies, err := getMovieList(URL)
if err != nil {
return err
}
if len(movies) == 0 {
ret... | [
-0.8992816805839539,
-0.6711711287498474,
0.4434317648410797,
0.217244490981102,
0.5806440711021423,
0.07651471346616745,
-0.8863014578819275,
0.4503493309020996,
-0.20355868339538574,
0.32043585181236267,
-0.857181191444397,
0.6263028979301453,
-0.4710906147956848,
1.0720304250717163,
0... |
func (*ProblemBundleFactory) Create(bundle FileTreeNode, relativePath string) error {
fileSvc := file.NewService(nil)
if err := bundle.Write("."); err != nil {
return err
}
if err := fileSvc.Compress("./bundle", filepath.Clean(relativePath)); err != nil {
return err
}
if err := bundle.Remove("."); err != n... | [
0.5974839329719543,
0.032887957990169525,
0.7032655477523804,
0.5825514793395996,
-0.22161760926246643,
0.8181329965591431,
0.18020175397396088,
-0.1625605672597885,
-1.0340136289596558,
0.2725549042224884,
0.974101185798645,
-0.9429416060447693,
-0.16514484584331512,
0.9450926780700684,
... |
func coinChange(coins []int, amount int) int {
// let a(i, j) be the result for first i coins to get j amount.
// then a(i, j) = min( a(i-1, j), a(i, j-coins[i])+1)
// base case a(i, 0)=0, a(i, coins[i])=1
if amount == 0 {
return 0
}
a0 := make([]int, amount+1)
a1 := make([]int, amount+1)
for i := 0; i < len(... | [
-0.27431732416152954,
-0.3754901885986328,
0.8942537307739258,
-0.4107959568500519,
-0.39477941393852234,
-0.8463191986083984,
1.1943576335906982,
0.10676611959934235,
0.04339426010847092,
0.8397853970527649,
-0.07756602764129639,
0.38850754499435425,
-0.07793309539556503,
0.68426483869552... |
func NewDBOutboundOp(system string, opts ...Option) *Schema {
cfg := &config{}
for _, opt := range opts {
opt(cfg)
}
return New(&dbOutboundOp{cfg: cfg, system: system})
} | [
-0.37222644686698914,
0.1425390988588333,
0.4976254403591156,
0.43885400891304016,
-0.7587909698486328,
-0.13739481568336487,
-0.922501802444458,
0.02537851780653,
-0.535398542881012,
0.6976603865623474,
-0.5174805521965027,
0.2463078796863556,
-0.9314690232276917,
-0.43911445140838623,
... |
func NewElasticsearchOutboundOp(opts ...Option) *Schema {
return NewDBOutboundOp("elasticsearch", opts...)
} | [
-0.42549142241477966,
-0.18799848854541779,
0.4708927869796753,
0.29934194684028625,
-0.38657742738723755,
0.04149867594242096,
-0.7662408351898193,
0.4505819082260132,
0.03865089267492294,
0.9312043786048889,
-0.186195969581604,
-0.2709944546222687,
-0.10909470915794373,
-1.32623600959777... |
func NewMongoDBOutboundOp(opts ...Option) *Schema {
return NewDBOutboundOp("mongodb", opts...)
} | [
-0.06353423744440079,
-0.04957592114806175,
0.61967933177948,
1.0528054237365723,
-0.48493286967277527,
-0.37290889024734497,
-0.871028482913971,
-0.028863152489066124,
-0.10816515237092972,
1.0697298049926758,
-0.46234291791915894,
0.15912297368049622,
-1.1591861248016357,
-0.625795781612... |
func NewCassandraOutboundOp(opts ...Option) *Schema {
return NewDBOutboundOp("cassandra", opts...)
} | [
0.9988393783569336,
0.09709834307432175,
0.505820631980896,
0.38076987862586975,
-1.4363434314727783,
-0.18660876154899597,
-0.9165043830871582,
0.03704816848039627,
0.016467049717903137,
0.18006110191345215,
-0.8133363127708435,
0.20984035730361938,
0.2696537375450134,
-0.7696970701217651... |
func Upload(ctx context.Context, sess *session.Session, src, dest string) (string, error) {
f, err := os.Open(src)
if err != nil {
return "", fmt.Errorf("failed to open file %q, %v", src, err)
}
u, err := url.Parse(dest)
if err != nil {
return "", fmt.Errorf("url parse error: %v", err)
}
if u.Scheme != "s3"... | [
-0.07186426222324371,
0.4186897575855255,
0.9916468262672424,
-0.6963105797767639,
-1.002881407737732,
-0.08440851420164108,
-0.09640081971883774,
-0.3216519355773926,
-0.23962701857089996,
0.5767684578895569,
0.4433196485042572,
0.06650536507368088,
0.040407296270132065,
-0.62160646915435... |
func parseYaml(yaml string) (*UnstructuredManifest, error) {
rawYamlParsed := &map[string]interface{}{}
err := yamlParser.Unmarshal([]byte(yaml), rawYamlParsed)
if err != nil {
return nil, err
}
rawJSON, err := json.Marshal(dyno.ConvertMapI2MapS(*rawYamlParsed))
if err != nil {
return nil, err
}
unstruct ... | [
-0.5569220185279846,
-0.9633873701095581,
0.7433241605758667,
-0.7453341484069824,
-0.5111119747161865,
-0.5665109157562256,
0.3455333709716797,
0.31982266902923584,
0.9441267251968384,
-0.9264807105064392,
-0.5713903903961182,
0.16517707705497742,
0.32928475737571716,
0.10554812103509903,... |
func checkAPIResourceIsPresent(available []*meta_v1.APIResourceList, resource meta_v1_unstruct.Unstructured) (*meta_v1.APIResource, bool) {
for _, rList := range available {
if rList == nil {
continue
}
group := rList.GroupVersion
for _, r := range rList.APIResources {
if group == resource.GroupVersionKi... | [
-1.4342410564422607,
-0.9825975894927979,
0.3983881175518036,
-0.9038673639297485,
0.18584200739860535,
0.1725694239139557,
-0.4675682485103607,
0.5993896722793579,
-0.13564063608646393,
1.3676403760910034,
-0.48549044132232666,
-0.4764325022697449,
-0.9149794578552246,
0.4583689570426941,... |
func generateSelfLink(apiVersion, namespace, kind, name string) string {
var b strings.Builder
// for any v1 api served objects, they used to be served from /api
// all others are served from /apis
if apiVersion == "v1" {
b.WriteString("/api")
} else {
b.WriteString("/apis")
}
if len(apiVersion) != 0 {
f... | [
-0.3120068609714508,
-0.7732375860214233,
0.7598687410354614,
-0.2836530804634094,
-0.7969973087310791,
-0.47707706689834595,
0.1836196929216385,
0.31676581501960754,
-0.12451798468828201,
-0.41035744547843933,
-0.020054714754223824,
0.7379066944122314,
-0.021710261702537537,
-0.0637366250... |
func computeDiscoverCacheDir(parentDir, host string) string {
// strip the optional scheme from host if its there:
schemelessHost := strings.Replace(strings.Replace(host, "https://", "", 1), "http://", "", 1)
// now do a simple collapse of non-AZ09 characters. Collisions are possible but unlikely. Even if we do co... | [
0.11575863510370255,
0.33614087104797363,
0.5611171722412109,
0.15604719519615173,
-0.5894070863723755,
-0.32517874240875244,
0.6898598074913025,
0.6077306270599365,
-0.3735424280166626,
-0.0069296169094741344,
0.19072028994560242,
0.04402487352490425,
0.28821054100990295,
0.36242240667343... |
func (r Runner) AddAccount(ctx context.Context, name, mnemonic string) (Account, error) {
b := &bytes.Buffer{}
// check if account already exists.
var accounts []Account
if err := r.run(ctx, runOptions{stdout: b}, r.cc.ListKeysCommand()); err != nil {
return Account{}, err
}
if err := json.NewDecoder(b).Decode... | [
0.4057628810405731,
0.141799196600914,
0.8581541180610657,
0.5125077962875366,
-0.02404913865029812,
-0.2522527873516083,
0.5136235356330872,
-0.012295245192945004,
0.7298107147216797,
0.21215391159057617,
-0.012852118350565434,
0.9981089234352112,
-0.0993092879652977,
-0.0844908058643341,... |
func (r Runner) ShowAccount(ctx context.Context, name string) (Account, error) {
b := &bytes.Buffer{}
opt := []step.Option{
r.cc.ShowKeyAddressCommand(name),
}
if r.cc.KeyringPassword != "" {
input := &bytes.Buffer{}
fmt.Fprintln(input, r.cc.KeyringPassword)
opt = append(opt, step.Write(input.Bytes()))
}... | [
0.5493466854095459,
-0.5626494884490967,
0.7747921347618103,
0.2438395619392395,
-1.231091856956482,
-0.3307291567325592,
0.7883614301681519,
0.2314235121011734,
1.1693514585494995,
0.560863196849823,
0.211615189909935,
1.135659098625183,
0.18567334115505219,
-0.14492186903953552,
0.6239... |
func (r Runner) AddGenesisAccount(ctx context.Context, address, coins string) error {
return r.run(ctx, runOptions{}, r.cc.AddGenesisAccountCommand(address, coins))
} | [
-1.0043911933898926,
0.21106167137622833,
0.3585650324821472,
0.6171370148658752,
0.44073188304901123,
0.8966389298439026,
0.7722587585449219,
-0.08358384668827057,
-0.3020975589752197,
-0.1959836632013321,
-0.14680324494838715,
1.4984639883041382,
0.024959055706858635,
-0.2912973463535309... |
func GetSerialization(name string) Serialization {
if v, ok := serializationMap[name]; ok {
return v
}
return DefaultSerialization
} | [
-0.5720739960670471,
0.5094994902610779,
0.15618464350700378,
0.8478038311004639,
0.039177801460027695,
-1.306379795074463,
0.28857898712158203,
-0.7306665182113647,
0.49661195278167725,
0.6692958474159241,
-0.8004400134086609,
-0.658582329750061,
-0.8176516890525818,
0.006245377939194441,... |
func buildKubeletArgMap(opts kubeletFlagsOpts) map[string]string {
kubeletFlags := buildKubeletArgMapCommon(opts)
// TODO: Conditionally set `--cgroup-driver` to either `systemd` or `cgroupfs` for CRI other than Docker
if opts.nodeRegOpts.CRISocket == constants.DefaultDockerCRISocket {
driver, err := kubeadmutil.... | [
-0.43049630522727966,
-0.11037151515483856,
0.6383398175239563,
0.19710849225521088,
0.7994719743728638,
-0.22179166972637177,
-0.08531306684017181,
0.16028918325901031,
-0.2878381609916687,
0.20555604994297028,
0.5043054223060608,
0.17913314700126648,
-0.5302234292030334,
0.59249073266983... |
func MergeRawExtension(base *runtime.RawExtension, patch *runtime.RawExtension) (*runtime.RawExtension, error) {
patchParameter, err := util.RawExtension2Map(patch)
if err != nil {
return nil, errors.Wrapf(err, "failed to convert patch parameters to map")
}
baseParameter, err := util.RawExtension2Map(base)
if er... | [
-0.836819052696228,
-0.3653956651687622,
1.0024775266647339,
-0.7843072414398193,
-1.0316298007965088,
-0.19683554768562317,
-0.896615207195282,
-0.5062510967254639,
0.34322190284729004,
0.04490310698747635,
-0.5446503162384033,
0.8558591604232788,
-0.206189826130867,
0.27265676856040955,
... |
func MergeComponent(base *common.ApplicationComponent, patch *v1alpha1.EnvComponentPatch) (*common.ApplicationComponent, error) {
newComponent := base.DeepCopy()
var err error
// merge component properties
newComponent.Properties, err = MergeRawExtension(base.Properties, patch.Properties)
if err != nil {
return... | [
0.22309759259223938,
-1.6386445760726929,
0.6957982778549194,
-0.8408697247505188,
-0.3789242208003998,
0.503999650478363,
-0.049940209835767746,
-0.4422733783721924,
0.4737623631954193,
0.01668662019073963,
0.5360738039016724,
0.3571043312549591,
0.12353689968585968,
-0.15080814063549042,... |
func PatchApplication(base *v1beta1.Application, patch *v1alpha1.EnvPatch, selector *v1alpha1.EnvSelector) (*v1beta1.Application, error) {
newApp := base.DeepCopy()
// init components
compMaps := map[string]*common.ApplicationComponent{}
var compOrders []string
for _, comp := range base.Spec.Components {
compMa... | [
-0.33881083130836487,
-1.6707444190979004,
0.9254614114761353,
-0.7723551392555237,
-0.4223714768886566,
0.8952482342720032,
0.31417781114578247,
-0.08622445911169052,
0.7825289964675903,
0.8875770568847656,
0.5285925269126892,
0.1157759577035904,
-0.23402416706085205,
0.5342347025871277,
... |
func PatchApplicationByEnvBindingEnv(app *v1beta1.Application, policyName string, envName string) (*v1beta1.Application, error) {
policy, err := GetEnvBindingPolicy(app, policyName)
if err != nil {
return nil, err
}
if policy != nil {
for _, env := range policy.Envs {
if env.Name == envName {
return Patc... | [
-0.7741722464561462,
-1.3455619812011719,
0.88246089220047,
0.06240836903452873,
0.01860915683209896,
1.1446198225021362,
0.7613299489021301,
0.03513193503022194,
0.4988454580307007,
1.9664530754089355,
0.9127088189125061,
0.7907313108444214,
-0.47855737805366516,
0.3492591679096222,
-0.... |
func main() {
} | [
0.5935109257698059,
-0.5238813161849976,
0.06262364238500595,
1.9832351207733154,
0.3146790564060211,
0.4833202362060547,
1.6697919368743896,
0.6601263284683228,
-0.13723190128803253,
-0.6224525570869446,
-0.7590957880020142,
0.3508590757846832,
-0.36477935314178467,
0.25635138154029846,
... |
func New(dsn string) (*Client, error) {
db, err := sql.Open("postgres", dsn)
if err != nil {
return nil, err
}
return &Client{db: db}, nil
} | [
0.3062281608581543,
0.2165493667125702,
0.36101529002189636,
-0.59560626745224,
-0.919116735458374,
-0.8331830501556396,
0.12236838787794113,
-0.0037234334740787745,
-1.1910561323165894,
-0.03538871929049492,
-0.5226294994354248,
0.6635432243347168,
0.3873915672302246,
-0.16909492015838623... |
func (c Client) Table(name string) Table {
return &table{name: name, db: c.db}
} | [
1.2736481428146362,
-0.013524392619729042,
0.18122752010822296,
-0.36172977089881897,
-0.44585755467414856,
0.20878884196281433,
-0.3812401592731476,
-0.7019270658493042,
-0.19148768484592438,
-0.5729115605354309,
-0.6323612928390503,
0.13961295783519745,
-0.37386855483055115,
-0.430762410... |
func (c Client) CreateTable(name string) error {
// create table
_, err := c.db.Exec(`
CREATE TABLE ` + name + ` (
created TIMESTAMP NOT NULL,
deleted TIMESTAMP,
body JSONB NOT NULL
);
`)
if err != nil {
return err
}
// create index for id column
_, err = c.db.Exec(`
CREATE INDEX idx` + name + ... | [
-0.04929076507687569,
0.3952760696411133,
0.644973635673523,
0.2378539890050888,
0.9559675455093384,
0.24853616952896118,
0.17448316514492035,
-0.8744389414787292,
-0.5242657661437988,
0.4723917543888092,
-0.34733039140701294,
-0.6693341135978699,
-0.1810218244791031,
-0.00410112738609314,... |
func CanceledContext() context.Context {
dateline := time.Now().Add(time.Duration(1) * time.Millisecond)
ctx, cancel := context.WithDeadline(context.Background(), dateline)
defer cancel()
time.Sleep(time.Duration(2) * time.Millisecond)
return ctx
} | [
1.2469791173934937,
-0.367685467004776,
0.6487823128700256,
0.3671812117099762,
-1.6358599662780762,
0.3615036606788635,
-0.8750323057174683,
0.018234997987747192,
0.7670210003852844,
-0.3735257387161255,
-0.005627230741083622,
-0.08675266802310944,
0.220197394490242,
0.19788461923599243,
... |
func (*UnaryRequest) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{0}
} | [
-0.7041857838630676,
0.5736724734306335,
0.3524770438671112,
0.049523159861564636,
-0.08067005127668381,
-0.584294319152832,
0.21654802560806274,
0.6651387214660645,
-0.19809456169605255,
-0.758993923664093,
-0.11981089413166046,
-0.01323389820754528,
-0.01951127126812935,
0.74911129474639... |
func (*UnaryReply) Descriptor() ([]byte, []int) {
return file_main_proto_rawDescGZIP(), []int{1}
} | [
-0.9701960682868958,
0.14181286096572876,
0.1780385971069336,
-0.629259467124939,
0.5488328337669373,
-0.6568868160247803,
-0.2694990336894989,
0.3409222364425659,
0.4995022118091583,
-0.23883052170276642,
-0.7997024059295654,
0.3938382565975189,
-0.8329546451568604,
0.02700759656727314,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.