text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (e *Server) Load(i base.ModelInterface) error {
m, ok := i.(*model.Server)
if !ok {
log.Error("entity.Server.Load() failed, convert interface failed.")
return base.ErrorDataConvert
}
base.EntityLoad(&e.Entity, &m.Model)
updateProductInfoEntity(&e.ProductInfo, &m.ProductInfo)
e.State = m.State
e.Health =... | [
-1.2340203523635864,
-0.7066745758056641,
0.666952908039093,
-0.7253274917602539,
0.28850406408309937,
0.7990103960037231,
-0.08163086324930191,
-0.49798694252967834,
-0.35253751277923584,
0.149405837059021,
-0.8402184247970581,
-0.13427507877349854,
-0.7774079442024231,
0.3047224581241607... |
func (e *Server) ToModel() base.ModelInterface {
m := model.Server{}
base.EntityToModel(&e.Entity, &m.Model)
createProductInfoModel(&e.ProductInfo, &m.ProductInfo)
m.OriginURIs.Chassis = e.OriginURIsChassis
m.OriginURIs.System = e.OriginURIsSystem
m.PhysicalUUID = e.PhysicalUUID
m.Name = e.Name
m.Description = ... | [
-0.27029627561569214,
-0.2479848861694336,
0.8305249214172363,
-0.6251211762428284,
0.4896807074546814,
1.0337234735488892,
0.6837782263755798,
-0.32659757137298584,
0.37083837389945984,
0.1551159769296646,
-1.0011038780212402,
-0.25722452998161316,
-0.06015441194176674,
0.5878956913948059... |
func (e *Server) ToCollectionMember() base.CollectionMemberModelInterface {
m := new(model.ServerCollectionMember)
base.EntityToMember(&e.Entity, &m.CollectionMemberModel)
m.Name = e.Name
m.State = e.State
m.Health = e.Health
return m
} | [
-0.0861581340432167,
-0.48812973499298096,
0.4239867627620697,
-0.792610228061676,
0.13701067864894867,
0.9360791444778442,
-0.6404567360877991,
-1.1079154014587402,
0.358985960483551,
0.4782657325267792,
-0.9734024405479431,
0.7392128705978394,
0.0617709755897522,
0.5136359333992004,
0.... |
func ExampleBackupPoliciesClient_NewListPager_listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVm() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesba... | [
0.6487408876419067,
-0.21695776283740997,
0.7142094969749451,
0.1314902901649475,
0.8308668732643127,
-0.5524447560310364,
-0.3399701416492462,
-0.41562479734420776,
1.035652995109558,
0.9427701234817505,
0.20213834941387177,
-0.2464221864938736,
-0.2925388216972351,
0.43651479482650757,
... |
func ExampleBackupPoliciesClient_NewListPager_listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVmWithBothV1AndV2Policies() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err :... | [
0.6526460647583008,
-0.2669449746608734,
0.7516582012176514,
0.17761090397834778,
0.9104356169700623,
-0.3634113073348999,
-0.3837830424308777,
-0.3919759690761566,
0.7215438485145569,
0.8594447374343872,
0.14787250757217407,
-0.16066305339336395,
-0.34512656927108765,
0.4391558766365051,
... |
func ExampleBackupPoliciesClient_NewListPager_listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservices... | [
0.38328349590301514,
-0.2786557078361511,
0.7671480774879456,
-0.2416592389345169,
0.31614765524864197,
-0.26916807889938354,
-0.4759199619293213,
-0.6635586023330688,
0.8277182579040527,
0.5976153016090393,
-0.3042929768562317,
-0.28526973724365234,
-0.4680212736129761,
0.3089555501937866... |
func BuildTypeMap(validSearchAttributesFn dynamicconfig.MapPropertyFn) (map[string]enumspb.IndexedValueType, error) {
if validSearchAttributesFn == nil {
return nil, nil
}
validSearchAttributes := validSearchAttributesFn()
if len(validSearchAttributes) == 0 {
return nil, nil
}
result := make(map[string]enums... | [
-1.8289406299591064,
-0.510066032409668,
0.6329095363616943,
1.0042598247528076,
0.4183250665664673,
-0.1361841857433319,
0.9654847383499146,
0.012717537581920624,
0.15778838098049164,
0.25392648577690125,
-0.44615450501441956,
0.03729308396577835,
-0.5729553699493408,
-0.2582489550113678,... |
func ApplyTypeMap(searchAttributes *commonpb.SearchAttributes, typeMap NameTypeMap) {
for saName, saPayload := range searchAttributes.GetIndexedFields() {
_, metadataHasValueType := saPayload.Metadata[MetadataType]
if metadataHasValueType {
continue
}
valueType, err := typeMap.getType(saName, customCategory... | [
-0.35806259512901306,
-0.15012992918491364,
0.4917545020580292,
0.03354128077626228,
0.4071808457374573,
0.12853534519672394,
0.33311727643013,
-0.07998113334178925,
0.21372492611408234,
0.21244829893112183,
0.15433892607688904,
0.398553729057312,
-0.46872198581695557,
0.6501402258872986,
... |
func (compiler *Compiler) ScanExpression() (Expression, error) {
var expression, err = compiler.scanExpression()
if err != nil {
return expression, err
}
return compiler.Shunt(expression, 0)
} | [
-0.3423098921775818,
0.29636162519454956,
0.5339159965515137,
0.35454440116882324,
-0.7919217348098755,
-0.7642839550971985,
0.3318830728530884,
0.12756867706775665,
0.5545371174812317,
-0.021560300141572952,
0.1840876191854477,
0.8748577237129211,
-0.5480672121047974,
0.5320255160331726,
... |
func (compiler *Compiler) Expression(token Token) (Expression, error) {
var expression = compiler.NewExpression()
if token == nil {
return Expression{}, io.EOF
}
//Ignore comments
if len(token) > 2 && token[0] == '/' && token[1] == '/' {
compiler.Go.Write(token)
return expression, nil
}
//Inverse expres... | [
-0.3550128638744354,
0.1235089972615242,
0.850313127040863,
0.46486568450927734,
-0.5250157117843628,
-0.8492244482040405,
1.0182443857192993,
-0.33166900277137756,
-0.03168320283293724,
0.7199191451072693,
-0.7014093399047852,
0.4863491356372833,
-0.41526567935943604,
0.1332140862941742,
... |
func NewTransferBalanceTypeFromValue(v string) (*TransferBalanceType, error) {
ev := TransferBalanceType(v)
return &ev, nil
} | [
1.2369253635406494,
-0.155031219124794,
0.42323198914527893,
0.0006139801698736846,
-0.4975457489490509,
0.269091933965683,
0.41646361351013184,
-0.881215512752533,
0.913914144039154,
0.654347836971283,
-0.5920745134353638,
-0.7310559749603271,
-0.509263813495636,
1.141216516494751,
0.57... |
func (v TransferBalanceType) IsValid() bool {
for _, existing := range allowedTransferBalanceTypeEnumValues {
if existing == v {
return true
}
}
return false
} | [
0.09453174471855164,
-0.3126153349876404,
0.7508242130279541,
-0.5061895847320557,
0.32216688990592957,
1.5488487482070923,
0.09371233731508255,
-0.7881297469139099,
0.4707722067832947,
0.7763223052024841,
-0.2941913902759552,
0.21134193241596222,
-0.9744033217430115,
0.37674760818481445,
... |
func (v TransferBalanceType) Ptr() *TransferBalanceType {
return &v
} | [
1.2163405418395996,
0.3383418321609497,
0.031111961230635643,
-0.649287760257721,
-0.27802813053131104,
1.250275731086731,
-0.27449262142181396,
-1.7821357250213623,
0.9120893478393555,
0.45595914125442505,
1.2224963903427124,
0.059716809540987015,
-0.9739336371421814,
0.5306071639060974,
... |
func getCommaSeparatedStringEnvVar(envVar string, def []string) []string {
if val := os.Getenv(envVar); val != "" {
def = def[:0]
for _, addr := range strings.Split(strings.Replace(val, " ", "", -1), ",") {
def = append(def, addr)
}
}
return def
} | [
0.033395927399396896,
-0.2009325474500656,
0.5617030262947083,
-0.19628103077411652,
0.9433760046958923,
-0.13553014397621155,
-1.079797625541687,
0.5630651116371155,
-0.10775769501924515,
0.9713494777679443,
-0.03832072764635086,
1.3362001180648804,
-0.4184555113315582,
0.6375691294670105... |
func getStringEnvVar(envVar string, def string) string {
if val := os.Getenv(envVar); val != "" {
return val
}
return def
} | [
-0.216685950756073,
0.07650439441204071,
0.6142880916595459,
-0.20804530382156372,
0.07767720520496368,
-0.22163552045822144,
-0.6002302765846252,
-0.36297401785850525,
-0.9645423293113708,
0.5221022963523865,
-0.1664365977048874,
1.5030725002288818,
-0.42610108852386475,
0.195300459861755... |
func getDurationEnvVar(envVar string, def time.Duration) time.Duration {
if strVal := os.Getenv(envVar); strVal != "" {
if dur, err := time.ParseDuration(strVal); err == nil {
return dur
}
}
return def
} | [
-0.5181014537811279,
0.22395546734333038,
0.5236682295799255,
0.4439316987991333,
0.27566665410995483,
-0.07365158200263977,
0.3479224741458893,
0.04423564672470093,
-0.4913537800312042,
0.553312361240387,
-0.29780736565589905,
1.4428141117095947,
0.24789197742938995,
1.2176923751831055,
... |
func FirstNonNil(errs ...error) error {
for _, err := range errs {
if err != nil {
return err
}
}
return nil
} | [
0.6598852276802063,
-0.525644838809967,
0.40410420298576355,
0.2092454433441162,
0.6230292916297913,
-1.2635631561279297,
-1.2896002531051636,
0.22344154119491577,
-0.272834450006485,
0.28978005051612854,
-0.1343730241060257,
-0.3804410696029663,
0.30178627371788025,
1.4196054935455322,
... |
func (msg *Data) Validate() map[string]string {
var rxEmail = regexp.MustCompile(".+@.+\\..+")
msg.Errors = make(map[string]string)
match := rxEmail.Match([]byte(msg.Email))
if match == false {
msg.Errors["email"] = "Please enter a valid email"
}
if strings.TrimSpace(msg.FName) == "" {
msg.Errors["fname"] = ... | [
-0.03709866479039192,
-0.08047208935022354,
0.7906582951545715,
-0.7868931889533997,
-0.2576673626899719,
-0.20192915201187134,
-0.7147119641304016,
-0.20186738669872284,
-0.809515655040741,
-0.15090782940387726,
-0.12566450238227844,
-0.12398229539394379,
-0.7793185114860535,
0.7653831839... |
func (user *User) Create() (err error) {
stmt, err := database.DB.Prepare("INSERT INTO users (uuid, fname, lname, email, password, created_at) VALUES (?, ?, ?, ?, ?, ?)")
if err != nil {
log.Println("Prepare statement error", err)
return
}
defer stmt.Close()
res, err := stmt.Exec(
database.GenerateUUID(),
... | [
-0.45755159854888916,
0.7271735072135925,
0.5584847331047058,
0.6968788504600525,
0.9002172350883484,
0.39443522691726685,
-0.263308048248291,
-0.1827990710735321,
-0.8785807490348816,
-0.29782381653785706,
-0.2956075370311737,
-0.8031957149505615,
-0.47316083312034607,
0.2928192615509033,... |
func (user *User) CreateSession() (sessionID int64, err error) {
stmt, err := database.DB.Prepare(`INSERT INTO sessions (uuid, fname, lname, email, usr_id, created_at)
VALUES (?, ?, ?, ?, ?, ?)`)
if err != nil {
log.Println("Prepare statement error", err)
return
}
defer stmt.Close()
res, err := stmt.Exec(
... | [
-0.2241574227809906,
-0.1267913430929184,
0.8015798330307007,
0.2745654582977295,
0.2749406099319458,
0.7024592161178589,
0.6620710492134094,
-0.5615154504776001,
0.0712086409330368,
0.08584865927696228,
-0.3487869203090668,
-0.32020992040634155,
-0.6141234040260315,
0.1717127114534378,
... |
func GetUserByEmail(email string) (user User, err error) {
err = database.DB.QueryRow("SELECT id, uuid, fname, lname, email, password, created_at FROM users WHERE email = ?", email).
Scan(&user.ID, &user.UUID, &user.FName, &user.LName, &user.Email, &user.Password, &user.Created)
if err != nil {
log.Println("Get u... | [
-0.2945868670940399,
0.6932108998298645,
0.6112908124923706,
0.4266901910305023,
0.4070175290107727,
-0.15635958313941956,
0.1146390438079834,
-0.4522397220134735,
-0.465544193983078,
0.3686386048793793,
-0.2529015839099884,
-0.23343439400196075,
0.10719030350446701,
-0.9417089223861694,
... |
func New(node string, receivePort uint16, bits uint64) (*DHT, error) { // configuration
caller, err := chord.NewNodeCaller(receivePort)
if err != nil {
return nil, err
}
return &DHT{
node: node,
bits: bits,
caller: caller,
}, nil
} | [
0.4768984019756317,
0.5527240633964539,
0.7544447183609009,
-0.5287513136863708,
-0.2740463614463806,
0.5552599430084229,
-0.04792210832238197,
-1.1812353134155273,
-0.8421640396118164,
0.3069935441017151,
-0.1636824756860733,
0.6196180582046509,
0.18070751428604126,
0.14528165757656097,
... |
func (dht *DHT) Put(k string, v string) error {
hashk := chord.Hash(k, 1<<dht.bits)
remote, err := dht.caller.FindSuccessor(dht.node, hashk)
if err != nil {
return err
}
err = dht.caller.Put(remote.Address, k, []byte(v))
if err != nil {
return err
}
return nil
} | [
-0.004272910300642252,
1.123448133468628,
0.586545467376709,
-1.4048855304718018,
-0.2848398685455322,
0.6648573279380798,
0.09154275059700012,
-0.04414932057261467,
-0.6289308667182922,
0.7371974587440491,
-0.8457667827606201,
0.6781331896781921,
-0.627015233039856,
-0.28685134649276733,
... |
func (dht *DHT) Get(k string) (string, error) {
hashk := chord.Hash(k, 1<<dht.bits)
remote, err := dht.caller.FindSuccessor(dht.node, hashk)
if err != nil {
return "", err
}
v, err := dht.caller.Get(remote.Address, k)
if err != nil {
return "", err
}
return string(v), nil
} | [
-0.3293072581291199,
0.8361941576004028,
0.822288453578949,
-0.8687885999679565,
-0.8046165704727173,
0.18796533346176147,
-0.5611713528633118,
-0.6988688111305237,
-0.5927807092666626,
0.7410114407539368,
-0.21043485403060913,
0.3683726489543915,
0.14108864963054657,
0.05553551763296127,
... |
func parseDhcp(packet gopacket.Packet) {
// DHCP v4
dhcpLayer := packet.Layer(layers.LayerTypeDHCPv4)
if dhcpLayer != nil {
dhcp, _ := dhcpLayer.(*layers.DHCPv4)
linkSrc, _ := getMacs(packet)
// add device
dev := devices.Add(linkSrc)
if dhcp.Operation == layers.DHCPOpRequest {
debug("DHCP Request")
... | [
0.3103862404823303,
0.11426269263029099,
0.9112548828125,
-0.06938999146223068,
0.9456540942192078,
0.254506915807724,
0.43578553199768066,
-0.7178031802177429,
0.5472279787063599,
-0.22162854671478271,
-0.3259676396846771,
-0.4458862543106079,
0.26747530698776245,
0.6284518837928772,
1.... |
func NewDiskEncryptionSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *DiskEncryptionSetsClient {
cp := arm.ClientOptions{}
if options != nil {
cp = *options
}
if len(cp.Host) == 0 {
cp.Host = arm.AzurePublicCloud
}
return &DiskEncryptionSetsClient{subscription... | [
0.15316130220890045,
0.1804419904947281,
0.0649024248123169,
0.01251306664198637,
-0.2679653763771057,
-0.5592972636222839,
0.7606646418571472,
-1.3367422819137573,
-0.8988403081893921,
0.20564673840999603,
-0.39221957325935364,
1.3881354331970215,
-0.4298267960548401,
-0.3910655081272125,... |
func (client *DiskEncryptionSetsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet, options *DiskEncryptionSetsBeginCreateOrUpdateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGro... | [
-1.1754977703094482,
-0.20475254952907562,
0.5869677066802979,
-0.29165154695510864,
-0.19729657471179962,
-0.2011822909116745,
0.28093719482421875,
-0.5257532596588135,
-0.44769415259361267,
0.6907505989074707,
0.030405353754758835,
0.3971980810165405,
-0.06915239989757538,
0.796082973480... |
func (client *DiskEncryptionSetsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsBeginDeleteOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/d... | [
-0.5495530962944031,
0.022018129006028175,
0.7557867765426636,
-0.1538407951593399,
-0.3476346731185913,
-0.29959481954574585,
0.3139219582080841,
-0.6046452522277832,
-0.40536078810691833,
-0.09565483778715134,
0.4599950313568115,
0.9383402466773987,
-0.28004807233810425,
0.63915342092514... |
func (client *DiskEncryptionSetsClient) getCreateRequest(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsGetOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncrypti... | [
-0.6646277904510498,
0.3827354311943054,
0.9385102987289429,
-0.2104770690202713,
0.033379923552274704,
-0.5051201581954956,
-0.10424773395061493,
-0.9017431139945984,
-0.7734998464584351,
0.2794768214225769,
0.5945072770118713,
1.399017572402954,
-0.27040350437164307,
0.3703754246234894,
... |
func (client *DiskEncryptionSetsClient) getHandleResponse(resp *http.Response) (DiskEncryptionSetsGetResponse, error) {
result := DiskEncryptionSetsGetResponse{RawResponse: resp}
if err := runtime.UnmarshalAsJSON(resp, &result.DiskEncryptionSet); err != nil {
return DiskEncryptionSetsGetResponse{}, runtime.NewRespo... | [
-0.6783362627029419,
0.19747115671634674,
0.5423901677131653,
0.015448818914592266,
0.26353466510772705,
-0.7929170727729797,
0.7701697945594788,
-0.9476703405380249,
0.30695730447769165,
-0.3669937551021576,
-0.30851271748542786,
-0.7447964549064636,
-0.8770787715911865,
-0.26834869384765... |
func (client *DiskEncryptionSetsClient) listCreateRequest(ctx context.Context, options *DiskEncryptionSetsListOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subs... | [
-0.5292502045631409,
0.16132797300815582,
0.6801398992538452,
-0.369129478931427,
0.19112758338451385,
-0.4390691816806793,
-0.23242580890655518,
-0.42401817440986633,
-0.06521353125572205,
0.0693432092666626,
-0.16581569612026215,
1.0749236345291138,
0.03744125738739967,
0.816512286663055... |
func (client *DiskEncryptionSetsClient) listHandleResponse(resp *http.Response) (DiskEncryptionSetsListResponse, error) {
result := DiskEncryptionSetsListResponse{RawResponse: resp}
if err := runtime.UnmarshalAsJSON(resp, &result.DiskEncryptionSetList); err != nil {
return DiskEncryptionSetsListResponse{}, runtime.... | [
-0.819296658039093,
-0.46669358015060425,
0.4101288318634033,
-0.4010910391807556,
0.0032119203824549913,
-0.5882169008255005,
0.4232185482978821,
-0.4882403016090393,
0.7111407518386841,
0.22840985655784607,
-0.9493018984794617,
-0.8359220623970032,
-0.4841269254684448,
0.0980034172534942... |
func (client *DiskEncryptionSetsClient) listAssociatedResourcesCreateRequest(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsListAssociatedResourcesOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/... | [
-0.5046195387840271,
-0.16318580508232117,
0.199131578207016,
-1.0733848810195923,
-0.028484538197517395,
-0.7291457056999207,
0.49903345108032227,
-0.7726495862007141,
-0.15542414784431458,
0.043427370488643646,
0.13276539742946625,
0.6780647039413452,
0.24647429585456848,
0.6201754808425... |
func (client *DiskEncryptionSetsClient) listAssociatedResourcesHandleResponse(resp *http.Response) (DiskEncryptionSetsListAssociatedResourcesResponse, error) {
result := DiskEncryptionSetsListAssociatedResourcesResponse{RawResponse: resp}
if err := runtime.UnmarshalAsJSON(resp, &result.ResourceURIList); err != nil {
... | [
0.007416653446853161,
-0.6760953068733215,
-0.08039358258247375,
-0.9698337912559509,
-0.2661549150943756,
-0.3753686547279358,
1.2378640174865723,
-0.5548333525657654,
0.18246491253376007,
0.46033576130867004,
-0.617621898651123,
-1.0477041006088257,
0.026539171114563942,
0.49448838829994... |
func (client *DiskEncryptionSetsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DiskEncryptionSetsListByResourceGroupOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryp... | [
-0.5294727087020874,
0.14525772631168365,
0.14588843286037445,
-0.5953454375267029,
-0.02860754169523716,
-0.47155559062957764,
0.4029623866081238,
-1.0417593717575073,
-0.24579742550849915,
0.5162084698677063,
0.15685120224952698,
0.177930548787117,
-0.15504907071590424,
1.064409971237182... |
func (client *DiskEncryptionSetsClient) listByResourceGroupHandleResponse(resp *http.Response) (DiskEncryptionSetsListByResourceGroupResponse, error) {
result := DiskEncryptionSetsListByResourceGroupResponse{RawResponse: resp}
if err := runtime.UnmarshalAsJSON(resp, &result.DiskEncryptionSetList); err != nil {
retu... | [
-0.3973426818847656,
-0.087961845099926,
0.08614853769540787,
-0.8769497275352478,
-0.2911214530467987,
-0.3459368050098419,
0.803794264793396,
-0.9831617474555969,
0.19311083853244781,
0.2125939130783081,
-0.45143312215805054,
-1.5364667177200317,
-0.7153465747833252,
0.6097995042800903,
... |
func (client *DiskEncryptionSetsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate, options *DiskEncryptionSetsBeginUpdateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resou... | [
-1.314314842224121,
-0.29182177782058716,
0.7050825953483582,
-0.15371087193489075,
-0.6290467381477356,
-0.4332631230354309,
0.23430266976356506,
-0.52666836977005,
-0.6928223371505737,
0.6709126830101013,
0.016539359465241432,
0.8342907428741455,
-0.18063677847385406,
0.6103590130805969,... |
func rCryptChallenge(w http.ResponseWriter, r *http.Request, db *bolt.DB) {
w.Header().Set("Content-Type", "application/json")
if HSTSENABLED == true {
w.Header().Set("Strict-Transport-Security", "max-age="+strconv.FormatInt(HSTSEXPIRY, 10)+"; includeSubdomains")
}
response := APIChallengeResponse{StatusCode: 20... | [
-0.24161700904369354,
0.20900443196296692,
0.7313804626464844,
0.35448527336120605,
0.0752350389957428,
-0.006622476503252983,
0.2028798758983612,
-0.24500124156475067,
-0.1761525273323059,
0.903078019618988,
-1.3602744340896606,
-0.29566287994384766,
-0.4519706964492798,
0.214724466204643... |
func NewGetUserUsageParams() *GetUserUsageParams {
var ()
return &GetUserUsageParams{
timeout: cr.DefaultTimeout,
}
} | [
-0.26065370440483093,
-0.0029364570509642363,
0.2932576835155487,
1.1855844259262085,
0.15876059234142303,
-0.48064765334129333,
0.2487339824438095,
0.4541894495487213,
-0.45720958709716797,
0.6206134557723999,
-0.4199799597263336,
0.39007386565208435,
-0.5825299024581909,
-0.1079850196838... |
func NewGetUserUsageParamsWithTimeout(timeout time.Duration) *GetUserUsageParams {
var ()
return &GetUserUsageParams{
timeout: timeout,
}
} | [
0.3483666777610779,
-0.47183656692504883,
0.4523681402206421,
1.1493916511535645,
-0.07831490784883499,
0.23288246989250183,
-0.6712028384208679,
0.20980532467365265,
-0.6107712984085083,
1.4630378484725952,
-0.17760293185710907,
0.5948056578636169,
-0.31200936436653137,
0.2127834260463714... |
func NewGetUserUsageParamsWithContext(ctx context.Context) *GetUserUsageParams {
var ()
return &GetUserUsageParams{
Context: ctx,
}
} | [
-0.2888955771923065,
-0.39748474955558777,
0.6796754598617554,
0.7409794330596924,
0.08822499215602875,
0.34669312834739685,
-0.4204462468624115,
-0.552282989025116,
0.0008927350863814354,
0.9782251715660095,
-0.3642798662185669,
0.29990771412849426,
-0.31528908014297485,
-0.26591381430625... |
func NewGetUserUsageParamsWithHTTPClient(client *http.Client) *GetUserUsageParams {
var ()
return &GetUserUsageParams{
HTTPClient: client,
}
} | [
-0.42138755321502686,
-0.5099595189094543,
0.7534478306770325,
0.9346507787704468,
0.41801777482032776,
0.3670729994773865,
0.4844471514225006,
0.22220245003700256,
-0.37434250116348267,
0.5507785081863403,
-0.5733410716056824,
0.055220797657966614,
-0.29752811789512634,
-0.494263917207717... |
func (o *GetUserUsageParams) WithTimeout(timeout time.Duration) *GetUserUsageParams {
o.SetTimeout(timeout)
return o
} | [
0.3758809566497803,
0.13269849121570587,
0.3231590986251831,
0.5059605836868286,
-0.209781676530838,
-0.16535542905330658,
0.1676698923110962,
-0.03688066080212593,
0.12690289318561554,
1.0506418943405151,
0.4190618097782135,
0.7248653173446655,
0.42285284399986267,
0.1835104525089264,
0... |
func (o *GetUserUsageParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
-0.07752149552106857,
0.4314034581184387,
0.26844215393066406,
0.37077581882476807,
0.5810005068778992,
0.1691480129957199,
0.6393694877624512,
0.6630721092224121,
-0.28234243392944336,
1.019598364830017,
0.34884974360466003,
0.902747392654419,
-0.34551024436950684,
0.1517578810453415,
0... |
func (o *GetUserUsageParams) WithContext(ctx context.Context) *GetUserUsageParams {
o.SetContext(ctx)
return o
} | [
-0.3824784457683563,
0.12370459735393524,
0.5850532650947571,
0.3943535089492798,
-0.3341222107410431,
-0.23967961966991425,
0.09321386367082596,
-0.800607442855835,
0.4825626611709595,
0.3758883774280548,
0.3837536573410034,
0.5269536375999451,
-0.03324950858950615,
-0.3161185085773468,
... |
func (o *GetUserUsageParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.7535060048103333,
0.37718984484672546,
0.3633742034435272,
0.43213561177253723,
0.5328478813171387,
-0.04139457643032074,
0.5722888112068176,
-0.03931335359811783,
0.5218705534934998,
0.2739257216453552,
0.164256289601326,
0.860802412033081,
-0.5739797949790955,
-0.3431101441383362,
-... |
func (o *GetUserUsageParams) WithHTTPClient(client *http.Client) *GetUserUsageParams {
o.SetHTTPClient(client)
return o
} | [
-0.30108755826950073,
-0.6955632567405701,
0.5931594967842102,
0.2487814575433731,
-0.038607120513916016,
-0.4703063368797302,
0.8215616941452026,
-0.5272622108459473,
-0.15500721335411072,
-0.008552811108529568,
0.08451928943395615,
0.14237934350967407,
0.34206560254096985,
-0.60670131444... |
func (o *GetUserUsageParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
-0.1414465457201004,
-0.31595486402511597,
0.5140160322189331,
-0.5508133769035339,
-0.1787254512310028,
-0.4150087833404541,
1.0368163585662842,
-0.13327716290950775,
-0.5776239037513733,
0.18734143674373627,
-0.1707700937986374,
0.7344251871109009,
-0.507533609867096,
-0.803259551525116,... |
func (o *GetUserUsageParams) WithCloud(cloud *string) *GetUserUsageParams {
o.SetCloud(cloud)
return o
} | [
-0.37040379643440247,
0.7259352803230286,
0.2667795419692993,
0.8774412274360657,
0.06370021402835846,
-0.6069091558456421,
0.6300448775291443,
-0.7217283844947815,
0.18139103055000305,
-0.30231133103370667,
0.7599969506263733,
0.2169010192155838,
0.11539975553750992,
-0.011500289663672447... |
func (o *GetUserUsageParams) SetCloud(cloud *string) {
o.Cloud = cloud
} | [
-0.580834686756134,
0.9572598338127136,
0.2581726014614105,
0.9534509778022766,
0.6202351450920105,
-0.2529536187648773,
1.2183135747909546,
0.0024272226728498936,
-0.09488186985254288,
-0.020020807161927223,
0.15468724071979523,
0.6665709018707275,
-0.6415100693702698,
-0.0312351305037736... |
func (o *GetUserUsageParams) WithFilterenddate(filterenddate *int64) *GetUserUsageParams {
o.SetFilterenddate(filterenddate)
return o
} | [
-0.3237681984901428,
0.2964475750923157,
0.5201654434204102,
0.4532889723777771,
-0.7281228303909302,
-0.6546775102615356,
0.2849437892436981,
-0.5095269680023193,
-0.18677937984466553,
0.9808874130249023,
0.3621896505355835,
0.7918717265129089,
-0.18162421882152557,
-0.21802060306072235,
... |
func (o *GetUserUsageParams) SetFilterenddate(filterenddate *int64) {
o.Filterenddate = filterenddate
} | [
-0.8725723028182983,
0.2557528018951416,
0.4406851828098297,
0.16348810493946075,
-0.19220997393131256,
-0.27484047412872314,
0.5330954194068909,
-0.13914653658866882,
-0.7211458683013916,
0.8207848072052002,
-0.06722218543291092,
1.2512108087539673,
-0.6991094946861267,
0.2098529785871505... |
func (o *GetUserUsageParams) WithSince(since *int64) *GetUserUsageParams {
o.SetSince(since)
return o
} | [
0.04916020855307579,
0.4822007119655609,
0.546260416507721,
1.2330034971237183,
-0.4358186721801758,
-0.4202883839607239,
0.43022847175598145,
-0.01638028956949711,
-0.3207169473171234,
-0.40372610092163086,
-0.14307008683681488,
0.20374341309070587,
-0.04173598811030388,
0.071286074817180... |
func (o *GetUserUsageParams) SetSince(since *int64) {
o.Since = since
} | [
-0.46244698762893677,
0.7368532419204712,
0.4347096383571625,
1.0631804466247559,
-0.23715415596961975,
-0.4529015123844147,
0.553552508354187,
0.5602388381958008,
-0.7573716640472412,
-0.24192070960998535,
-0.4283483624458313,
0.6667749285697937,
-0.8789297342300415,
0.2937621474266052,
... |
func (o *GetUserUsageParams) WithZone(zone *string) *GetUserUsageParams {
o.SetZone(zone)
return o
} | [
-0.702732264995575,
0.05318525806069374,
0.11130326986312866,
0.7781921625137329,
0.15967527031898499,
-0.9252747297286987,
0.9808689951896667,
0.020383320748806,
0.44476330280303955,
0.01710926927626133,
0.08841236680746078,
0.025122420862317085,
-0.2472638636827469,
0.14381718635559082,
... |
func (o *GetUserUsageParams) SetZone(zone *string) {
o.Zone = zone
} | [
-1.0099256038665771,
-0.007417241111397743,
0.058274220675230026,
0.9187477231025696,
0.7729881405830383,
-0.678406298160553,
1.405001163482666,
0.7884870767593384,
0.26422759890556335,
0.23529241979122162,
-0.17439226806163788,
0.5295044779777527,
-1.0041227340698242,
0.265555202960968,
... |
func (o *GetUserUsageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Cloud != nil {
// query param cloud
var qrCloud string
if o.Cloud != nil {
qrCloud = *o.Cloud
}
qCloud := qrCloud
if... | [
-0.9647549390792847,
-0.18713879585266113,
1.2037540674209595,
-0.4492742419242859,
0.3996148407459259,
-0.08163654059171677,
1.4793665409088135,
-0.07275528460741043,
-0.29301223158836365,
0.32225683331489563,
0.09899236261844635,
0.5761718153953552,
-0.4916865825653076,
0.173363953828811... |
func discoverCanalFlannelNetwork(ctx context.Context, client controllerClient.Client) (*ClusterNetwork, error) {
// TODO: this must be smarter, looking for the canal daemonset, with labels k8s-app=canal
// and then the reference on the container volumes:
// - configMap:
// defaultMode: 420
// ... | [
0.08110589534044266,
-0.10599854588508606,
0.4096846282482147,
-0.18049773573875427,
0.46269941329956055,
-0.7322075963020325,
-0.1860702931880951,
-0.5769268274307251,
0.553315281867981,
-0.6181105971336365,
-0.06991484761238098,
0.5064406394958496,
-0.23622861504554749,
0.490629762411117... |
func Get(ctx context.Context) (*Metadata, error) {
if !fetched.Swap(true) {
// Spawn a goroutine responsible for fetching the metadata if we're the
// first Get caller.
go func() {
defaultFetcher := &fetchConfig{}
defaultFetcher.setDefaults()
metadata = defaultFetcher.fetch(context.Background())
// ... | [
-0.4315924346446991,
0.5116466283798218,
0.5061306953430176,
0.10403502732515335,
0.7914202213287354,
0.05212793126702309,
-1.255256175994873,
-0.7476577758789062,
-0.3556632995605469,
0.39183127880096436,
0.1633702516555786,
0.6736095547676086,
-0.02534911036491394,
0.07717926800251007,
... |
func (servo *Servo) IsOKValue(value int) bool {
return value >= servo.Min && value <= servo.Max
} | [
-0.29083484411239624,
-0.12132494151592255,
0.40282148122787476,
0.5975221991539001,
-1.4734361171722412,
0.22178463637828827,
-0.19799676537513733,
-0.6226917505264282,
0.6380372643470764,
-0.03997231647372246,
-0.4922228455543518,
0.3604331314563751,
0.23150242865085602,
0.20779044926166... |
func DefaultServo() Servo {
return Servo{
uuid.New().String(),
"",
make([]string, 0),
-1,
servoAvg,
servoHardMin,
servoHardMax,
servoHardMin,
servoHardMax,
false,
}
} | [
-0.11983323097229004,
0.23069682717323303,
0.26021382212638855,
-0.01067204400897026,
-0.0725424513220787,
-0.03212118521332741,
-0.5805318355560303,
0.19727711379528046,
-0.8860532641410828,
-0.36174628138542175,
-1.1731699705123901,
0.14647068083286285,
-0.5695242881774902,
0.31949499249... |
func (servo *Servo) SetDefaultPosition(defaultPosition int) error {
if defaultPosition < servo.Min {
return errors.New("Servo.SetDefaultPosition() error: given position is lower than min")
}
if defaultPosition > servo.Max {
return errors.New("Servo.SetDefaultPosition() error: given position is higher than max")
... | [
-0.0007938612252473831,
0.08161509037017822,
0.4586206376552582,
0.4662425220012665,
0.4417654275894165,
0.5981101989746094,
0.19607648253440857,
-0.4362899363040924,
0.12385311722755432,
-0.6069533824920654,
-1.3336318731307983,
-0.5723676085472107,
-1.1292219161987305,
0.5191012024879456... |
func (servo *Servo) SetMin(min int) error {
if min < servo.HardMin {
return errors.New("Servo.SetMin() error: given min is lower than hardMin")
}
servo.Min = min
return nil
} | [
0.006746080704033375,
0.2633865177631378,
0.3121432363986969,
0.7257195711135864,
-0.3211643099784851,
0.9986523985862732,
-0.46788570284843445,
-1.1643409729003906,
-0.15680068731307983,
-0.7850180268287659,
-0.7086437344551086,
0.7099646329879761,
-0.9309147596359253,
1.5083644390106201,... |
func (servo *Servo) SetMax(max int) error {
if max > servo.HardMax {
return errors.New("Servo.SetMax() error: given max is higher than hardMax")
}
servo.Max = max
return nil
} | [
-0.4826364517211914,
0.9713202714920044,
0.5939375758171082,
1.3003859519958496,
0.28666797280311584,
0.6080948710441589,
-0.5455280542373657,
0.3145509660243988,
-0.14945998787879944,
-0.25672468543052673,
-1.0330302715301514,
1.0227080583572388,
-0.3080810308456421,
1.1073511838912964,
... |
func (source *Config) New(name string, params utils.Params) (Source, error) {
switch {
case source.SFTP != nil:
return source.SFTP.New(name, params)
case source.HTTP != nil:
return source.HTTP.New(name, params)
case source.Script != nil:
return source.Script.New(name, params)
case source.Query != nil:
retu... | [
-0.36660343408584595,
0.19233714044094086,
0.2539956271648407,
0.02254187874495983,
-0.8594613671302795,
-0.8420749306678772,
-0.8718317747116089,
0.14823056757450104,
-0.6931005120277405,
0.15580390393733978,
-0.6116142868995667,
-0.05083201453089714,
0.4168687164783478,
1.908087253570556... |
func (filter *FilterConfig) New() (*Filter, error) {
patterns := make([]*regexp.Regexp, 0)
for i, pattern := range filter.Patterns {
regexpPattern, err := regexp.Compile(pattern)
if err != nil {
return nil, fmt.Errorf("invalid filter: couldn't compile regexp rule number %d", i)
}
patterns = append(patterns... | [
0.09960717707872391,
-0.8186807632446289,
0.2560447156429291,
0.16150683164596558,
0.07900427281856537,
-0.24996910989284515,
0.2843169569969177,
0.35837090015411377,
-0.6970143914222717,
-0.1693103015422821,
-0.26146507263183594,
0.6745577454566956,
0.28079497814178467,
0.7088163495063782... |
func Matches(entry Entry, name string) bool {
if entry == nil {
return false
}
splittedName := strings.Split(name, "*")
if len(splittedName) == 1 {
if entry.Name() == name {
return true
}
} else if len(splittedName) == 2 {
if strings.HasPrefix(entry.Name(), splittedName[0]) && strings.HasSuffix(entry.Na... | [
-0.06391193717718124,
-0.3697045147418976,
0.5593128204345703,
-0.020859990268945694,
-0.6684347987174988,
-0.3941103518009186,
-0.9384394288063049,
0.7074154019355774,
0.1070350632071495,
0.7901803255081177,
-0.2831984758377075,
0.5350276827812195,
-0.3649905025959015,
0.06189408898353577... |
func Get(source Source, name string) Entry {
for {
next := source.Next()
if next == nil {
return nil
} else if Matches(next, name) {
return next
}
}
} | [
0.29231950640678406,
-0.20594626665115356,
0.5103784799575806,
-0.7830831408500671,
-0.3562093675136566,
-1.173261284828186,
-0.7571818232536316,
-0.0993899554014206,
-0.4318724572658539,
0.47254547476768494,
-0.38625773787498474,
0.7602061629295349,
-0.4011108875274658,
-0.192172020673751... |
func addTwoNumbers(l1 *ListNode, l2 *ListNode) *ListNode {
return primarySchoolAddition(l1, l2)
} | [
-1.1046316623687744,
-0.20163121819496155,
0.6118561029434204,
-0.17891357839107513,
-0.25625377893447876,
0.1443593055009842,
-0.5484058856964111,
0.24332234263420105,
-0.3223322033882141,
-0.5586682558059692,
-1.126067042350769,
0.3669232130050659,
0.10562003403902054,
0.9721586108207703... |
func spawnProc(proc string) bool {
procObj := procs[proc]
logger := createLogger(proc, procObj.colorIndex)
cs := []string{"cmd", "/c", procObj.cmdline}
cmd := exec.Command(cs[0], cs[1:]...)
cmd.Stdin = nil
cmd.Stdout = logger
cmd.Stderr = logger
cmd.SysProcAttr = &syscall.SysProcAttr{
CreationFlags: syscall.... | [
0.6710273027420044,
-0.4987717568874359,
1.0208353996276855,
-0.6068702936172485,
-0.18634916841983795,
0.23448817431926727,
0.12552380561828613,
-0.5440230369567871,
0.03265416622161865,
-0.0018683698726817966,
0.055117253214120865,
-0.2772579789161682,
-0.25662940740585327,
-0.0599241517... |
func (t *KDTree) build(l []XY, level int) *kdNode {
if len(l) == 0 {
return nil
}
node := new(kdNode)
if level%2 == 0 {
node.cmp = t.compare.CompareX
} else {
node.cmp = t.compare.CompareY
}
if len(l) == 1 {
node.val = l[0]
return node
}
// Find median of current list, set that to val of current n... | [
-0.3720405399799347,
-0.8131987452507019,
0.7184430956840515,
0.10718714445829391,
-0.6608074903488159,
-0.0021081024315208197,
-0.2997416853904724,
0.27796539664268494,
0.023100975900888443,
0.2942209541797638,
0.4037695825099945,
-0.2887570559978485,
-0.3973599076271057,
0.65933877229690... |
func (t *KDTree) Build(nodeList []XY) {
t.root = t.build(nodeList, 0)
} | [
-0.8453505039215088,
-0.2904936671257019,
0.05088381841778755,
0.1544525921344757,
0.23870907723903656,
0.40862613916397095,
-0.4592316746711731,
0.14971370995044708,
-0.3899476230144501,
0.6784698963165283,
-0.41853079199790955,
0.3219583332538605,
0.13260270655155182,
1.0077824592590332,... |
func (t KDTree) FindNearest(xy XY) (r XY, dist float64, err error) {
near := new(nearNode)
t.findNearest(xy, t.root, near)
if near.node != nil {
r = near.node.val
dist = math.Sqrt(near.dist)
return
}
err = ErrNotFound
return
} | [
0.2959524095058441,
-0.2271740734577179,
0.5751253366470337,
-0.2797137498855591,
-0.9041050672531128,
-0.3502052426338196,
-1.2962983846664429,
-1.3242881298065186,
-0.9719628095626831,
1.099062204360962,
-0.2904220521450043,
-0.07541228830814362,
-0.5483681559562683,
1.4018287658691406,
... |
func (tv *TimedValue) IsExpired() bool {
return tv.IsExpiredAt(time.Now())
} | [
-0.3269484043121338,
-0.1755247861146927,
0.3030175566673279,
0.40949344635009766,
-0.4238247275352478,
0.031015846878290176,
-1.5988837480545044,
0.05459615960717201,
-0.2428596466779709,
-0.02835671417415142,
-0.5436230897903442,
0.41693544387817383,
0.14584104716777802,
0.96522802114486... |
func (tv *TimedValue) IsExpiredAt(when time.Time) bool {
if tv.Err == nil {
return !tv.Expiry.IsZero() && when.After(tv.Expiry)
}
// NOTE: When a TimedValue stores an error result, then a zero-value for the
// Expiry imply the value is immediately expired.
return tv.Expiry.IsZero() || when.After(tv.Expiry)
} | [
-0.4183790981769562,
-0.20538610219955444,
0.42175212502479553,
-0.15805231034755707,
-0.8910994529724121,
-0.19804243743419647,
-1.1906658411026,
-0.3950991928577423,
0.7047651410102844,
-0.3056539297103882,
-0.14910012483596802,
-0.2603777050971985,
0.26752620935440063,
1.326415181159973... |
func (tv *TimedValue) IsStale() bool {
return tv.IsStaleAt(time.Now())
} | [
-1.5988627672195435,
0.10158391296863556,
0.5296970009803772,
-0.19816048443317413,
-0.4172830879688263,
0.11029067635536194,
-0.7186689376831055,
-0.8840159177780151,
-0.219395712018013,
-0.16331952810287476,
-0.6957229375839233,
0.817252516746521,
0.3098467290401459,
1.2074575424194336,
... |
func (tv *TimedValue) IsStaleAt(when time.Time) bool {
if tv.Err == nil {
return !tv.Stale.IsZero() && when.After(tv.Stale)
}
// NOTE: When a TimedValue stores an error result, then a zero-value for the
// Stale or Expiry imply the value is immediately stale.
return tv.Stale.IsZero() || when.After(tv.Stale)
} | [
-1.3561049699783325,
-0.24160748720169067,
0.44753068685531616,
-0.11711214482784271,
-0.9366723299026489,
0.16388055682182312,
-0.811163067817688,
-1.0094791650772095,
0.546762228012085,
-0.15395422279834747,
-0.296873539686203,
0.2845814526081085,
0.40291985869407654,
1.16962468624115,
... |
func (tv *TimedValue) Status() TimedValueStatus {
return tv.StatusAt(time.Now())
} | [
-0.3929732143878937,
-0.9501237869262695,
0.1390729397535324,
-0.3445286750793457,
-0.3347695469856262,
0.6993971467018127,
-0.7751334309577942,
-0.04563617706298828,
-0.3318368196487427,
-0.36721622943878174,
-0.6658079624176025,
0.7032788991928101,
0.7141273021697998,
1.4858750104904175,... |
func (tv *TimedValue) StatusAt(when time.Time) TimedValueStatus {
if tv.IsExpiredAt(when) {
return Expired
}
if tv.IsStaleAt(when) {
return Stale
}
return Fresh
} | [
-1.0669199228286743,
-0.7987902760505676,
0.3341541290283203,
-0.8265894651412964,
-1.2142504453659058,
0.7209216356277466,
-1.2437738180160522,
-1.0674089193344116,
0.4780742824077606,
-0.04693274199962616,
-0.056857191026210785,
0.13353122770786285,
0.6107800602912903,
0.2435116916894912... |
func newTimedValue(value interface{}, err error, staleDuration, expiryDuration time.Duration) *TimedValue {
switch val := value.(type) {
case TimedValue:
if val.Created.IsZero() {
val.Created = time.Now()
}
return &val
case *TimedValue:
if val.Created.IsZero() {
val.Created = time.Now()
}
return va... | [
-0.03445323556661606,
0.05602072924375534,
0.8155571818351746,
0.41906991600990295,
-0.30789393186569214,
0.2024735063314438,
-0.6921265721321106,
-0.017421351745724678,
0.21194587647914886,
-0.27335602045059204,
0.3253456652164459,
0.7644491791725159,
-0.03389710560441017,
1.3852119445800... |
func ExpandEnv(env map[string]string, otherEnv map[string]string) map[string]string {
result := make(map[string]string)
for k, v := range env {
expandV := os.Expand(v, func (key string) string { return otherEnv[key] })
result[k] = expandV
}
return result
} | [
-0.5301232933998108,
-0.29272130131721497,
0.9861214756965637,
0.42956241965293884,
-0.3182249069213867,
0.19475844502449036,
-0.3786938488483429,
0.2575986385345459,
-0.697677731513977,
0.5649673342704773,
0.15623635053634644,
0.31433868408203125,
0.3041967451572418,
1.2047998905181885,
... |
func MergeEnv(env1 map[string]string, env2 map[string]string) map[string]string {
result := make(map[string]string)
for k, v := range env1 {
result[k] = v
}
for k, v := range env2 {
result[k] = v
}
return result
} | [
-0.995535671710968,
-0.9283661246299744,
0.8023668527603149,
-0.06704355031251907,
-0.3262878954410553,
0.7441186308860779,
-1.3215988874435425,
0.16754351556301117,
-1.3149265050888062,
0.2472701072692871,
-0.33669739961624146,
1.3238954544067383,
0.6303101778030396,
0.09291241317987442,
... |
func (s *CacheServer) Get(ctx context.Context, in *pb.CacheRequest) (*pb.CacheReply, error) {
log.Printf("input %d", in.GetId())
time.Sleep(time.Duration(50) * time.Millisecond)
return &pb.CacheReply{Result: in.GetId() * 2}, nil
} | [
-0.9319548010826111,
-0.068062923848629,
0.567704975605011,
-0.08538329601287842,
0.014944014139473438,
0.25376203656196594,
-0.19087651371955872,
-0.6839541792869568,
-0.07172553241252899,
-0.14382009208202362,
-0.3902365267276764,
1.2860366106033325,
-1.3609288930892944,
0.13780967891216... |
func CreateBadRequest(errorMessage string) BadRequest {
return BadRequest{Error: errorMessage}
} | [
-0.4145464301109314,
-0.7309620976448059,
0.3059183955192566,
0.17263908684253693,
-0.030211191624403,
0.6840413808822632,
-1.594861388206482,
0.022801702842116356,
-0.16391077637672424,
-0.3449723720550537,
0.3549445569515228,
0.8703848719596863,
-0.489859402179718,
1.0982619524002075,
... |
func NeverStartNewEpoch(_ delegate.Pool) (bool, error) { return false, nil } | [
-1.2349995374679565,
0.1028052270412445,
0.36329129338264465,
0.016435768455266953,
0.5929559469223022,
0.9679287672042847,
0.5801786780357361,
-0.24273301661014557,
-0.15000846982002258,
-1.419690728187561,
-0.9208804965019226,
-0.7553013563156128,
-0.3798874616622925,
0.6892386674880981,... |
func PseudoStarNewEpoch(_ delegate.Pool) (bool, error) { return true, nil } | [
-1.0881891250610352,
-0.19585715234279633,
0.5468940138816833,
0.32596129179000854,
-0.2281128615140915,
1.2280876636505127,
0.46437644958496094,
0.353830486536026,
-0.3049648404121399,
-0.5921316146850586,
-1.32710862159729,
-0.6137142777442932,
-0.2131309062242508,
0.4598473608493805,
... |
func CIDRArrayFromIPNetSlice(val []net.IPNet) driver.Valuer {
return cidrArrayFromIPNetSlice{val: val}
} | [
-0.23465611040592194,
-0.9456571340560913,
0.06523358821868896,
0.7536719441413879,
-0.049794040620326996,
0.2450598180294037,
-0.6536053419113159,
-0.32872119545936584,
0.5783677697181702,
0.6002328991889954,
0.13256411254405975,
-0.8857090473175049,
-0.7974374890327454,
0.083693079650402... |
func CIDRArrayToIPNetSlice(val *[]net.IPNet) sql.Scanner {
return cidrArrayToIPNetSlice{val: val}
} | [
-0.9466453194618225,
-0.30670052766799927,
0.20030732452869415,
0.5145880579948425,
-0.01656605489552021,
0.5284936428070068,
-0.309147447347641,
-0.9796604514122009,
0.8171937465667725,
0.20137229561805725,
0.5531827807426453,
-1.236953616142273,
-0.8219103813171387,
-0.13538074493408203,... |
func (id ID) String() string {
switch id {
case Version:
return "RT_VERSION"
default:
return ""
}
} | [
0.21407830715179443,
-1.4169268608093262,
0.1032664030790329,
-0.3361242413520813,
-0.1269926130771637,
1.115394115447998,
-0.4487612247467041,
-1.136537790298462,
0.05900982394814491,
1.2065188884735107,
-0.3096787929534912,
0.24014338850975037,
-0.10757063329219818,
-0.344138503074646,
... |
func (d Directory) Size() int { return binary.Size(d) } | [
-1.3790839910507202,
1.4666316509246826,
0.21392327547073364,
-0.6198065876960754,
0.1623467057943344,
-0.22740496695041656,
1.0022872686386108,
0.2552330493927002,
0.5992936491966248,
-0.817391574382782,
-0.30408620834350586,
0.666532576084137,
0.11447673290967941,
1.0046823024749756,
0... |
func (e DirectoryEntry) Size() int { return binary.Size(e) } | [
-0.40538832545280457,
0.8061957955360413,
0.23469187319278717,
-0.5648479461669922,
0.6726256608963013,
0.26218152046203613,
1.0271214246749878,
0.5367571711540222,
0.44704610109329224,
-0.04084599018096924,
-0.24463200569152832,
0.48585593700408936,
-0.19109076261520386,
1.068217515945434... |
func (e DirectoryEntry) ID() ID {
if !e.IsString() {
return ID(e.Name)
}
return ID(e.Name & 0x0000FFF)
} | [
0.7789166569709778,
-0.5645496845245361,
0.15429799258708954,
0.2161596417427063,
0.2938419580459595,
0.6430540084838867,
-0.14192618429660797,
0.2989305853843689,
1.9412915706634521,
0.05731884390115738,
0.38111165165901184,
0.3374045789241791,
-0.33045902848243713,
0.8657545447349548,
... |
func (e DirectoryEntry) IsString() bool { return ((e.Name & 0x80000000) >> 31) > 0 } | [
-0.9790275692939758,
0.21378947794437408,
0.2522565722465515,
0.4025753140449524,
0.4790441393852234,
0.3717452585697174,
0.13575036823749542,
0.011235188692808151,
1.7349472045898438,
0.9167552590370178,
-0.16835208237171173,
0.5398738384246826,
0.023633964359760284,
0.22754953801631927,
... |
func (e DirectoryEntry) IsDir() bool { return ((e.OffsetToData & 0x80000000) >> 31) > 0 } | [
-0.16649273037910461,
0.046373188495635986,
0.45368272066116333,
0.5545766949653625,
-0.15700674057006836,
1.17208993434906,
0.2276725322008133,
0.3287194073200226,
1.3551883697509766,
-0.4139823615550995,
0.09782548248767853,
0.7087255716323853,
0.14070408046245575,
0.8958722949028015,
... |
func (e DirectoryEntry) DirOffset() uint32 { return e.OffsetToData & 0x7FFFFFFF } | [
-0.49613121151924133,
0.33137550950050354,
0.4889513850212097,
-1.0673195123672485,
-0.037630610167980194,
1.3830074071884155,
0.7128860950469971,
0.3947494626045227,
0.4169929623603821,
-0.23089458048343658,
-0.10987497121095657,
0.7829721570014954,
0.03286932408809662,
0.0572478771209716... |
func (e DataEntry) Size() int { return binary.Size(e) } | [
-0.04823850095272064,
1.0316081047058105,
0.23001258075237274,
-0.8646444082260132,
0.4408990442752838,
0.5524026155471802,
0.41773638129234314,
0.4338512420654297,
0.036021456122398376,
0.01966221258044243,
-0.713286817073822,
0.8356643319129944,
-0.12508642673492432,
0.8418285250663757,
... |
func (v VersionInfo) Size() int { return binary.Size(v) } | [
0.0858694538474083,
-0.11709793657064438,
0.2474898397922516,
-0.4525390565395355,
-0.03734332695603371,
1.0436410903930664,
0.6355647444725037,
-0.1670336276292801,
-0.45410484075546265,
0.06638076156377792,
-0.8922038674354553,
0.07850917428731918,
-0.6301179528236389,
0.3176559805870056... |
func (f FixedFileinfo) Size() int { return binary.Size(f) } | [
0.3379249572753906,
0.2057196944952011,
0.18928202986717224,
-0.1349448412656784,
0.2873508036136627,
0.9199573397636414,
1.0994025468826294,
0.08744972199201584,
-1.5157963037490845,
-0.9960414171218872,
-0.706549882888794,
-0.3766855299472809,
-0.4733595550060272,
0.5813550353050232,
0... |
func (s StringFileInfo) Size() int { return binary.Size(s) } | [
0.7051509618759155,
-0.5091390609741211,
0.22659337520599365,
-1.2121305465698242,
0.030304670333862305,
0.10900040715932846,
0.39305734634399414,
0.001895498251542449,
-1.196721076965332,
-0.561690092086792,
-0.3973381519317627,
0.12312891334295273,
-0.4193525016307831,
-0.214295044541358... |
func (s StringFileInfo) Skip() bool { return (s.Type != 0 && s.Type != 1) && s.ValueLength != 0 } | [
-0.7787667512893677,
-0.7789896130561829,
0.4375385046005249,
0.005539753474295139,
-0.11071202158927917,
0.8201363682746887,
0.06026516482234001,
-0.4912736415863037,
-0.7906564474105835,
0.2183072417974472,
0.44321247935295105,
-0.32797971367836,
-0.5969521403312683,
-0.4030695855617523,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.