text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (r *ListAllMyBucketsResult) Response(w http.ResponseWriter) { resp, err := xml.Marshal(r) if err != nil { errResult := Error{Code: ErrorCodeInternalError, Message: err.Error()} errResult.Response(w) return } w.Header().Set("Content-Type", "application/xml") w.WriteHeader(http.StatusOK) _, _ = w.Writ...
[ 0.5530059337615967, -1.1802765130996704, 0.3544955253601074, 0.02165769599378109, -0.6434600949287415, -0.32451963424682617, 0.32074838876724243, -0.31999677419662476, 0.910508930683136, -0.19317765533924103, -0.7228037714958191, -0.7457374930381775, 0.08657919615507126, 0.1531902998685836...
func (s *dbStore) Seek(key []byte, startTS uint64) ([]byte, []byte, error) { err := s.prepareSeek(startTS) if err != nil { return nil, nil, errors.Trace(err) } key, val, err := s.db.Seek(key) s.wg.Done() return key, val, err }
[ -0.9203588962554932, 0.18359313905239105, 0.26758965849876404, -0.24622827768325806, -0.6680939197540283, 0.0640016719698906, 0.32702454924583435, -0.39582014083862305, -0.3909369111061096, -0.17875677347183228, -0.3635517358779907, -0.09127647429704666, -0.16159412264823914, 0.51035839319...
func (s *dbStore) SeekReverse(key []byte, startTS uint64) ([]byte, []byte, error) { err := s.prepareSeek(startTS) if err != nil { return nil, nil, errors.Trace(err) } key, val, err := s.db.SeekReverse(key) s.wg.Done() return key, val, err }
[ -1.4814904928207397, 0.35807815194129944, 0.5048422813415527, 0.3160571753978729, -0.001888069324195385, -0.6007106900215149, -0.11798281222581863, -0.09006883949041367, -1.0186761617660522, 0.07903194427490234, -0.573517918586731, 0.1724390685558319, -0.9451793432235718, -0.11952486634254...
func (s *dbStore) CommitTxn(txn *dbTxn) error { if len(txn.lockedKeys) == 0 { return nil } return s.doCommit(txn) }
[ -0.8844656348228455, -0.28615641593933105, 0.4682635962963104, 0.06562019139528275, 0.09887143969535828, -0.3087300658226013, -0.3106817603111267, -0.1870325207710266, 0.05875292792916298, 1.2169132232666016, -0.7310562133789062, -0.9564918279647827, -0.7346187829971313, 0.1618758738040924...
func IsLocalStore(s kv.Storage) bool { _, ok := s.(*dbStore) return ok }
[ 0.7046249508857727, 0.038025498390197754, 0.192905455827713, 0.7316982746124268, -0.9180426597595215, -0.32676607370376587, -0.8733868598937988, 0.45945650339126587, 1.538639783859253, 0.19223254919052124, -0.5415507555007935, -0.3194499611854553, -0.5748353004455566, 0.9381579756736755, ...
func (d Driver) Open(path string) (kv.Storage, error) { mc.mu.Lock() defer mc.mu.Unlock() u, err := url.Parse(path) if err != nil { return nil, errors.Trace(err) } engineSchema := filepath.Join(u.Host, u.Path) if store, ok := mc.cache[engineSchema]; ok { // TODO: check the cache store has the same engine w...
[ -0.6771551370620728, 0.23356670141220093, 0.5671431422233582, -0.44948819279670715, -0.4775593876838684, -0.04433323070406914, 0.43768182396888733, 0.572651743888855, 0.20446978509426117, -0.1524832397699356, 0.0006228162674233317, -0.43021923303604126, -0.5600044131278992, -0.590289175510...
func CreateBlueprint(rootElement string) *Blueprint { doc := etree.NewDocument() doc.CreateElement(rootElement) return &Blueprint{XMLData: doc} }
[ 0.5205401182174683, -0.82185298204422, 0.512646496295929, -0.10562475025653839, -0.5730717182159424, 0.4090644121170044, -1.097180724143982, -0.7811790108680725, -0.2563689351081848, -0.7882626056671143, -0.016687707975506783, 0.7041909694671631, -0.7082898020744324, 0.35519498586654663, ...
func (bp *Blueprint) Render() (string, error) { if bp.XMLData == nil { return "", errors.ErrBlueprintXMLEmpty } var buffer bytes.Buffer if _, err := bp.XMLData.WriteTo(&buffer); err != nil { return "", err } return buffer.String(), nil }
[ -0.06291866302490234, -0.16761094331741333, 0.6768331527709961, -0.3768256902694702, 0.11891020089387894, 0.5063891410827637, -0.7762491106987, -0.22913269698619843, -0.5963637232780457, 0.20817139744758606, 0.5559520721435547, 0.3341449797153473, -1.879526972770691, -0.35881295800209045, ...
func (bp *Blueprint) SetElement(tag, value string) { element := bp.XMLData.Root().FindElement(tag) if element == nil { element = bp.XMLData.Root().CreateElement(tag) } element.SetText(value) }
[ 0.36393699049949646, -0.1910342127084732, 0.4268418252468109, -0.24933390319347382, 0.29207170009613037, 0.5554218888282776, -0.3021478056907654, -0.0047248550690710545, -0.5310527086257935, -0.032825175672769547, 0.27277958393096924, 0.9410322904586792, -0.3970104455947876, 1.112011790275...
func (bp *Blueprint) AddElement(blueprint etree.Document) { bp.XMLData.Root().AddChild(blueprint.Root()) }
[ -0.4186892509460449, -0.23882904648780823, 0.37011662125587463, 0.13602451980113983, 0.3417642116546631, 1.9091100692749023, 0.13558350503444672, 0.32259294390678406, -0.23282380402088165, -0.5372979044914246, 0.45690926909446716, 1.0982346534729004, -0.6481916308403015, 0.9051809310913086...
func (bp *Blueprint) SetName(value string) { bp.SetElement("NAME", value) }
[ -0.08560868352651596, 0.1790977418422699, 0.5196455121040344, 0.7163508534431458, -0.1724502295255661, 0.773425817489624, 0.15978583693504333, -0.2587778568267822, -0.1097688302397728, 1.073470950126648, -0.856144368648529, 0.21354512870311737, -1.1183358430862427, 0.9649513363838196, -0...
func (c *Client) GetAccuracyMetrics(ctx context.Context, params *GetAccuracyMetricsInput, optFns ...func(*Options)) (*GetAccuracyMetricsOutput, error) { if params == nil { params = &GetAccuracyMetricsInput{} } result, metadata, err := c.invokeOperation(ctx, "GetAccuracyMetrics", params, optFns, addOperationGetAcc...
[ 0.0463351309299469, 0.8916716575622559, 0.5325523018836975, 0.4279329180717468, 0.06292609125375748, -0.6518058776855469, 0.8287522196769714, -1.0170592069625854, 0.6975274682044983, -0.07716681808233261, 0.35604944825172424, 1.8846182823181152, 0.35202327370643616, -0.49540477991104126, ...
func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { fmt.Println("CC Demo Is Starting Up") _, args := stub.GetFunctionAndParameters() var Aval int var err error fmt.Println("Init() args count:", len(args)) fmt.Println("Init() args found:", args) // expecting 1 arg for instantiate or u...
[ -0.4996497333049774, -0.5501998662948608, 0.8847814202308655, 0.2797985076904297, 0.3468802273273468, 0.6380802989006042, 0.8701796531677246, 0.2090156525373459, -0.5092639923095703, -0.2309470921754837, -0.4280906319618225, 0.3126230239868164, -0.43903648853302, 0.7395852208137512, 0.76...
func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { function, args := stub.GetFunctionAndParameters() fmt.Println(" ") fmt.Println("starting invoke, for - " + function) // Handle different functions if function == "init" { //initialize the chaincode state, used as reset return t.Ini...
[ -0.5946861505508423, -0.26873496174812317, 0.9178422093391418, 0.17339912056922913, -0.0053988052532076836, -0.8387778997421265, -0.09183771163225174, -0.007777088787406683, -0.22188447415828705, -0.5911376476287842, 0.3041585087776184, 0.42144763469696045, -0.5965679883956909, -0.23822517...
func (t *SimpleChaincode) Query(stub shim.ChaincodeStubInterface) pb.Response { return shim.Error("Unknown supported call - Query()") }
[ 0.13494840264320374, 0.2062060385942459, 0.45532095432281494, 0.8502402901649475, -0.22215768694877625, 0.06783703714609146, -0.9019906520843506, -0.7104810476303101, 0.8330984115600586, -0.6563289761543274, -0.11219580471515656, 0.827427864074707, -1.2466896772384644, 0.5568761229515076, ...
func (o *PatchCategoriesCategoryIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 204: result := NewPatchCategoriesCategoryIDNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, ...
[ -0.4489172399044037, -0.8358638882637024, 0.5323886871337891, -0.030533654615283012, -0.40961912274360657, -1.1013092994689941, -0.02262936159968376, -0.430040568113327, 0.32484951615333557, -0.4809161126613617, 0.4537335932254791, -0.356643408536911, -0.40384429693222046, 0.17846749722957...
func NewPatchCategoriesCategoryIDNoContent() *PatchCategoriesCategoryIDNoContent { return &PatchCategoriesCategoryIDNoContent{} }
[ 0.7343521118164062, 0.07414054125547409, -0.3648410737514496, -0.8151870965957642, -0.4682566821575165, -0.6289985775947571, 0.024891847744584084, -1.363935112953186, -0.13890595734119415, -0.9895075559616089, 0.1676987260580063, -0.3821987807750702, 0.4445626437664032, 0.49647262692451477...
func NewPatchCategoriesCategoryIDUnauthorized() *PatchCategoriesCategoryIDUnauthorized { return &PatchCategoriesCategoryIDUnauthorized{} }
[ -0.44578468799591064, 0.10469803959131241, 0.19674158096313477, 0.17251820862293243, -0.941869854927063, -0.3307599723339081, 0.3043838143348694, -0.33994749188423157, 0.2713988423347473, -1.6870558261871338, 0.05983591079711914, 0.2397448569536209, 0.8381264209747314, -0.0712280198931694,...
func NewPatchCategoriesCategoryIDNotFound() *PatchCategoriesCategoryIDNotFound { return &PatchCategoriesCategoryIDNotFound{} }
[ 0.3282244801521301, -0.5584587454795837, -0.3118527829647064, -0.5362455248832703, 0.0005497725214809179, -0.037668295204639435, 0.11200345307588577, -0.4600510895252228, 0.26300325989723206, -0.7909016013145447, -0.0056070503778755665, 0.2541690170764923, 0.9001435041427612, 0.58413296937...
func NewPatchCategoriesCategoryIDUnprocessableEntity() *PatchCategoriesCategoryIDUnprocessableEntity { return &PatchCategoriesCategoryIDUnprocessableEntity{} }
[ 0.15762288868427277, 0.12528756260871887, 0.4046661853790283, -0.31362995505332947, -0.5499767065048218, -0.15422561764717102, 0.7761940360069275, -0.2846422791481018, -0.2783143222332001, -0.8112635016441345, 0.06423191726207733, -0.38059958815574646, 0.616571307182312, -0.493737518787384...
func NewAcceptedProposal(data []byte) (*AcceptedProposal, error) { var ap AcceptedProposal dec := gob.NewDecoder(bytes.NewBuffer(data)) if err := dec.Decode(&ap); err != nil { return nil, err } return &ap, nil }
[ 0.35270819067955017, -0.2186111956834793, 0.010906528681516647, -0.7004378437995911, -1.8280751705169678, 0.01146205235272646, -0.5809348225593567, -0.04351050406694412, 0.19246478378772736, 0.9339832663536072, -0.4931444227695465, 0.4379671812057495, -0.8645697236061096, 0.100729599595069...
func (p *AcceptedProposal) Encode() ([]byte, error) { var buf bytes.Buffer if err := gob.NewEncoder(&buf).Encode(p); err != nil { return nil, err } return buf.Bytes(), nil }
[ 0.350442111492157, 0.9697376489639282, 0.15928205847740173, 0.19040022790431976, -0.15075160562992096, 0.8750874996185303, -1.0928200483322144, 0.22577697038650513, -0.6105995178222656, 1.1157869100570679, 0.4021187722682953, 0.814163088798523, -1.5237557888031006, 0.21866795420646667, 1...
func (p *AcceptedProposal) String() string { return fmt.Sprintf("[%d][%d] %s - %s", p.Term, p.Index, p.Topic, string(p.Data)) }
[ 0.17683732509613037, -0.9085937142372131, 0.19313672184944153, -1.478622317314148, -0.9502009153366089, 1.007539987564087, -0.5906041264533997, -0.5635295510292053, -0.8019161820411682, 1.0699883699417114, 0.6174325346946716, 0.9379044771194458, -0.18256914615631104, -1.038210391998291, ...
func NewIndex(data []byte) (*Index, error) { var i Index dec := gob.NewDecoder(bytes.NewBuffer(data)) if err := dec.Decode(&i); err != nil { return nil, err } return &i, nil }
[ 0.2644392251968384, -0.4694393575191498, 0.1813659369945526, -0.11836328357458115, -0.42379871010780334, -0.10583671927452087, -0.4990018606185913, 0.5279335975646973, 0.0023773282300680876, -0.03793555498123169, -1.0004774332046509, 0.48419755697250366, -0.940517246723175, -0.871430456638...
func (i *Index) Encode() []byte { var buf bytes.Buffer _ = gob.NewEncoder(&buf).Encode(i) return buf.Bytes() }
[ -0.41618379950523376, 1.0182228088378906, 0.2733878791332245, 0.3802550733089447, 0.9817851781845093, 0.5340648889541626, -0.6352776885032654, -0.5217458009719849, -0.28253236413002014, 0.23801735043525696, -0.6239721775054932, 0.579177737236023, -1.471753716468811, -0.677919328212738, 0...
func ValidColumn(column string) bool { for i := range Columns { if column == Columns[i] { return true } } return false }
[ -0.0011544028529897332, -0.9698054194450378, 0.47790923714637756, 0.3947250545024872, 0.07442084699869156, 0.6267186403274536, -0.015806810930371284, 0.38189634680747986, -0.21145063638687134, -0.15180832147598267, -0.8481018543243408, 0.23681211471557617, -0.21461717784404755, -0.42537471...
func getMaxSequenceNumberWithTestOverride(pathCache *inPathCache, logger bark.Logger) int64 { var shortExtents int64 override := pathCache.inputHost.GetTestShortExtentsByPath() logFn := func() bark.Logger { return logger } if override != `` { shortExtents = common.OverrideValueByPrefix( logFn, pathCache...
[ -0.28606894612312317, -0.17092545330524445, 0.8765541911125183, -0.39821502566337585, -0.7224277853965759, -0.19291040301322937, 0.6277937293052673, 0.20379705727100372, 1.1933422088623047, -0.64972984790802, -0.4873255789279938, 0.22664685547351837, -0.6344045996665955, 0.1753758192062378...
func (conn *extHost) setReplicaInfo(hostport storeHostPort, replicaConn *replicaConnection) { conn.streams[hostport] = &replicaInfo{ conn: replicaConn, sendTimer: common.NewTimer(replicaSendTimeout), } }
[ 0.2102956622838974, -0.039772290736436844, 0.2888409495353699, -0.3161492943763733, -0.4999350607395172, 0.029300542548298836, 0.027995767071843147, 0.8007252812385559, -0.6157697439193726, 0.1570747196674347, -1.4313933849334717, 0.8540969491004944, -0.20539674162864685, 0.231822460889816...
func (conn *extHost) sendMessageToReplicas(pr *inPutMessage, extSendTimer *common.Timer, watermark *int64) (int64, error) { var err error watermarkOnly := pr == nil if watermarkOnly && conn.destType != shared.DestinationType_LOG { log.Fatal("WatermarkOnly message requested for non LOG destination") } msg := sto...
[ -0.669510006904602, 0.8738038539886475, 0.8608048558235168, -0.6218326687812805, -0.43376466631889343, -0.3355240523815155, 0.7258939743041992, 0.03312862291932106, -0.3085130453109741, 0.41644731163978577, 0.025354726240038872, 0.5971966981887817, -1.0645188093185425, 0.3434396982192993, ...
func (conn *extHost) writeAckToPubConn(putMsgAckCh chan *cherami.PutMessageAck, putMsgAck *cherami.PutMessageAck) { select { case putMsgAckCh <- putMsgAck: case <-conn.forceUnloadCh: } }
[ -0.2341291606426239, -0.07538029551506042, 0.6145097613334656, -0.10835454612970352, 0.7355424761772156, -0.050972726196050644, -0.0011937618255615234, 0.19721825420856476, -0.4243870675563812, 0.2850853502750397, 0.1278875321149826, 1.1208313703536987, -0.1743682324886322, -0.024734711274...
func (conn *extHost) sealExtent() error { conn.sealLk.Lock() defer conn.sealLk.Unlock() if atomic.LoadUint32(&conn.sealed) == sealed { // already sealed return nil } // we have not sealed yet, so notify the extent controller extController, err := conn.tClients.GetAdminControllerClient() if err == nil { up...
[ 0.060733672231435776, -0.007211506832391024, 0.786205530166626, -0.8390547037124634, -0.5660475492477417, -0.0405479371547699, -0.2987416684627533, -0.5950827598571777, 0.11894486099481583, 0.5264914035797119, -0.788053572177887, 0.725734531879425, -0.6286290287971497, 0.5251766443252563, ...
func (conn *extHost) Report(reporter common.LoadReporter) { // TODO: Report Extent specific load like incomingMessageCount, incomingBytesCount, putLatency now := time.Now().UnixNano() intervalSecs := (now - conn.lastExtLoadReportedTime) / int64(time.Second) if intervalSecs < 1 { return } msgsInPerSec := conn.e...
[ -0.13657121360301971, 0.6280965805053711, 0.7288995981216431, -0.5725780725479126, -0.3422214686870575, 0.3842363655567169, 0.3903249204158783, -0.30404770374298096, -0.9051638245582581, -0.0062270634807646275, 0.36011937260627747, -0.2509596347808838, -0.373911589384079, 0.659725129604339...
func (conn *extHost) GetMsgsLimitPerSecond() int { return int(atomic.LoadInt32(&conn.extentMsgsLimitPerSecond)) }
[ 1.3776798248291016, 0.4997003972530365, 0.6850883960723877, 0.22939176857471466, -0.7883634567260742, -0.2741794288158417, -0.6259244680404663, -0.5574514865875244, -0.4950086772441864, 0.09828241914510727, -0.08491115272045135, 0.5636932849884033, -1.6737422943115234, 0.5082849264144897, ...
func (conn *extHost) SetMsgsLimitPerSecond(connLimit int32) { atomic.StoreInt32(&conn.extentMsgsLimitPerSecond, connLimit) conn.SetExtTokenBucketValue(int32(connLimit)) }
[ 0.9562662243843079, 0.2031433880329132, 0.7887023687362671, -0.011986428871750832, -0.5997129678726196, -0.07692521065473557, -0.9223176836967468, -0.6612852811813354, -0.7845481038093567, 0.06725386530160904, -0.854553759098053, 0.18871237337589264, -1.2326884269714355, 0.1998748928308487...
func (conn *extHost) GetExtTokenBucketValue() common.TokenBucket { return conn.extTokenBucketValue.Load().(common.TokenBucket) }
[ -0.02264794521033764, 0.6714309453964233, 0.31938260793685913, -0.432653546333313, -0.9944255352020264, -0.07233483344316483, -1.0499404668807983, -0.46218740940093994, -0.5057703852653503, -0.5085649490356445, -0.16253161430358887, 0.7225955724716187, 0.21477501094341278, 0.11338552832603...
func (conn *extHost) SetExtTokenBucketValue(connLimit int32) { tokenBucket := common.NewTokenBucket(int(connLimit), common.NewRealTimeSource()) conn.extTokenBucketValue.Store(tokenBucket) }
[ -0.1794099360704422, 0.8848299384117126, 0.3903466761112213, -0.7650247812271118, -0.845788836479187, 0.0861886665225029, -1.0415464639663696, 0.149757519364357, -0.7480862140655518, -0.3325103223323822, -1.3223706483840942, 0.18512755632400513, 0.10914548486471176, -0.18697264790534973, ...
func (conn *extHost) stopWritePump() bool { if conn.state <= extHostPrepClose { close(conn.closeChannel) // wait for the write pump to drain for some timeout period if ret := common.AwaitWaitGroup(&conn.waitWriteWG, defaultWGTimeout); !ret { conn.logger.Fatalf("unable to stop write pump; wait group timeout") ...
[ -1.7718896865844727, 0.016472356393933296, 0.7410807609558105, -0.7612420320510864, 0.5397548675537109, 0.5519786477088928, 0.05053362622857094, 0.4795435070991516, -0.8309633731842041, 0.14356233179569244, 0.20671512186527252, -0.5783777832984924, -1.5973269939422607, -0.9797203540802002,...
func (conn *extHost) isDrained(replySeqNo int64) bool { conn.lk.RLock() if conn.state != extHostCloseWrite { conn.lk.RUnlock() return false } ret := false if atomic.LoadInt64(&conn.seqNo) == replySeqNo { conn.logger.WithFields(bark.Fields{ `drainedSeqNo`: replySeqNo, }).Info("extent drained completely"...
[ -0.8665663003921509, 0.14496907591819763, 1.0167125463485718, -0.9793540835380554, -0.6879030466079712, 0.4346877932548523, -0.19923284649848938, -0.23740747570991516, 0.7010757327079773, 0.01927073858678341, -0.0923122987151146, 1.145036220550537, -1.2271599769592285, 0.06447262316942215,...
func (conn *extHost) prepForClose() bool { conn.lk.Lock() if conn.state != extHostActive { conn.lk.Unlock() return false } conn.state = extHostPrepClose conn.dstMetrics.Decrement(load.DstMetricNumWritableExtents) conn.lk.Unlock() return true }
[ -0.20954549312591553, 0.8796671032905579, 0.7048379182815552, 0.10071198642253876, -0.9580264687538147, 0.07636241614818573, -0.29047784209251404, -0.11529681831598282, -0.5860686302185059, 0.044796139001846313, 0.7274338603019714, -0.11873538047075272, -0.3964988887310028, 0.1623178124427...
func (conn *extHost) waitForDrain(drainTimeout time.Duration) { drainTimer := common.NewTimer(drainTimeout) defer drainTimer.Stop() select { // after we drain, we close the exthost which closes this channel as well case <-conn.streamClosedChannel: return case <-drainTimer.C: // timedout.. simply close go co...
[ 0.3344695270061493, 0.10615292936563492, 0.5497925877571106, -1.2073947191238403, -0.04015578329563141, -0.03955010324716568, -0.8172305226325989, -0.17235125601291656, -0.3576090633869171, -0.6547864079475403, 0.08863168209791183, 0.257935106754303, -0.5419609546661377, 0.6517287492752075...
func (conn *extHost) stopWrite(drainTimeout time.Duration) error { conn.lk.Lock() stopped := conn.stopWritePump() conn.lk.Unlock() if stopped { conn.waitForDrain(drainTimeout) } return nil }
[ -1.1358815431594849, 0.6945638656616211, 0.30027949810028076, 0.009128778241574764, 0.783224880695343, -0.02973368391394615, 0.1668948084115982, 0.689086377620697, -1.143020510673523, -0.04103816673159599, 0.136945903301239, -0.6662713289260864, -0.8236973285675049, -0.5570905208587646, ...
func OwnerReferenceFromObject(obj client.Object) metav1.OwnerReference { return metav1.OwnerReference{ APIVersion: obj.GetObjectKind().GroupVersionKind().GroupVersion().String(), Kind: obj.GetObjectKind().GroupVersionKind().Kind, Name: obj.GetName(), UID: obj.GetUID(), } }
[ -0.5515043139457703, -1.4472386837005615, 0.49035462737083435, 0.19465290009975433, -0.4201759397983551, -0.02340828813612461, -0.025766417384147644, -0.8971306085586548, 0.3005736172199249, 0.18725542724132538, -0.09329318255186081, 1.0594574213027954, -0.06509529054164886, -0.94115740060...
func GetUnstructuredObject(scheme *runtime.Scheme, obj runtime.Object) (*unstructured.Unstructured, error) { u := &unstructured.Unstructured{} if err := scheme.Convert(obj, u, nil); err != nil { return nil, fmt.Errorf("failed to convert Object to Unstructured: %v", err) } return u, nil }
[ -0.05700394883751869, -0.2316666841506958, 0.5107849836349487, -0.7904461026191711, -0.11842416226863861, -0.4376136064529419, 0.4010615944862366, -0.69112229347229, -0.018700385466217995, -0.3186725378036499, -1.1441324949264526, 0.9126862287521362, -0.09489435702562332, -0.54361587762832...
func IsInitialized(scheme *runtime.Scheme, obj runtime.Object) (bool, error) { u, err := GetUnstructuredObject(scheme, obj) if err != nil { return false, fmt.Errorf("failed to convert Object to Unstructured: %v", err) } status, err := GetObjectStatus(u.Object) if err != nil { return false, fmt.Errorf("failed t...
[ -0.7498432993888855, -0.32385945320129395, 0.9693738222122192, -0.38302192091941833, 0.416012704372406, -0.3759140074253082, 0.26033464074134827, 0.3173540532588959, 0.8536710143089294, 0.8277531266212463, -1.284712791442871, 0.3161448836326599, 0.6257259249687195, 0.8379137516021729, -0...
func GetObjectStatus(obj map[string]interface{}) (map[string]interface{}, error) { status, found, err := NestedFieldNoCopy(obj, "status") if err != nil { return nil, fmt.Errorf("error reading object status: %v", err) } if !found { return nil, fmt.Errorf("object status not found") } objStatus, ok := status.(...
[ -0.9868714213371277, -0.7857732772827148, 0.6706921458244324, -0.49947312474250793, -0.35523173213005066, 0.33652886748313904, 0.3081708550453186, -0.144085094332695, 0.27987104654312134, 0.6192697286605835, -0.9944344162940979, 0.17614680528640747, -0.006405679043382406, -0.11520270258188...
func StatusChanged(scheme *runtime.Scheme, oldo runtime.Object, newo runtime.Object) (bool, error) { // Get the old status value. ou, err := GetUnstructuredObject(scheme, oldo) if err != nil { return false, fmt.Errorf("failed to convert old Object to Unstructured: %v", err) } oldStatus, err := GetObjectStatus(ou...
[ 0.05833999067544937, -0.7118380665779114, 0.7925478219985962, -0.41490933299064636, 0.03873094916343689, 0.31459522247314453, -0.04176869988441467, 0.05680503323674202, -0.2089196890592575, 0.1768193393945694, -0.9840739965438843, 0.39048507809638977, 0.8582661747932434, 0.3881139457225799...
func NestedFieldNoCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) { var val interface{} = obj for i, field := range fields { if m, ok := val.(map[string]interface{}); ok { val, ok = m[field] if !ok { return nil, false, nil } } else { return nil, false, fmt.Errorf("%v...
[ -1.1708734035491943, -0.04163984954357147, 0.904981255531311, -0.08314718306064606, -0.7356896996498108, 0.8318433165550232, 1.2681509256362915, 0.07903798669576645, -0.6540141105651855, -0.18382544815540314, -0.621973991394043, -0.242654487490654, -0.7787530422210693, -0.2586302161216736,...
func ConnectByName(hostname string, port int) (*tls.Conn, *Config, error) { var conn *tls.Conn resolver, err := GetResolver("") if err != nil { return nil, nil, fmt.Errorf("error obtaining resolver address: %s", err.Error()) } tlsa, err := GetTLSA(resolver, hostname, port) if err != nil { return nil, nil, ...
[ -0.2979431748390198, -0.3948562741279602, 0.8841361999511719, -0.30758562684059143, -0.5308714509010315, -1.2030715942382812, 0.11783792823553085, -0.23880325257778168, -1.0111421346664429, 0.8988572955131531, -0.6661015152931213, -0.60621178150177, 0.10407130420207977, 0.36139827966690063...
func ConnectByNameAsync(hostname string, port int) (*tls.Conn, *Config, error) { var conn *tls.Conn var ip net.IP resolver, err := GetResolver("") if err != nil { return nil, nil, fmt.Errorf("error obtaining resolver address: %s", err.Error()) } tlsa, err := GetTLSA(resolver, hostname, port) if err != nil {...
[ -0.7165659070014954, -0.5361681580543518, 0.9709060192108154, -0.3103371560573578, -0.4006187617778778, -1.821622371673584, 0.06916133314371109, -0.5520999431610107, -0.543442964553833, 0.6658366322517395, -0.5437785983085632, -0.623315691947937, 0.08782866597175598, 0.4353538155555725, ...
func LatestRunHandler(r *http.Request) (string, error) { // Validate the request was via GET method _, err := ValidateMethod(r, "GET") if err != nil { log.Error(err) return "", err } log.Infof("Handling latest run request...") // Grab the database db := datastore.GetDatabase("data/test.sqlite") //Make su...
[ -0.7714455723762512, -0.5186500549316406, 0.715761661529541, -0.9553140997886658, -0.5302748084068298, -0.4330610930919647, -0.32247796654701233, -0.3313579559326172, 0.11351491510868073, -0.12124095857143402, 0.33622682094573975, -0.06243505701422691, -0.9397154450416565, 0.19621846079826...
func (c Provider) Match(query string) string { sm := MirrorsRegex.FindStringSubmatch(query) if len(sm) == 0 { return "" } return sm[1] }
[ -0.44682738184928894, 0.8886880278587341, 0.3907599151134491, -0.19374167919158936, -0.6409581899642944, 0.4990352392196655, 0.07102709263563156, 0.030692679807543755, 1.1582533121109009, 0.6300754547119141, 0.5500930547714233, 0.6586848497390747, -0.7415077090263367, -0.47146162390708923,...
func (c Provider) Name() string { return "GNU" }
[ -0.6067304611206055, 0.1979190856218338, 0.49993300437927246, 0.025636889040470123, -1.1030402183532715, 1.0535236597061157, -0.4048581123352051, 0.18283674120903015, 0.04158279299736023, 1.5035881996154785, -1.0494211912155151, 0.5281543731689453, 0.33920344710350037, 0.6861447095870972, ...
func (c Provider) Latest(name string) (r *results.Result, s results.Status) { rs, s := c.Releases(name) if s == results.OK { sort.Sort(rs) r = rs.Last() } return }
[ -0.7982985973358154, -0.4305734932422638, 0.5682836771011353, -0.9766224026679993, -0.07400787621736526, -0.48690712451934814, -0.5142636299133301, -0.5045121312141418, -0.2678191661834717, 0.9024528861045837, -0.6434932947158813, 0.27140939235687256, -0.32891133427619934, -0.3709217607975...
func (c Provider) Releases(name string) (rs *results.ResultSet, s results.Status) { client, err := ftp.Dial(MirrorsFTP) if err != nil { s = results.Unavailable return } err = client.Login("anonymous", "anonymous") if err != nil { s = results.Unavailable return } entries, err := client.List("gnu" + "/" + ...
[ -0.8520522117614746, 0.8041630983352661, 0.7537427544593811, -1.0806479454040527, -0.2654249370098114, -0.7901571989059448, -1.0614618062973022, -0.332784503698349, -0.1266283541917801, 0.39829254150390625, -0.24876435101032257, 0.6685251593589783, -0.48775818943977356, 0.6039826273918152,...
func Maker(fn interface{}, impl func(args []reflect.Value) (results []reflect.Value)) { fnV := reflect.ValueOf(fn).Elem() fnI := reflect.MakeFunc(fnV.Type(), impl) fnV.Set(fnI) }
[ -0.9945189952850342, 0.623999834060669, 0.3117547631263733, -0.5721713304519653, -0.10840100049972534, -0.4487307369709015, -0.18408530950546265, -0.1952308714389801, -0.29453399777412415, -0.09395498037338257, 0.04670863598585129, 0.3908352553844452, 1.0583363771438599, -0.024630019441246...
func ToI(slice interface{}) []interface{} { s := reflect.ValueOf(slice) if s.Kind() != reflect.Slice { panic("ToInterface expects a slice type") } ret := make([]interface{}, s.Len()) for i := 0; i < s.Len(); i++ { ret[i] = s.Index(i).Interface() } return ret }
[ -0.7160087823867798, 0.2676236927509308, 0.547313392162323, 0.6630125641822815, -0.2359686642885208, -0.14194829761981964, 0.4575673043727875, -0.07167227566242218, 0.014929569326341152, 1.3257273435592651, -1.2098175287246704, 0.2036871761083603, -0.4320204257965088, -0.3565680682659149, ...
func Valueize(values ...reflect.Value) []reflect.Value { return values }
[ -0.4124750792980194, 0.7523179650306702, 0.4846827983856201, -0.026837382465600967, 1.400673508644104, 0.6910236477851868, -1.002701997756958, -0.5252808928489685, -0.3458602726459503, -0.39255520701408386, -0.3935946524143219, 0.41525644063949585, 0.026020973920822144, 0.6865930557250977,...
func FromHex(s string) []byte { if len(s) > 1 { if s[0:2] == "0x" || s[0:2] == "0X" { s = s[2:] } } if len(s)%2 == 1 { s = "0" + s } return Hex2Bytes(s) }
[ -0.44997939467430115, -0.2317233681678772, 0.5149484872817993, 0.6467528343200684, -0.2619282305240631, -0.34419089555740356, -1.2658438682556152, 1.0909010171890259, 0.40226003527641296, -0.9678184390068054, -0.3222637474536896, 0.2629975974559784, 0.08503346890211105, 0.30217763781547546...
func Hex2Bytes(str string) []byte { h, _ := hex.DecodeString(str) return h }
[ 0.3629652261734009, -0.802777886390686, 0.15888680517673492, -0.01310430932790041, -0.4805009067058563, 0.14245758950710297, -1.643961787223816, 0.81425541639328, -0.26764237880706787, -0.527492105960846, -1.2847845554351807, 0.09403771162033081, -0.10111487656831741, 0.6402640342712402, ...
func FlagsToConfig() (*Config, error) { var cfg Config flag.StringVar(&cfg.AccessKey, "key", "", "Access Key ID for AWS") flag.StringVar(&cfg.SecretKey, "secret", "", "Secret Access Key for AWS") flag.StringVar(&cfg.RegionName, "region", "us-east-1", "Name of region for AWS") flag.StringVar(&cfg.BucketName, "buck...
[ 0.17857079207897186, -0.25649353861808777, 0.7414571642875671, -0.8280724883079529, 0.2694396376609802, 0.24288055300712585, -0.2075510174036026, -0.1129428893327713, -0.5920035243034363, 0.7879696488380432, -0.761573076248169, 0.2504095435142517, -0.43472540378570557, 0.6680118441581726, ...
func (d *Deployer) plan(destBucket *s3.Bucket, uploadFiles chan<- file) (DeployStats, error) { var stats DeployStats // List all files in the remote bucket contents, err := destBucket.GetBucketContents() if err != nil { return stats, err } remoteFiles := *contents // All local files at sourcePath localFiles ...
[ -0.07749921828508377, 0.01863788440823555, 0.7412265539169312, -0.8381062746047974, -0.0891256332397461, 0.12617845833301544, 0.9221852421760559, 0.07729527354240417, 0.3790445029735565, 0.3154515027999878, -0.4015600383281708, 0.15303228795528412, 0.27052709460258484, 0.6417539119720459, ...
func walk(basePath string, files chan<- file) { filepath.Walk(basePath, func(path string, info os.FileInfo, err error) error { if err != nil { return err } if info.IsDir() { // skip hidden directories like .git if strings.HasPrefix(info.Name(), ".") { return filepath.SkipDir } } else { if in...
[ -0.26265648007392883, 0.11472959071397781, 0.8008261322975159, -0.7124620676040649, 0.14735344052314758, 0.5088860988616943, 1.1408599615097046, -0.6241108775138855, 0.1379113495349884, -0.6860016584396362, -0.07521042227745056, -0.02689487114548683, 0.17121818661689758, 0.3851543962955475...
func (d *Deployer) shouldOverwrite(source file, dest s3.Key) (up bool, reason string) { f, err := os.Open(source.absPath) if err != nil { log.Fatalf("Error opening file %s: %v", source.absPath, err) } defer f.Close() var ( sourceSize = source.size r io.Reader = f ) route, err := d.fin...
[ -0.7033435106277466, 0.26828762888908386, 0.8981483578681946, -0.2678013741970062, -0.11989975720643997, 0.16631028056144714, -0.4189894497394562, 0.2966746389865875, 0.020286057144403458, 0.9998651146888733, 0.07189533114433289, -0.5778335332870483, 0.4016651511192322, 0.3621904253959656,...
func Open(o ...option.Option) (store.Store, error) { res := &mock{ streams: streamMap{}, } if err := option.Apply(res, o...); err != nil { return nil, err } return res, nil }
[ -0.5128362774848938, 0.09346923977136612, 0.2978329658508301, 0.03842778876423836, -0.49056562781333923, 0.4122040569782257, 1.5002237558364868, 0.7836378216743469, 0.8143184781074524, -0.2673547863960266, -0.1168888658285141, -0.21055868268013, -1.113889217376709, -0.5032367706298828, -...
func NewServer() *Server { tr := make(chan TimingReport) s := &Server{ tr, } go s.MonitorTimingReports() return s }
[ 0.127743661403656, -0.2633400559425354, 0.3730323910713196, 0.09653230011463165, 0.3895914554595947, 0.032925017178058624, 0.3735542893409729, -0.11281879991292953, 0.22526764869689941, -0.45388394594192505, -0.4074357748031616, 0.10060728341341019, -1.0608932971954346, 0.7148818373680115,...
func (s *Server) Listen(address string, port int) { if port == 0 { port = 8067 } if address == "" { address = "0.0.0.0" } serverAddr := fmt.Sprintf("%s:%d", address, port) for _, m := range Metrics { prometheus.MustRegister(m) } http.Handle("/metrics", prometheus.Handler()) http.ListenAndServe(serverAddr...
[ 0.33320409059524536, 0.21000061929225922, 0.5302982330322266, -0.3280439078807831, 0.5204072594642639, 0.7663273811340332, 0.2704685926437378, 1.2044661045074463, -0.7129651308059692, -0.11876314133405685, 0.08403118699789047, 0.8092540502548218, 0.11584968864917755, 0.748423159122467, -...
func (s *Server) MonitorTimingReports() { for { select { case r := <-s.ReportChannel: s.HandleReport(r) } } }
[ 0.3334721028804779, -0.5470103621482849, 0.3512943387031555, -0.5220851898193359, 1.3056426048278809, -0.5568127036094666, 0.3040892779827118, 0.10349494218826294, 0.01628931239247322, -0.11342675983905792, -0.23573867976665497, -1.112620234489441, -1.3777146339416504, 1.1689990758895874, ...
func (s *Server) HandleReport(r TimingReport) { if len(r.MetricName) == 0 { mn, ok := LookupMetricNameByPath(r.Path) if !ok { fmt.Printf("WARNING: Failed to find metric by path %v\n", r.Path) return } r.MetricName = mn } metric, ok := Metrics[r.MetricName] if !ok { fmt.Printf("WARNING: Failed to fin...
[ 0.7233841419219971, 0.6531768441200256, 0.5299338698387146, -0.3227843940258026, 0.1886373907327652, 0.027312161400914192, 0.7799656391143799, 0.15129080414772034, -0.8436475992202759, 0.1302633136510849, 0.052372463047504425, -0.5989818572998047, -0.3274660110473633, 0.4678876996040344, ...
func Start(listPath string, excelPath string, jsonPath string) { appPath := getAppPath() if pathExists(listPath) { configListPath = listPath } else { configListPath = appPath } if pathExists(excelPath) { configXlsxPath = excelPath } else { configXlsxPath = appPath } if pathExists(jsonPath)...
[ -0.43720996379852295, -0.2774139642715454, 0.7821201682090759, 0.7419897317886353, -0.22413092851638794, -0.0231018103659153, -0.28941774368286133, 1.0154714584350586, -0.8553787469863892, 1.6718859672546387, -0.9521291255950928, 0.23822739720344543, 0.5492182374000549, 0.20519398152828217...
func convert(excelPath string) { var listFiles []string var listNames []string var firstName, lastName string listFiles, listNames = findFiles(excelPath) for _, sl := range configSetting.List { for i, ln := range listNames { if configSetting.IsFileSplit { firstName = strings.Split(strings.Spli...
[ -0.8609105348587036, -0.5663875341415405, 1.0081003904342651, 0.13501955568790436, -0.12842518091201782, 0.3633006811141968, -0.15834404528141022, 0.6038247346878052, -0.1169951856136322, 0.9140233397483826, -0.7125754356384277, 0.04615554213523865, -0.12597538530826569, 0.1272616237401962...
func CreatJsonFiles(path string) { if !pathExists(path) { err := os.Mkdir(path, os.ModePerm) if err != nil { fmt.Println("[ERROR]json path is error.", err) return } } if configSetting.AllIn { writeJsonFile(path+"/"+configSetting.ConfigName+".json", configMap) } else { for k, v := range ...
[ -0.9362624287605286, -0.2662113606929779, 0.6834213733673096, 0.5304005742073059, 0.27750691771507263, 0.33800801634788513, 0.9911167025566101, -0.47288960218429565, -0.2591877281665802, 0.6033473610877991, -0.5018561482429504, -0.5280916094779968, 0.1460006833076477, 0.3546120822429657, ...
func WithValue(key interface{}, val interface{}) Middleware { return func(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { r = r.WithContext(context.WithValue(r.Context(), key, val)) h.ServeHTTP(w, r) }) } }
[ -0.22044160962104797, -0.08483876287937164, 0.8707383871078491, 0.46233659982681274, -1.032037377357483, -0.18030032515525818, -0.6310552954673767, -0.8757706880569458, 0.4588804841041565, 0.7060790657997131, 0.8188359141349792, -0.18696153163909912, 0.4717390537261963, 0.04723425954580307...
func NewInMemoryStore(buf []byte) ReadWriteSeeker { return &inMemoryStore{ buf: buf, } }
[ 0.411641389131546, -1.166017770767212, 0.06265217810869217, -0.08408060669898987, -2.0517845153808594, -0.7585323452949524, -0.21799799799919128, -0.5183270573616028, 0.6820229291915894, -0.2740916609764099, -0.7706241607666016, 0.1334504634141922, -1.3126271963119507, 0.5333634614944458, ...
func (s *inMemoryStore) Seek(offset int64, whence int) (idx int64, err error) { if offset > maxInt { return 0, fmt.Errorf("offset overflow, max int: %d", maxInt) } intOffset := int(offset) var abs int switch whence { case io.SeekStart: abs = intOffset case io.SeekCurrent: abs = s.index + intOffset case i...
[ -0.8321375846862793, -0.07187917828559875, 0.5500458478927612, -0.6451331377029419, -0.9661458730697632, -0.024964967742562294, 0.5486208200454712, -0.4826187193393707, 0.31739291548728943, -0.7573886513710022, 0.014232269488275051, 0.9394694566726685, -0.2843785285949707, -0.9758056402206...
func WriteBitsToReg(bus i2c.Bus, address, reg, mask, value byte) error { var ( previousValue byte e error ) if previousValue, e = bus.ReadByteFromReg(address, reg); e != nil { return e } return bus.WriteByteToReg(address, reg, (previousValue&^mask)|(value&mask)) }
[ -0.691641628742218, 0.582158088684082, 0.347195029258728, 0.015334071591496468, -0.042163651436567307, -0.408893883228302, 1.3568037748336792, -0.5132297277450562, -0.4192068874835968, -0.22049982845783234, 0.008280505426228046, 1.1480308771133423, -1.0502209663391113, -0.11195831000804901...
func newSparseVector(values []int) sparseVector { v := make(sparseVector, len(values)) for i := 0; i < len(values); i++ { v[i] = &entry{i, values[i]} } return v }
[ -0.5928241014480591, -0.394685834646225, 0.49641332030296326, -0.018640076741576195, -0.0005227020592428744, -0.08465174585580826, -0.17112663388252258, 0.09239844977855682, 0.0725792869925499, -0.25225839018821716, -0.42127254605293274, 0.5344979166984558, -0.1484561264514923, 0.585518419...
func (v sparseVector) append(index, value int) sparseVector { return append(v, &entry{idx: index, val: value}) }
[ 0.5351635217666626, 0.4231734871864319, 0.12279458343982697, -0.1228867769241333, -0.6134786009788513, 0.3463902473449707, -0.8328264355659485, 0.49147748947143555, 0.883091390132904, -0.2375338077545166, 0.1109054684638977, 0.5294764041900635, 0.30034515261650085, -0.14429216086864471, ...
func NewVirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilder) { m := &VirtualEventsEventsItem...
[ -0.24421276152133942, -1.1560600996017456, 0.5016562342643738, -0.3865349292755127, -1.011428952217102, 0.5759690403938293, 0.2670159637928009, 0.6713508367538452, 0.6415395140647888, 0.6275601387023926, 0.6115625500679016, 0.3506120443344116, -0.7304077744483948, -0.7597237825393677, 0....
func NewVirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter)(*VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilder) { urlParams := make(map[string]string) urlParams["requ...
[ -0.398791640996933, -1.3167673349380493, 0.31967416405677795, 0.025975819677114487, -0.6920881271362305, 0.35756364464759827, -0.1498829573392868, 0.9841161370277405, 1.2210993766784668, 0.5616852045059204, 0.7474648952484131, 0.10801179707050323, -0.41864070296287537, -0.8521291017532349,...
func (m *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilder) Delete(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilderDeleteRequestConfiguration)(error) { requestInfo, err := m.ToDeleteRequestInformation(ctx, requestConfiguration); if ...
[ 0.16659873723983765, -0.8261017799377441, 0.660956621170044, -0.01932167448103428, -0.7108594179153442, 0.48899829387664795, 0.19171331822872162, 0.341692179441452, 1.1051701307296753, 1.1996235847473145, 0.720806896686554, 0.5139325857162476, -0.4223864674568176, -0.4119812548160553, 0....
func (m *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilder) Get(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilderGetRequestConfiguration)(ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentable, error) { ...
[ -0.3442777097225189, -0.5937985181808472, 0.7280694842338562, -0.26543623208999634, -0.7547591328620911, 0.4799165427684784, 0.06646452099084854, 0.18690046668052673, 0.0027517376001924276, 1.0435467958450317, 0.698588490486145, 0.8318898677825928, -0.35608187317848206, -0.366405725479126,...
func (m *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilder) Patch(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentable, requestConfiguration *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilderPatchRequestConfiguration)(ie23...
[ -0.09644291549921036, -1.1771471500396729, 0.6652342081069946, -0.5616503357887268, -1.277683973312378, 0.9125272035598755, 0.12754462659358978, 0.6200522184371948, 0.7186802625656128, 1.41608726978302, 0.6056678295135498, 0.7230724096298218, -0.00003426075272727758, -0.39472687244415283, ...
func (m *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilderDeleteRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInf...
[ -0.2060459703207016, -1.0887864828109741, 0.9933570027351379, -1.092358112335205, -0.7696261405944824, 0.6072885990142822, -0.2585112452507019, 0.3295150697231293, 0.8402909636497498, 0.8325490355491638, 0.6935005187988281, 0.5072959661483765, -0.19660425186157227, -0.40301498770713806, ...
func (m *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilderGetRequestConfiguration)(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformati...
[ -0.7404053211212158, -0.7965607047080994, 0.9178696870803833, -0.7439875602722168, -0.38426101207733154, 0.30458346009254456, -0.27600643038749695, -0.07038383185863495, 0.7188106179237366, 0.6049138903617859, 0.5473557710647583, 0.5554428100585938, -0.3775706887245178, -0.3571972250938415...
func (m *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ie233ee762e29b4ba6970aa2a2efce4b7fde11697ca9ea81099d0f8269309c1be.VirtualAppointmentable, requestConfiguration *VirtualEventsEventsItemSessionsItemVirtualAppointmentRequestBuilderPatchReques...
[ -0.6009702682495117, -1.1976898908615112, 1.0093803405761719, -0.8287456631660461, -0.907929539680481, 0.520337700843811, 0.17982685565948486, -0.23367194831371307, 0.06770481169223785, 1.01899254322052, 0.833665132522583, 0.1508154720067978, -0.4056536853313446, -0.5983964204788208, 0.7...
func (m *Mongodb) ActionTransaction() { // 获取mongo的上下文适配对象 mongo := m.GetObj(adapter.NewMongodb("test", "test")).(*adapter.Mongodb) ret,err:=mongo.DoTransaction(context.Background(), func(sessCtx context.Context) (i interface{}, e error) { // 通过map插入 doc1 := map[string]interface{}{"f1": "val1", "f2": true, "f3":...
[ -0.46245428919792175, -0.11006113886833191, 1.2001755237579346, 0.4226824641227722, 0.934654712677002, 0.5265505313873291, 1.1939443349838257, -0.12302500009536743, -0.20056460797786713, 1.0452793836593628, -0.8922695517539978, -0.2308902144432068, -1.0119378566741943, -0.18310587108135223...
func (w *Where) GetOp() string { if w.Op == "" { return "=" } return w.Op }
[ -0.4517948627471924, 0.9898166060447693, 0.6196149587631226, 0.7764711976051331, -0.2683026194572449, 0.12385061383247375, 0.009984347969293594, -0.2373451292514801, 0.42358148097991943, 1.181035041809082, 1.0413696765899658, -0.7027664184570312, -0.071320079267025, -0.6231077909469604, ...
func (d *Dao) DeletedVideos(c context.Context) (delIds []int, err error) { var rows *sql.Rows if rows, err = d.DB.Query(c, _deletedVideos); err != nil { // get the qualified aid to sync return } defer rows.Close() for rows.Next() { var cid int if err = rows.Scan(&cid); err != nil { log.Error("ParseVideos ...
[ -0.3122597634792328, 0.23029421269893646, 0.7873501181602478, 0.5568666458129883, -0.4788907468318939, -0.6627131104469299, -0.4794231653213501, -0.2667267322540283, 1.4053974151611328, 0.2138441950082779, 0.1338881552219391, 1.242573618888855, -0.4750721752643585, 0.7696122527122498, -0...
func (d *Dao) FinishDelVideos(c context.Context, delIds []int) (err error) { for _, v := range delIds { if _, err = d.DB.Exec(c, _finishDelVideo, v); err != nil { log.Error("FinishDelVideos Error: %v", v, err) return } } return }
[ -1.0547786951065063, 0.25721216201782227, 0.5600288510322571, 0.7984490394592285, 0.21578878164291382, -0.06719750910997391, -0.3717244267463684, -0.46058985590934753, 0.23764580488204956, 0.6853314638137817, -0.381609708070755, 1.2112295627593994, -0.48672810196876526, 0.9375542998313904,...
func (d *Dao) PpDelVideos(c context.Context, delIds []int) (err error) { var delay = time.Now().Unix() + int64(d.conf.UgcSync.Frequency.ErrorWait) for _, v := range delIds { if _, err = d.DB.Exec(c, _ppDelVideos, delay, v); err != nil { log.Error("PpDelVideos, failed to delay: (%v,%v), Error: %v", delay, v, err)...
[ -1.0281747579574585, 0.6495380401611328, 0.741901695728302, 0.5850238800048828, -0.040384262800216675, -0.08069765567779541, -0.2552517354488373, 0.08364060521125793, 0.6057757139205933, 0.1773238480091095, 0.6826443076133728, 0.6258603930473328, -0.3795146644115448, 0.7013121843338013, ...
func (m *FakePlayer) CurrentlyPlaying(ctx context.Context) (*entity.CurrentPlayingInfo, error) { return &entity.CurrentPlayingInfo{ Playing: true, Progress: 10000000, Track: &entity.Track{ URI: "spotify:track:06QTSGUEgcmKwiEJ0IMPig", ID: "06QTSGUEgcmKwiEJ0IMPig", Name: "Borderland", D...
[ -0.7020879983901978, -0.8465195298194885, 0.5035542845726013, -0.0160817950963974, 0.013097786344587803, 0.47849661111831665, -0.007929197512567043, -0.332899272441864, -0.09185106307268143, 0.2503115236759186, -0.4263474941253662, 0.03156723827123642, 0.07123373448848724, 0.03975886106491...
func ListenAndServeAPIServer( ip string, port uint) { s := &http.Server{ Addr: net.JoinHostPort(ip, strconv.FormatUint(uint64(port), 10)), Handler: APIServerInst, MaxHeaderBytes: 1 << 20, } s.ListenAndServe() }
[ -0.8745594024658203, -0.9320049285888672, 0.3904111981391907, -1.4957857131958008, 0.1605699509382248, -0.16224166750907898, -0.6122385859489441, 0.685255229473114, 0.23835979402065277, -0.5210140943527222, -0.6276795268058777, -0.7080889940261841, -1.0102907419204712, -0.0896734893321991,...
func (v *Viper) SetConfig(filename string) error { v.ConfigName = filename v.Objs = viper.New() v.Objs.SetConfigName(filename) v.Objs.AddConfigPath(PATH) v.Objs.SetConfigType("json") err := v.Objs.ReadInConfig() if err != nil { return errors.New(v.ConfigName + ": no such file or directory") } return nil }
[ -0.5916470289230347, -0.95694899559021, 0.5089226365089417, 0.5197774767875671, 0.6711682677268982, 0.08809135109186172, 0.5777419805526733, 1.0524052381515503, -0.9315429925918579, 0.6187057495117188, -0.5331478714942932, 0.008334837853908539, 0.841333270072937, 0.9079672694206238, 0.36...
func (v *Viper) Set(key string, value interface{}) bool { return true }
[ -0.9886808395385742, 0.05968497321009636, 0.3314739167690277, 0.16253750026226044, 0.22315073013305664, 0.5186019539833069, -0.7799957990646362, 0.0046747056767344475, -0.5266634225845337, 0.8386527299880981, -0.4373222887516022, -0.2872442603111267, -0.9292610287666321, 0.2716174423694610...
func NewClient(apiURL string, logger lager.Logger) Client { return &client{ requestGenerator: rata.NewRequestGenerator(apiURL, api.Routes), givenHTTPClient: &http.Client{ Transport: &http.Transport{ DisableKeepAlives: false, ResponseHeaderTimeout: 20 * time.Second, MaxIdleConns: 200, ...
[ -0.05212577059864998, -0.8412240147590637, 0.4087682068347931, -0.4968318045139313, -0.09761637449264526, -0.25810185074806213, 0.19042162597179413, 0.19478657841682434, -0.06305807828903198, -0.16923905909061432, 0.09004717320203781, 0.5358110070228577, -0.25007250905036926, -0.3428258001...
func GetInfo() string { return fmt.Sprintf("version: %s, commit: %s", Version, GitCommit) }
[ 1.0027936697006226, -0.4456392526626587, 0.5326664447784424, -0.37221893668174744, 0.7566326260566711, 0.33553779125213623, -0.7522414326667786, -0.37370553612709045, -1.6103447675704956, 1.0101392269134521, -0.0684174969792366, 0.8208654522895813, -0.820588231086731, -0.49037858843803406,...
func NewImageSelectorChain(logger Logger, errorHandler ErrorHandler) *ImageSelectorChain { return &ImageSelectorChain{ logger: logger, errorHandler: errorHandler, } }
[ -1.6853960752487183, -0.9832211136817932, -0.07579579204320908, -0.12425398826599121, 0.5366353988647461, -0.5740154385566711, -0.5199480652809143, -0.3695240318775177, -0.03463458642363548, -0.2882673442363739, -0.705134928226471, 0.16687606275081635, -0.36091989278793335, 0.9708848595619...
func (s *ImageSelectorChain) AddSelector(name string, selector ImageSelector) { s.mu.Lock() defer s.mu.Unlock() s.imageSelectors = append(s.imageSelectors, selector) s.names = append(s.names, name) }
[ -1.4288740158081055, -0.7796581387519836, 0.008368369191884995, -0.5079280138015747, 0.20663711428642273, -0.5499417185783386, -1.0025995969772339, -0.32995787262916565, 0.25392407178878784, -0.951076328754425, -0.5178440809249878, 0.12268133461475372, -0.23753909766674042, 0.7180743813514...
func (g *GrpcClient) ClientConn(host string) (*grpc.ClientConn, error) { ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) defer cancel() cc, err := grpc.DialContext( ctx, host, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithStreamInterceptor(nil), grpc.WithKeepaliveParams(keepali...
[ 0.1167418360710144, -0.25844910740852356, 0.7574722170829773, 0.15486986935138702, -0.8209795355796814, -0.26878780126571655, 0.7399703860282898, -0.25714001059532166, -0.6792081594467163, 0.5114383697509766, -0.7748913764953613, 0.6685033440589905, -0.2723134458065033, -0.1628057360649109...
func NewGRPCClient(c *config.RootConfig, log *log.Logger) *GrpcClient { g := &GrpcClient{ config: c, logger: log, } return g }
[ 0.41757720708847046, -0.4468299448490143, 0.2867649793624878, 0.1193787083029747, -1.038339376449585, 0.28667327761650085, 0.43482714891433716, -0.35284650325775146, -0.47690385580062866, 0.2557098865509033, -0.43750205636024475, 1.0247881412506104, -0.7100149393081665, -0.3710267245769501...