text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (a *MockApp) Settings() fyne.Settings {
args := a.Called()
return args.Get(0).(fyne.Settings)
} | [
-1.2451502084732056,
0.4000296890735626,
0.42148950695991516,
0.12608185410499573,
1.0922737121582031,
-0.8072921633720398,
0.6402905583381653,
-0.7504701614379883,
0.19424687325954437,
0.7661139965057373,
0.3152153491973877,
-0.8355542421340942,
-0.03381776809692383,
0.5206094980239868,
... |
func (a *MockApp) Preferences() fyne.Preferences {
args := a.Called()
return args.Get(0).(fyne.Preferences)
} | [
-0.9391557574272156,
-0.12276434898376465,
0.5029261708259583,
-0.020186906680464745,
1.373488187789917,
-0.5437788963317871,
0.4305277466773987,
-0.4256526529788971,
0.5602525472640991,
0.40861380100250244,
0.2171897292137146,
-0.33795392513275146,
-0.13934671878814697,
0.5470585227012634... |
func (a *MockApp) Storage() fyne.Storage {
args := a.Called()
return args.Get(0).(fyne.Storage)
} | [
-0.9406169652938843,
0.2281351238489151,
0.2802651524543762,
0.7363747358322144,
0.48600247502326965,
-0.3114716112613678,
1.3746875524520874,
-0.9590098261833191,
0.17883826792240143,
-0.1865801364183426,
0.5283896327018738,
-0.43573102355003357,
0.3015645444393158,
0.9023405313491821,
... |
func (a *MockApp) Lifecycle() fyne.Lifecycle {
args := a.Called()
return args.Get(0).(fyne.Lifecycle)
} | [
0.005292318295687437,
-0.18534429371356964,
0.32019105553627014,
0.2655274569988251,
0.5856561064720154,
0.03610760346055031,
0.14870619773864746,
-0.3414275050163269,
0.25410816073417664,
0.11137587577104568,
0.4252831041812897,
-0.6607488989830017,
0.3696361184120178,
0.504709780216217,
... |
func NewGardenerAPI(trackerBase url.URL, gcs stiface.Client) *GardenerAPI {
c := gardener.NewJobClient(trackerBase)
return &GardenerAPI{trackerBase: trackerBase, gcs: gcs, jobs: c}
} | [
-0.40953385829925537,
-0.7166447639465332,
0.2344377636909485,
0.9853997826576233,
-0.6440233588218689,
0.028628956526517868,
0.36140313744544983,
0.008452908135950565,
-1.6357753276824951,
0.18382084369659424,
-0.7149379849433899,
-0.16765430569648743,
-1.14351224899292,
0.485455274581909... |
func MustStorageClient(ctx context.Context) stiface.Client {
c, err := storage.NewClient(ctx, option.WithScopes(storage.ScopeReadOnly))
rtx.Must(err, "Failed to create storage client")
return stiface.AdaptClient(c)
} | [
-0.7537829279899597,
-0.0004961840459145606,
0.3863413631916046,
0.42518457770347595,
-0.29709622263908386,
0.5200459957122803,
0.11811793595552444,
-1.2287970781326294,
0.9102864861488342,
0.5311640501022339,
-0.17166206240653992,
0.5732680559158325,
-0.4440109431743622,
0.052332174032926... |
func (g *GardenerAPI) RunAll(ctx context.Context, rSrc RunnableSource, jt *tracker.JobWithTarget) (*errgroup.Group, error) {
eg := &errgroup.Group{}
count := 0
job := jt.Job
for {
run, err := rSrc.Next(ctx)
if err != nil {
if err == iterator.Done {
debug.Printf("Dispatched total of %d archives for %s\n",... | [
-0.12021876871585846,
-0.4099036753177643,
0.951152503490448,
-0.2558528482913971,
-0.021941212937235832,
-0.33236372470855713,
0.21293522417545319,
-0.1565900593996048,
-0.764045000076294,
-0.2096865326166153,
-0.34831008315086365,
0.3490521013736725,
0.41782212257385254,
0.46592727303504... |
func (g *GardenerAPI) JobFileSource(ctx context.Context, job tracker.Job,
toRunnable func(*storage.ObjectAttrs) Runnable) (*GCSSource, error) {
filter, err := regexp.Compile(job.Filter)
if err != nil {
failMetric(job, "filter compile")
return nil, err
}
bh, err := gcs.GetBucket(ctx, g.gcs, job.Bucket)
if err... | [
0.449313223361969,
0.3461516499519348,
0.35945141315460205,
-0.2747909426689148,
-0.5055722594261169,
-0.1281064748764038,
0.19974683225154877,
0.4495977461338043,
-0.8521901369094849,
0.4376700222492218,
-0.21655410528182983,
0.1270299106836319,
-0.5013166666030884,
-0.2938953638076782,
... |
func (g *GardenerAPI) NextJob(ctx context.Context) (*tracker.JobWithTarget, error) {
return g.jobs.Next(ctx)
} | [
0.11014623939990997,
0.3097277283668518,
0.28299328684806824,
1.3077194690704346,
0.3915508985519409,
0.5597705245018005,
0.018141284584999084,
-0.8570373058319092,
-0.06992392241954803,
-1.2214738130569458,
1.0350104570388794,
0.3444726765155792,
-0.009510627016425133,
-0.3112239539623260... |
func (g *GardenerAPI) Poll(ctx context.Context,
toRunnable func(o *storage.ObjectAttrs) Runnable, maxWorkers int, period time.Duration) {
// Poll no faster than period.
ticker := time.NewTicker(period)
throttle := NewWSTokenSource(maxWorkers)
for {
select {
case <-ctx.Done():
log.Println("Poller context don... | [
-0.6379727721214294,
0.5965522527694702,
0.4909571409225464,
0.7518289089202881,
0.04429205507040024,
0.16241462528705597,
0.11041612923145294,
-1.0402297973632812,
-0.4116022288799286,
-0.10940563678741455,
0.5113195180892944,
0.15477930009365082,
0.24126672744750977,
0.2997831106185913,
... |
func (g *GardenerAPI) Status(w http.ResponseWriter) {
fmt.Fprintf(w, "Gardener API: %s\n", g.trackerBase.String())
} | [
-0.3336620032787323,
-1.4588816165924072,
0.16348524391651154,
0.04436306282877922,
0.3053295910358429,
0.4848250448703766,
0.38336193561553955,
0.31790030002593994,
-0.9099442958831787,
-0.17836566269397736,
0.09484647214412689,
0.2698862850666046,
0.3321220874786377,
0.7498894333839417,
... |
func Sin(x complex128) complex128 {
switch re, im := real(x), imag(x); {
case im == 0 && (math.IsInf(re, 0) || math.IsNaN(re)):
return complex(math.NaN(), im)
case math.IsInf(im, 0):
switch {
case re == 0:
return x
case math.IsInf(re, 0) || math.IsNaN(re):
return complex(math.NaN(), im)
}
case re ==... | [
-0.5022633671760559,
-0.5987967848777771,
0.4395991563796997,
0.6954360604286194,
-0.7210711240768433,
0.09912899136543274,
-0.014130030758678913,
0.05725426226854324,
0.7142048478126526,
-0.5860502123832703,
-0.09768012166023254,
0.6227563619613647,
-0.23964959383010864,
-0.32146295905113... |
func Sinh(x complex128) complex128 {
switch re, im := real(x), imag(x); {
case re == 0 && (math.IsInf(im, 0) || math.IsNaN(im)):
return complex(re, math.NaN())
case math.IsInf(re, 0):
switch {
case im == 0:
return complex(re, im)
case math.IsInf(im, 0) || math.IsNaN(im):
return complex(re, math.NaN())
... | [
0.26714882254600525,
-0.04559028893709183,
0.45725300908088684,
1.1846730709075928,
-0.7687510848045349,
0.5666542649269104,
-0.07856642454862595,
0.43672803044319153,
0.8258695006370544,
-0.14889408648014069,
-0.4922211170196533,
0.3819674849510193,
0.05510018765926361,
-0.022101758047938... |
func Cos(x complex128) complex128 {
switch re, im := real(x), imag(x); {
case im == 0 && (math.IsInf(re, 0) || math.IsNaN(re)):
return complex(math.NaN(), -im*math.Copysign(0, re))
case math.IsInf(im, 0):
switch {
case re == 0:
return complex(math.Inf(1), -re*math.Copysign(0, im))
case math.IsInf(re, 0) |... | [
-0.06430922448635101,
-0.1345832347869873,
0.28006622195243835,
0.47349315881729126,
-0.71185302734375,
0.02863897942006588,
-0.3069154620170593,
0.511883556842804,
0.40377500653266907,
0.21444566547870636,
0.3818814158439636,
0.3830035924911499,
0.09242560714483261,
0.1534799337387085,
... |
func Cosh(x complex128) complex128 {
switch re, im := real(x), imag(x); {
case re == 0 && (math.IsInf(im, 0) || math.IsNaN(im)):
return complex(math.NaN(), re*math.Copysign(0, im))
case math.IsInf(re, 0):
switch {
case im == 0:
return complex(math.Inf(1), im*math.Copysign(0, re))
case math.IsInf(im, 0) ||... | [
0.569640040397644,
-0.10268416255712509,
0.49365532398223877,
0.4494648277759552,
-1.003745436668396,
0.6208593845367432,
-0.18684276938438416,
0.11381686478853226,
0.5528668761253357,
-0.25328266620635986,
0.46907487511634827,
0.7042222619056702,
0.48128634691238403,
0.06934504956007004,
... |
func sinhcosh(x float64) (sh, ch float64) {
if math.Abs(x) <= 0.5 {
return math.Sinh(x), math.Cosh(x)
}
e := math.Exp(x)
ei := 0.5 / e
e *= 0.5
return e - ei, e + ei
} | [
1.1024272441864014,
-0.03476110100746155,
0.6410589218139648,
0.9418513178825378,
-0.657139003276825,
0.7337343096733093,
-0.1676614135503769,
-0.226701557636261,
0.16123966872692108,
-0.151736319065094,
-0.5153424143791199,
0.14186690747737885,
0.8060006499290466,
0.46791890263557434,
1... |
func (*TimerEventMsg) Descriptor() ([]byte, []int) {
return file_eventTimerCallback_proto_rawDescGZIP(), []int{0}
} | [
0.0798553004860878,
0.04872070625424385,
0.2782549262046814,
0.15617118775844574,
0.34078022837638855,
-0.7253689765930176,
0.6566414833068848,
0.9944313168525696,
-0.7993871569633484,
-0.3426218628883362,
-0.33449551463127136,
-0.6317204236984253,
-0.18420645594596863,
1.2205411195755005,... |
func (*TimerEventResponse) Descriptor() ([]byte, []int) {
return file_eventTimerCallback_proto_rawDescGZIP(), []int{1}
} | [
0.10634509474039078,
-0.6551035642623901,
0.014219158329069614,
0.033071551471948624,
0.3562978506088257,
-1.0552358627319336,
0.8277676701545715,
0.15230821073055267,
-0.17399151623249054,
0.16189703345298767,
-1.0576802492141724,
-0.9260939359664917,
-0.9699035882949829,
-0.0329198129475... |
func Init() {
once.Do(initialize)
} | [
-0.06537310034036636,
0.4146498441696167,
0.0724492222070694,
0.25092613697052,
0.9425287246704102,
-0.0388195775449276,
0.5426446199417114,
0.2041836529970169,
-0.4948291480541229,
-0.5746092796325684,
-0.9671642184257507,
0.6849467158317566,
-0.7541403770446777,
1.0363202095031738,
0.4... |
func Handler(t time.Time) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
err := db.DB().Ping()
if err != nil {
err = errors.Wrap(err, errDbPing.Error())
log.Printf("%+v", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
}
// Construct response body... | [
-0.486185759305954,
-0.13375234603881836,
0.8505920767784119,
-0.21152374148368835,
-0.09087251126766205,
0.23099413514137268,
0.3435496985912323,
0.20625759661197662,
-0.03680255264043808,
0.11958353966474533,
-0.31394386291503906,
-0.15148191154003143,
0.4440612494945526,
0.7325904369354... |
func Path() string {
return c.Path
} | [
0.8897077441215515,
-0.6125332117080688,
0.005574330687522888,
0.2773338258266449,
-0.6654248237609863,
1.023697853088379,
1.2435052394866943,
-0.9866775870323181,
-0.4805156886577606,
-0.13271564245224,
0.05642853304743767,
-0.4613456130027771,
-0.48350685834884644,
0.033458177000284195,
... |
func UidToName(uid uint32) (string, error) {
x, err := user.LookupId(strconv.Itoa(int(uid)))
if err != nil {
return "", err
}
return x.Name, nil
} | [
-0.5090572237968445,
-0.09775897115468979,
0.4799991548061371,
-0.896422803401947,
-1.080278754234314,
0.6299265027046204,
-0.0033113197423517704,
-0.6086357235908508,
1.0659077167510986,
0.4144701361656189,
-0.19459281861782074,
-0.2133886218070984,
0.4964929223060608,
0.0829911157488823,... |
func GidToName(gid uint32) (string, error) {
y, err := user.LookupGroupId(strconv.Itoa(int(gid)))
if err != nil {
return "", err
}
return y.Name, nil
} | [
-0.32438579201698303,
0.4618226885795593,
0.3887826204299927,
-1.0160937309265137,
-1.0954707860946655,
0.5316961407661438,
-0.1522010862827301,
-0.9773422479629517,
-0.06949986517429352,
1.4867666959762573,
-0.06080948933959007,
0.09380733966827393,
-0.2338855266571045,
0.8087471127510071... |
func removeItemFromEquals(slice []Equal, index int) []Equal {
copy(slice[index:], slice[index+1:])
slice[len(slice)-1] = Equal{}
slice = slice[:len(slice)-1]
return slice
} | [
-0.9897153973579407,
-0.32987919449806213,
0.637876570224762,
-0.13956741988658905,
-0.09244082123041153,
0.14081500470638275,
-0.762179434299469,
-0.0019262776477262378,
0.5924387574195862,
1.140116572380066,
-0.638952910900116,
0.5566109418869019,
-0.39636725187301636,
-1.020545363426208... |
func checkAndCleanLessFitItems(blocks *[]Block, curentLine, matchedLine int) bool {
for i, block := range *blocks {
if block.IsEqual() {
for j, equal := range block.(EqualBlock).Equals {
if equal.RightLine >= matchedLine {
if math.Abs(float64(equal.LeftLine-equal.RightLine)) > math.Abs(float64(curentLine... | [
0.2441103160381317,
-0.9214572310447693,
0.9009547233581543,
0.4644373953342438,
-0.3570901155471802,
0.005812699440866709,
-0.2618822157382965,
-0.740928590297699,
-0.5961204767227173,
0.05226007103919983,
-0.906104326248169,
-0.3185964524745941,
-0.7125954031944275,
0.4187021851539612,
... |
func addMatchToBlocks(blocks *[]Block, left, right int, value string) {
if len(*blocks) > 0 && (*blocks)[len(*blocks)-1].IsEqual() {
if len(*blocks) > 0 && (left-(*blocks)[len(*blocks)-1].(EqualBlock).Equals[len((*blocks)[len(*blocks)-1].(EqualBlock).Equals)-1].LeftLine > 1 ||
right-(*blocks)[len(*blocks)-1].(Equ... | [
0.004235710948705673,
-0.33379778265953064,
1.214866280555725,
-0.15959316492080688,
-0.213490828871727,
0.22189000248908997,
0.10003501176834106,
-0.8536132574081421,
-0.12751032412052155,
0.6463631391525269,
-1.1299395561218262,
-0.2977827191352844,
-0.8431199193000793,
0.988168358802795... |
func (db *DB) StoreArticle(article *Article) error {
articleData, err := json.Marshal(article)
if err != nil {
return err
}
err = db.Update(func(txn *badger.Txn) error {
err := txn.Set([]byte(helpers.I64tob(article.ID)), articleData)
return err
})
return err
} | [
-0.863031268119812,
0.17701108753681183,
0.3727254271507263,
-0.57966148853302,
-0.34417402744293213,
0.08892305195331573,
-0.19909514486789703,
-0.12592239677906036,
0.24249690771102905,
0.5715778470039368,
-1.361570954322815,
-0.6507428288459778,
-1.1269075870513916,
0.09185392409563065,... |
func (db *DB) DoesArticleExist(id uint64) bool {
err := db.View(func(txn *badger.Txn) error {
article, err := txn.Get(helpers.I64tob(id))
if err != nil {
return err
}
err = article.Value(func(val []byte) error {
return nil
})
return err
})
return err == nil
} | [
-0.7619354724884033,
0.008390676230192184,
0.6244059801101685,
0.26279088854789734,
0.49012088775634766,
-0.27802276611328125,
-0.5150616765022278,
0.41745617985725403,
-0.3156397342681885,
0.7993696331977844,
-0.37168264389038086,
-0.994709849357605,
-0.30247360467910767,
0.29866600036621... |
func (m Modifiers) CapsLockDown() bool {
return m&CapsLockModifier == CapsLockModifier
} | [
-1.435638666152954,
-0.5884071588516235,
0.44405993819236755,
0.3198615610599518,
-0.513764500617981,
0.5014395713806152,
-0.08627768605947495,
-0.05723237618803978,
0.8770775198936462,
-0.3304840624332428,
-0.2003219574689865,
-0.1677459329366684,
-0.5188747048377991,
0.3067665696144104,
... |
func (m Modifiers) ShiftDown() bool {
return m&ShiftModifier == ShiftModifier
} | [
-0.9011478424072266,
-0.2091730535030365,
0.38910016417503357,
0.18873003125190735,
-0.2528848350048065,
1.2319667339324951,
-0.015482998453080654,
-0.4660772383213043,
0.7656975388526917,
-0.185313418507576,
-0.05607439950108528,
-0.09837193787097931,
-0.993113100528717,
0.776388704776763... |
func (m Modifiers) ControlDown() bool {
return m&ControlModifier == ControlModifier
} | [
-0.2811744213104248,
-0.5919691920280457,
0.2787187695503235,
0.4562893807888031,
0.5017924904823303,
0.7827497124671936,
0.18130923807621002,
-0.438370019197464,
0.799950122833252,
0.16658036410808563,
-0.14024747908115387,
-0.2657543122768402,
-0.8061830401420593,
0.39223578572273254,
... |
func (m Modifiers) OptionDown() bool {
return m&OptionModifier == OptionModifier
} | [
-0.7207749485969543,
-0.5092942714691162,
0.22012244164943695,
0.18422770500183105,
0.2177165448665619,
0.6298509836196899,
0.3459339439868927,
0.12955230474472046,
0.7622427344322205,
0.39989757537841797,
0.041312895715236664,
-0.1308191865682602,
-0.741395890712738,
0.553928792476654,
... |
func (m Modifiers) CommandDown() bool {
return m&CommandModifier == CommandModifier
} | [
-0.5600107908248901,
-0.5641217827796936,
0.3958956301212311,
0.24531464278697968,
0.110355444252491,
0.8280506730079651,
-0.21410806477069855,
-0.12361573427915573,
0.6932653188705444,
-0.15340116620063782,
0.5557309985160828,
0.5182722806930542,
-0.8914318680763245,
1.222907304763794,
... |
func PlatformMenuModifier() Modifiers {
if runtime.GOOS == toolbox.MacOS {
return CommandModifier
}
return ControlModifier
} | [
-0.9027182459831238,
-0.21649470925331116,
0.37150222063064575,
0.2607629895210266,
-0.3822647035121918,
0.63212651014328,
-0.9980018734931946,
0.46432071924209595,
-0.5997109413146973,
-0.6849077343940735,
-0.3101254999637604,
-0.05199545621871948,
-0.37679532170295715,
1.4260224103927612... |
func (m Modifiers) PlatformMenuModifierDown() bool {
mask := PlatformMenuModifier()
return m&mask == mask
} | [
-0.6509268283843994,
-0.09663239121437073,
0.433400958776474,
0.320686936378479,
-0.08114194869995117,
0.6042242050170898,
-0.5574029088020325,
0.3396085798740387,
-0.8707404732704163,
-0.3845495283603668,
-0.1029420867562294,
-0.13612057268619537,
-1.0279455184936523,
1.3286919593811035,
... |
func (m Modifiers) String() string {
if m == 0 {
return ""
}
var buffer bytes.Buffer
if m&ControlModifier == ControlModifier {
buffer.WriteString("Ctrl+")
}
if m&OptionModifier == OptionModifier {
if runtime.GOOS == toolbox.MacOS {
buffer.WriteString("Opt+")
} else {
buffer.WriteString("Alt+")
}
... | [
-0.7757419943809509,
-0.8017699718475342,
0.2762013375759125,
-0.736990213394165,
-0.19699165225028992,
-0.1432139277458191,
0.014219066128134727,
-0.9752600789070129,
-0.12746579945087433,
-0.16094008088111877,
-0.1130015105009079,
0.5718289613723755,
-0.661729097366333,
0.600945770740509... |
func (m Modifiers) SymbolString() string {
if m == 0 {
return ""
}
var buffer bytes.Buffer
if m&ControlModifier == ControlModifier {
buffer.WriteString("\u2303")
}
if m&OptionModifier == OptionModifier {
buffer.WriteString("\u2325")
}
if m&ShiftModifier == ShiftModifier {
buffer.WriteString("\u21e7")
}... | [
-1.3725512027740479,
0.0685349851846695,
0.29350516200065613,
-1.211512804031372,
0.2857615649700165,
-0.047748252749443054,
0.26649951934814453,
-0.4847853481769562,
0.06702982634305954,
0.05599801242351532,
-0.17625468969345093,
0.17226600646972656,
0.19076713919639587,
0.538383245468139... |
func azToRegion(az string) (string, error) {
if len(az) < 1 {
return "", fmt.Errorf("invalid (empty) AZ")
}
region := az[:len(az)-1]
return region, nil
} | [
-0.8138096928596497,
-0.047571562230587006,
0.1904137283563614,
-0.7012462019920349,
-0.2845019996166229,
0.10010547935962677,
0.7101998925209045,
0.03869261220097542,
0.9143067598342896,
0.04666907340288162,
-0.016045335680246353,
1.170304536819458,
-0.48816031217575073,
-0.65326482057571... |
func ReadFromParameterStore(path util.ParameterStorePath) map[string]string {
client := getSSMClient()
p := path.String()
var nextToken *string
values := make(map[string]string)
// loop until pagination done
for {
decr := true
input := ssm.GetParametersByPathInput{
Path: &p,
WithDecryption: ... | [
-0.574573278427124,
-0.6862541437149048,
0.4636200964450836,
-0.3126927316188812,
-1.408654808998108,
-0.29137125611305237,
-0.14287075400352478,
-0.23235979676246643,
-0.559187114238739,
0.33009716868400574,
0.14028334617614746,
-0.014642059803009033,
0.14033424854278564,
0.45524257421493... |
func WriteToParameterStore(parameters map[string]string, path util.ParameterStorePath) {
client := getSSMClient()
// the jobs channel will receive messages from successful parameter store writes
jobs := make(chan string, len(parameters))
for key, value := range parameters {
name := path.String() + key
// we pa... | [
-0.5329238772392273,
-0.1914667934179306,
0.6138848662376404,
-0.19012655317783356,
0.4856850504875183,
0.14733244478702545,
0.33987879753112793,
-0.43780404329299927,
-0.6284095644950867,
0.39150163531303406,
-0.09208641201257706,
0.241446852684021,
-0.7876027822494507,
0.2838230133056640... |
func ReadJSONFile(filepath string) map[string]string {
content, err := ioutil.ReadFile(filepath)
if err != nil {
log.Fatal(err)
}
var output map[string]string
if err := json.Unmarshal(content, &output); err != nil {
switch err := err.(type) {
case *json.SyntaxError:
log.Fatal("error reading " + filepath +... | [
-0.6119555830955505,
-1.0920449495315552,
0.8724462985992432,
-0.539381742477417,
-1.235191822052002,
0.6754542589187622,
0.20077840983867645,
-0.07706638425588608,
-0.5674657225608826,
0.617378294467926,
0.8353599905967712,
-0.14499807357788086,
-0.09746777266263962,
-0.2656068205833435,
... |
func PostOffers(offers db.Offers, users db.Users, restaurants db.Restaurants, sessionManager session.Manager,
imageStorage storage.Images, facebookPost facebook.Post, regions db.Regions) router.HandlerWithParams {
handler := func(w http.ResponseWriter, r *http.Request, user *model.User, restaurant *model.Restaurant) ... | [
-0.6803833246231079,
0.27491509914398193,
0.6871670484542847,
0.371358186006546,
-0.3554765284061432,
-0.5806529521942139,
0.33239254355430603,
0.4256034791469574,
-0.657707691192627,
0.34603452682495117,
0.16360491514205933,
-0.03275112807750702,
-0.7277471423149109,
0.8799954056739807,
... |
func PutOffers(offers db.Offers, users db.Users, restaurants db.Restaurants, sessionManager session.Manager,
imageStorage storage.Images, facebookPost facebook.Post, regions db.Regions) router.HandlerWithParams {
handler := func(w http.ResponseWriter, r *http.Request, user *model.User, restaurant *model.Restaurant, c... | [
-1.0121631622314453,
-0.3024905025959015,
0.6324196457862854,
0.00476463045924902,
-0.5152548551559448,
-0.5613381862640381,
0.43871942162513733,
0.2573119103908539,
-0.516281008720398,
0.8321759700775146,
0.17225416004657745,
0.01149432361125946,
-0.39720413088798523,
0.4347454309463501,
... |
func DeleteOffers(offers db.Offers, users db.Users, sessionManager session.Manager, restaurants db.Restaurants,
facebookPost facebook.Post, regions db.Regions) router.HandlerWithParams {
handler := func(w http.ResponseWriter, r *http.Request, user *model.User, restaurant *model.Restaurant, currentOffer *model.Offer) ... | [
-0.1703275591135025,
-0.12290425598621368,
0.40260711312294006,
0.4722905457019806,
-0.2946644425392151,
-0.5707718133926392,
0.19827985763549805,
0.4782900810241699,
-0.48815155029296875,
0.36715877056121826,
0.8030322790145874,
0.03907182812690735,
-0.9147583842277527,
1.0160579681396484... |
func deleteM1NameFromM2(name string, nameSlice []string) []string {
for i, m1Name := range nameSlice {
if m1Name == name {
nameSlice = append(nameSlice[:i], nameSlice[i+1:]...)
break
}
}
return nameSlice
} | [
-0.4139328598976135,
-1.2827531099319458,
0.6041456460952759,
0.573255717754364,
-1.5474460124969482,
0.39498698711395264,
-0.5360708236694336,
-0.23461398482322693,
-0.16680026054382324,
1.5326955318450928,
-0.313699871301651,
0.9784051775932312,
-0.9173130393028259,
0.6823506951332092,
... |
func commit(words []string, m1 *M1, m2 *M2, trans *Stack) error {
if len(words) != 1 {
return errors.New("Invalid COMMIT command. Format: COMMIT")
}
var tnew Stack
(*trans) = tnew
trans.Push(*m1, *m2)
return nil
} | [
0.14234694838523865,
0.2815893590450287,
0.3917936086654663,
0.43097785115242004,
0.032496072351932526,
0.6646150350570679,
0.09272898733615875,
-0.4249870777130127,
-1.4877893924713135,
2.122516632080078,
0.3441302180290222,
0.0781247541308403,
-0.9459900259971619,
0.6829405426979065,
-... |
func GetSchema(eventID string) (schema *Schema, err error) {
schema = &Schema{}
err = stmtSchemaByEventID.QueryRow(eventID).Scan(&schema.EventID, &schema.Alias, &schema.Desc)
if err != nil {
log.Println("coudn't get schema")
return
}
rows, err := stmtParamsByEventID.Query(eventID)
if err != nil {
log.Print... | [
-0.04820158705115318,
-0.20850366353988647,
0.9273757934570312,
0.6616998314857483,
0.16740022599697113,
-0.8557891249656677,
-0.4336530268192291,
0.8197427988052368,
0.06581137329339981,
0.8639625906944275,
0.6401748061180115,
0.5634596943855286,
0.252583384513855,
0.8379120230674744,
0... |
func Mount(mux *http.ServeMux) {
middleware := http.NewServeMux()
mux.Handle("/", checkPathCorrect(middleware))
middleware.Handle("/", http.FileServer(http.Dir("./static")))
middleware.HandleFunc("/movies", list)
middleware.Handle("/movie/", http.StripPrefix("/movie", http.HandlerFunc(get)))
middleware.HandleFunc... | [
-0.7775195240974426,
0.19036050140857697,
0.6410223245620728,
0.8773826360702515,
-0.25622862577438354,
0.29131123423576355,
-0.6870808601379395,
0.07980944961309433,
-0.3772904574871063,
0.07349439710378647,
-0.10365445911884308,
0.9219886660575867,
-0.2083403468132019,
0.9130665063858032... |
func NewEntity(surface *sdl.Surface) *Entity {
e := &Entity{
Surface: surface,
Children: make([]*Entity, 0, initialChildrenCap),
Visible: true,
MoveAABB: aabb.AABB{},
}
if surface != nil {
e.W = surface.W
e.H = surface.H
}
return e
} | [
0.4670816957950592,
-0.4129512310028076,
0.35448798537254333,
1.0632336139678955,
-0.4325059950351715,
0.6180397272109985,
1.9287443161010742,
-0.3384116590023041,
0.943003237247467,
-0.0009588129469193518,
-0.10400589555501938,
-0.4784603416919708,
0.5433585047721863,
1.3043626546859741,
... |
func (e *Entity) AddChild(childs ...*Entity) { // Tribute to Childs from The Thing
for _, c := range childs {
// TODO: Growth code could be optimized out of this loop
currentCap := cap(e.Children)
if len(e.Children) == currentCap {
newChildren := make([]*Entity, currentCap, currentCap*2)
copy(newChildren, ... | [
-0.8629348278045654,
-0.14173531532287598,
0.7635655999183655,
0.48467952013015747,
0.44791415333747864,
0.6944438219070435,
0.09588147699832916,
0.09464997798204422,
-0.11537682265043259,
-0.11210523545742035,
0.1856735497713089,
-0.47751376032829285,
0.47638577222824097,
0.46782761812210... |
func (e *Entity) GetChild(index int) *Entity {
return e.Children[index]
} | [
0.2579236626625061,
0.6655616760253906,
0.49922508001327515,
-0.2497774362564087,
0.4168739318847656,
0.7556676864624023,
0.14271791279315948,
-1.0523097515106201,
-0.2644251585006714,
-0.8054779767990112,
-0.2399180829524994,
0.3582497239112854,
0.5423391461372375,
-1.0737026929855347,
... |
func (e *Entity) MoveTo(x, y int32) {
mab := &e.MoveAABB
mab.X0 = e.X
mab.Y0 = e.Y
mab.X1 = e.X + e.W
mab.Y1 = e.Y + e.H
mab.Expand(x, y)
mab.Expand(x+e.W, y+e.H)
e.X = x
e.Y = y
} | [
-0.6572537422180176,
-0.15425819158554077,
0.8285123705863953,
-1.2648600339889526,
0.8260588645935059,
0.18178348243236542,
0.11439275741577148,
-0.23205441236495972,
-0.046092886477708817,
0.3588731288909912,
-0.28660714626312256,
0.4783102571964264,
0.8894873261451721,
-0.61001104116439... |
func (e *Entity) Render(dest *sdl.Surface) {
t := EntityTransform{0, 0, dest.W, dest.H}
e.renderRecursive(dest, t)
} | [
-0.5939957499504089,
0.5179808735847473,
0.2738109827041626,
-0.5341349840164185,
-0.339472234249115,
0.7362410426139832,
0.03272272273898125,
0.1885182112455368,
-0.01782970130443573,
-0.12406497448682785,
-0.1418790966272354,
-0.687455415725708,
0.7576525807380676,
1.161864995956421,
-... |
func loadJSONRecursive(am *assetmanager.AssetManager, node map[string]interface{}, filename string, entityByID map[string]*Entity) *Entity {
var id string
var idOK, ok bool
var childEntity *Entity
entity := NewEntity(nil)
// Do this first to help with error messaging
id, idOK = node["Id"].(string)
if idOK {
... | [
0.1269720047712326,
-0.37291955947875977,
0.8359276056289673,
-0.6802013516426086,
-1.2128490209579468,
-0.9691674709320068,
-0.257577508687973,
-0.577235996723175,
-0.44998785853385925,
0.48859331011772156,
-0.16681908071041107,
0.16250236332416534,
0.1489863395690918,
-0.203896626830101,... |
func LoadJSON(am *assetmanager.AssetManager, jsonFile string, entityByID map[string]*Entity) (*Entity, error) {
jsonStr, err := ioutil.ReadFile(assetmanager.AssetPath(jsonFile))
var jsonRoot map[string]interface{} // outer JSON is an object
err = json.Unmarshal(jsonStr, &jsonRoot)
if err != nil {
return nil, er... | [
0.010882182978093624,
-0.833790123462677,
0.7667207717895508,
-0.3584665358066559,
-1.2914139032363892,
-0.20536276698112488,
0.5598949790000916,
-0.7027137875556946,
-0.015932613983750343,
0.3767203390598297,
0.0900014191865921,
0.6435117125511169,
-0.3234670162200928,
0.694980800151825,
... |
func (e *Entity) SearchByID(id string) *Entity {
if e.ID == id {
return e
}
for _, child := range e.Children {
found := child.SearchByID(id)
if found != nil {
return found
}
}
return nil
} | [
0.41236600279808044,
-0.05422068014740944,
0.49014052748680115,
-0.15815086662769318,
-0.02419530414044857,
-0.18759462237358093,
0.21216119825839996,
-0.6472442150115967,
-0.08823173493146896,
0.14290884137153625,
-0.3408072590827942,
-0.36429810523986816,
-0.6592192053794861,
1.099328637... |
func CenterEntityInParent(entity, parent *Entity) {
entity.X = (parent.W - entity.W) / 2
} | [
0.636285662651062,
-1.0576251745224,
0.3663943409919739,
-0.7846319079399109,
-0.30182361602783203,
0.7673982977867126,
0.17045742273330688,
0.047920744866132736,
-0.2965846657752991,
0.6627637147903442,
0.8620345592498779,
-0.3830605149269104,
0.17119278013706207,
0.710884690284729,
-0.... |
func CenterEntityInSurface(entity *Entity, surface *sdl.Surface) {
entity.X = (surface.W - entity.W) / 2
} | [
0.3329167068004608,
-0.8428788781166077,
0.2619856297969818,
-0.20015211403369904,
-0.2709830403327942,
1.0846980810165405,
0.6523658037185669,
-0.050065286457538605,
0.11094297468662262,
0.7629217505455017,
0.6363893747329712,
-0.5128218531608582,
0.06663256883621216,
1.3570539951324463,
... |
func CenterEntity(entity *Entity, width int32) {
entity.X = (width - entity.W) / 2
} | [
-0.059342384338378906,
-1.1112923622131348,
0.4318214952945709,
-0.7577025890350342,
0.06495203822851181,
0.6915322542190552,
-0.02951313741505146,
0.11174773424863815,
0.8485636115074158,
0.6899643540382385,
0.6350631713867188,
-0.6609992384910583,
0.19179505109786987,
0.8534156084060669,... |
func RightJustifyEntityInParent(entity, parent *Entity) {
entity.X = parent.W - entity.W
} | [
1.4130891561508179,
-0.5084942579269409,
0.3734808564186096,
-0.8512340188026428,
-0.3867894411087036,
0.6469427347183228,
-0.14939254522323608,
-0.4726000130176544,
-1.043258547782898,
0.12349788844585419,
0.7625889182090759,
-0.48682183027267456,
-0.16831383109092712,
0.9401797652244568,... |
func RightJustifyEntityInSurface(entity *Entity, surface *sdl.Surface) {
entity.X = surface.W - entity.W
} | [
0.9596483707427979,
-0.39936164021492004,
0.2942439913749695,
-0.19910793006420135,
-0.3245736360549927,
1.0357873439788818,
0.5834645628929138,
-0.6959660053253174,
-0.5533343553543091,
0.2657736837863922,
0.504339873790741,
-0.6075941920280457,
-0.169436514377594,
1.4497777223587036,
-... |
func RightJustifyEntity(entity *Entity, width int32) {
entity.X = width - entity.W
} | [
0.9657821655273438,
-0.4112166464328766,
0.3816700279712677,
-0.8549137711524963,
-0.27245837450027466,
0.28751108050346375,
-0.5831344723701477,
-0.6800242066383362,
-0.15347908437252045,
0.1614932268857956,
0.281671941280365,
-0.7551555037498474,
-0.1822977215051651,
0.9570188522338867,
... |
func (b *Box) Volume() float64 {
//Notice type conversion to float64 here
//Go does not have implicit type conversions!
return float64(b.Width*b.Height*b.Depth) / math.Pow(1000, 3)
} | [
0.13868209719657898,
0.6269705295562744,
0.4365709125995636,
0.45257601141929626,
0.07354845851659775,
-0.47988948225975037,
0.03737355023622513,
-0.5172234177589417,
-0.3029066324234009,
-0.12373266369104385,
0.0022648407611995935,
0.0358482263982296,
-1.065644383430481,
0.392810851335525... |
func (extension *StorageAccountsManagementPolicyExtension) GetExtendedResources() []genruntime.KubernetesResource {
return []genruntime.KubernetesResource{
&v20210401.StorageAccountsManagementPolicy{},
&v20210401s.StorageAccountsManagementPolicy{},
&v20220901.StorageAccountsManagementPolicy{},
&v20220901s.Stor... | [
0.5727097988128662,
-0.5114892721176147,
0.6876901984214783,
0.14447550475597382,
-0.6688647866249084,
0.257986456155777,
-0.3155239224433899,
0.16157832741737366,
1.5670466423034668,
0.045468542724847794,
0.3122524619102478,
0.6702425479888916,
-0.40791526436805725,
0.9775056838989258,
... |
func connectZk(t *testing.T, idx int) *zk.Conn {
conn, _, err := zk.Connect([]string{zookeeperAddrs[idx]}, zkTimeout)
if err != nil {
t.Fatalf("zk connect err=%q", err)
}
conn.SetLogger(discardLogger{})
return conn
} | [
-0.32274124026298523,
-0.804961621761322,
0.34124407172203064,
0.7116392850875854,
-0.6735607385635376,
-0.22595296800136566,
0.8272351026535034,
-0.09598735719919205,
0.33884185552597046,
-0.03189525008201599,
0.6691678762435913,
-0.29411208629608154,
-0.11127380281686783,
0.1108630299568... |
func connectAllZk(t *testing.T) *zk.Conn {
conn, _, err := zk.Connect(zookeeperAddrs, zkTimeout)
if err != nil {
t.Fatalf("zk connect err=%q", err)
}
conn.SetLogger(discardLogger{})
return conn
} | [
0.10236793011426926,
-1.317784070968628,
0.4851815402507782,
1.3664324283599854,
-0.7312878966331482,
-0.14724579453468323,
0.3090461492538452,
0.5975154638290405,
0.2954033315181732,
-0.039268095046281815,
0.38144591450691223,
-0.5031744837760925,
0.1588747501373291,
1.2307217121124268,
... |
func cleanup(t *testing.T) {
conn := connectAllZk(t)
err := recursiveDelete(conn, zkPrefix)
if err != nil {
t.Fatalf("cleanup err=%q", err)
}
conn.Close()
} | [
0.7112491130828857,
-0.22535103559494019,
0.3961557447910309,
0.4613916575908661,
-0.041438717395067215,
-0.5119727253913879,
1.2201762199401855,
0.08605633676052094,
0.37517207860946655,
-0.3124610483646393,
0.2769109308719635,
-0.20718856155872345,
-0.5486071705818176,
0.6160104274749756... |
func quietClose(conn *zk.Conn) {
if conn.State() != zk.StateDisconnected {
conn.Close()
}
} | [
0.7878677248954773,
-0.31151342391967773,
0.4712889790534973,
0.5594563484191895,
-0.5835291743278503,
-0.6144905090332031,
-0.6020601391792297,
-0.9664417505264282,
0.5031518340110779,
-0.4843868315219879,
0.4686470031738281,
-0.1676057130098343,
-0.5936490297317505,
0.49064573645591736,
... |
func (_m *RepositoryVacancy) AddFavorite(_a0 models.FavoritesForCand) (*models.FavoriteID, error) {
ret := _m.Called(_a0)
var r0 *models.FavoriteID
if rf, ok := ret.Get(0).(func(models.FavoritesForCand) *models.FavoriteID); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*models.FavoriteI... | [
-0.06886317580938339,
0.18452392518520355,
0.6276527643203735,
0.2701069116592407,
-0.09637632220983505,
-0.3333461880683899,
0.19249539077281952,
0.7900972366333008,
-0.166320338845253,
0.3244529664516449,
-0.061966028064489365,
0.14086642861366272,
0.23106467723846436,
0.6087380051612854... |
func (_m *RepositoryVacancy) AddRecommendation(_a0 uuid.UUID, _a1 int) error {
ret := _m.Called(_a0, _a1)
var r0 error
if rf, ok := ret.Get(0).(func(uuid.UUID, int) error); ok {
r0 = rf(_a0, _a1)
} else {
r0 = ret.Error(0)
}
return r0
} | [
-0.7954005002975464,
0.17979928851127625,
0.49824512004852295,
-0.9933030605316162,
0.08913642913103104,
-0.01917417161166668,
0.5067091584205627,
0.9091278314590454,
-0.38812896609306335,
1.0421206951141357,
0.4642079174518585,
-0.14271074533462524,
0.08309071511030197,
0.2515466809272766... |
func (_m *RepositoryVacancy) CreateVacancy(_a0 models.Vacancy) (*models.Vacancy, error) {
ret := _m.Called(_a0)
var r0 *models.Vacancy
if rf, ok := ret.Get(0).(func(models.Vacancy) *models.Vacancy); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*models.Vacancy)
}
}
var r1 error
if... | [
-0.3248726725578308,
-0.22628702223300934,
0.2915094792842865,
-0.47156819701194763,
-0.2734251320362091,
-0.156366229057312,
1.2403976917266846,
0.5848826169967651,
0.39670196175575256,
0.7783640623092651,
0.0027818952221423388,
-0.5881562232971191,
0.5487523674964905,
0.8070975542068481,... |
func (_m *RepositoryVacancy) DeleteVacancy(id uuid.UUID, empId uuid.UUID) error {
ret := _m.Called(id, empId)
var r0 error
if rf, ok := ret.Get(0).(func(uuid.UUID, uuid.UUID) error); ok {
r0 = rf(id, empId)
} else {
r0 = ret.Error(0)
}
return r0
} | [
-0.9427595138549805,
-0.7989805936813354,
0.6512888669967651,
0.37772923707962036,
-0.35035544633865356,
-0.08850762993097305,
0.940488338470459,
-0.13415664434432983,
0.630448579788208,
0.2173367738723755,
-0.2784586250782013,
-0.5098048448562622,
0.41570666432380676,
0.14965298771858215,... |
func (_m *RepositoryVacancy) GetAllCandFavoriteVacancy(candId uuid.UUID) ([]models.Vacancy, error) {
ret := _m.Called(candId)
var r0 []models.Vacancy
if rf, ok := ret.Get(0).(func(uuid.UUID) []models.Vacancy); ok {
r0 = rf(candId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]models.Vacancy)
}
}
v... | [
-0.09277157485485077,
-0.5453082323074341,
0.7116453647613525,
1.3517814874649048,
-1.1677405834197998,
0.5515426993370056,
0.31041228771209717,
0.4465898871421814,
-0.21865159273147583,
0.08677046000957489,
0.0018633697181940079,
1.0623472929000854,
0.38652756810188293,
1.1145631074905396... |
func (_m *RepositoryVacancy) GetFavoriteByVacancy(candId uuid.UUID, vacId uuid.UUID) (*models.FavoriteID, error) {
ret := _m.Called(candId, vacId)
var r0 *models.FavoriteID
if rf, ok := ret.Get(0).(func(uuid.UUID, uuid.UUID) *models.FavoriteID); ok {
r0 = rf(candId, vacId)
} else {
if ret.Get(0) != nil {
r0... | [
0.6475355625152588,
-0.7778124809265137,
0.5599501132965088,
1.0343652963638306,
-0.19223974645137787,
0.09228149056434631,
-0.04963302984833717,
-0.019940579310059547,
-0.24074584245681763,
0.16617867350578308,
-0.25956231355667114,
0.9078483581542969,
0.6896623969078064,
0.15923194587230... |
func (_m *RepositoryVacancy) GetPreferredSalary(_a0 uuid.UUID) (*float64, error) {
ret := _m.Called(_a0)
var r0 *float64
if rf, ok := ret.Get(0).(func(uuid.UUID) *float64); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*float64)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(uuid.... | [
-0.5958905220031738,
0.7385400533676147,
0.27998507022857666,
-0.34641319513320923,
-0.008205754682421684,
-0.9584508538246155,
0.3874482214450836,
0.5152284502983093,
0.0463988371193409,
0.10327760875225067,
-0.02978609688580036,
0.22996558248996735,
0.1041790246963501,
1.509835124015808,... |
func (_m *RepositoryVacancy) GetPreferredSpheres(userID uuid.UUID) ([]modelsvacancy.Pair, error) {
ret := _m.Called(userID)
var r0 []modelsvacancy.Pair
if rf, ok := ret.Get(0).(func(uuid.UUID) []modelsvacancy.Pair); ok {
r0 = rf(userID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]modelsvacancy.Pair)
... | [
-1.583213210105896,
0.7498378753662109,
0.41024288535118103,
0.3104862868785858,
-0.6763938665390015,
-0.19101272523403168,
1.1904305219650269,
0.2761411964893341,
1.0132759809494019,
0.361615926027298,
-0.8745015263557434,
0.1546468585729599,
-0.8075289726257324,
1.3386436700820923,
0.2... |
func (_m *RepositoryVacancy) GetRecommendation(start int, limit int, salary float64, spheres []int) ([]models.Vacancy, error) {
ret := _m.Called(start, limit, salary, spheres)
var r0 []models.Vacancy
if rf, ok := ret.Get(0).(func(int, int, float64, []int) []models.Vacancy); ok {
r0 = rf(start, limit, salary, sphe... | [
-0.7148818969726562,
-0.21491992473602295,
0.8816407918930054,
0.07638836652040482,
-0.2829803228378296,
-0.1819772571325302,
1.3957579135894775,
0.41926828026771545,
0.15480302274227142,
0.4557362198829651,
-0.5388928055763245,
0.9065500497817993,
-0.24061210453510284,
-0.2907238304615021... |
func (_m *RepositoryVacancy) GetVacancyById(_a0 uuid.UUID) (*models.Vacancy, error) {
ret := _m.Called(_a0)
var r0 *models.Vacancy
if rf, ok := ret.Get(0).(func(uuid.UUID) *models.Vacancy); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*models.Vacancy)
}
}
var r1 error
if rf, ok :... | [
-0.23501598834991455,
-0.1324256956577301,
0.19141948223114014,
-0.05707206949591637,
-0.3293752670288086,
-0.5492836236953735,
1.1560571193695068,
0.17164582014083862,
0.4187435507774353,
0.8304980993270874,
-0.13652022182941437,
-0.45552852749824524,
0.5180295705795288,
0.732124984264373... |
func (_m *RepositoryVacancy) GetVacancyList(_a0 uint, _a1 uint, _a2 uuid.UUID, _a3 int) ([]models.Vacancy, error) {
ret := _m.Called(_a0, _a1, _a2, _a3)
var r0 []models.Vacancy
if rf, ok := ret.Get(0).(func(uint, uint, uuid.UUID, int) []models.Vacancy); ok {
r0 = rf(_a0, _a1, _a2, _a3)
} else {
if ret.Get(0) !... | [
-0.4982905387878418,
0.10965146124362946,
0.6727235317230225,
-0.19194649159908295,
0.15706783533096313,
0.07499448210000992,
0.7239462733268738,
0.9928663969039917,
0.17824457585811615,
1.0539906024932861,
-0.33576568961143494,
-0.8756551146507263,
0.6459395289421082,
0.13831005990505219,... |
func (_m *RepositoryVacancy) GetVacancyTopSpheres(_a0 int32) ([]models.Sphere, *models.VacTopCnt, error) {
ret := _m.Called(_a0)
var r0 []models.Sphere
if rf, ok := ret.Get(0).(func(int32) []models.Sphere); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]models.Sphere)
}
}
var r1 *... | [
-0.8455267548561096,
-0.04314185678958893,
0.825256884098053,
-0.8503633141517639,
-0.28261175751686096,
-0.03771810978651047,
1.4585092067718506,
0.3417256474494934,
0.5366722941398621,
0.7286591529846191,
0.16603903472423553,
-0.3586280941963196,
0.43269529938697815,
-0.1032225638628006,... |
func (_m *RepositoryVacancy) RemoveFavorite(_a0 models.FavoritesForCand) error {
ret := _m.Called(_a0)
var r0 error
if rf, ok := ret.Get(0).(func(models.FavoritesForCand) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
return r0
} | [
0.17418070137500763,
0.005552718415856361,
0.5758528709411621,
0.10051538050174713,
-0.7203139662742615,
-0.5834277868270874,
0.5912143588066101,
1.245349407196045,
-0.15448442101478577,
0.6641325354576111,
-0.3459031581878662,
-0.4682296812534332,
-0.07825678586959839,
0.1289364993572235,... |
func (_m *RepositoryVacancy) SearchVacancies(_a0 models.VacancySearchParams) ([]models.Vacancy, error) {
ret := _m.Called(_a0)
var r0 []models.Vacancy
if rf, ok := ret.Get(0).(func(models.VacancySearchParams) []models.Vacancy); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]models.Vaca... | [
-0.9191481471061707,
0.06306550651788712,
0.4115980565547943,
-0.3636325001716614,
-0.10259702056646347,
-0.03706076368689537,
1.0847285985946655,
0.35159316658973694,
0.24028167128562927,
0.07048822194337845,
0.2879817485809326,
-0.3462565839290619,
0.3715244233608246,
1.1121350526809692,... |
func (_m *RepositoryVacancy) UpdateVacancy(_a0 models.Vacancy) (*models.Vacancy, error) {
ret := _m.Called(_a0)
var r0 *models.Vacancy
if rf, ok := ret.Get(0).(func(models.Vacancy) *models.Vacancy); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*models.Vacancy)
}
}
var r1 error
if... | [
-0.9101336598396301,
-0.6498941779136658,
0.38891512155532837,
-0.470761775970459,
-0.7570553421974182,
-0.30165600776672363,
1.2718358039855957,
0.5824587345123291,
0.28352710604667664,
1.2887934446334839,
0.027971521019935608,
-0.19748477637767792,
0.8163495063781738,
0.3762335479259491,... |
func (o *ListPrivacyLedgerEventsBySubjectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewListPrivacyLedgerEventsBySubjectOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return... | [
0.5204024314880371,
-0.8560016751289368,
0.6904505491256714,
0.04758001118898392,
-0.3834652602672577,
-1.1005043983459473,
-0.29940202832221985,
-0.22584490478038788,
0.901788592338562,
0.5297624468803406,
0.3154098689556122,
0.06111124902963638,
-1.0797245502471924,
0.17078398168087006,
... |
func NewListPrivacyLedgerEventsBySubjectOK() *ListPrivacyLedgerEventsBySubjectOK {
return &ListPrivacyLedgerEventsBySubjectOK{}
} | [
1.00240159034729,
-0.2558188736438751,
0.2542560398578644,
-0.22750212252140045,
-0.3846515715122223,
-0.16270869970321655,
-0.3156074583530426,
0.21321772038936615,
0.6792798638343811,
0.30013522505760193,
-0.07232478260993958,
0.21186619997024536,
0.5287129282951355,
0.560562252998352,
... |
func NewListPrivacyLedgerEventsBySubjectUnauthorized() *ListPrivacyLedgerEventsBySubjectUnauthorized {
return &ListPrivacyLedgerEventsBySubjectUnauthorized{}
} | [
0.5073731541633606,
-0.18002325296401978,
0.4536805748939514,
0.21262210607528687,
-0.8037947416305542,
-0.5840353965759277,
-0.6349818706512451,
0.7816047072410583,
0.7793354392051697,
-0.8310428857803345,
0.013177814893424511,
1.4059041738510132,
0.09363801032304764,
-0.15284428000450134... |
func NewListPrivacyLedgerEventsBySubjectForbidden() *ListPrivacyLedgerEventsBySubjectForbidden {
return &ListPrivacyLedgerEventsBySubjectForbidden{}
} | [
0.8469600677490234,
0.2760854959487915,
0.5243659615516663,
0.3401181697845459,
-0.8089727759361267,
0.08607625961303711,
-0.3833949565887451,
-0.5282094478607178,
0.2562010884284973,
-0.282981812953949,
0.227848619222641,
0.9610421657562256,
-0.11357519775629044,
-0.15676657855510712,
0... |
func NewListPrivacyLedgerEventsBySubjectNotFound() *ListPrivacyLedgerEventsBySubjectNotFound {
return &ListPrivacyLedgerEventsBySubjectNotFound{}
} | [
0.7895142436027527,
-0.9334638714790344,
0.15779775381088257,
-0.20494867861270905,
0.3263174295425415,
-0.020870957523584366,
-0.5055956244468689,
0.10708405822515488,
0.38612258434295654,
-0.324308842420578,
0.14030949771404266,
0.7073636054992676,
0.04817501828074455,
0.3595240414142608... |
func NewMockFinder(result [][]byte) *MockFinder {
return &MockFinder{
fnd: NewCachedIndex(bytes.Join(result, []byte{'\n'})),
}
} | [
-0.5541831851005554,
-0.4465930163860321,
0.12757562100887299,
0.010757900774478912,
-0.7587288022041321,
-0.3839988112449646,
0.2107035219669342,
-0.9288401007652283,
0.15047042071819305,
-0.3291543424129486,
-0.25441816449165344,
-0.20427098870277405,
-0.17118513584136963,
0.911967813968... |
func NewMockTagged(result [][]byte) *MockFinder {
return &MockFinder{
fnd: NewCachedTags(bytes.Join(result, []byte{'\n'})),
}
} | [
-0.07280826568603516,
-0.21458426117897034,
0.3557845950126648,
0.5958844423294067,
0.07561028748750687,
-0.3732174336910248,
0.10780910402536392,
-1.0614045858383179,
0.21242095530033112,
0.5267153978347778,
-0.8006872534751892,
0.09144127368927002,
-0.26973265409469604,
1.145584821701049... |
func (m *MockFinder) Execute(ctx context.Context, config *config.Config, query string, from int64, until int64, stat *FinderStat) (err error) {
m.query = query
return
} | [
-1.231651782989502,
-0.5566783547401428,
0.38326671719551086,
0.2789041996002197,
0.7809650897979736,
0.9439476132392883,
0.10526160150766373,
-0.08139418065547943,
0.1053260937333107,
0.25511434674263,
-0.2116343379020691,
-0.510931670665741,
-0.49495840072631836,
-0.25611937046051025,
... |
func (m *MockFinder) List() [][]byte {
return m.fnd.List()
} | [
-0.8348965048789978,
-0.1877836287021637,
0.25817835330963135,
-0.07806602865457535,
1.2683197259902954,
-0.57188481092453,
0.5284071564674377,
0.0939335748553276,
0.1769399344921112,
-0.6483302116394043,
-0.7325589060783386,
0.12999384105205536,
-0.055248767137527466,
0.9979953169822693,
... |
func (m *MockFinder) Series() [][]byte {
return m.fnd.Series()
} | [
-1.1125462055206299,
0.3778712749481201,
0.062382377684116364,
-0.27373138070106506,
0.9119356870651245,
0.1672823131084442,
0.8503462076187134,
-0.9551748633384705,
0.5246696472167969,
-0.8984212875366211,
-0.04034318029880524,
0.9070475697517395,
-0.05616800859570503,
0.3401985168457031,... |
func (m *MockFinder) Abs(v []byte) []byte {
return m.fnd.Abs(v)
} | [
-1.674570083618164,
-0.4524447023868561,
0.4201117157936096,
-0.2568061947822571,
0.12928728759288788,
0.45123782753944397,
-0.34766966104507446,
-0.244409441947937,
-0.2828906774520874,
-0.012315460480749607,
0.3615143895149231,
0.7236462831497192,
0.5014582276344299,
1.0004665851593018,
... |
func (m *MockFinder) Strings() []string {
body, _ := m.fnd.Bytes()
return strings.Split(string(body), "\n")
} | [
-0.8698748350143433,
-0.4086417257785797,
0.09789296239614487,
-0.7886939644813538,
0.6394704580307007,
0.19921262562274933,
0.050513993948698044,
-0.49328359961509705,
0.00877881608903408,
-0.0010368553921580315,
-0.005079407710582018,
0.6867765188217163,
-1.0555927753448486,
0.7383508086... |
func Debug(format string, args ...interface{}) {
if logger == nil {
return
}
logger.Printf(format+"\n", args...)
} | [
0.822075366973877,
-0.24228499829769135,
0.6163674592971802,
-0.17018695175647736,
0.9837257862091064,
-0.11480360478162766,
-0.7732043266296387,
0.7791011929512024,
0.09891368448734283,
-0.9762888550758362,
0.7647753357887268,
0.6438460946083069,
0.10752126574516296,
1.3852965831756592,
... |
func DebugTime(format string, args ...interface{}) {
if logger == nil {
return
}
if trackingStart {
trackingStart = false
args = append(args, time.Since(trackingT0))
Debug(format+": elapsed %s", args...)
} else {
trackingStart = true
trackingT0 = time.Now()
Debug(format, args...)
}
} | [
0.29378148913383484,
0.6490801572799683,
1.0546866655349731,
-0.13244546949863434,
0.7991880774497986,
0.4065105617046356,
-0.7022320628166199,
0.23965710401535034,
-0.4971797466278076,
0.283873051404953,
-0.21808283030986786,
-0.4653760492801666,
-0.05651497095823288,
1.8603764772415161,
... |
func PrettyPint(v interface{}) (err error) {
b, err := json.MarshalIndent(v, "", " ")
if err == nil {
fmt.Println(string(b))
}
return
} | [
-0.20982393622398376,
-0.3636367619037628,
0.9865259528160095,
-1.1124699115753174,
-0.6887229084968567,
0.6768060326576233,
-0.3632965385913849,
-0.39345479011535645,
0.3820646107196808,
0.777592658996582,
-0.2484791874885559,
1.1878701448440552,
-0.5460684895515442,
0.05529816448688507,
... |
func DoRequestOrion(url string, method string, body []byte, header http.Header) (int, error) {
// Create a new http client
client := http.Client{}
req, err := http.NewRequest(method, url, bytes.NewBuffer(body))
if err != nil {
return 0, err
}
// Add the proper headers to the request
req.Header.Add("Fiware-Ser... | [
-0.9776332378387451,
0.12516069412231445,
1.3408887386322021,
0.3890154957771301,
0.021958235651254654,
-0.7301461100578308,
-0.5540581345558167,
0.3846909701824188,
-0.601340651512146,
-0.09720300883054733,
0.2999778985977173,
0.6293300986289978,
-0.691278874874115,
0.266309916973114,
0... |
func PostData(header http.Header, bodyOrion map[string]interface{}) error {
// Marshal the mapping to JSON
jsonBody, err := json.Marshal(bodyOrion)
if err != nil {
return errors.New("Could not parse the request to JSON")
}
fmt.Printf("\n\n %s \n\n", jsonBody)
// Do the request to
var statusCode int
statusCo... | [
-0.3344171941280365,
-0.45373669266700745,
1.1275572776794434,
-0.2745213210582733,
0.22184930741786957,
0.8326599597930908,
-0.2527559995651245,
0.35084789991378784,
-0.43702778220176697,
-0.15479403734207153,
0.14641404151916504,
0.8789185285568237,
-0.3957197964191437,
0.799675285816192... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.