text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func NewGetServiceInstanceByNameDefault(code int) *GetServiceInstanceByNameDefault {
if code <= 0 {
code = 500
}
return &GetServiceInstanceByNameDefault{
_statusCode: code,
}
} | [
-1.0194166898727417,
-0.052240438759326935,
-0.12579552829265594,
0.1970638930797577,
-0.2473345845937729,
0.22945952415466309,
-0.24111194908618927,
-0.23863796889781952,
0.05504164844751358,
0.18977150321006775,
-0.9287224411964417,
-0.14194054901599884,
-1.8829976320266724,
0.3698737621... |
func (o *GetServiceInstanceByNameDefault) WithStatusCode(code int) *GetServiceInstanceByNameDefault {
o._statusCode = code
return o
} | [
-0.623539924621582,
-0.4574068486690521,
0.02943045273423195,
0.02832629345357418,
-0.8026854991912842,
-0.16840516030788422,
-0.5403537750244141,
0.42478036880493164,
0.16807451844215393,
0.5937890410423279,
-1.201298475265503,
-0.5714336633682251,
-0.5477243661880493,
0.3484124541282654,... |
func (o *GetServiceInstanceByNameDefault) SetStatusCode(code int) {
o._statusCode = code
} | [
-0.487226277589798,
0.024062907323241234,
0.10341504961252213,
0.008693071082234383,
-0.5786386132240295,
0.41003432869911194,
-0.018408821895718575,
0.8384569883346558,
-0.40835243463516235,
0.24996381998062134,
-1.1328157186508179,
-0.251297265291214,
-1.1946688890457153,
0.6093593239784... |
func (o *GetServiceInstanceByNameDefault) WithPayload(payload *v1.Error) *GetServiceInstanceByNameDefault {
o.Payload = payload
return o
} | [
-0.515381395816803,
0.29441869258880615,
0.034960146993398666,
-0.35640794038772583,
-0.47361239790916443,
-0.10246055573225021,
-0.495373398065567,
-0.5216308832168579,
0.02715788409113884,
-0.020713353529572487,
-0.6014957427978516,
-0.6803907155990601,
-0.9457429051399231,
0.01920482516... |
func (o *GetServiceInstanceByNameDefault) SetPayload(payload *v1.Error) {
o.Payload = payload
} | [
-0.2724548578262329,
0.5298129916191101,
0.025171294808387756,
-0.08979596197605133,
-0.10729615390300751,
0.38891443610191345,
-0.2782750725746155,
-0.03371063619852066,
-0.522323727607727,
0.20327706634998322,
-0.7674704790115356,
-0.11354967206716537,
-1.4222321510314941,
0.441837728023... |
func (o *GetServiceInstanceByNameDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
-0.45874735713005066,
0.035597119480371475,
0.3389088809490204,
0.2979474365711212,
0.6887621283531189,
-0.3456277847290039,
0.11624820530414581,
0.02526228316128254,
0.12647709250450134,
0.3067108988761902,
-0.33720076084136963,
-0.7990655899047852,
-1.3082540035247803,
-0.383315563201904... |
func DeCompressGzip(src []string, dest string) (err error) {
// check the dest whether dir or not...
is, err := utils.IsDir(dest)
if err != nil {
log.Println("Error check dest dir:", err)
return err
}
if !is {
err = errors.New("dest path is not dir")
log.Println(err)
return err
}
// loop decompress src... | [
0.09455608576536179,
-0.08150509744882584,
1.148999810218811,
-0.1211349219083786,
-0.08828728646039963,
0.6771412491798401,
0.3250967860221863,
0.2285768687725067,
-0.7520610094070435,
0.37614700198173523,
-0.31366491317749023,
-0.4592415690422058,
-0.6875678896903992,
0.39735373854637146... |
func Random() float64 {
return randGen.Float64()
} | [
0.3360782563686371,
1.1772522926330566,
0.185012087225914,
1.0118253231048584,
-0.1250009685754776,
0.9067418575286865,
0.32716134190559387,
0.34287720918655396,
-0.05505312979221344,
-1.174730658531189,
1.042833685874939,
0.4207168519496918,
-0.5296357274055481,
1.2168138027191162,
-0.9... |
func FileExists(filename string) bool {
if _, err := os.Stat(filename); err == nil {
return true
} else {
return false
}
} | [
-0.5124117136001587,
-0.5006303787231445,
0.6686751246452332,
-0.16946616768836975,
1.5852960348129272,
1.107283353805542,
-0.5056737065315247,
0.7842616438865662,
-0.9491938352584839,
-0.6319312453269958,
0.10686787962913513,
-0.6487016081809998,
0.4721508026123047,
0.4993157386779785,
... |
func mockedGranter(kubeutil *kube.Kube, app *v1.RadixRegistration, namespace string, serviceAccount *corev1.ServiceAccount) error {
return nil
} | [
0.18354423344135284,
0.15557074546813965,
0.39880457520484924,
0.419706255197525,
-0.4868786334991455,
-0.14298506081104279,
0.6979935765266418,
-0.19623760879039764,
0.06526193022727966,
-0.37932249903678894,
-0.04447086527943611,
-0.16628478467464447,
-1.0716428756713867,
1.5747896432876... |
func (s CreateGovCloudAccountInput) String() string {
return awsutil.Prettify(s)
} | [
0.6506426334381104,
0.4390685558319092,
0.006646406836807728,
-0.2620563805103302,
0.42187216877937317,
1.2983391284942627,
0.8491554856300354,
-1.1353962421417236,
-0.19528886675834656,
-0.009121052920818329,
0.4200792610645294,
1.279492735862732,
-0.0019117332994937897,
-0.57088732719421... |
func (s *CreateGovCloudAccountInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "CreateGovCloudAccountInput"}
if s.AccountName == nil {
invalidParams.Add(aws.NewErrParamRequired("AccountName"))
}
if s.AccountName != nil && len(*s.AccountName) < 1 {
invalidParams.Add(aws.NewErrParamMinLen... | [
0.11095600575208664,
0.60174560546875,
0.458766371011734,
-0.014831040054559708,
0.4872349500656128,
0.7397167682647705,
0.2370791733264923,
-0.5130219459533691,
-0.6232436895370483,
0.14938686788082123,
0.5347986221313477,
0.5693289041519165,
-0.8144140243530273,
0.610231876373291,
0.91... |
func (s CreateGovCloudAccountOutput) String() string {
return awsutil.Prettify(s)
} | [
1.260660171508789,
0.033756814897060394,
0.034888844937086105,
-0.267414927482605,
0.07984285056591034,
0.34985649585723877,
0.8115206956863403,
-1.0290906429290771,
-0.6402143836021423,
-0.07908155769109726,
0.6943686008453369,
0.8833630084991455,
0.29535821080207825,
-0.6710885167121887,... |
func (r CreateGovCloudAccountRequest) Send(ctx context.Context) (*CreateGovCloudAccountResponse, error) {
r.Request.SetContext(ctx)
err := r.Request.Send()
if err != nil {
return nil, err
}
resp := &CreateGovCloudAccountResponse{
CreateGovCloudAccountOutput: r.Request.Data.(*CreateGovCloudAccountOutput),
re... | [
-0.37140023708343506,
0.47429129481315613,
0.18295863270759583,
0.0701194703578949,
0.9894741773605347,
0.45249414443969727,
0.5467225909233093,
-1.0738924741744995,
-0.35505324602127075,
0.2566102147102356,
0.09441343694925308,
1.1066162586212158,
-0.2588440477848053,
0.029420139268040657... |
func (r *CreateGovCloudAccountResponse) SDKResponseMetdata() *aws.Response {
return r.response
} | [
0.6743799448013306,
0.3769511282444,
0.19403263926506042,
-0.23333849012851715,
0.7845278978347778,
0.6376463770866394,
-0.13251884281635284,
-0.6024398803710938,
0.277249276638031,
0.2761174440383911,
-0.09900134801864624,
0.23151795566082,
-0.2755001187324524,
-1.0369329452514648,
0.75... |
func (cmd *Android) Name() string {
return "android"
} | [
-0.19278749823570251,
-0.6703640818595886,
0.6831584572792053,
0.5212973356246948,
-0.9141443967819214,
0.9156429767608643,
0.38260403275489807,
-0.539513885974884,
-0.0420684851706028,
0.8180614113807678,
0.3683328628540039,
0.25452709197998047,
0.919279932975769,
0.8437393307685852,
0.... |
func (cmd *Android) Description() string {
return "Build and package a fyne application for the android OS"
} | [
-0.06304887682199478,
-0.3131644129753113,
0.24431927502155304,
0.3697918653488159,
-0.17652669548988342,
0.4974743723869324,
-0.023955712094902992,
-0.15992005169391632,
0.114350326359272,
0.44747114181518555,
0.9645771980285645,
0.4630242884159088,
0.4421609044075012,
0.9565287232398987,... |
func (cmd *Android) Parse(args []string) error {
commonFlags, err := newCommonFlags()
if err != nil {
return err
}
flags := &androidFlags{
CommonFlags: commonFlags,
}
flagSet.Usage = cmd.Usage
flagSet.Parse(args)
ctx, err := makeAndroidContext(flags, flagSet.Args())
if err != nil {
return err
}
cmd... | [
0.37418949604034424,
0.6493194699287415,
0.4686466157436371,
-0.01666487380862236,
1.1910154819488525,
0.18301600217819214,
0.34518542885780334,
-0.5709993839263916,
-0.21970506012439728,
-0.6102345585823059,
1.1010266542434692,
0.28747889399528503,
-0.30057111382484436,
0.4616154432296753... |
func (cmd *Android) Run() error {
ctx := cmd.Context
log.Infof("[i] Target: %s", ctx.OS)
log.Debugf("%#v", ctx)
//
// pull image, if requested
//
err := pullImage(ctx)
if err != nil {
return err
}
//
// prepare build
//
err = cleanTargetDirs(ctx)
if err != nil {
return err
}
err = goModInit(ctx... | [
-0.928023636341095,
-0.4921053647994995,
0.9484836459159851,
0.1199057474732399,
0.503644585609436,
-0.07127140462398529,
1.009302020072937,
-0.008437858894467354,
0.18473245203495026,
0.3049870431423187,
0.20122696459293365,
-0.21441003680229187,
0.26957759261131287,
0.20856286585330963,
... |
func (cmd *Android) Usage() {
data := struct {
Name string
Description string
}{
Name: cmd.Name(),
Description: cmd.Description(),
}
template := `
Usage: fyne-cross {{ .Name }} [options] [package]
{{ .Description }}
Options:
`
printUsage(template, data)
flagSet.PrintDefaults()
} | [
0.06378571689128876,
0.15541553497314453,
0.8084397315979004,
-0.38237956166267395,
0.9766082167625427,
-1.0677998065948486,
0.4259920120239258,
-0.586897075176239,
-0.3660431504249573,
0.30241310596466064,
1.0573049783706665,
0.4571535587310791,
0.43452826142311096,
1.1812667846679688,
... |
func makeAndroidContext(flags *androidFlags, args []string) (Context, error) {
ctx, err := makeDefaultContext(flags.CommonFlags, args)
if err != nil {
return Context{}, err
}
// appID is mandatory for android
if ctx.AppID == "" {
return Context{}, fmt.Errorf("appID is mandatory for %s", androidOS)
}
ctx.OS... | [
0.23431141674518585,
-0.09453132748603821,
0.5632887482643127,
0.20390979945659637,
0.19201113283634186,
0.6844215989112854,
-0.024292195215821266,
-0.9155651926994324,
0.14216580986976624,
0.2348630279302597,
1.0299403667449951,
-0.08877076953649521,
0.49512454867362976,
0.336573183536529... |
func RecordSuccess(agentName string) {
mutex.Lock()
defer mutex.Unlock()
maybeInit(agentName)
m := metrics[agentName]
m.SuccessCount++
m.LastSuccess = time.Now()
metrics[agentName] = m
} | [
0.04089686647057533,
0.5769795179367065,
0.39537304639816284,
-0.6516508460044861,
-0.2260628044605255,
0.20328359305858612,
0.13902513682842255,
0.34477588534355164,
-0.30694103240966797,
-0.13030189275741577,
-0.5174074172973633,
0.5672100782394409,
0.3547975420951843,
0.7189554572105408... |
func RecordFailure(agentName string, errcode types.CipherError) {
mutex.Lock()
defer mutex.Unlock()
maybeInit(agentName)
m := metrics[agentName]
m.FailureCount++
m.LastFailure = time.Now()
m.TypeCounters[errcode]++
metrics[agentName] = m
} | [
-0.21214228868484497,
0.28170573711395264,
0.33791500329971313,
-0.8991993069648743,
0.3116046190261841,
-0.3221401274204254,
0.37484732270240784,
-0.12384793162345886,
0.049295954406261444,
-0.25071701407432556,
-0.62285315990448,
0.7741899490356445,
-0.42513495683670044,
0.80974829196929... |
func GetCipherMetrics() types.CipherMetricsMap {
return metrics
} | [
0.03296453505754471,
0.5710102319717407,
0.24379019439220428,
0.13718253374099731,
-0.2545081377029419,
0.692518413066864,
0.6265586018562317,
-0.02164486050605774,
0.3756435811519623,
-0.12920497357845306,
-1.1674293279647827,
1.0244405269622803,
-1.6157352924346924,
-0.12097950279712677,... |
func Append(cms types.CipherMetricsMap, cms1 types.CipherMetricsMap) types.CipherMetricsMap {
for agentName, cm1 := range cms1 {
cm, ok := cms[agentName]
if !ok {
// New agentName; take all
cms[agentName] = cm1
continue
}
if cm.LastFailure.IsZero() {
// Don't care if cm1 is zero
cm.LastFailure =... | [
0.09559017419815063,
-0.6119359731674194,
0.5793083310127258,
-0.5672931671142578,
-0.4046306312084198,
0.31313440203666687,
0.09926681220531464,
-0.34121450781822205,
0.10340070724487305,
0.17425203323364258,
0.14929737150669098,
0.2998342216014862,
-0.6330959796905518,
0.5482320785522461... |
func (*UserPassword) Descriptor() ([]byte, []int) {
return file_Auth_Auth_proto_rawDescGZIP(), []int{0}
} | [
-0.2360360026359558,
-0.016311759129166603,
0.220784530043602,
0.8805730938911438,
-0.548184871673584,
-0.09163142740726471,
0.8434392213821411,
0.47712942957878113,
0.27229043841362,
-0.2081020623445511,
-1.2641873359680176,
0.9061533808708191,
0.09696107357740402,
0.7798009514808655,
0... |
func (*UserGroupInfo) Descriptor() ([]byte, []int) {
return file_Auth_Auth_proto_rawDescGZIP(), []int{1}
} | [
-0.339458167552948,
0.7583009600639343,
0.07169897109270096,
0.35939183831214905,
-0.4533987045288086,
-0.925513505935669,
0.38927361369132996,
0.25183460116386414,
-1.464918851852417,
0.09901604056358337,
-1.1181426048278809,
-0.06068383529782295,
-0.47465381026268005,
0.42558425664901733... |
func (*UserInfo) Descriptor() ([]byte, []int) {
return file_Auth_Auth_proto_rawDescGZIP(), []int{2}
} | [
-0.4238205552101135,
0.2664654850959778,
0.34076499938964844,
0.6617943644523621,
-0.4940861165523529,
-0.016498519107699394,
0.5943756103515625,
0.2992227375507355,
-1.0388396978378296,
-0.2042568176984787,
-1.1137728691101074,
0.28580886125564575,
0.07781083881855011,
0.27028924226760864... |
func (*LoginRsp) Descriptor() ([]byte, []int) {
return file_Auth_Auth_proto_rawDescGZIP(), []int{3}
} | [
0.010958079248666763,
-0.4106972813606262,
0.4340200424194336,
-0.5282588005065918,
-0.590003490447998,
-0.2920339107513428,
-0.42609408497810364,
-0.2242061346769333,
0.47774532437324524,
-0.11165259033441544,
-0.9708459377288818,
0.30553290247917175,
-1.2866272926330566,
-0.0187231432646... |
func (*SignUpRsp) Descriptor() ([]byte, []int) {
return file_Auth_Auth_proto_rawDescGZIP(), []int{4}
} | [
-0.2448349893093109,
-0.053460411727428436,
0.6007164716720581,
-0.11568313091993332,
-0.07430894672870636,
-0.20779477059841156,
0.3348350524902344,
0.25557783246040344,
0.5453346967697144,
0.1215948760509491,
-0.7844110131263733,
-0.25976115465164185,
-0.3673352301120758,
0.1803614944219... |
func (*ChangeInfoRsp) Descriptor() ([]byte, []int) {
return file_Auth_Auth_proto_rawDescGZIP(), []int{5}
} | [
-1.0103037357330322,
0.30251115560531616,
0.437738835811615,
-0.09797700494527817,
-0.936068594455719,
-0.4623890519142151,
0.3465273976325989,
0.36994853615760803,
-0.26127347350120544,
-0.0014629317447543144,
-0.7001122832298279,
0.6668586730957031,
0.32976701855659485,
0.944240748882293... |
func NextUID() uint64 {
return uint64(rand.Int63()) + uint64(rand.Int63())
} | [
-0.5931360125541687,
0.14165982604026794,
0.5688965320587158,
0.5594599843025208,
-0.608343780040741,
1.1344348192214966,
0.48633328080177307,
0.6306539177894592,
1.7160584926605225,
-1.565173864364624,
0.22365158796310425,
0.8496913313865662,
-0.44759973883628845,
0.14263226091861725,
-... |
func PKOfDoc(doc map[string]interface{}, panicOnErr bool) uint64 {
docPK, ok := doc[PK_NAME].(string)
if !ok {
if panicOnErr {
panic(fmt.Sprintf("Doc %v does not have a valid PK", doc))
}
return 18446744073709551615
}
strint, err := strconv.ParseUint(docPK, 10, 64)
if err != nil {
if panicOnErr {
pan... | [
0.034589339047670364,
0.6010892987251282,
0.7171136736869812,
-0.24112056195735931,
-1.044040322303772,
-0.1577707678079605,
0.7021222710609436,
0.16500703990459442,
-0.18237780034542084,
-0.17694705724716187,
0.23917429149150848,
-0.889853835105896,
0.016389092430472374,
0.950782358646392... |
func ReadLogin(req *server.Request) (proto.Message, errors.Error) {
request := &readproto.Request{}
if err := req.Unmarshal(request); err != nil {
return nil, errors.BadRequest("com.HailoOSS.service.login.readlogin.unmarshal", err.Error())
}
start := protoToTime(request.RangeStart, time.Now().AddDate(0, -1, 0))
... | [
-1.239094614982605,
-0.6962263584136963,
0.8556906580924988,
0.26702824234962463,
-0.7470757365226746,
0.5205738544464111,
-0.14016981422901154,
-0.7285569310188293,
-0.0964316725730896,
-0.129463329911232,
0.5154013633728027,
0.9371041655540466,
-0.1133800819516182,
-0.7001134753227234,
... |
func queryProposalsWithParameterFn(cliCtx context.CLIContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
_, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0)
if err != nil {
rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
return
}
cliCtx, ok := rest.Parse... | [
-0.5768911838531494,
-0.0005970207275822759,
0.5256981253623962,
0.2837151885032654,
-0.48881837725639343,
-0.24681609869003296,
-0.03356583043932915,
-0.31884413957595825,
0.25645712018013,
1.1286851167678833,
0.1489625871181488,
0.23619472980499268,
-0.14692378044128418,
0.45460513234138... |
func queryTallyOnProposalHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
strProposalID := vars[RestProposalID]
if len(strProposalID) == 0 {
err := errors.New("proposalId required but not specified")
rest.WriteErrorResponse(w... | [
0.027995260432362556,
0.04047127068042755,
0.7137415409088135,
-0.37766098976135254,
-0.829929769039154,
-0.3686283826828003,
0.034291625022888184,
-0.014284632168710232,
0.2669154405593872,
0.9365652799606323,
0.08034250885248184,
-0.18799450993537903,
-0.0922422856092453,
-0.002591908443... |
func Router() *chi.Mux {
router.Get("/", sysHandler)
router.Route("/api/v1", func(r chi.Router) {
// r.Mount("/users", userRoutes())
})
return router
} | [
0.5963999629020691,
-0.09360691905021667,
0.28995680809020996,
1.4491602182388306,
-0.44002801179885864,
0.4714530408382416,
0.2913402020931244,
0.5395814776420593,
0.6227132678031921,
-0.7624958753585815,
0.5498144626617432,
0.5574044585227966,
-0.24240079522132874,
0.8501145243644714,
... |
func NewUpdateMTOServiceItemStatusParams() *UpdateMTOServiceItemStatusParams {
return &UpdateMTOServiceItemStatusParams{
timeout: cr.DefaultTimeout,
}
} | [
-0.7299306392669678,
-0.7694879174232483,
0.24982059001922607,
0.3292640447616577,
-0.8456239104270935,
0.6749892830848694,
-0.8028756976127625,
0.4014844000339508,
-0.8562929630279541,
0.8208833336830139,
-0.38421255350112915,
0.5284428000450134,
0.25456464290618896,
0.236957848072052,
... |
func NewUpdateMTOServiceItemStatusParamsWithTimeout(timeout time.Duration) *UpdateMTOServiceItemStatusParams {
return &UpdateMTOServiceItemStatusParams{
timeout: timeout,
}
} | [
0.031733203679323196,
-0.7392244338989258,
0.5030748248100281,
0.5117460489273071,
-1.049317717552185,
1.047696828842163,
-1.3435277938842773,
0.4709911644458771,
-0.6885168552398682,
1.6479824781417847,
0.027623368427157402,
0.8720946311950684,
0.09813647717237473,
0.39867937564849854,
... |
func NewUpdateMTOServiceItemStatusParamsWithContext(ctx context.Context) *UpdateMTOServiceItemStatusParams {
return &UpdateMTOServiceItemStatusParams{
Context: ctx,
}
} | [
-0.8127222657203674,
-0.6961941719055176,
0.7060983180999756,
0.12043905258178711,
-0.5586224794387817,
1.1057454347610474,
-1.1552507877349854,
-0.12531526386737823,
-0.34885406494140625,
1.2046284675598145,
-0.06046993285417557,
0.20696918666362762,
0.10246746987104416,
-0.08911478519439... |
func NewUpdateMTOServiceItemStatusParamsWithHTTPClient(client *http.Client) *UpdateMTOServiceItemStatusParams {
return &UpdateMTOServiceItemStatusParams{
HTTPClient: client,
}
} | [
-0.55594801902771,
-0.952056884765625,
0.5683884024620056,
0.24774745106697083,
-0.4320484697818756,
0.9555184841156006,
-0.2410072535276413,
0.3904816806316376,
-1.1219292879104614,
0.9356238842010498,
-0.4875066578388214,
0.302395761013031,
0.3254885971546173,
0.11252884566783905,
-0.6... |
func (o *UpdateMTOServiceItemStatusParams) WithDefaults() *UpdateMTOServiceItemStatusParams {
o.SetDefaults()
return o
} | [
-0.4344196319580078,
-0.13005709648132324,
0.23859432339668274,
0.046448200941085815,
-0.2101680338382721,
-0.11098793148994446,
-0.8268502354621887,
-0.2735512852668762,
-0.23266306519508362,
0.21820788085460663,
-0.16970546543598175,
-0.7726438641548157,
0.0026128923054784536,
-0.0268308... |
func (o *UpdateMTOServiceItemStatusParams) SetDefaults() {
// no default values defined for this parameter
} | [
-1.2706102132797241,
0.2591935396194458,
0.19956766068935394,
-0.03598838672041893,
0.3079744279384613,
0.30257928371429443,
-0.5203710198402405,
-0.2613489031791687,
-0.6479410529136658,
0.31941524147987366,
-0.39801469445228577,
-0.1389567255973816,
-0.47865819931030273,
0.30790942907333... |
func (o *UpdateMTOServiceItemStatusParams) WithTimeout(timeout time.Duration) *UpdateMTOServiceItemStatusParams {
o.SetTimeout(timeout)
return o
} | [
-0.15020982921123505,
-0.40107443928718567,
0.42916885018348694,
0.17028576135635376,
-1.1335142850875854,
0.502997100353241,
-0.5455924868583679,
0.3853725492954254,
-0.00800476036965847,
1.1073802709579468,
0.06616880744695663,
0.47263815999031067,
0.5258414149284363,
0.33150550723075867... |
func (o *UpdateMTOServiceItemStatusParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
-0.6979832053184509,
-0.23932872712612152,
0.3164110779762268,
0.21114063262939453,
-0.8899805545806885,
0.9934595227241516,
-0.6246414184570312,
0.6125911474227905,
-0.40809622406959534,
1.229159951210022,
-0.04149569198489189,
0.4890517294406891,
-0.09188481420278549,
0.3475571870803833,... |
func (o *UpdateMTOServiceItemStatusParams) WithContext(ctx context.Context) *UpdateMTOServiceItemStatusParams {
o.SetContext(ctx)
return o
} | [
-1.0508383512496948,
-0.6131829619407654,
0.5393202304840088,
-0.08793406933546066,
-1.0644909143447876,
0.3804772198200226,
-0.8307678699493408,
-0.19160929322242737,
0.28265294432640076,
0.6170312762260437,
-0.08940548449754715,
-0.02823309786617756,
-0.14602939784526825,
-0.208143204450... |
func (o *UpdateMTOServiceItemStatusParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-1.3596872091293335,
-0.3273441195487976,
0.3379899263381958,
0.1919707953929901,
-0.6964806914329529,
0.6891127228736877,
-0.7418103218078613,
-0.09160029888153076,
0.5004103779792786,
0.7102281451225281,
-0.1845705211162567,
0.11653841286897659,
-0.33218082785606384,
0.023670384660363197... |
func (o *UpdateMTOServiceItemStatusParams) WithHTTPClient(client *http.Client) *UpdateMTOServiceItemStatusParams {
o.SetHTTPClient(client)
return o
} | [
-0.5619705319404602,
-1.1531678438186646,
0.47492271661758423,
-0.21019645035266876,
-0.9047610759735107,
0.3310796320438385,
0.07981542497873306,
-0.10208720713853836,
-0.5781781077384949,
0.20152325928211212,
-0.33963829278945923,
0.02992347627878189,
0.3821839690208435,
-0.4586902558803... |
func (o *UpdateMTOServiceItemStatusParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
-0.41936907172203064,
-0.7246357798576355,
0.24525617063045502,
-0.4989793598651886,
-1.0405486822128296,
0.2495565116405487,
-0.003604865400120616,
-0.039395853877067566,
-1.0397632122039795,
0.4313270151615143,
-0.5169510245323181,
0.5113537311553955,
-0.20828984677791595,
-0.39057394862... |
func (o *UpdateMTOServiceItemStatusParams) WithIfMatch(ifMatch string) *UpdateMTOServiceItemStatusParams {
o.SetIfMatch(ifMatch)
return o
} | [
-0.02695101499557495,
-0.4620131850242615,
0.45271146297454834,
0.5304914712905884,
-0.7669281959533691,
-0.033270519226789474,
-0.1517602652311325,
0.17466017603874207,
-0.1558174192905426,
0.6445652842521667,
0.09845180809497833,
-0.29389238357543945,
-0.14641180634498596,
0.157982662320... |
func (o *UpdateMTOServiceItemStatusParams) SetIfMatch(ifMatch string) {
o.IfMatch = ifMatch
} | [
-0.7481777667999268,
-0.05663495510816574,
0.4539480209350586,
0.4528541564941406,
-0.6348163485527039,
0.4361272156238556,
0.08592278510332108,
0.18798542022705078,
-0.5686777234077454,
0.45752525329589844,
-0.33147552609443665,
-0.1054891049861908,
-0.8011006712913513,
0.4948919117450714... |
func (o *UpdateMTOServiceItemStatusParams) WithBody(body *supportmessages.UpdateMTOServiceItemStatus) *UpdateMTOServiceItemStatusParams {
o.SetBody(body)
return o
} | [
-1.1912686824798584,
-0.8169078826904297,
0.39141252636909485,
-0.14561140537261963,
-0.4971107244491577,
0.24860651791095734,
-0.8319016098976135,
-0.5398004651069641,
0.3778480291366577,
0.8122296929359436,
-0.38679665327072144,
-0.44277966022491455,
0.18865233659744263,
0.01073398068547... |
func (o *UpdateMTOServiceItemStatusParams) SetBody(body *supportmessages.UpdateMTOServiceItemStatus) {
o.Body = body
} | [
-1.4684438705444336,
-0.6496650576591492,
0.24690978229045868,
0.17774146795272827,
-0.3003651797771454,
0.7061190605163574,
-0.9289475679397583,
-0.20285142958164215,
0.2343970537185669,
0.8128101229667664,
-0.5749554634094238,
0.07194380462169647,
-0.5735611915588379,
0.8230218887329102,... |
func (o *UpdateMTOServiceItemStatusParams) WithMtoServiceItemID(mtoServiceItemID string) *UpdateMTOServiceItemStatusParams {
o.SetMtoServiceItemID(mtoServiceItemID)
return o
} | [
-0.1815606653690338,
-1.3418279886245728,
0.43934690952301025,
0.1347823441028595,
-0.6429123282432556,
0.39902323484420776,
-0.48545631766319275,
-0.33056485652923584,
0.03470863774418831,
0.8917315006256104,
0.14748230576515198,
-0.03773076832294464,
0.26754650473594666,
0.07092170417308... |
func (o *UpdateMTOServiceItemStatusParams) SetMtoServiceItemID(mtoServiceItemID string) {
o.MtoServiceItemID = mtoServiceItemID
} | [
-0.46936407685279846,
-1.2052346467971802,
0.38000625371932983,
-0.07587943226099014,
-0.4497928023338318,
0.5660514831542969,
-0.3003612458705902,
-0.3417123556137085,
-0.4400300085544586,
1.0140573978424072,
-0.2880259156227112,
0.2058919221162796,
-0.1700829416513443,
0.1714899390935897... |
func (o *UpdateMTOServiceItemStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// header param If-Match
if err := r.SetHeaderParam("If-Match", o.IfMatch); err != nil {
return err
}
if o.Body != nil... | [
-1.3294110298156738,
-0.4480811059474945,
0.8140166997909546,
-0.29682713747024536,
0.34740450978279114,
-0.005037800874561071,
0.5957604646682739,
0.004996283911168575,
-0.5878915786743164,
0.6315418481826782,
0.19942283630371094,
0.17928792536258698,
-0.2982124090194702,
0.09728786349296... |
func (r *NucypherAccountRepository) GetAccounts(createdBy string) ([]*model.NucypherAccount, error) {
var accounts []*model.NucypherAccount
if err := r.store.db.Select(&accounts,
"SELECT account_id, name, organization_id, address, signing_key, encrypting_key, balance, tokens, is_active, is_private, created_by, cre... | [
-0.12978161871433258,
0.4607202708721161,
0.18627594411373138,
0.7652344107627869,
0.6941400766372681,
-0.6372132301330566,
0.8508684039115906,
-0.3397296667098999,
0.49826276302337646,
-0.26980870962142944,
0.10529252886772156,
0.2487802803516388,
-0.39970919489860535,
-0.1326909661293029... |
func (r *NucypherAccountRepository) GetAccountByOrganization(id string) ([]*model.NucypherAccount, error) {
var accounts []*model.NucypherAccount
if err := r.store.db.Select(&accounts,
"SELECT account_id, name, organization_id, address, signing_key, encrypting_key, balance, tokens, is_active, is_private, created_b... | [
-0.056582286953926086,
-0.11755523085594177,
0.2657589018344879,
0.9107323884963989,
1.2920494079589844,
-0.6609309315681458,
0.7075358629226685,
-0.32452598214149475,
0.6615943312644958,
0.7764248251914978,
-0.2479129582643509,
0.5599538087844849,
0.2593659460544586,
0.21437782049179077,
... |
func (r *NucypherAccountRepository) UpdateName(name string, updatedBy string, accountID int, now time.Time) error {
_, err := r.store.db.NamedExec(`UPDATE nucypher_accounts
SET name=:name, updated_by=:updated_by, updated_at=:updated_at
WHERE (created_by=:updated_by AND account_id=:account_id)`,
map[string]interf... | [
-0.6901426315307617,
-0.56032395362854,
0.39571842551231384,
0.046962808817625046,
-0.6704644560813904,
-0.41978374123573303,
0.1800251007080078,
0.35035979747772217,
-0.2522137463092804,
1.2090263366699219,
-0.6643180251121521,
-0.4404754936695099,
-0.161357581615448,
-0.5328819155693054,... |
func (r *NucypherAccountRepository) UpdateAddress(address string, updatedBy string, accountID int, now time.Time) error {
_, err := r.store.db.NamedExec(`UPDATE nucypher_accounts
SET address=:address, updated_by=:updated_by, updated_at=:updated_at
WHERE (created_by=:updated_by AND account_id=:account_id)`,
map[s... | [
-0.605675220489502,
-0.9343044757843018,
0.4336414933204651,
0.228668674826622,
-0.0708162784576416,
0.1358908712863922,
0.22869747877120972,
0.8999258279800415,
0.710852324962616,
0.6388682126998901,
-0.27301284670829773,
1.1020300388336182,
-0.45341166853904724,
-0.37293875217437744,
0... |
func (r *NucypherAccountRepository) UpdateVerifyingKey(verifying_key string, updatedBy string, accountID int, now time.Time) error {
_, err := r.store.db.NamedExec(`UPDATE nucypher_accounts
SET verifying_key=:verifying_key, updated_by=:updated_by, updated_at=:updated_at
WHERE (created_by=:updated_by AND account_id... | [
-0.5213050842285156,
-0.47076305747032166,
0.15151754021644592,
0.7269949913024902,
-0.2270352691411972,
-0.004625868983566761,
0.008044562302529812,
0.6137763857841492,
-0.33637046813964844,
0.9137076735496521,
-0.8293482661247253,
0.03789219260215759,
-0.3474106192588806,
0.3232166469097... |
func (r *NucypherAccountRepository) Deactivate(updatedBy string, accountID int, now time.Time) error {
_, err := r.store.db.Exec(`UPDATE nucypher_accounts
SET is_active=false, updated_by=$1, updated_at=$3
WHERE (created_by=$1 AND account_id=$2)`,
updatedBy,
accountID,
now,
)
if err != nil {
return err
... | [
-0.4724772870540619,
0.044177208095788956,
0.21433967351913452,
0.18777911365032196,
0.2042919248342514,
-0.133914515376091,
0.6946486234664917,
0.4705457091331482,
-0.3633296489715576,
0.7323213219642639,
-0.32375362515449524,
0.1609988808631897,
-1.0160797834396362,
-1.1499754190444946,
... |
func (r *NucypherAccountRepository) Reactivate(updatedBy string, accountID int, now time.Time) error {
_, err := r.store.db.NamedExec(`UPDATE nucypher_accounts
SET is_active=true, updated_by=:updated_by, updated_at=:updated_at
WHERE (created_by=:updated_by AND account_id=:account_id AND is_active=false)`,
map[s... | [
-0.24925190210342407,
-0.31699615716934204,
0.3316936194896698,
-0.17882750928401947,
0.296301007270813,
-0.5800560712814331,
0.03415478765964508,
0.7740887403488159,
-0.09952665865421295,
0.6452804803848267,
-0.527587890625,
0.34526997804641724,
-1.3803937435150146,
-1.3375474214553833,
... |
func (r *NucypherAccountRepository) Private(updatedBy string, accountID int, now time.Time) error {
_, err := r.store.db.NamedExec(`UPDATE nucypher_accounts
SET is_private=true, updated_by=:updated_by, updated_at=:updated_at
WHERE (created_by=:updated_by AND account_id=:account_id AND is_private=false)`,
map[st... | [
-0.758630096912384,
0.0713898241519928,
0.2853653132915497,
-0.7287847399711609,
-0.22051163017749786,
0.028569430112838745,
0.2699352204799652,
-0.48504629731178284,
-0.08864078670740128,
0.20699679851531982,
0.2934913635253906,
0.7116577625274658,
-0.3951787054538727,
0.26404356956481934... |
func (r *NucypherAccountRepository) Unprivate(updatedBy string, accountID int, now time.Time) error {
_, err := r.store.db.NamedExec(`UPDATE nucypher_accounts
SET is_private=false, updated_by=:updated_by, updated_at=:updated_at
WHERE (created_by=:updated_by AND account_id=:account_id AND is_private=true)`,
map[... | [
-0.9203101396560669,
0.2619527280330658,
0.5214102268218994,
-0.7076066732406616,
-0.3488501310348511,
-0.44585663080215454,
0.218718022108078,
0.4254928529262543,
-0.08107783645391464,
0.16636857390403748,
0.022761046886444092,
0.6806779503822327,
-0.4767746329307556,
-0.7352254986763,
... |
func (fetcher *Fetcher) Init() {
fetcher.cpuUsageUrl = TSDB_URL + "start=" + TIME_AGO + "&m=" + AGREGATOR + ":" + CPU_METRIC + "{host=" + HOST + ",colo=" + COLO + "}&format=json"
fetcher.memUsageUrl = TSDB_URL + "start=" + TIME_AGO + "&m=" + AGREGATOR + ":" + MEM_USAGE_METRIC + "{host=" + HOST + ",colo=" + COLO + "}&... | [
-0.6615834832191467,
0.047732722014188766,
0.4975232183933258,
-0.6645262241363525,
-0.00847809948027134,
0.7248762845993042,
-0.8457524180412292,
0.2057422548532486,
-2.107086181640625,
0.40960830450057983,
-0.010293363593518734,
0.32163968682289124,
1.0216729640960693,
1.232877492904663,... |
func (fetcher *Fetcher) FetchHostData() map[string]*Host {
hosts := make(map[string]*Host)
// CPU usage
cpuUsageMetricList, err := fetcher.readJSONFromUrlForCpu()
if err != nil {
log.Errorf("error: %+v\n", err)
}
for _, cpuUsageMetric := range cpuUsageMetricList {
host := &Host{ CpuUsage:0.0, MemUsage: 0, Di... | [
-0.3273627758026123,
0.09225329756736755,
0.5377720594406128,
-0.2985394299030304,
-0.9742943644523621,
0.9787505865097046,
-0.2577436566352844,
0.3327518701553345,
-1.7013803720474243,
0.23278489708900452,
-0.5054288506507874,
0.09951457381248474,
0.7335249781608582,
0.671048641204834,
... |
func (fetcher *Fetcher) FakeHostDataFromFile() map[string]*Host {
hosts := make(map[string]*Host)
// CPU usage
cpuUsageMetricList, err := fetcher.readJSONFromFileForCpu()
if err != nil {
log.Errorf("error: %+v\n", err) //todo(tanle) remove Fatalf
}
log.Infof("cpuUsageMetricList: %v", len(cpuUsageMetricList))
... | [
-0.3455473780632019,
-0.2252127230167389,
0.5768076777458191,
-0.3390369117259979,
-0.7275452017784119,
0.7470994591712952,
-0.18320289254188538,
0.056288331747055054,
-1.6889318227767944,
0.0841146782040596,
-0.6202134490013123,
0.2527751326560974,
0.21271753311157227,
0.2163940668106079,... |
func (fetcher *Fetcher) FakeHostData() map[string]*Host {
hosts := make(map[string]*Host)
hosts["agent1"] = &Host{Name: "agent1", CpuUsage: 0.0}
hosts["agent2"] = &Host{Name: "agent2", CpuUsage: 0.0}
return hosts
} | [
-1.0977388620376587,
-0.4871772825717926,
0.45456811785697937,
-0.4461829364299774,
-0.7430385947227478,
0.7983936071395874,
-0.5883707404136658,
0.19259196519851685,
-0.9011390805244446,
-0.03979482129216194,
-1.0731370449066162,
0.29687270522117615,
0.11691749840974808,
0.384554624557495... |
func (fetcher *Fetcher) readJSONFromFileForCpu() ([]MetricData, error) {
filePath := jsonFilePath + "/hostCpu.json"
respByte, err := ioutil.ReadFile(filePath)
if err != nil {
log.Errorf("error reading file " + filePath)
log.Errorf(err.Error())
}
metricList := make([]MetricData, 0)
if err := json.Unmarshal(res... | [
-0.1860009729862213,
-0.4585014879703522,
0.6294209957122803,
-0.13806037604808807,
-0.39998048543930054,
1.1539862155914307,
0.2661099135875702,
0.1873771846294403,
-1.7856967449188232,
0.5503875613212585,
0.06525662541389465,
0.2971249520778656,
-0.12134931236505508,
0.6693054437637329,
... |
func (fetcher *Fetcher) readJSONFromUrlForCpu() ([]MetricData, error) {
log.Infof(fetcher.cpuUsageUrl)
resp, err := http.Get(fetcher.cpuUsageUrl)
if err != nil {
return nil, err
}
defer resp.Body.Close()
metricList := make([]MetricData, 0)
buf := new(bytes.Buffer)
buf.ReadFrom(resp.Body)
respByte := buf.... | [
-0.9439692497253418,
-0.2073376476764679,
0.6502823233604431,
-0.3306005895137787,
-0.6088280081748962,
0.01958865486085415,
-0.12931586802005768,
-0.21069420874118805,
-1.081108570098877,
0.26487523317337036,
-0.022373054176568985,
0.624653160572052,
-0.2494966983795166,
0.842671513557434... |
func getBuildLog(url string) string {
response, err := http.Get(url)
if url == "" {
return ""
}
defer response.Body.Close()
b, err := ioutil.ReadAll(response.Body)
check(err)
//only the last part of the log is relevant
e := len(b) - 1
s := 0
if e > lastBytes {
s = e - lastBytes
}
//drop anything aft... | [
0.14041562378406525,
-0.3094664514064789,
0.7812234163284302,
0.030251093208789825,
-0.29483652114868164,
-0.048771921545267105,
-0.05608169734477997,
0.044146280735731125,
0.386635422706604,
0.11355695873498917,
-0.0026703858748078346,
0.5384874939918518,
0.1129106730222702,
-0.3267925977... |
func stored(url string) bool {
q := collection.Find(bson.M{"url": url})
c, err := q.Count()
check(err)
return c > 0
} | [
-0.28195205330848694,
0.29905936121940613,
0.46285608410835266,
-0.2821924388408661,
0.3007926046848297,
0.8598427176475525,
0.4621049463748932,
0.9494253396987915,
-0.4020421504974365,
-0.5755926370620728,
-0.9100382328033447,
-0.6544720530509949,
-0.3907955288887024,
0.39213088154792786,... |
func updateCauses() {
var c *PatternCause
q := causes.Find(nil)
q.For(&c, func() os.Error {
errorPatterns[c.Cause] = c.Pattern
return nil
})
for cause, p := range errorPatterns {
collection.UpdateAll(bson.M{"content": bson.RegEx{Pattern: p}}, bson.M{"$set": bson.M{"cause": cause}})
}
} | [
-0.23910127580165863,
-0.7338793873786926,
0.4526859521865845,
-0.7571249008178711,
-0.010671633295714855,
0.3451874256134033,
0.16670939326286316,
0.31170031428337097,
0.25841155648231506,
0.3318592607975006,
0.06119199097156525,
0.3455749750137329,
-0.2093508243560791,
0.1422882378101349... |
func purgeFTBFSList() {
for url,_ := range(ftbfsList) {
collection.Remove(bson.M{"url":url})
}
} | [
-0.5961968302726746,
0.9677931070327759,
0.3237650990486145,
0.3749001622200012,
0.34676820039749146,
-0.35183221101760864,
-0.5847718119621277,
-0.242947518825531,
0.2213447242975235,
0.2196274697780609,
-1.2229385375976562,
-0.6050721406936646,
-0.6394853591918945,
0.8217509984970093,
... |
func getFTBFS(root lpad.Root) {
ubuntu, _ := root.Distro("ubuntu")
series, _ := ubuntu.FocusSeries()
fmt.Println("Fetching FTBFS list for", series.FullSeriesName())
loadFTBFSList()
for _, build_state := range []lpad.BuildState{lpad.BSFailedToBuild} {
ftbfs, _ := series.GetBuildRecords(build_state, lpad.PocketR... | [
0.06011306121945381,
-0.34292519092559814,
0.53495854139328,
0.33160918951034546,
0.1748664230108261,
-0.24058251082897186,
-0.6589014530181885,
-0.8205528259277344,
0.4195250868797302,
-0.4269351661205292,
-0.13551007211208344,
0.915569007396698,
-0.24886824190616608,
0.7284978032112122,
... |
func (h *Handler) WebhookHandler(w http.ResponseWriter, r *http.Request) {
events, err := h.client.ParseRequest(r)
if err != nil {
log.Print(err)
return
}
for _, event := range events {
if event.Type != linebot.EventTypeMessage {
return
}
switch message := event.Message.(type) {
case *linebot.TextMe... | [
0.7212256789207458,
-0.15638738870620728,
0.6647645235061646,
0.28701430559158325,
0.4795525372028351,
0.3565034866333008,
0.45598748326301575,
-0.38345351815223694,
-0.0217912420630455,
0.30099785327911377,
0.13183993101119995,
-0.20757469534873962,
-0.7387463450431824,
1.0364515781402588... |
func (h *Handler) replyMessageExec(event *linebot.Event, message *linebot.TextMessage) {
switch message.Text {
case "入力":
url := "https://foodbalance001.appspot.com/input" + "?userid=" + event.Source.UserID
linebotMessage := "登録には以下のリンクをクリックしてください." + url
resp := linebot.NewTextMessage(linebotMessage)
_, err ... | [
0.061137933284044266,
0.642542839050293,
1.0565383434295654,
0.20781616866588593,
0.37824320793151855,
-0.2676251530647278,
-0.14172795414924622,
-0.0014644231414422393,
-0.21078097820281982,
0.4500195384025574,
-0.6080437302589417,
0.48179104924201965,
-0.7210255861282349,
0.8477639555931... |
func (h *Handler) InputformHandler(w http.ResponseWriter, r *http.Request) {
v := r.URL.Query()
if v == nil {
tpl := template.Must(template.ParseFiles("error.html"))
tpl.Execute(w, errorField{Detail: "Not find URL value"})
return
}
var fd formField
for key, vs := range v {
log.Printf("%s = %s\n", key, vs[... | [
-0.725429117679596,
-0.14432676136493683,
0.5593655109405518,
-0.18244042992591858,
-0.6368687748908997,
0.9332700967788696,
0.9541231393814087,
0.604839026927948,
-0.7767033576965332,
-0.3210022449493408,
-0.341178834438324,
-1.0547558069229126,
-0.3855365514755249,
1.4325947761535645,
... |
func (h *Handler) PostHandler(w http.ResponseWriter, r *http.Request) {
v := r.URL.Query()
if v == nil {
tpl := template.Must(template.ParseFiles("error.html"))
tpl.Execute(w, errorField{Detail: "Not find URL value"})
return
}
var userid string
for key, vs := range v {
log.Printf("%s = %s\n", key, vs[0])
... | [
-0.7613533735275269,
0.7470047473907471,
0.6917133331298828,
0.08240367472171783,
-0.10225538164377213,
0.7767776250839233,
1.0921614170074463,
1.0706459283828735,
-0.6753810048103333,
0.05126044526696205,
-0.5338835120201111,
-0.4966895282268524,
-0.08707314729690552,
1.5107461214065552,
... |
func (h *Handler) convertRegistration(r *http.Request, userid string) (*RegistrationData, error) {
if err := r.ParseForm(); err != nil {
return nil, err
}
date := r.Form["Date"][0]
name := r.Form["Name"][0]
if len(name) == 0 {
return nil, fmt.Errorf("Error: %s", "Name is empty")
}
timeZone, err := strconv.At... | [
-1.8005955219268799,
0.5871405601501465,
0.7219921350479126,
0.29628896713256836,
-0.34334343671798706,
-0.29825010895729065,
0.3663080632686615,
-0.08554570376873016,
-0.281902939081192,
1.1103483438491821,
-0.33370354771614075,
-0.16695541143417358,
-0.09433602541685104,
0.33556485176086... |
func Astois(ss []string) ([]int, error) {
var is []int
for _, s := range ss {
i, err := strconv.Atoi(s)
if err != nil {
return nil, err
}
is = append(is, i)
}
return is, nil
} | [
-0.7213875651359558,
-0.994389533996582,
0.48753413558006287,
-0.2328205108642578,
-0.015964899212121964,
-0.5419098734855652,
-0.4422019124031067,
-0.1559108942747116,
0.5767229199409485,
1.3013612031936646,
-0.03287358954548836,
0.45891961455345154,
0.1765449494123459,
0.1181107759475708... |
func SumGroup(regists []RegistrationData) Group {
var group Group
for _, r := range regists {
group.Sum(r.BalanceGroup)
}
return group
} | [
-0.676790177822113,
1.2242465019226074,
0.23787152767181396,
0.0688142478466034,
0.1639605164527893,
0.44251659512519836,
0.6809149980545044,
0.1879170835018158,
0.4567079544067383,
-0.041433271020650864,
0.07639183104038239,
0.16361068189144135,
-0.7528271079063416,
0.9189335703849792,
... |
func (g *Group) Sum(in Group) {
g.GrainDishes += in.GrainDishes
g.VegetableDishes += in.VegetableDishes
g.FishAndMealDishes += in.FishAndMealDishes
g.Milk += in.Milk
g.Fruit += in.Fruit
} | [
-1.198770523071289,
0.3466704785823822,
0.49349281191825867,
-0.05184578523039818,
-0.03352338448166847,
-0.5188148617744446,
1.0362740755081177,
-0.13613435626029968,
-0.5189100503921509,
0.6435062885284424,
-0.672759473323822,
0.6623152494430542,
-0.6694055795669556,
0.6879425644874573,
... |
func (g *Group) Div(divisor int) Group {
g.GrainDishes /= divisor
g.VegetableDishes /= divisor
g.FishAndMealDishes /= divisor
g.Milk /= divisor
g.Fruit /= divisor
return *g
} | [
-1.1793650388717651,
0.4934545159339905,
0.42137905955314636,
0.07588856667280197,
-0.4448177218437195,
0.008928907103836536,
1.362386703491211,
-0.6614076495170593,
-0.42741909623146057,
-0.24184776842594147,
-0.16949614882469177,
0.4939703941345215,
-0.21358510851860046,
1.01385605335235... |
func New(service string, environment string, prefix string) *Parser {
return &Parser{
tagparsers: map[string]TagParser{},
service: service,
environment: environment,
prefix: prefix,
}
} | [
0.4703671634197235,
-1.1995806694030762,
0.21263708174228668,
-0.7622702121734619,
-0.8133322596549988,
-0.3289724588394165,
-1.3663153648376465,
-0.05766868218779564,
-1.1179839372634888,
-0.809054970741272,
-0.1679832488298416,
0.8692725896835327,
0.578197181224823,
0.7497420310974121,
... |
func (p *Parser) RegisterTagParser(tag string, parser TagParser) *Parser {
p.tagparsers[tag] = parser
return p
} | [
-0.6390992999076843,
-0.8445017337799072,
0.0862235277891159,
-0.3822619616985321,
0.21272261440753937,
0.21404968202114105,
-1.865849256515503,
-0.467550665140152,
-0.18077494204044342,
-0.1940905600786209,
-1.0930724143981934,
0.03851943835616112,
-0.24288621544837952,
1.013969898223877,... |
func NodesToParameterMap(node *StructNode,
paths map[string]*StructNode, filter *support.FieldFilters, tags []string) {
if filter.IsIncluded(node.FqName) {
for _, tagname := range tags {
if tag, ok := node.Tag[tagname]; ok {
if fullName := tag.GetFullName(); fullName != "" {
paths[tag.GetFullName()] = ... | [
-0.5689983367919922,
0.23181112110614777,
0.7068237662315369,
-1.2391357421875,
-0.0996638759970665,
-0.060448676347732544,
0.2469199150800705,
0.20915760099887848,
-0.3814288079738617,
0.5259121060371399,
-0.15359432995319366,
0.3538968861103058,
0.7662530541419983,
0.7237152457237244,
... |
func ExtractPaths(paths map[string]*StructNode) []string {
arr := make([]string, 0, len(paths))
for key := range paths {
arr = append(arr, key)
}
return arr
} | [
-0.8241375088691711,
0.13899843394756317,
0.3015192747116089,
0.531741738319397,
0.3829232454299927,
-0.010130368173122406,
-0.013300718739628792,
-0.2225123941898346,
-0.2919292747974396,
0.8624101281166077,
-0.06639470905065536,
-0.7312919497489929,
-0.7217622399330139,
0.655149698257446... |
func DumpNode(node *StructNode) {
dumpNodes(append([]StructNode{}, *node))
} | [
-0.9554218649864197,
1.1787348985671997,
0.2849990725517273,
-0.46061667799949646,
0.37632712721824646,
0.5385444760322571,
-0.11524129658937454,
-0.0923280194401741,
0.8084445595741272,
-0.28369423747062683,
-0.989712119102478,
0.7014315128326416,
-0.42972618341445923,
1.1506630182266235,... |
func NewDefaultConfig() Config {
return Config{
Name: "avo",
Pkg: pkg(),
}
} | [
1.4176452159881592,
0.1877029836177826,
0.1481894552707672,
0.9659629464149475,
-0.4562714397907257,
-0.2376175969839096,
-0.9959593415260315,
0.4101615250110626,
0.6070134043693542,
0.5627235770225525,
-0.854306161403656,
-0.2805897891521454,
0.8419477343559265,
1.186589241027832,
-0.26... |
func NewArgvConfig() Config {
return Config{
Argv: os.Args,
Pkg: pkg(),
}
} | [
-0.17975874245166779,
-0.8753239512443542,
0.2831709086894989,
0.3306768238544464,
-1.2976198196411133,
0.21674208343029022,
-1.1469849348068237,
0.8758596777915955,
-0.670182466506958,
0.9719094634056091,
-0.5890952348709106,
0.6663070321083069,
0.8457995057106018,
1.2546550035476685,
-... |
func NewGoRunConfig() Config {
path := mainfile()
if path == "" {
return NewDefaultConfig()
}
argv := []string{"go", "run", filepath.Base(path)}
if len(os.Args) > 1 {
argv = append(argv, os.Args[1:]...)
}
return Config{
Argv: argv,
Pkg: pkg(),
}
} | [
0.006564346607774496,
-0.10013028234243393,
0.5754906535148621,
-0.023612452670931816,
-0.26352566480636597,
0.27423882484436035,
-0.27496057748794556,
1.4635239839553833,
-1.7728856801986694,
0.4454843997955322,
-0.29207518696784973,
0.854167640209198,
-0.19960828125476837,
1.080404281616... |
func (c Config) GeneratedBy() string {
if c.Argv == nil {
return c.Name
}
return fmt.Sprintf("command: %s", strings.Join(c.Argv, " "))
} | [
-0.25801122188568115,
-0.09383488446474075,
0.9848617315292358,
-0.09343186020851135,
0.4000987708568573,
0.5733487010002136,
0.5114785432815552,
0.2571653127670288,
-0.41285133361816406,
-0.40192142128944397,
-0.02622712217271328,
-0.32104480266571045,
0.1195833757519722,
0.34771475195884... |
func (c Config) GeneratedWarning() string {
return fmt.Sprintf("Code generated by %s. DO NOT EDIT.", c.GeneratedBy())
} | [
-1.0383591651916504,
0.44985029101371765,
0.5082352161407471,
0.38891640305519104,
-0.1591639667749405,
1.126941204071045,
0.5177934169769287,
-0.6660080552101135,
-0.7414166927337646,
-0.06837264448404312,
-0.6845600008964539,
0.47903215885162354,
0.6070242524147034,
0.10912265628576279,
... |
func mainfile() string {
if m := stack.Main(); m != nil {
return m.File
}
return ""
} | [
1.2270419597625732,
0.2893649637699127,
0.7296519875526428,
0.7698150277137756,
-0.5690276026725769,
0.5790380239486694,
0.6145433783531189,
0.7201735377311707,
-0.746009111404419,
0.10459497570991516,
1.3923784494400024,
-0.877659022808075,
-0.7815739512443542,
0.43362247943878174,
-0.4... |
func pkg() string {
if cwd, err := os.Getwd(); err == nil {
return filepath.Base(cwd)
}
return ""
} | [
-0.0859849750995636,
0.24306675791740417,
0.5596076250076294,
0.3108346462249756,
-0.004302544053643942,
0.7164826393127441,
1.1911383867263794,
-0.04689532518386841,
-0.05768292769789696,
-0.31893831491470337,
0.9308341145515442,
-0.670680820941925,
0.5758822560310364,
0.9788355827331543,... |
func checkFor100Percent(requestInfoObj requestInfo) bool {
var total float64
for i := 0; i < len(requestInfoObj.stockInfo_req); i++ {
total = total + requestInfoObj.stockInfo_req[i].sharePercent
}
if total == 100 {
return true
} else {
return false
}
} | [
-0.32137027382850647,
-0.47646740078926086,
0.8130663633346558,
0.18978065252304077,
0.17553409934043884,
0.5194170475006104,
-0.10355386137962341,
0.10382512211799622,
-0.7879729270935059,
0.13922560214996338,
0.20488345623016357,
-0.892179548740387,
-0.4020134210586548,
0.218609243631362... |
func generateTradeId() int {
r := rand.Intn(10000)
return r
} | [
0.34101760387420654,
0.4661487936973572,
0.44199132919311523,
-1.327268123626709,
1.1274062395095825,
0.25507667660713196,
0.2671056389808655,
0.8518971800804138,
1.2810766696929932,
0.5839191675186157,
-0.9679279327392578,
0.7383801341056824,
-0.8040861487388611,
0.7602081298828125,
-0.... |
func getAskForStock(stockName string, stockPrices map[string]float64) float64 {
ask, present := stockPrices[stockName]
if !present {
return -1
}
return ask
} | [
-0.9665971994400024,
0.03553098812699318,
0.4531914293766022,
0.6536252498626709,
-0.40823230147361755,
-0.6342248916625977,
-0.25125524401664734,
-0.3077419102191925,
-0.7529556155204773,
0.5507808327674866,
0.7218174934387207,
-0.02547352761030197,
0.3242820203304291,
0.23832327127456665... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.