text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func NewPostCustomersDefault(code int) *PostCustomersDefault {
return &PostCustomersDefault{
_statusCode: code,
}
} | [
-0.27760353684425354,
-0.11358117312192917,
-0.2281469851732254,
0.2002713829278946,
0.10663440078496933,
-0.6887218356132507,
-0.6417075991630554,
0.8354337215423584,
-0.9210482239723206,
0.24011610448360443,
-0.9335985779762268,
-0.43358638882637024,
-1.2645399570465088,
0.08351529389619... |
func (o *PostCustomersDefault) Code() int {
return o._statusCode
} | [
-0.16850562393665314,
-0.23673602938652039,
0.08399005979299545,
0.5774621367454529,
0.09399354457855225,
-0.3714606463909149,
-0.15642887353897095,
1.3661456108093262,
-1.018257737159729,
-0.11873063445091248,
-0.5172390937805176,
-0.5449017882347107,
-0.8224400281906128,
0.83462005853652... |
func NewIdentityGetAccessTokenRequest() *IdentityGetAccessTokenRequest {
this := IdentityGetAccessTokenRequest{}
var grantType string = "client_credentials"
this.GrantType = &grantType
return &this
} | [
-0.07502097636461258,
-0.7168543934822083,
0.45325472950935364,
0.612092137336731,
-0.14660389721393585,
-0.8215910792350769,
0.4314546287059784,
0.033603306859731674,
0.6233713030815125,
0.04933997243642807,
0.4698658883571625,
1.154632329940796,
-0.07414370030164719,
0.33880603313446045,... |
func NewIdentityGetAccessTokenRequestWithDefaults() *IdentityGetAccessTokenRequest {
this := IdentityGetAccessTokenRequest{}
var grantType string = "client_credentials"
this.GrantType = &grantType
return &this
} | [
0.24644748866558075,
-0.26183366775512695,
0.4102240204811096,
0.5795226097106934,
0.7277413010597229,
-0.7553319931030273,
-0.5674503445625305,
-0.44182732701301575,
0.6336043477058411,
-0.4614048898220062,
0.23476985096931458,
0.08746273815631866,
-0.35152125358581543,
0.2587066888809204... |
func (o *IdentityGetAccessTokenRequest) GetGrantType() string {
if o == nil || o.GrantType == nil {
var ret string
return ret
}
return *o.GrantType
} | [
0.8253641128540039,
0.7147123217582703,
0.380969762802124,
0.6632742285728455,
0.5516631007194519,
-0.7871803641319275,
0.3822079002857208,
-0.9097208380699158,
1.1517627239227295,
0.10988646745681763,
0.027212858200073242,
-0.6689460277557373,
-1.2565687894821167,
1.7519097328186035,
0.... |
func (o *IdentityGetAccessTokenRequest) GetGrantTypeOk() (*string, bool) {
if o == nil || o.GrantType == nil {
return nil, false
}
return o.GrantType, true
} | [
0.4701554477214813,
0.5717033743858337,
0.4753374755382538,
0.6663355827331543,
0.5120862722396851,
-0.16601713001728058,
0.7951729893684387,
-0.12578727304935455,
0.26889777183532715,
1.4096781015396118,
-0.6143519878387451,
-0.4938034415245056,
-0.5305984020233154,
1.3909498453140259,
... |
func (o *IdentityGetAccessTokenRequest) HasGrantType() bool {
if o != nil && o.GrantType != nil {
return true
}
return false
} | [
1.0805561542510986,
0.8083874583244324,
0.2929735481739044,
0.21898621320724487,
1.1336331367492676,
-1.691525936126709,
-0.1848846971988678,
-0.15483161807060242,
0.5032380223274231,
0.039685141295194626,
-0.4254146218299866,
-0.7153158783912659,
-0.2691974639892578,
2.0608136653900146,
... |
func (o *IdentityGetAccessTokenRequest) SetGrantType(v string) {
o.GrantType = &v
} | [
1.2227524518966675,
0.2478095442056656,
-0.2904723584651947,
0.07654034346342087,
0.04093543812632561,
-0.6158707141876221,
-0.49528923630714417,
-1.3666027784347534,
0.43095269799232483,
0.5611722469329834,
0.25002652406692505,
1.0987844467163086,
-0.5563176274299622,
0.6092473864555359,
... |
func (o *IdentityGetAccessTokenRequest) GetClientId() string {
if o == nil || o.ClientId == nil {
var ret string
return ret
}
return *o.ClientId
} | [
1.0599466562271118,
-0.08666268736124039,
0.19608798623085022,
0.45188042521476746,
0.11070527136325836,
0.2128579169511795,
0.7190871238708496,
-0.7071577310562134,
1.1704258918762207,
-0.043818920850753784,
0.5196219682693481,
-0.8264179825782776,
-0.42922767996788025,
0.7646780014038086... |
func (o *IdentityGetAccessTokenRequest) GetClientIdOk() (*string, bool) {
if o == nil || o.ClientId == nil {
return nil, false
}
return o.ClientId, true
} | [
0.26369422674179077,
0.06297557055950165,
0.24075613915920258,
0.2898014187812805,
0.43549829721450806,
0.3705640733242035,
0.984612226486206,
0.15299706161022186,
0.13428352773189545,
0.19884932041168213,
-0.5395021438598633,
-0.38283947110176086,
-0.3364434838294983,
0.2161220908164978,
... |
func (o *IdentityGetAccessTokenRequest) HasClientId() bool {
if o != nil && o.ClientId != nil {
return true
}
return false
} | [
0.8492282629013062,
-0.12315476685762405,
-0.01998213864862919,
-0.26072967052459717,
0.3929766118526459,
-0.07451959699392319,
0.010118696838617325,
0.006335769314318895,
0.6703284382820129,
0.1104741320014,
0.21865500509738922,
-0.12813298404216766,
-0.032379042357206345,
0.3534225523471... |
func (o *IdentityGetAccessTokenRequest) SetClientId(v string) {
o.ClientId = &v
} | [
1.2151092290878296,
-0.336556613445282,
-0.10963050276041031,
-0.37773361802101135,
-0.668525755405426,
0.3055700957775116,
-0.12234129011631012,
-1.1287325620651245,
0.38767439126968384,
0.7095851302146912,
0.656916081905365,
1.352173089981079,
-0.22331209480762482,
-0.6065467596054077,
... |
func (o *IdentityGetAccessTokenRequest) GetClientSecret() string {
if o == nil || o.ClientSecret == nil {
var ret string
return ret
}
return *o.ClientSecret
} | [
0.8681047558784485,
0.507564127445221,
-0.33868303894996643,
-0.2455766201019287,
0.13005608320236206,
-0.6731547713279724,
0.0076186987571418285,
-1.268836498260498,
-0.42749202251434326,
-0.9931104779243469,
-0.8818272352218628,
-1.6339060068130493,
-0.6608812212944031,
0.674823820590972... |
func (o *IdentityGetAccessTokenRequest) GetClientSecretOk() (*string, bool) {
if o == nil || o.ClientSecret == nil {
return nil, false
}
return o.ClientSecret, true
} | [
0.5266368985176086,
0.16070353984832764,
0.024534234777092934,
-0.03342978283762932,
0.17903485894203186,
-0.6752488017082214,
-0.06171798333525658,
-0.07749436795711517,
-0.5310618281364441,
-0.6618973016738892,
-1.8322762250900269,
-0.8188818693161011,
0.23792153596878052,
0.104100584983... |
func (o *IdentityGetAccessTokenRequest) HasClientSecret() bool {
if o != nil && o.ClientSecret != nil {
return true
}
return false
} | [
1.0106115341186523,
0.09646026045084,
-0.1921752244234085,
-0.7391434907913208,
0.8079426884651184,
-1.0276644229888916,
-0.6625372171401978,
-0.787722647190094,
-0.6640414595603943,
-1.319321632385254,
-1.646558403968811,
-1.4239858388900757,
0.28538885712623596,
0.6169912815093994,
-0.... |
func (o *IdentityGetAccessTokenRequest) SetClientSecret(v string) {
o.ClientSecret = &v
} | [
1.368560552597046,
-0.014808970503509045,
-0.5885107517242432,
-1.3809661865234375,
-0.3809777498245239,
-0.4169521927833557,
-0.5924242734909058,
-1.8346037864685059,
-0.9110053181648254,
-0.5503135323524475,
-0.7037721276283264,
0.1906120479106903,
-0.4180293381214142,
-0.735212028026580... |
func RunKubeExec(log *LoggingConfig, args []string, dryrun bool) (string, error) {
log.Info.log("Attempting to get resource from Kubernetes ...")
kargs := []string{"exec"}
kargs = append(kargs, args...)
return RunKube(log, kargs, dryrun)
} | [
-0.3628654479980469,
0.050501398742198944,
0.6076694130897522,
0.655480146408081,
-0.22250261902809143,
0.08110197633504868,
-0.8891193270683289,
-0.07499483227729797,
-0.6273661255836487,
0.49973878264427185,
0.29459521174430847,
0.25801533460617065,
-0.5591810941696167,
0.401117146015167... |
func RunKubeGet(log *LoggingConfig, args []string, dryrun bool) (string, error) {
log.Info.log("Attempting to get resource from Kubernetes ...")
kargs := []string{"get"}
kargs = append(kargs, args...)
return RunKube(log, kargs, dryrun)
} | [
-1.2156591415405273,
0.046669404953718185,
0.6344069242477417,
-0.14221934974193573,
-0.10439535230398178,
-0.27196070551872253,
-0.7483479380607605,
-0.26270389556884766,
-0.8433055877685547,
0.14273664355278015,
0.4728762209415436,
0.7112371325492859,
-0.9971151351928711,
0.2204555422067... |
func RunKubeDelete(log *LoggingConfig, args []string, dryrun bool) (string, error) {
log.Info.log("Attempting to delete resource from Kubernetes ...")
kargs := []string{"delete"}
kargs = append(kargs, args...)
return RunKube(log, kargs, dryrun)
} | [
-0.6269853711128235,
0.015274292789399624,
0.564256489276886,
0.49951934814453125,
0.05169239267706871,
0.034757740795612335,
-0.3652273416519165,
-0.001057927613146603,
-0.23719944059848785,
0.31794023513793945,
0.5811051726341248,
0.30294269323349,
-1.283844232559204,
0.5098053216934204,... |
func RunKube(log *LoggingConfig, kargs []string, dryrun bool) (string, error) {
kcmd := "kubectl"
if dryrun {
log.Info.log("Dry run - skipping execution of: ", kcmd, " ", ArgsToString(kargs))
return "", nil
}
log.Info.log("Running command: ", kcmd, " ", ArgsToString(kargs))
execCmd := exec.Command(kcmd, kargs.... | [
-0.7830090522766113,
-0.018458619713783264,
0.961686909198761,
0.2946077287197113,
-0.6372915506362915,
0.18494084477424622,
-0.6474132537841797,
-0.1869163066148758,
-0.8773594498634338,
0.35624805092811584,
0.8445848822593689,
0.27098557353019714,
-1.1546393632888794,
0.2550993263721466,... |
func operatorExistsWithWatchspace(log *LoggingConfig, watchNamespace string, dryrun bool, noOperatorCheck bool) (bool, string, error) {
log.Debug.log("Looking for an operator matching watchspace: ", watchNamespace)
var namespacesWithOperatorsGetArgs []string
if noOperatorCheck {
namespacesWithOperatorsGetArgs = []... | [
-0.1922193169593811,
-0.15936419367790222,
0.7247252464294434,
0.042342379689216614,
-0.4723726511001587,
-0.40472379326820374,
-0.4209699034690857,
-0.16837173700332642,
0.4914379119873047,
0.7088685631752014,
-0.11308392882347107,
0.28718695044517517,
0.4770948886871338,
1.45504188537597... |
func getWatchSpaces(csvList string, dryrun bool) []string {
if csvList == "" {
return nil
}
// split the string and clean up any issues
watchList := strings.Split(csvList, ",")
for index := range watchList {
watchList[index] = strings.Trim(watchList[index], " '’\n")
}
return watchList
} | [
0.43600332736968994,
-0.21723811328411102,
0.42145082354545593,
0.4945662021636963,
-0.23308348655700684,
0.3829880952835083,
-0.6130977869033813,
0.1079331636428833,
0.6156312823295593,
0.3377783000469208,
-0.3911721706390381,
1.1885371208190918,
-0.9175885915756226,
0.8504294157028198,
... |
func ListOfStory(ctx context.Context, client streamexp.ReadMyStoryServiceClient) error {
stream, err := client.ListOfStory(ctx, &streamexp.RequestReadStory{Course: "GO"})
if err != nil {
log.Fatalf("%v.GetFeatures(_) = _, %v: ", client, err)
}
for {
course, err := stream.Recv()
if err == io.EOF {
break
}... | [
0.5411849617958069,
-0.5429534912109375,
0.4769514501094818,
0.23857510089874268,
0.7597814202308655,
-0.4504087269306183,
-0.3548196852207184,
-1.0133968591690063,
-0.2976734936237335,
0.2702973783016205,
0.5104672312736511,
0.840149462223053,
0.47568410634994507,
0.4259370267391205,
-0... |
func StoryStatus(ctx context.Context, client streamexp.ReadMyStoryServiceClient) error {
stream, err := client.StoryStatus(ctx)
courseList := []string{"GO", "Java", "HTML", "Mule"}
for _, crs := range courseList {
log.Println("CRS::::", crs)
if err := stream.Send(&streamexp.RequestReadStory{Course: crs}); err ... | [
-0.1381748765707016,
-0.5387035012245178,
0.6054621338844299,
0.24708479642868042,
0.09160961210727692,
0.2296740561723709,
0.020804887637495995,
-0.2969505786895752,
-0.8246245384216309,
0.5804163813591003,
-0.24827887117862701,
0.7646282911300659,
0.209018737077713,
0.324672669172287,
... |
func FullStory(ctx context.Context, client streamexp.ReadMyStoryServiceClient) error {
} | [
1.0718265771865845,
-0.12944230437278748,
0.46856528520584106,
1.3870059251785278,
-0.5376548767089844,
-0.5830904245376587,
0.1614358276128769,
-0.43802130222320557,
0.30500149726867676,
-0.7773183584213257,
0.1943565160036087,
0.9995094537734985,
-0.34275752305984497,
0.2950991988182068,... |
func DecodeConfig(schemaName string, schema spec.Schema) (*XDBConfig, error) {
var config *XDBConfig
for k, v := range schema.VendorExtensible.Extensions {
switch k {
case xdbExtensionKey:
bs, _ := json.Marshal(v)
if err := json.Unmarshal(bs, &config); err != nil {
return nil, err
}
break
}
}
... | [
-0.1294991374015808,
0.1817774474620819,
0.670316755771637,
0.38351020216941833,
-0.7666333317756653,
-0.8775359392166138,
-0.7611643671989441,
1.2627184391021729,
0.14633172750473022,
1.1781350374221802,
-0.615989625453949,
0.10018595308065414,
-0.4254084825515747,
0.38255396485328674,
... |
func GenerateDB(packageName string, s *spec.Swagger, serviceName string, paths *spec.Paths) error {
var xdbConfigs []XDBConfig
for schemaName, schema := range s.Definitions {
if config, err := DecodeConfig(schemaName, schema); err != nil {
return err
} else if config != nil {
xdbConfigs = append(xdbConfigs,... | [
-0.3499257564544678,
0.33293992280960083,
0.9871572852134705,
0.4115927815437317,
0.4016536772251129,
-0.2326498180627823,
0.6899527311325073,
0.4592869281768799,
-0.458088755607605,
-0.2608036696910858,
-0.2638034224510193,
-0.610219419002533,
0.18960893154144287,
0.33023425936698914,
0... |
func (s *EventSuite) TestDeleteEvent_WrongID(c *C) {
accounts := CorrectDeploy(1, 0, 1, 1, 1, true, true)
application := accounts[0].Applications[0]
user := application.Users[0]
event := user.Events[0]
routeName := "deleteCurrentUserEvent"
route := getComposedRoute(routeName, event.ID+1)
code, _, err := runRequ... | [
0.4893698990345001,
-0.7270826697349548,
0.6589603424072266,
1.1264935731887817,
0.3241775333881378,
1.0665867328643799,
0.4712446331977844,
0.31590551137924194,
0.2115813046693802,
0.2432657927274704,
0.017360225319862366,
0.31607332825660706,
-0.3361806869506836,
0.4689134955406189,
1.... |
func WrapConnector(dc driver.Connector, t *zipkin.Tracer, options ...TraceOption) driver.Connector {
opts := TraceOptions{}
for _, o := range options {
o(&opts)
}
return &zDriver{
parent: dc.Driver(),
connector: dc,
tracer: t,
options: opts,
}
} | [
-0.5308619737625122,
-0.6432242393493652,
0.43978819251060486,
-0.11247481405735016,
-0.42266136407852173,
-0.114968441426754,
0.252195805311203,
0.033609747886657715,
0.9022183418273926,
-0.09630593657493591,
0.8666306138038635,
-0.1648331880569458,
0.16707336902618408,
0.1361271888017654... |
func (eb *EBlock) Get(c *Client) error {
// If the EBlock is already populated then there is nothing to do.
if eb.IsPopulated() {
return nil
}
// If we don't have a KeyMR, fetch the chain head KeyMR.
if eb.KeyMR == nil {
// If the KeyMR and ChainID are both nil we have nothing to
// query for.
if eb.Chain... | [
-0.11837460845708847,
0.3517310321331024,
0.8336727619171143,
-0.20974673330783844,
0.5249225497245789,
-0.2267884761095047,
-0.48562026023864746,
-0.5477152466773987,
-0.5966663360595703,
0.19007070362567902,
0.18239940702915192,
1.2868361473083496,
-0.8962053656578064,
1.1840386390686035... |
func (eb *EBlock) GetChainHead(c *Client) error {
params := eb
result := struct {
KeyMR *Bytes32 `json:"chainhead"`
ChainInProcessList bool `json:"chaininprocesslist"`
}{}
if err := c.FactomdRequest("chain-head", params, &result); err != nil {
return err
}
var zero Bytes32
if *result.KeyMR... | [
-0.7291887998580933,
0.16870884597301483,
0.9141237735748291,
0.4195137917995453,
0.6804720759391785,
0.2467714548110962,
-0.36943596601486206,
-0.6014440059661865,
-0.5616663694381714,
0.44992345571517944,
-0.4036383628845215,
1.9633183479309082,
-1.6456509828567505,
0.7331488728523254,
... |
func (eb EBlock) IsFirst() bool {
return eb.IsPopulated() && *eb.PrevKeyMR == zeroBytes32
} | [
0.2073352336883545,
-0.05800681933760643,
0.5376334190368652,
0.7854214906692505,
0.5344771146774292,
-0.2139153778553009,
-0.01700627990067005,
-0.06609921902418137,
0.5527955889701843,
0.3302827477455139,
-0.5969314575195312,
0.4284262955188751,
-0.6811330914497375,
1.9322147369384766,
... |
func (eb EBlock) Prev() EBlock {
if eb.IsFirst() {
return eb
}
return EBlock{ChainID: eb.ChainID, KeyMR: eb.PrevKeyMR}
} | [
0.7239149808883667,
0.24816101789474487,
0.8743799924850464,
0.494449257850647,
0.2856958508491516,
-0.398002028465271,
0.27632954716682434,
0.06740809977054596,
0.12404821813106537,
0.31039416790008545,
-0.027313442900776863,
0.295879989862442,
-1.1885265111923218,
0.9107704758644104,
-... |
func (eb EBlock) GetAllPrev(c *Client) ([]EBlock, error) {
ebs := []EBlock{eb}
for ; !ebs[0].IsFirst(); ebs = append([]EBlock{ebs[0].Prev()}, ebs...) {
if err := ebs[0].Get(c); err != nil {
return nil, err
}
}
return ebs, nil
} | [
0.3378570079803467,
0.03439367190003395,
1.280480980873108,
0.947540819644928,
0.05312206968665123,
-0.03875122219324112,
-0.45706501603126526,
0.027443159371614456,
0.024606753140687943,
0.572051465511322,
-0.5654065608978271,
0.9067702889442444,
-0.7308220863342285,
1.2613277435302734,
... |
func (eb *EBlock) GetFirst(c *Client) error {
for ; !eb.IsFirst(); *eb = eb.Prev() {
if err := eb.Get(c); err != nil {
return err
}
}
return nil
} | [
0.7464955449104309,
0.960373044013977,
0.8112773895263672,
0.5303851366043091,
1.5181820392608643,
-0.506029486656189,
0.1416338086128235,
-0.8248992562294006,
-0.8115277886390686,
0.4877062439918518,
-0.10639950633049011,
0.9369922280311584,
-0.5802598595619202,
1.5578221082687378,
-0.0... |
func (eb *EBlock) UnmarshalBinary(data []byte) error {
if len(data) < EBlockMinTotalLen {
return fmt.Errorf("insufficient length")
}
if len(data) > EBlockMaxTotalLen {
return fmt.Errorf("invalid length")
}
if eb.ChainID == nil {
eb.ChainID = new(Bytes32)
}
eb.ChainID = eb.ChainID
i := copy(eb.ChainID[:], ... | [
-0.06245865300297737,
-0.34211814403533936,
1.5250385999679565,
-0.797556459903717,
-0.05396021530032158,
-0.2927362322807312,
0.15889956057071686,
-0.8576726913452148,
-0.1330663412809372,
0.4329530894756317,
-0.7547624111175537,
0.22951342165470123,
-0.4602149724960327,
0.132938578724861... |
func (blockchainIterator *ZmeyChainIterator) Next() Interface.Block {
var block *ZmeyCoinBlock
err := blockchainIterator.db.View(func(Txn *badger.Txn) error {
item, err := Txn.Get(*blockchainIterator.cursorBlockHash)
if err != nil {
return err
}
var encodedBlock []byte
encodedBlock, err = item.Value()
... | [
0.14071378111839294,
0.0889560654759407,
0.46750426292419434,
0.10950274020433426,
-1.3051458597183228,
-0.46360498666763306,
-0.08819445967674255,
-0.5081666707992554,
0.0695737972855568,
0.0846531093120575,
0.014708488248288631,
0.4373389184474945,
-1.462246298789978,
-0.0453042536973953... |
func (a ByKey) Len() int { return len(a) } | [
-0.0997324213385582,
0.06119384244084358,
0.1288095861673355,
-0.6714997887611389,
0.07080986350774765,
-0.9430528283119202,
1.7385286092758179,
1.5612518787384033,
-0.014782571233808994,
0.33999282121658325,
-1.0902020931243896,
0.486432284116745,
0.4681720733642578,
-0.02599055878818035,... |
func ihash(key string) int {
h := fnv.New32a()
h.Write([]byte(key))
return int(h.Sum32() & 0x7fffffff) % 10
} | [
-0.48418816924095154,
0.7091435194015503,
0.8296131491661072,
-0.3653327226638794,
-0.3925611674785614,
0.5314576625823975,
0.245001882314682,
0.0866483673453331,
-0.3583460748195648,
0.3771854043006897,
-0.7081263065338135,
0.20517598092556,
-1.213828206062317,
-0.32216784358024597,
0.7... |
func Worker(mapf func(string, string) []KeyValue,
reducef func(string, []string) string) {
for {
job := askCoordinatorForJob()
switch typeAssertedJob := (*job).(type) {
case MapJob:
executeMapFunction(mapf, typeAssertedJob)
case ReduceJob:
executeReduceFunction(reducef, typeAssertedJob)
default:... | [
-0.9526920914649963,
-0.020958084613084793,
0.49595245718955994,
0.37683385610580444,
0.23241925239562988,
-0.01675371453166008,
0.1603013426065445,
-0.19012293219566345,
-0.8262884616851807,
-0.13237302005290985,
-0.43467554450035095,
0.007198062725365162,
0.1475219577550888,
0.5144463181... |
func call(rpcname string, args interface{}, reply interface{}) bool {
gob.Register(MapJob{})
gob.Register(ReduceJob{})
sockname := coordinatorSock()
c, err := rpc.DialHTTP("unix", sockname)
if err != nil {
log.Fatal("dialing:", err)
}
defer c.Close()
err = c.Call(rpcname, args, reply)
if err == nil {
retu... | [
-0.24327035248279572,
0.9751701951026917,
1.0656940937042236,
-0.23455215990543365,
0.24758389592170715,
1.3370739221572876,
-1.470700979232788,
-0.1776515543460846,
-0.6039152145385742,
0.034365445375442505,
0.25233393907546997,
-0.426691472530365,
-1.5000532865524292,
-0.2065958529710769... |
func NewConfig() *Config {
conf := new(Config)
conf.Agent = "http://127.0.0.1:8080"
return conf
} | [
0.4973427653312683,
-0.7197991609573364,
0.25490033626556396,
0.3325425386428833,
-0.5079953074455261,
-0.20431587100028992,
-0.6261722445487976,
0.7956897616386414,
-0.17181465029716492,
-0.11418764293193817,
-0.4350045323371887,
0.2250155806541443,
0.19979333877563477,
0.4538856446743011... |
func GetConfig() (*Config, error) {
conf := new(Config)
var agent, ifaces, configfile string
flag.StringVarP(&agent, "agent", "a", "", "Agent address")
flag.StringVarP(&ifaces, "interfaces", "i", "", "Interfaces to listen on, comma-separated (default: all)")
flag.StringVarP(&configfile, "config-file", "c", "", "... | [
0.9402071237564087,
-0.22461643815040588,
0.6239191293716431,
0.046799130737781525,
0.61822110414505,
0.04963395372033119,
0.17224515974521637,
0.5925012230873108,
-0.7262017130851746,
-0.061626967042684555,
0.03564360365271568,
-0.1796756088733673,
-0.3515014350414276,
0.49914148449897766... |
func (conf *Config) ParseConfigFile(path string) error {
data, err := ioutil.ReadFile(path)
if err != nil {
return err
}
if err := json.Unmarshal(data, &conf); err != nil {
return err
}
log.WithFields(log.Fields{
"config": conf,
}).Info("Config file parsed")
return nil
} | [
-0.03959659859538078,
-0.014681669883430004,
0.3757259249687195,
-0.783165693283081,
-0.12499449402093887,
0.2781100273132324,
0.42579448223114014,
0.406369149684906,
-1.6455000638961792,
1.0153343677520752,
-1.0032525062561035,
-0.7151291370391846,
0.1333504170179367,
0.7399875521659851,
... |
func DisplayAggregatorStatistic() {
fmt.Println(colorizer.Magenta("Aggregator statistic"))
analyser.PrintAggregatorStatistic(colorizer)
} | [
0.4213104546070099,
-0.06203458085656166,
0.5135493278503418,
-0.08305869996547699,
0.06200460344552994,
0.46836501359939575,
0.7329023480415344,
-0.15483300387859344,
-0.8081461787223816,
0.4095436930656433,
1.0543713569641113,
0.9773421883583069,
0.9025653600692749,
0.542157769203186,
... |
func DisplayAggregatorLogs() {
fmt.Println(colorizer.Magenta("Aggregator logs"))
fmt.Println(colorizer.Cyan("1."), "consumed but not read")
fmt.Println(colorizer.Cyan("2."), "read but not whitelisted")
fmt.Println(colorizer.Cyan("3."), "whitelisted but not marshalled")
fmt.Println(colorizer.Cyan("4."), "marshalled... | [
-0.07274889945983887,
-0.46386075019836426,
0.9063251614570618,
-0.3104437589645386,
-0.027962123975157738,
0.4302317798137665,
1.0305418968200684,
-0.7238845229148865,
0.07998963445425034,
0.44346171617507935,
1.0674856901168823,
1.0506318807601929,
0.050468433648347855,
0.699187636375427... |
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
} | [
0.25708064436912537,
-1.2911276817321777,
-0.15975941717624664,
-1.1987494230270386,
-0.7055332064628601,
0.14473751187324524,
0.16492673754692078,
-0.7642391324043274,
-0.964878261089325,
-0.4666050374507904,
-0.13648737967014313,
0.7510700225830078,
0.052431024610996246,
0.66191029548645... |
func (a *Client) CreateChannelListings(params *CreateChannelListingsParams, authInfo runtime.ClientAuthInfoWriter) (*CreateChannelListingsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewCreateChannelListingsParams()
}
result, err := a.transport.Submit(&runtime.ClientOperat... | [
-1.6078225374221802,
0.02338613197207451,
0.5526373386383057,
-0.4183461368083954,
-0.16544045507907867,
0.1366109400987625,
0.2235884964466095,
-0.275391548871994,
-0.10013033449649811,
0.4020261764526367,
-0.24518661201000214,
0.9339789152145386,
-1.537071943283081,
-0.05670766904950142,... |
func (a *Client) GetChannelListing(params *GetChannelListingParams, authInfo runtime.ClientAuthInfoWriter) (*GetChannelListingOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetChannelListingParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: ... | [
-1.3210698366165161,
0.08367646485567093,
0.8287410140037537,
-0.04999963939189911,
-0.004051105584949255,
-0.6658754944801331,
-0.02403571642935276,
0.12548518180847168,
0.002907002344727516,
0.43739140033721924,
0.17775581777095795,
1.6447337865829468,
-1.0496721267700195,
-0.29327422380... |
func (a *Client) ListChannelListings(params *ListChannelListingsParams, authInfo runtime.ClientAuthInfoWriter) (*ListChannelListingsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewListChannelListingsParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
I... | [
-1.642254114151001,
0.08153168857097626,
0.6876713633537292,
-0.3834998309612274,
-0.41768988966941833,
-0.3839224576950073,
-0.010416587814688683,
-0.08349359780550003,
0.09786020219326019,
0.5472343564033508,
-0.11248937994241714,
1.2717618942260742,
-1.2947583198547363,
0.02488849684596... |
func (a *Client) UpdateChannelListings(params *UpdateChannelListingsParams, authInfo runtime.ClientAuthInfoWriter) (*UpdateChannelListingsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewUpdateChannelListingsParams()
}
result, err := a.transport.Submit(&runtime.ClientOperat... | [
-2.087815046310425,
-0.49937668442726135,
0.544901430606842,
-0.30121392011642456,
-0.7144885063171387,
-0.12735049426555634,
0.4269532263278961,
0.12022425979375839,
-0.14065472781658173,
0.8565781712532043,
-0.20107421278953552,
1.1609481573104858,
-1.6889222860336304,
-0.350724965333938... |
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
} | [
0.43289124965667725,
-0.16396044194698334,
0.06502870470285416,
0.17467869818210602,
-0.022012455388903618,
0.3327627182006836,
1.1535402536392212,
-0.7375835180282593,
0.32833772897720337,
-1.0833802223205566,
-1.4707483053207397,
0.4919946491718292,
-0.44076064229011536,
0.62663459777832... |
func getOTP(seed string, digits int, algorithm string, skew uint, period uint) string {
algo := getOTPAlgorithm(strings.ToLower(algorithm))
opts := totp.ValidateOpts{
Algorithm: algo,
Digits: otp.Digits(digits),
Skew: skew,
Period: period,
}
pass, err := totp.GenerateCodeCustom(seed, time.Now().... | [
0.2017444372177124,
0.3515050709247589,
0.6636987924575806,
0.19415563344955444,
-0.4375145137310028,
-0.2750224173069,
-0.43240731954574585,
-0.39112618565559387,
0.570430338382721,
0.8075270652770996,
1.0049419403076172,
0.25869056582450867,
-0.18485787510871887,
-0.6753194332122803,
0... |
func IsFile(f string) bool {
fi, e := os.Stat(f)
if e != nil {
return false
}
return !fi.IsDir()
} | [
-0.05578991398215294,
0.640942394733429,
0.3409782350063324,
0.9901406168937683,
0.1944025605916977,
0.46227017045021057,
0.7695093154907227,
0.2565770447254181,
0.10555391758680344,
-1.1071841716766357,
0.2717265784740448,
-0.6543052792549133,
-0.19015534222126007,
0.596210241317749,
-2... |
func RegisterDefaultAuth(a auth.Authenticator) {
if a == nil {
panic("a is nil")
}
defaultAuth.Lock()
defer defaultAuth.Unlock()
if defaultAuth.Authenticator != nil {
panic("default prpc authenticator is already set")
}
defaultAuth.Authenticator = a
} | [
-1.047585129737854,
1.091532826423645,
0.17773224413394928,
1.0260615348815918,
0.7605870962142944,
0.04847140237689018,
0.16658782958984375,
-0.0645880401134491,
0.813854992389679,
0.09712248295545578,
-0.852679431438446,
0.12591713666915894,
-0.891577959060669,
0.6869602799415588,
0.29... |
func GetDefaultAuth() auth.Authenticator {
defaultAuth.RLock()
defer defaultAuth.RUnlock()
return defaultAuth.Authenticator
} | [
-0.1562642902135849,
0.20356369018554688,
0.15164245665073395,
1.4680521488189697,
0.09255443513393402,
-0.10307782143354416,
0.7071354985237122,
-0.277525931596756,
0.466925710439682,
-0.9699999690055847,
0.0558570958673954,
0.23343519866466522,
-1.324295997619629,
-0.0768446996808052,
... |
func RegisterContentGeneratorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ContentGeneratorServiceServer) error {
mux.Handle("POST", pattern_ContentGeneratorService_FetchNativeData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
err := status.Error(codes.U... | [
-0.5734724998474121,
0.2988814115524292,
0.864797830581665,
0.0030066866893321276,
-0.21603232622146606,
0.37464356422424316,
0.473818838596344,
-0.48139089345932007,
-1.1190646886825562,
-0.5214323401451111,
-0.3102782666683197,
0.7382587790489197,
-0.6432387828826904,
1.122933030128479,
... |
func RegisterContentGeneratorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.I... | [
-0.31279608607292175,
-0.36106958985328674,
0.7597803473472595,
0.5883205533027649,
-0.36421096324920654,
0.32516181468963623,
-0.05598786100745201,
-0.7061618566513062,
-0.9975103735923767,
-0.1362343281507492,
0.3468484580516815,
-0.2956826388835907,
-0.964137077331543,
-0.30564260482788... |
func RegisterContentGeneratorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterContentGeneratorServiceHandlerClient(ctx, mux, NewContentGeneratorServiceClient(conn))
} | [
-0.7846081256866455,
0.07019788026809692,
0.3819054961204529,
0.07594189047813416,
-0.25254005193710327,
0.435779333114624,
0.6200057864189148,
-0.04467521980404854,
-1.5707439184188843,
-0.783722996711731,
-0.09622987359762192,
0.43217769265174866,
-0.8927077651023865,
0.4462977647781372,... |
func RegisterContentGeneratorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ContentGeneratorServiceClient) error {
mux.Handle("POST", pattern_ContentGeneratorService_FetchNativeData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.With... | [
-0.4103054702281952,
0.1609186828136444,
0.7408263683319092,
-0.23167094588279724,
-0.4976276457309723,
0.5680831670761108,
0.4633149802684784,
-0.8547715544700623,
-1.2872774600982666,
-0.42585209012031555,
-0.22176338732242584,
0.9054123759269714,
-0.24392473697662354,
0.7242081761360168... |
func Routes(router *gin.RouterGroup, dsConf *dsnet.DsnetConfig) {
conf = dsConf
router.POST("", handleNewPeer)
router.DELETE("/:hostname", handleRemovePeer)
} | [
-0.4101162850856781,
0.5363065600395203,
0.07397953420877457,
-0.12025044113397598,
0.28191566467285156,
-0.4015920162200928,
-0.04958029463887215,
0.9652343988418579,
-0.6200857162475586,
-0.38624173402786255,
-0.7695440053939819,
-0.31754446029663086,
0.18741092085838318,
0.6970714926719... |
func NewClient(config *config.Config) *Client {
client := &Client{
Config: config,
elbv2Svc: map[string]*elbv2.ELBV2{},
ecsSvc: map[string]*ecs.ECS{},
}
for service := range config.Services {
session := session.New(&aws.Config{
Region: aws.String(config.GetRegion(service)),
})
client.elbv2Svc[se... | [
-0.22462816536426544,
-0.5586686730384827,
0.37681856751441956,
-0.809144139289856,
-0.36834168434143066,
0.8586640357971191,
-0.0410890057682991,
-0.8400596380233765,
0.17422617971897125,
0.06330350041389465,
-0.1296692192554474,
0.25400352478027344,
0.9383844137191772,
-0.447658807039260... |
func New(middlewares ...Middleware) Chain {
return Chain(middlewares)
} | [
-0.5365898609161377,
-0.7280586361885071,
0.01944522187113762,
1.2244964838027954,
-0.341796338558197,
0.4510621726512909,
-0.7311059832572937,
0.013955546543002129,
-0.06058782711625099,
-0.4013763964176178,
-0.6506797075271606,
0.5278819799423218,
-0.2718752920627594,
1.318588137626648,
... |
func (c Chain) Wrap(handler http.Handler) http.Handler {
for i := len(c) - 1; i >= 0; i-- {
handler = c[i](handler)
}
return handler
} | [
-0.9259306788444519,
0.06479980051517487,
0.24173061549663544,
0.5302466750144958,
0.2717246115207672,
0.48389577865600586,
-0.4104388952255249,
-0.8047985434532166,
-0.4753257930278778,
0.02483205683529377,
0.31442195177078247,
0.8938722014427185,
-0.3794328272342682,
0.5635935068130493,
... |
func (c Chain) WrapFunc(handlerFunc HandlerFunc) http.Handler {
return c.Wrap(http.HandlerFunc(handlerFunc))
} | [
0.23173779249191284,
-0.3082348108291626,
0.0982440784573555,
-0.3087123930454254,
-0.5417698621749878,
0.3247540593147278,
0.20353269577026367,
0.4264298975467682,
-0.5249190330505371,
-0.3845594525337219,
0.15208980441093445,
1.0156502723693848,
1.8212729692459106,
-0.19002903997898102,
... |
func Compare(t *testing.T, got, expected string) {
CompareCallDepth(t, got, expected, 2)
} | [
0.22944916784763336,
0.16471320390701294,
0.2462366372346878,
-0.08074203133583069,
-0.21442030370235443,
0.4855324327945709,
-0.294572114944458,
-0.5832932591438293,
-0.18903248012065887,
-0.38271430134773254,
-0.02140139788389206,
0.959438145160675,
-0.20308917760849,
1.124648928642273,
... |
func CompareV(t *testing.T, got, expected string) {
CompareCallDepth(t, got, expected, 2)
var min int
if len(got) > len(expected) {
min = len(expected)
} else {
min = len(got)
}
for i := 0; i < min; i++ {
// fmt.Sprintf("'%s' == '%s'\n", string(got[i]), string(expected[i]))
if got[i] != expected[i] {
... | [
0.18421582877635956,
-0.7590137720108032,
0.6323074698448181,
-0.4400470554828644,
0.05866146832704544,
0.029400847852230072,
-0.32263198494911194,
-0.44334277510643005,
0.42968037724494934,
-0.11600256711244583,
-0.20847949385643005,
1.6580721139907837,
-0.38513532280921936,
0.16536676883... |
func CompareOutput(t *testing.T, expected string, f func()) {
stdout, stderr := os.Stdout, os.Stderr
r, w, err := os.Pipe()
if err != nil {
t.Error(err)
}
os.Stdout = w
os.Stderr = w
f()
w.Close()
var buf bytes.Buffer
io.Copy(&buf, r)
os.Stdout, os.Stderr = stdout, stderr
CompareCallDepth(t, buf.String(... | [
1.185964822769165,
-0.5974155068397522,
0.6978697180747986,
-0.2583933472633362,
-0.3717217445373535,
-0.40834519267082214,
0.9255016446113586,
-0.36961469054222107,
-0.06669449806213379,
-0.5582113862037659,
0.46985602378845215,
0.16821493208408356,
0.37002015113830566,
0.2870654761791229... |
func CaptureOutput(f func()) (*bytes.Buffer, error) {
stdout, stderr := os.Stdout, os.Stderr
r, w, err := os.Pipe()
os.Stdout = w
os.Stderr = w
f()
err = errs.Pair(err, w.Close())
if err != nil {
return nil, err
}
buf := new(bytes.Buffer)
_, err = io.Copy(buf, r)
if err != nil {
return nil, err
}
os.St... | [
0.8373299837112427,
-0.5977962017059326,
0.8358626961708069,
0.3856353759765625,
-0.8299823999404907,
-0.5703227519989014,
0.7786321043968201,
-0.5549987554550171,
0.3909648656845093,
-0.45419326424598694,
-0.04018145427107811,
-0.2424565702676773,
1.0415539741516113,
0.11940302699804306,
... |
func CompareCallDepth(t *testing.T, got, exp string, depth int) {
got = strings.Replace(got, " ", "_", -1)
exp = strings.Replace(exp, " ", "_", -1)
msg := fmt.Sprintf("wrong output!\n\ngot:\n'%s'\nexpected:\n'%s'\n", got, exp)
if got != exp {
_, file, line, ok := runtime.Caller(depth)
if ok && depth > 0 {
ms... | [
0.15425749123096466,
-0.36131036281585693,
0.7473843693733215,
-1.337035894393921,
-0.028829555958509445,
0.5986995100975037,
-0.1689879298210144,
-1.0159929990768433,
0.025588657706975937,
-0.4199369251728058,
-0.08973371982574463,
0.9691941142082214,
-0.8459410071372986,
1.60740184783935... |
func InitHelpers(t *testing.T) {
initHelpers(t)
} | [
0.716551661491394,
0.30981960892677307,
0.4591866433620453,
0.7234759330749512,
0.8666701316833496,
0.4622737765312195,
0.7228488922119141,
-0.18589548766613007,
-0.33341464400291443,
0.597025454044342,
-1.1293022632598877,
-0.3150879740715027,
-0.3270721435546875,
0.7989652156829834,
-0... |
func ResetHelpers() {
currentTest = nil
} | [
0.6341644525527954,
-0.504019021987915,
-0.07279326766729355,
0.3096805512905121,
1.5277807712554932,
0.13067808747291565,
0.9785990715026855,
-0.5498953461647034,
-0.25845998525619507,
0.6237723231315613,
0.7058084011077881,
0.2866098880767822,
-1.6139190196990967,
-0.17553333938121796,
... |
func Check(err error) {
nilcheck()
currentTest.t.Helper()
if err != nil {
if PrintErrType {
currentTest.t.Errorf("%T %v\n", err, err)
} else {
currentTest.t.Errorf("%v\n", err)
}
}
} | [
0.056715499609708786,
-0.6305004954338074,
0.34225958585739136,
0.3200424611568451,
0.29099103808403015,
0.10573386400938034,
0.2056378275156021,
0.03266904503107071,
0.1856728047132492,
0.4398367404937744,
1.3883121013641357,
0.985589861869812,
-0.4105343520641327,
1.8354374170303345,
0... |
func Exp(err error, vs ...interface{}) {
nilcheck()
currentTest.t.Helper()
if err == nil {
if len(vs) > 0 {
msg := []interface{}{"expected an error; "}
msg = append(msg, vs...)
currentTest.t.Error(msg...)
} else {
currentTest.t.Error("expected an error; got <nil>")
}
}
} | [
0.6021379828453064,
0.3514465093612671,
0.3954506516456604,
0.49048805236816406,
0.28685247898101807,
-0.02762131206691265,
0.0019460907205939293,
0.3580773174762726,
0.8793705701828003,
0.06676400452852249,
0.5903370380401611,
0.237016960978508,
-0.12658566236495972,
1.2287895679473877,
... |
func Fatal(err error) {
nilcheck()
currentTest.t.Helper()
if err != nil {
currentTest.t.Fatal(err)
}
} | [
1.1000710725784302,
-0.4302995502948761,
0.2244943380355835,
1.3307912349700928,
0.6591039299964905,
0.4565422236919403,
0.5822130441665649,
0.7216135263442993,
0.6312098503112793,
0.05345393717288971,
1.1815944910049438,
0.4100537896156311,
0.037050724029541016,
1.3239420652389526,
0.50... |
func StrEq(a, b string, fmt string, vs ...interface{}) {
nilcheck()
currentTest.t.Helper()
if a != b {
currentTest.t.Errorf(fmt+"\n", vs...)
}
} | [
0.04969073459506035,
-0.6413355469703674,
0.6753969192504883,
0.5309872627258301,
0.5839146375656128,
-0.43372148275375366,
0.23725415766239166,
-0.13832052052021027,
-0.25201416015625,
-0.2979012131690979,
0.06743541359901428,
0.6991811394691467,
0.19341988861560822,
-0.015314825810492039... |
func NotNil(v interface{}) {
nilcheck()
currentTest.t.Helper()
if _, ok := v.(error); ok {
currentTest.t.Log("tests warning: NotNil should not be used to check errors, it will call t.Fatal()")
}
if v == nil {
currentTest.t.Fatalf("%T should not be nil\n", v)
}
} | [
0.5792005658149719,
0.10633973032236099,
0.5505739450454712,
0.7642014026641846,
0.0619761124253273,
0.2294481247663498,
0.39183422923088074,
0.06485053896903992,
1.097301959991455,
0.8177953362464905,
0.20203746855258942,
0.6565532684326172,
0.15728317201137543,
0.7733751535415649,
-0.0... |
func NewContainer(object Object) *Container {
return &Container{
object: object,
}
} | [
0.323924720287323,
-0.9876025915145874,
0.28672853112220764,
0.6707991361618042,
-1.0244860649108887,
0.009930061176419258,
0.8758097290992737,
-0.9741266965866089,
0.8958448767662048,
-0.22913464903831482,
-0.9119405746459961,
0.34537237882614136,
0.9230162501335144,
0.2290104180574417,
... |
func (o *Container) GetObject() Object {
return o.object
} | [
0.4599152207374573,
-0.39805230498313904,
0.4121309518814087,
0.9533854126930237,
0.36960500478744507,
0.4280323386192322,
1.5274983644485474,
-0.9268296957015991,
0.39262333512306213,
-0.7906347513198853,
-0.4422631561756134,
0.14834657311439514,
0.7171876430511475,
-0.5095337629318237,
... |
func Sign(name string, message string, password string)([]byte, []byte, error){
var manager cryptostore.Manager
rootDir := os.Getenv("BASECLIHOME")
fmt.Println("rootdir"+rootDir)
keyDir := filepath.Join(rootDir, KeySubdir)
signEssue.Message = []byte(message)
// TODO: smarter loading??? with language and fallbac... | [
-0.21638743579387665,
-0.023769300431013107,
0.5147030353546143,
0.4836815893650055,
-0.41491633653640747,
-0.3206125795841217,
-0.8320565223693848,
0.10074317455291748,
-0.7168883085250854,
0.12379509210586548,
-0.9623937606811523,
0.40715065598487854,
-0.9287510514259338,
1.2007602453231... |
func SecureRandomString(keyLength int) (string, error) {
key, err := randomKey(keyLength)
if err != nil {
return "", err
}
id := fmt.Sprintf("%0x", key[0:keyLength])
return id, nil
} | [
-0.5369426608085632,
-0.4422898292541504,
0.4378814697265625,
-0.09074530750513077,
-0.506402850151062,
0.743057370185852,
-0.7510437965393066,
-0.8477315902709961,
0.8602091073989868,
0.24963036179542542,
-0.15183523297309875,
0.04495755955576897,
-0.8062586188316345,
-0.4322161376476288,... |
func ListModules(project *Project) (modules []Module, err error) {
if err = database.BackendDB.DB.Model(project).Related(&modules).Error; err != nil {
log.Print(err)
return nil, err
}
return modules, nil
} | [
0.015993360430002213,
-0.13767176866531372,
0.15430128574371338,
-0.40034031867980957,
1.0111570358276367,
1.1266753673553467,
-0.5096389055252075,
-0.8218768239021301,
0.37067076563835144,
0.9034502506256104,
0.11902850866317749,
0.19616840779781342,
-1.3174262046813965,
0.475578725337982... |
func (m *Module) FindByName(project *Project) (modules []Module, err error) {
if err = database.BackendDB.DB.Model(project).Related(&modules).Where("name = ? ", m.Name).Error; err != nil {
log.Print(err)
return nil, err
}
return modules, nil
} | [
0.6119094491004944,
0.44358423352241516,
0.24638520181179047,
-0.41808316111564636,
0.857201874256134,
0.26568034291267395,
0.018807481974363327,
-1.4348081350326538,
-0.5638669729232788,
1.6320940256118774,
-0.4778183400630951,
-0.013471399433910847,
-1.57356858253479,
1.0909456014633179,... |
func (m *Module) FindByPath() (modules []Module, err error) {
if err = database.BackendDB.DB.Model(m).Where("path = ? ", m.Path).Error; err != nil {
log.Print(err)
return nil, err
}
return modules, nil
} | [
0.5162054300308228,
-0.03687924146652222,
0.20952549576759338,
0.046338409185409546,
1.0317692756652832,
0.24517779052257538,
0.4182022213935852,
-1.4003105163574219,
-0.8134082555770874,
1.2644425630569458,
-0.29526573419570923,
0.3680601119995117,
-1.6762948036193848,
1.1637344360351562,... |
func (m *Module) FindById() (modules []Module, err error) {
if err = database.BackendDB.DB.Model(m).Where("id = ?", m.ID).First(m).Error; err != nil {
log.Print(err)
return nil, err
}
return modules, nil
} | [
0.36522161960601807,
-0.0889979749917984,
0.062449365854263306,
-0.12000039964914322,
1.2403864860534668,
0.43324166536331177,
-0.20947042107582092,
-1.215964674949646,
-0.020555932074785233,
1.2235450744628906,
-0.45389941334724426,
0.5622314810752869,
-1.4170745611190796,
1.7760237455368... |
func (m *Module) Save(project *Project) (*Module, error) {
if err := database.BackendDB.DB.Model(project).Association("Modules").Append(m).Error; err != nil {
log.Print(err)
return nil, err
}
return m, nil
} | [
-0.4817855954170227,
0.2398742437362671,
0.23886361718177795,
-0.8404809832572937,
1.2654474973678589,
0.8669384121894836,
0.35250815749168396,
-0.7795114517211914,
-0.3776828944683075,
1.1825767755508423,
-0.40681764483451843,
-0.07829585671424866,
-1.1929620504379272,
0.5313299298286438,... |
func (m *Module) Update() (*Module, error) {
if err := database.BackendDB.DB.Save(m).Error; err != nil {
log.Print(err)
return nil, err
}
return m, nil
} | [
-0.5871656537055969,
-0.6979029178619385,
0.08356062322854996,
-0.591567873954773,
0.8304144144058228,
0.7424169778823853,
-0.2268146425485611,
-0.3950785994529724,
0.014576288871467113,
0.9933338165283203,
0.29013538360595703,
0.1006927341222763,
-1.3852497339248657,
0.21826820075511932,
... |
func (m *Module) Delete() (*Module, error) {
if err := database.BackendDB.DB.Delete(m).Error; err != nil {
log.Print(err)
return nil, err
}
return m, nil
} | [
0.22593079507350922,
0.24163934588432312,
0.17500482499599457,
-0.06670629978179932,
1.5153605937957764,
0.6177616715431213,
-0.021747320890426636,
-0.28820541501045227,
0.3564348816871643,
1.0199264287948608,
0.3949818015098572,
0.34787866473197937,
-1.596561074256897,
0.25279998779296875... |
func (d *data) XSharedArray(ctx context.Context, name string, call goja.Callable) (goja.Value, error) {
// if lib.GetState(ctx) != nil {
// return nil, errors.New("new SharedArray must be called in the init context")
// }
initEnv := gojs.GetInitEnv(ctx)
if initEnv == nil {
return nil, errors.New("missing init ... | [
-0.6754331588745117,
0.03533056750893593,
0.8392102718353271,
0.23402157425880432,
-0.24058964848518372,
0.020568586885929108,
-0.09809932857751846,
-0.7757419943809509,
0.8398301005363464,
0.30334943532943726,
-0.6733047366142273,
1.0103768110275269,
-0.6912258267402649,
0.979458808898925... |
func launchArcher() {
runtime.GOMAXPROCS(*numProcessors)
// get top level context
ctx := context.Background()
// get the service API
serverAPI, cleanupAPI, err := service.NewArcher(service.SetNumWorkers(*numWorkers), service.SetDb(*dbPath), service.SetManifest(*manifestURL), service.SetBucket(*awsBucketName, *aw... | [
-0.5280967354774475,
-0.9915862679481506,
0.5527824759483337,
-0.5967789888381958,
-0.14767926931381226,
0.35804709792137146,
0.18235673010349274,
0.036378469318151474,
0.0652138888835907,
0.11216099560260773,
0.3812459707260132,
1.9635204076766968,
-0.41007691621780396,
0.8954811692237854... |
func init() {
// Run App at 'release' mode in production.
gin.SetMode(gin.ReleaseMode)
// Starts a new Gin instance with no middle-ware
route := gin.New()
// Define your handlers
route.GET("/", func(ctx *gin.Context) {
ctx.String(http.StatusOK, "Hello World!")
})
route.GET("/ping", func(ctx *gin.Co... | [
-0.3970710337162018,
-0.5283187031745911,
0.762750506401062,
0.3876466155052185,
0.1338004469871521,
1.4599062204360962,
-0.3193921446800232,
0.3472091853618622,
-0.7755666375160217,
-0.44358497858047485,
-0.46959590911865234,
0.8312098979949951,
0.03169722110033035,
0.1563570350408554,
... |
func (m middleware) ServeHTTP(
w http.ResponseWriter,
r *http.Request,
) {
ctx := r.Context()
withEnv := With(ctx, m.Env)
m.Handler.ServeHTTP(w, r.WithContext(withEnv))
} | [
0.44367659091949463,
-0.011912607587873936,
0.25474002957344055,
0.8307859301567078,
-0.2967483699321747,
1.0577492713928223,
-0.24588793516159058,
-0.5196295380592346,
-0.6916257739067078,
0.8130561709403992,
0.2536708116531372,
0.12461946904659271,
-0.22653891146183014,
1.356360912322998... |
func Middleware(
env *Env,
) func(http.Handler) http.Handler {
return func(h http.Handler) http.Handler {
return middleware{h, env}
}
} | [
-0.16744767129421234,
-0.16336727142333984,
0.3383631408214569,
0.10762585699558258,
-0.1658536195755005,
0.8510019779205322,
-0.7343176603317261,
-0.23084290325641632,
-0.6484358310699463,
-0.9617680907249451,
0.02883739583194256,
0.41640400886535645,
0.678814172744751,
-0.061990674585103... |
func reply(ch *amqp.Channel, out *output) {
var body []byte
var err error
var responseMsg amqp.Publishing
responseMsg.MessageId = out.ID
if out.Err != nil {
log.Printf("Failed HTTP protocol to Maestro (will deliver error 599): %v, msg ID: %v\n",
out.Err, out.ID)
responseMsg.Body = []byte(out.Err.Error())
... | [
0.47600266337394714,
-0.6218478083610535,
0.7650762796401978,
-0.3937801718711853,
-0.933437168598175,
-0.1373542994260788,
-0.5402823686599731,
0.233709454536438,
0.274700790643692,
0.39636698365211487,
0.6091347336769104,
1.15827476978302,
-0.4098256230354309,
0.10759173333644867,
0.11... |
func (recv *receiver) ServeRequestsLoop() {
channel, msgQueue, err := ConsumeFromRabbitMQ(recv.conn, recv.queueName)
FailOnError(err, "Failed to register a consumer")
defer channel.Close()
log.Printf(" [*] Waiting for messages on (%v), forwarding to: %v. To exit press CTRL+C",
recv.queueName, recv.webEndpoint)
... | [
-0.0182701013982296,
-0.9543125033378601,
0.8539210557937622,
-0.5532293915748596,
0.27650269865989685,
-0.2082819938659668,
0.32185351848602295,
-0.44327881932258606,
-0.03716016560792923,
0.41022616624832153,
0.3996748924255371,
0.4682672321796417,
-0.3092045187950134,
0.6862313151359558... |
func (recv *receiver) Close() {
recv.conn.Close()
close(recv.close)
} | [
-0.6049745678901672,
-0.6662852168083191,
0.39318370819091797,
-0.9014509916305542,
0.3100126087665558,
0.12785685062408447,
-0.14015227556228638,
0.7272237539291382,
-0.5348851680755615,
-1.0571199655532837,
0.2427331507205963,
-0.26026418805122375,
-0.4187416732311249,
0.8534554839134216... |
func (Dyndns) RestObjects() map[string]sophos.RestObject { return defsDyndns } | [
-1.4291870594024658,
0.10399986058473587,
0.45888760685920715,
0.23875178396701813,
0.1364692598581314,
-0.16091422736644745,
-0.30693939328193665,
-0.45369836688041687,
0.10319433361291885,
-0.9442689418792725,
-1.7361454963684082,
0.7163503170013428,
0.195108562707901,
-0.332873016595840... |
func (Dyndns) Definition() sophos.Definition { return *defDyndns } | [
-0.8575641512870789,
0.518125057220459,
0.2674790918827057,
0.3558116853237152,
0.6792013049125671,
-0.2685146629810333,
-0.054660897701978683,
-0.6207675933837891,
1.3064178228378296,
-0.722236156463623,
-0.9646916389465332,
0.030882082879543304,
1.084396481513977,
0.9879669547080994,
-... |
func (Dyndns) ApiRoutes() []string {
return []string{
"/api/objects/dyndns/dyndns/",
"/api/objects/dyndns/dyndns/{ref}",
"/api/objects/dyndns/dyndns/{ref}/usedby",
"/api/objects/dyndns/group/",
"/api/objects/dyndns/group/{ref}",
"/api/objects/dyndns/group/{ref}/usedby",
}
} | [
-1.11244535446167,
-0.284750759601593,
0.6408568620681763,
-0.723088800907135,
0.6074190139770508,
-0.40124186873435974,
0.03208542987704277,
-0.2542402446269989,
0.5522945523262024,
-0.571255087852478,
-0.6618723273277283,
0.09983190894126892,
0.027119740843772888,
0.5121510028839111,
-... |
func (Dyndns) References() []string {
return []string{
"REF_DyndnsDyndns",
"REF_DyndnsGroup",
}
} | [
-1.2625213861465454,
-0.12527024745941162,
0.4578055739402771,
-0.38006410002708435,
1.0706582069396973,
0.6458209156990051,
-0.0414436049759388,
-0.6254582405090332,
0.6760339140892029,
-0.7187619805335999,
-0.7683324217796326,
0.6466289758682251,
0.4072105288505554,
1.0004056692123413,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.