text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (sset *SSet) Remove(value interface{}) {
key := sset.f(value)
if index, found := sset.m_index[key]; found {
sset.list.Remove(index)
sset.m.Remove(key)
delete(sset.m_index, key)
sset.fixIndex()
}
} | [
-0.8921545147895813,
0.26951271295547485,
0.2787129282951355,
-0.09793008118867874,
-1.8471406698226929,
-0.7217488884925842,
0.8469346165657043,
0.7180156111717224,
0.5058934688568115,
0.3865734934806824,
-0.19312871992588043,
-0.19630104303359985,
0.036488961428403854,
0.4591725170612335... |
func (sset *SSet) String() string {
str := "SSet\n"
list_values := sset.list.String() + "\n"
map_values := sset.m.String() + "\n"
str = str + list_values + map_values
return str
} | [
-0.08182519674301147,
-1.1722848415374756,
0.37837380170822144,
-1.058498501777649,
-1.1491661071777344,
0.4794028103351593,
0.07927928864955902,
-0.5355221629142761,
-0.38629621267318726,
-0.29675573110580444,
0.3603959083557129,
0.9641045928001404,
0.7867636680603027,
0.31513679027557373... |
func setup() {
// test server
mux = http.NewServeMux()
mux.Handle("/foo1", http.HandlerFunc(limitResponseHandler))
server = httptest.NewServer(mux)
// appnexus client configured to use test server
client, _ = NewClient(server.URL)
waiter = false
} | [
0.016146287322044373,
0.19049891829490662,
0.3590775430202484,
-0.41889530420303345,
0.2006416767835617,
0.24360184371471405,
0.3330775797367096,
-0.0634390264749527,
0.4597080647945404,
-0.7837904095649719,
-0.18506969511508942,
0.35073333978652954,
-0.4087691903114319,
-0.124405086040496... |
func teardown() {
server.Close()
} | [
0.3149591088294983,
-0.3471575379371643,
0.13387392461299896,
-0.4201221764087677,
0.25167417526245117,
1.6575878858566284,
1.43483304977417,
0.10422798991203308,
0.569920003414154,
-0.04616442322731018,
0.5671778321266174,
0.9607334733009338,
-0.8999778032302856,
0.14338178932666779,
0.... |
func (o *ListOrganizationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewListOrganizationsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result,... | [
-0.29236388206481934,
-0.8057546019554138,
0.6727185845375061,
0.38227781653404236,
0.43437308073043823,
-1.1651570796966553,
-0.08959061652421951,
-0.20855790376663208,
0.7145305871963501,
-0.06981054693460464,
0.5420747995376587,
-0.7643756866455078,
-0.7769535779953003,
-0.2752096056938... |
func NewListOrganizationsOK() *ListOrganizationsOK {
return &ListOrganizationsOK{}
} | [
-0.46751946210861206,
0.08899340033531189,
0.06626423448324203,
1.2203667163848877,
-0.09317196160554886,
-1.1452263593673706,
0.13697528839111328,
0.18336300551891327,
0.6573053002357483,
-1.0405768156051636,
-0.8843082785606384,
-0.7108587026596069,
1.4247651100158691,
0.2669011056423187... |
func NewListOrganizationsBadRequest() *ListOrganizationsBadRequest {
return &ListOrganizationsBadRequest{}
} | [
-0.5641070604324341,
-0.18471725285053253,
0.7010865211486816,
0.8676088452339172,
0.10809629410505295,
-0.5778003931045532,
0.20048974454402924,
-0.34909477829933167,
0.5436263680458069,
-0.5629658102989197,
0.020242903381586075,
0.5757721066474915,
0.6150079369544983,
0.6489193439483643,... |
func (c *Client) Listen() {
c.conn.SetReadLimit(maxMessageSize)
c.conn.SetReadDeadline(time.Now().Add(pongWait))
c.conn.SetPongHandler(func(string) error { c.conn.SetReadDeadline(time.Now().Add(pongWait)); return nil })
defer func() {
delete(c.server.clients, c)
c.conn.Close()
}()
for {
_, message, err :=... | [
0.4992901086807251,
-0.5221964120864868,
0.4857635498046875,
-0.631608784198761,
0.24833615124225616,
0.1916515827178955,
1.0701404809951782,
-0.06542579084634781,
-0.6811084151268005,
0.28539109230041504,
-0.2114766240119934,
0.40224504470825195,
-0.5058155655860901,
0.6909511685371399,
... |
func (c *Client) Broadcast() {
ticker := time.NewTicker(pingPeriod)
defer func() {
ticker.Stop()
c.conn.Close()
}()
for {
select {
case message, ok := <-c.send:
c.sendMessage(message, ok)
case <-ticker.C:
c.conn.SetWriteDeadline(time.Now().Add(writeWait))
if err := c.conn.WriteMessage(websocket... | [
-0.7371113300323486,
-0.18457446992397308,
0.7532427906990051,
0.3353291451931,
0.3968280255794525,
0.22532542049884796,
0.9801664352416992,
-0.5485568642616272,
-0.4164969027042389,
0.0734170451760292,
0.7121812701225281,
0.56331866979599,
-0.8905944228172302,
0.24290050566196442,
-0.20... |
func (c *Client) CheckSites() {
for site := range c.sites {
site.HealthCheck()
c.send <- site.Marshal()
}
} | [
-0.08629803359508514,
0.3200500011444092,
0.20776186883449554,
0.2743058502674103,
0.8498057723045349,
0.5094315409660339,
0.7559809684753418,
-0.27687880396842957,
-0.012705392204225063,
0.12533406913280487,
0.11413581669330597,
1.1673729419708252,
-0.636262059211731,
0.8084949851036072,
... |
func (c *Client) sendMessage(message []byte, ok bool) {
c.conn.SetWriteDeadline(time.Now().Add(writeWait))
if !ok {
// The service closed the channel.
c.conn.WriteMessage(websocket.CloseMessage, []byte{})
return
}
w, err := c.conn.NextWriter(websocket.TextMessage)
if err != nil {
return
}
w.Write(messa... | [
-0.473492294549942,
1.0537034273147583,
0.6588636040687561,
-0.5252618789672852,
0.019801795482635498,
0.00888750795274973,
-0.009942635893821716,
-0.5146651268005371,
0.0492401085793972,
0.5617339611053467,
0.7398959398269653,
0.25735899806022644,
-1.2925879955291748,
-0.00015103978512343... |
func (sess *Session) CheckInputsSigned() bool {
for _, p := range sess.Participants {
if p.SignedTx == nil {
return false
}
}
return true
} | [
-0.8057694435119629,
-0.90916508436203,
0.5207946300506592,
-0.1689687967300415,
0.16017469763755798,
0.3639882802963257,
-0.6934820413589478,
0.10311464965343475,
-0.4608798027038574,
0.6172966957092285,
-0.06272679567337036,
-0.6520873308181763,
-1.1548041105270386,
0.6506772637367249,
... |
func (sess *Session) CheckAllSentPublished() bool {
for _, p := range sess.Participants {
if !p.SentPublished {
return false
}
}
return true
} | [
0.09950344264507294,
-1.4665632247924805,
0.48833221197128296,
0.4096181392669678,
-0.36300429701805115,
0.0882987380027771,
-0.6975122690200806,
1.1762685775756836,
-0.05633458495140076,
0.3691557049751282,
-0.12071187794208527,
-0.25554516911506653,
-0.3674730658531189,
0.843144178390502... |
func (sess *Session) CheckTxSubmitted() bool {
for _, p := range sess.Participants {
if p.SplitTx == nil {
return false
}
}
return true
} | [
-0.520783007144928,
-0.45768874883651733,
0.5581539273262024,
-0.2556404173374176,
-0.5109899640083313,
0.21046626567840576,
-0.41388705372810364,
0.834100067615509,
-0.711391270160675,
0.5375537872314453,
-0.32839441299438477,
-0.4262547194957733,
-0.7470932602882385,
0.3257424235343933,
... |
func NewJoinSession(cfg *Config) *JoinSession {
m := &JoinSession{
cfg: cfg,
addParticipantReq: make(chan addParticipantReq),
submitSplitTxReq: make(chan submitSplitTxReq),
submitSignedTxReq: make(chan submitSignedTxReq),
publishedTxReq: make(chan publishedTxReq),
clientTimeout: time.... | [
-0.16165223717689514,
-0.8240634202957153,
0.5653627514839172,
0.5675048232078552,
-1.0184228420257568,
0.151362806558609,
0.40837377309799194,
-0.2986063063144684,
-0.10531450808048248,
0.485323429107666,
-0.6603580713272095,
-0.4474315345287323,
-0.7894802093505859,
-0.01661093346774578,... |
func (matcher *JoinSession) Run() error {
for {
select {
// We use one timer to control participants sending data in time.
// With one progress, server has max time for client process is 30 seconds (setting in config file)
// After that time, client still not send data, server will consider client is malicio... | [
-0.4770297408103943,
-0.6573655605316162,
1.0052741765975952,
-0.28512611985206604,
-0.20336690545082092,
0.296472430229187,
0.9377380013465881,
-0.2983303964138031,
0.29543834924697876,
0.45495426654815674,
-0.25916945934295654,
-0.35259172320365906,
-0.8850864768028259,
0.440365642309188... |
func (matcher *JoinSession) NewSessionID() SessionID {
id := xid.New()
return SessionID(id.String())
} | [
0.8149645328521729,
-1.8326635360717773,
0.3529897928237915,
0.8103731274604797,
-0.5239673852920532,
0.43659424781799316,
-0.16221481561660767,
-0.12258414924144745,
1.0054599046707153,
0.8272555470466614,
-0.5291054844856262,
0.06431753188371658,
-0.7536242008209229,
0.22556628286838531,... |
func (matcher *JoinSession) mergeSignedInput(req *submitSignedTxReq) error {
if _, has := matcher.SessionData.Participants[req.sessionID]; !has {
return ErrSessionNotFound
}
participant := matcher.SessionData.Participants[req.sessionID]
participant.SignedTx = req.tx
participant.chanSubmitSignedTxRes = req.resp... | [
-0.8784540891647339,
-0.9758836627006531,
0.7851505875587463,
-0.17229875922203064,
-0.3385277986526489,
0.49243083596229553,
0.4515492618083954,
0.005487930029630661,
0.6006661057472229,
-0.06050809100270271,
0.16971734166145325,
-0.6432900428771973,
-1.016866683959961,
0.4329948723316192... |
func (matcher *JoinSession) publishTxResult(req *publishedTxReq) error {
if _, has := matcher.SessionData.Participants[req.sessionID]; !has {
return ErrSessionNotFound
}
participant := matcher.SessionData.Participants[req.sessionID]
participant.SentPublished = true
participant.chanPublishedTxRes = req.resp
if... | [
0.07755415886640549,
-0.9219354391098022,
0.6027216911315918,
-0.34798136353492737,
-0.5960412621498108,
0.12734301388263702,
0.47946885228157043,
0.7321925759315491,
0.4672473669052124,
0.5577515363693237,
-0.07150512933731079,
-0.7808308601379395,
-0.7144220471382141,
0.0761813297867775,... |
func (matcher *JoinSession) RemoveSessionID(sessionID SessionID) error {
_, ok := matcher.SessionData.Participants[sessionID]
if ok {
delete(matcher.SessionData.Participants, sessionID)
log.Infof("SessionID %v disconnected, remove from join session", sessionID)
return nil
}
return ErrSessionIDNotFound
} | [
-0.3145970404148102,
-1.9489967823028564,
0.6372130513191223,
-0.45990511775016785,
-0.4996739625930786,
0.5256961584091187,
0.18742868304252625,
0.3859909176826477,
1.808933138847351,
1.2768136262893677,
-0.3910873532295227,
-0.37694981694221497,
-0.9376616477966309,
0.0948619544506073,
... |
func (matcher *JoinSession) addParticipantInput(req *submitSplitTxReq) ([]int32, []int32, error) {
if _, has := matcher.SessionData.Participants[req.sessionID]; !has {
return nil, nil, ErrSessionNotFound
}
inputIndes := make([]int32, 0)
outputIndes := make([]int32, 0)
participant := matcher.SessionData.Partic... | [
-0.9993533492088318,
-0.3796568512916565,
0.7936303019523621,
-0.7326537370681763,
-0.5332774519920349,
0.16819226741790771,
0.9684320688247681,
0.699337363243103,
0.915930449962616,
-0.010408145375549793,
-0.1784573793411255,
-0.5553991198539734,
-0.7991871237754822,
-0.3416142165660858,
... |
func (matcher *JoinSession) SendTxData() {
log.Debug("Send the joined split transactions back to each participant")
// If RandomIndex option is enabled, input and output indices are randomly swapped
if matcher.cfg.RandomIndex && len(matcher.SessionData.Participants) > 1 {
txInSize := len(matcher.SessionData.Merge... | [
-0.7177348136901855,
-0.18254999816417694,
0.6302661299705505,
-0.7968370914459229,
-0.7607139945030212,
0.06923779845237732,
0.9085960984230042,
0.7252784371376038,
0.5351313948631287,
0.08076755702495575,
-0.5819031000137329,
-0.04532638564705849,
-1.1020101308822632,
-0.3979556262493133... |
func (matcher *JoinSession) AddParticipant(maxAmount uint64, sessID SessionID) (*SessionParticipant, error) {
req := addParticipantReq{
maxAmount: maxAmount,
sessID: sessID,
resp: make(chan addParticipantRes),
}
matcher.addParticipantReq <- req
resp := <-req.resp
return resp.participant, resp.err
} | [
-0.07003537565469742,
-0.390110045671463,
0.5786811709403992,
-0.1343875676393509,
-1.0826879739761353,
-0.2592911720275879,
-0.14011238515377045,
0.06694841384887695,
1.5825845003128052,
-0.23834854364395142,
-0.094296894967556,
-0.5247693061828613,
-0.935249388217926,
-0.6015486717224121... |
func (matcher *JoinSession) SubmitSplitTx(sessionID SessionID, splitTx *wire.MsgTx,
splitTxOutputIndex int, input *wire.TxIn) (*wire.MsgTx, []int32, []int32, error) {
req := submitSplitTxReq{
sessionID: sessionID,
splitTx: splitTx,
input: input,
splitTxOutputIndex: splitTxOut... | [
-1.513240933418274,
-0.29676976799964905,
0.33677271008491516,
-0.06758420169353485,
-1.342373013496399,
-0.12598928809165955,
0.7007766962051392,
-0.5558310747146606,
0.32166042923927307,
0.18004417419433594,
-1.3914530277252197,
0.06371324509382248,
-1.0353859663009644,
-0.13490825891494... |
func (matcher *JoinSession) SubmitSignedTx(sessionID SessionID, signedTx *wire.MsgTx) (*wire.MsgTx, bool, error) {
req := submitSignedTxReq{
sessionID: sessionID,
tx: signedTx,
resp: make(chan submitSignedTxRes),
}
matcher.submitSignedTxReq <- req
resp := <-req.resp
return resp.tx, resp.publish... | [
-0.9486799240112305,
-0.652299702167511,
0.34490594267845154,
0.04272393137216568,
-0.9764091372489929,
0.5524683594703674,
-0.5810542702674866,
-0.8798096179962158,
0.3343040645122528,
0.22602161765098572,
-1.4936796426773071,
-0.5153390169143677,
-0.552955687046051,
0.4755423069000244,
... |
func (matcher *JoinSession) PublishResult(sessionID SessionID, signedTx *wire.MsgTx) (*wire.MsgTx, error) {
req := publishedTxReq{
sessionID: sessionID,
tx: signedTx,
resp: make(chan publishedTxRes),
}
matcher.publishedTxReq <- req
resp := <-req.resp
return resp.tx, resp.err
} | [
-0.27179834246635437,
0.20177258551120758,
0.31781303882598877,
0.11344066262245178,
-1.150097370147705,
-0.3207775056362152,
0.02535872347652912,
-0.063127301633358,
0.7559168934822083,
0.224953293800354,
-0.3651246428489685,
-0.39180004596710205,
-0.6387297511100769,
0.11115747690200806,... |
func endApp() {
fmt.Println("Aplikasi Selesai")
} | [
0.5680676698684692,
-0.7208660244941711,
0.449374258518219,
0.4096542000770569,
-0.18933768570423126,
1.645744800567627,
0.14727333188056946,
-0.20170560479164124,
-0.2655770778656006,
0.5753217935562134,
0.7726759910583496,
0.20730848610401154,
-0.7540488839149475,
0.4390202462673187,
-... |
func (sections Sections) Login(section string) *Login {
for _, s := range sections {
if s.Name == section {
return &s.Login
}
}
return nil
} | [
-0.2539765238761902,
-1.1403933763504028,
0.5564689040184021,
-0.06196234002709389,
-0.8065080642700195,
0.1195366382598877,
-0.24037355184555054,
-0.3328109085559845,
0.2363707721233368,
-0.02907055802643299,
0.23352763056755066,
0.20282712578773499,
-0.2542056143283844,
-0.07527353614568... |
func (sections Sections) Merge(sectionNames []string) (login *Login) {
for _, s := range sectionNames {
if s == "" {
s = DefaultSection
}
l := sections.Login(s)
if l.IsEmpty() {
continue
}
if login == nil {
login = new(Login)
}
login.Merge(l)
}
return
} | [
-1.5881412029266357,
0.38110241293907166,
0.5869439840316772,
0.9222380518913269,
0.5982047319412231,
0.23397327959537506,
-0.9629290699958801,
-0.3006853461265564,
0.3137461841106415,
-0.5795170068740845,
0.08160033822059631,
-0.8814585208892822,
-0.8879401087760925,
0.4397445023059845,
... |
func (p PutObjectInput) String() string {
return helper.Prettify(p)
} | [
-0.61319899559021,
-0.5896427631378174,
0.16370080411434174,
-1.1356278657913208,
-0.7068642973899841,
1.5858131647109985,
0.7799836993217468,
-1.1647320985794067,
-0.11184008419513702,
0.6933586597442627,
0.015058360062539577,
0.7320058345794678,
-0.4510878622531891,
-0.8827933073043823,
... |
func (p PutObjectOutput) String() string {
return helper.Prettify(p)
} | [
-0.022163543850183487,
-1.0369948148727417,
0.1661769449710846,
-1.0166743993759155,
-0.9609524011611938,
0.7245530486106873,
0.7600424885749817,
-1.1376367807388306,
-0.49352943897247314,
0.5930664539337158,
0.20135746896266937,
0.3349848687648773,
-0.30384668707847595,
-0.927016496658325... |
func Asset(name string) ([]byte, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, fmt.Errorf("Asset %s not foun... | [
-0.7961483001708984,
-1.2313168048858643,
0.633165180683136,
-0.6093899011611938,
-1.546921730041504,
-0.11101024597883224,
0.12971386313438416,
-1.3390334844589233,
-1.1358720064163208,
0.4855233430862427,
0.3090141713619232,
0.32495471835136414,
-0.6009681224822998,
-0.44264674186706543,... |
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
} | [
-0.012778956443071365,
0.11985661834478378,
0.4091298282146454,
-0.5268413424491882,
-0.8276715278625488,
0.4719155430793762,
-0.8186293840408325,
-1.5736604928970337,
0.16388541460037231,
0.6357062458992004,
-0.5354578495025635,
0.35693347454071045,
0.0057142809964716434,
-0.0248885955661... |
func AssetInfo(name string) (os.FileInfo, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, fmt.Errorf("Asset... | [
0.371969997882843,
-1.1052993535995483,
0.5630446076393127,
-0.922572672367096,
-1.356387734413147,
0.0033556853886693716,
0.6777529716491699,
-0.8006685972213745,
-1.2748286724090576,
0.3115358352661133,
0.2636086046695709,
0.26388120651245117,
0.0635773167014122,
-0.3988074064254761,
0... |
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
} | [
-0.7293784618377686,
-0.8460342288017273,
0.7321816682815552,
-0.39323121309280396,
-0.48951536417007446,
0.7661203145980835,
-0.5028699636459351,
-0.8655748963356018,
-0.4145073890686035,
0.8099913597106934,
0.16903363168239594,
1.163049578666687,
-0.028152840211987495,
0.0342608317732811... |
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), d... | [
0.3437124192714691,
-0.3622540235519409,
0.6770355701446533,
-1.2592030763626099,
-0.006139514967799187,
-0.04453148692846298,
-0.0072639440186321735,
-0.43950510025024414,
-0.20619122684001923,
-0.2510169744491577,
0.1784360408782959,
0.13568510115146637,
-0.23627112805843353,
-0.56985116... |
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
// File
if err != nil {
return RestoreAsset(dir, name)
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
}
}
return nil
} | [
0.42261892557144165,
0.30020031332969666,
0.5813396573066711,
-0.20641657710075378,
-0.23828908801078796,
-0.24414615333080292,
0.5739709138870239,
-0.029911456629633904,
0.06188219040632248,
-0.43923482298851013,
0.5113736987113953,
0.3275970220565796,
-0.6125145554542542,
0.0351656526327... |
func (r *HostReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
ctx := context.Background()
log := r.Log.WithValues("host", req.NamespacedName)
var host targetsv1.Host
if err := r.Get(ctx, req.NamespacedName, &host); err != nil {
// we'll ignore not-found errors, since they can't be fixed by an immed... | [
-0.19176888465881348,
-0.42843204736709595,
0.8754578232765198,
0.2625042200088501,
0.5258010625839233,
-0.3356367349624634,
-0.26627373695373535,
0.17232367396354675,
-0.06341911107301712,
-0.11000538617372513,
-0.04233672097325325,
-0.4397212862968445,
-0.3524107038974762,
0.534433960914... |
func CreateScanTemplatesForHost(host targetsv1.Host) []ScanTemplates {
var scanTemplates []ScanTemplates
for _, port := range host.Spec.Ports {
if port.Type == "ssh" {
scanTemplates = append(scanTemplates, ScanTemplates{
Port: port.Port,
Type: port.Type,
ScanSpec: executionv1.ScanSpec{
ScanType... | [
0.007974831387400627,
-0.3877582252025604,
0.9961225390434265,
0.048837319016456604,
0.10233332961797714,
0.28502383828163147,
-0.31192827224731445,
-0.5910720825195312,
-0.41325634717941284,
0.1843276172876358,
-0.4511048197746277,
0.5564579367637634,
0.16417287290096283,
0.54630124568939... |
func (r *HostReconciler) SetupWithManager(mgr ctrl.Manager) error {
if err := mgr.GetFieldIndexer().IndexField(&executionv1.ScheduledScan{}, ownerKey, func(rawObj runtime.Object) []string {
// grab the scan object, extract the owner...
scheduledScan := rawObj.(*executionv1.ScheduledScan)
owner := metav1.GetContr... | [
-0.32455912232398987,
-0.38840827345848083,
0.6136052012443542,
0.2852986454963684,
-0.3790678381919861,
-1.0073751211166382,
-0.0729614719748497,
-0.675117552280426,
0.3587753474712372,
0.06612414121627808,
0.45102474093437195,
-0.4790669083595276,
-0.32186606526374817,
0.993039608001709,... |
func NewAdminRepository(db *gorm.DB) AdminRepository {
return &adminRepository{
DB: db,
}
} | [
0.13186194002628326,
0.02549212984740734,
-0.28441762924194336,
-0.8577789068222046,
-0.741768479347229,
-0.6350140571594238,
-1.5098549127578735,
-0.31397396326065063,
0.3504951596260071,
0.3242534101009369,
0.0042044674046337605,
0.3194359242916107,
-0.48317718505859375,
1.32780814170837... |
func (*Sums) Descriptor() ([]byte, []int) {
return file_proto_calculate_proto_rawDescGZIP(), []int{0}
} | [
-0.7800465822219849,
1.2071391344070435,
0.5722511410713196,
-0.2787003815174103,
0.018152747303247452,
0.06758955121040344,
0.8853217363357544,
-0.2616249620914459,
-0.20037724077701569,
-0.6132586002349854,
-0.8610544204711914,
-0.11203956604003906,
0.7375534772872925,
0.7506974339485168... |
func (*SquareRootRequest) Descriptor() ([]byte, []int) {
return file_proto_calculate_proto_rawDescGZIP(), []int{1}
} | [
-0.10453406721353531,
-0.47200289368629456,
0.196715846657753,
0.3933941423892975,
-0.780261754989624,
-0.463357537984848,
-0.3490760624408722,
0.20785444974899292,
0.2081945687532425,
-1.204908847808838,
-0.18792396783828735,
0.5574489235877991,
0.03126167133450508,
0.6253982186317444,
... |
func (*SquareRootResponse) Descriptor() ([]byte, []int) {
return file_proto_calculate_proto_rawDescGZIP(), []int{2}
} | [
0.1628085970878601,
-0.6235171556472778,
-0.024715766310691833,
-0.05763843655586243,
-0.3500329256057739,
-0.7127447724342346,
0.15539506077766418,
-0.1866224706172943,
0.45447802543640137,
-1.1149744987487793,
-0.89280766248703,
-0.2710079550743103,
-0.5974991917610168,
0.024750700220465... |
func (*AddRequest) Descriptor() ([]byte, []int) {
return file_proto_calculate_proto_rawDescGZIP(), []int{3}
} | [
-1.1511366367340088,
0.8551092147827148,
0.6614397764205933,
0.5052683353424072,
-0.04591915011405945,
0.18301922082901,
-0.28757917881011963,
-0.0019842437468469143,
-0.41262322664260864,
-0.755547046661377,
0.0020307302474975586,
-0.24454639852046967,
-0.02547835186123848,
0.797768950462... |
func (*AddResponse) Descriptor() ([]byte, []int) {
return file_proto_calculate_proto_rawDescGZIP(), []int{4}
} | [
-0.1817946881055832,
0.46994081139564514,
0.46485984325408936,
0.25283926725387573,
0.4615011215209961,
-0.23535946011543274,
0.5455874800682068,
-0.19797874987125397,
0.4087531268596649,
-1.0458788871765137,
-0.5623151659965515,
-0.857637345790863,
-0.638235867023468,
0.3101045787334442,
... |
func (*PrimeNumberRequest) Descriptor() ([]byte, []int) {
return file_proto_calculate_proto_rawDescGZIP(), []int{5}
} | [
-0.9539057016372681,
0.4946853220462799,
0.4369712471961975,
0.28039154410362244,
-0.277891606092453,
-0.6473779678344727,
0.42899107933044434,
0.5945044159889221,
0.7731664776802063,
-1.3545336723327637,
-0.6485111713409424,
-0.19371069967746735,
-0.4829597771167755,
1.4289523363113403,
... |
func (*PrimeNumberResponse) Descriptor() ([]byte, []int) {
return file_proto_calculate_proto_rawDescGZIP(), []int{6}
} | [
-0.5560238361358643,
0.21527299284934998,
-0.021394435316324234,
-0.37162071466445923,
-0.14352795481681824,
-0.943824291229248,
0.9346294403076172,
0.3998917043209076,
1.0856105089187622,
-0.9083746075630188,
-1.1524467468261719,
-1.0086054801940918,
-1.3946150541305542,
0.573538243770599... |
func (*ClientStreamNumberRequest) Descriptor() ([]byte, []int) {
return file_proto_calculate_proto_rawDescGZIP(), []int{7}
} | [
0.15433625876903534,
-0.1897958368062973,
0.4276943802833557,
0.5904364585876465,
-0.3852272927761078,
-1.2290819883346558,
0.545569896697998,
-0.26096028089523315,
-0.1879221796989441,
-1.138561487197876,
-0.2718166410923004,
0.18071171641349792,
0.5029075741767883,
1.9039689302444458,
... |
func (*ClientStreamNumberResponse) Descriptor() ([]byte, []int) {
return file_proto_calculate_proto_rawDescGZIP(), []int{8}
} | [
0.699203372001648,
-0.4199769198894501,
0.017417943105101585,
0.2943812608718872,
-0.4525507688522339,
-1.4231635332107544,
0.5952314734458923,
-0.5499327778816223,
0.16048967838287354,
-0.8419989347457886,
-0.8345077037811279,
-0.4361330568790436,
-0.2258082926273346,
1.305054783821106,
... |
func (*StreamNumberRequest) Descriptor() ([]byte, []int) {
return file_proto_calculate_proto_rawDescGZIP(), []int{9}
} | [
-0.6527811288833618,
0.4951106905937195,
0.6144569516181946,
0.3050229847431183,
-0.37024199962615967,
-0.5826618075370789,
0.8730823397636414,
0.061349306255578995,
0.03487185016274452,
-1.1087292432785034,
-0.316366046667099,
0.7378271818161011,
-0.2863003611564636,
1.311629056930542,
... |
func (*StreamNumberResponse) Descriptor() ([]byte, []int) {
return file_proto_calculate_proto_rawDescGZIP(), []int{10}
} | [
-0.20348991453647614,
0.28583085536956787,
0.2763936221599579,
-0.014341626316308975,
-0.27803096175193787,
-0.7864665985107422,
0.9551462531089783,
-0.07882017642259598,
0.29105478525161743,
-0.8642441034317017,
-1.018005609512329,
-0.009307543747127056,
-1.0839776992797852,
0.63428515195... |
func ParseCacheControl(cacheControlHeader string) *CacheControl {
cc := &CacheControl{Public: true}
items := strings.Split(cacheControlHeader, ",")
for _, item := range items {
item = strings.TrimSpace(item)
switch item {
case "no-store":
cc.NoStore = true
continue
case "no-cache":
cc.NoCache = tru... | [
0.040318120270967484,
-0.49839332699775696,
0.39445406198501587,
-0.3856279253959656,
-0.7937567830085754,
-0.3666086196899414,
-0.5844528675079346,
-0.07269708067178726,
-0.03426344692707062,
-0.06274425238370895,
-0.36679768562316895,
0.09543880820274353,
0.4213559925556183,
-0.013032301... |
func (o *PostCustomersCustomerFidPaymentMethodsPaypalCompleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostCustomersCustomerFidPaymentMethodsPaypalCompleteOK()
if err := result.readResponse(response, cons... | [
0.5045777559280396,
-0.657821774482727,
0.8132971525192261,
-0.2157984972000122,
-0.6731746792793274,
-1.0899885892868042,
0.0441473163664341,
-0.8593940734863281,
0.5273351669311523,
0.4988802373409271,
0.37852102518081665,
-1.4997994899749756,
-0.7861431241035461,
-0.07798469811677933,
... |
func NewPostCustomersCustomerFidPaymentMethodsPaypalCompleteOK() *PostCustomersCustomerFidPaymentMethodsPaypalCompleteOK {
return &PostCustomersCustomerFidPaymentMethodsPaypalCompleteOK{}
} | [
0.6674824357032776,
-0.1948477029800415,
0.41650673747062683,
-0.11517345905303955,
-1.1915329694747925,
-0.2660996615886688,
0.4579232931137085,
-0.2216837853193283,
-0.3637365996837616,
0.7624287605285645,
0.08728586882352829,
-1.5027973651885986,
0.16259217262268066,
-0.2581563889980316... |
func (o *PostCustomersCustomerFidPaymentMethodsPaypalCompleteOK) IsSuccess() bool {
return true
} | [
0.5321129560470581,
-0.14884111285209656,
0.4494493007659912,
0.3964764475822449,
-0.9610351324081421,
-0.5750202536582947,
0.04668056592345238,
-0.16811248660087585,
0.07192562520503998,
0.7741564512252808,
-0.17327269911766052,
-1.4180753231048584,
-0.03026105836033821,
0.334812402725219... |
func (o *PostCustomersCustomerFidPaymentMethodsPaypalCompleteOK) IsRedirect() bool {
return false
} | [
0.5936663746833801,
-0.12115478515625,
0.5371877551078796,
0.3137187063694,
-0.8699093461036682,
-0.25740715861320496,
0.40164411067962646,
-0.5537956357002258,
0.4506204128265381,
0.4309176504611969,
0.09319595247507095,
-1.4504852294921875,
-0.4227149188518524,
0.21551784873008728,
-1.... |
func (o *PostCustomersCustomerFidPaymentMethodsPaypalCompleteOK) IsCode(code int) bool {
return code == 200
} | [
0.47245103120803833,
-0.24938930571079254,
0.39956238865852356,
0.21258391439914703,
-0.7684275507926941,
-0.6086259484291077,
-0.16100965440273285,
-0.24878406524658203,
0.40650567412376404,
1.0773303508758545,
0.04269548878073692,
-1.6123948097229004,
-0.43294399976730347,
0.441158473491... |
func (o *PostCustomersCustomerFidPaymentMethodsPaypalCompleteOK) Code() int {
return 200
} | [
0.5001025795936584,
-0.2635738253593445,
0.3627566695213318,
0.25689420104026794,
-0.9913401007652283,
-0.6665921211242676,
0.32025355100631714,
-0.19788596034049988,
-0.07724704593420029,
0.7607392072677612,
-0.038563381880521774,
-1.4795161485671997,
0.04191030189394951,
0.79334861040115... |
func NewPostCustomersCustomerFidPaymentMethodsPaypalCompleteDefault(code int) *PostCustomersCustomerFidPaymentMethodsPaypalCompleteDefault {
return &PostCustomersCustomerFidPaymentMethodsPaypalCompleteDefault{
_statusCode: code,
}
} | [
0.8563569784164429,
0.03974703699350357,
0.2612195909023285,
-0.2644892930984497,
-0.40134164690971375,
-0.20267818868160248,
-0.031570158898830414,
-0.3854601979255676,
-0.118843212723732,
0.2404913753271103,
-0.3932998478412628,
-0.885991096496582,
-0.642632246017456,
-0.2687597572803497... |
func (o *PostCustomersCustomerFidPaymentMethodsPaypalCompleteDefault) IsSuccess() bool {
return o._statusCode/100 == 2
} | [
0.6254016160964966,
-0.0012682615779340267,
0.2851809561252594,
0.382595956325531,
-0.3538222014904022,
-0.6165127754211426,
-0.23513825237751007,
-0.2477063089609146,
-0.02552155591547489,
0.398475706577301,
-0.3159140646457672,
-0.9934738874435425,
-0.5221706628799438,
-0.013104082085192... |
func (o *PostCustomersCustomerFidPaymentMethodsPaypalCompleteDefault) IsRedirect() bool {
return o._statusCode/100 == 3
} | [
0.7813155055046082,
0.15884648263454437,
0.4477127194404602,
0.2761259078979492,
-0.1804107129573822,
-0.02828064188361168,
0.08214966207742691,
-0.5047237277030945,
0.39978650212287903,
0.08693651854991913,
-0.2136208862066269,
-1.0935487747192383,
-1.014086365699768,
-0.3661288619041443,... |
func (o *PostCustomersCustomerFidPaymentMethodsPaypalCompleteDefault) IsCode(code int) bool {
return o._statusCode == code
} | [
0.6618943214416504,
0.0594094879925251,
0.2539529800415039,
0.15932540595531464,
-0.20795761048793793,
-0.4524936079978943,
-0.4655815064907074,
-0.25043222308158875,
0.5601885914802551,
0.7187397480010986,
-0.20375201106071472,
-1.4315519332885742,
-1.1245590448379517,
0.2952382564544678,... |
func (o *PostCustomersCustomerFidPaymentMethodsPaypalCompleteDefault) Code() int {
return o._statusCode
} | [
0.6109855771064758,
0.006159862969070673,
0.07367750257253647,
0.17958460748195648,
-0.2977394759654999,
-0.5118487477302551,
0.08927708119153976,
-0.055018335580825806,
-0.1740691214799881,
0.33510875701904297,
-0.14595310389995575,
-1.2512787580490112,
-0.3456961512565613,
0.557902157306... |
func (me *Frustum) UpdatePlanesGH(mat *unum.Mat4, normalize bool) {
// Left clipping plane
me.Planes[0].X = mat[12] + mat[0]
me.Planes[0].Y = mat[13] + mat[1]
me.Planes[0].Z = mat[14] + mat[2]
me.Planes[0].W = mat[15] + mat[3]
// Right clipping plane
me.Planes[1].X = mat[12] - mat[0]
me.Planes[1].Y = mat[13] - ... | [
0.35183826088905334,
0.050297461450099945,
1.2088669538497925,
-0.21247310936450958,
-0.8056084513664246,
1.3571383953094482,
0.43955254554748535,
-0.32641837000846863,
-0.4074792265892029,
0.45780837535858154,
0.1284482479095459,
0.08310642838478088,
-0.5102530121803284,
0.665831089019775... |
func (hrsKey *HRSKey) Less(other HRSKey) bool {
if hrsKey.Height < other.Height {
return true
}
if hrsKey.Height > other.Height {
return false
}
// height is equal, check round
if hrsKey.Round < other.Round {
return true
}
if hrsKey.Round > other.Round {
return false
}
// round is equal, check st... | [
-0.02718750387430191,
-0.46159642934799194,
0.7948273420333862,
0.005863811355084181,
-0.4980594217777252,
0.40506798028945923,
0.11315124481916428,
-1.2500114440917969,
-0.6417738199234009,
-0.33732637763023376,
-1.1320078372955322,
-0.39084145426750183,
-0.20380331575870514,
2.1254899501... |
func (cosigner *LocalCosigner) GetID() int {
return cosigner.key.ID
} | [
-0.05241617560386658,
-0.051395148038864136,
0.4518272876739502,
-0.12421335279941559,
0.6401281952857971,
0.04842042177915573,
0.490142285823822,
1.2560282945632935,
0.024109942838549614,
0.39329081773757935,
-0.9753119349479675,
-0.4692339301109314,
-1.0697413682937622,
0.760165631771087... |
func (cosigner *LocalCosigner) Sign(req CosignerSignRequest) (CosignerSignResponse, error) {
cosigner.lastSignStateMutex.Lock()
defer cosigner.lastSignStateMutex.Unlock()
res := CosignerSignResponse{}
lss := cosigner.lastSignState
height, round, step, err := UnpackHRS(req.SignBytes)
if err != nil {
return res... | [
-0.9008750319480896,
-0.2609841823577881,
0.5106966495513916,
0.09182921051979065,
0.02564104087650776,
-0.1470441073179245,
0.30085569620132446,
0.7095515727996826,
-0.00559920072555542,
0.47457414865493774,
-0.4956592917442322,
-0.15632911026477814,
-0.18653346598148346,
0.59177583456039... |
func (cosigner *LocalCosigner) GetEphemeralSecretPart(req CosignerGetEphemeralSecretPartRequest) (CosignerGetEphemeralSecretPartResponse, error) {
res := CosignerGetEphemeralSecretPartResponse{}
// protects the meta map
cosigner.lastSignStateMutex.Lock()
defer cosigner.lastSignStateMutex.Unlock()
hrsKey := HRSKe... | [
-0.4591161906719208,
0.12561964988708496,
0.8897908926010132,
-0.35077372193336487,
0.29549700021743774,
0.293244332075119,
-0.006331973243504763,
0.4631790816783905,
-0.3038603663444519,
0.4500693678855896,
-0.47142940759658813,
0.26232779026031494,
-0.9538671970367432,
0.1788598895072937... |
func (cosigner *LocalCosigner) SetEphemeralSecretPart(req CosignerSetEphemeralSecretPartRequest) error {
// Verify the source signature
{
if req.SourceSig == nil {
return errors.New("SourceSig field is required")
}
digestMsg := CosignerGetEphemeralSecretPartResponse{}
digestMsg.SourceID = req.SourceID
... | [
-0.4706443250179291,
0.3232436776161194,
0.7007870078086853,
-0.7926973104476929,
0.4372701644897461,
0.3797074556350708,
-0.13238678872585297,
0.7965847253799438,
-0.3160943388938904,
0.4612866938114166,
-0.7891057729721069,
0.25298169255256653,
-0.32489198446273804,
0.43820491433143616,
... |
func (b *block) Plan(pointIds ...string) ([]spi.PointSPI, error) {
points := []spi.PointSPI{}
if len(pointIds) == 0 {
// if there are no specified points, include all points
for _, p := range b.points {
points = append(points, p)
}
} else {
included := map[string]bool{}
included_sf := map[string]bool{... | [
-0.16178925335407257,
-0.9824458956718445,
0.6404723525047302,
0.4400838315486908,
-0.7210348844528198,
-0.18913380801677704,
-0.5623816251754761,
0.2504280209541321,
-0.11462762951850891,
0.5153434872627258,
0.2592228353023529,
0.15615051984786987,
-0.3076602816581726,
0.1179228350520134,... |
func (b *block) invalidate(p spi.PointSPI) {
for _, d := range b.points {
if sfp := d.scaleFactor; sfp != nil {
if sfp.Id() == p.Id() {
d.SetValue(nil)
}
}
}
} | [
0.2233252227306366,
0.1670868992805481,
0.296811044216156,
0.24229075014591217,
-0.0493505485355854,
-0.0702892541885376,
-0.8620728850364685,
-0.23813308775424957,
-0.41337791085243225,
0.12669390439987183,
-0.3713515102863312,
0.4409825801849365,
-0.809755802154541,
0.9111959338188171,
... |
func dosomething(random int, a func(), b func()) {
fmt.Println("Details passed to dosomething function :")
fmt.Printf("\t\t\t\t%v\t%v\t%v\n",random,a,b)
if random % 2 == 0{
a()
}else{
b()
}
} | [
-0.41323572397232056,
-0.2605493366718292,
0.5667147040367126,
-0.6290095448493958,
0.740763783454895,
0.5231595635414124,
-0.19886039197444916,
-0.17558173835277557,
-0.41604408621788025,
-0.43792667984962463,
0.35455963015556335,
0.7443323731422424,
-0.16166964173316956,
0.92601162195205... |
func (o *GetJobPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetJobPolicyOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
de... | [
0.2707444429397583,
-0.8198353052139282,
0.8287118673324585,
0.2875553071498871,
0.3098789155483246,
-0.529707670211792,
0.0012395830126479268,
-0.5115347504615784,
0.43966519832611084,
0.16006460785865784,
0.48540061712265015,
-0.32419949769973755,
-0.9947429299354553,
0.01416262518614530... |
func NewGetJobPolicyOK() *GetJobPolicyOK {
return &GetJobPolicyOK{}
} | [
0.2860426902770996,
-0.2632876932621002,
0.4346483647823334,
1.3981291055679321,
-0.08731052279472351,
-0.09123838692903519,
0.2540939748287201,
0.16785196959972382,
-0.5387160778045654,
-0.12897668778896332,
-1.0018603801727295,
0.1078239306807518,
-0.1285247504711151,
-0.4037297666072845... |
func NewGetJobPolicyDefault(code int) *GetJobPolicyDefault {
return &GetJobPolicyDefault{
_statusCode: code,
}
} | [
0.7998889088630676,
-0.1203857809305191,
0.24123643338680267,
0.704756498336792,
0.3544314205646515,
0.8809469938278198,
-0.33765479922294617,
0.06857823580503464,
-0.0317065604031086,
-0.27095383405685425,
-1.1504303216934204,
0.5228148698806763,
-1.0051242113113403,
0.17370855808258057,
... |
func (o *GetJobPolicyDefault) Code() int {
return o._statusCode
} | [
0.7987507581710815,
0.1425538957118988,
0.25052523612976074,
0.821720540523529,
0.534028947353363,
0.7032737135887146,
-0.27398714423179626,
0.6224868893623352,
-0.011928100138902664,
-0.42936816811561584,
-0.17497512698173523,
0.2708272635936737,
-0.6772136688232422,
0.5494335889816284,
... |
func (*GoogleAdsField) Descriptor() ([]byte, []int) {
return file_google_ads_googleads_v14_resources_google_ads_field_proto_rawDescGZIP(), []int{0}
} | [
0.08341457694768906,
0.9951092004776001,
0.31232333183288574,
-1.3009746074676514,
-0.25770312547683716,
0.5208854675292969,
0.26426786184310913,
-0.3058800995349884,
-0.9216718673706055,
0.0007416701992042363,
-0.7063366174697876,
0.33462759852409363,
-0.5199429988861084,
0.81163293123245... |
func TestRealNodes(t *testing.T) {
slackClient, _, base := getTestJenkinsCommand()
t.Run("Fetch real nodes", func(t *testing.T) {
cfg := config.Jenkins{
Host: "https://ci.jenkins.io",
}
client, err := jenkins.GetClient(cfg)
assert.Nil(t, err)
base.jenkins = client
command := bot.Commands{}
command.... | [
0.13668493926525116,
0.525490939617157,
0.5670642256736755,
-0.35911238193511963,
1.0252888202667236,
0.140081986784935,
0.46253058314323425,
-0.45339080691337585,
-0.1357196420431137,
-0.18235944211483002,
-0.8662419319152832,
1.155137538909912,
-0.4655543565750122,
0.43451371788978577,
... |
func FileExists(name string, dir string) bool {
dbPath := filepath.Join(dir, name+".db")
info, err := os.Stat(dbPath)
if err != nil {
return false
}
_ = info
return true
} | [
-0.4931505024433136,
-0.3317820429801941,
0.7987560033798218,
-0.0877176970243454,
1.2868562936782837,
0.8734943866729736,
-0.8145629167556763,
0.4843452572822571,
-1.0412789583206177,
0.22043652832508087,
-0.28344497084617615,
-0.2496124655008316,
0.31224194169044495,
0.3563249707221985,
... |
func convertData(data interface{}) []byte {
buffer, err := serial.Serialize(data, serial.PERSISTENT)
if err != nil {
log.Fatal("Persistent Serialization Failed", "err", err, "data", data)
}
return buffer
} | [
-0.6212533116340637,
-0.21601997315883636,
0.628799557685852,
0.3202957510948181,
0.2601768374443054,
0.41938579082489014,
-0.3062731623649597,
-0.6866376996040344,
1.5521248579025269,
-0.6319709420204163,
-0.21041475236415863,
0.08592662960290909,
-0.8713867664337158,
0.4582518935203552,
... |
func unconvertData(data []byte) interface{} {
if data == nil || string(data) == "" {
return nil
}
var proto interface{}
result, err := serial.Deserialize(data, proto, serial.PERSISTENT)
if err != nil {
log.Fatal("Persistent Deserialization Failed", "err", err, "data", data)
}
return result
} | [
-0.27761510014533997,
0.35479527711868286,
0.6954479813575745,
-0.3252178132534027,
-0.4398118853569031,
-0.39557963609695435,
0.0028215390630066395,
0.18393166363239288,
0.7734115719795227,
-0.44668108224868774,
0.13412295281887054,
-0.6874760985374451,
-1.5747572183609009,
-0.41628465056... |
func NewKeyValue(name string, newType StorageType) *KeyValue {
switch newType {
case MEMORY:
// TODO: No Merkle tree?
return &KeyValue{
Type: newType,
Name: name,
memory: db.NewMemDB(),
}
case PERSISTENT:
fullname := "OneLedger-" + name
if FileExists(fullname, global.DatabaseDir()) {
//l... | [
0.25403469800949097,
-0.4061426818370819,
0.5147756338119507,
0.33983123302459717,
-0.8899338245391846,
-0.31359827518463135,
-0.6978052854537964,
-0.5862061381340027,
-0.10122018307447433,
0.7095320820808411,
-0.09092310070991516,
0.8096053600311279,
-0.4822656214237213,
0.814351499080658... |
func (store KeyValue) Begin() Session {
return NewKeyValueSession(&store)
} | [
-0.362703800201416,
-0.45543715357780457,
0.3240836560726166,
0.18490763008594513,
-1.8140865564346313,
-0.06472049653530121,
0.1329105794429779,
-0.745855450630188,
0.4372478127479553,
-0.5088370442390442,
0.3152543604373932,
1.086596965789795,
0.29676553606987,
0.16144326329231262,
-0.... |
func (store KeyValue) Dump() {
// TODO: Dump out debugging information here
texts := store.database.Stats()
for key, value := range texts {
log.Debug("Stat", key, value)
}
iter := store.database.Iterator(nil, nil)
for ; iter.Valid(); iter.Next() {
hash := iter.Key()
node := iter.Value()
log.Debug("Row", ... | [
-0.5108795166015625,
0.5078155398368835,
0.19555090367794037,
-0.9182458519935608,
-0.7027256488800049,
0.19461408257484436,
0.10473775863647461,
0.20710307359695435,
-0.08633821457624435,
-0.683353841304779,
0.5532758235931396,
0.034957677125930786,
0.34330642223358154,
1.2746644020080566... |
func (store KeyValue) Errors() string {
return ""
} | [
-0.8845264315605164,
-0.22296597063541412,
0.1755169779062271,
-0.5509182810783386,
-0.9916367530822754,
0.7366723418235779,
-0.46567657589912415,
-0.009889459237456322,
0.4744868576526642,
-0.4175895154476166,
-0.4430623948574066,
0.3365952968597412,
-0.07156845927238464,
0.43941938877105... |
func (store KeyValue) Reopen() {
} | [
-1.3300672769546509,
-0.5572065711021423,
0.17280779778957367,
0.5531161427497864,
-1.4377752542495728,
0.023582441732287407,
0.8143573999404907,
1.795358657836914,
-0.42101797461509705,
-0.3351849317550659,
0.2117241472005844,
0.3317694067955017,
-0.12257160991430283,
-0.6341594457626343,... |
func (store KeyValue) FindAll() []DatabaseKey {
return store.list()
} | [
0.09037529677152634,
0.3132479786872864,
0.13137933611869812,
0.8471214771270752,
-0.09348933398723602,
0.3259645104408264,
-0.9506698846817017,
0.7850208282470703,
0.14773771166801453,
0.6905247569084167,
-0.7777191996574402,
0.5756583213806152,
-0.5879871249198914,
1.6897656917572021,
... |
func (store KeyValue) Exists(key DatabaseKey) bool {
version := store.tree.Version64()
index, _ := store.tree.GetVersioned(key, version)
if index == -1 {
return false
}
return true
} | [
-1.2816070318222046,
0.29028069972991943,
0.42510440945625305,
0.03364440053701401,
-0.3651006519794464,
0.14827485382556915,
-0.6961467266082764,
0.9199218153953552,
-0.0763581171631813,
0.9730884432792664,
-0.7132143378257751,
-0.22001150250434875,
-0.2623680830001831,
0.9742464423179626... |
func (store KeyValue) Get(key DatabaseKey) interface{} {
version := store.tree.Version64()
index, value := store.tree.GetVersioned(key, version)
if index == -1 {
return nil
}
return unconvertData(value)
} | [
-0.6632593870162964,
0.6966496706008911,
0.42419329285621643,
-0.07459426671266556,
-0.6936749219894409,
-0.6830647587776184,
-1.0097041130065918,
0.3481046259403229,
-0.10418599843978882,
0.8992870450019836,
-0.5534067749977112,
0.5689306259155273,
-0.3440387547016144,
0.04898556694388389... |
func NewKeyValueSession(store *KeyValue) Session {
return &KeyValueSession{store: store}
} | [
-0.16196854412555695,
-0.3871334195137024,
0.12245404720306396,
0.3660876154899597,
-1.6357710361480713,
0.1961546391248703,
-0.8412396907806396,
-0.6000875234603882,
0.7746524214744568,
-0.1177833154797554,
-0.46718645095825195,
0.31777656078338623,
0.2751113474369049,
0.27302637696266174... |
func (session KeyValueSession) FindAll() []DatabaseKey {
return session.store.list()
} | [
0.08470664918422699,
-0.14575856924057007,
0.24613262712955475,
0.9058524966239929,
-0.025571636855602264,
0.04779746010899544,
-0.8464034199714661,
0.2238595187664032,
0.9208160638809204,
0.8559845685958862,
-0.4585322439670563,
0.584189236164093,
-0.4052340090274811,
1.3173246383666992,
... |
func (session KeyValueSession) Set(key DatabaseKey, value interface{}) bool {
buffer := convertData(value)
session.store.tree.Set(key, buffer)
return true
} | [
-0.6311997175216675,
0.8301210403442383,
0.3862319588661194,
-0.397845983505249,
-0.8458799719810486,
0.20882347226142883,
-0.4666141867637634,
0.038853973150253296,
0.379623144865036,
1.160197138786316,
-0.6956450343132019,
-0.2654542624950409,
-0.9433696269989014,
0.6137136220932007,
-... |
func (session KeyValueSession) Exists(key DatabaseKey) bool {
version := session.store.tree.Version64()
index, _ := session.store.tree.GetVersioned(key, version)
if index == -1 {
return false
}
return true
} | [
-1.4549057483673096,
-0.12595495581626892,
0.47336873412132263,
0.10936833173036575,
-0.23280826210975647,
-0.12740735709667206,
-0.6476739645004272,
0.38724076747894287,
0.3613016605377197,
1.1993865966796875,
-0.7157636880874634,
-0.2244875282049179,
-0.2618759870529175,
0.69597363471984... |
func (session KeyValueSession) Get(key DatabaseKey) interface{} {
version := session.store.tree.Version64()
index, value := session.store.tree.GetVersioned(key, version)
if index == -1 {
return nil
}
return unconvertData(value)
} | [
-0.9125081896781921,
0.2547992467880249,
0.49959486722946167,
0.03248688206076622,
-0.727238655090332,
-0.8882418274879456,
-0.9026190042495728,
-0.08190037310123444,
0.32658928632736206,
1.1183513402938843,
-0.4676182270050049,
0.40435680747032166,
-0.3808436393737793,
-0.0755011141300201... |
func (session KeyValueSession) Delete(key DatabaseKey) bool {
return true
} | [
-0.42557600140571594,
0.6096128821372986,
0.43639805912971497,
0.8199077248573303,
-0.5356816053390503,
0.463213175535202,
0.11413319408893585,
0.5355218648910522,
1.211734652519226,
0.9197656512260437,
-0.5658000707626343,
-0.9528583288192749,
-1.167378544807434,
0.6464055776596069,
-0.... |
func (session KeyValueSession) Errors() string {
return ""
} | [
-0.8455268740653992,
-0.7406163811683655,
0.28948673605918884,
-0.1324627846479416,
-0.6191341280937195,
0.4320385754108429,
-0.6672963500022888,
-0.871097981929779,
0.7399306893348694,
-0.006216803565621376,
-0.25677722692489624,
-0.05893060937523842,
0.30337098240852356,
0.32624489068984... |
func (session KeyValueSession) Commit() bool {
_, version, err := session.store.tree.SaveVersion()
if err != nil {
log.Fatal("Database Error", "err", err)
}
session.store.version = version
return true
} | [
-0.6296254992485046,
-0.6663343906402588,
0.9052637219429016,
0.30620062351226807,
-0.1006031483411789,
0.8234469890594482,
-0.5284356474876404,
0.6505851745605469,
-0.6848164200782776,
2.634147882461548,
-0.7147373557090759,
-0.9483792185783386,
-0.48217055201530457,
0.11819648742675781,
... |
func (session KeyValueSession) Rollback() bool {
return false
} | [
-1.1514676809310913,
-0.36397552490234375,
0.5695526003837585,
0.24682524800300598,
-0.373592346906662,
1.1754562854766846,
0.30378127098083496,
0.614011824131012,
0.21965613961219788,
0.8518900871276855,
0.15391169488430023,
-0.540559709072113,
-0.8577934503555298,
-0.47624117136001587,
... |
func (session KeyValueSession) Dump() {
texts := session.store.database.Stats()
for key, value := range texts {
log.Debug("Stat", key, value)
}
iter := session.store.database.Iterator(nil, nil)
for ; iter.Valid(); iter.Next() {
hash := iter.Key()
node := iter.Value()
log.Debug("Row", hash, node)
}
} | [
-0.493679016828537,
0.2555226981639862,
0.29745182394981384,
-1.0084216594696045,
-0.5994766354560852,
0.06671542674303055,
0.0026226015761494637,
-0.1286163032054901,
0.13862499594688416,
-0.24902576208114624,
0.5755618810653687,
-0.002179129049181938,
0.4387628138065338,
1.05787086486816... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.