text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (in *KopsFailure) DeepCopyInto(out *KopsFailure) {
*out = *in
return
} | [
-0.043527454137802124,
-0.19893503189086914,
0.5152031183242798,
0.5067786574363708,
-1.3718924522399902,
0.26825493574142456,
-0.3849540948867798,
0.5884882807731628,
-0.5580706000328064,
-0.8412812948226929,
-0.6784418225288391,
0.550282895565033,
0.1580108106136322,
-0.9958716034889221,... |
func (in *KopsFailure) DeepCopy() *KopsFailure {
if in == nil {
return nil
}
out := new(KopsFailure)
in.DeepCopyInto(out)
return out
} | [
-0.7470201849937439,
-0.1641330122947693,
0.049500443041324615,
0.7458274960517883,
-0.8167620897293091,
-0.4634246528148651,
-0.3990234136581421,
-0.534845769405365,
0.07410505414009094,
-0.6302657127380371,
-0.437561959028244,
-0.66961270570755,
-0.5963078141212463,
-0.8584345579147339,
... |
func (in *KopsNode) DeepCopyInto(out *KopsNode) {
*out = *in
return
} | [
-0.32091471552848816,
0.05180288106203079,
0.6564368009567261,
-0.002558983163908124,
-1.3611489534378052,
0.5759910345077515,
-0.19859381020069122,
0.5888874530792236,
-0.4463140666484833,
-0.28787702322006226,
-0.5411179661750793,
1.100324034690857,
0.08799003809690475,
-0.69528883695602... |
func (in *KopsNode) DeepCopy() *KopsNode {
if in == nil {
return nil
}
out := new(KopsNode)
in.DeepCopyInto(out)
return out
} | [
-0.90609210729599,
0.17749539017677307,
0.37626397609710693,
0.35602089762687683,
-0.8029078841209412,
0.19652503728866577,
-0.5461061000823975,
-0.5718832612037659,
0.4774760603904724,
0.295762836933136,
0.07041782885789871,
-0.09882833063602448,
-0.49803677201271057,
-1.0007871389389038,... |
func (in *KopsStatus) DeepCopyInto(out *KopsStatus) {
*out = *in
if in.Failures != nil {
in, out := &in.Failures, &out.Failures
*out = make([]KopsFailure, len(*in))
copy(*out, *in)
}
if in.Nodes != nil {
in, out := &in.Nodes, &out.Nodes
*out = make([]KopsNode, len(*in))
copy(*out, *in)
}
return
} | [
-0.2700272798538208,
-0.11461520195007324,
0.5818195939064026,
0.0013060389319434762,
-1.123420238494873,
0.3866095244884491,
-0.06573428958654404,
0.44693365693092346,
-0.40936291217803955,
-0.11360691487789154,
-0.6584543585777283,
0.8302915096282959,
0.29824298620224,
-0.696891009807586... |
func (in *KopsStatus) DeepCopy() *KopsStatus {
if in == nil {
return nil
}
out := new(KopsStatus)
in.DeepCopyInto(out)
return out
} | [
-0.7654224634170532,
-0.31947553157806396,
-0.024819882586598396,
0.47625741362571716,
-1.0154361724853516,
0.1704675853252411,
-0.25095444917678833,
-0.25411808490753174,
0.4683522880077362,
0.030718708410859108,
-0.6942134499549866,
-0.5000938773155212,
-0.19169695675373077,
-0.648844599... |
func (in *KubeConfig) DeepCopyInto(out *KubeConfig) {
*out = *in
if in.Clusters != nil {
in, out := &in.Clusters, &out.Clusters
*out = make([]ClusterConfigs, len(*in))
copy(*out, *in)
}
if in.ContextConfigs != nil {
in, out := &in.ContextConfigs, &out.ContextConfigs
*out = make([]ContextConfigs, len(*in))... | [
0.01900479756295681,
0.1721925437450409,
0.7213563323020935,
0.2704010605812073,
-0.9921368956565857,
0.21686549484729767,
-0.34187301993370056,
0.35397034883499146,
-0.8088338375091553,
0.4469326138496399,
-0.5275055766105652,
0.9149130582809448,
-0.4907826781272888,
-0.5402877926826477,
... |
func (in *KubeConfig) DeepCopy() *KubeConfig {
if in == nil {
return nil
}
out := new(KubeConfig)
in.DeepCopyInto(out)
return out
} | [
0.3493173122406006,
0.41060730814933777,
0.21314390003681183,
0.9466423392295837,
-0.717124342918396,
0.10082390904426575,
-0.5915400981903076,
-0.03139141947031021,
-0.4746607542037964,
0.5972979068756104,
-0.7074922323226929,
0.36500370502471924,
-0.7761493921279907,
-0.03962055966258049... |
func (in *User) DeepCopyInto(out *User) {
*out = *in
return
} | [
0.39938998222351074,
-0.14221565425395966,
0.6451846957206726,
0.6751840114593506,
-1.4343827962875366,
1.0920872688293457,
0.16963161528110504,
0.5919009447097778,
-0.8942899703979492,
-0.849859893321991,
-0.9943041205406189,
1.27510666847229,
0.03376820310950279,
-0.6069744229316711,
0... |
func (in *User) DeepCopy() *User {
if in == nil {
return nil
}
out := new(User)
in.DeepCopyInto(out)
return out
} | [
-0.47986406087875366,
0.11677935719490051,
0.34616076946258545,
1.7278724908828735,
-0.5817602276802063,
0.5787488222122192,
0.6168469786643982,
-0.14547719061374664,
0.3601565957069397,
-1.0618009567260742,
-0.6055417656898499,
0.22086644172668457,
-0.7577966451644897,
-0.9881959557533264... |
func (in *Users) DeepCopyInto(out *Users) {
*out = *in
out.Users = in.Users
return
} | [
0.09833654761314392,
-0.2745455801486969,
0.47707879543304443,
0.13522160053253174,
-1.2462518215179443,
0.8265975117683411,
-0.15761339664459229,
1.3457221984863281,
-0.8908913135528564,
-0.26676082611083984,
-0.3381938338279724,
1.3156533241271973,
-0.003466859459877014,
-0.3935458660125... |
func (in *Users) DeepCopy() *Users {
if in == nil {
return nil
}
out := new(Users)
in.DeepCopyInto(out)
return out
} | [
-1.0909717082977295,
0.20375744998455048,
0.23606960475444794,
1.2296817302703857,
-0.14520052075386047,
0.20479634404182434,
0.22738370299339294,
0.29764801263809204,
0.3404715955257416,
-0.41190579533576965,
0.1928040236234665,
0.3443346619606018,
-1.218642234802246,
-0.300339013338089,
... |
func WithEncoding(encoding Encoding) Option {
return func(t *Transport) error {
t.Encoding = encoding
return nil
}
} | [
0.04851718619465828,
-0.013383608311414719,
0.2359248399734497,
-0.14883586764335632,
-0.21589019894599915,
-0.2292354702949524,
0.25950974225997925,
-0.3859129548072815,
0.3752342462539673,
0.4344896674156189,
-1.246543526649475,
-0.9614863395690918,
0.8288940191268921,
-0.54069983959198,... |
func WithConnOptions(opts ...nats.Option) Option {
return func(t *Transport) error {
for _, o := range opts {
t.ConnOptions = append(t.ConnOptions, o)
}
return nil
}
} | [
-0.3796694278717041,
-0.254557341337204,
0.3723513185977936,
0.15238845348358154,
-0.20121808350086212,
0.11615992337465286,
-0.740456223487854,
-0.7245429158210754,
-0.059102799743413925,
0.34778279066085815,
-0.6443142294883728,
-0.49995332956314087,
0.15266236662864685,
-0.2079112976789... |
func WithTransformer(transformer binding.TransformerFactory) SenderOptionFunc {
return func(sender *sender) {
sender.transformers = append(sender.transformers, transformer)
}
} | [
0.32206663489341736,
-0.38775426149368286,
0.49490609765052795,
-0.7414301037788391,
-0.8163892030715942,
-0.8376731276512146,
-0.07699212431907654,
-0.4367319941520691,
0.8613261580467224,
-0.4548579454421997,
-1.4099340438842773,
-0.4116993546485901,
0.7491064667701721,
1.197157263755798... |
func RegisterNativeFuncs(vm *jsonnet.VM, resolver Resolver) {
// TODO(mkm): go-jsonnet 0.12.x now contains native std.parseJson; deprecate and remove this one.
vm.NativeFunction(&jsonnet.NativeFunction{
Name: "parseJson",
Params: []jsonnetAst.Identifier{"json"},
Func: func(args []interface{}) (res interface{}... | [
-0.2521847188472748,
0.23787425458431244,
1.0304852724075317,
-0.315386027097702,
-0.2544175982475281,
-1.0976330041885376,
-1.2882986068725586,
-0.6689369082450867,
-0.8627030253410339,
-0.3247235119342804,
-0.9397640228271484,
0.2766258716583252,
0.6126151084899902,
0.3412388563156128,
... |
func dirURL(path string) *url.URL {
path = filepath.ToSlash(path)
if path[len(path)-1] != '/' {
// trailing slash is important
path = path + "/"
}
return &url.URL{Scheme: "file", Path: path}
} | [
-0.28570088744163513,
0.2253303825855255,
0.8195435404777527,
0.3793776333332062,
-0.4636373519897461,
0.6322799324989319,
0.43653005361557007,
0.45698782801628113,
-0.31558871269226074,
-0.40244796872138977,
0.04872674494981766,
0.4887928366661072,
1.085974097251892,
-0.3592998683452606,
... |
func NewJSONEncoder(w io.Writer) *json.Encoder {
encoder := json.NewEncoder(w)
encoder.SetEscapeHTML(false)
encoder.SetIndent("", " ")
return encoder
} | [
-1.083870530128479,
-0.4608648717403412,
0.4527136981487274,
-0.2678905725479126,
-2.1724843978881836,
-0.6784687042236328,
0.07278310507535934,
-0.33702391386032104,
0.3973618149757385,
0.12427461892366409,
-0.4452953338623047,
0.2399923950433731,
-0.20624515414237976,
1.3479328155517578,... |
func ParseGoFile(filename string) (*ast.File, error) {
f, err := os.Open(filename)
if err != nil {
return nil, err
}
defer f.Close()
src, err := ioutil.ReadAll(f)
if err != nil {
return nil, err
}
return parser.ParseFile(fileSet, filename, src, parserMode)
} | [
0.015658734366297722,
0.7150227427482605,
0.6830695867538452,
-1.0449105501174927,
-0.17635802924633026,
0.03998911753296852,
0.4059445261955261,
0.4520752727985382,
-1.6867225170135498,
0.698756992816925,
-0.2501300871372223,
-0.25084084272384644,
-0.5553075671195984,
0.003649521619081497... |
func FilesFromPatterns(patterns ...string) ([]string, error) {
files := make(map[string]bool)
assets, _, err := glob.Glob(patterns)
if err != nil {
return nil, err
}
for _, asset := range assets {
if strings.Contains(asset.Path, "/vendor/") {
// skip vendor directory
continue
}
if strings.HasSuffix(... | [
0.5346700549125671,
-0.21939167380332947,
0.6600626707077026,
-0.0430278405547142,
0.5239898562431335,
0.5420572757720947,
1.0071147680282593,
-0.23851829767227173,
0.32606467604637146,
0.09672579169273376,
0.5638778209686279,
-0.7484591007232666,
-0.03126326575875282,
-0.06083818897604942... |
func GetTorrentClient() func() *torrent.Client {
path := "/tmp/movie-box.log"
if _, err := os.Stat(path); os.IsNotExist(err) {
f, err := os.Create(path)
if err != nil {
log.Error(err)
}
defer f.Close()
}
file, err := os.OpenFile(path, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
if err != nil {
log.Err... | [
0.23518121242523193,
-0.6013211011886597,
0.9869389533996582,
-0.5713924169540405,
0.531312882900238,
-0.42380261421203613,
0.5915107131004333,
-0.5824688673019409,
-0.954116940498352,
0.08316375315189362,
-0.3671127259731293,
1.1752901077270508,
-0.27698370814323425,
-0.3028247654438019,
... |
func isInternalDebit(accounts []*accounts.Account, lines []transactionLine, routingNumber string) bool {
for i := range accounts {
for j := range lines {
if accounts[i].Id == lines[j].AccountId {
switch lines[j].Purpose {
case ACHDebit:
return accounts[i].RoutingNumber == routingNumber
}
}
}... | [
0.23846617341041565,
-0.06563185900449753,
0.624604344367981,
-0.38912802934646606,
0.23188516497612,
0.013760213740170002,
-0.11026215553283691,
-0.19654186069965363,
0.28857287764549255,
-0.04070691019296646,
0.9448820352554321,
0.7241794466972351,
-0.5610811114311218,
0.2596913278102875... |
func (r *Deployment_IoTJobExponentialRolloutRate) AWSCloudFormationType() string {
return "AWS::GreengrassV2::Deployment.IoTJobExponentialRolloutRate"
} | [
0.40510013699531555,
0.3504354655742645,
0.20557425916194916,
-0.33501094579696655,
-0.10986161231994629,
0.0871271938085556,
-0.8802916407585144,
0.007918301038444042,
-0.1197020411491394,
0.5017162561416626,
0.3404039144515991,
-0.07598003000020981,
0.03594636172056198,
0.049236442893743... |
func CalculatePqBatchCopyRate(timestamps []time.Time) float64 {
var total int64
unixstamps := make([]int64, len(timestamps))
for i, ts := range timestamps {
unixstamps[i] = ts.UnixNano()
}
sort.Sort(Int64Slice(unixstamps))
t0 := unixstamps[0]
for _, t1 := range unixstamps[1:] {
total += t0 - t1
t0 = t1
... | [
0.14254236221313477,
0.015958482399582863,
0.5073095560073853,
0.012428349815309048,
-0.7558152079582214,
-0.3037559986114502,
-0.7582399249076843,
-0.15509803593158722,
0.6224167346954346,
-0.001501272665336728,
-0.37011265754699707,
-0.7516847848892212,
-0.21527813374996185,
0.3006209135... |
func (l *Lock) RouteType() string {
return "lock"
} | [
0.22281739115715027,
0.2051069289445877,
0.5729780197143555,
0.2205701768398285,
1.3029156923294067,
0.9541276097297668,
0.6530716419219971,
-0.053736258298158646,
0.5423586964607239,
0.7277822494506836,
0.13004711270332336,
0.4464624226093292,
-0.7336789965629578,
0.07177246361970901,
-... |
func (l *Lock) GetKeyspaceName() string {
return l.Keyspace.Name
} | [
0.4646911323070526,
-0.8448005318641663,
0.49009597301483154,
0.6518288254737854,
-1.1603655815124512,
-0.07924136519432068,
-0.3787596523761749,
-0.2721635699272156,
0.48594850301742554,
-0.1697445958852768,
-0.18487276136875153,
0.34188446402549744,
-0.6995599269866943,
0.663816690444946... |
func (l *Lock) GetTableName() string {
return "dual"
} | [
0.03214581683278084,
-0.11185450106859207,
0.6984449028968811,
0.8891186118125916,
-0.4156097173690796,
0.9615000486373901,
0.4391113519668579,
-0.07509265840053558,
0.022269045934081078,
-0.2969904839992523,
-0.1996392160654068,
0.28628820180892944,
0.07241205126047134,
0.4249005615711212... |
func (l *Lock) Execute(vcursor VCursor, bindVars map[string]*querypb.BindVariable, _ bool) (*sqltypes.Result, error) {
rss, _, err := vcursor.ResolveDestinations(l.Keyspace.Name, nil, []key.Destination{l.TargetDestination})
if err != nil {
return nil, err
}
if len(rss) != 1 {
return nil, vterrors.Errorf(vtrpc.C... | [
-0.5165536403656006,
0.3662516474723816,
0.7763972282409668,
0.22618381679058075,
0.5170758962631226,
-0.04333774745464325,
-1.112960934638977,
-0.01889825612306595,
0.20929506421089172,
1.294711709022522,
0.2047608196735382,
-0.2101234346628189,
-0.9676539301872253,
-0.2297096848487854,
... |
func (l *Lock) StreamExecute(vcursor VCursor, bindVars map[string]*querypb.BindVariable, wantfields bool, callback func(*sqltypes.Result) error) error {
qr, err := l.Execute(vcursor, bindVars, wantfields)
if err != nil {
return err
}
return callback(qr)
} | [
0.47423839569091797,
0.15229040384292603,
0.4497602581977844,
0.7124758362770081,
-0.3176422119140625,
0.0031751052010804415,
-0.25632405281066895,
-0.6386013627052307,
-0.09290613234043121,
0.41767796874046326,
-0.13350336253643036,
0.7250640988349915,
-1.1651298999786377,
0.6281317472457... |
func (l *Lock) GetFields(vcursor VCursor, bindVars map[string]*querypb.BindVariable) (*sqltypes.Result, error) {
return nil, vterrors.New(vtrpc.Code_UNIMPLEMENTED, "not implements in lock primitive")
} | [
-0.3286333978176117,
0.6884228587150574,
0.5393106341362,
0.30604690313339233,
0.16618959605693817,
-0.45139989256858826,
0.3593901991844177,
-0.7191888689994812,
0.5469242930412292,
-0.286598801612854,
-0.46247267723083496,
-0.2585585117340088,
-1.9406471252441406,
-0.38778218626976013,
... |
func NewRunner(dir string, logger *Logger, options Options) Runner {
if !options.FirecrackerOptions.Enabled {
return &dockerRunner{dir: dir, logger: logger, options: options}
}
return &firecrackerRunner{name: options.ExecutorName, dir: dir, logger: logger, options: options}
} | [
-0.024538878351449966,
0.436217725276947,
0.5572019219398499,
0.2673214375972748,
-0.8538322448730469,
-0.41067206859588623,
0.15377932786941528,
0.1948699951171875,
1.1388375759124756,
-0.6482152342796326,
-0.2562980651855469,
0.0930989682674408,
-0.16950199007987976,
0.6153666973114014,
... |
func (rs *Replacements) Set(s string) error {
parts := strings.Split(s, ",")
for _, part := range parts {
var r Replacement
part = strings.TrimSpace(part)
if err := r.Set(part); err != nil {
return errors.WithStack(err)
}
*rs = append(*rs, r)
}
return nil
} | [
-0.12685735523700714,
0.10207802802324295,
0.20497800409793854,
-1.1812664270401,
-0.024119848385453224,
-0.5875368714332581,
-0.29115137457847595,
0.5285152792930603,
0.10766381025314331,
0.27654826641082764,
-0.43908852338790894,
0.5330603122711182,
-0.5023965239524841,
0.155578985810279... |
func (rs Replacements) String() string {
var ss []string
for _, r := range rs {
s := r.String()
ss = append(ss, s)
}
return strings.Join(ss, ",")
} | [
-0.34217479825019836,
-0.42528557777404785,
0.23453877866268158,
-1.2891931533813477,
0.07581451535224915,
-0.18364377319812775,
0.4928772449493408,
0.35954809188842773,
0.435353547334671,
0.17774337530136108,
0.07365921139717102,
0.21889647841453552,
-0.3639897108078003,
0.300493121147155... |
func (r *Replacement) Set(s string) error {
parts := strings.Split(s, ":")
if len(parts) != 2 {
return errors.Errorf("invalid number of dash-separated parts in binary replacement; expected 2, got %d", len(parts))
}
if err := r.Addr.Set(parts[0]); err != nil {
return errors.WithStack(err)
}
buf, err := hex.Dec... | [
0.285614013671875,
-0.07329390943050385,
0.37691888213157654,
-1.0820719003677368,
-0.1431804746389389,
-0.32568323612213135,
-0.1816515028476715,
0.968665599822998,
-0.4115437865257263,
-0.26230812072753906,
-0.9611337780952454,
0.6191373467445374,
-0.21089968085289001,
-0.475486159324646... |
func (r Replacement) String() string {
return fmt.Sprintf("%s:%X", r.Addr, r.Buf)
} | [
0.45266178250312805,
-1.0837972164154053,
0.19320590794086456,
-1.4964981079101562,
-0.753936767578125,
0.6439322233200073,
0.6855178475379944,
0.34592464566230774,
0.23878930509090424,
0.07875778526067734,
-0.7120505571365356,
0.45150226354599,
-0.2878682613372803,
-0.8410864472389221,
... |
func (as AddrRanges) Contains(addr Address) bool {
for _, a := range as {
if a.Contains(addr) {
return true
}
}
return false
} | [
-0.2098284661769867,
-0.17295455932617188,
0.37169554829597473,
-0.5603950023651123,
-0.3089972734451294,
-0.39872118830680847,
-0.14640840888023376,
-0.15625090897083282,
0.9684224724769592,
-0.053100407123565674,
0.4930693805217743,
0.8019214868545532,
-0.09655895829200745,
0.75447326898... |
func (as *AddrRanges) Set(s string) error {
parts := strings.Split(s, ",")
for _, part := range parts {
var a AddrRange
part = strings.TrimSpace(part)
if err := a.Set(part); err != nil {
return errors.WithStack(err)
}
*as = append(*as, a)
}
return nil
} | [
-0.49851691722869873,
-0.2136707603931427,
0.33757010102272034,
-0.9690953493118286,
0.2946597933769226,
-0.62663334608078,
-0.5058497786521912,
-0.1960337609052658,
0.41912347078323364,
0.6713750958442688,
0.033767394721508026,
0.41818201541900635,
-0.07757333666086197,
-0.308168381452560... |
func (as AddrRanges) String() string {
var ss []string
for _, a := range as {
s := a.String()
ss = append(ss, s)
}
return strings.Join(ss, ",")
} | [
-0.0869220420718193,
-0.37191271781921387,
0.3942714333534241,
-1.0771163702011108,
0.6459166407585144,
0.01655307225883007,
0.04548900946974754,
-0.7157964110374451,
0.7451261878013611,
0.7347590923309326,
0.6977795958518982,
0.45069757103919983,
-0.05333617329597473,
-0.4063296318054199,... |
func (a AddrRange) Contains(addr Address) bool {
return a.Start <= addr && addr < a.End
} | [
-0.3944403827190399,
-0.6176855564117432,
0.5477367043495178,
-0.6472526788711548,
-1.1882203817367554,
0.5101637244224548,
0.25430673360824585,
-0.38723063468933105,
0.8203418254852295,
-0.24794858694076538,
0.6233378052711487,
1.4596588611602783,
-0.446321576833725,
0.18675477802753448,
... |
func (a *AddrRange) Set(s string) error {
parts := strings.Split(s, "-")
if len(parts) != 2 {
return errors.Errorf("invalid number of dash-separated parts in address range; expected 2, got %d", len(parts))
}
if err := a.Start.Set(parts[0]); err != nil {
return errors.WithStack(err)
}
if err := a.End.Set(parts... | [
-0.8717578053474426,
-0.361004501581192,
0.4143957197666168,
-0.7438517808914185,
0.11978793144226074,
-0.291498601436615,
0.04530826583504677,
0.08455567061901093,
-0.4185040295124054,
-0.13993243873119354,
-0.1411801129579544,
0.7353120446205139,
-0.11603721231222153,
-0.4836380183696747... |
func (a AddrRange) String() string {
return fmt.Sprintf("%s-%s", a.Start, a.End)
} | [
-0.8248233795166016,
-1.0052326917648315,
0.32064417004585266,
-1.0985181331634521,
-0.11656016856431961,
0.7571318745613098,
0.22920721769332886,
-0.35716643929481506,
-0.21668118238449097,
0.30142539739608765,
0.6074701547622681,
0.7704562544822693,
-0.17517484724521637,
-0.5999736189842... |
func (a *Address) Set(s string) error {
x, err := parseHex(s)
if err != nil {
return errors.WithStack(err)
}
*a = Address(x)
return nil
} | [
-0.13864631950855255,
-0.17497755587100983,
0.13469496369361877,
-1.166561245918274,
-0.388359397649765,
-0.5074044466018677,
-0.13971808552742004,
0.31086644530296326,
0.48118069767951965,
0.08697549998760223,
-0.5174890160560608,
0.7183757424354553,
0.24874453246593475,
-0.04812792688608... |
func (a Address) String() string {
return fmt.Sprintf("0x%X", uint64(a))
} | [
-0.6611390113830566,
-0.2759486436843872,
0.35566192865371704,
-0.5825034976005554,
-0.8037875294685364,
0.6615812182426453,
0.3719647228717804,
-0.0920240730047226,
1.2500118017196655,
-0.22185011208057404,
0.610622763633728,
0.8106033205986023,
0.1685275286436081,
-0.11074250936508179,
... |
func (a *Address) UnmarshalText(text []byte) error {
return a.Set(string(text))
} | [
0.5835537910461426,
0.625910758972168,
0.3712154030799866,
-1.540332317352295,
-1.1935218572616577,
-0.07442699372768402,
-0.25366342067718506,
0.7447301745414734,
1.2414257526397705,
0.9132293462753296,
0.002713669091463089,
0.16670045256614685,
-0.6240086555480957,
-0.49443256855010986,
... |
func (a Address) MarshalText() ([]byte, error) {
return []byte(a.String()), nil
} | [
0.7235296964645386,
0.04333745315670967,
0.2632281184196472,
-0.535195529460907,
-1.1453355550765991,
-0.27074939012527466,
-0.865764319896698,
0.5203109383583069,
2.0929367542266846,
0.4696522355079651,
-0.13810287415981293,
1.0507807731628418,
-0.3132786750793457,
-0.5264425873756409,
... |
func parseHex(s string) (uint64, error) {
s = strings.ToLower(s)
const prefix = "0x"
if !strings.HasPrefix(s, prefix) {
return 0, errors.Errorf("invalid address %q; missing hexadecimal prefix %q", s, prefix)
}
s = s[len(prefix):]
x, err := strconv.ParseUint(s, 16, 64)
if err != nil {
return 0, errors.WithSta... | [
-0.35919827222824097,
-0.14596430957317352,
0.6546715497970581,
-0.576636016368866,
-0.6399818658828735,
-0.6648753881454468,
-0.3182041645050049,
1.6386239528656006,
0.8151648044586182,
-0.5977258086204529,
0.22143401205539703,
0.41078075766563416,
0.1797582358121872,
-0.2795005738735199,... |
func main() {
// fmt.Println(os.Args[0])
// Read the file and dump into the slice of structs
dm := SummaryReport.ReadFile(infile)
// for _, v := range dm {
fmt.Println(*dm[0])
// }
// Compute number of subjects by treatment group
// Turn values into strings
// Compute number of non-mising Age values b... | [
-0.1720810979604721,
-0.2785907983779907,
0.8525108098983765,
-0.14698496460914612,
0.4417765736579895,
0.8158357739448547,
1.2735683917999268,
0.5795881748199463,
-0.7300039529800415,
-0.3104310631752014,
0.26111385226249695,
-0.23640887439250946,
-0.1226532980799675,
-0.528827428817749,
... |
func (mock *Mock) PatchGetUser(username string, outputUser entities.User, outputError error) {
inputHash := toHash(getInputForGetUser(username))
output := getOutputForGetUser(outputUser, outputError)
if _, exists := mock.patchGetUserMap[inputHash]; !exists {
arrOutputForGetUserUser := make([]outputForGetUser, 0)
... | [
-0.5961613655090332,
-0.819713830947876,
0.4464304745197296,
0.06695638597011566,
-0.20391042530536652,
0.3940698802471161,
1.0039393901824951,
-0.33724018931388855,
0.07407566905021667,
-0.526162326335907,
-0.035384781658649445,
0.2967228591442108,
0.2425808161497116,
-0.1146702989935875,... |
func (mock *Mock) GetUser(username string) (entities.User, error) {
inputHash := toHash(getInputForGetUser(username))
arrOutputForGetUser, exists := mock.patchGetUserMap[inputHash]
if !exists || len(arrOutputForGetUser) == 0 {
panic("Mock not available for GetUser")
}
output := arrOutputForGetUser[0]
arrOutput... | [
-0.7025732398033142,
-0.424774169921875,
0.5420920848846436,
0.41456279158592224,
0.07538072019815445,
0.26200228929519653,
1.0483458042144775,
-0.045975033193826675,
0.24835817515850067,
-0.5324730277061462,
0.2013077437877655,
-0.11022181808948517,
-0.3765232264995575,
0.1185953915119171... |
func (mock *Mock) PatchCreateUser(newUser entities.User, outputUserID uint, outputError error) {
inputHash := toHash(getInputForCreateUser(newUser))
output := getOutputForCreateUser(outputUserID, outputError)
if _, exists := mock.patchCreateUserMap[inputHash]; !exists {
arrOutputForCreateUser := make([]outputForC... | [
-0.7105120420455933,
-0.9658424258232117,
-0.030605394393205643,
-0.04380608722567558,
-0.21183878183364868,
0.5872396230697632,
1.09949791431427,
-0.8800572156906128,
0.006168457679450512,
-0.12576499581336975,
-0.23938724398612976,
-0.22276082634925842,
0.05487052723765373,
0.65480446815... |
func (mock *Mock) CreateUser(newUser entities.User) (uint, error) {
inputHash := toHash(getInputForCreateUser(newUser))
arrOutputForCreateUser, exists := mock.patchCreateUserMap[inputHash]
if !exists || len(arrOutputForCreateUser) == 0 {
panic("Mock not available for CreateUser")
}
output := arrOutputForCreateU... | [
-0.6542730331420898,
-0.6416746377944946,
0.4501146078109741,
0.17518623173236847,
0.2603987455368042,
0.6241128444671631,
1.1308895349502563,
-0.3254638910293579,
0.04430853947997093,
-0.14805178344249725,
-0.2562161684036255,
-0.9295961260795593,
-0.6254563331604004,
1.045225739479065,
... |
func GetMetrics(c *providers.Provider) (providers.ClowderProvider, error) {
metricsMode := c.Env.Spec.Providers.Metrics.Mode
switch metricsMode {
case "none", "":
return NewNoneMetricsProvider(c)
case "operator":
return NewMetricsProvider(c)
case "app-interface":
return NewAppInterfaceMetrics(c)
default:
... | [
-0.01347362995147705,
1.1832722425460815,
0.3834434449672699,
0.32278040051460266,
0.39026787877082825,
0.3944200575351715,
0.18440823256969452,
-0.8600118160247803,
0.19342730939388275,
0.9146527051925659,
0.7317711114883423,
0.42355719208717346,
-0.3347952961921692,
0.23968930542469025,
... |
func (a *App) Initialize(config *Configuration) {
if !config.Debug {
if config.Postgres == nil {
log.Panic("No postgres configuration is given, but debug mode is disabled")
}
var PgDbURL = config.Postgres.DbURL
dbURLSliced := strings.Split(PgDbURL, ":")
host := dbURLSliced[0]
port, err := strconv.Atoi(d... | [
-0.5965223908424377,
1.0565441846847534,
0.9108682870864868,
0.7320387959480286,
0.4876928925514221,
0.34320947527885437,
0.1605137586593628,
0.6113550066947937,
-0.3323507308959961,
0.3288954198360443,
-0.7897961139678955,
-0.04551856592297554,
0.006675212178379297,
1.2760648727416992,
... |
func (a *App) InitializeRoutes() {
a.Router.Use(addServerHeaderMiddle)
a.Router.HandleFunc("/", a.Ok).Methods("GET")
a.Router.HandleFunc("/entities", a.GetEntities).Methods("GET")
a.Router.HandleFunc("/entity", a.CreateEntity).Methods("POST")
a.Router.HandleFunc(routeUUID4, a.GetEntity).Methods("GET")
a.Router.Ha... | [
0.048791371285915375,
0.10005942732095718,
0.7832399010658264,
0.42046719789505005,
0.8746691942214966,
0.2568373680114746,
0.02210828848183155,
-0.29720091819763184,
0.2388870120048523,
-0.5312501192092896,
-0.038232993334531784,
-0.522547721862793,
-0.061313629150390625,
1.04804086685180... |
func (a *App) Ok(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
logerr(w.Write(randomByteSlice(10, "OK", "0123456789abcdef")))
} | [
0.2813246250152588,
-0.24522697925567627,
0.48310381174087524,
0.13962170481681824,
-0.0622837208211422,
1.1270583868026733,
0.300252765417099,
0.18206758797168732,
0.6911444664001465,
1.534048080444336,
-0.4041513204574585,
0.49767017364501953,
0.7210562229156494,
0.10266551375389099,
-... |
func (a *App) GetEntities(w http.ResponseWriter, r *http.Request) {
count := DefaultEntityListSize
cStr := r.URL.Query().Get("count")
if cStr != "" {
count, _ = strconv.Atoi(cStr)
if count < 1 {
count = DefaultEntityListSize
}
}
filter := r.URL.Query().Get("filter")
entities, err := getEntities(a.DB, co... | [
-1.1899882555007935,
0.3262823224067688,
0.591457724571228,
-0.1637134999036789,
0.7245827913284302,
-0.28057241439819336,
0.4502967596054077,
0.3110785186290741,
-0.01221252791583538,
-0.03376393020153046,
0.16591450572013855,
-0.5120014548301697,
-0.043696507811546326,
1.3750008344650269... |
func (a *App) CreateEntity(w http.ResponseWriter, r *http.Request) {
var e Entity
e.Uuid = uuid.NewV4().String()
decoder := json.NewDecoder(r.Body)
if err := decoder.Decode(&e); err != nil {
respondWithError(w, http.StatusBadRequest, errors.New("invalid request payload"))
return
}
defer func() { _ = r.Body.Cl... | [
-0.8079807758331299,
-0.8229735493659973,
0.8566835522651672,
0.020230766385793686,
0.6569250822067261,
0.7291164994239807,
-0.0444706454873085,
0.508886456489563,
0.38319048285484314,
0.8290475010871887,
0.20973201096057892,
-1.2168198823928833,
0.04270371422171593,
1.1718051433563232,
... |
func Test(t *testing.T) { check.TestingT(t) } | [
0.7916223406791687,
0.6248916387557983,
0.31418490409851074,
0.42968806624412537,
0.6187688708305359,
0.9380013346672058,
1.2121306657791138,
-0.08558916300535202,
-0.5670956969261169,
0.055333029478788376,
-0.1507783979177475,
-0.16721071302890778,
-0.19589032232761383,
0.2281821370124817... |
func insertNode(maxHeap *[]int, heapSize int, new int) int {
// increase heapSize
heapSize++
// insert the new item
*maxHeap = append(*maxHeap, new)
i := heapSize
// to maintain max heap property
// start checking up the tree
for i > 1 && heap.ParentIndex(i) < (*maxHeap)[i] {
parent := heap.ParentIndex(i)
(... | [
-0.43941518664360046,
0.6150146126747131,
0.8657089471817017,
-0.41736292839050293,
-0.4600680470466614,
-0.4469301402568817,
-0.717919111251831,
1.0588054656982422,
-0.33801358938217163,
0.15436337888240814,
-0.5440640449523926,
-0.1228882446885109,
-1.6698120832443237,
0.2112220376729965... |
func New(length MnemonicLength, dict Dictionary) (string, error) {
var entLen EntropyLength
switch length {
case Words12:
entLen = Entropy128
case Words15:
entLen = Entropy160
case Words18:
entLen = Entropy192
case Words21:
entLen = Entropy224
case Words24:
entLen = Entropy256
default:
return "", e... | [
0.6525675058364868,
-0.6252167224884033,
0.5931563377380371,
-1.5277578830718994,
-1.2437740564346313,
-0.017932377755641937,
-0.8097535371780396,
-0.04581839218735695,
-0.42698419094085693,
0.7136098146438599,
-0.11066316813230515,
0.39693301916122437,
0.1780233383178711,
-0.5252153873443... |
func NewFromEntropy(entropy []byte, dict Dictionary) (string, error) {
cs, csLen, err := Checksum(entropy)
if err != nil {
return "", err
}
checksumed := new(big.Int).SetBytes(entropy)
checksumed.Lsh(checksumed, uint(csLen))
checksumed.Or(checksumed, new(big.Int).SetBytes([]byte{cs}))
enLen := len(entropy) *... | [
0.7136108875274658,
-0.7739890217781067,
0.8995522856712341,
-0.909996509552002,
-0.9075539112091064,
-0.5601755380630493,
-0.455147385597229,
0.10551489889621735,
0.07819068431854248,
1.00789475440979,
0.030635498464107513,
-0.7502886056900024,
0.17967641353607178,
0.08194560557603836,
... |
func (ml *MultiLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) {
primary, primaryRaw, err := ml.Primary.Get(ctx)
if err != nil {
return nil, nil, err
}
secondary, secondaryRaw, err := ml.Secondary.Get(ctx)
if err != nil {
// Lock is held by old client
if apierrors.IsNotFound(err) && pr... | [
-0.37640154361724854,
-0.8169485926628113,
0.7695562839508057,
-0.28625980019569397,
0.5307944416999817,
0.45994341373443604,
-0.8660814762115479,
-0.2909804880619049,
0.25876525044441223,
0.26931169629096985,
0.039077483117580414,
0.7502068281173706,
-0.5299512147903442,
0.443621397018432... |
func (ml *MultiLock) Create(ctx context.Context, ler LeaderElectionRecord) error {
err := ml.Primary.Create(ctx, ler)
if err != nil && !apierrors.IsAlreadyExists(err) {
return err
}
return ml.Secondary.Create(ctx, ler)
} | [
0.10895899683237076,
-0.5521113276481628,
0.3851296007633209,
0.3889630138874054,
0.5281447768211365,
0.39137470722198486,
-0.5121273994445801,
-0.6021203398704529,
0.06513642519712448,
0.38844791054725647,
0.05166444927453995,
-0.39569783210754395,
-0.6199049949645996,
0.8557577133178711,... |
func (ml *MultiLock) Update(ctx context.Context, ler LeaderElectionRecord) error {
err := ml.Primary.Update(ctx, ler)
if err != nil {
return err
}
_, _, err = ml.Secondary.Get(ctx)
if err != nil && apierrors.IsNotFound(err) {
return ml.Secondary.Create(ctx, ler)
}
return ml.Secondary.Update(ctx, ler)
} | [
-0.036289144307374954,
-1.1837471723556519,
0.39614516496658325,
-0.23994006216526031,
0.0950145497918129,
0.3429608941078186,
-0.4117942452430725,
-0.07918606698513031,
0.40046095848083496,
0.49746638536453247,
-0.2615043520927429,
0.39089682698249817,
-0.736005425453186,
0.24739940464496... |
func (ml *MultiLock) RecordEvent(s string) {
ml.Primary.RecordEvent(s)
ml.Secondary.RecordEvent(s)
} | [
0.8014887571334839,
0.08840841054916382,
0.4042123854160309,
-0.0493251234292984,
0.8596904277801514,
0.3549306392669678,
0.2278493195772171,
0.53434818983078,
-0.4347657859325409,
-0.027857040986418724,
-0.6304798722267151,
1.0563398599624634,
0.5461359620094299,
0.947041928768158,
0.16... |
func (ml *MultiLock) Describe() string {
return ml.Primary.Describe()
} | [
0.21525296568870544,
0.08416283130645752,
0.5045057535171509,
-0.22672680020332336,
0.01010175235569477,
0.016175977885723114,
-0.5758244395256042,
-0.4123648405075073,
-0.23455652594566345,
0.01668967492878437,
0.42758020758628845,
0.6124905943870544,
-0.8480442762374878,
0.69567102193832... |
func (ml *MultiLock) Identity() string {
return ml.Primary.Identity()
} | [
-0.4756857454776764,
-1.182641625404358,
0.34936782717704773,
1.075417399406433,
0.2793761193752289,
1.322988748550415,
0.16755831241607666,
-0.2466895431280136,
0.7677709460258484,
-0.0628240779042244,
-0.33145204186439514,
-0.39083707332611084,
-0.5083892345428467,
0.2366340011358261,
... |
func pollState(stateChannel chan *tesla.Vehicle) {
interval := 1
for {
log.Printf("Wait for %d seconds for state %s", interval, stateTracker.lastState)
time.Sleep(time.Duration(interval) * time.Second)
vehicles := refreshVehicle()
if vehicles != nil {
vehicle := vehicles[0].Vehicle
stateChannel <- vehic... | [
-0.23330146074295044,
-0.5091375708580017,
0.5869900584220886,
-0.4472128748893738,
-0.30430707335472107,
0.294388085603714,
-1.0620108842849731,
-0.4562562108039856,
0.173289492726326,
0.6018329858779907,
0.05655771866440773,
-0.2853926718235016,
0.08327566087245941,
0.08672701567411423,
... |
func updateInterval(v *tesla.Vehicle, interval int) int {
newState := v.State
oldState := stateTracker.update(v)
if val, ok := INTERVAL[stateTracker.lastState]; ok {
return val
}
if newState == oldState {
if interval >= 2048 {
return 2048
}
return interval * 2
}
// a state change just happened
if new... | [
-0.7840420007705688,
-0.7125535607337952,
0.40969812870025635,
0.2684924602508545,
-0.7718709707260132,
-0.07418568432331085,
-0.1174396350979805,
0.2815246284008026,
-0.20402689278125763,
0.3835699260234833,
0.0752391368150711,
-0.5403697490692139,
-0.9087149500846863,
-0.2388794571161270... |
func RouterRegister() *gin.Engine {
fmt.Println("Linux Dashboard")
router := gin.Default()
router.LoadHTMLFiles("linuxdashboard/godashboard/index.html")
router.GET("/", IndexAPI)
router.GET("/proc/stat", ProcStat)
router.GET("/proc/loadavg", ProcLoadavg)
router.GET("/proc/meminfo", ProcMeminfo)
router.GET("/p... | [
-0.08573727309703827,
0.5579836964607239,
0.7921496033668518,
0.12335655838251114,
1.156275749206543,
-0.04564783722162247,
-0.013115541078150272,
0.8514552712440491,
-1.2456492185592651,
-0.8483068346977234,
0.014452576637268066,
0.9644294381141663,
-0.3056468367576599,
0.9257638454437256... |
func ProcStat(c *gin.Context) {
res := CmdExec("cat /proc/stat | head -n 1 | awk '{$1=\"\";print}'")
resArray := strings.Split(res[0], " ")
var cpu []int64
var totalcpu, idlecpu int64
for _, v := range resArray {
temp, err := strconv.ParseInt(v, 10, 64)
if err == nil {
cpu = append(cpu, temp)
totalcpu = ... | [
-0.4034583568572998,
-0.29549944400787354,
0.6654638648033142,
-0.9300283193588257,
0.9600855112075806,
-0.5728548765182495,
0.27982479333877563,
-0.6389663219451904,
-0.5236896276473999,
0.2666783928871155,
-0.43904322385787964,
0.44393396377563477,
-0.10528486967086792,
0.031413033604621... |
func ProcLoadavg(c *gin.Context) {
res := CmdExec("cat /proc/loadavg")
resArray := strings.Split(res[0], " ")
load5, _ := strconv.ParseFloat(resArray[0], 32)
load10, _ := strconv.ParseFloat(resArray[1], 32)
load15, _ := strconv.ParseFloat(resArray[2], 32)
runningString := strings.Split(resArray[3], "/")
runningp... | [
-0.6639672517776489,
-0.5201655626296997,
0.8814712762832642,
-1.1874452829360962,
0.30407774448394775,
0.15749779343605042,
-0.09037332236766815,
-1.0959572792053223,
-1.193940281867981,
0.6755567789077759,
0.11677812039852142,
1.0636330842971802,
0.010174652561545372,
0.49402323365211487... |
func ProcMeminfo(c *gin.Context) {
res := CmdExec("cat /proc/meminfo | head -n 2| awk '{print $2}'")
totalMem, _ := strconv.Atoi(res[0])
freeMem, _ := strconv.Atoi(res[1])
usedMem := totalMem - freeMem
c.JSON(http.StatusOK, gin.H{
"totalMem": totalMem,
"usedMem": usedMem,
})
} | [
-0.1977357417345047,
-0.7433903217315674,
0.824034571647644,
-0.9218112230300903,
-0.08980648964643478,
-0.3527320325374603,
0.38974806666374207,
-0.8323597311973572,
-0.8027593493461609,
-0.05695861205458641,
-0.6437037587165833,
0.33220168948173523,
-0.048588935285806656,
0.1351514011621... |
func ProcTCP(c *gin.Context) {
res := CmdExec("cat /proc/net/tcp | wc -l")
tcpV4Links, _ := strconv.Atoi(res[0])
res = CmdExec("cat /proc/net/tcp6 | wc -l")
tcpV6Links, _ := strconv.Atoi(res[0])
c.JSON(http.StatusOK, gin.H{
"tcpV4Links": NonNegative(tcpV4Links - 2),
"tcpV6Links": NonNegative(tcpV6Links - 2),
... | [
-0.3221398591995239,
-0.47861912846565247,
0.5506318211555481,
-0.5619492530822754,
0.842499852180481,
-0.21828077733516693,
0.5821662545204163,
-0.49603667855262756,
-0.3817792236804962,
0.5999466776847839,
0.5937031507492065,
-0.010796992108225822,
-0.01646018587052822,
-0.22303473949432... |
func ProcUDP(c *gin.Context) {
res := CmdExec("cat /proc/net/udp | wc -l")
udpV4Links, _ := strconv.Atoi(res[0])
res = CmdExec("cat /proc/net/udp6 | wc -l")
udpV6Links, _ := strconv.Atoi(res[0])
c.JSON(http.StatusOK, gin.H{
"udpV4Links": NonNegative(udpV4Links - 2),
"udpV6Links": NonNegative(udpV6Links - 2),
... | [
-0.9303691387176514,
0.1671726256608963,
0.7271680235862732,
-0.5210009813308716,
0.5929412245750427,
-0.18922828137874603,
0.3903016149997711,
-0.08652836829423904,
0.18384870886802673,
0.26047849655151367,
0.3578338623046875,
0.3008303642272949,
0.28489455580711365,
-0.6113027334213257,
... |
func ProcNetDev(c *gin.Context) {
res := CmdExec("cat /proc/net/dev | sed '1,2d' | grep -v lo | awk '{ print $1,$2,$10 }'")
var resSlice = make(map[string][2]int64)
var temp = [2]int64{0, 0}
var tempName string
for _, v := range res {
component := strings.Split(v, " ")
if component[1] != "0" && component[2] !=... | [
-1.1283103227615356,
-0.8634734749794006,
0.8169662356376648,
-0.214969664812088,
0.42130613327026367,
-0.1355249285697937,
0.38693177700042725,
-1.1121841669082642,
-0.5974904298782349,
-0.3307012617588043,
-0.6263227462768555,
-0.14123240113258362,
0.7352762818336487,
1.2003248929977417,... |
func CmdExec(usercommand string) []string {
cmd := exec.Command("sh", "-c", usercommand)
out, err := cmd.Output()
if err != nil {
log.Fatalf("cmd.Run() failed with %s\n", err)
}
//using "\n" will append an empty line to the end of the resArray
resArray := strings.Split(string(out), "\n")
//delete the last and ... | [
0.4293821454048157,
-0.7879701256752014,
0.9434026479721069,
0.2924799919128418,
0.1664009839296341,
0.2829744815826416,
-0.22696295380592346,
0.07250195741653442,
0.3706120252609253,
0.1695227026939392,
-0.2242594063282013,
0.2987724840641022,
-0.5410916209220886,
0.44636204838752747,
1... |
func NonNegative(paraValue int) (NonNeg int) {
if paraValue < 0 {
return 0
} else {
return paraValue
}
} | [
-0.9818649291992188,
-0.1656787097454071,
0.5557278990745544,
-0.24091553688049316,
-0.8091065287590027,
0.18045449256896973,
-0.4976905286312103,
-0.8098066449165344,
-0.9666661024093628,
0.18613922595977783,
0.3032926023006439,
-0.07881717383861542,
-0.5768738985061646,
0.398632138967514... |
func NewGrpcServer(
address string,
certs *GrpcSecurity,
secure bool,
probe ReadyProbe,
) *GrpcServer {
server := &GrpcServer{
address: address,
secure: secure,
GrpcSecurity: certs,
probe: probe,
}
return server
} | [
-0.7559378743171692,
-0.26308107376098633,
0.5035168528556824,
0.2214033454656601,
-0.23423808813095093,
0.5288498997688293,
-0.011005130596458912,
-0.05298103019595146,
0.5679653286933899,
1.105581521987915,
-0.6481189131736755,
0.40757668018341064,
-1.0520684719085693,
-0.514934062957763... |
func (s *GrpcServer) Start(ctx context.Context) {
lis, err := net.Listen("tcp", s.address)
if err != nil {
logger.Fatalf(ctx, "failed to listen: %v", err)
}
// Use Intercepters to automatically inject and publish Open Tracing Spans by this GRPC server
serverOptions := []grpc.ServerOption{
grpc.StreamIntercep... | [
-0.6071398258209229,
0.16481292247772217,
0.739543616771698,
-0.6323808431625366,
0.6578021049499512,
0.4756391942501068,
0.4992678761482239,
-0.016726762056350708,
0.33056533336639404,
0.527521550655365,
0.028589224442839622,
1.512718915939331,
-0.6406878232955933,
0.011000942438840866,
... |
func mkServerInterceptor(s *GrpcServer) func(ctx context.Context,
req interface{},
info *grpc.UnaryServerInfo,
handler grpc.UnaryHandler) (interface{}, error) {
return func(ctx context.Context,
req interface{},
info *grpc.UnaryServerInfo,
handler grpc.UnaryHandler) (interface{}, error) {
if (s.probe != ni... | [
-1.2016924619674683,
-0.46188634634017944,
0.715923011302948,
-0.5916728377342224,
-0.7403473854064941,
0.6047802567481995,
-0.07230830937623978,
0.6091457605361938,
0.39749133586883545,
0.42881447076797485,
-0.031190069392323494,
-0.07243837416172028,
-0.619293749332428,
0.300533562898635... |
func (s *GrpcServer) Stop() {
if s.gs != nil {
s.gs.Stop()
}
} | [
-0.7295430898666382,
0.030655287206172943,
0.09200601279735565,
-0.17123892903327942,
1.125253438949585,
0.6036481857299805,
0.49101722240448,
-0.00330449640750885,
-0.8290688395500183,
0.47797679901123047,
-0.46880441904067993,
1.266992449760437,
-1.6124087572097778,
0.8081049919128418,
... |
func (s *GrpcServer) AddService(
registerFunction func(*grpc.Server),
) {
s.services = append(s.services, registerFunction)
} | [
-1.0093677043914795,
0.7928248643875122,
0.30180948972702026,
0.7809564471244812,
0.8916621208190918,
0.19300048053264618,
0.002998321084305644,
0.048664435744285583,
-0.036970410495996475,
-0.8717148900032043,
-0.5416126251220703,
1.0935851335525513,
-0.7858114242553711,
1.064675211906433... |
func TestDef(t *testing.T) {
store := getStoreCond(t)
err, objs := store.ReadDef()
if err != nil {
t.Error("Read With Default query failed ", err)
} else {
for _, obj := range objs {
testObj := obj.(*TestObjCond)
t.Log(testObj)
}
}
} | [
0.5423427820205688,
0.14482757449150085,
0.4905425012111664,
0.8754843473434448,
0.5440992712974548,
0.051941145211458206,
0.31073060631752014,
-0.4506174921989441,
-0.15978172421455383,
-0.08622830361127853,
0.095797099173069,
-0.0960569679737091,
-0.20456048846244812,
0.23615185916423798... |
func (s UpdateRegexPatternSetInput) String() string {
return awsutil.Prettify(s)
} | [
-0.09316562116146088,
-0.7553351521492004,
0.2296287566423416,
-0.43988290429115295,
-0.9040341377258301,
0.7459446787834167,
1.0426671504974365,
-0.5521788597106934,
0.4131314158439636,
0.1706506460905075,
0.025871695950627327,
0.676183819770813,
-0.18881678581237793,
-0.9299085140228271,... |
func (s *UpdateRegexPatternSetInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "UpdateRegexPatternSetInput"}
if s.ChangeToken == nil {
invalidParams.Add(aws.NewErrParamRequired("ChangeToken"))
}
if s.ChangeToken != nil && len(*s.ChangeToken) < 1 {
invalidParams.Add(aws.NewErrParamMinLen... | [
-0.7481048107147217,
-0.42927172780036926,
0.8213803172111511,
-0.025659816339612007,
-0.40262484550476074,
0.2816492021083832,
-0.11295491456985474,
-0.6086046695709229,
-0.09415902197360992,
0.29829081892967224,
0.29684504866600037,
0.4849598705768585,
-1.1936582326889038,
0.303035378456... |
func (s UpdateRegexPatternSetOutput) String() string {
return awsutil.Prettify(s)
} | [
0.220645010471344,
-1.0628764629364014,
0.34277036786079407,
-0.5173081755638123,
-0.8087341785430908,
0.10690882802009583,
1.1689121723175049,
-0.2623274326324463,
-0.11233632266521454,
0.0077342139557003975,
0.5070692300796509,
0.3045203685760498,
0.32953065633773804,
-1.2648762464523315... |
func (r UpdateRegexPatternSetRequest) Send(ctx context.Context) (*UpdateRegexPatternSetResponse, error) {
r.Request.SetContext(ctx)
err := r.Request.Send()
if err != nil {
return nil, err
}
resp := &UpdateRegexPatternSetResponse{
UpdateRegexPatternSetOutput: r.Request.Data.(*UpdateRegexPatternSetOutput),
re... | [
-1.5220694541931152,
-0.3221414387226105,
0.5891409516334534,
-0.17394380271434784,
-0.23607751727104187,
0.07668155431747437,
0.14470361173152924,
-0.467166930437088,
0.45465949177742004,
0.036530401557683945,
-0.8568705320358276,
1.0888875722885132,
-0.9170821309089661,
-0.94764244556427... |
func (r *UpdateRegexPatternSetResponse) SDKResponseMetdata() *aws.Response {
return r.response
} | [
-0.5706651210784912,
-0.5973497033119202,
0.3336910605430603,
-0.29445314407348633,
-0.4424675703048706,
0.27132683992385864,
0.01565624587237835,
-0.10854959487915039,
1.3833868503570557,
-0.06472015380859375,
-0.6368893980979919,
0.08707799017429352,
-0.4770084321498871,
-1.5692211389541... |
func NewPostUserOK() *PostUserOK {
return &PostUserOK{}
} | [
-0.12838196754455566,
-0.5353744029998779,
-0.06254024803638458,
1.5075422525405884,
-2.1747963428497314,
-0.027322381734848022,
0.8220754265785217,
0.6591541171073914,
-1.2199091911315918,
-0.15100903809070587,
-1.3507802486419678,
-0.5995591878890991,
-0.16343671083450317,
-0.09448148310... |
func (o *PostUserOK) WithPayload(payload *models.User) *PostUserOK {
o.Payload = payload
return o
} | [
0.2323000282049179,
-0.23815755546092987,
-0.05618808791041374,
0.4678637683391571,
-2.075669765472412,
0.20579442381858826,
0.3989540636539459,
-0.20809157192707062,
-0.39117127656936646,
-0.0670553520321846,
-0.571706235408783,
-1.4210541248321533,
0.08779940754175186,
-0.296480119228363... |
func (o *PostUserOK) SetPayload(payload *models.User) {
o.Payload = payload
} | [
0.033992767333984375,
0.099876768887043,
0.03834148123860359,
0.6013197302818298,
-1.6627824306488037,
0.5338015556335449,
0.301178902387619,
-0.38447001576423645,
-0.6891714334487915,
-0.0949384868144989,
-1.053344488143921,
-0.938118040561676,
-0.5446258783340454,
0.171881765127182,
-0... |
func (o *PostUserOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
if err := producer.Produce(rw, o.Payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
-0.10920466482639313,
-0.3348580002784729,
0.14620620012283325,
0.9668794274330139,
0.16827110946178436,
-0.3451782166957855,
0.6952378153800964,
-0.15788498520851135,
0.07864536345005035,
0.31310591101646423,
-0.06384479999542236,
-0.9016002416610718,
-0.4805809557437897,
-0.4217117726802... |
func NewPostUserBadRequest() *PostUserBadRequest {
return &PostUserBadRequest{}
} | [
-0.4573335349559784,
-0.5690579414367676,
-0.022804250940680504,
1.1428014039993286,
-1.592272162437439,
-0.3139783442020416,
-0.5218718647956848,
0.3463106155395508,
-1.3057126998901367,
-0.8626997470855713,
-0.430037260055542,
0.18793092668056488,
-0.4353000223636627,
0.33871233463287354... |
func (o *PostUserBadRequest) WithPayload(payload string) *PostUserBadRequest {
o.Payload = payload
return o
} | [
-0.41179215908050537,
-0.20531637966632843,
0.22391915321350098,
0.568716824054718,
-1.1749707460403442,
0.270131915807724,
-0.8665590286254883,
-0.5929369926452637,
-0.13704757392406464,
-0.8925973176956177,
0.33613237738609314,
-0.45115727186203003,
-0.3038957417011261,
0.134187653660774... |
func (o *PostUserBadRequest) SetPayload(payload string) {
o.Payload = payload
} | [
-0.5410676002502441,
0.0034785314928740263,
0.15922139585018158,
0.7188782691955566,
-0.6690871715545654,
0.412322074174881,
-0.9131539463996887,
-0.6282116770744324,
-0.4686160385608673,
-0.9305685758590698,
-0.1758204996585846,
-0.19544142484664917,
-1.0494590997695923,
0.383364886045455... |
func (o *PostUserBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(400)
if err := producer.Produce(rw, o.Payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
} | [
-0.5024943351745605,
-0.3969719111919403,
0.30700698494911194,
0.9482370615005493,
0.5824610590934753,
-0.09327536076307297,
-0.09199010580778122,
-0.4641883969306946,
0.10494748502969742,
-0.236941859126091,
0.06233150511980057,
-0.369291752576828,
-0.7028654217720032,
-0.3797143697738647... |
func (b *Blob) leaseCommonPut(headers map[string]string, expectedStatus int, options *LeaseOptions) (http.Header, error) {
params := url.Values{"comp": {"lease"}}
if options != nil {
params = addTimeout(params, options.Timeout)
headers = mergeHeaders(headers, headersFromStruct(*options))
}
uri := b.Container.b... | [
0.05379406362771988,
-0.541789710521698,
0.928403377532959,
-0.6191481947898865,
-0.165008082985878,
0.12655971944332123,
0.32925525307655334,
0.3467777371406555,
0.30838119983673096,
0.9409061074256897,
-0.10026620328426361,
0.10644396394491196,
-1.4700709581375122,
-0.5240964889526367,
... |
func (b *Blob) AcquireLease(leaseTimeInSeconds int, proposedLeaseID string, options *LeaseOptions) (returnedLeaseID string, err error) {
headers := b.Container.bsc.client.getStandardHeaders()
headers[leaseAction] = acquireLease
if leaseTimeInSeconds == -1 {
// Do nothing, but don't trigger the following clauses.
... | [
0.32642263174057007,
-0.6613848805427551,
0.6832385063171387,
0.19103753566741943,
-0.018907850608229637,
-0.3181416392326355,
-1.0660675764083862,
-0.4165237843990326,
0.21265359222888947,
-0.03585153818130493,
0.5614932775497437,
0.07519819587469101,
-1.18587327003479,
0.1595505326986313... |
func (b *Blob) BreakLease(options *LeaseOptions) (breakTimeout int, err error) {
headers := b.Container.bsc.client.getStandardHeaders()
headers[leaseAction] = breakLease
return b.breakLeaseCommon(headers, options)
} | [
0.3418886065483093,
-0.21898959577083588,
0.6144160032272339,
0.1324312537908554,
0.40999096632003784,
-0.3910881280899048,
-0.33009761571884155,
-0.18605056405067444,
-0.0790710598230362,
0.28260549902915955,
-0.3628576695919037,
-0.1750250607728958,
-1.7596074342727661,
-0.09091579914093... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.