text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (be InmemBackend) Add(key []byte, value []byte) error {
return be.Put(key, value, false, false)
} | [
-0.5195924043655396,
0.4287376403808594,
0.5267646312713623,
0.6953437328338623,
-0.3626323640346527,
0.797311007976532,
-0.6899272799491882,
0.20882631838321686,
-0.10102212429046631,
0.7332080006599426,
0.14212524890899658,
0.6087321043014526,
-1.9181289672851562,
1.0515185594558716,
0... |
func (be InmemBackend) Replace(key []byte, value []byte) error {
return be.Put(key, value, true, false)
} | [
0.08266054093837738,
0.7857595086097717,
0.5097848773002625,
0.45173653960227966,
-0.7637962698936462,
0.07454441487789154,
-0.5801487565040588,
1.1239384412765503,
-0.44599804282188416,
0.8971176147460938,
-1.0669341087341309,
0.03267649561166763,
-2.2894580364227295,
0.6767639517784119,
... |
func (be InmemBackend) Incr(key []byte, value uint) (int, error) {
return be.Increment(key, int(value), false)
} | [
-0.1533002406358719,
0.6722022294998169,
0.5561001896858215,
0.8943006992340088,
-1.4610220193862915,
0.37404298782348633,
0.020101552829146385,
0.46610891819000244,
-0.24314568936824799,
0.1769951432943344,
0.2306528389453888,
0.07998110353946686,
-1.4337698221206665,
1.2293661832809448,
... |
func (be InmemBackend) Decr(key []byte, value uint) (int, error) {
return be.Increment(key, int(value)*-1, false)
} | [
0.26936468482017517,
0.7120033502578735,
0.7338470220565796,
0.8730038404464722,
-0.9924851655960083,
0.10002289712429047,
0.02027016505599022,
0.5660385489463806,
-0.49954575300216675,
0.054987113922834396,
0.4613572955131531,
-0.1621306836605072,
-1.2562706470489502,
1.2439091205596924,
... |
func (be InmemBackend) Increment(key []byte, value int, create_if_not_exists bool) (int, error) {
return 0, nil
} | [
-0.4842453598976135,
0.4525582790374756,
0.5827815532684326,
0.8609887957572937,
0.18247026205062866,
0.4252895712852478,
0.5505151152610779,
0.3406562805175781,
-0.19236430525779724,
0.3346405029296875,
-0.3102004826068878,
0.044794369488954544,
-1.2203718423843384,
0.7017905116081238,
... |
func getJSONFiles(dir string) (jsonFiles []string, err error) {
fileMask := filepath.Join(dir, "*.json")
jsonFiles, err = filepath.Glob(fileMask)
if err != nil {
return nil, err
}
return jsonFiles, nil
} | [
-0.6005678772926331,
0.2564256489276886,
0.9549718499183655,
1.159087896347046,
-0.5851153135299683,
-0.011152219027280807,
0.1615254133939743,
-1.0125887393951416,
0.14533598721027374,
0.502901017665863,
-0.4311780035495758,
1.030761957168579,
-0.4017494022846222,
0.3844195008277893,
-0... |
func updateFromFile(cLink, fileName, user, passw string, params url.Values, headers map[string]string, client *http.Client) (solrResp *glsolr.Response, err error) {
file, err := os.Open(fileName)
if err != nil {
return nil, err
}
defer file.Close()
solrResp, err = glsolr.Update(cLink, user, passw, file, ... | [
0.4100392460823059,
-1.0175334215164185,
0.41350141167640686,
-0.41732242703437805,
-0.41126856207847595,
0.2533021569252014,
0.12401135265827179,
-0.3566710650920868,
-0.604184627532959,
0.8308202028274536,
0.30863142013549805,
-0.32742103934288025,
-0.837938666343689,
-0.7336760759353638... |
func fileCheck(path string, info os.FileInfo, err error, verbose bool) error {
if err != nil {
return err
}
if verbose {
log.Printf("[INFO] Checking accessibility of %s\n", path)
}
if info.Mode().IsDir() || info.Mode().IsRegular() || ((info.Mode() & os.ModeSymlink) == os.ModeSymlink) {
infile, err := os.Op... | [
-0.2181866466999054,
-0.16080687940120697,
0.9128142595291138,
0.49877384305000305,
-0.16119232773780823,
0.7647554278373718,
1.3946086168289185,
0.42339888215065,
-0.17299053072929382,
-0.4348805844783783,
1.448250651359558,
0.41908779740333557,
-0.01516425609588623,
0.8315271735191345,
... |
func NewIPAllocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPAllocationsClient, error) {
cl, err := arm.NewClient(moduleName+".IPAllocationsClient", moduleVersion, credential, options)
if err != nil {
return nil, err
}
client := &IPAllocationsClient{
subs... | [
-0.4023224115371704,
-0.33346420526504517,
0.12080201506614685,
-0.8618401288986206,
-1.2348579168319702,
-0.05128658935427666,
0.0950976312160492,
-0.3927704095840454,
-0.3765730559825897,
0.2969518303871155,
0.0351635180413723,
-0.03975125402212143,
-0.3473605215549469,
-1.26301789283752... |
func (client *IPAllocationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters IPAllocation, options *IPAllocationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupNam... | [
-0.7915769219398499,
-0.5143816471099854,
0.6639204621315002,
-0.6374372839927673,
-0.5337537527084351,
0.21102580428123474,
0.16528138518333435,
-0.1374323070049286,
-0.13067825138568878,
0.5540089011192322,
0.7966287136077881,
0.14348043501377106,
-0.39048251509666443,
0.0083645246922969... |
func (client *IPAllocationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientBeginDeleteOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocati... | [
-0.3421429395675659,
-0.3677760064601898,
0.8627862334251404,
-0.3350614309310913,
-0.6826331615447998,
-0.049347665160894394,
0.4438129663467407,
-0.08575029671192169,
-0.19376923143863678,
-0.05336814001202583,
0.6990206241607666,
0.7619205713272095,
-0.4874652922153473,
-0.1361691206693... |
func (client *IPAllocationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientGetOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllo... | [
-0.5555468201637268,
-0.03030388243496418,
1.095804214477539,
-0.48219555616378784,
-0.3332069516181946,
0.008900362066924572,
-0.037617042660713196,
-0.2977495789527893,
-0.3878544867038727,
0.16197724640369415,
1.0123149156570435,
0.9116554260253906,
-0.4091882109642029,
-0.4534611105918... |
func (client *IPAllocationsClient) getHandleResponse(resp *http.Response) (IPAllocationsClientGetResponse, error) {
result := IPAllocationsClientGetResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocation); err != nil {
return IPAllocationsClientGetResponse{}, err
}
return result, nil
} | [
-0.6043468713760376,
-0.6983667016029358,
0.6381384134292603,
-0.3256894052028656,
-0.38274380564689636,
-0.2571330666542053,
0.7044999599456787,
-0.0018901400035247207,
0.6101240515708923,
-0.5965056419372559,
0.1612834483385086,
-0.9069594144821167,
-0.7673548460006714,
-1.14147841930389... |
func (client *IPAllocationsClient) NewListPager(options *IPAllocationsClientListOptions) *runtime.Pager[IPAllocationsClientListResponse] {
return runtime.NewPager(runtime.PagingHandler[IPAllocationsClientListResponse]{
More: func(page IPAllocationsClientListResponse) bool {
return page.NextLink != nil && len(*pag... | [
-0.7293341755867004,
-0.6564242243766785,
0.6999407410621643,
-0.4564293324947357,
-0.6372345089912415,
-0.2763722538948059,
-0.07758300006389618,
0.2581900954246521,
0.7772412896156311,
0.6082083582878113,
0.872204065322876,
-0.3814050257205963,
-0.5296328663825989,
0.5945872068405151,
... |
func (client *IPAllocationsClient) listCreateRequest(ctx context.Context, options *IPAllocationsClientListOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/IpAllocations"
if client.subscriptionID == "" {
return nil, errors.New("parameter client.subscriptionI... | [
-0.5040923357009888,
-0.2124200314283371,
0.7396687269210815,
-0.3962782323360443,
-0.21473786234855652,
-0.3000078797340393,
-0.22107844054698944,
0.37078115344047546,
0.12751486897468567,
0.17474110424518585,
0.41006818413734436,
0.6526250243186951,
-0.09310182183980942,
0.17228013277053... |
func (client *IPAllocationsClient) listHandleResponse(resp *http.Response) (IPAllocationsClientListResponse, error) {
result := IPAllocationsClientListResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocationListResult); err != nil {
return IPAllocationsClientListResponse{}, err
}
return result, nil... | [
-0.7945700883865356,
-1.4034090042114258,
0.5188605189323425,
-0.6460390686988831,
-0.6869537234306335,
-0.13100072741508484,
0.31658974289894104,
0.4244222640991211,
1.0406818389892578,
0.2025008499622345,
-0.17578119039535522,
-1.156166672706604,
-0.3687703609466553,
-0.6591663956642151,... |
func (client *IPAllocationsClient) NewListByResourceGroupPager(resourceGroupName string, options *IPAllocationsClientListByResourceGroupOptions) *runtime.Pager[IPAllocationsClientListByResourceGroupResponse] {
return runtime.NewPager(runtime.PagingHandler[IPAllocationsClientListByResourceGroupResponse]{
More: func(p... | [
-0.798992931842804,
-0.5090171098709106,
0.3087436258792877,
-0.7624004483222961,
-0.9230166673660278,
-0.1103370264172554,
0.4097510874271393,
-0.3737330734729767,
0.35758543014526367,
0.47705501317977905,
1.5772687196731567,
-0.904244601726532,
-0.5332377552986145,
0.9276407361030579,
... |
func (client *IPAllocationsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *IPAllocationsClientListByResourceGroupOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations"... | [
-0.5484429001808167,
-0.000306089932564646,
0.24726679921150208,
-0.682833731174469,
-0.47885364294052124,
-0.1784566342830658,
0.3645138740539551,
-0.4745071828365326,
-0.2073276787996292,
0.35051438212394714,
0.7347099184989929,
-0.13334043323993683,
-0.18790733814239502,
0.4992623627185... |
func (client *IPAllocationsClient) listByResourceGroupHandleResponse(resp *http.Response) (IPAllocationsClientListByResourceGroupResponse, error) {
result := IPAllocationsClientListByResourceGroupResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocationListResult); err != nil {
return IPAllocationsCli... | [
-0.4349225163459778,
-0.7221982479095459,
0.13049474358558655,
-0.884624183177948,
-0.9514607787132263,
0.03024914301931858,
0.7063755393028259,
-0.3696224093437195,
0.12349501252174377,
0.054247111082077026,
0.468781977891922,
-1.758565902709961,
-0.39576539397239685,
0.09583581984043121,... |
func (client *IPAllocationsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters TagsObject, options *IPAllocationsClientUpdateTagsOptions) (*policy.Request, error) {
urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Mi... | [
-0.8896490335464478,
0.03503115847706795,
0.8629065752029419,
-0.6601901650428772,
-0.4402250349521637,
-0.2130526900291443,
-0.5276256799697876,
-0.3047761619091034,
-0.9302289485931396,
0.5126767754554749,
0.21028156578540802,
0.44282087683677673,
-0.37674471735954285,
0.0581926368176937... |
func (client *IPAllocationsClient) updateTagsHandleResponse(resp *http.Response) (IPAllocationsClientUpdateTagsResponse, error) {
result := IPAllocationsClientUpdateTagsResponse{}
if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocation); err != nil {
return IPAllocationsClientUpdateTagsResponse{}, err
}
retu... | [
-0.13992509245872498,
-0.5805879831314087,
0.2194167524576187,
-0.6798327565193176,
-1.0948138236999512,
-0.5267528295516968,
0.007782011292874813,
-0.17903704941272736,
-0.19703513383865356,
0.39608854055404663,
-0.9081572890281677,
-0.6991387605667114,
-0.7545942068099976,
-0.10102229565... |
func (l *thundraLogger) Trace(v ...interface{}) {
if logLevelId > traceLogLevelId {
return
}
logManager.recentLogLevel = traceLogLevel
logManager.recentLogLevelId = traceLogLevelId
l.Output(2, fmt.Sprint(v...))
} | [
0.5936987996101379,
0.10876291990280151,
0.5468059182167053,
0.176164910197258,
0.26205459237098694,
-0.16726039350032806,
0.4080720543861389,
-1.0209053754806519,
0.0842650979757309,
0.0554727204144001,
0.39779791235923767,
0.13175645470619202,
-0.19571347534656525,
0.813346266746521,
-... |
func (l *thundraLogger) Debug(v ...interface{}) {
if logLevelId > debugLogLevelId {
return
}
logManager.recentLogLevel = debugLogLevel
logManager.recentLogLevelId = debugLogLevelId
l.Output(2, fmt.Sprint(v...))
} | [
0.13302823901176453,
0.0671420767903328,
0.47812771797180176,
-0.21440696716308594,
0.1463717371225357,
0.272988885641098,
0.29733091592788696,
-0.16396844387054443,
-0.37765026092529297,
-0.25118157267570496,
0.5531736612319946,
0.32895156741142273,
0.1594686508178711,
1.1357330083847046,... |
func (l *thundraLogger) Info(v ...interface{}) {
if logLevelId > infoLogLevelId {
return
}
logManager.recentLogLevel = infoLogLevel
logManager.recentLogLevelId = infoLogLevelId
l.Output(2, fmt.Sprint(v...))
} | [
0.20145070552825928,
-0.36927685141563416,
0.5150112509727478,
-0.07979364693164825,
0.08193477243185043,
0.13985766470432281,
0.5355145335197449,
-0.5084115862846375,
-0.8614550232887268,
0.24060183763504028,
0.37631693482398987,
0.5041316747665405,
0.33235397934913635,
1.27031409740448,
... |
func (l *thundraLogger) Warn(v ...interface{}) {
if logLevelId > warnLogLevelId {
return
}
logManager.recentLogLevel = warnLogLevel
logManager.recentLogLevelId = warnLogLevelId
l.Output(2, fmt.Sprint(v...))
} | [
0.028069570660591125,
-0.008337503299117088,
0.44829320907592773,
-0.2977663576602936,
-0.18799413740634918,
-0.23823225498199463,
0.1422305703163147,
-0.5889338850975037,
-0.6556559205055237,
-0.200856551527977,
0.3734208941459656,
0.9967774748802185,
0.544114351272583,
0.9501323699951172... |
func (l thundraLogger) Printf(format string, v ...interface{}) {
if logLevelId > infoLogLevelId {
return
}
logManager.recentLogLevel = infoLogLevel
logManager.recentLogLevelId = infoLogLevelId
additionalCalldepth = 1
l.Logger.Printf(format, v)
} | [
0.2877417802810669,
-0.29953256249427795,
0.4133491814136505,
-0.3744126558303833,
-0.0643789991736412,
0.3932344317436218,
0.046651244163513184,
-0.1415463089942932,
0.1697389930486679,
-0.7629061341285706,
0.3415355086326599,
0.5372583270072937,
0.028987687081098557,
1.7773263454437256,
... |
func (l thundraLogger) Print(v ...interface{}) {
if logLevelId > infoLogLevelId {
return
}
logManager.recentLogLevel = infoLogLevel
logManager.recentLogLevelId = infoLogLevelId
additionalCalldepth = 1
l.Logger.Print(v)
} | [
0.21690340340137482,
-0.05960830673575401,
0.46212100982666016,
-0.5260146260261536,
-0.07909458130598068,
0.6852859258651733,
-0.317143052816391,
-0.6032261252403259,
0.19651959836483002,
-0.6247400641441345,
0.26160499453544617,
0.3553025424480438,
-0.5532523393630981,
1.4917665719985962... |
func (l thundraLogger) Println(v ...interface{}) {
if logLevelId > infoLogLevelId {
return
}
logManager.recentLogLevel = infoLogLevel
logManager.recentLogLevelId = infoLogLevelId
additionalCalldepth = 1
l.Logger.Println(v)
} | [
-0.09739688783884048,
-0.08725152909755707,
0.5577744245529175,
-0.047355882823467255,
-0.43039822578430176,
0.5134746432304382,
-0.13839803636074066,
-0.2812373638153076,
0.6213381290435791,
-0.7106041312217712,
-0.1943902224302292,
0.3963020443916321,
-0.006349162198603153,
1.47140300273... |
func (l thundraLogger) Panicf(format string, v ...interface{}) {
if logLevelId > errorLogLevelId {
return
}
logManager.recentLogLevel = errorLogLevel
logManager.recentLogLevelId = errorLogLevelId
additionalCalldepth = 1
l.Logger.Panicf(format, v)
} | [
0.258352130651474,
-0.42621898651123047,
0.24722298979759216,
-0.3289233148097992,
-0.307976633310318,
0.12518231570720673,
0.04427407681941986,
-0.1537468582391739,
0.17589640617370605,
-0.4578242301940918,
-0.23246081173419952,
0.19009152054786682,
0.3851698637008667,
1.6247807741165161,... |
func (l thundraLogger) Panic(v ...interface{}) {
if logLevelId > errorLogLevelId {
return
}
logManager.recentLogLevel = errorLogLevel
logManager.recentLogLevelId = errorLogLevelId
additionalCalldepth = 1
l.Logger.Panic(v)
} | [
-0.010081430897116661,
0.13055460155010223,
0.3947463929653168,
-0.08575902879238129,
-0.26779064536094666,
0.4838932156562805,
0.008511553518474102,
-0.3465026915073395,
0.597963273525238,
0.04470893368124962,
-0.09868764877319336,
0.18199217319488525,
0.20386138558387756,
1.2438906431198... |
func (l thundraLogger) Panicln(v ...interface{}) {
if logLevelId > errorLogLevelId {
return
}
logManager.recentLogLevel = errorLogLevel
logManager.recentLogLevelId = errorLogLevelId
additionalCalldepth = 1
l.Logger.Panicln(v)
} | [
-0.2663900554180145,
0.06147601827979088,
0.38985228538513184,
0.10891632735729218,
-0.580543577671051,
0.1865386962890625,
-0.1976536214351654,
0.0012050204677507281,
0.7748831510543823,
-0.5874612927436829,
-0.5853945016860962,
0.12856559455394745,
0.49584364891052246,
1.255593180656433,... |
func (t *thundraLogManager) Write(p []byte) (n int, err error) {
// We need to skip last 3 frames and additionalCalldepth for wrapper functions
_, file, line, ok := runtime.Caller(3 + additionalCalldepth)
additionalCalldepth = 0 //reset it
if !ok {
file = "???"
line = 0
}
mL := &monitoredLog{
log: ... | [
-1.0480725765228271,
0.23221760988235474,
0.8254982829093933,
-0.7057902216911316,
0.2768036127090454,
-0.08981677144765854,
0.02996267005801201,
0.1792312115430832,
0.1731446385383606,
0.35599520802497864,
-0.6301178336143494,
-0.3096742630004883,
-1.0301011800765991,
0.6986686587333679,
... |
func DebugCstorVolumeClaim(k *client.K8sClient, pvc *corev1.PersistentVolumeClaim, pv *corev1.PersistentVolume) error {
// 1. Main Struture Creation which contains all cstor CRs, this structure will be passed accross all modules.
var cstorResources util.CstorVolumeResources
cstorResources.PVC = pvc
cstorResources.P... | [
0.40372908115386963,
-0.5126545429229736,
0.6706972718238831,
-0.3529980778694153,
0.8436891436576843,
0.27663564682006836,
0.19839605689048767,
-0.31031176447868347,
0.24059583246707916,
0.27552205324172974,
0.5612278580665588,
0.612024188041687,
-0.24357914924621582,
0.0376862995326519,
... |
func (g GeoPoint) RadiansTo(point GeoPoint) float64 {
d2r := math.Pi / 180.0
lat1Rad := g.Latitude * d2r
long1Rad := g.Longitude * d2r
lat2Rad := point.Latitude * d2r
long2Rad := point.Longitude * d2r
sinDeltaLatDiv2 := math.Sin((lat1Rad - lat2Rad) / 2)
sinDeltaLongDiv2 := math.Sin((long1Rad - long2Rad) / 2)
... | [
0.0371440164744854,
0.11675912886857986,
0.6514367461204529,
-1.63071608543396,
-0.4374893605709076,
0.3096441626548767,
-0.9744048118591309,
-0.5336186289787292,
-0.327642023563385,
0.16659216582775116,
-0.7603491544723511,
0.7213133573532104,
0.189811572432518,
-0.5031337141990662,
0.3... |
func (g GeoPoint) KilometersTo(point GeoPoint) float64 {
return g.RadiansTo(point) * 6371.0
} | [
0.2829881012439728,
0.6484935283660889,
0.29808804392814636,
-0.5774486660957336,
0.2419060915708542,
0.344452440738678,
-0.9281851053237915,
-0.32626795768737793,
-0.2731511890888214,
0.4080176055431366,
-0.42268863320350647,
0.2425176203250885,
-0.1368510127067566,
-0.27571332454681396,
... |
func (g GeoPoint) MilesTo(point GeoPoint) float64 {
return g.RadiansTo(point) * 3958.8
} | [
-0.2660907804965973,
0.5993434190750122,
0.21078813076019287,
-0.5184990167617798,
0.2415742576122284,
0.5433827638626099,
-1.1045278310775757,
-0.5866093635559082,
0.3054783046245575,
0.6617686748504639,
-0.7300866842269897,
0.1699238121509552,
-0.6842468976974487,
0.05487387627363205,
... |
func (c Config) String(key string) string {
if v, ok := c[key]; ok {
if s, ok := v.(string); ok {
return s
}
}
return ""
} | [
0.021270370110869408,
-0.39260333776474,
-0.14756473898887634,
-0.16879500448703766,
-0.8305114507675171,
-0.25628992915153503,
0.1304619312286377,
-1.0136020183563232,
-0.13747432827949524,
1.0969390869140625,
-0.12872181832790375,
0.3025762438774109,
-0.34915733337402344,
0.2661689519882... |
func (c Config) Bytes(key string) []byte {
if v, ok := c[key]; ok {
if s, ok := v.(string); ok {
return []byte(s)
}
}
return make([]byte, 0, 0)
} | [
-1.0063591003417969,
0.21638010442256927,
0.31415098905563354,
-0.46340617537498474,
-0.06827492266893387,
-0.5799327492713928,
-1.3714869022369385,
-0.22270053625106812,
0.4675143361091614,
0.3371089994907379,
-0.3115866780281067,
0.8195448517799377,
-0.41810452938079834,
0.86366564035415... |
func (c Config) Bool(key string) bool {
if v, ok := c[key]; ok {
if b, ok := v.(bool); ok {
return b
}
}
return false
} | [
-0.37294986844062805,
0.016091708093881607,
0.21513091027736664,
0.4531656503677368,
-0.4855252206325531,
0.006555003114044666,
0.0784420594573021,
0.5782337188720703,
-0.2997826635837555,
1.190474033355713,
-0.2590065896511078,
0.05202354118227959,
-0.1887969821691513,
-0.4098748564720154... |
func (c Config) Int(key string) int {
if v, ok := c[key]; ok {
// since we're unmarshaling into an interface{} value, all
// numbers will be float64 values
if f, ok := v.(float64); ok {
return int(f)
}
}
return 0
} | [
-0.24961858987808228,
0.39274805784225464,
0.3986281454563141,
-0.8423882126808167,
-0.3148294687271118,
-0.7175114750862122,
0.09752662479877472,
0.1975540667772293,
-1.3729026317596436,
0.6500838994979858,
0.298677533864975,
-0.48099228739738464,
-0.007191979791969061,
0.7354850769042969... |
func (c Config) Int64(key string) int64 {
if v, ok := c[key]; ok {
// since we're unmarshaling into an interface{} value, all
// numbers will be float64 values
if f, ok := v.(float64); ok {
return int64(f)
}
}
return 0
} | [
-0.8052244186401367,
0.30763858556747437,
0.3096882402896881,
0.287773072719574,
0.21847505867481232,
-1.0211888551712036,
-0.03243779391050339,
0.6672365665435791,
-0.4652664065361023,
0.23111221194267273,
0.7341840267181396,
-0.38564446568489075,
-0.47307640314102173,
1.0155202150344849,... |
func (c Config) Float(key string) float64 {
if v, ok := c[key]; ok {
// since we're unmarshaling into an interface{} value, all
// numbers will be float64 values
if f, ok := v.(float64); ok {
return f
}
}
return 0
} | [
-0.41061142086982727,
0.934544563293457,
0.31482627987861633,
0.27448031306266785,
0.2835148870944977,
-0.7204218506813049,
0.22643589973449707,
0.40215447545051575,
-0.8389409184455872,
0.000008854385669110343,
0.296991765499115,
-0.7131010293960571,
-0.36894744634628296,
1.34970879554748... |
func (c Config) Strings(key string) []string {
if v, ok := c[key]; ok {
if is, ok := v.([]interface{}); ok {
ss := []string{}
for _, i := range is {
if s, ok := i.(string); ok {
ss = append(ss, s)
}
}
if len(ss) == len(is) {
return ss
}
}
}
return nil
} | [
-0.36129701137542725,
0.02409484051167965,
0.45132434368133545,
-0.21461902558803558,
-0.01027484517544508,
-0.5441248416900635,
-0.4133036732673645,
-0.5275852084159851,
0.551304280757904,
1.1070096492767334,
-0.076445072889328,
0.694618821144104,
-1.0319695472717285,
0.844049334526062,
... |
func (c Config) Ints(key string) []int {
if v, ok := c[key]; ok {
if ifs, ok := v.([]interface{}); ok {
ints := []int{}
for _, i := range ifs {
if f, ok := i.(float64); ok {
ints = append(ints, int(f))
}
}
if len(ints) == len(ifs) {
return ints
}
}
}
return nil
} | [
-0.8589364290237427,
0.5979030728340149,
0.4441804587841034,
-0.17670838534832,
-0.09885748475790024,
-1.187378168106079,
-0.49416887760162354,
-0.30741241574287415,
-0.33865365386009216,
0.9002677202224731,
-0.05702340975403786,
0.2550300061702728,
-0.77208411693573,
0.6764057278633118,
... |
func (c Config) Int64s(key string) []int64 {
if v, ok := c[key]; ok {
if ifs, ok := v.([]interface{}); ok {
ints := []int64{}
for _, i := range ifs {
if f, ok := i.(float64); ok {
ints = append(ints, int64(f))
}
}
if len(ints) == len(ifs) {
return ints
}
}
}
return nil
} | [
-1.2675079107284546,
0.44599074125289917,
0.45734477043151855,
0.01676696166396141,
-0.29032739996910095,
-1.3315716981887817,
-0.6351429224014282,
-0.34645938873291016,
0.05391954258084297,
1.1018553972244263,
-0.2716625928878784,
0.14980727434158325,
-0.807473361492157,
0.811280310153961... |
func (c Config) Floats(key string) []float64 {
if v, ok := c[key]; ok {
if is, ok := v.([]interface{}); ok {
fs := []float64{}
for _, i := range is {
if f, ok := i.(float64); ok {
fs = append(fs, f)
}
}
if len(fs) == len(is) {
return fs
}
}
}
return nil
} | [
-0.511547327041626,
0.7294343709945679,
0.5493922829627991,
0.15186214447021484,
0.7592315077781677,
-0.6012651920318604,
-0.24627378582954407,
-0.32803332805633545,
0.07175764441490173,
0.4694419503211975,
0.018170583993196487,
-0.14126887917518616,
-0.748822033405304,
1.5382888317108154,... |
func encodeForRequest(v interface{}) interface{} {
if v == nil {
return nil
}
rv := reflect.ValueOf(v)
rvi := reflect.Indirect(rv)
rt := rvi.Type()
if rt.Kind() == reflect.Struct {
switch v.(type) {
case time.Time, *time.Time, Date, *Date:
switch v.(type) {
case time.Time:
return Date(v.(time.Tim... | [
-1.2507953643798828,
-0.15914662182331085,
0.7776104807853699,
-0.18879979848861694,
-0.40950527787208557,
-0.25167691707611084,
-0.07188469916582108,
-1.3994096517562866,
0.8674735426902771,
0.08551710844039917,
0.2614293098449707,
0.5163331031799316,
-0.04684274643659592,
0.3617803454399... |
func NewWriter(config *WriterConfig) (*Writer, error) {
cfg := sarama.NewConfig()
cfg.ClientID = config.ClientID
cfg.Producer.Compression = sarama.CompressionSnappy
cfg.Producer.Return.Successes = config.TrackWrites
cfg.Producer.Flush.Bytes = config.BatchSize
producer, err := sarama.NewAsyncProducer(config.Addrs... | [
-0.2096349000930786,
0.5383779406547546,
0.506077766418457,
0.7462961077690125,
-0.32946115732192993,
-0.8172662854194641,
1.3339496850967407,
0.35568544268608093,
-0.5392522215843201,
0.5620810389518738,
0.2431151419878006,
-0.4538710117340088,
-0.39494988322257996,
0.2477921098470688,
... |
func (w *Writer) Describe(ch chan<- *prometheus.Desc) {
w.kafkaWriteStatus.Describe(ch)
w.queuedForWrites.Describe(ch)
} | [
-0.08966244757175446,
0.1835312843322754,
0.2923738956451416,
-0.539396345615387,
0.8243321180343628,
-0.36513635516166687,
-0.28609395027160645,
-0.42720887064933777,
-1.0835312604904175,
0.03379678726196289,
0.6357454061508179,
0.9675650596618652,
-0.20597192645072937,
1.1809132099151611... |
func (w *Writer) Collect(ch chan<- prometheus.Metric) {
w.kafkaWriteStatus.Collect(ch)
w.queuedForWrites.Collect(ch)
} | [
0.00012976708239875734,
-0.8844608068466187,
0.27287226915359497,
-0.2416195571422577,
0.07578561455011368,
0.20952942967414856,
0.10491040349006653,
-0.7086370587348938,
-1.1988898515701294,
0.15978284180164337,
0.49268996715545654,
0.4507691562175751,
0.4060544967651367,
1.84659814834594... |
func (w *Writer) Write(key string, req *remote.WriteRequest) error {
data, err := proto.Marshal(req)
if err != nil {
return err
}
m := &sarama.ProducerMessage{
Topic: w.topic,
Key: sarama.StringEncoder(key),
Value: sarama.ByteEncoder(data),
}
go func() {
w.producer.Input() <- m
w.queuedForWrites.... | [
-1.254745364189148,
0.4173735976219177,
0.34886908531188965,
0.09733770787715912,
0.7122938632965088,
0.39081302285194397,
0.12205672264099121,
0.437483549118042,
-0.6509459018707275,
0.2010767161846161,
-0.04180634021759033,
0.18095554411411285,
-0.8453755378723145,
0.8507424592971802,
... |
func (w *Writer) Stop() {
w.once.Do(func() {
close(w.done)
w.wg.Wait()
})
} | [
-1.2744569778442383,
-0.04378749057650566,
0.12233075499534607,
-0.4314735531806946,
0.5759521126747131,
0.030731311067938805,
1.334420919418335,
0.344346821308136,
-1.3504364490509033,
0.08948210626840591,
-0.13656310737133026,
-0.3678131699562073,
-1.1699142456054688,
0.47673264145851135... |
func (c *qemuCmd) PID() int {
return c.attachedChildPid
} | [
1.4583213329315186,
-1.2095879316329956,
0.4148566424846649,
-0.12567977607250214,
-0.6300904154777527,
1.707966923713684,
0.6804282069206238,
-0.006844471674412489,
0.29954010248184204,
-0.34277763962745667,
0.2094542235136032,
0.04579709842801094,
-0.7787176370620728,
0.3271505534648895,... |
func (c *qemuCmd) Signal(sig unix.Signal) error {
command := api.InstanceExecControl{
Command: "signal",
Signal: int(sig),
}
// Check handler hasn't finished.
select {
case <-c.dataDone:
return fmt.Errorf("no such process") // Aligns with error retured from unix.Kill in lxc's Signal().
default:
}
c.con... | [
-0.36164408922195435,
0.11671039462089539,
0.3609190285205841,
-0.5501900315284729,
-0.556294858455658,
0.6259095668792725,
-0.24384824931621552,
-0.3667798340320587,
-0.131445974111557,
-0.7158727645874023,
-1.0904544591903687,
0.5134845972061157,
0.393020361661911,
0.4352339506149292,
... |
func (c *qemuCmd) Wait() (int, error) {
err := c.cmd.Wait()
exitStatus := -1
opAPI := c.cmd.Get()
if opAPI.Metadata != nil {
exitStatusRaw, ok := opAPI.Metadata["return"].(float64)
if ok {
exitStatus = int(exitStatusRaw)
// Convert special exit statuses into errors.
switch exitStatus {
case 127:
... | [
-0.7563573122024536,
0.3179073929786682,
0.5549798011779785,
-0.5143077969551086,
0.3942616879940033,
-0.868065357208252,
0.5295327305793762,
0.028103332966566086,
-0.18860234320163727,
-0.7631538510322571,
-0.7465922236442566,
0.20480576157569885,
0.33460533618927,
0.2780567407608032,
0... |
func (c *qemuCmd) WindowResize(fd, winchWidth, winchHeight int) error {
command := api.InstanceExecControl{
Command: "window-resize",
Args: map[string]string{
"width": strconv.Itoa(winchWidth),
"height": strconv.Itoa(winchHeight),
},
}
// Check handler hasn't finished.
select {
case <-c.dataDone:
r... | [
0.3148851990699768,
0.35121890902519226,
0.49452564120292664,
-0.6611422300338745,
-0.029809270054101944,
-0.2766422927379608,
0.001095160492695868,
-0.31902191042900085,
-0.3067423701286316,
-0.4271741807460785,
-0.23985959589481354,
0.8813445568084717,
0.08171351253986359,
0.662805438041... |
func (token Token) Delete() error {
if !token.Exists() {
return fmt.Errorf("auth: keyless tokens cannot be deleted")
}
return token.manager.Delete(token.Key)
} | [
0.6811893582344055,
0.12331646680831909,
0.33921024203300476,
0.016234800219535828,
0.22611185908317566,
0.31227055191993713,
-1.179753065109253,
-0.08533963561058044,
0.04977903887629509,
-0.8198018074035645,
-0.5509716868400574,
0.8593546748161316,
-0.3013879358768463,
0.4305518269538879... |
func (token Token) Exists() bool {
return token.Key != ""
} | [
-1.1711242198944092,
-0.44330596923828125,
0.31195536255836487,
-0.7977386116981506,
0.9414949417114258,
0.07973171770572662,
-2.2108187675476074,
0.7214572429656982,
-0.7861039638519287,
0.062083348631858826,
-0.9048886895179749,
-0.15702269971370697,
0.073347307741642,
0.0323142632842063... |
func (m *TokenManager) All(id int64) (tokens []Token) {
stmt := Tokens.Select().Where(Tokens.C["user_id"].Equals(id))
m.conn.MustQueryAll(stmt, &tokens)
return
} | [
0.26643314957618713,
-0.7240080237388611,
0.44833067059516907,
0.5095903873443604,
-0.05949588119983673,
0.09474555402994156,
-1.2688935995101929,
0.5944444537162781,
-0.2176671028137207,
-0.3293140232563019,
-0.3934148848056793,
1.3877077102661133,
0.372756689786911,
0.7907534241676331,
... |
func (m *TokenManager) Delete(key string) error {
stmt := Tokens.Delete().Where(Tokens.C["key"].Equals(key))
rowsAffected, err := m.conn.MustExecute(stmt).RowsAffected()
if err != nil {
return fmt.Errorf("auth: error during rows affected: %s", err)
}
if rowsAffected == 0 {
return fmt.Errorf("auth: token key %s... | [
-0.28052279353141785,
0.568571925163269,
0.5102927684783936,
-0.21990260481834412,
-0.4436914026737213,
-0.6940729022026062,
-0.41343745589256287,
-0.14926211535930634,
0.1364353895187378,
0.7018698453903198,
0.36439770460128784,
0.07199398428201675,
-0.8728914260864258,
0.2405477315187454... |
func (m *TokenManager) ForeverToken(user User) (token Token) {
token.UserID = user.ID
token.manager = m
// Generate a new token
for {
token.Key = m.keyFunc()
// No duplicates - generate a new key if this key already exists
stmt := sql.Select(
Tokens.C["key"],
).Where(Tokens.C["key"].Equals(token.Key)).... | [
-0.5258175134658813,
0.6876925826072693,
0.5753853917121887,
-0.20704300701618195,
-0.5086139440536499,
-0.059428870677948,
-0.3764706552028656,
0.06410679221153259,
-0.5063601136207581,
-1.0052893161773682,
-0.9403748512268066,
0.0515851266682148,
-0.23658931255340576,
0.01151317451149225... |
func (m *TokenManager) Get(key string) (token Token) {
stmt := Tokens.Select().Where(Tokens.C["key"].Equals(key))
m.conn.MustQueryOne(stmt, &token)
return
} | [
-0.6189936995506287,
-0.02857535146176815,
0.16184933483600616,
-0.3688143789768219,
-0.35779818892478943,
-0.9952617883682251,
-0.9870038628578186,
0.4858371615409851,
-0.8542384505271912,
-0.002294545993208885,
0.011751136742532253,
0.5399500727653503,
-0.3677399158477783,
-0.37959313392... |
func Extract[T any](elements ...T) <-chan T {
output := make(chan T)
go func() {
defer close(output)
for _, element := range elements {
output <- element
}
}()
return output
} | [
-0.5007249712944031,
-0.38439181447029114,
0.6191684007644653,
0.24990299344062805,
-0.5552056431770325,
0.07343950122594833,
-0.19540980458259583,
-0.6981649994850159,
-0.39420267939567566,
0.12777361273765564,
-0.14055366814136505,
0.38039886951446533,
-0.35594138503074646,
0.46268805861... |
func Collect[T any](input <-chan T) []T {
output := []T{}
for element := range input {
output = append(output, element)
}
return output
} | [
-0.6226164102554321,
-1.1605173349380493,
0.5083162784576416,
-0.0928630605340004,
-0.021786389872431755,
0.5581161379814148,
-0.18817846477031708,
-1.3211886882781982,
-0.32645994424819946,
0.3399540185928345,
-0.12339313328266144,
0.7826672792434692,
0.33138519525527954,
1.47531032562255... |
func Pipe[T any](in <-chan T, outs ...chan<- T) {
for v := range in {
for _, out := range outs {
go func(ch chan<- T) { ch <- v }(out)
}
}
} | [
-0.7208866477012634,
0.6326273083686829,
0.5665456652641296,
-0.023473914712667465,
-0.42200028896331787,
0.1283315122127533,
-0.26938697695732117,
-0.10612990707159042,
-1.1840832233428955,
-0.6517061591148376,
-0.3970969319343567,
0.3506028950214386,
0.47642433643341064,
0.38608095049858... |
func Map[I, O any](input <-chan I, mapFunc func(element I) O) <-chan O {
output := make(chan O)
go func() {
defer close(output)
for element := range input {
output <- mapFunc(element)
}
}()
return output
} | [
-0.5050384998321533,
-0.04718823358416557,
0.5873618721961975,
0.5741510391235352,
-0.9382544159889221,
0.5098780393600464,
0.26599442958831787,
-0.4581753611564636,
0.33387237787246704,
0.056731123477220535,
-0.3563627302646637,
0.481169193983078,
0.5536186099052429,
-0.47629913687705994,... |
func Filter[I any](input <-chan I, filterFunc func(element I) bool) <-chan I {
output := make(chan I)
go func() {
defer close(output)
for element := range input {
if filterFunc(element) {
output <- element
}
}
}()
return output
} | [
-0.13165481388568878,
0.12463851273059845,
0.49149343371391296,
0.4352441430091858,
-0.9252433180809021,
-0.07956503331661224,
0.2560640871524811,
-0.44002270698547363,
-0.5258065462112427,
0.21709910035133362,
-0.09922409802675247,
0.9932395815849304,
-0.15351364016532898,
-0.160927474498... |
func Reduce[I, A any](input <-chan I, reduceFunc func(accum A, element I) A) A {
var accum A
for element := range input {
accum = reduceFunc(accum, element)
}
return accum
} | [
-0.33578675985336304,
0.4031570851802826,
0.41344118118286133,
0.06267278641462326,
0.516493022441864,
-0.7524129748344421,
0.9371160268783569,
0.20815326273441315,
0.22563782334327698,
-0.08921699225902557,
-0.26472485065460205,
0.7202872037887573,
0.24074126780033112,
0.6670640707015991,... |
func Merge[T any](outputs ...<-chan T) chan T {
var (
wg sync.WaitGroup
merged = make(chan T)
)
wg.Add(len(outputs))
for _, output := range outputs {
go func(output <-chan T) {
for v := range output {
merged <- v
}
wg.Done()
}(output)
}
go func() { wg.Wait(); close(merged) }()
retur... | [
-1.1076040267944336,
0.00409192917868495,
0.7402282953262329,
0.278911828994751,
-0.05016520991921425,
-0.06753536313772202,
-0.017802005633711815,
-0.8953741192817688,
-0.6584798693656921,
-0.798022985458374,
0.36286866664886475,
-0.5277342200279236,
-0.8591139912605286,
0.667964696884155... |
func colSpace(radius float64) float64 {
return (4.0 * radius) / math.Sqrt(3.0)
} | [
0.8484097123146057,
-0.6514925360679626,
0.2918958067893982,
-0.23561125993728638,
-0.02120322547852993,
-0.06024346873164177,
-0.024391934275627136,
-0.4030562937259674,
0.9503005146980286,
0.24566015601158142,
0.2906223237514496,
-0.37088626623153687,
-0.7176465392112732,
0.5218846797943... |
func rowSpace(radius float64) float64 {
return 2.0 * radius
} | [
0.35151833295822144,
0.16695138812065125,
0.11856652796268463,
-0.3202430307865143,
-0.09344463795423508,
-0.5139258503913879,
0.002265321556478739,
-0.49494969844818115,
1.604170799255371,
-0.2142866998910904,
0.4636690318584442,
0.6386123895645142,
-0.3484891951084137,
1.0942020416259766... |
func xOffset(radius float64) float64 {
return (2.0 * radius) / math.Sqrt(3.0)
} | [
0.48050904273986816,
0.11443200707435608,
0.222011998295784,
-0.754952073097229,
-1.191735029220581,
0.6579404473304749,
-0.5242235064506531,
0.009838886559009552,
0.186954528093338,
0.8028323650360107,
-0.05798538774251938,
0.26286035776138306,
0.04778013378381729,
-0.7326323986053467,
... |
func yOffset(radius float64) float64 {
return (2.0 * radius) / 3.0
} | [
0.6059350967407227,
-0.4549395740032196,
0.43081387877464294,
-0.7288108468055725,
-0.6475680470466614,
0.32805678248405457,
0.9385647773742676,
-0.48259538412094116,
-0.5087049603462219,
-0.05394107848405838,
0.046542007476091385,
1.0531508922576904,
0.06423510611057281,
0.364908277988433... |
func zOffset(radius float64) float64 {
return (4.0 * radius) / 3.0
} | [
0.30125001072883606,
-0.22502973675727844,
0.1311519891023636,
-0.7130587697029114,
-0.8414455056190491,
0.7993261218070984,
1.0863702297210693,
-0.3680328130722046,
0.32326802611351013,
0.46348780393600464,
0.3719775974750519,
0.09510988742113113,
-0.45105957984924316,
-0.6243707537651062... |
func ballRow(ncol int, radius float64) (sdf.SDF3, error) {
space := colSpace(radius)
x := v3.Vec{-0.5 * ((float64(ncol) - 1) * space), 0, 0}
dx := v3.Vec{space, 0, 0}
var balls []sdf.SDF3
s, err := sdf.Sphere3D(radius)
if err != nil {
return nil, err
}
for i := 0; i < ncol; i++ {
balls = append(balls, sdf... | [
-0.5801073312759399,
1.0268044471740723,
0.5237770676612854,
-0.2759080231189728,
-0.43172702193260193,
-0.18182864785194397,
-0.4788348972797394,
-0.6527626514434814,
0.6172757148742676,
0.21972447633743286,
-0.5529157519340515,
-0.06486150622367859,
-0.08661800622940063,
-0.0980651304125... |
func ballGrid(
ncol int, // number of columns
nrow int, // number of rows
radius float64, // radius of ball
) (sdf.SDF3, error) {
space := rowSpace(radius)
x := v3.Vec{0, -0.5 * ((float64(nrow) - 1) * space), 0}
dy0 := v3.Vec{-xOffset(radius), space, 0}
dy1 := v3.Vec{xOffset(radius), space, 0}
var rows []sdf.... | [
-0.3406457304954529,
0.9129964113235474,
0.6169468760490417,
-0.18185870349407196,
-0.35712236166000366,
-0.06340320408344269,
-0.24717001616954803,
-0.039463676512241364,
0.492367148399353,
0.6622521877288818,
-0.3401525020599365,
0.09720904380083084,
-0.40612509846687317,
0.1932260394096... |
func macCheeseGrater(
ncol int, // number of columns
nrow int, // number of rows
radius float64, // radius of ball
) (sdf.SDF3, error) {
dx := v3.Vec{xOffset(radius), yOffset(radius), zOffset(radius)}.MulScalar(0.5)
g, err := ballGrid(ncol, nrow, radius)
if err != nil {
return nil, err
}
g0 := sdf.Transform3... | [
0.0007846723310649395,
0.420089453458786,
0.7430854439735413,
-0.44989603757858276,
-0.8948988914489746,
0.020601507276296616,
0.1017453595995903,
-0.1856077015399933,
-0.25693875551223755,
0.33808809518814087,
-0.772433876991272,
-0.357178658246994,
-0.6991386413574219,
-0.067965596914291... |
func NewCmdStepGitMerge(commonOpts *opts.CommonOptions) *cobra.Command {
options := StepGitMergeOptions{
StepOptions: step.StepOptions{
CommonOptions: commonOpts,
},
}
cmd := &cobra.Command{
Use: "merge",
Short: "Merge a number of SHAs into the HEAD of master",
Long: StepGitMergeLong,
Example... | [
-0.2851391136646271,
0.08381634950637817,
0.7321208119392395,
-0.35578635334968567,
0.5115999579429626,
-0.25798434019088745,
-0.6799901723861694,
0.04464447870850563,
-0.4829535186290741,
-0.8898016214370728,
-0.27672338485717773,
-0.03991817310452461,
-0.918880820274353,
1.15928375720977... |
func (o *StepGitMergeOptions) Run() error {
if o.Remote == "" {
o.Remote = "origin"
}
// set dummy git config details if none set so we can do a local commit when merging
err := o.setGitConfig()
if err != nil {
return errors.Wrapf(err, "failed to set git config")
}
if len(o.SHAs) == 0 || o.BaseBranch == "" ... | [
-0.1313764750957489,
-0.26267191767692566,
0.7193089127540588,
-0.019378364086151123,
0.8991212844848633,
-0.28597503900527954,
-0.3477410674095154,
0.3257059156894684,
0.23005151748657227,
-0.32923591136932373,
-0.2684170603752136,
-0.17022356390953064,
-0.5806845426559448,
0.927330851554... |
func cdnHostsToNetAddrs(hosts []*config.CDN) (map[string]*supervisor.PeerHost, []dfnet.NetAddr) {
cdnHostMap := make(map[string]*supervisor.PeerHost, len(hosts))
netAddrs := make([]dfnet.NetAddr, 0, len(hosts))
for _, host := range hosts {
hostID := idgen.CDNUUID(host.HostName, host.Port)
if host.LoadLimit == 0 ... | [
-0.9504185914993286,
0.33972299098968506,
0.5112643837928772,
-0.7599404454231262,
-0.09132987260818481,
0.15277770161628723,
-0.01859411969780922,
0.22154763340950012,
-0.38940858840942383,
0.24435682594776154,
-0.1009291335940361,
0.2571617066860199,
-0.14119365811347961,
0.8654043674468... |
func (c *Client) CreateUserWithContext(ctx context.Context, in *UserOptions) (out *User, err error) {
err = c.post(ctx, "users", &userRequest{UserOptions: in}, &out)
return
} | [
-0.4453580677509308,
-0.06311646103858948,
0.3401372730731964,
0.8655373454093933,
-0.1004481092095375,
0.6470852494239807,
-0.735580563545227,
-2.2212612628936768,
0.869665801525116,
0.0948987752199173,
-1.2442749738693237,
-0.20410414040088654,
-0.9708513617515564,
-0.07723229378461838,
... |
func (c *Client) GetUser(userID string) (out *User, err error) {
return c.GetUserWithContext(context.Background(), userID)
} | [
-0.056483011692762375,
0.2664046287536621,
0.21244926750659943,
1.5431145429611206,
-0.5771642327308655,
-0.3468150496482849,
0.8395549058914185,
-1.4370917081832886,
0.8885967135429382,
-0.11137403547763824,
-0.0130845932289958,
0.6723281145095825,
-0.44166046380996704,
0.845794677734375,... |
func (c *Client) GetUserWithContext(ctx context.Context, userID string) (out *User, err error) {
err = c.get(ctx, "users/"+userID, &out)
return
} | [
-0.2590346038341522,
0.01983640156686306,
0.18026234209537506,
0.739813506603241,
-0.77797931432724,
-0.2891455590724945,
-0.7514625787734985,
-2.438021183013916,
0.7717894911766052,
-0.04384428635239601,
-0.9866280555725098,
0.374107301235199,
-0.2221706062555313,
0.19516822695732117,
-... |
func (c *Client) UpdateUser(in *UserOptions) (out *User, err error) {
return c.UpdateUserWithContext(context.Background(), in)
} | [
-0.8911128640174866,
-0.03719491884112358,
0.42192763090133667,
1.732298493385315,
-0.2577751576900482,
0.08632713556289673,
0.9817321300506592,
-0.8639765977859497,
0.6749671697616577,
-0.4279075264930725,
-0.019754499197006226,
0.43740707635879517,
-1.1370060443878174,
-0.511729776859283... |
func (c *Client) UpdateUserWithContext(ctx context.Context, in *UserOptions) (out *User, err error) {
req := userRequest{UserOptions: in}
path := "users"
if in.ID != "" {
path += "/" + in.ID
}
err = c.patch(ctx, path, req, &out)
return
} | [
-0.8628892302513123,
-0.5226983428001404,
0.5003552436828613,
0.7019369602203369,
-0.9767940044403076,
0.06287235021591187,
-0.022033246234059334,
-1.4134209156036377,
1.055182695388794,
0.16254203021526337,
-0.9968636631965637,
0.09004359692335129,
-0.8922707438468933,
-0.4896330535411834... |
func (c *Client) DeleteUser(userID string) error {
return c.DeleteUserWithContext(context.Background(), userID)
} | [
-0.279024600982666,
-0.009502935223281384,
0.1315142810344696,
1.0343620777130127,
0.013934826478362083,
0.18325437605381012,
0.48506125807762146,
-1.0466903448104858,
0.905232846736908,
-0.4801201820373535,
-0.2292826920747757,
0.6057997345924377,
-0.6385011672973633,
1.5624717473983765,
... |
func (c *Client) DeleteUserWithContext(ctx context.Context, userID string) error {
return c.del(ctx, "users/"+userID)
} | [
-0.2564793527126312,
-0.5982236862182617,
-0.04954564943909645,
0.4202517867088318,
-1.1583915948867798,
-0.19604173302650452,
-0.256669819355011,
-2.128934383392334,
0.9427995681762695,
0.026311852037906647,
-0.951373279094696,
-0.20063236355781555,
-0.009638284333050251,
1.00176632404327... |
func (c *Client) RetrieveMe() (out *User, err error) {
return c.RetrieveMeWithContext(context.Background())
} | [
-0.29395803809165955,
0.648939847946167,
0.5700770616531372,
1.4293830394744873,
-0.24692919850349426,
-0.3360069990158081,
0.8270678520202637,
-1.0815390348434448,
-0.12252287566661835,
-1.0038586854934692,
-0.11997067183256149,
-0.015389423817396164,
-1.2121095657348633,
-0.2749472558498... |
func (c *Client) RetrieveMeWithContext(ctx context.Context) (out *User, err error) {
err = c.get(ctx, "users", &out)
return
} | [
-0.5363463759422302,
0.1305970549583435,
0.4165543019771576,
0.44944843649864197,
-0.5696431398391724,
-0.19037321209907532,
-0.9228423833847046,
-1.58206307888031,
0.39052242040634155,
-1.100846290588379,
-0.812964677810669,
0.09337254613637924,
-0.7984018325805664,
0.31612884998321533,
... |
func (c *Client) UpdateBrand(params map[string]interface{}, userID string) (out *Brand, err error) {
return c.UpdateBrandWithContext(context.Background(), params, userID)
} | [
-1.6386590003967285,
0.1465318202972412,
0.3935258686542511,
1.9863734245300293,
-0.8952090740203857,
0.22629040479660034,
-0.0707092434167862,
0.12595538794994354,
0.362667053937912,
0.3463200330734253,
0.3473733067512512,
1.5455524921417236,
-1.0907938480377197,
0.9371445178985596,
0.1... |
func (c *Client) UpdateBrandWithContext(ctx context.Context, params map[string]interface{}, userID string) (out *Brand, err error) {
newParams := map[string]interface{}{"brand": params}
updateBrandURL := fmt.Sprintf("users/%s/brand", userID)
err = c.patch(ctx, updateBrandURL, newParams, &out)
return
} | [
-1.163217544555664,
-0.28999555110931396,
0.38529184460639954,
0.7766416072845459,
-1.2812018394470215,
0.3456536531448364,
-1.0633530616760254,
-0.45171019434928894,
0.8001618981361389,
0.603126049041748,
-0.46362167596817017,
1.2038105726242065,
-0.9200855493545532,
0.5472161173820496,
... |
func (o *GetClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetClustersOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case... | [
-0.46868622303009033,
-0.8547202348709106,
0.7542352676391602,
0.6050130128860474,
0.40000054240226746,
-1.0078836679458618,
0.4219340980052948,
-0.8335743546485901,
0.4637390971183777,
0.2089480459690094,
0.5970474481582642,
-0.2380603551864624,
-1.247317910194397,
-0.6472011804580688,
... |
func NewGetClustersOK() *GetClustersOK {
return &GetClustersOK{}
} | [
0.007059499155730009,
-0.03829178214073181,
0.004970420151948929,
1.010294795036316,
-0.15232983231544495,
-0.7655493021011353,
0.9407263994216919,
-0.31461673974990845,
-0.3172285258769989,
-0.1831989586353302,
-0.4320310652256012,
-0.056427862495183945,
-0.46268725395202637,
-0.514467239... |
func NewGetClustersBadRequest() *GetClustersBadRequest {
return &GetClustersBadRequest{}
} | [
-0.9835143089294434,
0.16314542293548584,
0.20643697679042816,
1.1113253831863403,
-0.013013269752264023,
-0.5064942240715027,
-0.08666788041591644,
-0.13736200332641602,
-0.0551651269197464,
-1.2026275396347046,
0.17000746726989746,
0.7669109106063843,
-1.210825800895691,
-0.2514093220233... |
func NewGetClustersUnauthorized() *GetClustersUnauthorized {
return &GetClustersUnauthorized{}
} | [
-1.0941532850265503,
0.0015913943061605096,
0.42279863357543945,
0.9603956341743469,
-0.4268898069858551,
-0.7482731342315674,
0.6191227436065674,
0.34684744477272034,
0.6392768025398254,
-1.289712905883789,
-0.39777225255966187,
1.3809800148010254,
-0.9931318759918213,
-1.2132624387741089... |
func NewGoAngecryption(key string) *GoAngecryption {
p := &GoAngecryption{
Key: key,
}
return p
} | [
-1.4788237810134888,
0.9640125632286072,
0.22258581221103668,
0.5303961634635925,
-1.096240758895874,
-0.24203141033649445,
-0.2402123361825943,
-0.6871135234832764,
-1.0057346820831299,
1.816516399383545,
-1.168744444847107,
0.0786607638001442,
-1.0090668201446533,
0.3575349450111389,
-... |
func NewService(context context.T) (service ISsmParameterService) {
return &SsmParameterService{sdk: ssm.NewService(context)}
} | [
-0.0913994312286377,
0.1482267528772354,
0.25312936305999756,
0.6291316151618958,
-0.6172592639923096,
0.028913117945194244,
-0.04443413019180298,
-1.1104748249053955,
0.26778602600097656,
0.5881654024124146,
0.26054972410202026,
1.2669589519500732,
-0.947284460067749,
0.7773756980895996,
... |
func (s *SsmParameterService) getParameters(
log log.T,
parameterReferences []string) (map[string]SsmParameterInfo, error) {
ref2NameMapper := make(map[string]string)
for i := 0; i < len(parameterReferences); i++ {
nameWithoutPrefix := extractParameterNameFromReference(parameterReferences[i])
ref2NameMapper[n... | [
-1.144914150238037,
-0.1876833438873291,
0.8511558771133423,
-0.5160494446754456,
-0.19491305947303772,
-0.13065624237060547,
-0.31743350625038147,
-0.9231851100921631,
-0.5074813365936279,
0.07563695311546326,
-0.1734616756439209,
0.6057904958724976,
-0.8531447052955627,
0.921007871627807... |
func getParametersFromSsmParameterStore(
s ISsmParameterService,
log log.T,
parametersToFetch []string) (map[string]SsmParameterInfo, error) {
outputMap := make(map[string]SsmParameterInfo)
var totalParams = len(parametersToFetch)
var startPos = 0
for totalParams > 0 {
var paramsBatch []string
var count ... | [
-0.4310980439186096,
-0.5241748094558716,
0.40470030903816223,
0.0040965317748487,
-1.2158509492874146,
0.1746673583984375,
-0.10097537189722061,
-0.3232778012752533,
-0.04360504075884819,
0.07318606972694397,
-0.1916993260383606,
0.5610182881355286,
0.17630212008953094,
0.5205609798431396... |
func NewAliasCodec() (*AliasCodec, error) {
this := &AliasCodec{}
return this, nil
} | [
0.8521144986152649,
-0.5564804077148438,
0.25154340267181396,
0.40848520398139954,
-0.9566887617111206,
0.04913166165351868,
0.634591817855835,
0.49845650792121887,
-0.2624998688697815,
-0.1969233900308609,
-0.5747779011726379,
0.03089018352329731,
1.2857052087783813,
1.3843368291854858,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.