text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (r *CheckSchemaResponse) Assertion() []*assertly.Validation { var result = make([]*assertly.Validation, 0) if r.Validation != nil { result = append(result, r.Validation) } if len(r.Tables) > 0 { for i := range r.Tables { if validation := r.Tables[i].Validation; validation != nil { validation.Descrip...
[ -0.9076122045516968, -0.45796018838882446, 0.48816120624542236, 0.7833204865455627, 0.6293883323669434, 0.23554883897304535, 0.12686267495155334, -0.06401454657316208, 0.6445850133895874, 0.2221549153327942, 0.1611701250076294, -0.013841905631124973, -0.41685590147972107, 1.266104221343994...
func Read(config *config.Config, path string) (*Batch, error) { return ReadFs(config, path, afero.NewOsFs()) }
[ 0.23443296551704407, -0.20780037343502045, 0.41296055912971497, 1.0407657623291016, -0.3089710474014282, -0.060609765350818634, -0.27802518010139465, -0.25340893864631653, -0.8921486735343933, -0.37814581394195557, 0.33280226588249207, 0.39554744958877563, 0.35315170884132385, 0.2466487139...
func ReadFs(config *config.Config, path string, fs afero.Fs) (*Batch, error) { fullPath := config.Path(path) yamlBatch, err := afero.ReadFile(fs, fullPath) if err != nil { return nil, fmt.Errorf("cannot read batch file %s: %v", path, err) } batch := &Batch{} if err := yaml.Unmarshal(yamlBatch, batch); err != ...
[ 0.14932596683502197, -0.19784563779830933, 0.5904091596603394, -0.2711930572986603, -0.6609777212142944, 0.015802942216396332, -0.3011142611503601, 0.1292443722486496, -0.674379289150238, -0.3457745909690857, 1.1040271520614624, 0.4447920024394989, 0.3981703221797943, 0.1815265715122223, ...
func (b *backendImpl) ManagerInternalGetVodsByUser(ctx context.Context, request *models.ManagerInternalGetVodsByUserRequest) (*models.VodsResponse, error) { b.Stat(managerInternalGetVodsByUserAttemptStatStr) userIDStr := strconv.FormatInt(request.ChannelID, 10) getUserInput := vinyl.GetVodsByUserInput{ BroadcastT...
[ -0.3288687765598297, -0.015743279829621315, 0.7768592834472656, -0.4232783019542694, -0.5718380212783813, -0.45067307353019714, -0.021997755393385887, -0.6455891728401184, -0.4449942111968994, 0.08534925431013107, 0.6392472386360168, 1.606278896331787, -0.48547184467315674, 0.8542007207870...
func imageDiff(img1, img2 image.Image) int64 { var accumError int64 bounds := img1.Bounds() for x := 0; x < bounds.Dx(); x++ { for y := 0; y < bounds.Dy(); y++ { r1, g1, b1, a1 := img1.At(x, y).RGBA() r2, g2, b2, a2 := img2.At(x, y).RGBA() accumError += sqDiff(r1, r2) accumError += sqDiff(g1, g2) a...
[ -0.5245484709739685, -0.45987948775291443, 0.6551108360290527, -0.26924577355384827, -0.34923478960990906, 0.08627967536449432, 0.2751151919364929, -0.39585068821907043, -0.33724066615104675, 0.023609846830368042, 0.4406890869140625, 0.9719880819320679, 0.17503589391708374, 1.1532012224197...
func loadSpriteFromDisk(file string) (image.Image, error) { f, err := os.Open(file) if err != nil { return nil, err } defer f.Close() return jpeg.Decode(f) }
[ 0.31740710139274597, -0.06956932693719864, 0.7319638729095459, -0.5909817218780518, -1.540030837059021, 0.3970434069633484, -0.10103284567594528, -0.2630811929702759, -0.4762096703052521, 0.5669846534729004, -0.41411158442497253, 0.015278545208275318, -0.24715159833431244, -0.2838616073131...
func (s *Scheduler) Shutdown() error { if s.crontab == nil { return nil } log.Debug().Msg("stopping scheduler") ctx := s.crontab.Stop() <-ctx.Done() s.mu.Lock() for _, job := range s.crontab.Entries() { if cancel, ok := s.activeJobs[job.ID]; ok { cancel() } } s.mu.Unlock() err := ctx.Err() if err...
[ 0.37513697147369385, -0.8520119190216064, 0.5717560648918152, 0.6551200151443481, -0.2323797196149826, -0.18594026565551758, -0.4646344780921936, 0.6499373316764832, 0.3599870502948761, 0.41885197162628174, 0.3389200270175934, -0.2642941474914551, -0.2714736759662628, -0.18240444362163544,...
func (s *Scheduler) StopJob(jobID string) error { id, err := strconv.Atoi(jobID) if err != nil { return errors.Wrapf(err, "failed convert jobID %q to int", jobID) } entryID := cron.EntryID(id) s.mu.Lock() if cancel, ok := s.activeJobs[entryID]; ok { cancel() } s.mu.Unlock() return nil }
[ 0.08056794106960297, -0.9752850532531738, 0.31419292092323303, 0.06235746666789055, -0.4963778555393219, -0.04182371124625206, 0.03941550850868225, -0.39166054129600525, -0.11582418531179428, 0.3982660472393036, 0.1286085844039917, -0.023596428334712982, -1.1002476215362549, 0.002529760589...
func (s *Scheduler) StartJobEvery(duration time.Duration, job func() error) string { ctx, cancel := context.WithCancel(context.Background()) j := cron.FuncJob(func() { if err := job(); err != nil { log.Debug().Msg("job returned an error") cancel() } }) entryID := s.crontab.Schedule(cron.Every(duration),...
[ 0.9194857478141785, -0.775938093662262, 0.7987290024757385, -0.08576932549476624, -0.709265947341919, -0.44727230072021484, -0.4073077142238617, 0.34811830520629883, -0.2073162943124771, 0.634021520614624, -0.15622736513614655, 0.45599886775016785, -0.012821205891668797, 0.52141934633255, ...
func printTable(data []string, color bool) { var listType string table := tablewriter.NewWriter(os.Stdout) switch color { case true: listType = "White" case false: listType = "Black" } table.SetHeader([]string{"#", "B/W", "CIDR"}) for i, v := range data { l := make([]string, 0) l = append(l, strconv...
[ 0.41669291257858276, 0.24967803061008453, 0.6828307509422302, -0.2925931215286255, 0.3172084391117096, 0.11246927082538605, -0.8609009385108948, 0.0445101298391819, -0.6128509044647217, 0.8051061630249023, 0.6381545066833496, 0.30187034606933594, -0.5903154611587524, 0.4047819674015045, ...
func (m *UserDetails) Validate(formats strfmt.Registry) error { return nil }
[ 1.3312793970108032, 0.7837668657302856, 0.08092588931322098, 0.15672358870506287, 0.4609564244747162, 0.9066364169120789, 0.730316162109375, -0.04433303698897362, -0.350165992975235, -1.1875391006469727, 0.33826103806495667, 0.17298397421836853, -1.3187686204910278, 0.683408796787262, 0....
func NewFileSystemRepository(dir string) (*FileSystemRepository, error) { repo := &FileSystemRepository{definitions: make(map[string]*Definition)} // Grab json files from directory files, err := ioutil.ReadDir(dir) if nil != err { return nil, err } for _, f := range files { if strings.Contains(f.Name(), ".j...
[ -0.5846642255783081, -0.3855270743370056, 0.43362727761268616, -0.45948219299316406, -0.039053864777088165, -1.1635619401931763, -0.47241437435150146, 0.40387293696403503, 0.24327462911605835, -0.34983333945274353, 0.05333230644464493, -0.4887724220752716, 0.1491730958223343, 0.88954365253...
func (r *FileSystemRepository) FindAll() ([]*Definition, error) { r.RLock() defer r.RUnlock() var definitions []*Definition for _, definition := range r.definitions { definitions = append(definitions, definition) } return definitions, nil }
[ 0.09800305962562561, -0.0312394630163908, 0.2749782204627991, 1.1637290716171265, 1.1106064319610596, -0.6270813941955566, -0.6625276207923889, -0.3586593270301819, -0.2962237298488617, -0.4306388199329376, -0.23450841009616852, -0.24621880054473877, -0.5192021131515503, 2.0077624320983887...
func (r *FileSystemRepository) FindValidAPIHealthChecks() ([]*Definition, error) { r.RLock() defer r.RUnlock() var definitions []*Definition for _, definition := range r.definitions { if definition.HealthCheck.URL != "" { definitions = append(definitions, definition) } } return definitions, nil }
[ -0.11180130392313004, -0.8748504519462585, 0.1964689940214157, 0.5039350986480713, 0.6616538763046265, -0.2904264032840729, -0.4838907718658447, -0.4738132357597351, -0.35304778814315796, -1.2744089365005493, 0.3727564513683319, -0.28818246722221375, -0.8404574990272522, 1.2351089715957642...
func (r *FileSystemRepository) FindByName(name string) (*Definition, error) { r.RLock() defer r.RUnlock() return r.findByName(name) }
[ 0.10103067010641098, 0.37818819284439087, 0.2127348631620407, -0.009049652144312859, -0.046094466000795364, -1.5771719217300415, 0.1363028734922409, -0.9202131628990173, -0.6666927337646484, 0.10360299050807953, -0.688922107219696, -1.0367546081542969, -0.8166806101799011, 1.45694935321807...
func (r *FileSystemRepository) FindByListenPath(path string) (*Definition, error) { r.RLock() defer r.RUnlock() for _, definition := range r.definitions { if definition.Proxy.ListenPath == path { return definition, nil } } return nil, ErrAPIDefinitionNotFound }
[ 0.614562451839447, -0.6141182780265808, 0.515748918056488, -0.41591590642929077, 0.1990085244178772, -0.9145053625106812, -0.16998262703418732, -1.0717101097106934, -0.05005774274468422, 0.6295695304870605, 0.2540789246559143, -0.2366522252559662, -1.1248263120651245, 0.637000322341919, ...
func (r *FileSystemRepository) Exists(def *Definition) (bool, error) { return exists(r, def) }
[ -1.3904838562011719, 0.5940433144569397, 0.3014501631259918, 0.4402880072593689, 1.3990508317947388, -0.6728773713111877, -0.6299823522567749, 0.051081303507089615, -0.42611822485923767, -0.45917755365371704, -0.23053954541683197, -0.9212859869003296, 0.2661639451980591, 0.6912948489189148...
func (r *FileSystemRepository) Add(definition *Definition) error { r.Lock() defer r.Unlock() isValid, err := definition.Validate() if false == isValid && err != nil { log.WithError(err).Error("Validation errors") return err } r.definitions[definition.Name] = definition return nil }
[ -0.6159279346466064, -0.00528696458786726, 0.487541139125824, 0.3499540388584137, 1.0949043035507202, -0.07428582012653351, -0.5035697817802429, 0.23740161955356598, 0.2712737023830414, -0.8102450966835022, 0.2376939207315445, -0.6332472562789917, -0.42669668793678284, 0.9674555659294128, ...
func (r *FileSystemRepository) Remove(name string) error { r.Lock() defer r.Unlock() if _, err := r.findByName(name); err != nil { return err } delete(r.definitions, name) return nil }
[ -0.33478423953056335, 0.6256754994392395, 0.2897130250930786, -0.28868183493614197, 0.09367921948432922, -1.3605455160140991, -0.17021429538726807, 0.3020678758621216, 0.012678203172981739, -0.2283177673816681, -0.5087693929672241, -1.15885591506958, -0.9256303906440735, 0.831203281879425,...
func (p OpenFlow10Protocol) String() string { return "OpenFlow 1.0" }
[ 0.2418467402458191, -1.3092267513275146, 0.31009161472320557, -0.5910884141921997, 0.3872734606266022, 0.925868034362793, 0.8216474652290344, -1.015355110168457, 0.0799512267112732, 0.2828924357891083, 0.03766518086194992, 0.1899917721748352, -1.175567388534546, -0.5153132677078247, 0.70...
func (p OpenFlow10Protocol) GetVersion() uint8 { return goloxi.VERSION_1_0 }
[ 0.4930989146232605, -0.04336176812648773, 0.28173327445983887, 0.6971420645713806, 1.595019817352295, 0.2563956677913666, 1.017112374305725, 0.08952710777521133, -0.1323397159576416, 0.093370720744133, -1.020031452178955, 0.11273812502622604, -1.5780938863754272, -0.17611128091812134, 1....
func (p OpenFlow10Protocol) NewHello(versionBitmap uint32) goloxi.Message { return of10.NewHello() }
[ 0.5477185249328613, -0.049472395330667496, 0.30775585770606995, 0.23388172686100006, 0.7425069808959961, -0.11129285395145416, 0.3144289553165436, -0.28123563528060913, -0.3935341536998749, 0.03340189903974533, -0.5969323515892029, 0.05802495777606964, -0.24506248533725739, 0.0722593963146...
func (p OpenFlow10Protocol) NewEchoRequest() goloxi.Message { return of10.NewEchoRequest() }
[ -0.5846059322357178, -0.20005680620670319, 0.32947808504104614, -0.3599264621734619, 0.01390834804624319, -0.5550785660743713, -0.07638762146234512, -0.24619713425636292, -0.45954838395118713, -0.21500682830810547, 0.1933864802122116, -0.08888878673315048, 0.24017482995986938, -0.026064902...
func (p OpenFlow10Protocol) NewEchoReply() goloxi.Message { return of10.NewEchoReply() }
[ -0.1634276658296585, -0.36870214343070984, 0.3210212290287018, -0.8943061828613281, 0.23206250369548798, -0.5160069465637207, -0.511526346206665, -0.3244129717350006, -0.24492794275283813, -0.04676077887415886, -0.199684739112854, 0.03659900650382042, -0.29232344031333923, -0.3623727560043...
func (p OpenFlow10Protocol) NewBarrierRequest() goloxi.Message { return of10.NewBarrierRequest() }
[ -0.0777747854590416, -0.6210137009620667, 0.3333505690097809, -0.19357343018054962, 0.2862435281276703, -0.6103425621986389, 0.1377677619457245, -0.6539919376373291, -0.3067378103733063, -0.7843657732009888, 0.14262478053569794, 0.1638685017824173, -0.5977980494499207, 0.9778953194618225, ...
func (p OpenFlow10Protocol) DecodeMessage(data []byte) (goloxi.Message, error) { return of10.DecodeMessage(data) }
[ -0.2173766940832138, 0.2939985692501068, 0.25491753220558167, -0.3459835648536682, 1.4913280010223389, -0.6438877582550049, 0.0026071416214108467, -0.2853015065193176, 0.42568376660346985, -0.9650430679321289, -0.12750877439975739, -0.6198872923851013, -1.549668788909912, 0.371585130691528...
func Match(projectName string) bool { return reGithubProject.MatchString(projectName) }
[ 0.050911083817481995, 1.0005369186401367, 0.23813171684741974, 0.6553035378456116, -0.5330135822296143, 1.6354849338531494, 0.21821549534797668, 0.3131221830844879, -0.17439277470111847, -0.16206412017345428, 0.17009657621383667, -0.35830727219581604, -1.4791511297225952, -0.30971917510032...
func New(ctx context.Context, client *http.Client, projectName string) (*tree.FS, error) { p, err := newGithubProject(ctx, client, projectName) if err != nil { return nil, err } start := time.Now() t, err := p.getTree(ctx) if err != nil { return nil, err } log.Printf("Loaded project with %d files in %.1fs",...
[ 0.037463195621967316, 0.49286720156669617, 0.4065025746822357, -0.4853259027004242, -0.13477563858032227, -0.665107250213623, -0.12699903547763824, -0.2525867521762848, -1.103729486465454, -0.20449046790599823, 0.32091590762138367, -0.052462875843048096, -0.4480991065502167, 0.799172222614...
func (p *project) contentLoader(sha string) func(context.Context) ([]byte, error) { return func(ctx context.Context) ([]byte, error) { blob, _, err := p.client.Git.GetBlob(ctx, p.owner, p.repo, sha) if err != nil { return nil, errors.Wrap(err, "failed getting blob") } switch encoding := blob.GetEncoding(); ...
[ 0.06137103587388992, -0.7024705410003662, 0.3704720139503479, -0.5334556102752686, -1.0336421728134155, -0.04584025219082832, -0.643922746181488, -0.9446661472320557, 0.4060249924659729, 0.5187395215034485, 0.23025014996528625, -0.1692090630531311, -0.4476446807384491, 0.3095649778842926, ...
func clearbit(addr *uint64, n uint32)
[ 0.34412282705307007, 1.0590373277664185, 0.2962390184402466, -0.13907092809677124, -0.9755092263221741, 0.9205108880996704, -0.63941490650177, -1.5751556158065796, -0.15414144098758698, 0.49640387296676636, 0.5127240419387817, 0.6806394457817078, -0.09302312880754471, -0.00339339068159461,...
func enableIRQ() { vcpu := &_atman_shared_info.VCPUInfo[0] vcpu.UpcallMask = 0 }
[ 0.0006069886148907244, -0.4675545394420624, 0.32542210817337036, 0.0682746022939682, 1.2896764278411865, 0.35581663250923157, 0.8371322154998779, 0.8911983966827393, -0.20662438869476318, -0.4926867187023163, -0.6126185655593872, 0.5199958682060242, -1.3323533535003662, -0.4281663298606872...
func CreateVMWithMSI(ctx context.Context, vmName, nicName, username, password string) (vm compute.VirtualMachine, err error) { nic, _ := network.GetNic(ctx, nicName) vmClient := getVMClient() future, err := vmClient.CreateOrUpdate( ctx, config.GroupName(), vmName, compute.VirtualMachine{ Location: to.Str...
[ 0.332239031791687, -0.002495391760021448, 0.48604467511177063, 0.08377749472856522, 0.3086453378200531, -0.10791724175214767, -0.6751431822776794, -0.921576201915741, 0.12948837876319885, 0.32321134209632874, -0.36471644043922424, -0.7585774660110474, -0.7231104373931885, -0.11427539587020...
func AddIdentityToVM(ctx context.Context, vmName string) (ext compute.VirtualMachineExtension, err error) { extensionsClient := getVMExtensionsClient() future, err := extensionsClient.CreateOrUpdate( ctx, config.GroupName(), vmName, "msiextension", compute.VirtualMachineExtension{ Location: to.StringPtr...
[ -0.17104344069957733, -0.079349085688591, 0.8252378106117249, 0.320319265127182, 0.033255111426115036, 0.27064603567123413, -0.7296575307846069, 0.17064957320690155, 1.378414511680603, 0.4892818331718445, -0.32101815938949585, 0.24982117116451263, -1.342939019203186, 0.1595240831375122, ...
func CreateVMWithUserAssignedID(ctx context.Context, vmName, nicName, username, password string, id msi.Identity) (vm compute.VirtualMachine, err error) { nic, _ := network.GetNic(ctx, nicName) vmClient := getVMClient() future, err := vmClient.CreateOrUpdate( ctx, config.GroupName(), vmName, compute.VirtualM...
[ 0.1573636680841446, -0.7868701815605164, 0.3687528967857361, -0.03570055961608887, 0.32132530212402344, 0.4074850380420685, -0.0681881383061409, -0.8723875284194946, 0.23078982532024384, 0.34628626704216003, -0.10431730002164841, 0.027918068692088127, -0.22863814234733582, 0.24183003604412...
func AddUserAssignedIDToVM(ctx context.Context, vmName string, id msi.Identity) (*compute.VirtualMachine, error) { vmClient := getVMClient() future, err := vmClient.Update( ctx, config.GroupName(), vmName, compute.VirtualMachineUpdate{ Identity: &compute.VirtualMachineIdentity{ Type: compute.ResourceId...
[ -0.6436939835548401, -0.9275519251823425, 0.30644381046295166, -0.06699250638484955, -0.09447669982910156, 0.4534044563770294, -0.324614554643631, -0.42799627780914307, 0.04733559116721153, 0.08616504073143005, -0.2440539300441742, 0.48215875029563904, -0.17613326013088226, -0.038762163370...
func RemoveUserAssignedIDFromVM(ctx context.Context, vmName string, id msi.Identity) (*compute.VirtualMachine, error) { vmClient := getVMClient() future, err := vmClient.Update( ctx, config.GroupName(), vmName, compute.VirtualMachineUpdate{ Identity: &compute.VirtualMachineIdentity{ Type: compute.Resou...
[ -0.12981049716472626, -0.9361490607261658, 0.1443292498588562, -0.03791879862546921, -0.9130923748016357, 0.3617587387561798, -0.19415442645549774, -0.1989615261554718, -0.10689682513475418, 0.8766404986381531, 0.2848551869392395, 0.589037299156189, -0.8702423572540283, -0.2715709805488586...
func BackupCmd() *cobra.Command { cmd := &cobra.Command{ Use: "backup", Short: "Backup the wallet", Run: backupCmd, } addBakupCmdFlags(cmd) return cmd }
[ 1.078982949256897, -0.44650018215179443, 0.5674737095832825, -0.2925167381763458, 0.08673987537622452, 0.09180629253387451, 0.09274459630250931, 0.3628023862838745, 0.477981299161911, -0.9341098666191101, 0.4149715304374695, -0.10643040388822556, -0.18324008584022522, 0.13925625383853912, ...
func PrepareCmd() *cobra.Command { cmd := &cobra.Command{ Use: "prepare", Short: "Prepare the wallet", Run: prepareCmd, } addRetrieveCmdFlags(cmd) return cmd }
[ 0.742727518081665, -0.289224237203598, 0.5054776668548584, -0.40322208404541016, 0.10045678168535233, -0.334747314453125, 0.10761518776416779, 0.4320644438266754, 0.9364758729934692, -0.6737639904022217, 0.5406141877174377, 0.03164913132786751, 0.11514679342508316, 0.5561149716377258, 0....
func PerformCmd() *cobra.Command { cmd := &cobra.Command{ Use: "perform", Short: "Perform the retrieve", Run: performCmd, } addPerformCmdFlags(cmd) return cmd }
[ 0.9599626660346985, -0.4694027900695801, 0.6267864108085632, -0.19779859483242035, 0.9840578436851501, 0.22096098959445953, 0.6375998854637146, 0.785610556602478, 0.1748952567577362, -1.3147715330123901, 1.3102169036865234, 0.19517868757247925, -0.0748344287276268, 0.3970675468444824, 1....
func CancelCmd() *cobra.Command { cmd := &cobra.Command{ Use: "cancel", Short: "Cancel the retrieve", Run: cancelCmd, } addRetrieveCmdFlags(cmd) return cmd }
[ 1.9297230243682861, -0.8916403651237488, 0.5666664242744446, -0.30471646785736084, 0.017903415486216545, 0.6358111500740051, -0.1318499594926834, 1.0583336353302002, 0.3704051375389099, -1.18268883228302, 0.9976697564125061, 0.10049302875995636, 0.28555038571357727, 0.02766057662665844, ...
func MbBytesToUint16(bytes []byte) []uint16 { values := make([]uint16, len(bytes)/2) for i := range values { values[i] = binary.BigEndian.Uint16(bytes[i*2 : (i+1)*2]) } return values }
[ 0.08101513236761093, -0.30151885747909546, 0.5492433905601501, -0.37527111172676086, 0.777768611907959, 0.11064424365758896, -0.11798248440027237, 0.7398929595947266, 0.32992270588874817, 0.5580606460571289, -0.8553211092948914, -0.29012531042099, -0.585499107837677, -0.04504365473985672, ...
func MbUint16ToBytes(values []uint16) []byte { bytes := make([]byte, len(values)*2) for i, value := range values { binary.BigEndian.PutUint16(bytes[i*2:(i+1)*2], value) } return bytes }
[ 0.3398008644580841, 0.5931665897369385, 0.5196712017059326, 0.12110137939453125, 0.5539961457252502, 0.29616013169288635, -0.7486868500709534, -0.4297329783439636, -0.4858483076095581, 0.07031016796827316, -0.6128722429275513, -0.4413408637046814, -0.42040684819221497, 0.656583845615387, ...
func (u User) MarshalJSON() ([]byte, error) { return json.Marshal(map[string]interface{}{ "id": u.ID, "address": u.Address, "balance": float64(u.Balance) / 1e8, "pending_balance": float64(u.PendingBalance) / 1e8, "track_id": u.TrackID, "created_at": u.CreatedAt, "...
[ -0.4301125407218933, -0.022417251020669937, 0.44986024498939514, 0.15665565431118011, -0.8980251550674438, 0.23418377339839935, 0.36794593930244446, -0.2678162455558777, 0.1293560117483139, -0.5876374840736389, -1.1183996200561523, 0.3660459816455841, 0.23602652549743652, 0.366581559181213...
func initPath() { AppPath, _ = os.Getwd() RootPath = strings.Replace(AppPath, "app", "", 1) }
[ 0.8454014658927917, -0.7182862162590027, 0.46715638041496277, 1.1348456144332886, -0.12381011247634888, 0.7521465420722961, 0.751701295375824, 0.28043827414512634, 0.11258506029844284, 0.32579705119132996, 0.25263574719429016, 0.8473730087280273, -0.20574848353862762, 1.0207568407058716, ...
func NewMessageWriter(kind string) MessageWriter { if kind == "kafka" { return kafka.NewWriter() } return NewDefaultWriter() }
[ -0.3568541705608368, 0.10273031890392303, 0.3139581084251404, 1.305614709854126, -0.48991137742996216, -1.0960968732833862, -0.5503554940223694, 0.17960093915462494, 0.17593249678611755, 0.3560418486595154, 0.3670300841331482, -0.3237868547439575, -0.7913264632225037, 1.5746419429779053, ...
func NewMockClient(ctrl *gomock.Controller) *MockClient { mock := &MockClient{ctrl: ctrl} mock.recorder = &MockClientMockRecorder{mock} return mock }
[ 0.05614539235830307, 0.1355169713497162, 0.2052134871482849, 0.2738620936870575, 0.11878590285778046, 0.1517292708158493, 0.6964475512504578, -0.5070502161979675, 0.17511644959449768, 0.3037686049938202, -0.8944054841995239, 0.4057541489601135, -0.6633550524711609, 0.3086087107658386, 0....
func (m *MockClient) EXPECT() *MockClientMockRecorder { return m.recorder }
[ 0.29976603388786316, 0.09236734360456467, 0.24792428314685822, -0.23549090325832367, -0.074150949716568, 0.2950023412704468, 0.3074798285961151, 0.032393928617239, 0.003783199470490217, -0.20483624935150146, 0.5916558504104614, 0.9741698503494263, -1.1806185245513916, 0.6945529580116272, ...
func (m *MockClient) GetKind() string { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetKind") ret0, _ := ret[0].(string) return ret0 }
[ 0.3590168356895447, 0.4186149537563324, 0.22930194437503815, 0.9071000218391418, 1.5801217555999756, -0.008098511956632137, 0.9798183441162109, -1.1859221458435059, -0.7865755558013916, -0.4140063226222992, -0.33617109060287476, 0.3629549443721771, -1.135504126548767, 0.9819446206092834, ...
func (mr *MockClientMockRecorder) GetKind() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetKind", reflect.TypeOf((*MockClient)(nil).GetKind)) }
[ 0.42641180753707886, 1.118723750114441, 0.27619433403015137, 0.42828723788261414, 0.6921562552452087, -0.2284010499715805, 0.3078950345516205, -1.1895265579223633, 0.314242959022522, 0.5883047580718994, 0.508655309677124, 1.3894075155258179, -1.1327861547470093, 1.290910243988037, 0.3470...
func (m *MockClient) Fetch(keyword string) (*[]linebot.Response, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Fetch", keyword) ret0, _ := ret[0].(*[]linebot.Response) ret1, _ := ret[1].(error) return ret0, ret1 }
[ -0.06262665241956711, -0.998250424861908, 0.28280043601989746, 0.2769404649734497, 0.2700946629047394, 0.7231769561767578, -0.21593539416790009, -0.8732222318649292, -0.25176894664764404, -0.3381999433040619, -0.927966296672821, -0.001227117725647986, -0.09020112454891205, 1.46663475036621...
func (mr *MockClientMockRecorder) Fetch(keyword interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Fetch", reflect.TypeOf((*MockClient)(nil).Fetch), keyword) }
[ 0.525213897228241, 0.31902942061424255, 0.049911681562662125, 0.1399289220571518, -0.9145243763923645, 0.6262162327766418, -1.0785995721817017, -1.315485954284668, 0.9368930459022522, 0.45620161294937134, 0.13671068847179413, 1.0832690000534058, -0.5046113133430481, 2.053525686264038, 0....
func NewMockApi(ctrl *gomock.Controller) *MockApi { mock := &MockApi{ctrl: ctrl} mock.recorder = &MockApiMockRecorder{mock} return mock }
[ -0.31084367632865906, -0.3741248548030853, 0.18323205411434174, 0.6239402890205383, 0.1838846504688263, -0.0869535505771637, 0.03844745457172394, 0.2324485033750534, 0.21303391456604004, 0.524294912815094, -1.0512446165084839, -0.18856270611286163, -0.7231671214103699, 0.8822851181030273, ...
func (m *MockApi) EXPECT() *MockApiMockRecorder { return m.recorder }
[ -0.3178374469280243, 0.06520126760005951, 0.22475793957710266, -0.059053607285022736, -0.05294063687324524, -0.035466209053993225, -0.30210256576538086, 0.3045629858970642, 0.2958622872829437, -0.14802689850330353, 0.5393847823143005, 0.3027315139770508, -1.3668975830078125, 0.317784726619...
func (m *MockApi) Get(url string) (*http.Response, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", url) ret0, _ := ret[0].(*http.Response) ret1, _ := ret[1].(error) return ret0, ret1 }
[ -1.3267892599105835, -0.6045176386833191, 0.5123448371887207, 0.035645194351673126, 1.138619065284729, -0.20255425572395325, 0.42344167828559875, -0.43331724405288696, -0.8171856999397278, -0.27014800906181335, -0.913972020149231, -0.3340222239494324, -0.5863097310066223, 0.554692685604095...
func (mr *MockApiMockRecorder) Get(url interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockApi)(nil).Get), url) }
[ -0.873920738697052, 0.6074441075325012, 0.3949609100818634, -0.2526874542236328, 0.29336217045783997, -0.1025390550494194, -0.6417938470840454, -0.6628170013427734, 0.45076340436935425, 0.6078202128410339, 0.36492398381233215, 0.8178607225418091, -0.8804700970649719, 1.1697746515274048, ...
func TestOAuthServiceAccountClientEvent(t *testing.T) { tests := map[string]struct { annotationPrefix string annotation string expectedEventReason string expectedEventMsg string numEvents int expectBadRequest bool }{ "test-good-url": { annotationPrefix: saoauth.OAuthRedir...
[ 0.2656860947608948, -0.2351318746805191, 0.7190726399421692, -0.23779073357582092, 0.6324071884155273, 0.06960156559944153, 0.6536188125610352, -0.8593805432319641, 1.1904008388519287, -1.1593743562698364, 0.2509342432022095, 0.6880372762680054, 0.6794549822807312, -0.10805491358041763, ...
func runTestOAuthFlow(t *testing.T, ts *testServer, sa *kapi.ServiceAccount, secret *kapi.Secret, redirectURL string, expectBadRequest bool) { oauthClientConfig := &osincli.ClientConfig{ ClientId: apiserverserviceaccount.MakeUsername(sa.Namespace, sa.Name), ClientSecret: string(secret.Data[kapi.ServiceAccountT...
[ -0.06331928074359894, 0.03617614880204201, 0.6295469999313354, -0.0362498015165329, 0.5002037882804871, -0.1841467171907425, 0.7347835898399353, -0.5930384993553162, 0.7790041565895081, -0.13977715373039246, 0.40441247820854187, 1.1675405502319336, 0.06298303604125977, 0.12152496725320816,...
func removeArmoringDelimiters(lines []string) []string { return lines[4 : len(lines)-2] }
[ -0.07978571951389313, -0.9204450845718384, 0.4662778675556183, -0.4561648964881897, -0.5420381426811218, -0.1853635013103485, -1.1436264514923096, 0.3386194705963135, 0.28280824422836304, 0.7136269211769104, -0.281112939119339, 0.23272259533405304, -0.9886597394943237, -0.46410390734672546...
func decompress(in []byte) ([]byte, error) { r, err := zlib.NewReader(bytes.NewBuffer(in)) if err != nil { return nil, errors.New("decompression failed") } buf := new(bytes.Buffer) _, err = buf.ReadFrom(r) //log.Printf("Decompressed %d bytes from %d bytes\n", unzippedLen, len(in)) if err != nil { return nil...
[ 0.09101662784814835, -0.19970214366912842, 0.5907099843025208, -0.4138793647289276, -1.4175993204116821, -0.2726585865020752, 0.4213491380214691, -0.07133163511753082, -0.07008227705955505, -0.7463735938072205, -1.0057927370071411, -0.1685609072446823, -1.456967830657959, 0.171631455421447...
func (service HomesyncServerService) Upload(info foldermonitor.FileInfo) { request, err := service.newfileUploadRequest(service.BaseUrl+"api/upload", info.Path, info.RelativePath) if err != nil { log.Fatal(err) panic(err) } client := &http.Client{} _, err = client.Do(request) if err != nil { panic(err) } ...
[ -0.43273434042930603, 0.7044289112091064, 0.7839810848236084, 0.8518040776252747, 0.9745312929153442, 0.02093694731593132, 0.05119568482041359, -0.7564302086830139, -1.5759650468826294, -0.04892006143927574, 0.3066917061805725, 0.16027650237083435, -0.4398895800113678, 0.17489196360111237,...
func (service HomesyncServerService) Remove(info foldermonitor.FileInfo) { form := url.Values{} form.Add("pathToDelete", info.RelativePath) req, _ := http.NewRequest("POST", service.BaseUrl+"api/delete", strings.NewReader(form.Encode())) req.Header.Add("username", service.Username) req.Header.Add("Content-Type", ...
[ -0.3068861961364746, -0.0014250373933464289, 0.7538806200027466, 0.6799911856651306, 0.2588726878166199, -0.12932088971138, -0.1518455445766449, 0.4495852291584015, -0.6463757753372192, -0.22902153432369232, 0.05046243220567703, 0.27604150772094727, -0.8683613538742065, 0.9530717730522156,...
func (service HomesyncServerService) GetFolderTree() map[string]foldermonitor.FileInfo { //should call remote server req, _ := http.NewRequest("GET", service.BaseUrl+"api/tree", nil) req.Header.Add("username", service.Username) client := &http.Client{} response, err := client.Do(req) if err != nil { panic(err)...
[ -0.5305500626564026, -0.06832852214574814, 0.9215116500854492, -0.2085302621126175, 0.1684383600950241, -0.0615050382912159, -0.6130473017692566, -0.3594475984573364, -1.413599967956543, -0.3769814968109131, -0.5587049722671509, 0.7359601259231567, -1.101255178451538, 1.0696806907653809, ...
func RegisterCredentialProviderPlugins(pluginConfigFile, pluginBinDir string) error { if _, err := os.Stat(pluginBinDir); err != nil { if os.IsNotExist(err) { return fmt.Errorf("plugin binary directory %s did not exist", pluginBinDir) } return fmt.Errorf("error inspecting binary directory %s: %w", pluginBinD...
[ -0.05210721492767334, -0.4401797950267792, 0.5986279845237732, 0.1130540668964386, 0.429215669631958, 0.7316399216651917, 0.36751946806907654, 0.26425740122795105, -0.39363837242126465, 0.7280226349830627, -1.0491012334823608, 0.762755274772644, -0.5785952806472778, -0.03089633584022522, ...
func newPluginProvider(pluginBinDir string, provider kubeletconfig.CredentialProvider) (*pluginProvider, error) { mediaType := "application/json" info, ok := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), mediaType) if !ok { return nil, fmt.Errorf("unsupported media type %q", mediaType) } gv, ...
[ -0.6886897683143616, -0.8179756999015808, 0.12297829985618591, 0.3965962529182434, -1.0662755966186523, -0.3642830550670624, -0.464134156703949, 0.17700806260108948, 0.7600544095039368, 1.2726877927780151, -0.14821098744869232, 0.8854385018348694, -0.9903297424316406, 0.43727990984916687, ...
func cacheKeyFunc(obj interface{}) (string, error) { key := obj.(*cacheEntry).key return key, nil }
[ 0.23556499183177948, -0.12330394983291626, 0.2093423753976822, 0.4426267743110657, -0.6510891914367676, -0.08220691978931427, 0.7495633959770203, -0.13141076266765594, 0.5107300877571106, 0.9951348304748535, -0.30719831585884094, 0.5180352330207825, 0.8864419460296631, 0.04462093487381935,...
func (c *cacheExpirationPolicy) IsExpired(entry *cache.TimestampedEntry) bool { return c.clock.Now().After(entry.Obj.(*cacheEntry).expiresAt) }
[ 0.11142443120479584, -0.018334317952394485, 0.13245317339897156, 0.16817107796669006, 0.19572241604328156, 0.4211937189102173, -1.4498636722564697, -0.20115025341510773, 1.442397117614746, 1.1500439643859863, -0.4782826602458954, 0.4386228024959564, 0.35777589678764343, 0.40924522280693054...
func (p *pluginProvider) Provide(image string) credentialprovider.DockerConfig { if !p.isImageAllowed(image) { return credentialprovider.DockerConfig{} } cachedConfig, found, err := p.getCachedCredentials(image) if err != nil { klog.Errorf("Failed to get cached docker config: %v", err) return credentialprovi...
[ -0.8795105218887329, 0.24817904829978943, 0.7690006494522095, 0.5608224868774414, -0.3007444143295288, -0.15479351580142975, 0.4354727566242218, -0.16986657679080963, 0.6522558331489563, 0.695595920085907, 0.15002912282943726, 0.9041297435760498, -0.26849719882011414, 1.1630491018295288, ...
func (p *pluginProvider) Enabled() bool { return true }
[ -0.37982913851737976, -0.6654492616653442, 0.3256588876247406, 0.6282605528831482, 0.35243216156959534, 0.44458332657814026, -0.3308565318584442, 0.9497806429862976, 1.2607589960098267, 0.20179986953735352, -1.580473780632019, 0.19555547833442688, -1.3169001340866089, -0.15942451357841492,...
func (p *pluginProvider) isImageAllowed(image string) bool { for _, matchImage := range p.matchImages { if matched, _ := credentialprovider.URLsMatchStr(matchImage, image); matched { return true } } return false }
[ -0.763235867023468, -0.25990602374076843, 0.4531238377094269, 0.24822872877120972, -0.6051076650619507, -0.48157772421836853, -0.5459595918655396, 0.9330435991287231, 0.1618177890777588, 0.593228816986084, 0.6364126801490784, 0.7116988897323608, -0.8848462104797363, 0.669575572013855, -0...
func (p *pluginProvider) getCachedCredentials(image string) (credentialprovider.DockerConfig, bool, error) { p.Lock() if p.clock.Now().After(p.lastCachePurge.Add(cachePurgeInterval)) { // NewExpirationCache purges expired entries when List() is called // The expired entry in the cache is removed only when Get or ...
[ -0.423700749874115, 0.15219266712665558, 0.9394201040267944, 0.6323563456535339, -0.1619177609682083, -0.3185496926307678, -0.2598990499973297, 0.061398398131132126, 0.08334611356258392, 1.0164110660552979, -0.7695413827896118, 0.43136754631996155, -0.5458382368087769, 1.1091581583023071, ...
func (e *execPlugin) ExecPlugin(ctx context.Context, image string) (*credentialproviderapi.CredentialProviderResponse, error) { klog.V(5).Infof("Getting image %s credentials from external exec plugin %s", image, e.name) authRequest := &credentialproviderapi.CredentialProviderRequest{Image: image} data, err := e.enc...
[ -0.5484175086021423, -0.7619580626487732, 0.8224762082099915, -0.15465718507766724, 0.08678807318210602, -0.12198445200920105, -0.31570887565612793, -0.1509259045124054, 0.1567917764186859, 0.6547355055809021, -0.21020303666591644, 1.0362764596939087, -0.23202142119407654, 0.42737153172492...
func (e *execPlugin) encodeRequest(request *credentialproviderapi.CredentialProviderRequest) ([]byte, error) { data, err := runtime.Encode(e.encoder, request) if err != nil { return nil, fmt.Errorf("error encoding request: %w", err) } return data, nil }
[ -1.512151837348938, -0.09192220121622086, 0.35029834508895874, 0.273780882358551, 0.10445374995470047, 0.25844451785087585, -0.4930705726146698, -0.05346168205142021, 0.695151150226593, 0.27929210662841797, 0.33484598994255066, 1.243550419807434, -0.5298132300376892, 0.9709200859069824, ...
func (e *execPlugin) decodeResponse(data []byte) (*credentialproviderapi.CredentialProviderResponse, error) { obj, gvk, err := codecs.UniversalDecoder().Decode(data, nil, nil) if err != nil { return nil, err } if gvk.Kind != "CredentialProviderResponse" { return nil, fmt.Errorf("failed to decode CredentialProv...
[ -0.8455764055252075, -0.9886682629585266, 0.46506717801094055, -0.14240194857120514, -0.2854815423488617, -0.6151562333106995, 0.09871430695056915, 0.24543091654777527, 1.1961373090744019, 0.23612864315509796, -0.2616145610809326, 0.13748537003993988, -1.4965009689331055, -0.24674491584300...
func parseRegistry(image string) string { imageParts := strings.Split(image, "/") return imageParts[0] }
[ -0.27259382605552673, 0.35663869976997375, 0.30708205699920654, -0.3898513913154602, -0.06654563546180725, -0.8408477902412415, 0.6564173102378845, 0.003953789826482534, 0.47344836592674255, 0.16039247810840607, 0.28284862637519836, 0.05953836441040039, -0.22817648947238922, -0.21142365038...
func mergeEnvVars(sysEnvVars, credProviderVars []string) []string { mergedEnvVars := sysEnvVars for _, credProviderVar := range credProviderVars { mergedEnvVars = append(mergedEnvVars, credProviderVar) } return mergedEnvVars }
[ -1.373051404953003, -0.4138985574245453, 0.3907333314418793, -0.026686454191803932, 0.8001733422279358, 0.940122663974762, -1.2467831373214722, 0.12269599735736847, 0.47100916504859924, 0.6245593428611755, -0.25260478258132935, 0.9612811207771301, -1.1200470924377441, 0.7069796323776245, ...
func ParseQueryString(values map[string][]string) *NgGrid { g := &NgGrid{} if value := values[QS_SORT_DIRECTION]; len(value) != 0 { g.SortDirection = value[0] } if value := values[QS_SORT_FIELD]; len(value) != 0 { g.SortField = value[0] } if value := values[QS_QUERY]; len(value) != 0 { g.Query = value[0] }...
[ -0.2556522786617279, -0.40151000022888184, 0.5028995275497437, -0.5834685564041138, -0.40409213304519653, -0.34916359186172485, -0.17753757536411285, -1.0357822179794312, -0.6897182464599609, -0.16545909643173218, 0.9787295460700989, -0.41426822543144226, 0.292976438999176, 0.0340798497200...
func (g *NgGrid) GetQuery() string { return strings.ToLower(g.Query) }
[ 1.026878833770752, -0.1924724280834198, 0.12922102212905884, 0.18294639885425568, 0.7969164252281189, -0.16154879331588745, -0.9117342829704285, -1.204650640487671, -0.47025179862976074, 0.1328127682209015, 1.4149823188781738, 0.34395065903663635, -0.501825213432312, 0.09830527752637863, ...
func (g *NgGrid) GetPageNumber() int64 { if g.PageNumber == 0 { g.PageNumber = 1 } return g.PageNumber }
[ -0.2806348502635956, 0.8805078864097595, 0.5233765244483948, 0.5621361136436462, 1.1260082721710205, -0.47492170333862305, 0.7504427433013916, 0.5727112293243408, -0.19144488871097565, -0.48182690143585205, 1.1435495615005493, -0.23435212671756744, -0.3929986357688904, 1.3373539447784424, ...
func (g *NgGrid) GetPageSize() int64 { if g.PageSize <= 0 { g.PageSize = 10 } return g.PageSize }
[ 0.3707484304904938, 1.2546935081481934, 0.5851430296897888, -0.264132022857666, 1.2426527738571167, -0.3062049448490143, -0.24240732192993164, 0.2690737843513489, -0.5189711451530457, -0.22778204083442688, 1.427998423576355, -0.06939242035150528, -1.2341665029525757, 0.8677696585655212, ...
func (g *NgGrid) Skip() int64 { return (g.GetPageNumber() - 1) * g.GetPageSize() }
[ -1.052329421043396, 0.7686574459075928, 0.6070747375488281, -0.0778970867395401, -0.11328846961259842, 0.10738730430603027, 0.8422685265541077, -0.9050954580307007, -0.5917478203773499, 0.15086226165294647, 0.4423365294933319, 0.1848151832818985, -0.3165701925754547, -0.5207360982894897, ...
func (g *NgGrid) Limit() int64 { return g.GetPageSize() }
[ 0.15117642283439636, 0.8849024176597595, 0.4948815107345581, 0.10902191698551178, 0.6547380089759827, -0.201478511095047, -0.26788976788520813, -0.10936502367258072, -0.006743507459759712, -0.07792747765779495, 0.8731682896614075, 0.33610397577285767, -0.48477521538734436, -0.2087532430887...
func (g *NgGrid) GenerateSql(tx gorp.SqlExecutor, fields []string) error { var sq bytes.Buffer sq.WriteString("select count(*) ") sq.WriteString("from ( %s ) as t") query := fmt.Sprintf(sq.String(), g.MainQuery) totalCount, err := tx.SelectInt(query) g.TotalCount = totalCount g.FilterCount = g.TotalCount if ...
[ -0.10511435568332672, 0.19406621158123016, 0.904564619064331, -0.12565888464450836, -0.1462433636188507, 0.12454977631568909, 0.4598972797393799, -0.8140535950660706, -0.6274415254592896, -0.08499985933303833, 0.3861871361732483, -0.12622834742069244, 0.6038056015968323, 0.2104249298572540...
func (g *NgGrid) ExecuteSqlParameters(tx gorp.SqlExecutor, target interface{}, fields []string, pars []interface{}) (err error) { if len(g.MainQuery) == 0 { return fmt.Errorf("missing main query") } toRow := g.GetPageNumber() * g.GetPageSize() fromRow := toRow - g.PageSize + 1 var sq bytes.Buffer sq.WriteStri...
[ -0.3980637788772583, 0.08876708149909973, 0.8530145287513733, -0.7470898032188416, 0.030074989423155785, 0.03368430957198143, -0.11897012591362, -1.171743392944336, -0.2915862500667572, 0.8143463134765625, 1.0714999437332153, 0.20353475213050842, 0.20786531269550323, 0.24370822310447693, ...
func NewDeleteCommand() *cobra.Command { var ( flags listFlags all bool allNamespaces bool dryRun bool ) var command = &cobra.Command{ Use: "delete [--dry-run] [WORKFLOW...|[--all] [--older] [--completed] [--resubmitted] [--prefix PREFIX] [--selector SELECTOR]]", Short: "delete...
[ 0.01633562706410885, -0.8469774723052979, 0.4488145709037781, 0.027033772319555283, 0.5840840935707092, -0.24363082647323608, 0.7321515083312988, -0.2222997397184372, 0.3381251096725464, -0.31004467606544495, -0.15272937715053558, 0.8871217370033264, -0.8345173597335815, 1.1263946294784546...
func CompleteFiles(v *nvim.Nvim, a *nvim.CommandCompletionArgs, dir string) (filelist []string, err error) { switch { case len(a.ArgLead) > 0: a.ArgLead = filepath.Clean(a.ArgLead) if pathutil.IsDir(a.ArgLead) { // abs or rel directory path files, err := ioutil.ReadDir(a.ArgLead) if err != nil { return ...
[ 0.10722646117210388, -0.3370605409145355, 1.1952461004257202, 0.7567958831787109, 0.3356468081474304, -0.022204430773854256, 0.44470110535621643, 0.4190719425678253, 0.02662712335586548, 1.2373207807540894, 0.640457272529602, -0.0989491194486618, -0.516416072845459, 0.543439507484436, -0...
func (d deck) print() { for i, card := range d { fmt.Println(i, card) } }
[ -0.7086862921714783, 0.8104338049888611, 0.19501125812530518, -0.3747367262840271, 0.6034695506095886, 0.10341072082519531, -1.1382100582122803, 0.10814274102449417, -0.863945722579956, -1.265816569328308, 0.03287098556756973, 0.7318960428237915, 0.35905924439430237, 0.9920178055763245, ...
func deal(d deck, handSize int) (deck, deck) { return d[:handSize], d[handSize:] }
[ -0.23335501551628113, 0.21035024523735046, 0.3299367427825928, -0.48542824387550354, -0.5747791528701782, 0.3014090061187744, -0.492516428232193, 0.5913926362991333, 0.806434690952301, -1.2140437364578247, 0.4646202623844147, 0.023213189095258713, 0.06812836974859238, 0.27834805846214294, ...
func NewParser(paths []string, streams ...io.Reader) *Parser { return &Parser{ Streams: streams, FilePaths: paths, } }
[ 0.5877332091331482, -1.7940937280654907, 0.0472513772547245, 0.027151305228471756, -0.6795372366905212, 0.25641772150993347, -0.08337096124887466, 0.050649117678403854, -0.32013067603111267, -0.995731770992279, 0.801945149898529, -0.31651371717453003, -0.3618375360965729, 0.479038953781127...
func (p *Parser) Parse() ([]*unstructured.Unstructured, error) { var result []*unstructured.Unstructured // nolint:prealloc for _, s := range p.Streams { u, err := parseStream(s) if err != nil { return nil, errors.Wrap(err, "cannot parse stream") } result = append(result, u...) } for _, p := range p.File...
[ 0.0406343936920166, -0.2049916684627533, 0.6912805438041687, 0.4501998722553253, 0.7344797849655151, 0.3130401074886322, 0.4980281591415405, -0.021867137402296066, -1.0065714120864868, -0.5563250780105591, 0.8313562870025635, -0.5460716485977173, -0.7583325505256653, 0.9032644629478455, ...
func LoadWholeFile(path string, apply func(a ...interface{}) (n int, err error)) { b, err := ioutil.ReadFile(path) if err != nil { panic(err) } content := string(b) apply(content) }
[ 0.13396108150482178, 0.3784180283546448, 0.6961183547973633, -0.34432148933410645, -1.1008938550949097, 0.19668985903263092, -0.18326452374458313, 0.5549896955490112, -0.908012330532074, -0.10253030061721802, -0.19503659009933472, 0.1084507554769516, -0.10468340665102005, 0.075079545378685...
func Stringify(value interface{}) (string, error) { switch value.(type) { case string: return value.(string), nil case float32, float64: return fmt.Sprintf("%.2f", value), nil case int: return fmt.Sprintf("%d", value), nil default: return "", errors.New("Invalid type") } }
[ -0.33229032158851624, 0.4793887436389923, 0.65382319688797, 0.1289341151714325, -0.2366066724061966, -0.1431601643562317, -0.10175008326768875, -1.0186693668365479, -0.31869736313819885, 0.328857421875, -0.4045029282569885, 0.16309146583080292, -0.013058491051197052, 0.6854751110076904, ...
func New(context *contexter.Context, contexter *contexter.Contexter) (*Server) { s := &Server{ context: context, contexter: contexter, } if !context.GetAPIServer().Debug { gin.SetMode(gin.ReleaseMode) } return s }
[ -1.0276367664337158, -1.0836642980575562, 0.29861947894096375, -0.39652886986732483, 0.2535209655761719, -0.009434451349079609, -0.20835073292255402, -0.2312992513179779, 0.20406149327754974, -0.2372574508190155, -0.09775436669588089, 0.7833740711212158, -0.3330604135990143, 0.743110060691...
func SumAll(numbersToSum ...[]int) (sums []int) { for _, slice := range numbersToSum { sliceSum := SumSlice(slice) sums = append(sums, sliceSum) } return }
[ 0.8826931118965149, -0.3142012655735016, 0.759778618812561, 0.963211178779602, 0.19759304821491241, 0.7201357483863831, -0.40315037965774536, 0.4896642565727234, 0.5079118609428406, -0.3704605996608734, -0.5615131258964539, 0.6286314129829407, 0.5193198919296265, 1.0186325311660767, -0.5...
func (usbAdapter *UsbAdapter) WriteDataToUsb(bytes []byte) { _, err := usbAdapter.outEndpoint.Write(bytes) if err != nil { log.Error("failed sending to usb", err) } if usbAdapter.Dump { _, err := usbAdapter.DumpOutWriter.Write(bytes) if err != nil { log.Fatalf("Failed dumping data:%v", err) } } }
[ -1.296332836151123, 0.4982466399669647, 0.6616856455802917, 0.23428918421268463, 0.4560500979423523, 0.6209071278572083, 0.680587649345398, 0.15796197950839996, 0.6841925382614136, -0.1348160356283188, -0.30261385440826416, 0.2698342204093933, 0.24025177955627441, 0.7408865690231323, -0....
func (usbAdapter *UsbAdapter) StartReading(device IosDevice, receiver UsbDataReceiver, stopSignal chan interface{}) error { ctx, cleanUp := createContext() defer cleanUp() usbDevice, err := OpenDevice(ctx, device) if err != nil { return err } if !device.IsActivated() { return errors.New("device not activated...
[ -0.269493043422699, -0.13141752779483795, 0.7107143402099609, -0.10346731543540955, -0.2128886878490448, -0.029235880821943283, 0.44821175932884216, 0.2688676714897156, 0.1735571175813675, 0.0029526352882385254, -0.020204009488224983, 0.6590838432312012, -0.11142311990261078, -0.0155434524...
func (t *NewsService) Headlines(request *HeadlinesRequest) (*HeadlinesResponse, error) { rsp := &HeadlinesResponse{} return rsp, t.client.Call("news", "Headlines", request, rsp) }
[ -0.9796648025512695, 0.3221830129623413, 0.2208019644021988, 0.47859230637550354, 0.020072881132364273, -0.5208221077919006, -0.6408697962760925, -0.7691194415092468, 0.19838601350784302, -0.8233265280723572, -0.5649852752685547, -0.5548763275146484, -0.19391176104545593, 0.470721781253814...
func (n Namespace) ColorerFunc() ColorerFunc { return func(ns string, h Header, re RowEvent) tcell.Color { c := DefaultColorer(ns, h, re) if re.Kind == EventUpdate { c = StdColor } if strings.Contains(strings.TrimSpace(re.Row.Fields[0]), "*") { c = HighlightColor } if !Happy(ns, h, re.Row) { c =...
[ 0.15167497098445892, -0.4658872187137604, 0.621271550655365, -0.1407553106546402, -0.6824560165405273, -0.2538803815841675, 0.21063169836997986, -0.06859400123357773, 0.23458942770957947, -0.06747116148471832, 0.4034305214881897, 0.3083217740058899, 1.2495317459106445, 0.5493496060371399, ...
func (Namespace) Header(string) Header { return Header{ HeaderColumn{Name: "NAME"}, HeaderColumn{Name: "STATUS"}, HeaderColumn{Name: "LABELS", Wide: true}, HeaderColumn{Name: "VALID", Wide: true}, HeaderColumn{Name: "AGE", Time: true}, } }
[ -0.3038480579853058, 0.44115015864372253, 0.5521291494369507, 0.13975609838962555, -0.9588506817817688, 0.629256546497345, -0.7664925456047058, -0.646693229675293, 0.5455633401870728, -0.6002328395843506, -0.30576080083847046, -0.15512534976005554, 0.9460398554801941, -0.4445332884788513, ...
func (n Namespace) Render(o interface{}, _ string, r *Row) error { raw, ok := o.(*unstructured.Unstructured) if !ok { return fmt.Errorf("Expected Namespace, but got %T", o) } var ns v1.Namespace err := runtime.DefaultUnstructuredConverter.FromUnstructured(raw.Object, &ns) if err != nil { return err } r.ID ...
[ -0.28500738739967346, 0.21467021107673645, 0.44127389788627625, -0.4172421395778656, -0.22374919056892395, -0.15726378560066223, -1.0340843200683594, -0.2406587302684784, 0.9778344631195068, 0.08479645848274231, -0.4321194291114807, -0.30838242173194885, 0.46215909719467163, 0.194320574402...
func NewDutiesApiService() DutiesApiServicer { return &DutiesApiService{} }
[ -1.026370644569397, -0.3937448561191559, -0.02719421684741974, -1.2762768268585205, -1.0350723266601562, -0.014872963540256023, 0.012614011764526367, -1.029962182044983, 0.5310686230659485, -0.07091256231069565, -1.2928768396377563, 0.7389841675758362, -0.18679304420948029, 0.5630747675895...