text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func DigitecGalaxusScrape(o chan<- offer, site string) {
doc, err := goquery.NewDocument("https://www." + site + ".ch/LiveShopping")
if err != nil {
log.Fatal(err)
return
}
doc.Find("article.daily-offer-new").Each(func(i int, s *goquery.Selection) {
// TODO: only post one deal for debugging
if i > 0 {
r... | [
-1.241072416305542,
0.33679506182670593,
0.7669534683227539,
-0.009801877662539482,
-0.3399515748023987,
-0.4622303545475006,
0.0914759412407875,
-0.24199356138706207,
0.18046702444553375,
0.6473821401596069,
0.2231397181749344,
0.2930934727191925,
0.7505977749824524,
0.29604318737983704,
... |
func main() {
// Declaring a single variable
var x string
// Assignment
x = "ahihi"
fmt.Println(x)
// Declaring a variable with an initial value ,Go will automatically infer the type of that variable from the initial value.
var a = 232
fmt.Println(a)
// Multiple variable declaration
var k, m string
fmt.Pr... | [
0.33672642707824707,
-0.4735896587371826,
0.8962913751602173,
0.9167094826698303,
0.3005697429180145,
0.42110154032707214,
0.8739476203918457,
0.4568694829940796,
-0.644826352596283,
-0.11637969315052032,
-0.1494450718164444,
0.43976813554763794,
-0.0045349979773163795,
0.37954992055892944... |
func (node *Node) initRound(roundNum int) {
sendThis := node.traverseEIG(node.root, roundNum-1)
msg := ""
for _, each := range sendThis {
for _, pathInt := range each.path {
msg += strconv.Itoa(pathInt) + "."
}
val := strconv.Itoa(each.val)
if node.byz == 1{
... | [
-0.32136884331703186,
-0.09547913074493408,
0.8196897506713867,
-0.7362538576126099,
0.16012759506702423,
-0.4019957482814789,
1.2752177715301514,
-0.1761830598115921,
0.11140532791614532,
-0.059823594987392426,
-0.17418938875198364,
1.3789222240447998,
-0.25172534584999084,
1.444293498992... |
func DefaultMConnConfig() *MConnConfig {
return &MConnConfig{}
} | [
0.09973327070474625,
-0.4089950919151306,
0.133853480219841,
0.42493993043899536,
-0.9143355488777161,
-0.8260632157325745,
-0.7280493974685669,
1.247896671295166,
-0.5128682255744934,
0.08489558100700378,
-1.2291430234909058,
-0.752476155757904,
-0.36842939257621765,
0.8366613388061523,
... |
func NewTemMConnConfig(gconn *grpc.ClientConn, gcli pb.P2PgserviceClient) *MConnConfig {
return &MConnConfig{
gconn: gconn,
gcli: gcli,
}
} | [
-0.0756371021270752,
-0.7861615419387817,
0.48163625597953796,
-0.5055340528488159,
-1.2734792232513428,
-0.26529884338378906,
-0.9399695992469788,
0.3029623329639435,
-1.358540654182434,
0.3420335352420807,
-0.7689897418022156,
0.5412278771400452,
-0.14361940324306488,
0.12662309408187866... |
func NewMConnection(conn *grpc.ClientConn, remote *NetAddress, peer *Peer) *MConnection {
log.Info("NewMConnection p2p client", "addr", remote)
mconn := &MConnection{
gconn: conn,
gcli: pb.NewP2PgserviceClient(conn),
peer: peer,
}
mconn.node = peer.node
mconn.remoteAddress = remote
return mconn
} | [
-0.5405609011650085,
-1.0173934698104858,
0.4755863547325134,
-0.42226338386535645,
-1.146357774734497,
0.4600726068019867,
-0.8628860712051392,
0.6230358481407166,
-0.5359002947807312,
0.02552143670618534,
0.10648217052221298,
0.3518959581851959,
-0.5052116513252258,
0.0631290152668953,
... |
func NewMConnectionWithConfig(cfg *MConnConfig) *MConnection {
mconn := &MConnection{
gconn: cfg.gconn,
gcli: cfg.gcli,
}
return mconn
} | [
-0.16315075755119324,
-1.1729753017425537,
0.19286826252937317,
0.4132821559906006,
-1.3148322105407715,
-0.5686120390892029,
-0.5386766195297241,
0.17851819097995758,
0.1336963027715683,
0.47124379873275757,
-0.8957104682922363,
-0.8693218231201172,
-0.32823359966278076,
0.806740403175354... |
func (f Feeds) Len() int { return len(f) } | [
0.2783058285713196,
0.10255193710327148,
0.1548449993133545,
-0.4793858230113983,
0.6062857508659363,
-1.0683187246322632,
0.9821863770484924,
0.3002244830131531,
-0.6621977686882019,
-1.357469916343689,
-1.2845988273620605,
0.5328245759010315,
0.2783472537994385,
-0.254329115152359,
-0.... |
func (f Feeds) Less(i, j int) bool {
return strings.Compare(f[i].Title, f[j].Title) == -1
} | [
-0.48730775713920593,
-0.12823696434497833,
0.460891455411911,
-1.1537033319473267,
-0.37591612339019775,
-0.191151961684227,
-0.9689268469810486,
-1.8235944509506226,
-0.9874182939529419,
-0.946868360042572,
-0.1779640018939972,
-0.02612803690135479,
-0.7759263515472412,
-0.04994686320424... |
func (f Feeds) Swap(i, j int) { f[i], f[j] = f[j], f[i] } | [
-1.4577363729476929,
0.06821367144584656,
0.2437785118818283,
-0.7504857182502747,
0.6982529163360596,
-0.2922459840774536,
-0.1060074120759964,
-0.10667932033538818,
-1.2955410480499268,
-0.7936893701553345,
-0.3574696183204651,
0.769457995891571,
-0.09763754904270172,
-0.7291109561920166... |
func LoadFeeds(db *sql.DB, fileData map[int64]file.Data) (feeds Feeds) {
for id := range fileData {
feed, err := LoadFeed(db, id)
if err != nil {
log.Fatal(err)
}
feeds = append(feeds, feed)
}
return feeds
} | [
-0.20864656567573547,
0.06425417214632034,
0.49454760551452637,
0.3428768217563629,
0.10571900755167007,
-0.10009709745645523,
-1.1007241010665894,
-0.6431942582130432,
-1.0833841562271118,
0.012503363192081451,
0.092839315533638,
0.07149358093738556,
-0.9832830429077148,
1.149271607398986... |
func NewFeeds(fileData map[int64]file.Data) (feeds Feeds) {
for id, data := range fileData {
feed, err := NewFeed(id, data)
if err != nil {
continue
}
feeds = append(feeds, feed)
}
return feeds
} | [
-0.5053467750549316,
-0.704339325428009,
0.4881933927536011,
0.4878997802734375,
0.03332372382283211,
0.11835425347089767,
-0.8401684165000916,
-1.051482081413269,
-1.0833468437194824,
-0.06332585215568542,
0.2929147183895111,
0.3697231411933899,
-0.557630717754364,
0.9473704695701599,
-... |
func (f Feeds) GuiData(db *sql.DB) (data []gui.Feed) {
for _, feed := range f {
seen, total, err := GetFeedEpisodeSeenRatio(db, feed.ID)
if err != nil {
log.Fatal(err)
}
//TODO: fix feed.Title() -- I should be able to call it here!!!
data = append(data, gui.Feed{fmt.Sprintf("(%d/%d)", seen, total), feed.T... | [
-0.5091574788093567,
-0.13274182379245758,
0.3532814681529999,
-0.5038221478462219,
0.2679750621318817,
0.25101539492607117,
-0.7442599534988403,
-0.11388706415891647,
-0.7558761835098267,
-0.16660726070404053,
0.08501774817705154,
-0.1728028655052185,
0.4085729420185089,
1.29718017578125,... |
func ReviewMovie(w http.ResponseWriter, r *http.Request) {
review := r.URL.Query().Get("review")
if review == "" {
JSONErrorWriter(w, "Review is missing", http.StatusBadRequest)
return
}
var t JwtToken
t.Token = r.Header.Get("Authorization")
valid, message := t.CheckAuth()
if valid == false {
JSONErrorWri... | [
-0.964936375617981,
-0.04511444643139839,
1.1161314249038696,
0.7762779593467712,
-0.14506863057613373,
0.4972193241119385,
-1.065749168395996,
0.15907752513885498,
-0.6118648052215576,
1.2723640203475952,
0.21011193096637726,
0.17140524089336395,
-0.7917083501815796,
0.14836251735687256,
... |
func DelReviewMovie(w http.ResponseWriter, r *http.Request) {
var t JwtToken
t.Token = r.Header.Get("Authorization")
valid, message := t.CheckAuth()
if valid == false {
JSONErrorWriter(w, message, http.StatusUnauthorized)
return
}
vars := mux.Vars(r)
ID := vars["ID"]
UserID, err := GetUserIdbyToken(strings... | [
-0.9841578602790833,
-0.5633775591850281,
0.9142970442771912,
0.5263488292694092,
-0.49206700921058655,
-0.1594924032688141,
-1.2671233415603638,
-0.18295520544052124,
-0.19615213572978973,
0.9421391487121582,
0.41613900661468506,
0.837212324142456,
-0.7731339335441589,
0.377727746963501,
... |
func (b Board) Count() error {
if !b.isValid() {
return errors.New("invalid board")
}
m := len(b)
if m > 0 {
n := len(b[0])
dx := []int{0, 1, 1, 1, 0, -1, -1, -1}
dy := []int{1, 1, 0, -1, -1, -1, 0, 1}
for i := 1; i < m-1; i++ {
for j := 1; j < n-1; j++ {
if b[i][j] == ' ' {
var mines byte = '... | [
0.39677727222442627,
0.2531853914260864,
0.924780011177063,
0.5856862664222717,
0.0456930510699749,
0.01597600243985653,
0.850214958190918,
0.38951045274734497,
-0.26868924498558044,
0.8758132457733154,
0.018130455166101456,
-0.11632798612117767,
-0.18357986211776733,
0.776397705078125,
... |
func NewRecord() *Record {
return &Record{
Id: xid.New(),
Length: 0,
Data: nil,
}
} | [
1.3563097715377808,
0.2400970458984375,
0.0810181275010109,
-0.09425490349531174,
0.15664978325366974,
0.4761243164539337,
-1.0171079635620117,
-0.07231558114290237,
0.27104005217552185,
-1.2660291194915771,
-0.551413357257843,
0.6714670062065125,
-0.4359062612056732,
0.14635276794433594,
... |
func (s subscription) readPump() {
c := s.conn
defer func() {
hub.unregister <- s
c.ws.Close()
}()
c.ws.SetReadLimit(maxMessageSize)
c.ws.SetReadDeadline(time.Now().Add(pongWait))
c.ws.SetPongHandler(func(string) error { c.ws.SetReadDeadline(time.Now().Add(pongWait)); return nil })
for {
_, msg, err := c.w... | [
-0.4213072657585144,
-0.03289725258946419,
0.78655606508255,
-0.003608391620218754,
-0.14705771207809448,
-0.09437251836061478,
0.5203800797462463,
-0.2043134719133377,
-0.06271146982908249,
-0.15604862570762634,
0.5713863968849182,
0.8022149801254272,
-0.763192892074585,
-0.10082832723855... |
func (s *subscription) writePump() {
c := s.conn
ticker := time.NewTicker(pingPeriod)
defer func() {
ticker.Stop()
c.ws.Close()
}()
for {
select {
case message, ok := <-c.send:
c.ws.SetWriteDeadline(time.Now().Add(writeWait))
if !ok { // The hub closed the channel.
c.ws.WriteMessage(websocket.Clo... | [
-0.8743513226509094,
0.3469725251197815,
0.8353793621063232,
0.09577493369579315,
1.0121493339538574,
-0.2670392394065857,
0.5445619821548462,
-0.60651034116745,
0.0627322867512703,
-0.2629120945930481,
0.26801416277885437,
-0.13820047676563263,
-0.8986903429031372,
0.353801429271698,
0.... |
func serveWs(hub *Hub, w http.ResponseWriter, r *http.Request) {
ws, err := upgrader.Upgrade(w, r, nil)
if err != nil {
log.Println(lib.PrettyError("[WEBSOCKET] Get websocket connection from Upgrade failed - " + err.Error()))
return
}
/* ======== Get data ======== */
vars := mux.Vars(r)
claims, err := lib.Ana... | [
0.09459327161312103,
-0.02026347629725933,
1.1323654651641846,
0.3640771210193634,
-0.3721197843551636,
-0.6759727001190186,
0.33126693964004517,
-0.36544978618621826,
0.26255977153778076,
0.3765716552734375,
-0.5853456854820251,
0.907893717288971,
-0.13476060330867767,
1.076371669769287,
... |
func handleMessages(messages <-chan amqp.Delivery, handler AmqpHandler, done chan error) {
for msg := range messages {
go handleDeliveryWithRetry(msg, handler)
}
logger.Info("[lib.amqp#handleMessages] Out of loop, done")
done <- nil
} | [
0.2128368467092514,
0.09766227006912231,
0.31856265664100647,
0.01694876328110695,
0.6008970141410828,
0.3404766619205475,
-0.2141142636537552,
-0.34017643332481384,
0.07695363461971283,
0.4083489775657654,
-0.05656959116458893,
-0.8376417756080627,
-0.6061520576477051,
0.6535244584083557,... |
func handleDeliveryWithRetry(msg amqp.Delivery, handler AmqpHandler) {
err := handleSingleMessage(msg, handler)
scopeLogger := logger.WithFields(logrus.Fields{
"msg": msg,
"msgBody": string(msg.Body),
})
if err == nil {
metrics.Increment("amqp.msg.ack")
scopeLogger.Info("[lib.amqp#handleDeliveryWithRetr... | [
0.9229287505149841,
-0.0945928767323494,
0.6971225738525391,
0.19407077133655548,
-0.05632166191935539,
-0.35226497054100037,
-0.4636616110801697,
0.09910555928945541,
0.30380314588546753,
0.43582338094711304,
0.27772098779678345,
-0.16614477336406708,
0.4348578155040741,
1.140477538108825... |
func handleSingleMessage(msg amqp.Delivery, handler AmqpHandler) (err error) {
defer func() {
recoverErr := recover()
if recoverErr == nil {
return
}
logger.WithFields(logrus.Fields{
"err": recoverErr,
"msg": msg,
}).Error("[AMQP Recovery] Recovered panic from handler")
err = errDefaultRecover
... | [
-0.17063169181346893,
0.19027365744113922,
0.7756518721580505,
0.4601594805717468,
-0.12235461920499802,
0.5067846179008484,
-0.44201359152793884,
0.6367976665496826,
0.68949294090271,
0.033932290971279144,
-0.15911778807640076,
-0.6385103464126587,
-0.6991617679595947,
0.7746793031692505,... |
func waitForHandlers(done chan error, handlersCount int) {
logger.Info("[lib.amqp#waitForHandlers] Shutdown, waiting for handlers to terminate")
for i := 0; i < handlersCount; i++ {
<-done
}
logger.Info("[lib.amqp#waitForHandlers] All handlers terminated")
} | [
0.03999717906117439,
-0.10567156225442886,
0.2754935026168823,
-0.8971145749092102,
0.5099032521247864,
0.09030821919441223,
-0.6283085942268372,
-0.35693955421447754,
-0.2710549235343933,
-0.7872022986412048,
-0.6317942142486572,
-0.4849930703639984,
-0.5662590265274048,
0.401386797428131... |
func waitAnyEndSignal(handlerEnd chan error, signals <-chan os.Signal, amqpCloseConnection chan *amqp.Error, endConnection chan int, handlerCount int) {
select {
case <-handlerEnd:
logger.Warning("[lib.amqp#waitAnyEndSignal] Received end signal from handleMessage function")
metrics.Increment("amqp.signals.handler... | [
-0.4999105632305145,
-0.3842065632343292,
0.4267820417881012,
-0.06986337900161743,
0.1490958333015442,
0.016423778608441353,
-0.773597776889801,
-0.4494743347167969,
-1.0640419721603394,
-0.5108214020729065,
-0.5630462169647217,
-0.1689833104610443,
-0.024012085050344467,
0.89587908983230... |
func (c *cacheBase) checkAndSetFields() []error {
errorList := make([]error, 0, 2)
if c.Capacity <= 0 {
errorList = append(errorList, errors.New("Cache Capacity has to be > 0."))
}
if (c.TickerPeriod < 0) || (c.TickerPeriod > 0 && c.TickerPeriod < 30) {
errorList = append(errorList, errors.New("Ticker... | [
-0.6111217141151428,
0.45796629786491394,
0.4933564364910126,
0.5535984039306641,
0.15233451128005981,
-0.03446809947490692,
0.5784720778465271,
-1.1190557479858398,
-0.20168404281139374,
0.48605209589004517,
-0.08479204028844833,
0.10123075544834137,
-0.6478403210639954,
0.818977832794189... |
func (k Keeper) GetJoinPoolAndStakeAssetCount(ctx sdk.Context) uint64 {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetCountKey))
byteKey := types.KeyPrefix(types.JoinPoolAndStakeAssetCountKey)
bz := store.Get(byteKey)
// Count doesn't exist: no element
if bz == nil {... | [
0.1966809183359146,
-0.47974467277526855,
0.6138612031936646,
-0.1275569647550583,
-0.16513647139072418,
0.01227346807718277,
0.4090571999549866,
0.49746352434158325,
-0.15537089109420776,
0.15863877534866333,
-0.7494649291038513,
-0.16965515911579132,
-0.441900372505188,
-0.08584839105606... |
func (k Keeper) SetJoinPoolAndStakeAssetCount(ctx sdk.Context, count uint64) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetCountKey))
byteKey := types.KeyPrefix(types.JoinPoolAndStakeAssetCountKey)
bz := []byte(strconv.FormatUint(count, 10))
store.Set(byteKey, bz)
} | [
0.36754581332206726,
-0.4239689111709595,
0.5146329402923584,
-0.3596000671386719,
0.05823348090052605,
0.35734114050865173,
0.7380498647689819,
0.22888493537902832,
-0.13942091166973114,
0.2948969900608063,
-1.5524754524230957,
-0.34323471784591675,
-0.1494474709033966,
-0.273692518472671... |
func (k Keeper) AppendJoinPoolAndStakeAsset(
ctx sdk.Context,
creator string,
PoolNo string,
AssetSerial string,
) uint64 {
// Create the JoinPoolAndStakeAsset
count := k.GetJoinPoolAndStakeAssetCount(ctx)
var JoinPoolAndStakeAsset = types.JoinPoolAndStakeAsset{
Creator: creator,
Id: count,
Po... | [
0.15554583072662354,
-0.40684741735458374,
0.5799919962882996,
-0.3036860227584839,
-0.5614383816719055,
0.33486324548721313,
-0.11951389908790588,
0.056938666850328445,
0.6618877053260803,
-0.8406407833099365,
-0.7930787801742554,
-0.30776336789131165,
0.03540795296430588,
-0.157276496291... |
func (k Keeper) SetJoinPoolAndStakeAsset(ctx sdk.Context, JoinPoolAndStakeAsset types.JoinPoolAndStakeAsset) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetKey))
b := k.cdc.MustMarshalBinaryBare(&JoinPoolAndStakeAsset)
store.Set(GetJoinPoolAndStakeAssetIDBytes(JoinPool... | [
0.36416399478912354,
-0.9374718070030212,
0.3036252558231354,
-0.37558412551879883,
-0.06045514717698097,
0.7676876187324524,
0.19361938536167145,
-0.0465509407222271,
0.24866034090518951,
0.08308178931474686,
-0.7517971992492676,
0.0300709567964077,
-0.5408802628517151,
-0.238182812929153... |
func (k Keeper) GetJoinPoolAndStakeAsset(ctx sdk.Context, id uint64) types.JoinPoolAndStakeAsset {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetKey))
var JoinPoolAndStakeAsset types.JoinPoolAndStakeAsset
k.cdc.MustUnmarshalBinaryBare(store.Get(GetJoinPoolAndStakeAssetI... | [
0.26701366901397705,
-0.9428312182426453,
0.3729747235774994,
-0.3221117854118347,
-0.6044120788574219,
0.4426622688770294,
-0.07461441308259964,
-0.3112033009529114,
0.6366892457008362,
-0.266737699508667,
-0.38070791959762573,
0.3553481101989746,
-0.8074073195457458,
-0.19049936532974243... |
func (k Keeper) HasJoinPoolAndStakeAsset(ctx sdk.Context, id uint64) bool {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetKey))
return store.Has(GetJoinPoolAndStakeAssetIDBytes(id))
} | [
0.36145010590553284,
-0.5370048880577087,
0.44865673780441284,
-0.323596715927124,
-0.03668863698840141,
-0.015186776407063007,
0.06374561041593552,
0.16540361940860748,
0.012409687042236328,
-0.11479675769805908,
-1.173672080039978,
-0.39782002568244934,
0.02131073735654354,
0.13231900334... |
func (k Keeper) GetJoinPoolAndStakeAssetOwner(ctx sdk.Context, id uint64) string {
return k.GetJoinPoolAndStakeAsset(ctx, id).Creator
} | [
0.35038885474205017,
-0.35634177923202515,
0.40546369552612305,
0.5881927609443665,
-0.4058687388896942,
0.13851094245910645,
0.6306180953979492,
-0.8599644899368286,
0.4793553948402405,
-0.3285752534866333,
-0.38657286763191223,
-0.4094335734844208,
-0.14214913547039032,
0.168975993990898... |
func (k Keeper) RemoveJoinPoolAndStakeAsset(ctx sdk.Context, id uint64) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetKey))
store.Delete(GetJoinPoolAndStakeAssetIDBytes(id))
} | [
0.09323369711637497,
-0.8387132287025452,
0.3840235471725464,
-0.04336317628622055,
-0.6115544438362122,
0.4649094045162201,
0.4318287670612335,
0.3468169569969177,
0.23457221686840057,
0.4517097473144531,
-0.7136304378509521,
-0.2821155786514282,
-0.7601804137229919,
-0.1562272608280182,
... |
func (k Keeper) GetAllJoinPoolAndStakeAsset(ctx sdk.Context) (list []types.JoinPoolAndStakeAsset) {
store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.JoinPoolAndStakeAssetKey))
iterator := sdk.KVStorePrefixIterator(store, []byte{})
defer iterator.Close()
for ; iterator.Valid(); iterator.Next... | [
0.4995343089103699,
-0.8425189256668091,
0.5217977166175842,
0.47918426990509033,
-0.5094306468963623,
0.8277308940887451,
-0.4313339591026306,
-0.043640829622745514,
0.2230500727891922,
-0.23330853879451752,
-0.5712159872055054,
0.3668590486049652,
-0.4431355595588684,
0.5310112833976746,... |
func GetJoinPoolAndStakeAssetIDBytes(id uint64) []byte {
bz := make([]byte, 8)
binary.BigEndian.PutUint64(bz, id)
return bz
} | [
0.30135712027549744,
-0.15697258710861206,
0.5029363036155701,
0.19960527122020721,
0.14739201962947845,
0.4329073429107666,
-0.07695263624191284,
-0.7011411190032959,
0.7398089170455933,
0.47628241777420044,
-0.7875953912734985,
0.2636622488498688,
-1.2471001148223877,
-0.4425764083862304... |
func GetJoinPoolAndStakeAssetIDFromBytes(bz []byte) uint64 {
return binary.BigEndian.Uint64(bz)
} | [
1.0726635456085205,
-1.2833994626998901,
0.36409792304039,
0.7597560882568359,
0.07090537995100021,
0.9372894167900085,
0.9241700172424316,
0.3227016031742096,
0.730404794216156,
0.20002536475658417,
-0.7038063406944275,
-0.05109582096338272,
-1.228468894958496,
-0.06845512241125107,
-0.... |
func (f *file) Size() int64 { return f.sz } | [
0.14014728367328644,
0.6379326581954956,
0.23689809441566467,
0.6100907921791077,
-0.2988511025905609,
0.2589147984981537,
1.3774042129516602,
0.6720852851867676,
-0.33201363682746887,
-0.8880742788314819,
-0.306169331073761,
-0.42458415031433105,
-0.36782434582710266,
0.452401727437973,
... |
func (f *file) SizeNow() int64 { return f.sz } | [
0.8488630652427673,
-0.15245164930820465,
0.5157245993614197,
0.7547010779380798,
-0.057408642023801804,
0.3848576247692108,
0.4503471553325653,
0.8626322746276855,
-1.3240880966186523,
-0.6964267492294312,
-1.3161932229995728,
-1.1808298826217651,
0.4431552588939667,
0.44982942938804626,
... |
func (f *file) Slice(off int64, l int) ([]byte, error) {
// return EOF if offset is larger than the file size
if off >= f.sz {
return nil, io.EOF
}
// shorten the length, if necessary
var err error
if off+int64(l) > f.sz {
l = int(f.sz - off)
err = io.EOF
}
// the slice falls entirely in the bof segment
... | [
0.0862063318490982,
-0.25771793723106384,
0.4451783001422882,
0.02255430445075035,
-0.41073933243751526,
-0.47019657492637634,
-0.3012221157550812,
0.17790450155735016,
-0.9170854687690735,
-0.393095463514328,
-0.060197751969099045,
0.16584070026874542,
-0.14438384771347046,
-0.21021756529... |
func (f *file) EofSlice(off int64, l int) ([]byte, error) {
// if the offset is larger than the file size, it is invalid
if off >= f.sz {
return nil, io.EOF
}
// shorten the length, if necessary
var err error
if off+int64(l) > f.sz {
l = int(f.sz - off)
err = io.EOF
}
// the slice falls entirely in the bo... | [
0.10804913938045502,
0.07237904518842697,
0.3887545168399811,
-0.3735699951648712,
-0.08326230943202972,
-0.6940819025039673,
-0.4754588305950165,
-0.19112169742584229,
-0.736667275428772,
-0.07225516438484192,
0.26419374346733093,
0.19917592406272888,
0.033917974680662155,
-0.032810527831... |
func (ec *EquipmentCreate) SetEQUIPMENTNAME(s string) *EquipmentCreate {
ec.mutation.SetEQUIPMENTNAME(s)
return ec
} | [
-1.098856806755066,
0.5629221200942993,
-0.0649457648396492,
1.1246436834335327,
-0.23189976811408997,
0.16463236510753632,
1.7045336961746216,
0.40018486976623535,
0.035204943269491196,
0.8296484351158142,
-0.8584780693054199,
-1.7406736612319946,
0.7660171389579773,
0.5346307158470154,
... |
func (ec *EquipmentCreate) SetEQUIPMENTAMOUNT(i int) *EquipmentCreate {
ec.mutation.SetEQUIPMENTAMOUNT(i)
return ec
} | [
-0.7274070978164673,
0.29012414813041687,
0.008315779268741608,
0.8323220610618591,
0.1282944679260254,
-0.011787540279328823,
1.9733047485351562,
0.11251552402973175,
-0.3793931007385254,
0.016404641792178154,
-1.5497196912765503,
-1.382942795753479,
0.7849991321563721,
0.3873191475868225... |
func (ec *EquipmentCreate) SetEQUIPMENTDETAIL(s string) *EquipmentCreate {
ec.mutation.SetEQUIPMENTDETAIL(s)
return ec
} | [
-0.2924194037914276,
0.5008007287979126,
-0.2776370942592621,
0.48641037940979004,
-0.40450629591941833,
0.41871723532676697,
0.7846193313598633,
0.07307571172714233,
0.07614161819219589,
0.8232440948486328,
-1.0431797504425049,
-1.101010799407959,
0.6804782748222351,
1.0070393085479736,
... |
func (ec *EquipmentCreate) SetEQUIPMENTDATE(t time.Time) *EquipmentCreate {
ec.mutation.SetEQUIPMENTDATE(t)
return ec
} | [
-0.07340844720602036,
0.4430970251560211,
0.07348164170980453,
0.7151533365249634,
0.0678764209151268,
0.5036451816558838,
1.0471770763397217,
0.06389303505420685,
-0.434774786233902,
0.7953881621360779,
-0.9750925302505493,
-1.3737996816635132,
0.7828332185745239,
1.280613899230957,
0.2... |
func (ec *EquipmentCreate) SetClassifierID(id int) *EquipmentCreate {
ec.mutation.SetClassifierID(id)
return ec
} | [
-1.7496064901351929,
-0.3850787281990051,
-0.0785636231303215,
0.6418874859809875,
0.26778289675712585,
0.9556757807731628,
0.8226368427276611,
0.6471126079559326,
0.017257703468203545,
0.4016503393650055,
-1.2237638235092163,
0.015939930453896523,
0.6923124194145203,
1.8346277475357056,
... |
func (ec *EquipmentCreate) SetNillableClassifierID(id *int) *EquipmentCreate {
if id != nil {
ec = ec.SetClassifierID(*id)
}
return ec
} | [
-1.414879322052002,
-0.21003584563732147,
0.14589807391166687,
0.01939525455236435,
0.15136189758777618,
0.6087583303451538,
0.3145315647125244,
0.2512010335922241,
-0.19779576361179352,
0.33081817626953125,
-0.8238778114318848,
-0.12036550790071487,
-0.026522796601057053,
1.24906969070434... |
func (ec *EquipmentCreate) SetClassifier(c *Classifier) *EquipmentCreate {
return ec.SetClassifierID(c.ID)
} | [
-1.0860073566436768,
0.13352744281291962,
0.09769972413778305,
0.6455725431442261,
0.8214430212974548,
1.0841575860977173,
0.861791729927063,
0.040633030235767365,
-0.5481196045875549,
-0.8272852301597595,
-1.0997066497802734,
0.23843304812908173,
0.7009737491607666,
1.109288215637207,
-... |
func (ec *EquipmentCreate) SetEmployeeID(id int) *EquipmentCreate {
ec.mutation.SetEmployeeID(id)
return ec
} | [
-1.08432137966156,
-0.08194536715745926,
0.032702695578336716,
0.7491678595542908,
0.018794763833284378,
1.177890419960022,
0.6237210631370544,
0.6016550064086914,
0.07756973803043365,
0.5100346207618713,
-1.14906644821167,
-0.4536265432834625,
-0.17788778245449066,
1.5792778730392456,
-... |
func (ec *EquipmentCreate) SetNillableEmployeeID(id *int) *EquipmentCreate {
if id != nil {
ec = ec.SetEmployeeID(*id)
}
return ec
} | [
-0.0658942237496376,
0.016559775918722153,
0.22274532914161682,
0.2526715397834778,
-0.4362940192222595,
0.8423051834106445,
0.3380964696407318,
0.10916020721197128,
-0.11027324944734573,
0.7044864892959595,
-0.4019951820373535,
0.03462637960910797,
-0.9778028726577759,
1.1174852848052979,... |
func (ec *EquipmentCreate) SetEmployee(e *Employee) *EquipmentCreate {
return ec.SetEmployeeID(e.ID)
} | [
-0.3690849244594574,
0.41254326701164246,
0.2782532870769501,
0.9124159216880798,
0.7457536458969116,
1.3906145095825195,
0.7285566329956055,
0.12402479350566864,
-0.8693886995315552,
-0.21667079627513885,
-0.9007942080497742,
-0.6107566356658936,
-0.01226618979126215,
0.8771372437477112,
... |
func (ec *EquipmentCreate) SetEquipmenttypeID(id int) *EquipmentCreate {
ec.mutation.SetEquipmenttypeID(id)
return ec
} | [
-1.0392504930496216,
-0.07578296214342117,
-0.24246859550476074,
0.6026071906089783,
-0.05129561573266983,
0.4070187509059906,
0.6994606852531433,
-0.3556058406829834,
0.04177802428603172,
1.436712622642517,
-1.1702274084091187,
-1.3055695295333862,
0.35096004605293274,
1.6253389120101929,... |
func (ec *EquipmentCreate) SetNillableEquipmenttypeID(id *int) *EquipmentCreate {
if id != nil {
ec = ec.SetEquipmenttypeID(*id)
}
return ec
} | [
-0.38503992557525635,
0.0028599028009921312,
-0.02562219277024269,
0.3678259253501892,
0.10630599409341812,
0.37019628286361694,
0.30551227927207947,
-1.176987886428833,
0.16859455406665802,
0.7821429371833801,
-0.6514132618904114,
-1.2284883260726929,
-0.2395900934934616,
1.24970638751983... |
func (ec *EquipmentCreate) SetEquipmenttype(e *Equipmenttype) *EquipmentCreate {
return ec.SetEquipmenttypeID(e.ID)
} | [
-0.39858171343803406,
0.5683237314224243,
0.1856338083744049,
0.698625922203064,
1.0487372875213623,
0.7197475433349609,
1.5980898141860962,
-0.3374098539352417,
0.05592808872461319,
0.7317277789115906,
-0.874760091304779,
-1.1292575597763062,
0.7786712050437927,
1.5179957151412964,
0.30... |
func (ec *EquipmentCreate) SetZoneID(id int) *EquipmentCreate {
ec.mutation.SetZoneID(id)
return ec
} | [
-0.7311950922012329,
-0.12438877671957016,
-0.1425277143716812,
1.3904963731765747,
0.1541307121515274,
1.105452060699463,
1.1330032348632812,
0.3202665150165558,
1.427117943763733,
0.5852308869361877,
-1.2250491380691528,
-0.18714770674705505,
0.10085572302341461,
0.8441337943077087,
-0... |
func (ec *EquipmentCreate) SetNillableZoneID(id *int) *EquipmentCreate {
if id != nil {
ec = ec.SetZoneID(*id)
}
return ec
} | [
0.04910875856876373,
-0.18537819385528564,
0.05707927420735359,
0.684173583984375,
-0.5437986850738525,
0.9087034463882446,
1.1591084003448486,
-0.12314562499523163,
1.3084050416946411,
0.9331281781196594,
-1.0929118394851685,
-0.26170772314071655,
-0.47284990549087524,
0.5831001400947571,... |
func (ec *EquipmentCreate) SetZone(z *Zone) *EquipmentCreate {
return ec.SetZoneID(z.ID)
} | [
-0.6331266164779663,
0.5212507247924805,
-0.035941969603300095,
1.5243713855743408,
0.7606601119041443,
0.5566543936729431,
1.447131633758545,
0.02616450935602188,
1.101056694984436,
-0.9972185492515564,
-1.093400001525879,
-0.1520134061574936,
-0.013199680484831333,
0.6860690116882324,
... |
func (ec *EquipmentCreate) AddEquipmentrentalIDs(ids ...int) *EquipmentCreate {
ec.mutation.AddEquipmentrentalIDs(ids...)
return ec
} | [
-1.038895606994629,
-0.2819903492927551,
0.3822682201862335,
0.06328330934047699,
-0.04772159084677696,
0.3829534947872162,
-0.8503012657165527,
0.3970116078853607,
-0.10735546052455902,
0.8335267305374146,
0.19309352338314056,
-0.8420350551605225,
-0.013314444571733475,
-0.663562774658203... |
func (ec *EquipmentCreate) AddEquipmentrental(e ...*Equipmentrental) *EquipmentCreate {
ids := make([]int, len(e))
for i := range e {
ids[i] = e[i].ID
}
return ec.AddEquipmentrentalIDs(ids...)
} | [
-1.195322036743164,
0.39009350538253784,
0.4455220699310303,
0.6064011454582214,
0.43005213141441345,
0.4893460273742676,
-0.0674227625131607,
-0.6138302087783813,
-0.48010334372520447,
0.8787879943847656,
0.10172569006681442,
-1.104979395866394,
-0.1354912966489792,
-0.10859385877847672,
... |
func (ec *EquipmentCreate) Mutation() *EquipmentMutation {
return ec.mutation
} | [
-0.8122800588607788,
-0.15759438276290894,
-0.021296575665473938,
0.8257233500480652,
0.7675110697746277,
0.9404477477073669,
1.117342472076416,
-0.7915288209915161,
0.7447293400764465,
-0.27203238010406494,
-0.006478252820670605,
-0.7144134640693665,
0.5758185386657715,
-0.257448822259902... |
func (ec *EquipmentCreate) Save(ctx context.Context) (*Equipment, error) {
if _, ok := ec.mutation.EQUIPMENTNAME(); !ok {
return nil, &ValidationError{Name: "EQUIPMENTNAME", err: errors.New("ent: missing required field \"EQUIPMENTNAME\"")}
}
if v, ok := ec.mutation.EQUIPMENTNAME(); ok {
if err := equipment.EQUIP... | [
-0.5751748085021973,
-0.25906097888946533,
0.7281815409660339,
0.40474438667297363,
0.29446107149124146,
0.4454922080039978,
0.9966545104980469,
-1.1448529958724976,
-0.6842032074928284,
0.13077232241630554,
-0.705804169178009,
-0.7987976670265198,
0.2966589331626892,
0.8230680227279663,
... |
func (ec *EquipmentCreate) SaveX(ctx context.Context) *Equipment {
v, err := ec.Save(ctx)
if err != nil {
panic(err)
}
return v
} | [
-0.46516647934913635,
0.7178406119346619,
0.3105631172657013,
1.1177842617034912,
-0.13460266590118408,
1.547919511795044,
-0.5960163474082947,
-0.5375674366950989,
0.948901891708374,
0.13025133311748505,
-1.1616785526275635,
-0.47276854515075684,
0.005208127666264772,
-0.26801687479019165... |
func New(config log.Config, pctx core.PeerContext) (*Logger, error) {
hostname, err := os.Hostname()
if err != nil {
return nil, fmt.Errorf("hostname: %s", err)
}
logger, err := log.New(config, map[string]interface{}{
"hostname": hostname,
"zone": pctx.Zone,
"cluster": pctx.Cluster,
"peer_id": pctx... | [
0.1945824772119522,
-0.4809565246105194,
0.43550610542297363,
-0.41846901178359985,
-0.7724009156227112,
0.4683193862438202,
-0.7142109274864197,
0.2359306514263153,
-0.8564718961715698,
-0.010764308273792267,
0.08829701691865921,
-0.12121798098087311,
-0.22282887995243073,
0.8644571900367... |
func NewNopLogger() *Logger {
return &Logger{zap.NewNop()}
} | [
-0.15085479617118835,
-0.14979544281959534,
0.3269596993923187,
-0.7907454967498779,
-2.0703020095825195,
-0.5581679344177246,
-0.5648741722106934,
0.09541013836860657,
0.7834898233413696,
-1.3801277875900269,
-1.0244334936141968,
-0.5352285504341125,
-0.6271228194236755,
0.556383848190307... |
func (l *Logger) OutgoingConnectionAccept(
d core.Digest,
infoHash core.InfoHash,
remotePeerID core.PeerID) {
l.zap.Debug(
"Outgoing connection accept",
zap.String("name", d.Hex()),
zap.String("info_hash", infoHash.String()),
zap.String("remote_peer_id", remotePeerID.String()))
} | [
-0.1489231437444687,
-0.9167852401733398,
0.6526749134063721,
-1.663877248764038,
-1.4938260316848755,
0.46899983286857605,
-0.3916335105895996,
0.7939073443412781,
-0.9882348775863647,
1.1029582023620605,
0.36818018555641174,
0.7555999755859375,
-0.3385060131549835,
0.5205239653587341,
... |
func (l *Logger) OutgoingConnectionReject(d core.Digest,
infoHash core.InfoHash,
remotePeerID core.PeerID,
err error) {
l.zap.Debug(
"Outgoing connection reject",
zap.String("name", d.Hex()),
zap.String("info_hash", infoHash.String()),
zap.String("remote_peer_id", remotePeerID.String()),
zap.Error(err))
... | [
-0.9756424427032471,
0.09877440333366394,
0.6323298811912537,
-1.183436632156372,
-1.531952977180481,
0.6686160564422607,
-1.2500861883163452,
0.5260190367698669,
-0.9939839839935303,
0.3674076199531555,
0.558017373085022,
0.19465433061122894,
-1.0220317840576172,
-0.27303338050842285,
1... |
func (l *Logger) IncomingConnectionAccept(
d core.Digest,
infoHash core.InfoHash,
remotePeerID core.PeerID) {
l.zap.Debug(
"Incoming connection accept",
zap.String("name", d.Hex()),
zap.String("info_hash", infoHash.String()),
zap.String("remote_peer_id", remotePeerID.String()))
} | [
0.12333928793668747,
-1.332190752029419,
0.6268739700317383,
-1.5966941118240356,
-1.0044399499893188,
0.549366295337677,
-0.6316359639167786,
0.5122870206832886,
-1.014559268951416,
1.2667185068130493,
0.30626460909843445,
0.666492223739624,
-0.38726624846458435,
0.5157212615013123,
1.5... |
func (l *Logger) IncomingConnectionReject(
d core.Digest,
infoHash core.InfoHash,
remotePeerID core.PeerID,
err error) {
l.zap.Debug(
"Incoming connection reject",
zap.String("name", d.Hex()),
zap.String("info_hash", infoHash.String()),
zap.String("remote_peer_id", remotePeerID.String()),
zap.Error(err)... | [
-0.5190252065658569,
-0.371981680393219,
0.49958932399749756,
-1.335098385810852,
-0.9677668809890747,
0.5303674340248108,
-1.524741768836975,
0.11113014072179794,
-1.0778887271881104,
0.5537840127944946,
0.5603430867195129,
0.2761312425136566,
-1.2558367252349854,
-0.13035467267036438,
... |
func (l *Logger) SeedTimeout(d core.Digest, infoHash core.InfoHash) {
l.zap.Debug(
"Seed timeout",
zap.String("name", d.Hex()),
zap.String("info_hash", infoHash.String()))
} | [
1.1074023246765137,
-0.22675006091594696,
0.4809284806251526,
-1.0308879613876343,
-0.36012110114097595,
-0.07649152725934982,
0.0492691770195961,
0.45687586069107056,
0.11359619349241257,
0.8858529329299927,
-0.30693528056144714,
0.3558218479156494,
-0.05774063989520073,
0.429488182067871... |
func (l *Logger) LeechTimeout(d core.Digest, infoHash core.InfoHash) {
l.zap.Debug(
"Leech timeout",
zap.String("name", d.Hex()),
zap.String("info_hash", infoHash.String()))
} | [
1.029549479484558,
-0.7980897426605225,
0.38861218094825745,
-1.7058285474777222,
-0.09714587777853012,
0.7317177057266235,
-0.632969319820404,
0.6350992321968079,
-0.1684851199388504,
0.7226329445838928,
-0.7009426951408386,
0.6015965342521667,
-0.020813865587115288,
0.02972046472132206,
... |
func (l *Logger) DownloadSuccess(namespace string, d core.Digest, size int64, downloadTime time.Duration) {
l.zap.Info(
"Download success",
zap.String("namespace", namespace),
zap.String("name", d.Hex()),
zap.Int64("size", size),
zap.Duration("download_time", downloadTime))
} | [
0.8473271727561951,
-0.5579464435577393,
0.5722818970680237,
-0.6718809604644775,
-0.6278999447822571,
-0.2670069932937622,
-0.6721426248550415,
-0.07271378487348557,
0.6615243554115295,
0.4452567398548126,
-0.8611670136451721,
0.4125811755657196,
0.7840223908424377,
0.08526646345853806,
... |
func (l *Logger) DownloadFailure(namespace string, d core.Digest, size int64, err error) {
l.zap.Error(
"Download failure",
zap.String("namespace", namespace),
zap.String("name", d.Hex()),
zap.Int64("size", size),
zap.Error(err))
} | [
0.35802942514419556,
-0.7123641967773438,
0.4902319312095642,
-0.710976243019104,
-0.44595059752464294,
-0.5965568423271179,
-0.50409334897995,
-0.37010711431503296,
0.9734451174736023,
-0.22840793430805206,
-0.35070744156837463,
0.16896244883537292,
-0.2993403375148773,
0.3955789804458618... |
func (l *Logger) SeederSummaries(
d core.Digest,
infoHash core.InfoHash,
summaries SeederSummaries) error {
l.zap.Debug(
"Seeder summaries",
zap.String("name", d.Hex()),
zap.String("info_hash", infoHash.String()),
zap.Array("seeder_summaries", summaries))
return nil
} | [
-0.1143026128411293,
0.5430751442909241,
0.43470868468284607,
-0.29209959506988525,
-0.24735389649868011,
0.11327233910560608,
0.25770819187164307,
-0.4292936623096466,
-0.19378747045993805,
0.47651147842407227,
0.19940394163131714,
-0.13594581186771393,
-0.21251749992370605,
0.74875628948... |
func (l *Logger) LeecherSummaries(
d core.Digest,
infoHash core.InfoHash,
summaries LeecherSummaries) error {
l.zap.Debug(
"Leecher summaries",
zap.String("name", d.Hex()),
zap.String("info_hash", infoHash.String()),
zap.Array("leecher_summaries", summaries))
return nil
} | [
0.30030763149261475,
-0.21826648712158203,
0.4355885982513428,
-0.8980216383934021,
-0.48194411396980286,
0.978362500667572,
-0.5558016300201416,
0.15517212450504303,
0.1653328537940979,
-0.13182364404201508,
-0.613497257232666,
0.4199492931365967,
0.0641511082649231,
0.5373194813728333,
... |
func (l *Logger) Sync() {
l.zap.Sync()
} | [
0.26424938440322876,
-1.0618371963500977,
0.0859832912683487,
0.10848888009786606,
-0.38225120306015015,
0.266621857881546,
0.07577039301395416,
-1.408209204673767,
-0.0865665078163147,
0.5731103420257568,
-0.17650309205055237,
1.32548987865448,
0.3358750641345978,
0.9167155623435974,
0.... |
func (s SeederSummary) MarshalLogObject(enc zapcore.ObjectEncoder) error {
enc.AddString("peer_id", s.PeerID.String())
enc.AddInt("requests_sent", s.RequestsSent)
enc.AddInt("good_pieces_received", s.GoodPiecesReceived)
enc.AddInt("duplicate_pieces_received", s.DuplicatePiecesReceived)
return nil
} | [
0.010495427064597607,
0.21469344198703766,
0.6568511724472046,
-0.7287846207618713,
-0.26913607120513916,
0.44732460379600525,
0.08527822047472,
-0.7923541069030762,
-0.2285628467798233,
0.3836604356765747,
-0.4069468080997467,
0.33565160632133484,
0.41909733414649963,
-0.1743493229150772,... |
func (ss SeederSummaries) MarshalLogArray(enc zapcore.ArrayEncoder) error {
for _, summary := range ss {
enc.AppendObject(summary)
}
return nil
} | [
-0.24406999349594116,
0.4393830895423889,
0.4854605197906494,
0.21931220591068268,
0.995053231716156,
0.5708062052726746,
-0.23672735691070557,
-0.17425288259983063,
-0.4658946394920349,
0.7217815518379211,
0.6271560788154602,
0.7666510343551636,
0.0843392014503479,
1.3407127857208252,
-... |
func (s LeecherSummary) MarshalLogObject(enc zapcore.ObjectEncoder) error {
enc.AddString("peer_id", s.PeerID.String())
enc.AddInt("requests_received", s.RequestsReceived)
enc.AddInt("pieces_sent", s.PiecesSent)
return nil
} | [
0.24787020683288574,
-0.09707658737897873,
0.6367528438568115,
-1.0893619060516357,
-0.3621217608451843,
0.75534987449646,
-0.5820999145507812,
-0.011681696400046349,
-0.03777797892689705,
-0.08933936059474945,
-0.6911946535110474,
0.938610851764679,
0.680353045463562,
-0.20635578036308289... |
func (ls LeecherSummaries) MarshalLogArray(enc zapcore.ArrayEncoder) error {
for _, summary := range ls {
enc.AppendObject(summary)
}
return nil
} | [
-0.2931584417819977,
-0.13949058949947357,
0.4621308743953705,
-0.08100427687168121,
0.8954933285713196,
0.8259505033493042,
-0.8045806884765625,
0.43784964084625244,
-0.083965003490448,
0.3831472098827362,
0.35385286808013916,
1.139102578163147,
0.23909784853458405,
1.388925313949585,
-... |
func (a *AdminAPI) Brokers(ctx context.Context) ([]Broker, error) {
var bs []Broker
defer func() {
sort.Slice(bs, func(i, j int) bool { return bs[i].NodeID < bs[j].NodeID }) //nolint:revive // return inside this deferred function is for the sort's less function
}()
return bs, a.sendAny(ctx, http.MethodGet, broker... | [
-0.3192613124847412,
-0.23795464634895325,
0.4787752628326416,
0.7735190391540527,
0.14304722845554352,
-0.07442902773618698,
-0.5471887588500977,
-1.404836893081665,
0.08118346333503723,
0.06361039727926254,
0.06681040674448013,
1.5984549522399902,
-1.3012118339538574,
0.8639057278633118,... |
func (a *AdminAPI) Broker(ctx context.Context, node int) (Broker, error) {
var b Broker
err := a.sendAny(
ctx,
http.MethodGet,
fmt.Sprintf(brokerEndpoint, node), nil, &b)
return b, err
} | [
-1.3365756273269653,
1.1129463911056519,
0.32324111461639404,
0.17767027020454407,
0.1263706386089325,
-0.12948043644428253,
-0.8361157178878784,
-0.3418159484863281,
0.25151464343070984,
-0.7796712517738342,
-0.006324418820440769,
1.5502218008041382,
-1.1022642850875854,
0.150115862488746... |
func (a *AdminAPI) DecommissionBroker(ctx context.Context, node int) error {
return a.sendToLeader(
ctx,
http.MethodPut,
fmt.Sprintf("%s/%d/decommission", brokersEndpoint, node),
nil,
nil,
)
} | [
-0.2506101429462433,
0.44308680295944214,
0.4536610245704651,
0.6534010171890259,
0.07585638016462326,
0.1911577731370926,
0.3791120946407318,
0.44554436206817627,
-0.2023516446352005,
1.40846586227417,
-0.4575943350791931,
0.4109054505825043,
-1.0168198347091675,
0.7732769846916199,
0.6... |
func (a *AdminAPI) DecommissionBrokerStatus(ctx context.Context, node int) (DecommissionStatusResponse, error) {
var dsr DecommissionStatusResponse
err := a.sendToLeader(
ctx,
http.MethodGet,
fmt.Sprintf("%s/%d/decommission", brokersEndpoint, node),
nil,
&dsr,
)
return dsr, err
} | [
-0.13292169570922852,
-0.2868412733078003,
0.4678631126880646,
-0.5158897042274475,
-0.1770821511745453,
-0.19602558016777039,
-0.3246528208255768,
0.44747674465179443,
0.12533828616142273,
1.6019026041030884,
-0.639677882194519,
0.5859590172767639,
-0.8400852084159851,
0.7441611886024475,... |
func (a *AdminAPI) RecommissionBroker(ctx context.Context, node int) error {
return a.sendToLeader(
ctx,
http.MethodPut,
fmt.Sprintf("%s/%d/recommission", brokersEndpoint, node),
nil,
nil,
)
} | [
-0.7070470452308655,
0.3213063180446625,
0.42897355556488037,
0.7224994897842407,
-0.1279231756925583,
-0.474874883890152,
0.5918084979057312,
0.6702625751495361,
-0.586234450340271,
1.5896375179290771,
-0.13029013574123383,
1.4922384023666382,
-0.6480298638343811,
0.7013645768165588,
1.... |
func (a *AdminAPI) EnableMaintenanceMode(ctx context.Context, nodeID int) error {
return a.sendAny(
ctx,
http.MethodPut,
fmt.Sprintf("%s/%d/maintenance", brokersEndpoint, nodeID),
nil,
nil,
)
} | [
-0.23855769634246826,
-0.21403372287750244,
0.6304150819778442,
-0.8646683692932129,
0.616374135017395,
0.6186717748641968,
-0.02487524040043354,
0.3496769666671753,
0.07240641117095947,
0.1798689067363739,
-0.26038768887519836,
0.5299887657165527,
-0.807786226272583,
0.7228714823722839,
... |
func (a *AdminAPI) DisableMaintenanceMode(ctx context.Context, nodeID int, useLeaderNode bool) error {
if useLeaderNode {
return a.sendToLeader(
ctx,
http.MethodDelete,
fmt.Sprintf("%s/%d/maintenance", brokersEndpoint, nodeID),
nil,
nil,
)
} else {
return a.sendAny(
ctx,
http.MethodDelete,
... | [
-0.39650192856788635,
-0.24533279240131378,
0.6957328915596008,
-0.40060994029045105,
-0.04410506412386894,
0.41787099838256836,
0.23673972487449646,
0.4762355089187622,
0.007353590335696936,
0.5962218642234802,
0.36069223284721375,
-0.0032069028820842505,
-1.5969504117965698,
0.3577589690... |
func (TargetType) EnumDescriptor() ([]byte, []int) {
return file_google_devtools_resultstore_v2_target_proto_rawDescGZIP(), []int{0}
} | [
-1.1325137615203857,
0.23812800645828247,
0.5067185759544373,
-0.42187729477882385,
0.33349883556365967,
-0.3615986108779907,
0.6518478393554688,
-0.09629844129085541,
0.10517556965351105,
0.8040947318077087,
0.019008684903383255,
0.5241876840591431,
0.4017540514469147,
0.7170729637145996,... |
func (TestSize) EnumDescriptor() ([]byte, []int) {
return file_google_devtools_resultstore_v2_target_proto_rawDescGZIP(), []int{1}
} | [
-0.703476071357727,
0.5192309617996216,
0.5185612440109253,
-0.5807087421417236,
0.07721617072820663,
-0.29074588418006897,
1.3583441972732544,
-0.400953084230423,
0.9010660648345947,
-0.2704751491546631,
-0.14391402900218964,
0.13135582208633423,
-0.5009608864784241,
0.7157843112945557,
... |
func (*Target) Descriptor() ([]byte, []int) {
return file_google_devtools_resultstore_v2_target_proto_rawDescGZIP(), []int{0}
} | [
-1.3095545768737793,
0.48027026653289795,
0.3142067790031433,
-0.16443169116973877,
-0.04977024719119072,
-0.08916843682527542,
0.33094078302383423,
0.2754289209842682,
-0.5320363640785217,
-0.8367109894752502,
-0.21720340847969055,
0.4121035933494568,
0.5166594386100769,
-0.18120494484901... |
func (*TargetAttributes) Descriptor() ([]byte, []int) {
return file_google_devtools_resultstore_v2_target_proto_rawDescGZIP(), []int{1}
} | [
-1.4033138751983643,
0.13206715881824493,
0.009968806058168411,
-0.17322833836078644,
-0.585604190826416,
0.322835236787796,
0.4025431275367737,
0.3170677721500397,
-0.7721624374389648,
0.27494847774505615,
-0.6387956142425537,
0.48527461290359497,
0.35905349254608154,
-0.9722132086753845,... |
func (*TestAttributes) Descriptor() ([]byte, []int) {
return file_google_devtools_resultstore_v2_target_proto_rawDescGZIP(), []int{2}
} | [
-0.8121238946914673,
0.0207730270922184,
-0.07008673250675201,
-0.19609540700912476,
-0.17226308584213257,
-0.09177554398775101,
0.9140118360519409,
-0.06425745785236359,
-0.34685128927230835,
-0.28196990489959717,
-0.290833979845047,
0.30748966336250305,
-0.7418361306190491,
-0.3874186277... |
func (*Target_Id) Descriptor() ([]byte, []int) {
return file_google_devtools_resultstore_v2_target_proto_rawDescGZIP(), []int{0, 0}
} | [
-0.3541739881038666,
-0.36342108249664307,
0.2089889794588089,
-0.12722322344779968,
0.4468214213848114,
0.14228087663650513,
-0.02173599600791931,
0.6708597540855408,
-0.23769040405750275,
0.08098068088293076,
0.2459821254014969,
1.1072968244552612,
0.6112779974937439,
0.5628997087478638,... |
func (SQL) Fmt(context.Context) error {
wd, err := os.Getwd()
if err != nil {
return fmt.Errorf("failed to get working directory: %w", err)
}
err = sh.Run("docker", "run",
"--rm",
"-e", "SQLFMT_LINE_LENGTH="+lineLength,
"-v", fmt.Sprintf("%s:/src", wd),
sqlfmtImage)
if err != nil {
fmt.Println("returni... | [
-0.12586763501167297,
-0.0027763948310166597,
0.5962526202201843,
-0.6735546588897705,
0.08238787949085236,
-0.4527644217014313,
0.6122332215309143,
-0.10856224596500397,
0.286395400762558,
-0.3016076683998108,
0.6420430541038513,
0.466933012008667,
0.23995350301265717,
2.118696928024292,
... |
func NewRerouteExplanationBuilder() *RerouteExplanationBuilder {
r := RerouteExplanationBuilder{
&RerouteExplanation{},
}
return &r
} | [
-0.11847355216741562,
-0.21865248680114746,
0.32835152745246887,
0.16461366415023804,
-0.5795754194259644,
-0.049199070781469345,
-0.10652811825275421,
1.2069027423858643,
0.10622827708721161,
-0.17706814408302307,
-1.014267086982727,
-0.1531599760055542,
-1.1271194219589233,
-0.3754089176... |
func (rb *RerouteExplanationBuilder) Build() RerouteExplanation {
return *rb.v
} | [
-0.12489152699708939,
-0.5120925903320312,
0.3042457103729248,
-0.29383811354637146,
-0.1582900583744049,
-0.14413103461265564,
0.5799921751022339,
1.2967381477355957,
0.3097601532936096,
-0.2980092465877533,
-0.4679889678955078,
0.30810579657554626,
-1.0837812423706055,
-0.493596017360687... |
func (o *CreateLocationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewCreateLocationOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
... | [
-0.4236273467540741,
-0.9527730345726013,
0.8445907831192017,
0.2732478678226471,
0.10885138064622879,
-0.7524473667144775,
0.905316948890686,
-0.3635953664779663,
0.5273115634918213,
0.09643708914518356,
0.350462943315506,
-1.0261677503585815,
-0.8902169466018677,
0.07656073570251465,
0... |
func NewCreateLocationOK() *CreateLocationOK {
return &CreateLocationOK{}
} | [
-0.560181200504303,
-0.9201255440711975,
0.012573610991239548,
0.9187837243080139,
-0.5723331570625305,
0.3692533075809479,
1.850696325302124,
0.47795140743255615,
-0.23814137279987335,
0.44934511184692383,
-0.4952493906021118,
-1.5270594358444214,
0.5450630187988281,
0.38862767815589905,
... |
func NewCreateLocationBadRequest() *CreateLocationBadRequest {
return &CreateLocationBadRequest{}
} | [
-0.8250179290771484,
-0.7317245006561279,
0.1772949993610382,
0.542978048324585,
0.00962450634688139,
-0.097218818962574,
0.22926396131515503,
0.33178624510765076,
-0.4162004292011261,
-0.3563605546951294,
0.14303117990493774,
-0.5921640396118164,
-0.41530898213386536,
1.0792211294174194,
... |
func NewCreateLocationUnauthorized() *CreateLocationUnauthorized {
return &CreateLocationUnauthorized{}
} | [
-1.0596623420715332,
-0.7313247323036194,
0.27720770239830017,
0.23104330897331238,
-0.20774373412132263,
-0.340536892414093,
0.9113250970840454,
0.8951247930526733,
-0.07518962025642395,
-0.832028329372406,
-0.11923223733901978,
0.22298339009284973,
-0.06767014414072037,
0.102057233452796... |
func NewCreateLocationForbidden() *CreateLocationForbidden {
return &CreateLocationForbidden{}
} | [
-0.014573277905583382,
0.004558740183711052,
0.15643790364265442,
0.6255267858505249,
0.09348061680793762,
0.1736362874507904,
1.1856809854507446,
-0.46338754892349243,
-0.20440205931663513,
-0.5041989088058472,
-0.11333976686000824,
-0.22241023182868958,
-0.0734323039650917,
0.12432050704... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.