text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (chatRoom ChatRoom) getOwner() *Guest { return &chatRoom.owner }
[ -0.07123665511608124, -0.3971940875053406, 0.40872347354888916, 1.97312593460083, -0.34305495023727417, -0.15356160700321198, 0.2616361081600189, -0.5486962795257568, -0.4280892610549927, -0.406364768743515, 0.08196211606264114, 0.9262949228286743, -0.2964339852333069, 0.06820520013570786,...
func (chatRoom ChatRoom) getName() string { return chatRoom.name }
[ -0.5692788362503052, -0.8500062823295593, 0.40310439467430115, 0.5099763870239258, -0.21245519816875458, -0.10749073326587677, -0.38419196009635925, -0.28644829988479614, -0.6222424507141113, 0.7160143256187439, -0.5635754466056824, 0.6257762908935547, -0.17621992528438568, 0.9941517114639...
func (chatRoom *ChatRoom) setName(name string) { chatRoom.name = name }
[ -1.1073285341262817, -0.8278822302818298, 0.26320841908454895, 0.2473120093345642, -0.9191794991493225, 0.08097615838050842, -0.7174224257469177, -0.13190792500972748, -0.41332221031188965, 1.3811612129211426, -1.4571813344955444, 0.41649943590164185, -0.3727055490016937, 1.332691669464111...
func (chatRoom ChatRoom) getConnectionCount() int { return chatRoom.connectionCount }
[ -0.5011758208274841, -0.6516296863555908, 0.4854358434677124, 0.4241948425769806, 0.06327623128890991, -0.48850470781326294, 0.1833215057849884, 0.3964022397994995, -0.9056715369224548, -0.19298477470874786, -0.5708657503128052, -0.45536720752716064, -0.3131967782974243, 0.8312222957611084...
func (chatRoom ChatRoom) getGuests() map[string]Guest { return chatRoom.guests }
[ -0.7377371788024902, -0.8882397413253784, 0.31879445910453796, 0.43082767724990845, 0.1763017624616623, -0.2963767945766449, -0.784102737903595, -0.268778532743454, -0.734803318977356, 0.06443360447883606, -0.9094814658164978, 0.378772109746933, -0.41243472695350647, 0.6799501776695251, ...
func (chatRoom ChatRoom) hosts(guest *Guest) bool { if _, ok := chatRoom.guests[guest.getUsername()]; ok{ return true } return false }
[ -1.218692421913147, 0.1545017957687378, 0.39691001176834106, 0.3526388108730316, -0.1658109575510025, 0.1024382933974266, -0.7642580270767212, 0.2928198277950287, -0.9211344718933105, 0.3623645305633545, -0.1330796480178833, -0.4961642026901245, -0.5602713823318481, -0.07441028952598572, ...
func (chatRoom *ChatRoom) addGuest(guest Guest) { if chatRoom.wasInvited(&guest) { chatRoom.connectionCount++ chatRoom.guests[guest.getUsername()] = guest } }
[ -1.0087192058563232, 0.06293100863695145, 0.5643425583839417, 0.37831711769104004, -0.013963794335722923, -0.29757654666900635, -0.3035517930984497, 0.017751945182681084, -0.46105650067329407, 0.28213876485824585, -0.5289609432220459, 0.06707929074764252, -0.5578430891036987, 0.80329048633...
func (chatRoom *ChatRoom) addInvitedGuest(owner Guest, guest *Guest) bool { if !chatRoom.owner.equals(&owner) { return false } else { chatRoom.invitedGuests[guest.getUsername()] = *guest return true } }
[ -1.1520541906356812, 0.6413300633430481, 0.5808169841766357, 0.6468844413757324, -1.0297931432724, 0.5650773644447327, -0.5988277196884155, -0.42910611629486084, -0.6569989323616028, 0.4174948036670685, -0.797888457775116, 0.4357193112373352, -1.0138022899627686, 0.3777446746826172, 0.36...
func (chatRoom ChatRoom) wasInvited(guest *Guest) bool { if _, ok := chatRoom.invitedGuests[guest.getUsername()]; ok{ return true } return false }
[ -0.11506272107362747, 0.6332672238349915, 0.7323567271232605, 0.12349845468997955, -0.5628798604011536, -0.3031252920627594, 0.02804301492869854, 0.6388813853263855, -0.8038050532341003, 0.16564509272575378, -1.3678088188171387, 0.3234221935272217, -0.3859735131263733, 0.02362382411956787,...
func (chatRoom *ChatRoom) removeGuest(guest Guest) { chatRoom.connectionCount-- delete(chatRoom.guests, guest.getUsername()) }
[ -0.8621571063995361, -0.24727755784988403, 0.4697665274143219, -0.04428478702902794, -0.47100135684013367, -0.285955548286438, 0.3842412531375885, 0.4606137275695801, -0.7545772790908813, 0.3202348053455353, -0.4979100227355957, -0.21459214389324188, -0.6937296986579895, 0.529987633228302,...
func (chatRoom *ChatRoom) equals(cr *ChatRoom) bool { if chatRoom.name != cr.name { return false } else if chatRoom.connectionCount != cr.connectionCount { return false } for guestKey , guestsValue := range chatRoom.guests { guest := cr.guests[guestKey] if !guest.equals(&...
[ -1.3344686031341553, -1.014389157295227, 0.33997100591659546, 0.15665307641029358, -0.001809433102607727, -0.11726348102092743, -0.6074411273002625, 0.012730397284030914, -0.8002671003341675, 0.6100987195968628, -0.9820713400840759, 0.2373807430267334, -0.46988582611083984, 0.7555557489395...
func NewSource() mrand.Source64 { return new(src) }
[ 0.11998166888952255, 0.2664739191532135, 0.013586764223873615, 1.0962244272232056, -1.3144363164901733, -1.0423243045806885, -0.15516917407512665, -0.05075978860259056, 0.9443305134773254, -0.5326165556907654, -0.5113467574119568, 0.1961040049791336, -0.5705030560493469, 1.0409172773361206...
func (b *TypingActionBuilder) ThreadID(id int) *TypingActionBuilder { b.topMsgID = id return b }
[ -0.5203979015350342, -0.07248734682798386, 0.3582240045070648, 0.5789663195610046, -0.1107356995344162, 0.9075971245765686, 0.8290322422981262, 0.4450935125350952, 1.40012788772583, 0.2740483283996582, -0.5165165066719055, 1.5771397352218628, -0.678748607635498, 1.2723432779312134, -0.46...
func (b *TypingActionBuilder) ThreadMsg(msg tg.MessageClass) *TypingActionBuilder { return b.ThreadID(msg.GetID()) }
[ -0.3684011995792389, 0.5667240023612976, 0.25986793637275696, 0.32683995366096497, 0.13193675875663757, 0.013156930916011333, 0.5653338432312012, 0.2714422941207886, 1.1742221117019653, -0.05088124796748161, 0.20039580762386322, 1.1741710901260376, -0.6587957739830017, 0.8578320741653442, ...
func (b *TypingActionBuilder) Custom(ctx context.Context, action tg.SendMessageActionClass) error { return b.send(ctx, action) }
[ -1.0669068098068237, -0.49710574746131897, 0.3609919250011444, 0.35447463393211365, -0.29281947016716003, -0.2418626993894577, 0.5700429677963257, -0.07071838527917862, 1.0207866430282593, 0.4188345968723297, -0.5067222714424133, 2.128899574279785, 0.34498900175094604, 0.3152027726173401, ...
func (b *RequestBuilder) TypingAction() *TypingActionBuilder { return &TypingActionBuilder{ sender: b.sender, peer: b.peer, } }
[ -0.9368327856063843, 0.013726776465773582, 0.41770729422569275, 0.10554572194814682, -0.1867028772830963, 0.10719694197177887, 1.00201416015625, 0.3223221004009247, 0.9367172718048096, 0.16829988360404968, -0.5921680331230164, 0.932164192199707, -1.3798370361328125, 0.04487434774637222, ...
func OpenBackupEngine(opts *Options, path string) (be *BackupEngine, err error) { cpath := C.CString(path) var cErr *C.char bEngine := C.rocksdb_backup_engine_open(opts.c, cpath, &cErr) if err = fromCError(cErr); err == nil { be = &BackupEngine{ c: bEngine, } } C.free(unsafe.Pointer(cpath)) return }
[ 0.07267975062131882, 0.07277766615152359, 0.5800734758377075, 0.06256783753633499, -0.2744760811328888, 0.24064765870571136, 0.8129557371139526, -0.0066775730811059475, -0.12022603303194046, 0.022726165130734444, -0.11123701184988022, 0.4962167739868164, -0.7530916929244995, -0.79439181089...
func OpenBackupEngineWithOpt(opts *BackupEngineOptions, env *Env) (be *BackupEngine, err error) { var cErr *C.char bEngine := C.rocksdb_backup_engine_open_opts(opts.c, env.c, &cErr) if err = fromCError(cErr); err == nil { be = &BackupEngine{ c: bEngine, } } return }
[ 0.08949705958366394, -0.29880326986312866, 0.5493215918540955, 0.08005855977535248, 0.28353315591812134, 0.20902904868125916, -0.03836726024746895, 0.046781014651060104, 0.2105054408311844, 0.17368252575397491, 0.05344349145889282, 0.16856269538402557, -0.4250813126564026, -0.6514286398887...
func CreateBackupEngine(db *DB) (be *BackupEngine, err error) { if be, err = OpenBackupEngine(db.opts, db.Name()); err == nil { be.db = db } return }
[ 0.20673741400241852, 0.3661520481109619, 0.4021885097026825, 0.8442831635475159, 0.5228074193000793, 0.6693798303604126, -0.019700292497873306, 0.024409223347902298, -0.13533471524715424, 0.08430209010839462, -0.46125397086143494, -0.14495757222175598, -0.34493130445480347, 0.7448182106018...
func CreateBackupEngineWithPath(db *DB, path string) (be *BackupEngine, err error) { if be, err = OpenBackupEngine(db.opts, path); err == nil { be.db = db } return }
[ 0.3367677927017212, -0.11522345244884491, 0.3750802278518677, 0.672825038433075, 0.10056878626346588, 0.736808717250824, -0.17150461673736572, -0.8073985576629639, -0.3537733256816864, 0.2571890950202942, -0.5860364437103271, -0.21352894604206085, -0.3150803744792938, 0.07654989510774612, ...
func (b *BackupEngine) CreateNewBackup() (err error) { var cErr *C.char C.rocksdb_backup_engine_create_new_backup(b.c, b.db.c, &cErr) err = fromCError(cErr) return }
[ 0.17580144107341766, -0.1305171698331833, 0.4702454209327698, 0.6064887046813965, 0.5545299053192139, -0.006688701920211315, 0.4569152593612671, -0.25526317954063416, -0.493920236825943, -0.09248542040586472, 0.0014345101080834866, -0.8782297372817993, -0.4196406900882721, 0.55088144540786...
func (b *BackupEngine) CreateNewBackupFlush(flushBeforeBackup bool) (err error) { var cErr *C.char C.rocksdb_backup_engine_create_new_backup_flush(b.c, b.db.c, boolToChar(flushBeforeBackup), &cErr) err = fromCError(cErr) return }
[ -0.38237690925598145, 0.506680965423584, 0.44716277718544006, 0.48057955503463745, -0.1777501255273819, -0.13070563971996307, 0.48311537504196167, -0.13686905801296234, -0.4035358726978302, -0.5244390368461609, -0.23874743282794952, -0.39686304330825806, -0.5258503556251526, 0.506091177463...
func (b *BackupEngine) VerifyBackup(backupID uint32) (err error) { var cErr *C.char C.rocksdb_backup_engine_verify_backup(b.c, C.uint32_t(backupID), &cErr) err = fromCError(cErr) return }
[ -0.3814338743686676, 0.5395336151123047, 0.5306938290596008, 0.5884526968002319, 0.6638659834861755, -0.17086000740528107, 0.43450993299484253, -1.0169533491134644, 0.6095662117004395, -0.22897054255008698, -0.8793626427650452, -0.11196509003639221, -0.500454843044281, 0.5971135497093201, ...
func (b *BackupEngine) GetInfo() (infos []BackupInfo) { info := C.rocksdb_backup_engine_get_backup_info(b.c) n := int(C.rocksdb_backup_engine_info_count(info)) infos = make([]BackupInfo, n) for i := range infos { index := C.int(i) infos[i].ID = uint32(C.rocksdb_backup_engine_info_backup_id(info, index)) info...
[ -0.535306453704834, -0.03259612247347832, 0.7468226552009583, 0.1417827010154724, 1.1680262088775635, -0.6701018810272217, -0.29386961460113525, -0.3014000654220581, -0.6004601716995239, -0.13015712797641754, -0.9591646194458008, -0.44456031918525696, -0.00890193972736597, 0.13654591143131...
func (b *BackupEngine) RestoreDBFromLatestBackup(dbDir, walDir string, ro *RestoreOptions) (err error) { cDbDir := C.CString(dbDir) cWalDir := C.CString(walDir) var cErr *C.char C.rocksdb_backup_engine_restore_db_from_latest_backup(b.c, cDbDir, cWalDir, ro.c, &cErr) err = fromCError(cErr) C.free(unsafe.Pointer(...
[ 0.2603718340396881, -0.40357011556625366, 0.45444250106811523, 0.4191494882106781, 0.7894774079322815, -0.4258037805557251, 0.1955580711364746, -0.0773611068725586, 0.6882577538490295, -0.1972338706254959, 0.21331731975078583, -0.10310445725917816, -0.772270917892456, -0.2776270806789398, ...
func (b *BackupEngine) RestoreDBFromBackup(dbDir, walDir string, ro *RestoreOptions, backupID uint32) (err error) { cDbDir := C.CString(dbDir) cWalDir := C.CString(walDir) var cErr *C.char C.rocksdb_backup_engine_restore_db_from_backup(b.c, cDbDir, cWalDir, ro.c, C.uint32_t(backupID), &cErr) err = fromCError(cErr...
[ 0.34732183814048767, 0.05748484283685684, 0.36356285214424133, 0.36187878251075745, 0.305584192276001, -0.6987577676773071, 0.18633119761943817, -0.39645665884017944, 0.8629624247550964, -0.4317663013935089, -0.016543807461857796, 0.10956130176782608, -1.2966630458831787, -0.48030143976211...
func (b *BackupEngine) Close() { C.rocksdb_backup_engine_close(b.c) b.c = nil b.db = nil }
[ 0.35724759101867676, 0.1270059496164322, 0.3570441007614136, -0.188346266746521, 1.2526198625564575, 0.41593536734580994, 0.5047881603240967, -0.28878211975097656, -0.7600275278091431, -0.34604886174201965, -0.2863893210887909, -0.25197187066078186, -1.0965547561645508, 0.6271592974662781,...
func NewBinaryHeap() Heap { return &binaryHeap{} }
[ 1.1374542713165283, -1.1974655389785767, 0.39711007475852966, 0.7790969014167786, -0.4623171091079712, -0.23007318377494812, -0.6418893933296204, -0.6862057447433472, -0.18255095183849335, -0.654168963432312, -1.446661114692688, 0.7723604440689087, -0.44813278317451477, -0.0190203785896301...
func (h *binaryHeap) IsValid() bool { for i := 0; i < h.size/2; i++ { left := 2*i + 1 right := 2*i + 2 if h.hasItem(left) && h.items[left] > h.items[i] { return false } if h.hasItem(right) && h.items[right] > h.items[i] { return false } } return true }
[ -0.34261569380760193, -1.0292048454284668, 0.9530556201934814, 0.5660082101821899, 0.2868257164955139, 0.5761228203773499, -0.13977524638175964, -0.39834314584732056, -0.10816854983568192, -0.744292676448822, -0.9504411220550537, 0.2562677562236786, -1.1602144241333008, 0.7988561987876892,...
func (h *binaryHeap) IsEmpty() bool { return h.GetSize() == 0 }
[ -0.7618498802185059, -0.541985273361206, 0.7161285281181335, 0.5666494965553284, 1.234126329421997, 0.2510669529438019, -0.3041432499885559, -0.3559218943119049, -0.2361159324645996, -0.011144210584461689, -0.7370582818984985, 0.6425989866256714, -0.9086694121360779, 0.4311232268810272, ...
func (h *binaryHeap) GetSize() int { return h.size }
[ 0.11954833567142487, 0.35170766711235046, 0.7921646237373352, 0.5346101522445679, 0.5129413604736328, -0.002896492136642337, 0.5348616242408752, -0.25901103019714355, -0.5173799395561218, -0.9902191162109375, -0.7694966793060303, 0.30721038579940796, -1.5350183248519897, 0.730174720287323,...
func (h *binaryHeap) Insert(items ...int) { if h.size+len(items) >= len(h.items) { h.resize(len(items)) } for _, element := range items { h.items[h.size] = element h.size++ h.siftup(h.size - 1) } }
[ -1.039454460144043, 0.7700358033180237, 0.734188437461853, 0.02475506253540516, 0.9868935942649841, 0.5969606637954712, -0.0008923726854845881, 0.33986395597457886, -0.5578661561012268, -0.3970804512500763, -1.4834392070770264, -0.8796549439430237, -1.350542426109314, 0.26719340682029724, ...
func (h *binaryHeap) Index(val int) int { for i, v := range h.items { if v == val { return i } } return -1 }
[ -0.7492236495018005, -0.6097133755683899, 0.4024234116077423, 0.22939597070217133, -0.552004337310791, 0.0871335119009018, 0.7464919686317444, 0.18783345818519592, -0.5810468792915344, 0.04535478726029396, -0.26390957832336426, 0.38951390981674194, -0.6363338232040405, -0.10249272733926773...
func (h *binaryHeap) Replace(itemIdx int, val int) { oldVal := h.items[itemIdx] h.items[itemIdx] = val if oldVal > val { h.siftdown(itemIdx) } else { h.siftup(itemIdx) } }
[ 0.39385008811950684, -0.46478471159935, 0.4388229250907898, 0.40110263228416443, 0.1852959245443344, 0.09564562141895294, -0.5898199081420898, 0.2840832471847534, 0.5035116076469421, 0.0007807971560396254, -0.5460102558135986, -0.011557463556528091, -0.8121941089630127, -0.2191991657018661...
func (h *binaryHeap) GetMax() int { max := h.items[0] h.items[0], h.items[h.size-1] = h.items[h.size-1], 0 h.size-- h.siftdown(0) return max }
[ -0.06557637453079224, -0.018299968913197517, 0.8790022134780884, 1.019189715385437, 0.6032912135124207, -0.6195679903030396, -0.4609113335609436, 0.622260570526123, -0.04937276989221573, -0.024775099009275436, -0.643649160861969, 0.8400204181671143, -1.0323017835617065, 0.46232306957244873...
func NewMiddleware(limiter *limiter.Limiter, options ...Option) *Middleware { middleware := &Middleware{ Limiter: limiter, OnError: DefaultErrorHandler, OnLimitReached: DefaultLimitReachedHandler, KeyGetter: DefaultKeyGetter(limiter), ExcludedKey: nil, } for _, option := range option...
[ -0.017539625987410545, -0.30274057388305664, 0.5102277398109436, 1.0494658946990967, -0.7873075604438782, -0.1928739845752716, -1.0841020345687866, -0.32389184832572937, 0.626615583896637, 0.15494751930236816, 0.14995142817497253, -0.10320451855659485, -1.3869472742080688, -0.0828098356723...
func (middleware *Middleware) Handler(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { key := middleware.KeyGetter(r) if middleware.ExcludedKey != nil && middleware.ExcludedKey(key) { h.ServeHTTP(w, r) return } context, err := middleware.Limiter.Get(r...
[ 0.595586895942688, 0.49254271388053894, 0.5721537470817566, -0.167252779006958, -0.7720270752906799, 0.2140560746192932, -0.21394366025924683, 0.006063628941774368, 0.37630435824394226, 0.34486666321754456, 0.16401439905166626, 0.2903374135494232, -0.2203131467103958, 0.26553720235824585, ...
func (createTask CreateTaskIntent) Enact(w http.ResponseWriter, r *http.Request) { var ( list List task Task errors error ) w.Header().Set("Content-Type", "application/json") params := mux.Vars(r) i, err := strconv.Atoi(params["id"]) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) ...
[ -0.7010995149612427, -0.6190813183784485, 0.9257463812828064, -0.5063418745994568, 0.6100105047225952, 0.6290750503540039, 0.29910141229629517, 0.18756996095180511, -0.25087785720825195, 1.0121216773986816, -0.9006434082984924, 0.44487279653549194, 0.15636204183101654, 0.6614411473274231, ...
func (m *Master) SetInput(input Input) { if input.Distribute == nil { input.Distribute = MakeRoundRobinDistributor() } m.input = input }
[ -0.29621782898902893, 0.4593159258365631, 0.3816894590854645, 0.3564459979534149, -0.3390147387981415, 1.1806951761245728, 1.250361442565918, 0.8826144933700562, 0.5589069724082947, -1.3235644102096558, 0.043205082416534424, 0.558813750743866, -0.8258775472640991, 1.1521400213241577, 0.9...
func (m *Master) SetLayer(num int, job Job) { var mapLayer []worker var redLayer []worker for i := 0; i < num; i++ { mapDistribute := job.MapDistribute if mapDistribute == nil { mapDistribute = MakeHashDistributor() } mapLayer = append(mapLayer, &mapWorker{ distribute: mapDistribute, Map: job...
[ -0.3809342086315155, 0.09261859953403473, 0.5758330821990967, -0.11036334931850433, -0.11494790762662888, 0.4126676023006439, 0.10522885620594025, 0.3590942323207855, 0.1492721438407898, -0.8134752511978149, -0.7904552221298218, 0.017548298463225365, -0.12599419057369232, 1.368958353996276...
func (m *Master) SetOutput(output Output) { if output.InitOutput == nil { output.InitOutput = func(param string) {} } if output.EndOutput == nil { output.EndOutput = func() {} } m.output = output }
[ -0.6064948439598083, 0.01741763763129711, 0.32089683413505554, 1.0737327337265015, -0.692864716053009, -0.467896968126297, 0.9782958626747131, 0.35417553782463074, -0.6760260462760925, -0.21108970046043396, -0.8568571209907532, 0.03213905170559883, -0.40775904059410095, 0.9319576621055603,...
func (m *Master) Build() { outChannel := make(chan [2]string, 100) var channels [][]chan [2]string for i := 0; i < len(m.workers); i++ { var newChannels []chan [2]string for j := 0; j < len(m.workers[i]); j++ { newChannels = append(newChannels, make(chan [2]string, 100)) } channels = append(channels, new...
[ -0.6648910045623779, -0.715521514415741, 0.849027693271637, -0.7181167602539062, -0.2717173397541046, -0.7722674012184143, 0.8458346128463745, -0.11023147404193878, -0.5687183737754822, -0.005593335721641779, -0.25444573163986206, 0.41225680708885193, -0.7853091955184937, 0.285153865814209...
func (m *Master) Start() int { go m.input.run() for _, workers := range m.workers { for _, worker := range workers { go worker.run() } } go m.output.run() return <-m.output.endChannel }
[ -0.4251241087913513, -0.1610678732395172, 0.5338088870048523, -0.015543858520686626, -0.12956763803958893, -0.4346286654472351, 0.8040185570716858, 0.5440980195999146, -1.4849032163619995, -0.1621313989162445, -0.5933582782745361, 0.9423766732215881, -1.2072726488113403, 0.8951401114463806...
func (m *Master) Run() int { m.Build() return m.Start() }
[ -1.076033592224121, 0.153353750705719, 0.5056744813919067, 0.5385860204696655, -0.6155267953872681, 0.09020845592021942, 1.0982608795166016, 0.8292644023895264, -0.4535512328147888, -0.5638462901115417, -1.392516016960144, 0.17917829751968384, -1.167463779449463, 0.4772542119026184, 0.55...
func NewEDUServerProducer(inputAPI api.EDUServerInputAPI) *EDUServerProducer { return &EDUServerProducer{ InputAPI: inputAPI, } }
[ -1.7752488851547241, 0.16165651381015778, -0.018772505223751068, 0.42799216508865356, -1.3775628805160522, 0.3364240825176239, 0.16685186326503754, -0.6726462244987488, 0.6828387379646301, 0.3938995897769928, -0.8038725852966309, 0.5518437623977661, -0.6255530118942261, 0.07446665316820145...
func (p *EDUServerProducer) SendTyping( ctx context.Context, userID, roomID string, typing bool, timeoutMS int64, ) error { requestData := api.InputTypingEvent{ UserID: userID, RoomID: roomID, Typing: typing, TimeoutMS: timeoutMS, OriginServerTS: gomatrixserverlib.AsTimestamp(t...
[ -1.4044033288955688, 0.6696590185165405, 0.4551825225353241, 1.0883417129516602, -0.4405316710472107, 0.4981262981891632, 0.2981243133544922, -0.5663993954658508, 0.23403508961200714, 1.2828903198242188, -0.7196505069732666, 0.9922466278076172, -0.39740225672721863, 0.678874135017395, -0...
func Validate(ver string) (error, []string) { // Check if an empty string was passed in if len(ver) == 0 { return ErrEmptyString, []string{} } // Split the parts into [0]major, [1]minor, and [2]patch,prerelease,build // Semantic Versions are required to have 3 parts parts := strings.SplitN(ver, ".", 3) if le...
[ -0.42923879623413086, -0.4145955443382263, 0.8353760838508606, -0.3801044225692749, -0.03145964443683624, -0.0801270604133606, 0.4967406690120697, 0.12277613580226898, -0.2421407401561737, 0.7442976832389832, 0.08994859457015991, 0.00877284538000822, -0.5159986615180969, 0.2089115083217620...
func containsOnly(s string, comp string) bool { return strings.IndexFunc(s, func(r rune) bool { return !strings.ContainsRune(comp, r) }) == -1 }
[ 0.26215821504592896, -0.5256567597389221, 0.22874167561531067, 0.15028135478496552, -0.35011962056159973, 0.2763758599758148, -0.2471906691789627, 0.6099739074707031, -0.08127415925264359, -0.23314905166625977, -0.0852360874414444, 0.856576144695282, -0.7599107027053833, -0.281650990247726...
func Table(opts TableOpts) ([]string, error) { if len(opts.Rows) == 0 { return nil, errors.New("No rows to display") } if len(opts.Columns) == 0 { return nil, errors.New("No columns to display") } columnLabels := make([]string, len(opts.Columns)) for i, name := range opts.Columns { columnLabels[i] = strin...
[ 0.07893213629722595, 0.04150805622339249, 1.1099334955215454, -0.20191749930381775, -0.535024881362915, -0.5720641613006592, -0.055597588419914246, -0.5912413597106934, 0.050920311361551285, 0.5435662269592285, 0.48069167137145996, 0.03515670821070671, 0.734901487827301, -0.333858191967010...
func NormalizeStrings(input []string) []string { output := make([]string, len(input)) for i, s := range input { output[i] = strings.ToUpper(s) } return output }
[ -0.753189742565155, -0.18438397347927094, 0.5946852564811707, 0.029489580541849136, -0.08965134620666504, -0.348258376121521, -0.3428042232990265, 0.0749976858496666, 0.7983946204185486, 0.6090819835662842, 0.7435182332992554, 0.2553727924823761, -1.221230387687683, -0.3897150158882141, ...
func New(endpoint string) *EcomClient { tr := &http.Transport{ MaxIdleConnsPerHost: 10, } client := &http.Client{ Transport: tr, Timeout: timeout, } url, err := url.Parse(endpoint) if err != nil { fmt.Fprintf(os.Stderr, "%+v\n", err) os.Exit(1) } return &EcomClient{ endpoint: endpoint, scheme:...
[ -0.04891921952366829, -1.118398666381836, 0.49407827854156494, -1.0153902769088745, 0.07257465273141861, 0.053737618029117584, 0.10457083582878113, -0.31901782751083374, -0.8974611759185791, 0.1597597599029541, 0.8561859130859375, 0.43278199434280396, 0.34655630588531494, -0.81350392103195...
func (c *EcomClient) SetJWT(jwt string) { c.jwt = jwt }
[ 0.4738045036792755, 0.21735550463199615, 0.32213476300239563, -0.4392174780368805, 0.21380499005317688, 0.25667887926101685, -0.5415624976158142, -0.9120886921882629, -0.5895851254463196, 0.04841367527842522, 0.10451558232307434, 0.2450324147939682, 0.26444849371910095, 0.2650502324104309,...
func (c *EcomClient) SetToken(cfg *configmgr.EcomConfigEntry) error { file, err := configmgr.TokenFilename(cfg) if err != nil { return fmt.Errorf("token file %q not found: %w", file, err) } tar, err := configmgr.ReadTokenAndRefreshToken(file) if err != nil { return fmt.Errorf("token and refresh token cannot be...
[ -0.0634484514594078, -0.3730790913105011, 0.7899718880653381, -0.13430382311344147, 0.6378252506256104, 0.048066798597574234, 0.3250933885574341, 0.333224356174469, -0.37509995698928833, -0.3492027223110199, -0.36779284477233887, 0.6981266736984253, 0.6006230115890503, 0.5362659096717834, ...
func (c *EcomClient) ExchangeRefreshTokenForIDToken(firebaseAPIKey, refreshToken string) (*configmgr.TokenAndRefreshToken, error) { v := url.Values{} v.Set("key", firebaseAPIKey) uri := url.URL{ Scheme: "https", Host: "securetoken.googleapis.com", Path: "v1/token", ForceQuery: false, RawQue...
[ -0.8238185048103333, -0.33490270376205444, 0.937559187412262, -0.14406095445156097, 0.15285292267799377, -0.47971582412719727, -0.6476058959960938, -1.0040454864501953, -0.08328033238649368, 0.43301093578338623, -0.7880182862281799, 1.051018476486206, -0.1697683036327362, 0.820847988128662...
func (c *EcomClient) ExchangeCustomTokenForIDAndRefreshToken(firebaseAPIKey, token string) (*configmgr.TokenAndRefreshToken, error) { // build the URL including Query params v := url.Values{} v.Set("key", firebaseAPIKey) uri := url.URL{ Scheme: "https", Host: "www.googleapis.com", Path: "ident...
[ -0.3049303889274597, -0.3537672460079193, 0.6581010818481445, -0.6166900992393494, 0.3382892310619354, -0.523162305355072, -0.7341325879096985, -0.7071537375450134, 0.1472751647233963, -0.011794660240411758, -0.7947463393211365, 1.3581819534301758, -0.2111828774213791, 1.1422781944274902, ...
func (c *EcomClient) SignInWithDevKey(key string) (token string, user *UserResponse, err error) { uri := c.endpoint + "/signin-with-devkey" payload := devKeyRequest{ Key: key, } buf := new(bytes.Buffer) json.NewEncoder(buf).Encode(payload) req, err := http.NewRequest("POST", uri, buf) if err != nil { return...
[ -1.0514178276062012, -0.29104653000831604, 0.9855310916900635, -0.44888368248939514, -1.5653709173202515, -0.6365969777107239, -0.10229074954986572, -0.8484378457069397, -0.06204861029982567, 0.4628826975822449, -0.6278789043426514, 0.3627840280532837, -0.29844072461128235, 0.1094138920307...
func (c *EcomClient) SysInfo() (*SysInfo, error) { uri := c.endpoint + "/sysinfo" req, err := http.NewRequest("GET", uri, nil) if err != nil { return nil, fmt.Errorf("http new request failed: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("Authorization", "Bearer "+c.jwt) req.Header.Se...
[ -0.13147605955600739, -0.07700357586145401, 0.6002328991889954, -0.5284053683280945, 0.43567803502082825, -0.6626135110855103, -0.49809738993644714, -0.6632840037345886, -0.633198618888855, -0.0533502958714962, -0.7652272582054138, 0.7717808485031128, 0.0501895546913147, -0.615230202674865...
func (c *EcomClient) GetConfig() (*FirebaseConfigResponse, error) { uri := c.endpoint + "/config" req, err := http.NewRequest("GET", uri, nil) if err != nil { return nil, fmt.Errorf("http new request failed: %w", err) } req.Header.Set("Accept", "application/json") res, err := c.client.Do(req) if err != nil { ...
[ -0.9934573769569397, 0.9436604380607605, 1.0482501983642578, -0.0233678687363863, 0.5346546173095703, -0.49155309796333313, -0.12432686984539032, -0.3993380665779114, -0.11893752962350845, 0.4484449625015259, -0.29517754912376404, 0.2672644555568695, -0.4105701148509979, 0.7585107088088989...
func Credentials() (string, string) { qs := []*survey.Question{ { Name: "username", Prompt: &survey.Input{Message: "What is your username?"}, Validate: survey.Required, }, { Name: "password", Prompt: &survey.Password{Message: "Please enter your password."}, Validate: survey.Required...
[ -0.2740567624568939, -1.1230807304382324, 0.7144429683685303, -0.26078370213508606, -0.7828823328018188, 0.46322116255760193, 0.013969955034554005, -0.31992000341415405, 0.30155766010284424, 0.009197834879159927, -0.8293100595474243, -0.08133412897586823, -0.4261656701564789, 0.06140467524...
func (s *ServerConnection) VersionGetProductVersion() (*ProductVersion, error) { data, err := s.CallRaw("Version.getProductVersion", nil) if err != nil { return nil, err } productVersion := struct { Result struct { ProductVersion ProductVersion `json:"productVersion"` } `json:"result"` }{} err = json.Unm...
[ -0.9901673793792725, -0.7791674733161926, 0.2556723654270172, 0.5365818738937378, -0.1690458357334137, -0.5991749167442322, 0.9205687642097473, -1.1848613023757935, -0.09278108924627304, 0.47767728567123413, -1.3390313386917114, 0.8420357704162598, -0.6704520583152771, -0.4700445234775543,...
func (s *ServerConnection) VersionGetApiVersion() (*ApiVersion, error) { data, err := s.CallRaw("Version.getApiVersion", nil) if err != nil { return nil, err } apiVersion := struct { Result struct { ApiVersion ApiVersion `json:"apiVersion"` } `json:"result"` }{} err = json.Unmarshal(data, &apiVersion) r...
[ -1.3425161838531494, -0.2655046582221985, 0.23633703589439392, -0.6605139374732971, -0.3875824213027954, -1.125893235206604, 0.24115513265132904, -0.14229567348957062, -0.030218005180358887, 0.27204951643943787, -1.8778090476989746, 0.12954922020435333, -1.3989362716674805, -0.251875787973...
func (t *Token) UID() (string, bool) { return t.Claims().Subject() }
[ 0.6451443433761597, -0.5673445463180542, 0.7103201746940613, -0.8319753408432007, -0.005779138766229153, 1.0675193071365356, -0.7850900888442993, 0.6004630327224731, 0.8753986358642578, -0.3603094816207886, 0.3421803116798401, 0.8901634812355042, 0.11968276649713516, -0.10090873390436172, ...
func (t *Token) Issuer() (string, bool) { return t.Claims().Issuer() }
[ -0.07048855721950531, -0.5810795426368713, 0.5243021845817566, -0.5058106184005737, -1.0868752002716064, 0.3304389417171478, -0.6771981120109558, 0.695650577545166, 0.23230624198913574, -0.09334461390972137, 0.3074711263179779, -0.19905471801757812, 0.19803591072559357, -0.3028314709663391...
func (t *Token) Name() (string, bool) { name, ok := t.Claims().Get("name").(string) return name, ok }
[ -0.3625819683074951, -0.8852848410606384, 0.6726454496383667, -0.3014712631702423, -0.49758821725845337, -0.5935664772987366, -1.3498603105545044, -0.15807820856571198, -0.5069614052772522, 1.1432156562805176, -0.2820022404193878, 0.11052601784467697, 0.2281123697757721, -0.413109928369522...
func (t *Token) Picture() (string, bool) { picture, ok := t.Claims().Get("picture").(string) return picture, ok }
[ -0.8242955803871155, 0.47535213828086853, 0.6047310829162598, -0.0995936393737793, -0.14498241245746613, -0.1576579511165619, -1.5275962352752686, -0.31042253971099854, 0.11386635154485703, 1.3173801898956299, -0.43303579092025757, 0.062314875423908234, 0.3718578517436981, -0.3269140124320...
func (t *Token) Email() (string, bool) { email, ok := t.Claims().Get("email").(string) return email, ok }
[ -0.273135781288147, -0.18907032907009125, 0.39997926354408264, -0.1409004181623459, -0.04894096776843071, 0.02336902916431427, -1.5680214166641235, 0.02948235347867012, -0.46996092796325684, 0.9058582186698914, 0.3873611390590668, 0.6248598098754883, 0.02163832075893879, -1.035038232803344...
func (t *Token) IsEmailVerified() (bool, bool) { emailVerified, ok := t.Claims().Get("email_verified").(bool) return emailVerified, ok }
[ 0.21449241042137146, -0.13512802124023438, 0.4673592150211334, -0.2733723819255829, 0.7686799168586731, -0.49766334891319275, -1.5891481637954712, 1.0069410800933838, -0.42159518599510193, 0.4375094175338745, -1.568097472190857, 1.2000174522399902, 0.5314429402351379, -0.27967047691345215,...
func Execute() { if err := newRootCmd().Execute(); err != nil { // Not print an error because cobra.Command prints it. os.Exit(1) } }
[ 1.0075581073760986, -0.1954060047864914, 0.4508354365825653, 1.157243013381958, 1.0247243642807007, 0.4220423400402069, -0.4292007386684418, 0.025406787171959877, -0.8530791401863098, -0.36691996455192566, 0.11132641136646271, 0.14246676862239838, -0.5794206261634827, 0.7394879460334778, ...
func rndPicker(r *Route) *Target { return r.wTargets[randIntn(len(r.wTargets))] }
[ -1.2186199426651, -0.24459630250930786, 0.42865458130836487, -1.2052627801895142, -0.09938368946313858, -0.3269524574279785, 0.0025153292808681726, -1.0511858463287354, 0.6567493081092834, -0.00688210129737854, 0.8216339945793152, -0.2180721014738083, -0.91444331407547, 0.25282156467437744...
func rrPicker(r *Route) *Target { u := r.wTargets[r.total%uint64(len(r.wTargets))] atomic.AddUint64(&r.total, 1) return u }
[ -0.8315706849098206, 0.14522984623908997, 0.5731673240661621, -1.220111608505249, 0.1575266569852829, -0.8298114538192749, 0.7010144591331482, -0.4488692879676819, 0.3612425923347473, -0.1827002465724945, 0.2317548394203186, 0.16456638276576996, -0.7492096424102783, -0.3775339126586914, ...
func (bs *Handler) PutHost(currentHost *processor.Host, priority uint32, delay time.Duration) error { body, err := json.Marshal(currentHost) if err != nil { return err } timeToRun := 20 * time.Second _, err = bs.serverConnection.Put(body, priority, delay, timeToRun) if err != nil { return err } return nil }
[ -0.42519208788871765, 0.11821690201759338, 0.7136706709861755, -0.3122093081474304, -0.2499009221792221, 0.25857359170913696, -0.2974608838558197, 0.7020894289016724, -1.0227441787719727, 0.3692239820957184, -0.7297188639640808, 0.6145651340484619, -1.050606608390808, 0.5460885167121887, ...
func calculateBackoff(errorCount int) time.Duration { if errorCount > maxBackOffCount { errorCount = maxBackOffCount } base := math.Exp2(float64(errorCount)) /* #nosec */ backOff := base - (rand.Float64() * base * 0.5) backOffDuration := time.Minute * time.Duration(backOff) return backOffDuration }
[ 0.07025974243879318, 0.7876644730567932, 0.3583921492099762, -0.00015752292529214174, -0.70339035987854, 0.1920355260372162, 0.03880975767970085, 0.5193961262702942, 0.5744500160217285, 0.24486950039863586, -0.5466659665107727, 0.011386015452444553, -0.3047572374343872, -0.0013051634887233...
func (o *GetDogmaAttributesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetDogmaAttributesOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return resu...
[ -0.6801000833511353, -0.647860050201416, 0.5556311011314392, 0.21263960003852844, -0.35977867245674133, -1.2266600131988525, 0.37717416882514954, 0.04662587493658066, 0.1297660768032074, 0.4271547794342041, 0.27826082706451416, 0.0651211366057396, -1.201870083808899, -0.16800956428050995, ...
func NewGetDogmaAttributesOK() *GetDogmaAttributesOK { return &GetDogmaAttributesOK{} }
[ -0.06408519297838211, -0.2157917022705078, 0.3011452257633209, -0.14166127145290375, -0.6431413888931274, -0.1696474403142929, 1.0870144367218018, 0.2851215898990631, -0.4960043132305145, 0.14411884546279907, -0.6956513524055481, -0.2058054804801941, 0.04709514603018761, -0.262548774480819...
func (i *urls) String() string { return fmt.Sprint(*i) }
[ -0.2924448847770691, -0.18141937255859375, -0.07313571125268936, -0.07228458672761917, -0.05911218747496605, 0.6603302359580994, 0.5538779497146606, -0.5875235795974731, -0.48416703939437866, -0.29524868726730347, 0.11528478562831879, 0.06616253405809402, -0.24617278575897217, 0.1700733751...
func (i *urls) Set(value string) error { // If we wanted to allow the flag to be set multiple times, // accumulating values, we would delete this if statement. // That would permit usages such as // -deltaT 10s -deltaT 15s // and other combinations. //if len(*i) > 0 { // return errors.New("urls flag already set...
[ -0.6561378836631775, 0.7481667399406433, 0.2721738815307617, -0.4332391321659088, 0.1673116534948349, 0.4421268701553345, 0.40045061707496643, -0.4305000305175781, -0.9581246376037598, 0.1589614748954773, -0.3727562129497528, -0.14771321415901184, -0.3607538938522339, 0.6594478487968445, ...
func (this *FamilyAccount) showDetails() { fmt.Println("------My Income and Expense Detail-------") if this.flag { //因为我们用的是FamilyAccount结构体里传过来的字段,所以不能直接yongflag, 要用this. , 表示调用这个方法的结构体变量里面的字段 fmt.Println(this.details) } else { fmt.Println("No current income and expenditure details!") } }
[ 0.6515313386917114, -0.6499359011650085, 0.8427925109863281, 0.12924852967262268, -0.23332397639751434, 0.8017845749855042, 1.4616050720214844, 0.8785892724990845, 0.602349579334259, -0.6569238305091858, 0.06872361898422241, 0.7488011121749878, -0.1430904120206833, 0.4543180763721466, 0....
func (this *FamilyAccount) income() { fmt.Println("Amount of income: ") fmt.Scanln(&this.money) this.balance += this.money //Modify account balance fmt.Println("Note of income: ") fmt.Scanln(&this.note) //Splicing revenue into “details” this.details += fmt.Sprintf("\nIncome\t\t\t%v\t\t%v\t%v", this.balance, thi...
[ 0.4792165756225586, -0.371390700340271, 0.922256588935852, 0.015381054021418095, 0.5921564698219299, 0.7799720168113708, 0.9822996258735657, 0.5889517664909363, 0.09329690039157867, -0.12168730795383453, -0.22724027931690216, 0.07697467505931854, -0.8051009178161621, -0.125894695520401, ...
func (this *FamilyAccount) pay() { fmt.Println("Amount of Expenditure: ") AmountEx:fmt.Scanln(&this.money) if this.money > this.balance { fmt.Println("Sorry! You don't have enough money!!!\nPlease enter another amount: ") goto AmountEx } else { this.balance -= this.money fmt.Println("Note of Expenditure: ")...
[ 0.37559592723846436, -0.2258063405752182, 0.9418894052505493, -0.3313528895378113, 0.4441506862640381, 0.6553091406822205, 0.8973371982574463, 0.31998777389526367, 0.476153165102005, 0.20181454718112946, 0.5498026609420776, 0.09756956249475479, -0.6034137010574341, 0.14261090755462646, 0...
func (this *FamilyAccount) MainMenu() { for { fmt.Println("\n----------My App To Track Spending----------") fmt.Println(" 1 Income and Expense Detail") fmt.Println(" 2 Registered Income") fmt.Println(" 3 Registered Expenditure") fmt.Println(" 4 Exit") fmt.Println("Pleas...
[ -0.2946968674659729, -0.3261698782444, 1.0169086456298828, 0.9377562999725342, -0.03614360839128494, 0.6404687166213989, 0.7913987636566162, 0.005305242724716663, 0.21662360429763794, -0.3031509816646576, 0.4378895163536072, -0.028478309512138367, -0.30070775747299194, 0.6224109530448914, ...
func addHelpFlag(name string, fs *pflag.FlagSet) { fs.BoolP(flagHelp, flagHelpShorthand, false, fmt.Sprintf("Help for %s.", name)) }
[ 0.7767988443374634, 0.27908599376678467, 0.48333740234375, -0.8364911079406738, -0.1544083207845688, 0.751815676689148, -0.49307170510292053, 0.34198322892189026, -0.6278925538063049, -0.8863316774368286, -0.08718744665384293, -0.4433172941207886, 0.40511301159858704, 0.9429596662521362, ...
func addHelpCommandFlag(usage string, fs *pflag.FlagSet) { fs.BoolP(flagHelp, flagHelpShorthand, false, fmt.Sprintf("Help for the %s command.", color.GreenString(strings.Split(usage, " ")[0]))) }
[ 0.5767890214920044, -0.10855501890182495, 0.5778865218162537, -0.4987916052341461, 0.3795534670352936, 0.7165815234184265, -0.10203373432159424, 0.4151414930820465, -0.5745240449905396, -1.252314805984497, 0.8107861876487732, 0.4075632095336914, 0.26595866680145264, 0.8955394625663757, -...
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { var err error switch { case r.URL.Path == "/": err = h.HandleIndex(w, r) break default: err = dterr.ErrPageNotFound } if err != nil && err == dterr.ErrPageNotFound { http.NotFoundHandler().ServeHTTP(w, r) } else if err != nil { log....
[ -0.31562286615371704, 0.13235525786876678, 0.5334290862083435, 0.9129289984703064, 0.2991374731063843, 0.7082158923149109, 0.6923136115074158, -0.389968603849411, 0.11420772224664688, 0.2694893777370453, 0.48260459303855896, -0.34148454666137695, -0.3868691325187683, 0.11713850498199463, ...
func (h *Handler) HandleIndex(w http.ResponseWriter, r *http.Request) error { p := &types.Page{Title: "Duck Tracker"} // Check if this is a postback if r.Method == http.MethodPost { err := r.ParseForm() if err != nil { // TODO - Brian - 20181009 - Handle this error better return err } p.Messages = h....
[ -0.989837110042572, 0.3165432810783386, 0.725340723991394, 0.15392982959747314, 0.31579941511154175, -0.011545568704605103, 1.0528877973556519, 0.5033990740776062, 0.062180548906326294, -0.24442657828330994, 0.5287672877311707, -0.8510852456092834, -0.22025468945503235, 0.5010879039764404,...
func (ds DataSet) CostFunction(lambda float64, calcGrad bool) (j float64, grad [][][]float64, err error) { j, gradients := ds.NN.CalculateCost(ds.Examples, ds.Answers, lambda) grad = make([][][]float64, len(gradients)) for i, gradient := range gradients { rows, _ := gradient.Dims() grad[i] = make([][]float64, ro...
[ -0.5086487531661987, 1.0486817359924316, 0.5198649764060974, -0.8165079951286316, -0.35119593143463135, -0.930413007736206, 0.860508918762207, 0.7616966366767883, -0.5252704620361328, 1.0478991270065308, -0.4371826946735382, 0.07989462465047836, 0.34693118929862976, 0.42235955595970154, ...
func (ds DataSet) RollThetasGrad(x [][][]float64) [][]float64 { rolled := make([][]float64, 1) numElems := 0 for _, matrix := range x { numElems += len(matrix) * len(matrix[0]) } flat := make([]float64, numElems) idx := 0 for _, matrix := range x { for _, row := range matrix { for _, val := range row {...
[ -1.13497793674469, 0.7135218381881714, 0.7902732491493225, -1.466880440711975, -0.21142499148845673, 0.398625910282135, 0.40141892433166504, 0.6370172500610352, -0.38761085271835327, 0.51453697681427, -0.017098236829042435, 0.42389246821403503, 0.6755623817443848, 0.3191365599632263, 0.1...
func (ds DataSet) UnrollThetasGrad(x [][]float64) [][][]float64 { unrolled := make([][][]float64, len(ds.NN.Thetas)) idx := 0 for i, theta := range ds.NN.Thetas { rows, cols := theta.Dims() unrolled[i] = make([][]float64, rows) for j := 0; j < rows; j++ { unrolled[i][j] = make([]float64, cols) for k := ...
[ -0.4505351483821869, 0.6270938515663147, 1.0374237298965454, -1.9090576171875, -0.7427374124526978, 0.15682478249073029, 0.6211728453636169, 0.035289011895656586, -0.48289939761161804, 0.8121882081031799, -0.14403875172138214, 0.4855675995349884, 0.7231616973876953, -0.05416109040379524, ...
func (ds DataSet) SetTheta(t [][][]float64) { for i, matrix := range t { for j, row := range matrix { ds.NN.Thetas[i].SetRow(j, row) } } }
[ -1.2456673383712769, 0.3019030690193176, 0.4268796741962433, -0.5877605080604553, 0.48078691959381104, -0.35873278975486755, 0.5986242890357971, 0.5049501061439514, -0.7339417338371277, 0.6631223559379578, 0.009000959806144238, 0.21700885891914368, 1.0796998739242554, 0.5873392820358276, ...
func (ds DataSet) GetTheta() [][][]float64 { th := make([][][]float64, len(ds.NN.Thetas)) for i, theta := range ds.NN.Thetas { rows, _ := theta.Dims() th[i] = make([][]float64, rows) for j := 0; j < rows; j++ { var dst []float64 th[i][j] = theta.Row(dst, j) } } return th }
[ -0.5501364469528198, 0.6765462160110474, 0.5746421813964844, -0.3682420253753662, 0.4214530885219574, -0.8877845406532288, 0.8315187096595764, -0.2009216547012329, -0.05755869299173355, 0.10204976052045822, 0.4404902458190918, 0.548973023891449, 0.8882300853729248, -0.06345587223768234, ...
func (e *Element) Key() uint64 { return e.key }
[ -0.7958859205245972, 0.8406534194946289, 0.43942180275917053, 1.087080478668213, 0.3834102153778076, 0.8556835651397705, 0.5518602728843689, 0.7943700551986694, 0.4214794933795929, 0.2155117243528366, -0.1067294180393219, -0.32535743713378906, -0.4610408544540405, 0.9278165698051453, -0....
func (e *Element) Value() interface{} { return e.value }
[ -0.5959792137145996, 0.16856230795383453, 0.3177650272846222, 0.7900418043136597, 0.38233113288879395, 0.993929922580719, 0.5091661214828491, -0.31539633870124817, 0.9361444115638733, -0.14493517577648163, -0.2333192378282547, 0.37017104029655457, 0.21500451862812042, 0.9257107973098755, ...
func handleDebugSignal(_ context.Context) { }
[ -0.9188259840011597, 0.023533418774604797, 0.4342406690120697, 0.5224478244781494, 0.4855331480503082, -0.12544892728328705, 0.31947121024131775, 0.009056977927684784, 0.7088181972503662, -0.4595731198787689, -1.1594139337539673, -0.4747706651687622, 0.3845566511154175, 0.21474483609199524...
func Zsymv(uplo mat.MatUplo, n int, alpha complex128, a *mat.CMatrix, x *mat.CVector, incx int, beta complex128, y *mat.CVector, incy int) (err error) { var one, temp1, temp2, zero complex128 var i, ix, iy, j, jx, jy, kx, ky int one = (1.0 + 0.0*1i) zero = (0.0 + 0.0*1i) // Test the input parameters. if uplo !=...
[ -0.2202642858028412, 0.1698833405971527, 0.764937162399292, 0.40885257720947266, 0.008905766531825066, -1.188406229019165, 1.676470398902893, -0.37136492133140564, 0.3772624433040619, -0.01823285222053528, -0.22646988928318024, 0.6786132454872131, 0.011408532969653606, 0.15620000660419464,...
func NewBatchGRPCPayload(message *publicpb.BatchGRPCRequest) *public.TestPayloadBatch { v := &public.TestPayloadBatch{} if message.Records != nil { v.Records = make([]*public.TestPayload, len(message.Records)) for i, val := range message.Records { v.Records[i] = &public.TestPayload{ FirstField: val.Fir...
[ 0.6347309947013855, -0.11574871838092804, 0.5202423334121704, -0.45375001430511475, -0.10226549953222275, 0.48841172456741333, -0.031097399070858955, -1.0153459310531616, -1.171559453010559, 0.24996070563793182, -0.1400958001613617, 0.5650522708892822, -1.9130393266677856, 0.03138842061161...
func NewBatchGRPCResponse(result []*public.ResponsePayload) *publicpb.BatchGRPCResponse { message := &publicpb.BatchGRPCResponse{} message.Field = make([]*publicpb.ResponsePayload, len(result)) for i, val := range result { message.Field[i] = &publicpb.ResponsePayload{ FirstField: val.FirstField, FourthField...
[ 0.09744253754615784, -0.6898180246353149, 0.28621676564216614, -0.191214919090271, 0.29986876249313354, 0.3843863308429718, 0.2911522090435028, -1.1101549863815308, -0.9776008129119873, 0.42977574467658997, -0.6604523062705994, -0.19186252355575562, -1.6401699781417847, 0.29530709981918335...
func NewStreamedBatchGRPCPayload(recieveall *bool) *public.StreamMode { v := &public.StreamMode{} v.Recieveall = recieveall return v }
[ 0.37969696521759033, -0.022280583158135414, 0.32801660895347595, 0.07752720266580582, -0.31597572565078735, 1.0832265615463257, -0.21137022972106934, -0.509979248046875, -0.9792346954345703, 0.49808841943740845, -0.6485779285430908, 0.4628988206386566, -1.7089470624923706, 0.45272257924079...
func NewStreamedBatchGRPCResponse(result *public.ResponsePayload) *publicpb.StreamedBatchGRPCResponse { message := &publicpb.StreamedBatchGRPCResponse{ FirstField: result.FirstField, FourthField: result.FourthField, } return message }
[ 0.49966540932655334, -0.7099920511245728, 0.10153667628765106, 0.027474358677864075, -0.3116528391838074, 0.6658825874328613, 0.4938843250274658, -1.3245998620986938, -0.927318274974823, 0.32233577966690063, -0.673102855682373, 0.6492521166801453, -1.9227548837661743, 0.5222235321998596, ...
func Input(s bool, a ...interface{}) string { if s { fmt.Printf("\a") } fmt.Printf("%v", a...) scanner := bufio.NewScanner(os.Stdin) scanner.Scan() return scanner.Text() }
[ 0.09404786676168442, 0.13773691654205322, 0.6049897074699402, 0.3751276135444641, -1.651365041732788, 0.579635739326477, 0.10682180523872375, 0.12076959758996964, -0.20313575863838196, 0.10346592217683792, 0.18772563338279724, 0.7856000065803528, -0.07796201854944229, -0.45823588967323303,...
func NewWithClientCredentials(target string, zoneID string, clientID string, clientSecret string, tokenFormat TokenFormat) (*API, error) { u, err := BuildTargetURL(target) if err != nil { return nil, err } tokenURL := urlWithPath(*u, "/oauth/token") v := url.Values{} v.Add("token_format", tokenFormat.String())...
[ -0.086760975420475, -1.5787988901138306, 0.2609916627407074, -0.40428751707077026, -0.5113852620124817, -0.39248940348625183, -0.9524116516113281, -0.54241943359375, 0.05954141914844513, 0.18012171983718872, -0.0625179260969162, 0.4803198277950287, -0.1842680722475052, 0.08292093127965927,...
func NewWithPasswordCredentials(target string, zoneID string, clientID string, clientSecret string, username string, password string, tokenFormat TokenFormat) (*API, error) { u, err := BuildTargetURL(target) if err != nil { return nil, err } tokenURL := urlWithPath(*u, "/oauth/token") v := url.Values{} v.Add("...
[ -0.4025929868221283, -1.4533406496047974, 0.4773887097835541, -0.3205215036869049, -0.6624302864074707, -0.35199102759361267, -0.6019605994224548, -0.41268956661224365, 0.2628532350063324, 0.4128679633140564, 0.07236811518669128, 0.6528075337409973, -0.6465036273002625, 0.16641904413700104...