text
stringlengths
11
6.3k
embedding
listlengths
768
768
func NewKey() (*Key, *big.Int, error) { // Use the DSA crypto code to generate a key pair. For testing // purposes, we'll use (2048,224) instead of (2048,160) as used by the // current Helios implementation params := new(dsa.Parameters) if err := dsa.GenerateParameters(params, rand.Reader, dsa.L2048N224); err != n...
[ -0.48723357915878296, 0.7025419473648071, 0.4196796715259552, -0.38927721977233887, -0.332302063703537, -0.8182777166366577, 0.06755391508340836, 0.8961648344993591, 0.12609247863292694, 0.41915586590766907, -0.13556209206581116, 0.26536113023757935, 0.22379238903522491, 0.6584141850471497...
func (prod *Ciphertext) MulCiphertexts(other *Ciphertext, prime *big.Int) *Ciphertext { prod.Alpha.Mul(prod.Alpha, other.Alpha) prod.Alpha.Mod(prod.Alpha, prime) prod.Beta.Mul(prod.Beta, other.Beta) prod.Beta.Mod(prod.Beta, prime) return prod }
[ -0.11405517905950546, -0.49928611516952515, 0.6119194030761719, -0.16639204323291779, -0.9492781162261963, -0.3277510404586792, -0.1633385866880417, -0.394403338432312, 0.9630435109138489, -0.03237684443593025, -1.0632818937301636, -0.42095401883125305, -0.4117710292339325, 0.3756505250930...
func Encrypt(selected bool, pk *Key) (*Ciphertext, *big.Int) { // If this value is selected, then use g^1; otherwise, use g^0. var plaintext *big.Int //var realExp, fakeExp int64 if selected { plaintext = pk.Generator //realExp = 1 //fakeExp = 0 } else { plaintext = big.NewInt(1) //realExp = 0 //fakeEx...
[ -0.14697867631912231, 0.45213785767555237, 0.4153558909893036, 0.0200604610145092, -0.6591536402702332, -0.4850720465183258, 1.249945878982544, 0.3061031997203827, 0.7940679788589478, 0.4097450375556946, -0.7931013107299805, -0.22093266248703003, -0.8281329274177551, 0.4158676862716675, ...
func NewQuestion(answers []string, max int, min int, question string, resultType string, shortName string) (*Question, error) { if max < 0 || min < 0 || min > max { return nil, errors.New("invalid question min and max") } if resultType != "absolute" && resultType != "relative" { return nil, errors.New("invalid ...
[ -0.22384744882583618, -0.909936785697937, 0.6826176047325134, 0.7877745032310486, -1.1310728788375854, 0.8814267516136169, -0.12613984942436218, -0.7521116733551025, 0.37107887864112854, 0.21822227537631989, -0.013838574290275574, 0.4468524754047394, 0.37534299492836, -0.161717489361763, ...
func NewBallot(election *Election, answers [][]int64) (*Ballot, error) { if len(answers) != len(election.Questions) { return nil, errors.New("wrong number of answers") } pk := election.PublicKey //vote.ElectionHash = election.ElectionHash //vote.ElectionUuid = election.Uuid ans := make([]*EncryptedAnswer, le...
[ -0.5030982494354248, 0.034348808228969574, 0.7011792063713074, 0.2648918330669403, -0.9064565896987915, 0.023756563663482666, 0.2553080916404724, -1.3073254823684692, 0.40160152316093445, 0.9950634837150574, -0.2980974614620209, -0.22864411771297455, 0.14445899426937103, 0.1790377199649810...
func GenUUID() (string, error) { bytes := make([]byte, 16) if _, err := rand.Read(bytes); err != nil { // glog.Error("Could not generate a UUID") return "", err } bytes[6] = (bytes[6] & 0x0f) | 0x40 bytes[8] = (bytes[8] & 0x3f) | 0x80 uuid := fmt.Sprintf("%x-%x-%x-%x-%x", bytes[0:4], bytes[4:6], bytes[6:8]...
[ 0.010975821875035763, -0.06684354692697525, 1.0196971893310547, -0.36029189825057983, -0.38805529475212097, 1.0949617624282837, -0.18672601878643036, 0.6500601768493652, 0.263250470161438, 0.24216648936271667, 0.06983114778995514, 0.44471681118011475, -0.580175518989563, -0.813467204570770...
func NewElection(url string, desc string, frozenAt string, name string, openreg bool, questions []*Question, shortName string, useVoterAliases bool, votersHash string, votingEnd string, votingStart string, k *Key) (*Election, *big.Int, error) { uuid, err := GenUUID() if err != nil { // glog.Error("Couldn't gener...
[ -0.8150216341018677, -0.34767284989356995, 0.5874693989753723, 0.17810583114624023, -0.6969942450523376, -0.09622659534215927, 0.11294379830360413, 0.6324772834777832, 0.20732970535755157, 1.0431526899337769, -0.48670315742492676, 0.09151210635900497, -0.5516183972358704, 0.442588210105896...
func SplitKey(privateKey *big.Int, publicKey *Key, n int) ([]*Trustee, []*big.Int, error) { // Choose n-1 random private keys and compute the nth as privateKey - // (key_1 + key_2 + ... + key_{n-1}). This computation must be // performed in the exponent group of g, which is // Z_{Key.ExponentPrime}. trustees := ma...
[ -0.9633515477180481, 0.7466153502464294, 0.6132996082305908, -0.591482400894165, -0.12297336757183075, -0.5544662475585938, 0.7761023044586182, 0.06642705947160721, 0.028991682454943657, 1.1302196979522705, -0.8305562734603882, 0.19920849800109863, -0.3341756761074066, 0.7829069495201111, ...
func (election *Election) AccumulateTallies(votes []*CastBallot) ([][]*Ciphertext, []string) { // Initialize the tally structures for homomorphic accumulation. tallies := make([][]*Ciphertext, len(election.Questions)) fingerprints := make([]string, len(votes)) for i := range tallies { tallies[i] = make([]*Cipher...
[ -0.31209796667099, 0.024416334927082062, 0.47582224011421204, -0.013763731345534325, -0.292222797870636, -0.13962435722351074, 0.5321767926216125, -0.7593980431556702, 0.1075410544872284, 0.6283795237541199, -0.6085145473480225, 0.2031240612268448, 0.39266446232795715, 0.9076277017593384, ...
func (e *Election) Tally(votes []*CastBallot, trustees []*Trustee, trusteeSecrets []*big.Int) (Result, error) { tallies, _ := e.AccumulateTallies(votes) // TODO(tmroeder): maybe we should just skip votes that don't pass verification? // What does the spec say? //if len(voteFingerprints) == 0 { // glog.Error("Could...
[ -0.0019618934020400047, 0.454469233751297, 0.530582070350647, -0.23083414137363434, -0.21390074491500854, -0.5085532069206238, 0.42498642206192017, -0.5808618068695068, -0.17083603143692017, 0.4584202468395233, 0.1736702173948288, -0.1486482322216034, 0.5810292363166809, 0.2184335887432098...
func NewCastBallot(election *Election, answers [][]int64) (*CastBallot, error) { // First, create the encrypted vote. vote, err := NewBallot(election, answers) if err != nil { // glog.Error("Couldn't encrypt a ballot: ", err) return nil, err } cb := &CastBallot{nil, "", vote, "", "", ""} return cb, nil }
[ -0.22712241113185883, -0.16495013236999512, 0.3146195113658905, -0.06580576300621033, -0.6861534714698792, 0.3012411594390869, -0.5930160880088806, -1.308721899986267, 0.1351274847984314, 0.8107246160507202, -0.21907538175582886, 0.6433113813400269, -0.3995606005191803, -0.2077995836734771...
func NewRouter() Router { return &router{chi.NewRouter()} }
[ 0.861977219581604, -0.5483255386352539, 0.14137054979801178, 0.49195072054862976, -0.07535463571548462, 0.13654816150665283, 0.027374278753995895, 0.26598846912384033, -0.034474875777959824, -0.4209020137786865, -0.3090009391307831, 0.3567480444908142, -0.6790062785148621, 0.76769369840621...
func (m *EnumSetting) UnmarshalJSON(raw []byte) error { // AO0 var aO0 SectionSetting if err := swag.ReadJSON(raw, &aO0); err != nil { return err } m.SectionSetting = aO0 // AO1 var dataAO1 struct { GroupedOptions []*GroupedOption `json:"groupedOptions,omitempty"` Multiple *bool `json:"multiple,omitempty...
[ -1.483723521232605, 0.21996386349201202, 0.715153694152832, -1.1563125848770142, -1.015997052192688, -0.1826251596212387, 0.559686005115509, -0.7204368710517883, 0.2533324360847473, 1.5457326173782349, -0.4279053807258606, 0.06628250330686569, 0.2097259908914566, 0.9411889314651489, 0.47...
func (m EnumSetting) MarshalJSON() ([]byte, error) { _parts := make([][]byte, 0, 2) aO0, err := swag.WriteJSON(m.SectionSetting) if err != nil { return nil, err } _parts = append(_parts, aO0) var dataAO1 struct { GroupedOptions []*GroupedOption `json:"groupedOptions,omitempty"` Multiple *bool `json:"mult...
[ -1.132317304611206, -0.23923303186893463, 0.651249885559082, -0.3462138772010803, -0.5314282774925232, -0.21551191806793213, 0.15731509029865265, -0.5081531405448914, 0.2810945510864258, 1.2693716287612915, -0.5123935341835022, 0.5771943926811218, -0.10125884413719177, 1.0236111879348755, ...
func (m *EnumSetting) Validate(formats strfmt.Registry) error { var res []error // validation for a type composition with SectionSetting if err := m.SectionSetting.Validate(formats); err != nil { res = append(res, err) } if err := m.validateGroupedOptions(formats); err != nil { res = append(res, err) } if...
[ -0.8072403073310852, 0.21417632699012756, 0.4936647117137909, -0.27498728036880493, 0.0767262727022171, -0.25847485661506653, 0.4003443419933319, -1.1869131326675415, -0.230437234044075, 0.883876621723175, 0.31556594371795654, -0.33922943472862244, -0.6430595517158508, 0.6953125, 0.37364...
func NewGetDeploymentPreview1Params() *GetDeploymentPreview1Params { var () return &GetDeploymentPreview1Params{ timeout: cr.DefaultTimeout, } }
[ -0.509230375289917, -0.1286400854587555, 0.2894412875175476, 0.9775592684745789, -0.7499919533729553, 0.5071417689323425, 0.028288647532463074, 1.0066391229629517, -0.5618391633033752, 0.3342435359954834, 0.4747925400733948, 0.3208179771900177, -0.07664269208908081, 0.9916344881057739, 0...
func NewGetDeploymentPreview1ParamsWithTimeout(timeout time.Duration) *GetDeploymentPreview1Params { var () return &GetDeploymentPreview1Params{ timeout: timeout, } }
[ -0.03427976742386818, -0.2108459770679474, 0.3784988522529602, 0.8634190559387207, -0.7402673363685608, 1.1136837005615234, -0.5997292399406433, 1.0211946964263916, -0.6409487724304199, 1.08805251121521, 0.7081811428070068, 0.6699066758155823, 0.06140111759305, 1.156583309173584, -0.6998...
func NewGetDeploymentPreview1ParamsWithContext(ctx context.Context) *GetDeploymentPreview1Params { var () return &GetDeploymentPreview1Params{ Context: ctx, } }
[ -0.3702290654182434, -0.100713811814785, 0.5350277423858643, 0.487676739692688, -0.7119107842445374, 1.1416616439819336, -0.3649858236312866, 0.2382122278213501, -0.20299524068832397, 0.48230764269828796, 0.5406733751296997, 0.3926963210105896, 0.1076214388012886, 0.82261723279953, -1.01...
func NewGetDeploymentPreview1ParamsWithHTTPClient(client *http.Client) *GetDeploymentPreview1Params { var () return &GetDeploymentPreview1Params{ HTTPClient: client, } }
[ -0.40415698289871216, -0.31520554423332214, 0.5893320441246033, 0.5386300683021545, -0.2947354018688202, 1.1531320810317993, 0.15624627470970154, 0.8201746344566345, -0.5434026718139648, 0.10280102491378784, 0.27302342653274536, 0.46523088216781616, 0.19522246718406677, 0.695277214050293, ...
func (o *GetDeploymentPreview1Params) WithTimeout(timeout time.Duration) *GetDeploymentPreview1Params { o.SetTimeout(timeout) return o }
[ -0.09233041852712631, 0.32430627942085266, 0.34086737036705017, 0.26863905787467957, -0.91321861743927, 0.40113094449043274, -0.26270467042922974, 0.938221275806427, 0.08338847011327744, 1.012905240058899, 0.7302839756011963, 0.5223211646080017, 0.8677594065666199, 1.1402064561843872, -0...
func (o *GetDeploymentPreview1Params) SetTimeout(timeout time.Duration) { o.timeout = timeout }
[ -0.34804388880729675, 0.5166274309158325, 0.32083189487457275, 0.35283011198043823, -0.6381140947341919, 0.9711299538612366, -0.11492124199867249, 1.323114275932312, -0.5096571445465088, 1.13505220413208, 0.7243914008140564, 0.6535102725028992, 0.47353264689445496, 0.9541471004486084, 0....
func (o *GetDeploymentPreview1Params) WithContext(ctx context.Context) *GetDeploymentPreview1Params { o.SetContext(ctx) return o }
[ -0.8185238242149353, 0.23957929015159607, 0.48546767234802246, 0.17480693757534027, -1.0239875316619873, 0.5413187742233276, -0.38189035654067993, 0.25700247287750244, 0.527742326259613, 0.4152759909629822, 0.59678715467453, 0.40704455971717834, 0.32896673679351807, 0.7064515352249146, -...
func (o *GetDeploymentPreview1Params) SetContext(ctx context.Context) { o.Context = ctx }
[ -0.8472342491149902, 0.49717453122138977, 0.37775719165802, 0.524457573890686, -0.6283091902732849, 0.9056611061096191, -0.1567833572626114, 0.6498331427574158, 0.23870153725147247, 0.516893744468689, 0.48131033778190613, 0.6691811680793762, 0.19348281621932983, 0.640679657459259, -0.428...
func (o *GetDeploymentPreview1Params) WithHTTPClient(client *http.Client) *GetDeploymentPreview1Params { o.SetHTTPClient(client) return o }
[ -0.5342721343040466, -0.4459211230278015, 0.46256163716316223, -0.09253054112195969, -0.705258309841156, 0.4034513831138611, 0.24071073532104492, 0.26445794105529785, 0.006555401254445314, -0.07700321078300476, 0.4476594030857086, 0.41174837946891785, 0.7854302525520325, 0.5318915247917175...
func (o *GetDeploymentPreview1Params) SetHTTPClient(client *http.Client) { o.HTTPClient = client }
[ -0.026499785482883453, -0.1575288623571396, 0.3480449318885803, -0.44424131512641907, -0.9534615278244019, 0.34642013907432556, 0.16792237758636475, 0.49680861830711365, -0.6721951961517334, 0.1954948455095291, 0.40158510208129883, 0.7579963803291321, 0.39884158968925476, 0.279099404811859...
func (o *GetDeploymentPreview1Params) WithEnvironment(environment string) *GetDeploymentPreview1Params { o.SetEnvironment(environment) return o }
[ -0.8457497954368591, -0.08899430930614471, 0.41815420985221863, -0.06476488709449768, -0.30883100628852844, 0.37724417448043823, 0.4606513977050781, 0.10979724675416946, 0.08958415687084198, 0.6635532975196838, 0.38543981313705444, 0.07447046041488647, 0.6687377095222473, 1.068581104278564...
func (o *GetDeploymentPreview1Params) SetEnvironment(environment string) { o.Environment = environment }
[ -1.2419137954711914, 0.1727267950773239, 0.34345918893814087, -0.014901787042617798, -0.2609519362449646, 0.7127154469490051, 0.6991021633148193, 0.3219156265258789, -0.5253454446792603, 0.8657674789428711, 0.33562833070755005, 0.4595085680484772, 0.2290882170200348, 1.303191900253296, -...
func (o *GetDeploymentPreview1Params) WithID(id string) *GetDeploymentPreview1Params { o.SetID(id) return o }
[ -0.3732878267765045, -0.35226574540138245, 0.29964783787727356, 0.5541663765907288, -0.9405125379562378, 0.7285939455032349, -0.20951509475708008, 0.7512524724006653, 0.7960498332977295, 0.7132901549339294, 0.4704124331474304, 0.3091096580028534, 0.22037315368652344, 1.0001554489135742, ...
func (o *GetDeploymentPreview1Params) SetID(id string) { o.ID = id }
[ -0.5976660847663879, -0.22288303077220917, 0.21491113305091858, 0.6281247138977051, -0.775931715965271, 1.1069086790084839, -0.21210640668869019, 1.0657130479812622, 0.12653370201587677, 0.5598841905593872, 0.40263432264328003, 0.5457104444503784, -0.0009863089071586728, 1.0564579963684082...
func (o *GetDeploymentPreview1Params) WithTenant(tenant string) *GetDeploymentPreview1Params { o.SetTenant(tenant) return o }
[ -0.7587538957595825, -0.25664886832237244, 0.32558074593544006, 0.1096809059381485, -0.8655208945274353, 0.3778946101665497, 0.22097307443618774, 0.20497670769691467, -0.13598665595054626, -0.016239678487181664, 0.5241973996162415, 0.3521036207675934, 0.5583937168121338, 0.4341647326946258...
func (o *GetDeploymentPreview1Params) SetTenant(tenant string) { o.Tenant = tenant }
[ -0.8757203817367554, -0.0639016330242157, 0.21649286150932312, 0.40171879529953003, -0.987187385559082, 0.5029556155204773, 0.4003952145576477, 0.6132374405860901, -0.5773942470550537, 0.32507234811782837, 0.46309754252433777, 0.6811128854751587, 0.007773479446768761, 0.605035662651062, ...
func (o *GetDeploymentPreview1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // path param environment if err := r.SetPathParam("environment", o.Environment); err != nil { return err } // path param ...
[ -1.1847821474075317, -0.03301096707582474, 0.950378954410553, -0.24445994198322296, 0.35617151856422424, 0.07036940008401871, 0.9761680960655212, 0.4413013756275177, -0.6741709113121033, 0.4312363564968109, 0.619820773601532, 0.6522645950317383, -0.11028061807155609, 0.5958263278007507, ...
func (c *Client) getLbResponse(verb, path string, reqModel, resModel interface{}) error { return c.getResponse(lbaasBaseUrl+path, verb, reqModel, resModel) }
[ 0.36376339197158813, -1.3085066080093384, 0.6329846978187561, 0.25972047448158264, 0.823106050491333, -0.31876710057258606, -0.2446201592683792, -1.011204481124878, 0.8403165936470032, -0.2794269621372223, -0.4080587327480316, 0.3308682441711426, -0.9914054274559021, -0.06044420599937439, ...
func (i *ResolvedProductIter) Close() {}
[ -1.1383185386657715, -0.6645845174789429, 0.2702668011188507, -0.01881345361471176, -1.0019423961639404, 0.9460797309875488, 1.293302059173584, -0.6925880908966064, -0.14901715517044067, -0.06773067265748978, 0.12852025032043457, -0.10091526806354523, -0.765776515007019, 0.289437472820282,...
func (i *ResolvedProductIter) Next() bool { if i.first && i.err != nil { i.first = false return true } i.first = false i.i++ return i.i < len(i.page) }
[ -0.9545024037361145, 0.17723655700683594, 0.44413745403289795, -0.13942638039588928, -0.6124245524406433, 0.04967673122882843, -0.0023613437078893185, -0.09522826969623566, 0.4171605110168457, -0.15018419921398163, -0.14352954924106598, 0.024228790774941444, -0.8410850763320923, -0.5937818...
func (i *ResolvedProductIter) Current() (*ResolvedProduct, error) { if i.err != nil { return nil, i.err } return &i.page[i.i], nil }
[ -0.8649017810821533, -1.2535258531570435, 0.2861347198486328, -0.13121280074119568, -0.015469944104552269, 0.35366854071617126, 0.8539279699325562, -0.6939678192138672, 0.21502381563186646, -0.2550012767314911, 0.7681818604469299, 0.38666385412216187, 0.21471667289733887, -0.87240833044052...
func (c *IDClient) CreatePlanCost(ctx context.Context, id gomanifold.ID, planCostRequest *PlanCostRequest) (*Price, error) { idBytes, err := id.MarshalText() if err != nil { return nil, err } p := fmt.Sprintf("/id/plan/%s/cost", string(idBytes)) req, err := c.backend.NewRequest(http.MethodPost, p, nil, planCos...
[ -0.7000029683113098, 0.46494442224502563, 0.40362441539764404, -0.498611181974411, -0.3650110363960266, 0.0005678942543454468, -0.9002681374549866, -0.9054208993911743, 0.12005069851875305, 0.6999735236167908, -1.0404081344604492, 0.2754201292991638, -0.7943270802497864, -0.095942534506320...
func (c *IDClient) DeleteResource(ctx context.Context, id gomanifold.ID) error { idBytes, err := id.MarshalText() if err != nil { return err } p := fmt.Sprintf("/id/resource/%s", string(idBytes)) req, err := c.backend.NewRequest(http.MethodDelete, p, nil, nil) if err != nil { return err } _, err = c.back...
[ -0.4894436001777649, 0.31897833943367004, 0.39131423830986023, -0.425695538520813, 0.22727665305137634, -0.33438366651535034, -0.4502716064453125, -0.2867637872695923, 0.5960516929626465, 0.47208812832832336, -0.0745975598692894, 0.20923705399036407, -1.0254108905792236, 0.435275673866272,...
func (c *IDClient) GetProduct(ctx context.Context, id gomanifold.ID) (*ResolvedProduct, error) { idBytes, err := id.MarshalText() if err != nil { return nil, err } p := fmt.Sprintf("/id/product/%s", string(idBytes)) req, err := c.backend.NewRequest(http.MethodGet, p, nil, nil) if err != nil { return nil, er...
[ -0.80788654088974, 0.7423890233039856, 0.588690459728241, 0.33315178751945496, 0.6078504920005798, -0.2879680097103119, -0.19401349127292633, -0.8341532349586487, 0.6370556950569153, -0.3879351317882538, -0.39624667167663574, 0.7777345180511475, -0.8694431185722351, -0.30059298872947693, ...
func (c *IDClient) GetResource(ctx context.Context, id gomanifold.ID) (*Resource, error) { idBytes, err := id.MarshalText() if err != nil { return nil, err } p := fmt.Sprintf("/id/resource/%s", string(idBytes)) req, err := c.backend.NewRequest(http.MethodGet, p, nil, nil) if err != nil { return nil, err } ...
[ -0.4391736388206482, 0.3929183781147003, 0.41363289952278137, -0.0925116315484047, 0.3984377086162567, -0.5267699956893921, -0.2358676791191101, -0.26082009077072144, 0.5259100198745728, 0.5818370580673218, 0.16720159351825714, 0.6025818586349487, -1.1786255836486816, -0.02457471191883087,...
func (c *IDClient) UpdateResource(ctx context.Context, id gomanifold.ID, resourceUpdateRequest *ResourceUpdateRequest) (*Resource, error) { idBytes, err := id.MarshalText() if err != nil { return nil, err } p := fmt.Sprintf("/id/resource/%s", string(idBytes)) req, err := c.backend.NewRequest(http.MethodPatch, ...
[ -0.978155791759491, -0.5041900873184204, 0.4301190972328186, -0.03847624361515045, -0.592559814453125, -0.14888349175453186, -0.4335830807685852, 0.05687971040606499, 0.39910605549812317, 0.921111524105072, 0.1269521266222, 0.3374256193637848, -1.1962367296218872, -0.3806946873664856, 0....
func (c *ProductClient) Get(ctx context.Context, label string) (*ResolvedProduct, error) { p := fmt.Sprintf("/product/%s", label) req, err := c.backend.NewRequest(http.MethodGet, p, nil, nil) if err != nil { return nil, err } var resp ResolvedProduct _, err = c.backend.Do(ctx, req, &resp, func(code int) error...
[ -0.8760532140731812, 0.39542126655578613, 0.6283162832260132, 0.06596936285495758, 1.2976986169815063, 0.279247522354126, -0.6843525767326355, -0.5065472722053528, 0.02391907386481762, -0.04434095323085785, -0.21138031780719757, 0.959168016910553, -0.8051722645759583, -0.7202302813529968, ...
func (c *ProductsClient) List(ctx context.Context, opts *ProductsListOpts) *ResolvedProductIter { iter := ResolvedProductIter{ first: true, i: -1, } p := "/products/" var q url.Values if opts != nil { q = make(url.Values) if opts.ProviderID != nil { b, err := opts.ProviderID.MarshalText() if er...
[ -0.4631797671318054, -0.04621022194623947, 0.6666978597640991, -0.02048463001847267, 0.6962935924530029, -0.6031328439712524, -0.38319525122642517, 0.24015945196151733, 0.29596081376075745, 0.6110047698020935, -0.24569891393184662, 0.6407795548439026, -0.3918069303035736, 0.011302011087536...
func (c *ResourceClient) Create(ctx context.Context, resourceCreateRequest *ResourceCreateRequest) (*Resource, error) { p := "/resource" req, err := c.backend.NewRequest(http.MethodPost, p, nil, resourceCreateRequest) if err != nil { return nil, err } var resp Resource _, err = c.backend.Do(ctx, req, &resp, f...
[ -0.43565455079078674, 0.35334157943725586, 0.3216879367828369, 0.2669174075126648, 0.4052254557609558, 0.23424150049686432, -0.3160155117511749, -0.7095612287521362, -0.527451753616333, 0.2754618227481842, -0.008988503366708755, -0.12639760971069336, -0.7603445649147034, 0.1654352396726608...
func (c *ResourcesClient) Get(ctx context.Context, teamLabel string, resourceLabel string, opts *ResourcesGetOpts) (*Resource, error) { p := fmt.Sprintf("/resources/%s/%s/", teamLabel, resourceLabel) var q url.Values if opts != nil { q = make(url.Values) if opts.ProductLabel != nil { q.Set("product_label", *...
[ -0.5523156523704529, 0.21826545894145966, 0.4752127528190613, -0.909967839717865, 0.692018449306488, 0.10714057087898254, -0.4942845404148102, -0.5890897512435913, -0.4727693796157837, 0.4207104444503784, 0.4849928617477417, 1.139012098312378, -0.38674670457839966, -1.0964564085006714, 0...
func (c *ResourcesClient) GetMe(ctx context.Context, resourceLabel string, opts *GetMeOpts) (*Resource, error) { p := fmt.Sprintf("/resources/me/%s/", resourceLabel) var q url.Values if opts != nil { q = make(url.Values) if opts.ProductLabel != nil { q.Set("product_label", *opts.ProductLabel) } if opts....
[ -0.7277879118919373, 0.4630776643753052, 0.9226127862930298, 0.5764113068580627, 0.8115749359130859, 0.1072060763835907, 0.26818200945854187, -0.28455713391304016, -0.4429371654987335, 0.3325355052947998, 0.6064172387123108, 0.2524067163467407, -0.7060017585754395, -0.9320924282073975, 0...
func NewAPI() *APIClient { c := &APIClient{} c.common.backend = DefaultBackend() c.ID = (*IDClient)(&c.common) c.Product = (*ProductClient)(&c.common) c.Products = (*ProductsClient)(&c.common) c.Resource = (*ResourceClient)(&c.common) c.Resources = (*ResourcesClient)(&c.common) return c }
[ 0.057087190449237823, -1.1246167421340942, 0.35361066460609436, 0.3433736264705658, -0.046220991760492325, -0.022211313247680664, 0.6712408661842346, -0.5351306796073914, -0.24483166635036469, 0.3284378945827484, -0.23122046887874603, -0.2431679517030716, -0.8109246492385864, -1.0790827274...
func New(serviceRoutes types.Routes) (*ExoCom, error) { result := &ExoCom{ deregisterChannel: make(chan string), errorChannel: make(chan error), securityManager: security.NewSecurityManager(serviceRoutes.HasSecurity()), logger: NewLogger(os.Stdout), messageCache: NewMessageCache(time.M...
[ -0.3267652690410614, 0.06387560814619064, 0.7749708294868469, -0.16905440390110016, 0.16726209223270416, -0.9267803430557251, 0.33940455317497253, -0.04208465665578842, -0.47315412759780884, -0.16734452545642853, -0.24814999103546143, 0.6453974843025208, -0.29600927233695984, 1.21204721927...
func (e *ExoCom) Close() error { return e.server.Close() }
[ -0.3188943564891815, -0.008902357891201973, 0.47603777050971985, 0.2640364468097687, 0.7475335001945496, 0.3066072165966034, -0.1754085123538971, -0.10095439106225967, -0.849966287612915, -0.597662091255188, -0.3006383776664734, 0.374267041683197, -0.9658052325248718, 0.9024011492729187, ...
func (e *ExoCom) Listen(port int) error { e.server.Addr = fmt.Sprintf(":%d", port) fmt.Printf("ExoCom online at port %d\n", port) return e.server.ListenAndServe() }
[ 0.18626928329467773, -0.8321488499641418, 0.4991883933544159, -0.9902677536010742, 0.5144219994544983, 0.2531053423881531, -0.03497007489204407, 1.04188871383667, -0.6753524541854858, -0.1665215641260147, -0.9283691644668579, -0.3520515561103821, -0.0009100913885049522, -0.1550547331571579...
func (handlers *SMTPHandlers) Login(state *smtp.ConnectionState, username, password string) (smtp.Session, error) { return &Session{}, nil }
[ -0.45171111822128296, -0.6924566030502319, 0.3477732539176941, -0.14851143956184387, -1.6753687858581543, -0.07592067867517471, -0.3158947229385376, 0.02597516030073166, 0.39051446318626404, 0.037718385457992554, -1.072127342224121, 0.49668529629707336, -0.2934364378452301, -0.809045374393...
func (handlers *SMTPHandlers) AnonymousLogin(state *smtp.ConnectionState) (smtp.Session, error) { return &Session{}, nil }
[ -0.8156970739364624, -0.9993948936462402, 0.43586793541908264, -0.4367356598377228, -2.141936779022217, 0.3728253245353699, -0.3672929108142853, -0.0258464515209198, 0.5256153345108032, -0.09368615597486496, -0.6376303434371948, 0.6729605197906494, -0.4061034321784973, -0.6192667484283447,...
func (l *Limiter) LinearThrottle(threshold time.Duration, identifier string) <-chan Result { return l.throttle(threshold, identifier, false) }
[ 1.149776816368103, -0.1566617786884308, 0.22028900682926178, -0.18370917439460754, -0.9534436464309692, 0.28549453616142273, -1.7358696460723877, -0.4644973576068878, -0.08393704146146774, -0.07646571844816208, -0.5956130623817444, 0.37217599153518677, -0.7619645595550537, -1.2801529169082...
func (l *Limiter) ExponentialThrottle(threshold time.Duration, identifier string) <-chan Result { return l.throttle(threshold, identifier, true) }
[ 0.5709514617919922, 0.02828511781990528, 0.11616041511297226, -0.3228989541530609, -0.7801010608673096, 0.1476384997367859, -1.8918861150741577, -0.02191120944917202, -0.08012649416923523, 0.08546885848045349, -0.2473701536655426, 0.43696412444114685, -0.357560396194458, -0.746220946311950...
func New(timeout time.Duration, cache GetSetter) Throttler { salt, err := randomBytes(16) if err != nil { panic("cannot initialize rate limiter") } return &Limiter{ cache: cache, timeout: timeout, salt: salt, } }
[ 0.9754281640052795, 0.08200448006391525, 0.302066445350647, -0.22059756517410278, -0.4421561658382416, 0.31008872389793396, -1.74197518825531, -0.7772786021232605, -0.4893624186515808, 0.9385033845901489, -0.24704505503177643, 0.3104303479194641, -0.34919559955596924, 0.4674086272716522, ...
func (l *NoopRatelimiter) LinearThrottle(threshold time.Duration, identifier string) <-chan Result { return l.pass() }
[ 1.0038326978683472, 0.1245265007019043, 0.2756873071193695, -0.05626389756798744, -0.5396224856376648, 0.4593585133552551, -1.1509287357330322, -0.7008758783340454, 0.08442939072847366, -0.3608914315700531, -0.5719878673553467, 0.5801954865455627, -1.2917633056640625, -0.9321523904800415, ...
func (l *NoopRatelimiter) ExponentialThrottle(threshold time.Duration, identifier string) <-chan Result { return l.pass() }
[ 0.32815054059028625, 0.22820483148097992, 0.16844451427459717, -0.10600323230028152, -0.38326624035835266, 0.26236796379089355, -1.2112607955932617, -0.5244174003601074, -0.04293948411941528, -0.32072317600250244, -0.2845876216888428, 0.6612216830253601, -0.751900851726532, -0.414237022399...
func NewNoopRateLimiter() Throttler { return &NoopRatelimiter{} }
[ -0.4255610704421997, -0.24267852306365967, 0.1325809508562088, -0.36191660165786743, -1.280968427658081, -0.44839027523994446, -1.1348947286605835, -1.180716633796692, -0.5451720952987671, -0.39526358246803284, -0.4114481210708618, 0.6963260769844055, -0.938869059085846, 0.832905650138855,...
func (ttt *TicTacToeApi) SaveOrganization(r *http.Request, req *OrganizationReqSave, res *OrganizationReqSave) error { c := endpoints.NewContext(r) u, err := getCurrentUser(c) if err != nil { return err } log.Println(u) organization := &Organization{Name: req.Name, Address: req.Address, ContactNumber: req.Cont...
[ -1.6089725494384766, -0.4476264715194702, 0.7255099415779114, 0.9724820852279663, 0.8051932454109192, -0.09449538588523865, 0.6680465340614319, -0.4728277027606964, 0.00876661203801632, 0.4750782251358032, -0.7929043173789978, -0.40152671933174133, -0.11435454338788986, 0.0743192583322525,...
func (ttt *TicTacToeApi) ScoresList(r *http.Request, req *ScoresListReq, resp *ScoresListResp) error { c := endpoints.NewContext(r) u, err := getCurrentUser(c) if err != nil { return err } q := newUserScoreQuery(u) if req.Limit <= 0 { req.Limit = 10 } scores, err := fetchScores(c, q, req.Limit) if err !...
[ -1.0935709476470947, -0.10840528458356857, 0.5634421110153198, 0.2100164145231247, 1.1204142570495605, 0.11994689702987671, 0.2243196666240692, -0.13387848436832428, 0.15159188210964203, 1.3123056888580322, -0.12766557931900024, -0.4914565980434418, -0.23213784396648407, 0.3184454441070556...
func (ttt *TicTacToeApi) ScoresInsert(r *http.Request, req *ScoreReqMsg, r2 *ScoreReqMsg) error { c := endpoints.NewContext(r) u, err := getCurrentUser(c) if err != nil { return err } score := newScore(req.Outcome, u) if err := score.put(c); err != nil { return err } //resp.Played = "nipun" log.Println("s...
[ -1.076182246208191, 0.3422296941280365, 0.7143402695655823, 0.29575011134147644, 1.284127950668335, 0.38031503558158875, 0.7219146490097046, -0.3678077459335327, -0.29904481768608093, 0.9690545797348022, -0.4039155840873718, -0.7068942785263062, -1.2920796871185303, -0.20317783951759338, ...
func getCurrentUser(c context.Context) (*user.User, error) { u, err := endpoints.CurrentUser(c, scopes, audiences, clientIds) if err != nil { return nil, err } if u == nil { return nil, errors.New("Unauthorized: Please, sign in.") } //c.Value("Current user: %#v", u) // c.Debugf("Current user: %#v", u) c.Don...
[ -0.4500865042209625, -0.5804766416549683, 0.5553755164146423, 0.854961097240448, -0.027499495074152946, 0.13381461799144745, 1.0471171140670776, -0.35729116201400757, 0.21073958277702332, 0.17171593010425568, 0.24713176488876343, 0.726902186870575, -0.29420703649520874, -0.2382112294435501...
func RegisterService() (*endpoints.RPCService, error) { api := &TicTacToeApi{} rpcService, err := endpoints.RegisterService(api, "tictactoe", "v1", "Tic Tac Toe API", true) if err != nil { return nil, err } info := rpcService.MethodByName("BoardGetMove").Info() info.Path, info.HTTPMethod, info.Name = "board"...
[ -0.30504363775253296, -0.12453600764274597, 0.6572961211204529, -0.12504327297210693, 1.576777458190918, -0.09109486639499664, 0.4453185796737671, -1.1124438047409058, -0.2942340075969696, 1.202498197555542, -0.222477525472641, 0.3617171347141266, -1.1334518194198608, 0.37328729033470154, ...
func NewVirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilder) { m := &VirtualEventsWebina...
[ -0.4726417064666748, -1.290136694908142, 0.47842177748680115, -0.253226637840271, -0.9679462909698486, 0.4537363350391388, 0.5233929753303528, 0.7308984994888306, 0.7108227014541626, 0.5349764823913574, 0.5066089630126953, 0.6106239557266235, -0.8588234782218933, -0.4939594566822052, 0.8...
func NewVirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilder) { urlParams := make(map[string]string) urlParams["...
[ -0.5186365842819214, -1.4169414043426514, 0.28002387285232544, 0.14449097216129303, -0.6812540888786316, 0.31390538811683655, 0.1050739586353302, 0.9373000860214233, 1.2737702131271362, 0.5027177333831787, 0.6858367919921875, 0.41291236877441406, -0.5503660440444946, -0.5395558476448059, ...
func (m *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilder) Delete(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); ...
[ 0.15984708070755005, -0.901059091091156, 0.648729145526886, -0.020953327417373657, -0.6303157210350037, 0.4255475699901581, 0.2602408826351166, 0.2836282551288605, 1.1656829118728638, 1.112012505531311, 0.7145537734031677, 0.6198137998580933, -0.4861566424369812, -0.2939884066581726, 0.7...
func (m *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentable, error) { ...
[ -0.31838855147361755, -0.6607526540756226, 0.7172749638557434, -0.24827565252780914, -0.6816188097000122, 0.44482940435409546, 0.08974895626306534, 0.18967191874980927, 0.1242721751332283, 1.0278172492980957, 0.672907829284668, 0.8720647096633911, -0.40462905168533325, -0.313989520072937, ...
func (m *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentable, requestConfiguration *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilderPatchRequestConfiguration)(...
[ -0.08255114406347275, -1.239458441734314, 0.6878393888473511, -0.5490759611129761, -1.242730736732483, 0.8305888175964355, 0.1644200086593628, 0.5516282320022583, 0.8079075813293457, 1.3849300146102905, 0.5640318393707275, 0.7749719023704529, -0.0861382856965065, -0.37586936354637146, 1....
func (m *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.Reques...
[ -0.19446110725402832, -1.1170729398727417, 0.9677032232284546, -1.0385466814041138, -0.7315225601196289, 0.5702586770057678, -0.1945996731519699, 0.3029797673225403, 0.8627819418907166, 0.7914846539497375, 0.7228670716285706, 0.5776584148406982, -0.25102856755256653, -0.3040297031402588, ...
func (m *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInfor...
[ -0.7293334603309631, -0.8365492224693298, 0.9007865786552429, -0.6847522258758545, -0.36868414282798767, 0.27017226815223694, -0.22507138550281525, -0.11779741197824478, 0.7391162514686584, 0.5761780142784119, 0.5551614761352539, 0.6363824605941772, -0.4277254045009613, -0.2640864253044128...
func (m *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentable, requestConfiguration *VirtualEventsWebinarsItemSessionsItemVirtualAppointmentRequestBuilderPatchRe...
[ -0.5803669691085815, -1.2208515405654907, 1.0184639692306519, -0.799946129322052, -0.8860719799995422, 0.4908369779586792, 0.20416821539402008, -0.23590999841690063, 0.10588955879211426, 0.986500084400177, 0.8221266865730286, 0.2095976620912552, -0.42085760831832886, -0.5194493532180786, ...
func (r *PolicyRequest) Get(ctx context.Context) (resObj *Policy, err error) { var query string if r.query != nil { query = "?" + r.query.Encode() } err = r.JSONRequest(ctx, "GET", query, nil, &resObj) return }
[ -0.7120686173439026, -0.13882890343666077, 0.2928108274936676, -0.23166261613368988, 0.7457470893859863, 0.05153987184166908, -0.8517094254493713, -0.9334166049957275, 1.0864648818969727, -0.2893754541873932, 0.4039742946624756, 0.6807589530944824, -0.2979753613471985, -0.31809914112091064...
func (r *PolicyRequest) Update(ctx context.Context, reqObj *Policy) error { return r.JSONRequest(ctx, "PATCH", "", reqObj, nil) }
[ -1.0505176782608032, -1.0615044832229614, 0.18342070281505585, -0.10478423535823822, -0.006705210078507662, 1.1406465768814087, -0.4836564362049103, -0.44475558400154114, 1.0363149642944336, 0.30145689845085144, -0.0030756627675145864, 0.7402055263519287, -0.7382535934448242, 0.16988493502...
func (r *PolicyRequest) Delete(ctx context.Context) error { return r.JSONRequest(ctx, "DELETE", "", nil, nil) }
[ -0.3053985834121704, 0.008206108585000038, 0.3430824279785156, 0.3960340917110443, 0.8820463418960571, 0.39954322576522827, -0.6946648955345154, -0.6562971472740173, 0.8868339657783508, 0.1968141496181488, 0.44062912464141846, 0.9791226983070374, -0.6752275228500366, 0.12994132936000824, ...
func (r *PolicySetRequest) Get(ctx context.Context) (resObj *PolicySet, err error) { var query string if r.query != nil { query = "?" + r.query.Encode() } err = r.JSONRequest(ctx, "GET", query, nil, &resObj) return }
[ -0.7885288000106812, -0.0580022968351841, 0.18511831760406494, -0.7741355299949646, -0.12077810615301132, -0.27701878547668457, -0.8265059590339661, -1.1670163869857788, 0.20152512192726135, -0.4514484107494354, 0.569835901260376, 1.1068649291992188, -0.8916208744049072, -0.530284881591796...
func (r *PolicySetRequest) Update(ctx context.Context, reqObj *PolicySet) error { return r.JSONRequest(ctx, "PATCH", "", reqObj, nil) }
[ -1.1985095739364624, -1.0025639533996582, 0.011475909501314163, -0.6464666128158569, -0.883687436580658, 0.8220548629760742, -0.5803766846656799, -0.8837153315544128, 0.2591923773288727, 0.09469790011644363, 0.19904401898384094, 0.9915708899497986, -0.964724063873291, 0.041886039078235626,...
func (r *PolicySetRequest) Delete(ctx context.Context) error { return r.JSONRequest(ctx, "DELETE", "", nil, nil) }
[ -0.41305840015411377, 0.14668092131614685, 0.27282270789146423, -0.0751795694231987, 0.11378193646669388, 0.12141318619251251, -0.698491096496582, -0.978718638420105, 0.1889248490333557, 0.025838511064648628, 0.5893435478210449, 1.1043946743011475, -1.063954472541809, 0.17960169911384583, ...
func (r *PolicySetAssignmentRequest) Get(ctx context.Context) (resObj *PolicySetAssignment, err error) { var query string if r.query != nil { query = "?" + r.query.Encode() } err = r.JSONRequest(ctx, "GET", query, nil, &resObj) return }
[ -1.3268709182739258, -0.5975953936576843, 0.19261173903942108, -0.5965688824653625, -0.4361627697944641, -0.38306453824043274, -0.4562673568725586, -1.1176360845565796, -0.41785284876823425, -0.0578148253262043, 0.685638427734375, 1.1039834022521973, -0.629347026348114, -0.2929570972919464...
func (r *PolicySetAssignmentRequest) Update(ctx context.Context, reqObj *PolicySetAssignment) error { return r.JSONRequest(ctx, "PATCH", "", reqObj, nil) }
[ -1.5846768617630005, -1.4901182651519775, 0.081416055560112, -0.43331295251846313, -1.1488655805587769, 0.7636099457740784, -0.3003205955028534, -0.8054878115653992, -0.03423478081822395, 0.5733886957168579, 0.34483253955841064, 0.7652109861373901, -0.5903191566467285, 0.16202832758426666,...
func (r *PolicySetAssignmentRequest) Delete(ctx context.Context) error { return r.JSONRequest(ctx, "DELETE", "", nil, nil) }
[ -0.6168212890625, -0.6631805896759033, 0.29692867398262024, 0.1358422189950943, -0.37633785605430603, 0.27420151233673096, -0.10953646898269653, -0.5691919922828674, -0.3652796745300293, 0.3774682581424713, 0.6592593789100647, 0.9175992012023926, -0.7361803650856018, 0.42127639055252075, ...
func (r *PolicySetItemRequest) Get(ctx context.Context) (resObj *PolicySetItem, err error) { var query string if r.query != nil { query = "?" + r.query.Encode() } err = r.JSONRequest(ctx, "GET", query, nil, &resObj) return }
[ -0.9355497360229492, 0.060205187648534775, 0.045723121613264084, -0.16098198294639587, -0.30382803082466125, 0.024484386667609215, -1.1259491443634033, -1.1759060621261597, -0.27228018641471863, -0.2328634262084961, 0.29938843846321106, 1.1236788034439087, -0.7998518347740173, -0.678398311...
func (r *PolicySetItemRequest) Update(ctx context.Context, reqObj *PolicySetItem) error { return r.JSONRequest(ctx, "PATCH", "", reqObj, nil) }
[ -1.3617295026779175, -0.8631895780563354, -0.04964522272348404, -0.04612869396805763, -0.7757581472396851, 0.9206019043922424, -0.7932566404342651, -0.9355379343032837, 0.12076707929372787, 0.1334240734577179, -0.07929683476686478, 0.9553860425949097, -0.9133899807929993, -0.35001665353775...
func (r *PolicySetItemRequest) Delete(ctx context.Context) error { return r.JSONRequest(ctx, "DELETE", "", nil, nil) }
[ -0.5796435475349426, 0.05339716374874115, 0.1557779312133789, 0.4644848108291626, 0.1809612512588501, 0.329617440700531, -0.9109554290771484, -0.9569949507713318, -0.003240828635171056, 0.1383844017982483, 0.2464553564786911, 1.1538909673690796, -1.0172107219696045, -0.20132210850715637, ...
func create_lists(words []string) ([676]wordlists, [676]wordlists) { sp := [676]wordlists{} ep := [676]wordlists{} // initialize list with start and end pair of literals for i:='a'; i<='z'; i++ { for j:='a'; j<='z'; j++ { sp[26*(i-'a') + (j-'a')].char = string(i) + string(j) ...
[ 0.11169163882732391, -0.8496828079223633, 0.7817085981369019, -1.245848536491394, -0.7486591935157776, 0.24951964616775513, 0.418865442276001, 0.6013827919960022, 1.158146858215332, 0.8134850859642029, 0.27409109473228455, -0.42431092262268066, -0.4879423975944519, 0.23815511167049408, -...
func in_queue(nd node, que []node) (bool) { for _, cur := range que { if nd.name == cur.name && nd.end == cur.end { return true } } return false }
[ -0.022439952939748764, -0.6455338001251221, 0.6052010655403137, -0.5355384349822998, -0.8587329387664795, 0.097956582903862, -1.0946043729782104, -0.9362375736236572, -0.9785942435264587, 0.8821422457695007, -0.40257197618484497, 0.9202423691749573, 0.26685717701911926, 0.4427928924560547,...
func search(start *node, end *node , sp [676]wordlists, ep [676]wordlists) (*node){ if start.name == end.name { return start } var st_index, en_index uint16 var _arr_st_index, _arr_en_index []uint16 var wlen uint8 var cur [110000]node var child node var ndC uint64 ndC = 0 ...
[ 0.20689058303833008, 0.253694087266922, 0.9251551628112793, -0.896455705165863, -1.3712161779403687, -0.2695261836051941, 0.5067826509475708, -0.19872306287288666, -0.16055604815483093, 0.760646641254425, 0.08583676815032959, 0.391389399766922, -0.6562691926956177, 0.29642945528030396, -...
func (m *ImageReference) Validate(formats strfmt.Registry) error { var res []error if err := m.validateCreationDate(formats); err != nil { res = append(res, err) } if err := m.validateDescription(formats); err != nil { res = append(res, err) } if err := m.validateHref(formats); err != nil { res = append(...
[ -0.4826735556125641, -0.32300084829330444, 0.42977625131607056, -0.5828514695167542, 0.41798198223114014, -0.32841557264328003, 0.22359314560890198, -0.9783452749252319, -0.49207890033721924, 0.6954717040061951, 0.45006218552589417, 0.4147588014602661, -0.6719518303871155, 0.99056243896484...
func (m *ImageReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateSpecifications(ctx, formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
[ -0.6824014782905579, -0.5336098670959473, 0.023861287161707878, -0.7211251854896545, 0.3335939347743988, 0.05180402845144272, -0.15514428913593292, -0.12815755605697632, 0.4046587347984314, 1.0527352094650269, 0.7321958541870117, 1.0616581439971924, -0.8043569326400757, 0.6587798595428467,...
func ErrCouldNotStart() error { return errors.New("Game: couldn't start the Game loop, set up the Game first") }
[ 0.2313452512025833, -0.20506562292575836, 0.39492067694664, -0.2497388869524002, 0.3364167809486389, 1.2987807989120483, -0.0962650254368782, -0.5747440457344055, -0.2497694194316864, 0.92693030834198, -0.3025533854961395, 0.7866525650024414, -0.10234016180038452, 0.1331532597541809, -0....
func Loop(gm Game) (Game, again, error) { if !gm.isReady() { return DeadGame(), false, ErrCouldNotStart() } game, more := turn(gm, gm.player1) if !more { return game, false, nil } g, more := turn(game, game.player2) return g, more, nil }
[ -1.8041317462921143, 0.02872217632830143, 0.6969175934791565, 0.26825007796287537, -0.670957088470459, 1.080425500869751, -0.3982750177383423, -1.0133793354034424, -0.08719996362924576, 1.8237030506134033, 0.15935420989990234, 0.5621108412742615, -0.403579980134964, 0.17547349631786346, ...
func ioAddrToEvmAddr(ioAddr string) (common.Address, error) { address, err := address.FromString(ioAddr) if err != nil { return common.Address{}, err } return common.BytesToAddress(address.Bytes()), nil }
[ -0.7973851561546326, -0.39915570616722107, 0.6570296287536621, -0.784515380859375, 0.2954980731010437, -0.08910973370075226, 0.0014320110203698277, -0.1561248004436493, 1.1934376955032349, 0.31250929832458496, 0.4819708466529846, 0.5496079325675964, -0.24735336005687714, -0.043486461043357...
func stringToBytes32(delegateName string) [32]byte { var name [32]byte copy(name[:], delegateName) return name }
[ 1.0088846683502197, -0.1556926816701889, 0.48868975043296814, -1.3385498523712158, -0.37322255969047546, 0.5144580006599426, -1.4733880758285522, -1.1559547185897827, 0.3399273455142975, 0.02294752188026905, -0.6648842096328735, 0.9266402125358582, 0.5311389565467834, -0.048355307430028915...
func (route *Route) findRoute(parts []string, params *HttpParams, stack *RouteStack) (*HttpParams, HandleFunction, error) { if len(parts) > 0 && len(route.Children) > 0 { for _, child := range route.Children { if child.IsRouteMatching(parts[0]) { stack.Push(child) } } } else if len(parts) > 0 && len(ro...
[ -0.4725848138332367, 0.20349320769309998, 1.0269434452056885, 0.7369965314865112, 0.6196641325950623, -1.0149462223052979, -0.07028421759605408, -0.5913167595863342, -0.9417703151702881, 0.886570155620575, 0.6599823236465454, -0.3977006673812866, -1.0943334102630615, 1.2555582523345947, ...
func ParseAlgorithmType(algo string) AlgorithmType { if algo == string(Box) { return Box } else if algo == string(RSASymmetric) { return RSASymmetric } else if algo == string(RSAAsymmetric) { return RSAAsymmetric } return None }
[ 0.47862955927848816, -0.2000337392091751, 0.3049180805683136, -0.45402705669403076, -0.2949758470058441, -0.6380154490470886, -0.20058585703372955, -0.8644533753395081, 0.5983813405036926, 0.5718042850494385, 0.09712878614664078, 0.8418044447898865, 0.4193780720233917, 0.7020734548568726, ...
func NewAreaTopology(areas ...*Area) *AreaTopology { t := &AreaTopology{areas: areas} counter := 0 // Initialization phase to create the topology for each individual area. for _, area := range t.areas { area.nodes = make(map[Node][]Link) nodes := make([]Node, area.N) // 1. Create the nodes of the area fo...
[ -0.061335496604442596, -0.19058683514595032, 0.7405301332473755, -0.4874451160430908, -0.6354601979255676, -0.40680328011512756, -0.05424140766263008, 0.15547989308834076, 0.5518425703048706, 0.0942893847823143, 0.37540799379348755, -0.4798702001571655, 0.8853909969329834, -0.4173374474048...
func (t *AreaTopology) Len() int { n := 0 for _, area := range t.areas { n += len(area.nodes) } return n }
[ 0.08026335388422012, -0.0908527597784996, 0.10881595313549042, -0.9013397693634033, -0.08396100997924805, 0.13107618689537048, 1.4734282493591309, 0.32585522532463074, 0.2945631742477417, -0.004084635525941849, -0.27606478333473206, -0.1734291911125183, 1.8326762914657593, -0.1816980242729...
func (t *AreaTopology) GetNodes() []Node { nodes := make([]Node, 0) for _, area := range t.areas { for node := range area.nodes { nodes = append(nodes, node) } } return nodes }
[ -0.07970111817121506, -0.2519710063934326, 0.28328651189804077, -0.33240002393722534, 1.1680996417999268, 0.3553677797317505, 0.2416796088218689, -0.08839453011751175, 0.5566930770874023, 0.5352643132209778, 0.7337818145751953, 0.5387511849403381, 0.5354065895080566, 0.3138697147369385, ...
func (t *AreaTopology) Rules(target NodeID, mapping map[NodeID]string) []Rule { for _, area := range t.areas { for node, links := range area.nodes { if node.Name == target { rules := make([]Rule, 0, len(links)) for _, link := range links { rules = append(rules, Rule{ IP: mapping[link.Distant...
[ -0.2779684066772461, -0.5766515135765076, 0.3430035412311554, -1.1297540664672852, 0.501184344291687, 0.28036320209503174, -0.3326769173145294, 0.1911430060863495, 0.2757173776626587, 0.11082609742879868, 1.5263618230819702, 0.5472317934036255, 1.1430686712265015, -0.15730620920658112, -...
func (_m *FormationConstraintSvc) ListMatchingConstraints(ctx context.Context, formationTemplateID string, location formationconstraint.JoinPointLocation, details formationconstraint.MatchingDetails) ([]*model.FormationConstraint, error) { ret := _m.Called(ctx, formationTemplateID, location, details) var r0 []*model...
[ -0.4338364005088806, -0.7410739064216614, 0.43134811520576477, 0.2851426601409912, -0.2626509368419647, -0.1264667809009552, 0.44496989250183105, 0.679654598236084, -0.11237920075654984, -0.4327983260154724, -0.8364202380180359, -0.6710871458053589, 0.09475737065076828, 0.1767830103635788,...
func NewFormationConstraintSvc(t mockConstructorTestingTNewFormationConstraintSvc) *FormationConstraintSvc { mock := &FormationConstraintSvc{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }
[ -1.0355687141418457, -1.2152756452560425, 0.1307445466518402, 0.037456560879945755, -0.4570113718509674, 0.07811329513788223, 0.2709673047065735, -0.7072020769119263, -0.21697083115577698, -0.5895239114761353, -0.16350580751895905, -0.3299923837184906, 0.3978698253631592, 0.424581646919250...