text
stringlengths
11
6.3k
embedding
listlengths
768
768
func GetTableVectorAsMonster(table *flatbuffers.Table) *Monster { n := flatbuffers.GetUOffsetT(table.Bytes[table.Pos:]) x := &Monster{} x.Init(table.Bytes, n+table.Pos) return x }
[ -0.5316776037216187, -0.2734149992465973, 0.45047256350517273, 0.04088585451245308, -0.4473835527896881, -0.2516542077064514, -0.698218584060669, -0.3061651587486267, -0.0026214751414954662, -0.3726942539215088, -0.520393431186676, 0.49689069390296936, 0.041190166026353836, 0.1385648995637...
func GetTableAsMonster(table *flatbuffers.Table) *Monster { x := &Monster{} x.Init(table.Bytes, table.Pos) return x }
[ -0.1349143385887146, -0.2834828197956085, 0.30800682306289673, -0.2264319360256195, -0.6808091402053833, -0.41431930661201477, -0.7503414154052734, -0.29650118947029114, -0.4559558629989624, -0.9768540263175964, -1.0011494159698486, 0.22815249860286713, -0.10903424024581909, 0.488551944494...
func (t *WeaponT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT { if t == nil { return 0 } nameOffset := flatbuffers.UOffsetT(0) if len(t.Name) > 0 { nameOffset = builder.CreateString(t.Name) } // pack process all field WeaponStart(builder) WeaponAddColor(builder, t.Color) WeaponAddPower(builde...
[ -0.06695230305194855, 0.42588016390800476, 0.5803703665733337, -0.6297260522842407, -0.44511982798576355, 0.575374186038971, 0.5233206748962402, 0.45333993434906006, 0.00043000056757591665, -0.35478904843330383, -0.6448949575424194, -0.2556854784488678, 0.2764718532562256, 0.73238372802734...
func (rcv *Weapon) UnPackTo(t *WeaponT) { t.Color = rcv.Color() t.Power = rcv.Power() t.Name = string(rcv.Name()) }
[ -0.34884577989578247, -0.2352706342935562, 0.5480790734291077, -2.0345585346221924, 0.32865965366363525, -1.1184676885604858, -0.010212822817265987, 0.22504058480262756, -0.6442698836326599, 0.5899513363838196, -1.1670777797698975, 0.7841891050338745, 1.1764485836029053, -0.141845867037773...
func GetRootAsWeapon(buf []byte, offset flatbuffers.UOffsetT) *Weapon { n := flatbuffers.GetUOffsetT(buf[offset:]) x := &Weapon{} x.Init(buf, n+offset) return x }
[ 0.30548569560050964, -0.6102657914161682, 0.4709962010383606, -0.47791433334350586, -0.4531231224536896, 0.22044385969638824, 0.3720811605453491, -0.11118000000715256, 0.2141171544790268, -0.5052112936973572, -0.4780768156051636, 0.8559081554412842, -0.005780812818557024, -0.58019113540649...
func GetTableVectorAsWeapon(table *flatbuffers.Table) *Weapon { n := flatbuffers.GetUOffsetT(table.Bytes[table.Pos:]) x := &Weapon{} x.Init(table.Bytes, n+table.Pos) return x }
[ -0.06939835846424103, -0.32360216975212097, 0.41185542941093445, 0.5170316100120544, -0.5347718596458435, 0.061952218413352966, -0.1743721067905426, -0.6577430367469788, 0.01075771264731884, -0.28424185514450073, -0.6926769614219666, 0.9572312831878662, 0.4519099295139313, -0.2709864377975...
func GetTableAsWeapon(table *flatbuffers.Table) *Weapon { x := &Weapon{} x.Init(table.Bytes, table.Pos) return x }
[ 0.4665360450744629, -0.28966468572616577, 0.2937982380390167, 0.4920988976955414, -0.37145107984542847, -0.06067270785570145, -0.1756359189748764, -0.7272698283195496, -0.19740590453147888, -0.8105486035346985, -1.1126441955566406, 0.7192916870117188, 0.45145416259765625, -0.06950099021196...
func (t *SpaceShipT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT { if t == nil { return 0 } nameOffset := flatbuffers.UOffsetT(0) if len(t.Name) > 0 { nameOffset = builder.CreateString(t.Name) } // pack process all field SpaceShipStart(builder) sizeOffset := t.Size.Pack(builder) SpaceShipAddS...
[ -0.5388222932815552, 0.7128501534461975, 0.5303331017494202, -0.6968739628791809, -0.9503195285797119, 0.9743841290473938, 0.3270835876464844, 0.6640326976776123, 0.5173775553703308, -0.68753981590271, -0.7201221585273743, -0.3900998830795288, 0.20483286678791046, 0.8199884295463562, 0.4...
func (rcv *SpaceShip) UnPackTo(t *SpaceShipT) { t.Size = rcv.Size(nil).UnPack() t.Power = rcv.Power() t.Name = string(rcv.Name()) }
[ -0.7546624541282654, 0.23438605666160583, 0.5108062028884888, -1.9853779077529907, -0.1032349169254303, -1.0717726945877075, -0.21576663851737976, 0.5494250059127808, -0.1557762175798416, 0.004587860312312841, -1.0147690773010254, 0.5694952607154846, 1.0342119932174683, 0.18065980076789856...
func GetRootAsSpaceShip(buf []byte, offset flatbuffers.UOffsetT) *SpaceShip { n := flatbuffers.GetUOffsetT(buf[offset:]) x := &SpaceShip{} x.Init(buf, n+offset) return x }
[ -0.183306023478508, -0.4038432836532593, 0.4439758360385895, -0.21431909501552582, -0.9088577032089233, 0.46512821316719055, -0.5412436127662659, -0.14895792305469513, 0.6402769684791565, -1.4224244356155396, 0.18031767010688782, 1.3347655534744263, -0.0036668642424046993, -0.0494380407035...
func GetTableVectorAsSpaceShip(table *flatbuffers.Table) *SpaceShip { n := flatbuffers.GetUOffsetT(table.Bytes[table.Pos:]) x := &SpaceShip{} x.Init(table.Bytes, n+table.Pos) return x }
[ -0.957983672618866, -0.20324654877185822, 0.4784717559814453, 0.2568730115890503, -1.0241429805755615, 0.2067405879497528, -0.3912540078163147, -0.5691564679145813, 0.6308420896530151, -0.4335406720638275, -0.24130146205425262, 0.8758592009544373, 0.21188320219516754, -0.08941760659217834,...
func GetTableAsSpaceShip(table *flatbuffers.Table) *SpaceShip { x := &SpaceShip{} x.Init(table.Bytes, table.Pos) return x }
[ -0.4955565929412842, -0.20720772445201874, 0.3180302679538727, 0.33120450377464294, -1.26872980594635, 0.12105485051870346, -0.6365236639976501, -0.5341533422470093, 0.24594871699810028, -1.0894438028335571, -0.5535122752189636, 0.5464491844177246, 0.22091463208198547, 0.2554948627948761, ...
func main() { fmt.Println("My favorite number is:", rand.Intn(10)) }
[ 0.0017321931663900614, 0.2815847396850586, 0.6291841268539429, 0.4596710205078125, 0.42915040254592896, 0.7154158353805542, 0.8685224056243896, 0.9394823312759399, -0.06128081679344177, -0.4762837588787079, -0.7019893527030945, 0.9584092497825623, -0.008730900473892689, -0.1973864287137985...
func (b *BioBag) Add(item *fruit.FruitItem) bool { if b.Count < 5 { b.List[b.Count] = item b.Count += 1 return true } else { fmt.Println("Bag이 다 찼습니다. 새로운 Bag에 넣어주세요.") return false } }
[ -1.4268361330032349, 0.29028889536857605, 0.6644043922424316, 0.9754347801208496, 0.07192400097846985, 1.3071587085723877, 0.2775347828865051, -0.2185204178094864, -0.1103348657488823, -0.23246847093105316, -1.0790778398513794, -0.43769314885139465, -1.0566234588623047, 0.2594066262245178,...
func (b *BioBag) Remove() bool { if b.Count == 0 { fmt.Println("Bag이 비어있습니다. 비울수 없습니다.") return false } else { b.List[b.Count-1] = nil b.Count -= 1 return true } }
[ -0.897983729839325, 0.12662069499492645, 0.5893465876579285, 0.7522125840187073, -0.03088679350912571, 0.4988894462585449, 0.4981952905654907, 1.016831874847412, -0.18979468941688538, 0.17342305183410645, -1.2292203903198242, -0.24025695025920868, -1.9001340866088867, 0.2488763928413391, ...
func init() { // Compila i templates e li inserisce nella mappa templates. go istantiateInternalTemplates() // key must be 16, 24 or 32 bytes long (AES-128, AES-192 or AES-256) token := make([]byte, 32) key := []byte(fmt.Sprint(rand.Read(token))) store = sessions.NewCookieStore(key) footerData.Anno = Anno foote...
[ -0.4753061830997467, 0.34893521666526794, 0.4488721489906311, -0.16854360699653625, -0.3439346253871918, 0.6805002093315125, 0.034134168177843094, 0.27161622047424316, -0.08468183130025864, -0.019680991768836975, -0.8346444964408875, 0.35688677430152893, -0.14328135550022125, 0.35001063346...
func (m RoverCluster) ValidateEnumValue() (bool, error) { errMessage := []string{} if _, ok := GetMappingLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleSt...
[ -0.9501343369483948, -0.5924919843673706, 0.9374393820762634, -0.2621781527996063, -0.07196740061044693, 0.2729947865009308, 0.39978113770484924, -0.2727667987346649, 0.1513841599225998, 0.453363299369812, 0.2876475751399994, 0.27079087495803833, -0.5536020398139954, 0.8513426184654236, ...
func GetRoverClusterShippingPreferenceEnumValues() []RoverClusterShippingPreferenceEnum { values := make([]RoverClusterShippingPreferenceEnum, 0) for _, v := range mappingRoverClusterShippingPreferenceEnum { values = append(values, v) } return values }
[ -1.0924830436706543, -0.6896407604217529, 0.7183359265327454, 0.2452467679977417, 0.9149050712585449, -0.15006858110427856, -0.6510579586029053, -0.09848729521036148, 0.5900672078132629, 1.107215404510498, -0.4182531535625458, 0.9390531182289124, -0.73943030834198, -0.6472483277320862, 0...
func GetRoverClusterShippingPreferenceEnumStringValues() []string { return []string{ "ORACLE_SHIPPED", "CUSTOMER_PICKUP", } }
[ -0.5907257795333862, -0.4899434745311737, 0.6166365742683411, -0.10061073303222656, 0.9107346534729004, -0.10580670833587646, -1.2423174381256104, -0.3925720155239105, 0.3390691876411438, 1.482322335243225, 0.15749120712280273, 1.0429667234420776, 0.05044076591730118, -0.6510822176933289, ...
func GetMappingRoverClusterShippingPreferenceEnum(val string) (RoverClusterShippingPreferenceEnum, bool) { enum, ok := mappingRoverClusterShippingPreferenceEnumLowerCase[strings.ToLower(val)] return enum, ok }
[ -1.297753930091858, -0.7275046706199646, 0.6917653679847717, -0.137863427400589, 0.11189036071300507, 0.025429077446460724, -0.5583833456039429, -0.2666850984096527, 0.7281156182289124, 0.8867352604866028, 0.2985819876194, 0.45294612646102905, -0.7562925219535828, -0.6029260754585266, 0....
func (db *Repo) GetAccountByNumber(number string) (*model.Account, error) { account := new(model.Account) err := db.db.QueryRow(utils.SELECT_ACCOUNT_BY_NUMBER, number).Scan(&account.AccountNumber, &account.CustomerName, &account.Balance) if err != nil { return nil, errors.New("User not found") } return account,...
[ 0.26789942383766174, 0.008487020619213581, 0.4134870767593384, 0.9220234751701355, 0.23633478581905365, -0.375677227973938, 1.3158481121063232, -0.7975614070892334, 0.44023677706718445, 0.16958530247211456, 0.32771632075309753, 0.05589795485138893, 0.35177043080329895, -0.03442332148551941...
func (db *Repo) UpdateSenderBalance(transfer *model.Transfer) error { tx, err := db.db.Begin() if err != nil { return err } stmt, err := tx.Prepare(utils.UPDATE_SENDER_BALANCE) if err != nil { tx.Rollback() return err } _, err = stmt.Exec(transfer.Amount, transfer.FromAccountNumber) if err != nil { tx.R...
[ -0.6168535351753235, -0.43310239911079407, 0.6866652369499207, -0.4555962383747101, -1.0064159631729126, -0.12088119238615036, 0.5980097651481628, -0.09259303659200668, -0.0845828503370285, 1.217258334159851, -0.9646759033203125, -0.3153795599937439, -0.7484593987464905, 0.679358959197998,...
func (db *Repo) UpdateReceiverBalance(transfer *model.Transfer) error { tx, err := db.db.Begin() if err != nil { return err } stmt, err := tx.Prepare(utils.UPDATE_RECEIVER_BALANCE) if err != nil { tx.Rollback() return err } _, err = stmt.Exec(transfer.Amount, transfer.ToAccountNumber) if err != nil { tx...
[ -0.9500393867492676, -0.3061944246292114, 0.43702372908592224, -1.2101463079452515, -0.4947240650653839, -0.2530052065849304, 0.6220720410346985, -0.05264440178871155, 0.16012287139892578, 0.6634724736213684, -0.4177188277244568, -0.6051327586174011, -0.42835208773612976, 0.171555429697036...
func (g *Gom) NewSetParams() *SetParams { sp := new(SetParams) sp.Timeout = 30 return sp }
[ -0.02114374376833439, 0.22756211459636688, 0.1781233698129654, 0.48793819546699524, -0.12250836193561554, -0.2775252163410187, -0.6331428289413452, -0.404655784368515, -1.0455149412155151, 1.2650645971298218, 0.03394510969519615, 0.7782377600669861, -1.0021458864212036, 0.9110358953475952,...
func NewTask(taskGroup *TaskGroup, targetKind NodeType, addr string, tls bool) *Task { ctx, cancel := context.WithCancel(context.Background()) return &Task{ TaskModel: &TaskModel{ TaskGroupID: taskGroup.ID, State: TaskStateRunning, Addr: addr, TargetKind: targetKind, StartedAt: time.N...
[ -0.11611370742321014, 0.3611210882663727, 0.19685155153274536, 0.45466306805610657, -0.726071298122406, -0.09860812872648239, -0.14561337232589722, -0.08822114765644073, -0.5667869448661804, 0.7821268439292908, 0.498283714056015, 1.097629427909851, 0.17647267878055573, -0.2929365038871765,...
func NewTaskGroup(db *dbstore.DB, profileDurationSecs uint) *TaskGroup { return &TaskGroup{ TaskGroupModel: &TaskGroupModel{ State: TaskStateRunning, ProfileDurationSecs: profileDurationSecs, }, db: db, } }
[ 0.6686562299728394, 0.6114553809165955, 0.22045113146305084, 0.13865794241428375, -1.1800438165664673, 0.168743297457695, 0.21902692317962646, -0.7144907712936401, -0.775856614112854, 0.4447248876094818, -0.1647772639989853, 0.2876265048980713, 0.1525707244873047, 0.3997958302497864, -0....
func equalStringSlice(a, b []string) bool { if len(a) != len(b) { return false } for i := 0; i < len(a); i++ { if a[i] != b[i] { return false } } return true }
[ -0.4697277843952179, -0.4667532742023468, 0.5003601312637329, -0.39456042647361755, 0.8453322052955627, -0.735990583896637, -1.3389180898666382, -0.6346387267112732, -0.3968662619590759, 0.9574724435806274, 0.394995778799057, 1.2400697469711304, 0.11987802386283875, -0.28812652826309204, ...
func equalStringSliceIgnoreOrder(a, b []string) bool { if len(a) != len(b) { return false } for i := 0; i < len(a); i++ { found := false for j := 0; j < len(b); j++ { if a[i] == b[j] { found = true break } } if !found { return false } } return true }
[ 0.16760189831256866, -0.43255576491355896, 0.9542270302772522, -0.941416323184967, 0.34045469760894775, -0.5944129228591919, -1.420954704284668, -0.4534739553928375, 0.037504907697439194, 1.3556580543518066, -0.3688136637210846, 0.6554160118103027, -0.5399662852287292, -0.3243388235569, ...
func (*ObservedWorkload) Descriptor() ([]byte, []int) { return file_api_protoc_entity_observed_workload_message_proto_rawDescGZIP(), []int{0} }
[ -0.31379759311676025, 0.6979781985282898, 0.4042889475822449, -0.9892020225524902, -0.2613312005996704, 0.13846111297607422, 0.9409294724464417, -0.6254315972328186, -0.4231703579425812, 0.20320938527584076, -0.584797739982605, 0.7747225165367126, -0.28786370158195496, 0.5878506302833557, ...
func (*ObservedWorkload_PrincipalAcceptance) Descriptor() ([]byte, []int) { return file_api_protoc_entity_observed_workload_message_proto_rawDescGZIP(), []int{0, 0} }
[ -0.5819873809814453, -0.08211247622966766, 0.35078054666519165, -0.8212923407554626, -0.48295509815216064, 0.02797507680952549, 1.1510632038116455, -0.23663845658302307, -0.47157201170921326, 1.341823935508728, 0.257568359375, 0.2335248738527298, -0.7880855798721313, 0.3523772656917572, ...
func (r *FunctionLength) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure { r.configure(arguments) var failures []lint.Failure walker := lintFuncLength{ file: file, maxStmt: r.maxStmt, maxLines: r.maxLines, onFailure: func(failure lint.Failure) { failures = append(failures, failure) ...
[ 0.2724294066429138, -0.018551072105765343, 0.4946456253528595, -0.12817759811878204, 0.028024137020111084, 0.42348700761795044, -0.09169270843267441, 0.7942822575569153, -0.40950536727905273, 0.08456632494926453, -0.7885557413101196, -0.047950055450201035, -0.27731597423553467, 1.648340821...
func (*FunctionLength) Name() string { return "function-length" }
[ 0.2396499514579773, -0.29413414001464844, 0.4997018873691559, -0.17759405076503754, -0.40727534890174866, 0.2993362843990326, -0.11776310950517654, -0.3774959444999695, 0.17617182433605194, 0.35367435216903687, -1.2689127922058105, 0.48631200194358826, 0.6020014882087708, 0.671558320522308...
func newBaseClient() *baseClient { return &baseClient{ httpClient: http.DefaultClient, method: "GET", header: make(http.Header), } }
[ -0.3473416566848755, -1.6791685819625854, 0.37881386280059814, 0.0778871551156044, -0.7156041860580444, -0.07048775255680084, -0.5850324034690857, -0.4039584994316101, -0.2562785744667053, -0.45389243960380554, -0.493937611579895, 1.0005604028701782, -1.012261152267456, -0.7709759473800659...
func (c *baseClient) New() *baseClient { // Copy headers header := make(http.Header) for k, v := range c.header { header[k] = v } return &baseClient{ httpClient: c.httpClient, method: c.method, url: c.url, header: header, } }
[ -0.14427432417869568, -2.1110334396362305, 0.44235745072364807, -0.3704991936683655, -0.9507206082344055, -0.1254177838563919, -0.22283917665481567, -0.7383638024330139, -0.5359218120574951, -0.08266901969909668, -0.31334438920021057, 0.5557557940483093, -0.26950061321258545, -0.4958879351...
func (c *baseClient) Client(httpClient *http.Client) *baseClient { if httpClient == nil { c.httpClient = http.DefaultClient } else { c.httpClient = httpClient } return c }
[ 0.3025619089603424, -0.01790584996342659, 0.11601749807596207, -0.16959339380264282, 0.00010243456199532375, 0.429958313703537, 0.6199971437454224, 0.26569920778274536, 0.46250662207603455, -0.487192302942276, -0.3347540497779846, 0.7376245856285095, -0.2234182357788086, 0.0853565111756324...
func (c *baseClient) Base(path string) *baseClient { c.url = path return c }
[ -0.19032183289527893, -1.2151660919189453, 0.1775941550731659, -0.2625502347946167, -0.054647672921419144, 0.7632811069488525, 0.7768961191177368, -0.14082886278629303, -0.48620733618736267, -0.4973801374435425, -0.5997670888900757, 0.20015355944633484, -0.5926474332809448, 0.3281584382057...
func (c *baseClient) Path(path string) *baseClient { baseURL, baseErr := url.Parse(c.url) pathURL, pathErr := url.Parse(path) // Bail on parsing error leaving the client's url unmodified if baseErr != nil || pathErr != nil { return c } c.url = baseURL.ResolveReference(pathURL).String() return c }
[ 0.06424383074045181, -0.4700489938259125, 0.21323613822460175, -0.5477249026298523, -0.31175196170806885, 0.4803101718425751, 0.47782087326049805, -0.24078582227230072, 0.0014370409771800041, -0.6235081553459167, 0.286239892244339, 0.11584919691085815, -0.8995804190635681, 0.23665434122085...
func (c *baseClient) QueryStruct(params interface{}) *baseClient { c.queryStruct = params return c }
[ 0.08013681322336197, -0.2908019721508026, -0.010153369978070259, -1.0224336385726929, -0.05901111289858818, 0.5648012757301331, 0.495850145816803, -0.4413069188594818, 0.4349396824836731, -1.5111963748931885, -0.2843175530433655, 0.5494647026062012, -0.7382389307022095, -0.57878178358078, ...
func (c *baseClient) SetBody(params interface{}) *baseClient { c.body = params return c }
[ -0.40853065252304077, 0.05323134362697601, 0.1283445507287979, 0.15351280570030212, 0.9454692602157593, 0.8101599216461182, 0.18280836939811707, -0.5378745794296265, 0.6850082874298096, 0.07487285137176514, -0.5822134017944336, 0.3077552914619446, -1.1365303993225098, 1.1606507301330566, ...
func (c *baseClient) AddHeader(key, value string) *baseClient { c.header.Add(key, value) return c }
[ -0.4861924350261688, 0.04305155947804451, 0.2930332124233246, 0.31284675002098083, -0.4453883171081543, 1.0357472896575928, -1.0281322002410889, -0.28788578510284424, -0.09724678844213486, -0.9052204489707947, 0.38159361481666565, 0.2645980417728424, -0.8709801435470581, 0.2132178992033004...
func (c *baseClient) SetHeader(key, value string) *baseClient { c.header.Add(key, value) return c }
[ -0.46652814745903015, 0.15111276507377625, 0.2248108983039856, -0.08169133961200714, -0.30827295780181885, 0.822035014629364, -0.7944220900535583, -0.04607284441590309, -0.17775459587574005, -0.5611808896064758, -0.07434473186731339, 0.4649290442466736, -0.48601484298706055, -0.11297968029...
func (c *baseClient) Get(path string) *baseClient { c.method = "GET" return c.Path(path) }
[ -0.32614174485206604, -0.47710832953453064, 0.09746596962213516, -0.7996301651000977, 0.5129345655441284, -0.18196548521518707, 0.188113272190094, -0.42206472158432007, -0.8897331357002258, -0.49312955141067505, 0.1980358362197876, 1.1365832090377808, -0.3918965756893158, -0.44476112723350...
func (c *baseClient) Post(path string) *baseClient { c.method = "POST" return c.Path(path) }
[ -0.024060582742094994, -0.26620444655418396, 0.1406836211681366, 0.2610279321670532, -0.06283435970544815, 0.4183781147003174, 0.35520139336586, -0.5188731551170349, -0.889654815196991, -1.2689415216445923, -0.17966264486312866, -0.1180865466594696, -0.5676347017288208, 0.38970747590065, ...
func (c *baseClient) Delete(path string) *baseClient { c.method = "DELETE" return c.Path(path) }
[ 0.3828596770763397, -0.1190519854426384, 0.14873085916042328, 0.14384333789348602, 0.7244351506233215, 0.22602494060993195, 0.803803026676178, -0.23741595447063446, -0.01209589559584856, -0.27965879440307617, 0.3498171269893646, 0.316337913274765, -0.9890899658203125, -0.28534454107284546,...
func (c *baseClient) Do(req *http.Request, successV, failureV interface{}) (*http.Response, error) { resp, err := c.httpClient.Do(req) if err != nil { return nil, err } defer resp.Body.Close() if resp.StatusCode >= 200 && resp.StatusCode < 300 { if successV != nil { err = json.NewDecoder(resp.Body).Decode(...
[ -0.5995445251464844, -0.43156829476356506, 0.8488450050354004, -0.12626929581165314, 0.21619881689548492, 0.3928777277469635, -1.2235625982284546, -0.6693052649497986, -0.16286343336105347, 0.2857987582683563, -0.5000200271606445, 1.1355198621749878, -0.15233033895492554, 0.385824948549270...
func (c *baseClient) Request() (*http.Request, error) { reqURL, err := url.Parse(c.url) if err != nil { return nil, err } if c.queryStruct != nil { err = addQueryStruct(reqURL, c.queryStruct) if err != nil { return nil, err } } body := &bytes.Buffer{} if c.body != nil { if err := json.NewEncoder(b...
[ -0.7709414958953857, -0.4152849614620209, 0.572956919670105, -0.38004037737846375, 0.5387160181999207, -0.12743671238422394, -0.34481656551361084, -0.4077175259590149, 0.07540551573038101, -0.8590583801269531, 0.31507638096809387, 0.6729111075401306, -0.2805774211883545, -0.020642321556806...
func (c *baseClient) Receive(successV, failureV interface{}) (*http.Response, error) { req, err := c.Request() if err != nil { return nil, err } return c.Do(req, successV, failureV) }
[ -0.6307481527328491, -0.36901041865348816, 0.5754740834236145, 0.5737513303756714, 0.6721033453941345, -0.20816126465797424, -0.6013891696929932, -0.7779622673988342, -0.3537309467792511, -0.6278778910636902, -0.017091894522309303, 0.7552739381790161, -0.17065009474754333, -0.0049738981761...
func addQueryStruct(reqURL *url.URL, queryStruct interface{}) error { urlValues, err := url.ParseQuery(reqURL.RawQuery) if err != nil { return err } queryValues, err := query.Values(queryStruct) if err != nil { return err } for k, vs := range queryValues { for _, v := range vs { urlValues.Add(k, v) }...
[ -0.5042997002601624, -0.36764436960220337, 0.3789985179901123, -0.5819313526153564, -0.3222492039203644, 0.36302220821380615, -1.0730658769607544, -0.1801231950521469, 0.33910202980041504, -1.2398244142532349, -0.2717478573322296, 0.22493146359920502, 0.44337379932403564, 0.430882751941680...
func genYaml(name string) error { return nil }
[ -0.16853494942188263, -0.006049100775271654, 0.5764331221580505, 0.3473820984363556, -0.49428775906562805, 0.8016743063926697, 1.4546973705291748, 0.6191207766532898, -0.0608428455889225, -0.5641977787017822, -1.1189031600952148, 0.21787099540233612, 0.8559407591819763, -0.0577379576861858...
func setRaftRole(t *testing.T, database *db.Node, address string) client.NodeStore { require.NoError(t, database.Transaction(context.Background(), func(ctx context.Context, tx *db.NodeTx) error { err := tx.UpdateConfig(map[string]string{"cluster.https_address": address}) if err != nil { return err } _, err...
[ 0.4256717562675476, 1.673123836517334, 0.4721539318561554, -1.9426262378692627, 0.8323798775672913, 0.00809265486896038, 0.5694673657417297, 0.12879185378551483, -0.6175093054771423, 0.44104596972465515, -0.23799002170562744, 0.8274367451667786, -1.1945934295654297, -0.6360293030738831, ...
func newServer(cert *shared.CertInfo, handler http.Handler) *httptest.Server { server := httptest.NewUnstartedServer(handler) server.TLS = util.ServerTLSConfig(cert) server.StartTLS() return server }
[ 0.31959789991378784, -0.855501651763916, 0.24680966138839722, 0.3209947645664215, -0.5713933706283569, 1.0888351202011108, 0.36097273230552673, 0.6327071785926819, -0.1759430468082428, -0.17915624380111694, -0.4543040692806244, 0.6218945384025574, -0.7405776977539062, 0.7074400782585144, ...
func saveToS3(key string, payload string) { // Set up the session and client for use. s3Session, _ := session.NewSession(&aws.Config{ Region: aws.String(region), Credentials: credentials.NewStaticCredentials(accessKey, secretKey, ""), }) s3Client := s3.New(s3Session) buffer := []byte(payload) fmt.Pri...
[ -0.49400389194488525, 0.5208845138549805, 0.6380426287651062, -0.6748713254928589, -0.21198870241641998, 1.089849829673767, -0.18427886068820953, -0.2791441082954407, -0.3266039788722992, 0.6014166474342346, -1.2784115076065063, 0.6687716245651245, -0.4124998152256012, -0.517134964466095, ...
func coordinatorSock() string { s := "/var/tmp/824-mr-" s += strconv.Itoa(os.Getuid()) return s }
[ 0.24840492010116577, -0.37332022190093994, 0.3626749813556671, -1.0373961925506592, 0.5110582709312439, 0.25311923027038574, 0.6955627799034119, -0.47396066784858704, -0.3403477668762207, -0.4747878313064575, 0.49607667326927185, 0.37341374158859253, -0.3465937077999115, -0.678439259529113...
func ParseConfig() (*Config, error) { parseIndexedVars("FILTER_METRICS_BLACK_LIST") parseIndexedVars("FILTER_METRICS_WHITE_LIST") parseIndexedVars("FILTER_METRICS_TAG_BLACK_LIST") parseIndexedVars("FILTER_METRICS_TAG_WHITE_LIST") nozzleConfig := &NozzleConfig{} err := envconfig.Process("nozzle", nozzleConfig) i...
[ 0.34143170714378357, 0.28309565782546997, 0.749686598777771, -0.5982277393341064, 0.11010493338108063, 0.35225433111190796, 1.088471531867981, 0.25083595514297485, -0.5007628202438354, 0.7435983419418335, -0.30489832162857056, 0.3954550623893738, -0.08242335915565491, 2.1675970554351807, ...
func parseIndexedVars(varName string) { idx := 1 for { v := os.Getenv(fmt.Sprintf("%s_%d", varName, idx)) if len(v) == 0 { break } newV := fmt.Sprintf("%s,%s", os.Getenv(varName), v) os.Setenv(varName, newV) idx++ } }
[ -1.2252833843231201, -0.4129584729671478, 0.6297098398208618, -0.7709465622901917, 0.23666828870773315, -0.19029416143894196, 0.4671672284603119, 0.04100930690765381, -0.8623426556587219, 0.3637208044528961, -0.48698756098747253, 0.36603567004203796, -0.41319772601127625, 0.354026645421981...
func Report(stat Textstat) error { stat.CharactersCount() stat.HistogramOfWords() stat.TheTopTen() return print(report{ TotalWords: stat.TotalWords(), UniqueWords: stat.UniqueWords(), AverageWordLength: stat.AverageWordLength(), ListOfWords: s...
[ 0.5534242987632751, 0.4388812184333801, 0.45104652643203735, -0.9594053030014038, -0.47926998138427734, -0.27316582202911377, 0.6445192694664001, -0.520611584186554, 0.14439226686954498, -0.45786532759666443, 0.06737753003835678, 0.03808218613266945, -0.1417817920446396, 1.0643553733825684...
func print(data interface{}) error { tmpl, err := template.New("tmpl").Parse(tmpl) if err != nil { return err } return tmpl.Execute(os.Stdout, data) }
[ 0.3724769651889801, 0.41717928647994995, 0.5641883015632629, -0.14453361928462982, -0.4818325936794281, 0.09948285669088364, -0.6357113122940063, -0.7918246388435364, 0.012946484610438347, -0.6197441220283508, 0.32951846718788147, -0.18402642011642456, -0.7702469825744629, 0.58408004045486...
func New(m marshaler.Type, conf config.IntegrationAMQPConfig) (*Integration, error) { var err error i := Integration{ marshaler: m, } log.Info("integration/amqp: connecting to amqp broker") i.chPool, err = newPool(10, conf.URL) if err != nil { return nil, errors.Wrap(err, "new amqp channel pool error") } ...
[ 0.16987015306949615, -0.2271745800971985, 0.23612599074840546, 0.10071837902069092, -0.7064814567565918, -0.16549330949783325, 0.37501925230026245, -0.006306549999862909, -0.3892064392566681, 1.469732403755188, -0.5310541987419128, -0.24729105830192566, -0.16910459101200104, 0.046297591179...
func (i *Integration) SendDataUp(ctx context.Context, vars map[string]string, pl pb.UplinkEvent) error { return i.publishEvent(ctx, pl.ApplicationId, pl.DevEui, "up", &pl) }
[ -0.7090723514556885, 0.26945894956588745, 0.5494640469551086, 0.004546830430626869, -0.10534808039665222, 0.8863341808319092, 0.37166914343833923, 0.2612590789794922, 0.7328665852546692, -0.0730803832411766, -0.6119762659072876, 0.9611072540283203, -0.0858440026640892, 0.11380821466445923,...
func (i *Integration) SendJoinNotification(ctx context.Context, vars map[string]string, pl pb.JoinEvent) error { return i.publishEvent(ctx, pl.ApplicationId, pl.DevEui, "join", &pl) }
[ -0.10667626559734344, 0.30072635412216187, 0.3353990912437439, 1.171367883682251, -0.6819882392883301, 1.2475920915603638, 0.2085869312286377, 0.20780767500400543, 0.15286530554294586, 0.23486608266830444, -1.3230327367782593, -0.03759807348251343, -0.8318339586257935, 0.0703723132610321, ...
func (i *Integration) SendACKNotification(ctx context.Context, vars map[string]string, pl pb.AckEvent) error { return i.publishEvent(ctx, pl.ApplicationId, pl.DevEui, "ack", &pl) }
[ -0.0424746498465538, 0.5195304155349731, 0.2621176540851593, 0.5395492911338806, -0.5056584477424622, -0.3219640851020813, 0.7027503848075867, -0.37480223178863525, 0.2569948136806488, 0.7466143369674683, -0.3709031343460083, 0.3391266465187073, 0.14164160192012787, 0.6777365207672119, -...
func (i *Integration) SendStatusNotification(ctx context.Context, vars map[string]string, pl pb.StatusEvent) error { return i.publishEvent(ctx, pl.ApplicationId, pl.DevEui, "status", &pl) }
[ -0.736248791217804, 0.3355855643749237, 0.2828138470649719, 1.066860318183899, -0.7972244024276733, 0.5370729565620422, 0.44019851088523865, 0.5825314521789551, 0.9109600186347961, 0.4958133399486542, -1.5337005853652954, 0.01830292120575905, -0.0039102546870708466, 0.6988080143928528, -...
func (i *Integration) SendLocationNotification(ctx context.Context, vars map[string]string, pl pb.LocationEvent) error { return i.publishEvent(ctx, pl.ApplicationId, pl.DevEui, "location", &pl) }
[ -0.6797034740447998, 0.032456133514642715, 0.21063415706157684, 0.7650460004806519, -0.5656431913375854, 0.6564738154411316, 0.8872877955436707, 0.22186996042728424, 0.6682228446006775, 0.23342035710811615, -0.7150174975395203, 0.0168048907071352, 0.11482877284288406, 0.31810715794563293, ...
func (i *Integration) SendTxAckNotification(ctx context.Context, vars map[string]string, pl pb.TxAckEvent) error { return i.publishEvent(ctx, pl.ApplicationId, pl.DevEui, "txack", &pl) }
[ 0.09213615953922272, 0.6066657900810242, 0.1991494596004486, 0.05560571327805519, -0.4955997169017792, -0.18806582689285278, 0.6818916201591492, 0.15658612549304962, 0.1347537636756897, 1.0989271402359009, -0.5669307708740234, -0.3388119041919708, -0.07129170000553131, 0.42963647842407227,...
func (i *Integration) Close() error { return i.chPool.close() }
[ 0.13597078621387482, 0.42512035369873047, 0.3268582224845886, -0.05462419241666794, 0.3894132375717163, 1.2949947118759155, 0.553525447845459, -0.9232094883918762, -1.216897964477539, -0.13478444516658783, -0.31740933656692505, 0.1328047215938568, -1.1502776145935059, 0.3646034002304077, ...
func NewBasicECSPodCreator(c cocoa.ECSClient, v cocoa.Vault) (*BasicECSPodCreator, error) { if c == nil { return nil, errors.New("missing client") } return &BasicECSPodCreator{ client: c, vault: v, }, nil }
[ 0.35601288080215454, -0.26307907700538635, 0.155214324593544, -0.19106453657150269, -0.04735822603106499, 0.4550517201423645, -1.0570650100708008, -1.344316005706787, -0.758000910282135, -0.1517893671989441, -1.107486367225647, -0.477693110704422, -0.06216813251376152, -0.23706184327602386...
func (pc *BasicECSPodCreator) CreatePod(ctx context.Context, opts ...cocoa.ECSPodCreationOptions) (cocoa.ECSPod, error) { mergedPodCreationOpts := cocoa.MergeECSPodCreationOptions(opts...) var mergedPodExecutionOpts cocoa.ECSPodExecutionOptions if mergedPodCreationOpts.ExecutionOpts != nil { mergedPodExecutionOpts...
[ -0.11744870245456696, 0.631493091583252, 0.7839662432670593, 0.5574240684509277, 0.5515772700309753, 0.6216184496879578, 0.3229203224182129, -0.6726598739624023, 0.31487101316452026, -0.1687694638967514, -0.43557432293891907, 0.08561248332262039, 0.17640946805477142, 0.17864617705345154, ...
func (pc *BasicECSPodCreator) CreatePodFromExistingDefinition(ctx context.Context, def cocoa.ECSTaskDefinition, opts ...cocoa.ECSPodExecutionOptions) (cocoa.ECSPod, error) { return nil, errors.New("TODO: implement") }
[ -0.2850283086299896, -0.5172083377838135, 0.35083234310150146, 0.13047969341278076, 0.901011049747467, 0.44282597303390503, 0.08734892308712006, -0.32536154985427856, -0.037502042949199677, 1.0880005359649658, -0.42944806814193726, -0.21884028613567352, 0.7499032616615295, 0.10368371754884...
func (pc *BasicECSPodCreator) createSecrets(ctx context.Context, opts *cocoa.ECSPodCreationOptions) error { var defs []cocoa.ECSContainerDefinition for i, def := range opts.ContainerDefinitions { defs = append(defs, def) containerName := utility.FromStringPtr(def.Name) var envVars []cocoa.EnvironmentVariable ...
[ -0.4196334779262543, 0.13667434453964233, 0.5270925760269165, 0.11905907839536667, 1.0890355110168457, 0.07156500965356827, -0.6052034497261047, -1.389779806137085, -0.5270702838897705, 0.3002459406852722, -0.5316272377967834, 0.01819007657468319, 0.08732736855745316, 1.0130484104156494, ...
func (pc *BasicECSPodCreator) createSecret(ctx context.Context, secret cocoa.SecretOptions) (id string, err error) { if pc.vault == nil { return "", errors.New("no vault was specified") } return pc.vault.CreateSecret(ctx, *cocoa.NewNamedSecret(). SetName(utility.FromStringPtr(secret.Name)). SetValue(utility.Fr...
[ 0.45317792892456055, 0.13108280301094055, 0.49590030312538147, 0.45034533739089966, 0.3592488169670105, -0.04369310662150383, -1.1525076627731323, -1.3926090002059937, -0.03910737857222557, -0.09245255589485168, -1.264147400856018, -0.7985408306121826, -0.7632150650024414, -0.2074858397245...
func (pc *BasicECSPodCreator) exportTags(tags map[string]string) []*ecs.Tag { var ecsTags []*ecs.Tag for k, v := range tags { var tag ecs.Tag tag.SetKey(k).SetValue(v) ecsTags = append(ecsTags, &tag) } return ecsTags }
[ -0.29465025663375854, 0.37966933846473694, 0.3089649975299835, -0.0891779437661171, 0.45087969303131104, 0.36432045698165894, -1.583456039428711, -1.0678653717041016, -0.06100805848836899, 0.7917220592498779, -0.9036172032356262, -0.017084578052163124, -0.3223623037338257, 0.89398193359375...
func (pc *BasicECSPodCreator) exportStrategy(opts *cocoa.ECSPodPlacementOptions) []*ecs.PlacementStrategy { var placementStrat ecs.PlacementStrategy placementStrat.SetType(string(*opts.Strategy)).SetField(utility.FromStringPtr(opts.StrategyParameter)) return []*ecs.PlacementStrategy{&placementStrat} }
[ 0.00879005528986454, 0.26476535201072693, 0.3072386384010315, -0.495126873254776, 0.3965049088001251, 0.39928340911865234, -0.2656502425670624, -0.645020067691803, 1.4044291973114014, 0.6623216867446899, 0.2913396656513214, 0.15685999393463135, 0.04194620996713638, 0.21688833832740784, 0...
func (pc *BasicECSPodCreator) exportPlacementConstraints(opts *cocoa.ECSPodPlacementOptions) []*ecs.PlacementConstraint { var constraints []*ecs.PlacementConstraint for _, filter := range opts.InstanceFilters { var constraint ecs.PlacementConstraint if filter == cocoa.ConstraintDistinctInstance { constraint.S...
[ -0.8471723794937134, -0.25837695598602295, 0.2984866201877594, -0.33068418502807617, -0.2972598671913147, 0.44147878885269165, 0.555888295173645, -0.5443540811538696, 1.015829086303711, 0.6421826481819153, -0.8838180899620056, -0.02142001874744892, -0.8398569226264954, 0.11809859424829483,...
func (pc *BasicECSPodCreator) exportEnvVars(envVars []cocoa.EnvironmentVariable) []*ecs.KeyValuePair { var converted []*ecs.KeyValuePair for _, envVar := range envVars { if envVar.SecretOpts != nil { continue } var pair ecs.KeyValuePair pair.SetName(utility.FromStringPtr(envVar.Name)).SetValue(utility.Fro...
[ -1.7584220170974731, -0.037427548319101334, 0.41817793250083923, -0.2535269260406494, -0.38662222027778625, 0.5522057414054871, -1.2102183103561401, -0.9638370871543884, -0.10480058938264847, 1.3782845735549927, -0.8937682509422302, -0.16594639420509338, -0.6649389266967773, 0.950265228748...
func (pc *BasicECSPodCreator) exportSecrets(envVars []cocoa.EnvironmentVariable) []*ecs.Secret { var secrets []*ecs.Secret for _, envVar := range envVars { if envVar.SecretOpts == nil { continue } var secret ecs.Secret secret.SetName(utility.FromStringPtr(envVar.Name)) secret.SetValueFrom(utility.FromS...
[ -0.6068859696388245, -0.12239645421504974, 0.445675790309906, 0.5602481365203857, 0.554381787776947, 0.5842288136482239, -0.9137117266654968, -1.1976101398468018, -0.23014479875564575, 0.9065701961517334, -0.7647283673286438, 0.24220608174800873, -0.22940729558467865, 0.6367147564888, 0....
func (pc *BasicECSPodCreator) translateContainerResources(containers []*ecs.Container, defs []cocoa.ECSContainerDefinition) []cocoa.ECSContainerResources { var resources []cocoa.ECSContainerResources for _, container := range containers { if container == nil { continue } name := utility.FromStringPtr(conta...
[ -0.5730941295623779, -0.3283607065677643, 0.3484300673007965, -0.17649878561496735, 0.5840050578117371, -1.0118063688278198, -0.6583452820777893, -0.08773011714220047, 0.4458819627761841, 0.43847110867500305, -0.6746008396148682, -1.5761098861694336, 0.6242266297340393, -0.0160223394632339...
func (pc *BasicECSPodCreator) translateContainerSecrets(defs []cocoa.ECSContainerDefinition) []cocoa.ContainerSecret { var translated []cocoa.ContainerSecret for _, def := range defs { for _, envVar := range def.EnvVars { if envVar.SecretOpts == nil { continue } cs := cocoa.NewContainerSecret(). ...
[ -0.24923379719257355, -0.301670104265213, 0.4618527293205261, 0.5091202855110168, 0.5608635544776917, -0.18345840275287628, -0.7177647352218628, -0.7137613892555237, -0.32665592432022095, 0.26341870427131653, -0.9852265119552612, -0.433977335691452, 0.8216915726661682, 0.45159468054771423,...
func translatePodStatusInfo(task *ecs.Task) cocoa.ECSPodStatusInfo { return *cocoa.NewECSPodStatusInfo(). SetStatus(translateECSStatus(task.LastStatus)). SetContainers(translateContainerStatusInfo(task.Containers)) }
[ 0.13102515041828156, -0.10053306818008423, 0.3078221380710602, -0.6171666383743286, -0.14812831580638885, 0.26677677035331726, -0.4363568127155304, -0.5698588490486145, -0.2547397315502167, -0.5110595226287842, -1.1315141916275024, -1.235008716583252, 1.4549800157546997, -0.219989776611328...
func translateContainerStatusInfo(containers []*ecs.Container) []cocoa.ECSContainerStatusInfo { var statuses []cocoa.ECSContainerStatusInfo for _, container := range containers { if container == nil { continue } status := cocoa.NewECSContainerStatusInfo(). SetContainerID(utility.FromStringPtr(container.C...
[ -0.008791348896920681, -1.24435555934906, 0.32594195008277893, -0.3368276357650757, 0.5816624760627747, -0.09233728796243668, -0.7315250039100647, -0.11395637691020966, 0.3362833559513092, -0.2748216688632965, -0.8927152752876282, -1.1256641149520874, 1.1278705596923828, 0.4917944073677063...
func translateECSStatus(status *string) cocoa.ECSStatus { if status == nil { return cocoa.StatusUnknown } switch *status { case TaskStatusProvisioning, TaskStatusPending, TaskStatusActivating: return cocoa.StatusStarting case TaskStatusRunning: return cocoa.StatusRunning case TaskStatusDeactivating, TaskSta...
[ -0.05675337463617325, -0.0743212103843689, 0.4564584493637085, -0.4544793963432312, 0.01710399240255356, 0.06070903688669205, -0.15913936495780945, -0.3128059208393097, 0.48843201994895935, -0.463474303483963, -0.9453615546226501, -0.8042179346084595, 1.1169798374176025, -0.298127532005310...
func (pc *BasicECSPodCreator) exportPodCreationOptions(opts cocoa.ECSPodCreationOptions) *ecs.RegisterTaskDefinitionInput { var taskDef ecs.RegisterTaskDefinitionInput var containerDefs []*ecs.ContainerDefinition for _, def := range opts.ContainerDefinitions { containerDefs = append(containerDefs, pc.exportContai...
[ 0.18101255595684052, 0.41463422775268555, 0.604648232460022, -0.007723688147962093, -0.2001788169145584, 0.2315162867307663, 0.17947381734848022, -0.7439522743225098, 0.05747479945421219, 0.1051609143614769, -0.6869797110557556, 0.05618811398744583, -0.06890852749347687, 0.3233498334884643...
func (pc *BasicECSPodCreator) exportContainerDefinition(def cocoa.ECSContainerDefinition) *ecs.ContainerDefinition { var containerDef ecs.ContainerDefinition if mem := utility.FromIntPtr(def.MemoryMB); mem != 0 { containerDef.SetMemory(int64(mem)) } if cpu := utility.FromIntPtr(def.CPU); cpu != 0 { containerDef...
[ 0.3861716091632843, -0.2338959276676178, 0.3335988521575928, 0.26330840587615967, -0.41775795817375183, -0.74656742811203, -0.01048228144645691, -0.5948565602302551, 0.5878362059593201, 0.07393339276313782, -0.5162408351898193, 0.270765095949173, 0.10792162269353867, 0.7868478298187256, ...
func (pc *BasicECSPodCreator) exportRepoCreds(creds *cocoa.RepositoryCredentials) *ecs.RepositoryCredentials { if creds == nil { return nil } var converted ecs.RepositoryCredentials converted.SetCredentialsParameter(utility.FromStringPtr(creds.ID)) return &converted }
[ -0.5829230546951294, 0.204339399933815, 0.2579137980937958, -0.366915762424469, -0.01856202445924282, -0.010648777708411217, -0.6504526138305664, -0.6887773275375366, 0.6825237274169922, 0.38550686836242676, -0.881635844707489, 0.097091905772686, -0.7572647929191589, 0.20031781494617462, ...
func (pc *BasicECSPodCreator) exportTaskExecutionOptions(opts cocoa.ECSPodExecutionOptions, taskDef cocoa.ECSTaskDefinition) *ecs.RunTaskInput { var runTask ecs.RunTaskInput runTask.SetCluster(utility.FromStringPtr(opts.Cluster)). SetTaskDefinition(utility.FromStringPtr(taskDef.ID)). SetTags(pc.exportTags(opts.Ta...
[ 0.15109550952911377, 0.36680924892425537, 0.5051807165145874, -0.06341356039047241, -0.3642592132091522, 0.3531711995601654, -0.027178626507520676, -0.37366893887519836, 0.7063623070716858, 0.436859130859375, -0.48704493045806885, 0.6239254474639893, 0.2933810353279114, 0.2288561910390854,...
func (pc *BasicECSPodCreator) exportPortMappings(mappings []cocoa.PortMapping) []*ecs.PortMapping { var converted []*ecs.PortMapping for _, pm := range mappings { mapping := &ecs.PortMapping{} if pm.ContainerPort != nil { mapping.SetContainerPort(int64(utility.FromIntPtr(pm.ContainerPort))) } if pm.HostPor...
[ -1.1278897523880005, -0.24527348577976227, 0.46685081720352173, 0.6746457815170288, -0.050844669342041016, 0.23502102494239807, 0.1875220388174057, -0.5539250373840332, 0.9124308228492737, 0.25117284059524536, -0.3999261260032654, -0.6744426488876343, -0.23384134471416473, 0.33640649914741...
func (pc *BasicECSPodCreator) exportAWSVPCOptions(opts *cocoa.AWSVPCOptions) *ecs.NetworkConfiguration { if opts == nil { return nil } var converted ecs.AwsVpcConfiguration if len(opts.Subnets) != 0 { converted.SetSubnets(utility.ToStringPtrSlice(opts.Subnets)) } if len(opts.SecurityGroups) != 0 { converte...
[ 0.0649382695555687, 0.40812867879867554, 0.2988177239894867, -0.5398374199867249, -0.3383447527885437, 0.09444905817508698, -0.6954857110977173, -1.280557632446289, 1.2654213905334473, 0.6949177384376526, -0.7369883060455322, -0.15049035847187042, 0.23088645935058594, -0.2963986396789551, ...
func (c *Client) ListGrants(ctx context.Context, params *ListGrantsInput, optFns ...func(*Options)) (*ListGrantsOutput, error) { if params == nil { params = &ListGrantsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListGrants", params, optFns, c.addOperationListGrantsMiddlewares) if err != nil { re...
[ -0.5470663905143738, 1.0522589683532715, 1.0257649421691895, 0.2347797155380249, 0.5914157032966614, -0.9551593065261841, -0.04361847788095474, -0.6460782885551453, 0.5998056530952454, 0.11042625457048416, -0.16335146129131317, 0.9645052552223206, -0.7249334454536438, 0.6115537881851196, ...
func NewListGrantsPaginator(client ListGrantsAPIClient, params *ListGrantsInput, optFns ...func(*ListGrantsPaginatorOptions)) *ListGrantsPaginator { if params == nil { params = &ListGrantsInput{} } options := ListGrantsPaginatorOptions{} if params.Limit != nil { options.Limit = *params.Limit } for _, fn := ...
[ -0.6778349280357361, -0.18215049803256989, 0.6555646061897278, -0.8094662427902222, -1.2013274431228638, -0.9528629779815674, -0.38793161511421204, 0.4235515892505646, 0.27735570073127747, -0.030495645478367805, 0.07755029201507568, 0.31199154257774353, -0.49945124983787537, 1.211192488670...
func (p *ListGrantsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) }
[ 0.15875981748104095, -0.0638246163725853, 0.35549432039260864, -0.9986873865127563, 0.49679702520370483, -1.0011073350906372, -1.485529899597168, 0.4000546634197235, 0.3599916994571686, -0.6227448582649231, -0.1767212301492691, -0.7461205124855042, -0.42251890897750854, 1.698522686958313, ...
func (p *ListGrantsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGrantsOutput, error) { if !p.HasMorePages() { return nil, fmt.Errorf("no more pages available") } params := *p.params params.Marker = p.nextToken var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } ...
[ -0.21957731246948242, 0.47244328260421753, 0.8538657426834106, -0.47250592708587646, 0.05486668273806572, -0.5325096249580383, 0.31010568141937256, 0.08414050936698914, 0.10232006013393402, -0.07693983614444733, 0.9964625835418701, -0.023289861157536507, -1.0844694375991821, 0.549867272377...
func New(m, n int, f Generator) Matrix { A := make(Matrix, 0, m) for i := 0; i < m; i++ { A = append(A, vector.New(n, func(j int) float64 { return f(i, j) })) } return A }
[ -0.6906479001045227, 0.19387920200824738, 0.3878098726272583, 0.08966029435396194, -0.5823663473129272, -0.7086696624755859, 0.6570985913276672, -0.10735884308815002, -1.4294312000274658, -0.9088020920753479, 0.5596031546592712, -0.3013717830181122, 0.9509963393211365, 1.0920050144195557, ...
func Empty(m, n int) Matrix { return New(m, n, func(i, j int) float64 { return 0 }) }
[ -0.6112990975379944, -0.2314915508031845, 0.275698721408844, -0.42686793208122253, 0.11022203415632248, 0.36324799060821533, 0.33241984248161316, -0.7434576153755188, -1.024839162826538, 0.355426162481308, -0.22701561450958252, 0.8255170583724976, -0.12745395302772522, -0.12370064854621887...
func Identity(m, n int) Matrix { // TODO: Determine if this should this panic when m,n = 0. // Note: this generating function is called the Kronecker delta // and is typically denoted as d(i,j). f := func(i, j int) float64 { if i == j { return 1 } return 0 } return New(m, n, f) }
[ -0.6486961245536804, -0.29264405369758606, 0.282890647649765, 1.0503448247909546, 0.44062551856040955, 0.26011529564857483, 0.48524028062820435, -0.22868852317333221, 0.27470889687538147, -0.7310344576835632, 0.21212506294250488, -0.31387415528297424, -0.3740589916706085, 0.396523952484130...
func List(vectors ...vector.Vector) Matrix { var ( n = len(vectors) A = make(Matrix, 0, n) ) if n == 0 { return A } dims := len(vectors[0]) for _, v := range vectors { if dims != len(v) { panic("invalid dimension") } A = append(A, v) } return A }
[ -0.10510800778865814, -0.08535128086805344, 0.5898605585098267, 0.8044896125793457, 0.2561568319797516, 0.23279401659965515, 0.5060462355613708, -0.08665300160646439, 0.41762247681617737, -0.8300269246101379, -0.18428154289722443, -0.5627299547195435, -0.09023914486169815, 0.68649947643280...
func Add(A, B Matrix) Matrix { C := A.Copy() C.Add(B) return C }
[ -0.09349974989891052, -1.1313027143478394, 0.47356677055358887, -0.3430880606174469, -0.17432032525539398, 0.46767884492874146, -0.3901618421077728, -0.23786702752113342, 0.41069382429122925, -0.21826940774917603, 1.1035749912261963, 1.215968370437622, -0.27578067779541016, -0.509295940399...
func (A Matrix) Add(B Matrix) { ma, na := A.Dimensions() mb, nb := B.Dimensions() if ma != mb || na != nb { panic("matrices must have the same number of rows and columns") } for i := 0; i < ma; i++ { for j := 0; j < na; j++ { A[i][j] += B[i][j] } } }
[ 0.12824666500091553, 0.05667019262909889, 0.7017767429351807, -0.19253724813461304, 0.10704337805509567, 0.8462313413619995, -0.019581753760576248, -0.2336646020412445, 0.6970838904380798, 0.5888717770576477, 0.9228428602218628, 0.779162585735321, -0.38497504591941833, 0.4281713366508484, ...
func AddColToCol(A Matrix, i, j int) Matrix { m, n := A.Dimensions() f := func(a, b int) float64 { if b == i { return A[a][b] + A[a][j] } return A[a][b] } return New(m, n, f) }
[ -0.04917668551206589, -0.48969608545303345, 0.4985928535461426, -0.377582848072052, 0.12224412709474564, -0.5853622555732727, 0.8142431378364563, -0.9372891187667847, -0.8194372057914734, 0.14845798909664154, 0.09739694744348526, -0.4324340224266052, -0.012093382887542248, -0.6656648516654...
func (A Matrix) AddColToCol(i, j int) { for _, a := range A { a[i] += a[j] } }
[ -0.3732078969478607, -0.786848247051239, 0.45622771978378296, -0.746684730052948, 0.5870543122291565, 0.023919761180877686, 0.5970696210861206, -0.424102246761322, -0.7143850922584534, 0.6778678894042969, -0.24640585482120514, -0.1844470202922821, 0.17287354171276093, -0.26312458515167236,...
func AddRowToRow(A Matrix, i, j int) Matrix { B := A.Copy() B.AddRowToRow(i, j) return B }
[ -0.5273916721343994, 0.26600876450538635, 0.2943421006202698, 0.47422292828559875, -0.5416686534881592, -0.6315629482269287, 0.41943761706352234, -0.22796626389026642, 0.973882257938385, -0.010803918354213238, 1.2016680240631104, -0.10939889401197433, 0.3043036162853241, 0.4573614299297333...
func (A Matrix) AddRowToRow(i, j int) { A[i].Add(A[j]) }
[ -0.9061119556427002, 0.3069606423377991, 0.4080851078033447, -0.3778325915336609, -0.09330559521913528, -0.17524297535419464, 0.11970781534910202, 0.32357972860336304, 0.552916944026947, 0.45112282037734985, 0.8014909029006958, -0.06047012656927109, 0.4400234520435333, 0.883861780166626, ...