text
stringlengths
11
6.3k
embedding
listlengths
768
768
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.3719695508480072, -1.1052989959716797, 0.5630441904067993, -0.9225736260414124, -1.356386423110962, 0.003355572931468487, 0.6777525544166565, -0.8006678819656372, -1.274828553199768, 0.311536967754364, 0.26360753178596497, 0.26388123631477356, 0.06357761472463608, -0.39880770444869995, ...
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.34371325373649597, -0.3622533082962036, 0.6770349144935608, -1.2592034339904785, -0.00613967701792717, -0.044532135128974915, -0.00726317847147584, -0.43950432538986206, -0.2061910331249237, -0.2510174810886383, 0.17843623459339142, 0.1356850564479828, -0.2362709492444992, -0.56985044479...
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.4226192533969879, 0.3001989424228668, 0.5813396573066711, -0.20641714334487915, -0.23828980326652527, -0.24414613842964172, 0.5739712119102478, -0.029911452904343605, 0.061882976442575455, -0.43923527002334595, 0.5113739371299744, 0.3275964856147766, -0.612514853477478, 0.035165321081876...
func Marshal(cookie *http.Cookie) (string, error) { tokens := make([]string, 7) domain := cookie.Domain includeSubdomains := strings.HasPrefix(cookie.Domain, ".") if cookie.HttpOnly { domain = httpOnlyPrefix + domain } tokens[0] = domain tokens[1] = strings.ToUpper(strconv.FormatBool(includeSubdomains)) path...
[ -0.10249827802181244, -0.2154330164194107, 0.5111774206161499, -0.5406222939491272, -1.2267906665802002, 0.08795931190252304, -0.541904866695404, -0.18207073211669922, -0.2115599662065506, 0.05759170651435852, 0.25743862986564636, 1.200208067893982, 0.9454905986785889, -0.0446644201874733,...
func Unmarshal(line string) (*http.Cookie, error) { if line == "" || (strings.HasPrefix(line, "#") && !strings.HasPrefix(line, httpOnlyPrefix)) { return nil, nil } tokens := strings.SplitN(line, "\t", 7) if len(tokens) < 7 { return nil, fmt.Errorf("not enough tokens %d", len(tokens)) } domain := tokens[0] in...
[ 0.33721011877059937, -0.05508427694439888, 0.861325740814209, -0.23079359531402588, -0.9406796097755432, -0.2683723568916321, 0.2242538034915924, 0.864020824432373, -0.37270763516426086, 0.18837697803974152, -0.28126102685928345, 0.8428696990013123, 0.1507818102836609, -0.38128378987312317...
func DoLocalHashAndJoinWith(leftReader, rightReader io.Reader, writer io.Writer, indexes []int) error { hashmap := make(map[string][]interface{}) err := util.ProcessMessage(leftReader, func(input []byte) error { if keys, vals, err := genKeyBytesAndValues(input, indexes); err != nil { return fmt.Errorf("%v: %+v",...
[ 0.5713896155357361, -0.2348836362361908, 1.106961965560913, -0.08573421835899353, -0.22784873843193054, -0.32500046491622925, -0.15663392841815948, 0.055914416909217834, -0.618095338344574, 0.09743112325668335, 0.5136191248893738, 0.17881472408771515, -0.2685399651527405, 0.648197710514068...
func NewParser(tokens []lexer.Token) parser { p := parser{} p.tokens = tokens p.current = 0 return p }
[ -0.2435547411441803, -1.730158805847168, 0.07782658189535141, -0.2530499994754791, -0.4905373752117157, 0.14271722733974457, -0.942474365234375, 0.20518708229064941, 0.0928889736533165, -0.4234949052333832, -0.039493829011917114, 0.12021797150373459, -0.8265509009361267, 0.7952186465263367...
func (p *parser) Parse() ([]ast.Definition, ast.Term, bool) { // Create any explicit or implicit definitions. for !p.isAtEnd() { switch p.peek().TType { // Explicit let case lexer.LET: p.advance() p.definitions = append(p.definitions, p.definition()) p.consume(lexer.NEWLINE, "Expect newline after defi...
[ -0.24604861438274384, -0.36980676651000977, 0.7059970498085022, 0.25791987776756287, 0.41251662373542786, -0.6832953095436096, -0.780992865562439, 0.1513320803642273, -1.0548748970031738, 0.8341140151023865, -0.5084412693977356, -0.2907615602016449, 0.23159392178058624, 1.1656675338745117,...
func (p *parser) peek() lexer.Token { return p.tokens[p.current] }
[ 0.16230696439743042, -0.8046555519104004, 0.5433263182640076, -0.6541518568992615, -0.26750314235687256, 0.2556906044483185, -0.5197044014930725, -0.5115213394165039, -0.9285196661949158, -0.39414504170417786, 0.9975574612617493, 1.3311501741409302, 0.14513902366161346, -0.3612526953220367...
func (p *parser) isAtEnd() bool { return p.peek().TType == lexer.EOF }
[ 0.17167659103870392, -0.7186130285263062, 0.6310782432556152, -0.30592188239097595, -0.20219720900058746, 0.1611645221710205, -1.422013759613037, 0.14440059661865234, -0.44115063548088074, 0.9854264855384827, -0.09595401585102081, 0.4352240264415741, -0.33784735202789307, 1.064552783966064...
func (p *parser) previous() lexer.Token { return p.tokens[p.current-1] }
[ -0.02792760357260704, -0.41770756244659424, 0.6364376544952393, -0.20514534413814545, -0.1326838582754135, -0.0769507884979248, 0.226498082280159, 0.17069846391677856, -0.6682985424995422, -1.0622191429138184, 0.31433743238449097, 0.20017769932746887, -0.5455182194709778, -0.47039255499839...
func (p *parser) advance() lexer.Token { if !p.isAtEnd() { p.current++ return p.previous() } else { return p.tokens[p.current] } }
[ -0.41653624176979065, -0.4512072205543518, 0.844314694404602, -0.460612028837204, 0.17115353047847748, 0.35390645265579224, -0.5788361430168152, 0.3722383677959442, -1.0249232053756714, -1.123630166053772, 0.7069687843322754, 0.3889940083026886, -0.8462062478065491, 0.39172887802124023, ...
func (p *parser) check(tType lexer.TokenType) bool { if !p.isAtEnd() { return p.peek().TType == tType } else { return false } }
[ -0.7973605394363403, -0.18182721734046936, 0.5205531120300293, 0.03847203776240349, -0.0425262376666069, 0.6312648057937622, -1.520073413848877, -0.5997226238250732, -1.0828397274017334, 1.2353429794311523, 0.15363381803035736, 0.10622654855251312, -0.4894426465034485, 1.2204049825668335, ...
func (p *parser) consume(tType lexer.TokenType, message string) { if p.check(tType) { p.advance() } else { p.parseError(p.peek(), message) } }
[ 0.5476695895195007, 0.08726469427347183, 0.6327017545700073, -0.35400670766830444, -0.12978196144104004, 0.3438688814640045, -0.768467366695404, -0.5878614783287048, -0.9503775238990784, 0.8980008959770203, 0.9742844700813293, 0.6489301919937134, -0.4068545699119568, 1.1237051486968994, ...
func (p *parser) parseError(token lexer.Token, message string) { p.errFlag = true fmt.Printf("[Line: %v] %s\n", token.Line, fmt.Sprintf("%v -- %s", p.peek().Lexeme, message)) }
[ 1.0979909896850586, -0.4350597858428955, 0.658858060836792, -0.6922974586486816, -0.12306927144527435, 0.6800943613052368, -0.8378128409385681, 0.6797297596931458, -1.4216384887695312, -0.24585093557834625, 0.41593030095100403, 1.3940671682357788, -0.18758182227611542, 0.8744472861289978, ...
func ValidateRequest() gin.HandlerFunc { cityRexp, _ := regexp.Compile(`^[a-zA-Z\s]+$`) countryRexp, _ := regexp.Compile(`^[a-z]{2}$`) return func(c *gin.Context) { errors := make([]string, 0) for _, param := range []string{"city", "country"} { value, ok := c.GetQuery(param) if !ok { errors = append(...
[ -0.7438329458236694, -0.7956333160400391, 0.8399083614349365, 0.012909924611449242, 0.11328709870576859, 0.9603439569473267, -0.16949968039989471, -0.40010571479797363, -0.768339991569519, 0.29495659470558167, 1.2224839925765991, 0.2577408254146576, -0.0772114023566246, 0.5041511654853821,...
func attack(rate uint64, duration time.Duration, targetsf, ordering, output string, redirects int, timeout time.Duration, hdr http.Header) error { if rate == 0 { return fmt.Errorf(errRatePrefix + "can't be zero") } if duration == 0 { return fmt.Errorf(errDurationPrefix + "can't be zero") } in, err := file(...
[ -0.6945379376411438, -0.4312455952167511, 0.7340253591537476, 0.749032735824585, 0.7510340213775635, -0.6948866844177246, 0.18448133766651154, -0.33438417315483093, -0.7384628057479858, 0.747943639755249, 0.526891827583313, -0.023112989962100983, -0.16815006732940674, 0.15983156859874725, ...
func MiddleWare(r *http.Request, body *models.UpdateSwitch) middleware.Responder { var client switch_operations.ISwitch if *body.Endpoint.SwitchType == "cisco" || *body.Endpoint.SwitchType == "nexus" { client = &cisco.Switch{ Runner: &nexus.Runner{ IP: *body.Endpoint.Ipaddress, Username: *body.End...
[ -0.26251471042633057, -0.08897942304611206, 0.6482924818992615, 0.8072533011436462, -0.2802635431289673, 0.24706339836120605, -0.4084385633468628, -0.12837812304496765, 0.31586867570877075, -0.144094318151474, 0.7161675095558167, -0.36269083619117737, -0.6379063129425049, 0.089555762708187...
func (c *UpdateSwitch) WriteResponse(rw http.ResponseWriter, rp runtime.Producer) { switch c.Request.Method { case http.MethodPost: c.postUpdateSwitch(rw, rp) default: c.notSupported(rw, rp) } }
[ -1.0843783617019653, -0.2775407135486603, 0.39249420166015625, 1.0651646852493286, 0.9240055680274963, 0.1828184425830841, 0.34520426392555237, -0.08875743299722672, 0.5049940943717957, 0.5520822405815125, 0.10161248594522476, -1.0645174980163574, -0.6774590015411377, 0.4828983545303345, ...
func (im *inMemory) AddMetric(key string, t time.Time) { if targetMetric, ok := im.metrics[key]; ok { // validate time duration := t.Sub(targetMetric.UpdateTime).Hours() if duration > 1 { targetMetric.Count = 1 } else { targetMetric.Count++ } } else { im.metrics[key] = &metric.Metric{ Count: ...
[ -0.8203513026237488, 0.7606028318405151, 0.542119562625885, 0.27250224351882935, -0.05336397886276245, 0.6076468825340271, -0.5620999932289124, -0.018100174143910408, -0.8282727003097534, 0.6647970676422119, 0.8673553466796875, -0.1391754448413849, -0.49962207674980164, -0.2655036449432373...
func (im *inMemory) GetMetricCount(key string, t time.Time) (int, error) { if targetMetric, ok := im.metrics[key]; ok { // check if time ended duration := t.Sub(targetMetric.UpdateTime).Hours() if duration > 1 { targetMetric.Count = 0 } return targetMetric.Count, nil } return 0, fmt.Errorf("Metic not ex...
[ -0.29814887046813965, 0.3055865466594696, 0.8609424829483032, 0.1937078982591629, 0.10087504237890244, 0.31387436389923096, 0.12429135292768478, -0.05140914395451546, -1.5470978021621704, 1.2726622819900513, 0.43722546100616455, 0.5941331386566162, -0.4576430916786194, -0.04559805616736412...
func GetMacro(smiModulePtr *types.SmiModule, macro string) *types.SmiMacro { if macro == "" { return nil } var modulePtr *internal.Module if smiModulePtr != nil { modulePtr = (*internal.Module)(unsafe.Pointer(smiModulePtr)) macroPtr := modulePtr.Macros.GetName(macro) if macroPtr == nil { return nil } ...
[ 0.9750574827194214, -0.040361907333135605, 0.8827090263366699, 0.6817063093185425, -0.8517679572105408, -1.163650393486023, 0.20954713225364685, -0.024256732314825058, 0.24256263673305511, 0.38209936022758484, 0.15249067544937134, 1.283936858177185, -0.4620877802371979, 0.699409544467926, ...
func Reverse(s string) string { r := []rune(s) for i, j := 0, len(r)-1; i<len(r)/2; i,j = i+1,j-1 { r[i], r[j] = r[j], r[i] } return string(r) }
[ -0.5891856551170349, 0.18905360996723175, 0.5280811190605164, -0.7652336955070496, -0.5301413536071777, -0.5031483769416809, 0.1287447065114975, 0.3161930739879608, -0.8481500744819641, 0.1945982277393341, -0.38717472553253174, 0.8124303221702576, -0.7813066840171814, -1.6775474548339844, ...
func (recordFile) TableName() string { return "record_file" }
[ 1.2661410570144653, -0.46482640504837036, 0.5405252575874329, 0.7520660758018494, 0.15415135025978088, 0.5035266280174255, 0.9321144223213196, 1.1793071031570435, -1.7656692266464233, 0.12375276535749435, 0.19882455468177795, 0.7979742288589478, 0.3249426782131195, 0.11291529983282089, -...
func NewBlockRepository(dbClient *gorm.DB) *BlockRepository { return &BlockRepository{dbClient: dbClient} }
[ 0.32433098554611206, 0.6797364354133606, 0.18201474845409393, -0.19701558351516724, 0.06276893615722656, -0.7921431660652161, -0.4935031235218048, 0.20473162829875946, -0.10243202745914459, 0.3775027096271515, 0.16814421117305756, -0.2694297134876251, -0.6846082210540771, 0.385565459728240...
func (br *BlockRepository) FindByIndex(index int64) (*types.Block, *rTypes.Error) { rf := &recordFile{} if br.dbClient.Order("consensus_end asc").Offset(index).First(rf).RecordNotFound() { return nil, errors.Errors[errors.BlockNotFound] } return br.constructBlockResponse(rf, index), nil }
[ 0.32273349165916443, 0.6948258876800537, 0.5029602646827698, -0.7274174690246582, 0.6600729823112488, -0.30543527007102966, 0.8169861435890198, -1.2402217388153076, -0.8820987343788147, 0.48454761505126953, -0.2512487769126892, -0.19428089261054993, -1.3389066457748413, 0.5054184198379517,...
func (br *BlockRepository) FindByHash(hash string) (*types.Block, *rTypes.Error) { rf, err := br.findRecordFileByHash(hash) if err != nil { return nil, err } return br.constructBlockResponse(rf, rf.BlockIndex), nil }
[ 0.8100943565368652, 0.30353814363479614, 0.495324969291687, -0.1898837834596634, 0.21554696559906006, -0.5139709711074829, 1.027449369430542, -0.6312304735183716, -0.3710724413394928, -0.01466358546167612, -0.6058564186096191, 0.11724323779344559, -1.2156023979187012, 1.040018916130066, ...
func (br *BlockRepository) FindByIdentifier(index int64, hash string) (*types.Block, *rTypes.Error) { rf, err := br.findRecordFileByHash(hash) if err != nil { return nil, err } if rf.BlockIndex != index { return nil, errors.Errors[errors.BlockNotFound] } return br.constructBlockResponse(rf, index), nil }
[ 0.34213700890541077, -0.18146446347236633, 0.314743310213089, -0.07198979705572128, 0.3798269033432007, 0.01694622077047825, 1.0014854669570923, -1.0390825271606445, -0.19537943601608276, 0.5732661485671997, -0.7638577222824097, -0.18837733566761017, -0.9105479717254639, 0.3777008652687073...
func (br *BlockRepository) RetrieveGenesis() (*types.Block, *rTypes.Error) { rf := &recordFile{} if br.dbClient.Where(&recordFile{PrevHash: genesisPreviousHash}).Find(rf).RecordNotFound() { return nil, errors.Errors[errors.BlockNotFound] } return &types.Block{ Index: 0, Hash: rf....
[ 0.004458370618522167, 0.5838937163352966, 0.5298569202423096, 0.07358451932668686, 0.9682109951972961, -0.32076534628868103, 0.46633103489875793, -0.5124981999397278, -1.3458688259124756, -0.33244943618774414, -0.26870325207710266, 0.2622497081756592, -0.9484515190124512, 0.645137190818786...
func (br *BlockRepository) RetrieveLatest() (*types.Block, *rTypes.Error) { rf := &recordFile{} if br.dbClient.Raw(selectLatestWithIndex).Scan(rf).RecordNotFound() { return nil, errors.Errors[errors.BlockNotFound] } return br.constructBlockResponse(rf, rf.BlockIndex), nil }
[ 0.3761221468448639, 0.35818925499916077, 0.44427382946014404, -0.24987691640853882, 0.8755149245262146, -0.9353502988815308, 0.3226608335971832, -1.121717929840088, -0.16075769066810608, -0.6374659538269043, -0.28834041953086853, -0.03728508949279785, -0.9382618069648743, -0.50795340538024...
func (br *BlockRepository) constructBlockResponse(rf *recordFile, blockIndex int64) *types.Block { parentIndex := blockIndex - 1 parentHash := rf.PrevHash // Handle the edge case for querying first block if rf.PrevHash == genesisPreviousHash { parentIndex = 0 //Parent index should be 0, same as current ...
[ 0.08395632356405258, 0.08356186002492905, 0.5247479677200317, -0.7952723503112793, 0.6021764278411865, -0.62971031665802, 0.9209803342819214, -0.4396872818470001, -0.2652130722999573, 0.3295205235481262, 0.380465030670166, -0.392987459897995, -0.9126504063606262, -0.4038946330547333, 0.7...
func (obj *conns) All() []Connection { return obj.list }
[ -0.257488489151001, -2.1356797218322754, 0.4767703413963318, 1.3407541513442993, 1.1482123136520386, 0.5815232396125793, -1.2499152421951294, 0.674483060836792, 0.8826895952224731, -0.20736758410930634, -0.33872267603874207, 1.2004629373550415, -0.046421345323324203, 0.6167595982551575, ...
func NewClients() *Clients { return &Clients{} }
[ -0.36709365248680115, -0.8526439666748047, -0.28257349133491516, -0.27321332693099976, -0.38706377148628235, -0.49683550000190735, -0.30429115891456604, -1.4211632013320923, -0.17697948217391968, -0.4973960220813751, 0.10906066745519638, 1.1596870422363281, -1.196771502494812, 0.4274252653...
func (_ *Clients) BootstrapHandler( _ context.Context, _ *sync.WaitGroup, _ startup.Timer, dic *di.Container) bool { config := container.ConfigurationFrom(dic.Get) var eventClient interfaces.EventClient var commandClient interfaces.CommandClient var notificationClient interfaces.NotificationClient var subscr...
[ 0.14320328831672668, -0.3187711536884308, 0.7147183418273926, -0.3387884199619293, 0.11837489902973175, -0.47899410128593445, 0.4458259046077728, -0.47514891624450684, -0.03803462162613869, -0.20651714503765106, 0.2035483419895172, 0.009118322283029556, -0.15970394015312195, 0.811408579349...
func (s Set) Append(newMem setMember) { s.mem[newMem] = true }
[ 0.7117263674736023, -0.13068975508213043, 0.016135022044181824, -0.20689380168914795, -1.0835447311401367, 0.19231505692005157, -0.716785192489624, -0.3274732828140259, -0.2689897418022156, 0.07797842472791672, -0.7645824551582336, 1.27883780002594, -0.8626185655593872, 1.066968560218811, ...
func (s Set) Remove(removeMem setMember) { delete(s.mem, removeMem) }
[ 0.5207019448280334, -0.22497595846652985, -0.03884585201740265, 0.13091494143009186, -1.5647985935211182, -0.34406694769859314, -0.21713970601558685, 0.13324680924415588, 0.04011412337422371, 0.1998605579137802, -0.3980950117111206, 0.7641189694404602, -1.3668813705444336, 0.03122877329587...
func Equals(oneSet, otherSet Set) bool { if len(oneSet.mem) != len(otherSet.mem) { return false } /* Obviously, if the sets have different numbers of elements, they are not equal. */ for k := range oneSet.mem { if otherSet.mem[k] == false { return false } } /* If the sets have an equal number of eleme...
[ -0.7746143937110901, -0.245502308011055, 0.5780239105224609, -0.7655690908432007, -0.12292961031198502, -0.21194855868816376, -0.6445887684822083, -0.9394031763076782, 0.4264698326587677, -0.48717808723449707, -0.7079613208770752, 0.5668859481811523, -0.5386212468147278, 0.4049233496189117...
func (s Set) Union(otherSet Set) Set { unionSet := NewSet() for k := range s.mem { unionSet.mem[k] = true } // Adds the elements of the set to the union set. for k := range otherSet.mem { unionSet.mem[k] = true } // Adds the elements of the set in the argument to the union set. return unionSet }
[ -0.5497817993164062, 0.3629516661167145, 0.5550793409347534, -0.4399615526199341, -0.27284950017929077, -0.0858195349574089, -0.21045270562171936, -0.2489897757768631, 0.7402310967445374, -0.1971820890903473, -0.02997904270887375, 0.7397750616073608, -0.5879708528518677, -0.602047860622406...
func (s Set) Intersection(otherSet Set) Set { interSet := NewSet() for k := range s.mem { if otherSet.mem[k] == true { interSet.mem[k] = true // Adds an element to the intersection set if it is a member of both sets. } } return interSet }
[ -0.06981125473976135, -0.0870002955198288, 0.4451621472835541, -0.20187529921531677, -0.5046210885047913, 0.1455993950366974, -0.40148186683654785, -0.41420504450798035, -0.09350274503231049, 0.5348090529441833, 0.30410268902778625, 0.2245045006275177, -1.1067003011703491, 0.30437234044075...
func (s Set) RelCompl(universe Set) Set { relSet := NewSet() for k := range s.mem { if universe.mem[k] == false { relSet.mem[k] = true // Adds a member to the relative set if it is in s but not in universe. } } return relSet }
[ 0.3950778543949127, -0.0050189862959086895, 0.3759063184261322, -0.47561681270599365, -0.9834024310112, -0.1164093166589737, -0.013727646321058273, -0.2252904772758484, 0.04674830287694931, -0.17463405430316925, 0.1403547078371048, 0.149129718542099, -0.6914818286895752, -0.519100844860076...
func PowerSet(mySet Set) []Set { powSet := []Set{} mySlice := []setMember{} mySubSlices := [][]setMember{} /* The function first breaks the set down into a slice which is easier to work with. The problem then amounts to finding all subslices of this slice. This can be done by realizing that, since the power set...
[ 0.258593887090683, -0.5967018604278564, 0.643318235874176, -0.5046427249908447, -1.0391857624053955, -0.7866795063018799, -0.5120012760162354, 0.20638905465602875, -0.11957410722970963, 0.4285483956336975, -0.2481488287448883, 0.8615780472755432, -0.5981073379516602, 0.05662096291780472, ...
func subsets(mySlice []setMember) [][]setMember { indexSlice := []string{} subSetSlice := [][]setMember{} binaryLen := "%0" + strconv.Itoa(len(mySlice)) + "b" for i := 0; i < pow(2, len(mySlice)); i++ { indexSlice = append(indexSlice, fmt.Sprintf(binaryLen, i)) } /* Generate all binary numbers from 0 to 2^len...
[ -0.5984029769897461, -0.15007518231868744, 0.7352326512336731, 0.3445247411727905, -0.8054025173187256, -0.7704851627349854, 0.361237108707428, 0.11869053542613983, 0.3179045021533966, -0.07013757526874542, -0.8478755950927734, 1.143579363822937, -0.4398025870323181, 0.33005988597869873, ...
func pow(a, exp int) int { p := 1 for exp > 0 { if exp&1 != 0 { p *= a } exp >>= 1 a *= a } return p }
[ -0.1379755586385727, -0.09750707447528839, 0.6479997038841248, 0.06411484628915787, -0.4103637933731079, -0.009550848044455051, 0.48229125142097473, 1.2775335311889648, 0.5200239419937134, 0.7093602418899536, 0.4609413743019104, 0.031196361407637596, -0.2058129459619522, 0.250064879655838,...
func testPowerSet(subSetSlice []Set, theSet Set) { allElemsInPowSet := NewSet() if len(subSetSlice) != pow(2, len(theSet.mem)) { panic("Error in number of elements in PowerSet") } // Check if the length of the set relative to the power set align. for i := 0; i < len(subSetSlice); i++ { for k := range subSet...
[ 0.5204467177391052, -0.5174858570098877, 0.5388143062591553, 0.1333034336566925, -0.31305423378944397, 0.22906263172626495, -0.6117345094680786, -0.06917402148246765, -0.5491312742233276, -0.3294983208179474, 0.8060866594314575, 0.31747275590896606, -0.28916746377944946, 0.0130214672535657...
func (s *Set) SetString() string { mySetSlice := []setMember{} for i := range s.mem { mySetSlice = append(mySetSlice, i) } myString := fmt.Sprint(mySetSlice) return myString }
[ -0.7065723538398743, -0.24734188616275787, 0.28423044085502625, -0.23391366004943848, -0.5052714943885803, -0.13219572603702545, -0.15163129568099976, -0.8279166221618652, -0.43141281604766846, 0.40223222970962524, 0.2717961370944977, 0.83760666847229, -0.48167115449905396, 0.1899799555540...
func (o *SyncPerspectiveGroupUsingPOSTReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSyncPerspectiveGroupUsingPOSTOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, ...
[ -0.11344187706708908, -0.8319920301437378, 0.6035898923873901, 0.7140536904335022, -0.5669888257980347, -0.8836577534675598, -0.07469736784696579, -0.23967626690864563, -0.025905810296535492, 0.5348397493362427, 0.5141052603721619, -0.3307879567146301, -1.1760677099227905, -0.0762523710727...
func NewSyncPerspectiveGroupUsingPOSTOK() *SyncPerspectiveGroupUsingPOSTOK { return &SyncPerspectiveGroupUsingPOSTOK{} }
[ 0.24823541939258575, -0.17883571982383728, 0.3888852894306183, 0.7533733248710632, -2.0522608757019043, -0.250707745552063, -0.13266894221305847, 0.06019703298807144, -0.9418520927429199, 0.9983279705047607, -0.05181821063160896, -0.807634711265564, -0.0696457251906395, 0.5623929500579834,...
func NewSyncPerspectiveGroupUsingPOSTAccepted() *SyncPerspectiveGroupUsingPOSTAccepted { return &SyncPerspectiveGroupUsingPOSTAccepted{} }
[ 0.8227677941322327, -0.1587451994419098, 0.35625267028808594, 0.18971261382102966, -2.19465970993042, -0.023083236068487167, 0.22855396568775177, 0.028352761641144753, -0.7289595603942871, 0.5134469270706177, -0.2129497528076172, 0.4861977696418762, 0.37073814868927, 0.10827962309122086, ...
func NewSyncPerspectiveGroupUsingPOSTUnauthorized() *SyncPerspectiveGroupUsingPOSTUnauthorized { return &SyncPerspectiveGroupUsingPOSTUnauthorized{} }
[ 0.19523689150810242, 0.15285378694534302, 0.39942795038223267, 1.034881830215454, -1.8602114915847778, -0.662925124168396, -0.7022600173950195, 0.5689058899879456, -0.27508366107940674, 0.006272290367633104, 0.05284930393099785, 0.8887669444084167, 0.09414266794919968, -0.2565309405326843,...
func Fre(text string) float64 { sylCnt := float64(CntSyls(text)) wordCnt := float64(CntWords(text)) sentCnt := float64(CntSents(text)) return 206.835 - 1.015*(wordCnt/sentCnt) - 84.6*(sylCnt/wordCnt) }
[ 1.1185245513916016, 0.5687920451164246, 0.2455015778541565, -0.26704075932502747, -0.11919529736042023, -0.7520560622215271, 1.5160013437271118, -0.5107694268226624, -0.5762205719947815, -0.4461427330970764, 0.4989534020423889, -0.041272055357694626, -0.610508143901825, 1.03145432472229, ...
func SetDebug() { globalDebug = true }
[ 1.2756690979003906, 0.43842849135398865, 0.2463611513376236, 0.8870909214019775, 0.9667850732803345, 1.1487503051757812, 0.23105467855930328, 1.0439023971557617, -0.6125881671905518, 0.019395053386688232, -0.5894582271575928, 0.9671249985694885, -0.5383368134498596, 1.2321242094039917, 0...
func UnsetDebug() { globalDebug = false }
[ 0.4416908025741577, 0.7688621282577515, 0.10523276031017303, -0.20445963740348816, 0.5720623135566711, 0.5896310210227966, 0.6806358098983765, 0.5653634071350098, -1.164357304573059, -0.008226815611124039, -0.12702466547489166, 0.6256344318389893, -0.36714282631874084, 0.9404746890068054, ...
func Detect() (tag language.Tag, err error) { tags, err := DetectAll() if err != nil { return language.Und, err } return tags[0], nil }
[ 1.1441370248794556, -0.2511942982673645, 0.5087334513664246, 1.4040497541427612, -0.05934802070260048, -0.21628133952617645, -0.8989262580871582, -0.274555504322052, -0.653594970703125, -0.5272759795188904, -0.04341593012213707, 0.18515029549598694, -0.18574029207229614, 1.3462263345718384...
func DetectAll() (tags []language.Tag, err error) { lang, err := detect() if err != nil { return } tags = make([]language.Tag, 0, len(lang)) for _, v := range lang { tags = append(tags, language.Make(v)) } return }
[ 0.7978633642196655, -0.4814852178096771, 0.5861504673957825, 1.0849748849868774, 0.4439470171928406, -0.22452257573604584, -1.3867288827896118, 0.04147094860672951, -0.5664591789245605, 0.09222549945116043, -0.9478443264961243, 0.23527254164218903, 0.2577946186065674, 2.12654447555542, 0...
func (this *HashTreeDB) TraversalCopy(target *HashTreeDB) error { // The contents of the file database cannot be copied to the memory database // In memory database if target.config.MemoryStorage { // ergodic target.MemoryStorageDB.wlok.Lock() defer target.MemoryStorageDB.wlok.Unlock() for k, v := range tar...
[ 0.2333957850933075, -0.4105197787284851, 0.9907379150390625, 0.5170950293540955, -0.5148035287857056, 0.35709503293037415, 0.8214242458343506, 0.18803289532661438, -0.8865146040916443, 0.7920175194740295, 0.33311644196510315, -0.3840356171131134, -1.1812869310379028, 0.9512999653816223, ...
func (s *ServerSession) sendResponse(rsp Packet) (err error) { rspType := rsp.getType() s.logger.Print("server send response type: ", rspType) // logger.Printf("server send response data: %+v", rsp) var rspRaw RawPacket if cr, _ := rsp.(cacheReader); cr != nil { rspRaw = cr.getCache() } if rspRaw == nil { if...
[ -0.7282054424285889, -0.43601661920547485, 0.9171907901763916, -0.03358432278037071, -0.4129922688007355, -0.06596259772777557, 0.9698224067687988, -0.1740730255842209, 1.353425145149231, 0.2665007710456848, -0.5604488253593445, 0.2312171906232834, -0.4244728982448578, -0.19149166345596313...
func NewKubernetesAddon(ctx *pulumi.Context, name string, args *KubernetesAddonArgs, opts ...pulumi.ResourceOption) (*KubernetesAddon, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ClusterId == nil { return nil, errors.New("invalid value for required argum...
[ 0.1430395394563675, -0.3603838384151459, 0.557810366153717, 0.12060211598873138, -0.7458107471466064, 0.6976685523986816, -1.6769028902053833, 0.2875937521457672, 0.7721213698387146, 0.9033080339431763, -0.7247350811958313, -0.056412942707538605, -0.4351678192615509, 0.11437772214412689, ...
func GetKubernetesAddon(ctx *pulumi.Context, name string, id pulumi.IDInput, state *KubernetesAddonState, opts ...pulumi.ResourceOption) (*KubernetesAddon, error) { var resource KubernetesAddon err := ctx.ReadResource("alicloud:cs/kubernetesAddon:KubernetesAddon", name, id, state, &resource, opts...) if err != nil ...
[ 0.35784679651260376, -0.5595308542251587, 0.42071759700775146, -0.00741003779694438, -0.5296152234077454, 0.2925899028778076, -1.9645671844482422, -0.282195508480072, 1.6454200744628906, 0.5794845819473267, -0.19181567430496216, 1.0461385250091553, -0.11657483130693436, -0.8720149397850037...
func (o KubernetesAddonOutput) CanUpgrade() pulumi.BoolOutput { return o.ApplyT(func(v *KubernetesAddon) pulumi.BoolOutput { return v.CanUpgrade }).(pulumi.BoolOutput) }
[ -0.40647733211517334, 0.3670094609260559, 0.7842509746551514, 0.808641791343689, -0.4349900484085083, 1.094045877456665, -1.268578290939331, 0.8167654871940613, 0.6166209578514099, 1.2089029550552368, -0.15402662754058838, 0.351150780916214, 0.04303940385580063, -0.22992748022079468, -0....
func (o KubernetesAddonOutput) ClusterId() pulumi.StringOutput { return o.ApplyT(func(v *KubernetesAddon) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput) }
[ 1.0672156810760498, 0.19620241224765778, 0.3865011930465698, 0.028402501717209816, -0.1609596312046051, 1.3779349327087402, -0.7813337445259094, 0.9508213996887207, 2.0340802669525146, 0.6341841220855713, 0.45161670446395874, 1.25979745388031, 0.6039614677429199, -0.7259180545806885, 0.2...
func (o KubernetesAddonOutput) Config() pulumi.StringOutput { return o.ApplyT(func(v *KubernetesAddon) pulumi.StringOutput { return v.Config }).(pulumi.StringOutput) }
[ 0.8084518909454346, 0.19418546557426453, 0.37527915835380554, -0.05310690775513649, -0.08609085530042648, 1.079580307006836, -1.539328694343567, 1.0397917032241821, 0.836180567741394, 0.8669919371604919, -0.05192470923066139, 0.605168879032135, 0.8405592441558838, 0.027803951874375343, 0...
func (o KubernetesAddonOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *KubernetesAddon) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) }
[ 0.3426543176174164, -0.4055623710155487, 0.5512474179267883, -0.04583015292882919, -0.975113570690155, 1.0754176378250122, -1.496112585067749, 0.08960385620594025, 0.8080688714981079, 1.5600054264068604, -0.070305235683918, 0.5731077790260315, 0.947697639465332, -0.4580024182796478, 0.18...
func (o KubernetesAddonOutput) NextVersion() pulumi.StringOutput { return o.ApplyT(func(v *KubernetesAddon) pulumi.StringOutput { return v.NextVersion }).(pulumi.StringOutput) }
[ 0.5136865973472595, 0.1278577297925949, 0.3192023038864136, 0.4589880704879761, -0.45309609174728394, 1.6103923320770264, -0.9665613770484924, 0.016398588195443153, 1.3586814403533936, 0.5517141222953796, 0.2339978963136673, 0.9250128269195557, 0.5794674754142761, -0.5583763122558594, 0....
func (o KubernetesAddonOutput) Required() pulumi.BoolOutput { return o.ApplyT(func(v *KubernetesAddon) pulumi.BoolOutput { return v.Required }).(pulumi.BoolOutput) }
[ -0.12272412329912186, 0.23873454332351685, 0.5597139596939087, 0.23143436014652252, -0.15166611969470978, 1.6537578105926514, -1.3051173686981201, 0.7884475588798523, 0.7489044070243835, 1.0023550987243652, -0.06578919291496277, 0.8711018562316895, -0.07403560727834702, -0.1880728006362915...
func (o KubernetesAddonOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v *KubernetesAddon) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput) }
[ 0.7564743757247925, -0.2517320513725281, 0.3647610545158386, 0.3836081624031067, 0.009886412881314754, 1.6106921434402466, -1.0266468524932861, 0.562874972820282, 0.9942243099212646, 1.1434028148651123, -0.16484664380550385, 0.8157604932785034, 0.7195054292678833, -0.7504429221153259, 0....
func (p *AdjustPrinter) Print() { if err := ui.Init(); err != nil { log.Fatalf("Failed to initialize app: %v", err) } defer ui.Close() w, h := ui.TerminalDimensions() widget := widgets.NewParagraph() widget.WrapText = false widget.Border = false widget.Text = p.String() widget.Title = "[j][k][up][down] sele...
[ -0.10141461342573166, 0.09629300236701965, 0.7589796781539917, -0.6459805369377136, -0.6000891923904419, 0.08237434178590775, -0.20727010071277618, -0.3906616270542145, -0.050600454211235046, 0.1302238404750824, 0.11792866140604019, 0.032054878771305084, -1.045559048652649, 0.8161674141883...
func (p AdjustPrinter) String() string { var sb strings.Builder tokens := p.timelogger.Tokenize(false) begin := 0 for i := 0; i < len(tokens); i++ { token := tokens[i] if token.token == tkDate { begin = i } else if token.token == tkNewLine || token.token == tkEnd { prev := Token{} for j := begin; j...
[ 0.06542547047138214, -1.038041114807129, 0.580060601234436, -1.0321670770645142, -0.7995434403419495, -0.08286761492490768, 0.20692430436611176, -1.070840835571289, -0.2526744306087494, 0.19223426282405853, 0.555111289024353, 1.0440590381622314, -0.2965678572654724, 0.482345312833786, 0....
func Env(name string) string { return fmt.Sprintf("PILADB_%s", name) }
[ -0.4667743742465973, -0.13087904453277588, 0.3822561800479889, -1.0913723707199097, -0.4696703255176544, 1.4996740818023682, -0.7899618744850159, -0.04088164493441582, -1.0844981670379639, 0.8697422742843628, -0.01482315082103014, 0.1671564131975174, 0.12912142276763916, -0.272691845893859...
func DefaultInt(name string) int { switch name { case MaxStackSize: return MaxStackSizeDefault case ReadTimeout: return ReadTimeoutDefault case WriteTimeout: return WriteTimeoutDefault case Port: return PortDefault } return -1 }
[ 0.2640429437160492, 0.5318654775619507, 0.3767072558403015, 0.25852909684181213, 0.003998597618192434, -0.2900278866291046, 0.14309196174144745, -0.5712754726409912, -0.8737397193908691, 0.4042748212814331, -0.6784816980361938, -0.9207648038864136, -1.2740460634231567, 0.7957881093025208, ...
func NewEntry() *Entry { return &Entry{ Active: true, Passwords: make([]string, 0), Tags: make([]string, 0), } }
[ 0.525732696056366, -0.8572836518287659, 0.000323255400871858, 0.3626455068588257, -0.10490288585424423, -0.23607230186462402, -0.26553526520729065, -0.43099987506866455, 0.390139639377594, 0.057715874165296555, -0.5233051180839539, 0.35562214255332947, -0.35377225279808044, 0.7166677713394...
func (entry *Entry) GetPassword() string { if len(entry.Passwords) > 0 { return entry.Passwords[len(entry.Passwords) - 1] } return "" }
[ 0.3974868953227997, 0.08572228252887726, 0.6990108489990234, 0.7795975804328918, 0.8677151203155518, -0.10930853337049484, -0.27152740955352783, 0.14431309700012207, 0.8020559549331665, 0.7690240740776062, 0.6403676271438599, 0.5545287728309631, -0.25028884410858154, 0.07755973190069199, ...
func (entry *Entry) SetPassword(password string) { entry.Passwords = append(entry.Passwords, password) }
[ 0.1497570127248764, 0.010013622231781483, 0.30220702290534973, 0.8151401281356812, 0.5492421984672546, 0.6634008288383484, -0.9813356399536133, 1.1218308210372925, 1.1444965600967407, 0.4758039712905884, -0.8340941071510315, 0.6256107687950134, 0.027844827622175217, 0.9670566320419312, -...
func createComposeData(stackData StackData, format string) (string, string, string, error) { if format == "combined" { compose, err := createCombinedComposeData(stackData) return "", "", compose, err } else if format == "split" { dockerCompose, rancherCompose, err := createSplitComposeData(stackData) return d...
[ -0.5037949085235596, -0.42911142110824585, 0.6854006052017212, 0.43173593282699585, 0.35106605291366577, 0.10062563419342041, -0.2411499321460724, -0.13754290342330933, -0.6090493202209473, 0.2514980435371399, 0.05331895127892494, -0.4473423957824707, -0.1545504778623581, 1.210887432098388...
func FromPairs(pairs []string) (map[string]string, error) { results := make(map[string]string, len(pairs)) for _, p := range pairs { parts := strings.Split(p, "=") if len(parts) != 2 { return nil, errors.Errorf("%s is not a valid key=value format", p) } k, v := parts[0], parts[1] if _, ok := results[k];...
[ -0.8211855888366699, -0.2961438298225403, 0.5645480155944824, -0.24399051070213318, -1.4207308292388916, -0.5433369874954224, -0.09054988622665405, -0.9691892266273499, -0.3873474895954132, 0.5718979239463806, 0.08908750861883163, -0.2790791392326355, 0.5558173656463623, 0.2403809726238250...
func NewChunk() *Chunk { chunk := new(Chunk) return chunk }
[ 0.2042800635099411, -0.3286665081977844, -0.055559586733579636, 0.9283014535903931, -0.18788276612758636, -0.01670968532562256, 0.5706787705421448, -0.14100925624370575, -0.4850784242153168, -1.8261909484863281, 0.2758174538612366, 1.325255274772644, 0.299476683139801, -0.20708215236663818...
func GenerateSigningKeyPair(publicFileName, privateFileName, curveType string) (err error) { var publicKey, privateKey []byte switch strings.ToLower(curveType) { case CurveSecp256K1: publicKey, privateKey, err = secp256k1.GenerateSigningKeyPair() case CurveEd25519: publicKey, privateKey, err = ed25519.GenerateS...
[ -0.745010495185852, -0.19740112125873566, 0.5695098638534546, -0.08317196369171143, 0.02874848246574402, 0.7393937706947327, 0.2739397883415222, -0.05412190780043602, -0.8074207305908203, 0.7775769829750061, -0.770618200302124, 0.27463704347610474, -0.7673908472061157, 1.1646966934204102, ...
func GenerateHashPair(preimageSize int) (preimage, hash []byte, err error) { preimage = utils.RandomSlice(preimageSize) h := sha256.New() _, err = h.Write(preimage) if err != nil { return []byte{}, []byte{}, err } hash = h.Sum(hash) return preimage, hash, nil }
[ -0.8215776681900024, 0.05596018210053444, 0.8387071490287781, 0.3965536653995514, -0.710870087146759, 0.335099995136261, 0.3763090968132019, 0.4929618835449219, 0.4305868446826935, -0.09901025146245956, -1.0782239437103271, -0.9270129799842834, -0.6175840497016907, 1.4909486770629883, 0....
func prettyFormat(node *BTree, indent string, last bool) string { result := indent if last { result += "\\-" indent += " " } else { result += "|-" indent += "| " } if node == nil { result += "<nada>\n" return result } result += fmt.Sprintf("%v", node.Value) + "\n" children := make([]*BTree, 0)...
[ 0.5550522804260254, 0.29720935225486755, 1.0472794771194458, -0.40947967767715454, -0.7631609439849854, -0.8427748680114746, -0.7178435921669006, -0.06316207349300385, -0.6207461953163147, 0.3055192232131958, 0.8218640685081482, -0.045260146260261536, 0.08951618522405624, 0.697136700153350...
func NewThingConfig(resp *iot.CreateCertificateFromCsrOutput) *ThingConfig { return &ThingConfig{ CertificateArn: *resp.CertificateArn, CertificateID: *resp.CertificateId, CertificatePem: *resp.CertificatePem, } }
[ 0.3600175678730011, -1.1578395366668701, 0.1527140885591507, -0.2316615879535675, -0.47786033153533936, 0.32148295640945435, -1.1244786977767944, -0.3257211744785309, -0.6503333449363708, 0.047321997582912445, -0.9653438329696655, 0.49573248624801636, 0.16594147682189941, 0.100887030363082...
func (r *TestConnectionRequest) CheckAndSetDefaults() error { if r.ResourceKind == "" { return trace.BadParameter("missing required parameter ResourceKind") } if r.ResourceName == "" { return trace.BadParameter("missing required parameter ResourceName") } if r.KubernetesNamespace == "" { r.KubernetesNamesp...
[ -0.2029755860567093, -0.16471010446548462, 0.4076288044452667, 0.3135865032672882, 1.0251408815383911, -0.39487403631210327, -0.733786940574646, -0.985444188117981, -0.0880739837884903, 0.4225214719772339, 0.886547327041626, -0.25440746545791626, -0.9287910461425781, 1.3970355987548828, ...
func ConnectionTesterForKind(cfg ConnectionTesterConfig) (ConnectionTester, error) { switch cfg.ResourceKind { case types.KindNode: tester, err := NewSSHConnectionTester( SSHConnectionTesterConfig{ UserClient: cfg.UserClient, ProxyHostPort: cfg.ProxyHostPort, TLSRoutingEnabled: cfg.TLSRout...
[ 0.21241576969623566, -0.6904210448265076, 0.5862918496131897, -0.6538688540458679, 0.372270792722702, -0.05837240442633629, 0.21593177318572998, -0.6277903914451599, -0.5817071795463562, -0.06239808350801468, 0.8993527889251709, -0.5792243480682373, -0.8917831778526306, 1.1687120199203491,...
func (c *Client) ParseSourcesList(r io.Reader) error { out := []*SourceEntry{} scanner := bufio.NewScanner(r) for scanner.Scan() { line := scanner.Text() if !strings.HasPrefix(line, "#") && len(line) > 0 { source, err := SourceFromString(line) if err != nil { return err } out = append(out, sourc...
[ 0.730750322341919, -0.4322557747364044, 0.41437914967536926, -0.39817875623703003, 0.11557676643133163, -0.55615234375, 0.04239136353135109, -0.32171839475631714, 0.23875096440315247, 0.2768315374851227, -0.43978893756866455, -0.8059102296829224, -0.21758760511875153, 1.6104525327682495, ...
func (c *Client) AutoDetectSources() error { err := c.ParseSourcesFromFile("/etc/apt/sources.list") if err != nil { return err } sources, err := ioutil.ReadDir("/etc/apt/sources.list.d/") if err != nil { return err } for _, file := range sources { if strings.Contains(file.Name(), ".list") { err := c.P...
[ 0.1511947363615036, -0.16808229684829712, 0.7446203231811523, -0.03695710375905037, 0.8268161416053772, -0.6079315543174744, 0.12302108108997345, 0.19801361858844757, -0.0968327447772026, -0.6865720748901367, -0.7974204421043396, -0.4885537028312683, 0.0553097128868103, 1.250044584274292, ...
func (c *Client) ParseSourcesFromFile(path string) error { f, err := os.Open(path) if err != nil { return err } defer f.Close() err = c.ParseSourcesList(f) if err != nil { return err } return nil }
[ 0.906644880771637, 0.20302532613277435, 0.35993608832359314, -0.8943601846694946, -0.1418001800775528, 0.05866413936018944, 0.454969584941864, -0.3778795897960663, -0.5265262722969055, -0.29257792234420776, -0.7664270401000977, -1.1465249061584473, -0.628218412399292, 0.7183225750923157, ...
func (p *Person) UnmarshalJSON(data []byte) error { if id, ok := ParseID(data); ok { p.ID = id return nil } type person Person var v person if err := json.Unmarshal(data, &v); err != nil { return err } *p = Person(v) return nil }
[ -0.6224017143249512, -0.4322989881038666, 0.44936200976371765, -1.3144574165344238, -1.0281298160552979, 0.44502708315849304, -0.2621237337589264, 0.8703926205635071, 0.47065380215644836, -0.4767163097858429, -0.5186496376991272, -0.2756085991859436, -0.7408479452133179, 0.3147134780883789...
func NewWriter() *Writer { return new(Writer) }
[ -0.32346969842910767, 0.18305915594100952, -0.30013182759284973, 1.1281447410583496, -0.3595792353153229, -1.179964542388916, 0.768225908279419, 0.1816290318965912, -0.24787485599517822, -0.5458819270133972, 0.010470172390341759, -0.6825214624404907, -0.21529532968997955, -0.27959042787551...
func (w *Writer) Reset(buffer BufferWriter) { w.out = buffer w.cache = 0 w.available = 8 }
[ -0.8030484318733215, 0.30444425344467163, 0.003021785756573081, 0.1016627624630928, 0.10633820295333862, -0.5674259662628174, 1.1840624809265137, -0.05019688978791237, -0.42156875133514404, 0.4657776355743408, -0.9704769849777222, -0.2616262137889862, -0.7074408531188965, -0.31830224394798...
func (w *Writer) WriteBool(b bool) { if b { w.cache |= 1 << (w.available - 1) } w.available-- if w.available == 0 { // WriteByte never returns error _ = w.out.WriteByte(w.cache) w.cache = 0 w.available = 8 } }
[ -0.6486390829086304, 0.7402734160423279, 0.6574100255966187, 0.7262177467346191, 0.48299869894981384, 0.4365254342556, 1.3040218353271484, 0.9119101166725159, 0.22761951386928558, 0.705782413482666, -0.8386715650558472, -0.2719956636428833, -0.386745810508728, 0.013579552993178368, -0.31...
func (w *Writer) WriteBits(u uint64, numBits int) { u <<= 64 - uint(numBits) for ; numBits >= 8; numBits -= 8 { byt := byte(u >> 56) _ = w.WriteByte(byt) u <<= 8 } remainder := byte(u >> 56) for ; numBits > 0; numBits-- { w.WriteBool((remainder & 0x80) != 0) remainder <<= 1 } }
[ -0.7909198999404907, 0.3968050479888916, 0.34696662425994873, -0.2692204415798187, 0.005484506022185087, 0.6156688332557678, 0.7646393179893494, -0.2607371211051941, 0.14121013879776, -0.6992391347885132, -0.6797084808349609, 0.6178532838821411, -0.570127010345459, 0.28028762340545654, -...
func (w *Writer) WriteByte(b byte) error { if err := w.out.WriteByte(w.cache | (b >> (8 - w.available))); err != nil { return err } w.cache = b << w.available return nil }
[ -0.3524576723575592, 0.9936255216598511, 0.5235841870307922, 0.44778338074684143, 0.5180522203445435, 0.25896239280700684, 0.9458622336387634, 0.5072789192199707, 0.4982585906982422, 0.3149736821651459, -0.040529925376176834, -0.3342621624469757, -1.2512789964675903, 0.352224200963974, 0...
func (w *Writer) Flush() { if w.available != 8 { _ = w.out.WriteByte(w.cache) } w.Reset(w.out) }
[ 0.07226277142763138, 0.9297210574150085, 0.2393878847360611, 0.08394208550453186, 0.15591076016426086, -0.1478787213563919, 0.9819490909576416, -0.07305612415075302, -0.07955534756183624, 0.10465061664581299, 0.09351936727762222, 0.6868054270744324, -0.4234101176261902, 0.4779781103134155,...
func NewPacker(buf BufferWriter) *Packer { return &Packer{ buf: buf, } }
[ 0.5207524299621582, -0.9846333265304565, 0.0630359798669815, 0.2535165548324585, -1.0322399139404297, -0.2830851674079895, 0.006424414459615946, -0.589110255241394, 0.33911362290382385, -0.8011630177497864, -0.7855393886566162, -0.16597038507461548, -0.3975318670272827, 0.8278487324714661,...
func (w *Packer) Write(p []byte) { _, _ = w.buf.Write(p) }
[ -0.6528444290161133, -0.011781427077949047, 0.1021060198545456, 0.38889721035957336, 1.2803813219070435, 0.6050092577934265, -0.08691868185997009, 0.1959841549396515, -0.08294264227151871, 0.15136019885540009, -1.3294957876205444, -0.25248661637306213, -0.8888131976127625, 1.04836356639862...
func (w *Packer) PutUint16(v uint16) { binary.LittleEndian.PutUint16(w.scratch[:], v) _, _ = w.buf.Write(w.scratch[:2]) }
[ 0.686255156993866, 0.5964796543121338, 0.3376646935939789, -1.313090205192566, 0.6246320605278015, 0.17847564816474915, 0.23379167914390564, -0.2175319492816925, -0.039482153952121735, 0.005335042253136635, -1.001346468925476, 0.1348315328359604, 0.45666661858558655, 0.29696208238601685, ...
func (w *Packer) PutUint32(v uint32) { binary.LittleEndian.PutUint32(w.scratch[:], v) _, _ = w.buf.Write(w.scratch[:4]) }
[ 0.38108184933662415, 0.9944730401039124, 0.4240504205226898, -1.662214994430542, 0.13653621077537537, 0.7116096019744873, -0.19637618958950043, -0.5584241151809692, -0.40600210428237915, -0.12195983529090881, -1.0173946619033813, -0.19725672900676727, 0.1874409168958664, 0.6415314674377441...
func (w *Packer) PutUint64(v uint64) { binary.LittleEndian.PutUint64(w.scratch[:], v) _, _ = w.buf.Write(w.scratch[:8]) }
[ -0.23756182193756104, 0.893339991569519, 0.39056167006492615, -0.3226124346256256, 0.6296342611312866, -0.15599657595157623, 0.4900718927383423, -0.21226227283477783, 0.08951495587825775, -0.06656073778867722, -0.7471410036087036, -0.26136404275894165, 0.12555819749832153, 0.79340243339538...
func (w *Packer) Bytes() []byte { return w.buf.Bytes() }
[ -0.0012345182476565242, -0.4805728793144226, 0.37949657440185547, -0.3268257975578308, 0.32129865884780884, -0.04489852860569954, -0.8995640873908997, -0.34489837288856506, 0.325904905796051, -0.600634753704071, -0.8164308667182922, 0.7907625436782837, -0.5137938857078552, 0.87783336639404...
func MakeNippo(issues []api.Issue, now time.Time) string { issueList := "" for _, issue := range issues { issueList += fmt.Sprintf("• %s %s\n", issue.Title, issue.URL) } template := `📅 日報 %s *今日やること* • … *昨日やったこと* • … %s *業務で気づいたこと* • … ` today := now.Format("2006/01/02") return fmt.Sprintf(template, today...
[ -0.530030369758606, -0.5521119236946106, 0.8718311786651611, -0.8754944205284119, -1.147423505783081, 0.14617159962654114, -1.2546374797821045, 0.0005564513267017901, -0.572478711605072, 0.378996878862381, -0.7123427987098694, -0.9835182428359985, 0.47693681716918945, -0.0952874943614006, ...
func accountBalancesAtTime(store storage.Storage, a storage.Account, at time.Time) (storage.Balances, error) { bs, err := store.SelectAccountBalances(a.ID) if err != nil { return storage.Balances{}, errors.Wrapf(err, "selecting balances for account: %+v", a) } c := filter.BalanceNot(filter.BalanceAfter(at)) filt...
[ 0.08582603931427002, -0.6745995283126831, 0.6031584143638611, 0.03935793414711952, -0.3307355046272278, 0.15795168280601501, -0.20262537896633148, -1.5305553674697876, 0.3955939710140228, 0.30467379093170166, 0.17065143585205078, 0.6624839305877686, 0.49318549036979675, 0.21444249153137207...