text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func NewQueryRolesParamsWithHTTPClient(client *http.Client) *QueryRolesParams {
return &QueryRolesParams{
HTTPClient: client,
}
} | [
0.44671863317489624,
-0.5938655734062195,
0.22568681836128235,
-0.9576790928840637,
-0.2056242823600769,
1.0156238079071045,
-0.3483811318874359,
-0.6486474871635437,
-0.22956393659114838,
-0.5357018709182739,
-0.3623676300048828,
0.45322078466415405,
0.04611324891448021,
-0.57445478439331... |
func (o *QueryRolesParams) WithDefaults() *QueryRolesParams {
o.SetDefaults()
return o
} | [
0.2486286759376526,
0.5101457834243774,
-0.26137635111808777,
-0.853935182094574,
0.8369459509849548,
-0.48835301399230957,
-0.625446617603302,
-1.050480604171753,
0.10723373293876648,
-0.305010050535202,
0.601327121257782,
-0.9728379249572754,
-0.44041842222213745,
0.2062814086675644,
-... |
func (o *QueryRolesParams) SetDefaults() {
var (
limitDefault = int64(10)
offsetDefault = int64(0)
sortDefault = string("last_modified_timestamp|desc")
)
val := QueryRolesParams{
Limit: &limitDefault,
Offset: &offsetDefault,
Sort: &sortDefault,
}
val.timeout = o.timeout
val.Context = o.Context
... | [
-0.4264773428440094,
0.6209113597869873,
0.2740333378314972,
-1.0437541007995605,
0.9327408671379089,
0.15051895380020142,
-0.4114640951156616,
-0.5890589952468872,
-0.2762426733970642,
-0.25931593775749207,
-0.39367353916168213,
0.30790650844573975,
-0.5120840072631836,
0.1182626113295555... |
func (o *QueryRolesParams) WithTimeout(timeout time.Duration) *QueryRolesParams {
o.SetTimeout(timeout)
return o
} | [
0.26525622606277466,
0.23085930943489075,
0.07958368211984634,
-1.0108698606491089,
0.14443297684192657,
0.6547598242759705,
-0.39711102843284607,
-0.6451207995414734,
0.09615525603294373,
0.5639181137084961,
0.694433867931366,
-0.00910070538520813,
-0.08769731968641281,
0.2935489714145660... |
func (o *QueryRolesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
0.024904780089855194,
0.2684550881385803,
-0.08345957845449448,
-1.1196755170822144,
0.5292924642562866,
1.050455927848816,
-0.2444925755262375,
-0.12358138710260391,
-0.18097078800201416,
0.6488522291183472,
0.7035256028175354,
0.3924354314804077,
-0.6732041835784912,
0.20624476671218872,... |
func (o *QueryRolesParams) WithContext(ctx context.Context) *QueryRolesParams {
o.SetContext(ctx)
return o
} | [
-0.47575345635414124,
0.41218024492263794,
0.12774412333965302,
-1.077204942703247,
0.009097299538552761,
0.5504918694496155,
-0.4173698425292969,
-1.2907929420471191,
0.43070584535598755,
0.0890468880534172,
0.5792309641838074,
0.08255955576896667,
-0.7660320997238159,
-0.2655076682567596... |
func (o *QueryRolesParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.575102686882019,
0.36271148920059204,
-0.07552306354045868,
-0.829211413860321,
0.5166517496109009,
0.7591419816017151,
-0.1580086350440979,
-0.7125574350357056,
0.7326691746711731,
0.12874720990657806,
0.3700729310512543,
0.4108709692955017,
-1.1592586040496826,
-0.2492476850748062,
... |
func (o *QueryRolesParams) WithHTTPClient(client *http.Client) *QueryRolesParams {
o.SetHTTPClient(client)
return o
} | [
0.059095144271850586,
-0.5035184621810913,
0.08562815189361572,
-1.2917991876602173,
-0.023055220022797585,
0.29940560460090637,
0.3514765202999115,
-1.025368571281433,
-0.36140862107276917,
-0.447192519903183,
0.4617251455783844,
-0.08087623119354248,
-0.0024757676292210817,
-0.5134122371... |
func (o *QueryRolesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
0.273300439119339,
-0.3059881925582886,
0.035603638738393784,
-1.6853790283203125,
-0.11072756350040436,
0.5233343839645386,
0.4255458116531372,
-0.9072719812393188,
-0.5951500535011292,
-0.2535061836242676,
-0.01169874519109726,
0.6442840099334717,
-0.8019618988037109,
-0.8543281555175781... |
func (o *QueryRolesParams) WithCidGroupID(cidGroupID *string) *QueryRolesParams {
o.SetCidGroupID(cidGroupID)
return o
} | [
0.09961874783039093,
0.2926367223262787,
-0.3455098271369934,
-0.6636211276054382,
-0.34520265460014343,
0.47853779792785645,
-0.021375302225351334,
-0.3189381957054138,
0.3557085394859314,
0.34055450558662415,
0.3852853775024414,
-0.6605089902877808,
-1.0179744958877563,
0.453311920166015... |
func (o *QueryRolesParams) SetCidGroupID(cidGroupID *string) {
o.CidGroupID = cidGroupID
} | [
-0.168578639626503,
0.12308987230062485,
-0.3657340109348297,
-0.621175229549408,
-0.22307367622852325,
0.5963011384010315,
0.23409117758274078,
-0.043832965195178986,
0.21923603117465973,
0.22747309505939484,
-0.20213931798934937,
0.01715555600821972,
-1.7146247625350952,
0.65515893697738... |
func (o *QueryRolesParams) WithLimit(limit *int64) *QueryRolesParams {
o.SetLimit(limit)
return o
} | [
-0.18340545892715454,
0.1779218465089798,
0.268755704164505,
-0.9927211403846741,
0.316097617149353,
0.22041772305965424,
0.15421661734580994,
-0.7579752206802368,
-0.16518115997314453,
0.09911400079727173,
1.1459215879440308,
-0.09810344874858856,
-0.38761648535728455,
-0.5488739013671875... |
func (o *QueryRolesParams) SetLimit(limit *int64) {
o.Limit = limit
} | [
-0.6000891923904419,
0.17443057894706726,
0.14073149859905243,
-0.8468547463417053,
0.7002124786376953,
0.47807756066322327,
0.288606196641922,
-0.29731979966163635,
-0.2327880859375,
0.114088274538517,
0.8164592385292053,
0.27399173378944397,
-1.2985235452651978,
-0.23966485261917114,
-... |
func (o *QueryRolesParams) WithOffset(offset *int64) *QueryRolesParams {
o.SetOffset(offset)
return o
} | [
-0.6415479779243469,
-0.17521825432777405,
0.1946870982646942,
-1.6793361902236938,
-0.1894724816083908,
0.6497146487236023,
0.05252263322472572,
-0.6920457482337952,
-0.13297642767429352,
0.23002712428569794,
0.584073543548584,
-0.21442948281764984,
-0.0899304747581482,
-0.434761464595794... |
func (o *QueryRolesParams) SetOffset(offset *int64) {
o.Offset = offset
} | [
-0.843423068523407,
0.08058571070432663,
-0.05066409707069397,
-1.5804314613342285,
0.12242551892995834,
0.976429283618927,
0.09803584963083267,
-0.21441440284252167,
-0.22325292229652405,
0.1670888066291809,
0.3521106243133545,
0.3749270737171173,
-1.0097784996032715,
-0.07435496151447296... |
func (o *QueryRolesParams) WithRoleID(roleID *string) *QueryRolesParams {
o.SetRoleID(roleID)
return o
} | [
-0.22594037652015686,
-0.23032164573669434,
-0.013657091185450554,
-0.4300994277000427,
0.7369531393051147,
0.5783869028091431,
0.13143764436244965,
-0.6342287659645081,
0.25899091362953186,
0.5395147800445557,
1.239746332168579,
-0.6528868675231934,
-0.8329196572303772,
1.1254462003707886... |
func (o *QueryRolesParams) SetRoleID(roleID *string) {
o.RoleID = roleID
} | [
-0.6478637456893921,
-0.3697437047958374,
-0.06427772343158722,
-0.3039238750934601,
0.7272245287895203,
1.0406346321105957,
0.12467403709888458,
-0.12582600116729736,
0.252138614654541,
0.6256763935089111,
0.7014684677124023,
0.14155034720897675,
-1.4305702447891235,
1.2755934000015259,
... |
func (o *QueryRolesParams) WithSort(sort *string) *QueryRolesParams {
o.SetSort(sort)
return o
} | [
0.049707673490047455,
0.005158275365829468,
-0.16329768300056458,
-1.2288964986801147,
-0.17698891460895538,
0.008456651121377945,
0.11459103971719742,
-1.7791688442230225,
-0.3242546617984772,
-0.2801067531108856,
0.6294689178466797,
-0.3013981878757477,
-0.5664766430854797,
0.11308375746... |
func (o *QueryRolesParams) SetSort(sort *string) {
o.Sort = sort
} | [
-0.42335817217826843,
0.25262096524238586,
-0.1802579015493393,
-0.5122008323669434,
-0.1920856386423111,
0.2271420657634735,
-0.359464168548584,
-0.9666664600372314,
-0.08755657076835632,
-0.2871018946170807,
0.05325927212834358,
0.15661920607089996,
-1.4701021909713745,
0.463022142648696... |
func (o *QueryRolesParams) WithUserGroupID(userGroupID *string) *QueryRolesParams {
o.SetUserGroupID(userGroupID)
return o
} | [
-0.19788166880607605,
-0.0550074502825737,
-0.2066114991903305,
-0.6454763412475586,
-0.7389962077140808,
0.24175488948822021,
0.34105753898620605,
-0.5688989162445068,
0.48168474435806274,
0.6430466771125793,
0.3474005162715912,
-0.5233824253082275,
-0.44215214252471924,
0.629739165306091... |
func (o *QueryRolesParams) SetUserGroupID(userGroupID *string) {
o.UserGroupID = userGroupID
} | [
-0.46272239089012146,
0.08590234816074371,
-0.1651148647069931,
-0.694088339805603,
-0.46554896235466003,
0.4416312873363495,
0.6752281785011292,
-0.38931459188461304,
0.30794069170951843,
0.5017150640487671,
0.0180471483618021,
0.25003692507743835,
-1.116573452949524,
0.655510663986206,
... |
func (o *QueryRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.CidGroupID != nil {
// query param cid_group_id
var qrCidGroupID string
if o.CidGroupID != nil {
qrCidGroupID = *o.CidGroup... | [
-0.7685015797615051,
-0.5695446729660034,
0.8090991973876953,
-1.616316795349121,
0.21186712384223938,
0.11549200117588043,
0.545133113861084,
-0.6170974969863892,
-0.11242085695266724,
0.1925853043794632,
0.2161773294210434,
0.4367544949054718,
-0.3274001479148865,
0.3078007996082306,
-... |
func GeneratePrivateKey(algo ...Algorithm) (PrivateKey, error) {
if len(algo) != 0 {
switch algo[0] {
case KeyAlgoSecp256k1:
return GenerateSECP256K1PrivateKey()
default:
return GenerateSM2PrivateKey()
}
}
return GenerateSM2PrivateKey()
} | [
-0.1056523397564888,
0.7151418328285217,
0.6048809289932251,
1.0668314695358276,
-0.08741933107376099,
-0.06288257241249084,
0.09526842832565308,
-0.7724860906600952,
0.5316209197044373,
0.6704931855201721,
-0.41417765617370605,
0.015306688845157623,
-0.196670800447464,
0.7768675088882446,... |
func LoadPrivateKeyFromFile(file string) (PrivateKey, error) {
data, err := ioutil.ReadFile(file)
if err != nil {
return nil, err
}
// Note: secp256k1 private key we store on disk using hex string, so we can distinguish these two keys
key, err := hex.DecodeString(string(data))
if err != nil {
return NewPrivat... | [
0.47579142451286316,
-0.7226042747497559,
0.26460573077201843,
0.2129219025373459,
-0.3985814154148102,
0.47552379965782166,
-0.6759843826293945,
-0.6960538625717163,
-0.4630560874938965,
0.3053961992263794,
-0.42151573300361633,
0.29045039415359497,
-0.7341054081916809,
0.2391057312488556... |
func NewPrivateKey(raw []byte, algo Algorithm) (PrivateKey, error) {
switch algo {
case KeyAlgoSecp256k1:
return toSECP256K1PrivateKey(raw)
case KeyAlgoSM2:
return toSM2PrivateKey(raw)
default:
return nil, fmt.Errorf("unsupport algo:%v", algo)
}
} | [
0.16105808317661285,
-0.05424785614013672,
0.3304709494113922,
0.543493926525116,
-0.81801837682724,
-0.6483626365661621,
-0.3546171188354492,
-0.6508312225341797,
0.2885463237762451,
1.113977313041687,
0.035337574779987335,
0.5469004511833191,
0.22433510422706604,
0.4526159167289734,
1.... |
func NewPublicKey(raw []byte, algo Algorithm) (PublicKey, error) {
switch algo {
case KeyAlgoSecp256k1:
return newSECP256K1PublicKey(raw)
default:
return newSM2PublicKey(raw)
}
} | [
0.8956097960472107,
0.12070397287607193,
0.3430791199207306,
0.9735522270202637,
-1.2826350927352905,
-0.3328539729118347,
0.015058347024023533,
-0.19060105085372925,
-0.30794936418533325,
0.854482889175415,
-0.49147355556488037,
0.4900219142436981,
0.6001858115196228,
0.9481880068778992,
... |
func (client *Client) GetRetcodeLogstore(request *GetRetcodeLogstoreRequest) (response *GetRetcodeLogstoreResponse, err error) {
response = CreateGetRetcodeLogstoreResponse()
err = client.DoAction(request, response)
return
} | [
-0.40044304728507996,
0.6814236640930176,
0.280055969953537,
0.2053666114807129,
-0.8410182595252991,
-0.5790613293647766,
0.0322488509118557,
-0.10528253763914108,
0.5419042706489563,
-0.7283974289894104,
-0.6630234122276306,
1.6970648765563965,
-1.7020193338394165,
-1.0628947019577026,
... |
func (client *Client) GetRetcodeLogstoreWithChan(request *GetRetcodeLogstoreRequest) (<-chan *GetRetcodeLogstoreResponse, <-chan error) {
responseChan := make(chan *GetRetcodeLogstoreResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
r... | [
-0.17235367000102997,
0.08954298496246338,
0.7151784896850586,
-0.37259453535079956,
-0.4710754156112671,
-0.49277567863464355,
-0.035882189869880676,
-1.0186657905578613,
0.6061235070228577,
-0.4527794420719147,
-0.33346977829933167,
1.989482045173645,
-1.125685691833496,
0.18323549628257... |
func (client *Client) GetRetcodeLogstoreWithCallback(request *GetRetcodeLogstoreRequest, callback func(response *GetRetcodeLogstoreResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetRetcodeLogstoreResponse
var err error
defer close(result)
respo... | [
-0.18236467242240906,
0.3585985004901886,
0.8215279579162598,
-0.14091889560222626,
-0.793793261051178,
-0.9927530884742737,
0.20294584333896637,
-0.6027292013168335,
1.0741908550262451,
-0.15944814682006836,
-0.20358940958976746,
1.075148344039917,
-0.8576854467391968,
0.12654204666614532... |
func CreateGetRetcodeLogstoreRequest() (request *GetRetcodeLogstoreRequest) {
request = &GetRetcodeLogstoreRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("ARMS", "2019-08-08", "GetRetcodeLogstore", "arms", "openAPI")
request.Method = requests.POST
return
} | [
-0.1384424865245819,
0.022475600242614746,
0.4016883075237274,
-0.19166617095470428,
-0.05833744630217552,
-0.13014110922813416,
-0.6385498642921448,
-0.1182895302772522,
0.045198678970336914,
-0.6536661982536316,
-0.24501942098140717,
1.3754233121871948,
-1.0649646520614624,
0.03301839902... |
func CreateGetRetcodeLogstoreResponse() (response *GetRetcodeLogstoreResponse) {
response = &GetRetcodeLogstoreResponse{
BaseResponse: &responses.BaseResponse{},
}
return
} | [
-0.4167441129684448,
-0.5859069228172302,
0.3321530520915985,
0.09251721948385239,
-0.11898700147867203,
-0.8455668091773987,
-0.05925455689430237,
-0.5232035517692566,
0.8455406427383423,
-0.3917727768421173,
-0.8377668261528015,
0.22803601622581482,
-1.574256420135498,
-0.280079662799835... |
func NewSafeSource(in mathrand.Source) mathrand.Source {
return &safeSource{
Source: in,
}
} | [
-0.018237337470054626,
0.647746205329895,
-0.20804204046726227,
-0.4200117588043213,
-1.41791570186615,
-0.4465964138507843,
-0.0012114495038986206,
-0.08714140951633453,
0.7844831943511963,
-0.14514510333538055,
-0.5922467708587646,
-0.13070575892925262,
-0.576486349105835,
0.272327721118... |
func SetRandomSource(in mathrand.Source) {
rand = mathrand.New(in)
} | [
-0.0594751238822937,
0.3887464106082916,
0.06494230777025223,
-0.28618985414505005,
-0.9044868350028992,
0.5926226377487183,
0.08571211993694305,
0.10400817543268204,
0.8753682374954224,
-0.8683385848999023,
-1.6301974058151245,
0.1944243609905243,
0.09292472898960114,
1.4823684692382812,
... |
func SetCryptoSource(in io.Reader) {
crypto = in
} | [
0.49826160073280334,
0.13900958001613617,
0.1754666566848755,
-0.9062284827232361,
-0.019565483555197716,
0.3823562562465668,
0.7376775145530701,
0.1399787962436676,
-0.4219720959663391,
0.1679772585630417,
-1.357676386833191,
0.5901735424995422,
-0.4711379110813141,
0.0018283516401425004,... |
func NewCurry(fn interface{}) (*Curry, error) {
typ := reflect.TypeOf(fn)
if typ.Kind() != reflect.Func {
return nil, fmt.Errorf("Handler is not a function!")
}
c := &Curry{
name: getFunctionName(fn),
fnType: typ,
fn: fn,
}
return c, nil
} | [
-0.37830713391304016,
-0.4529382586479187,
0.4225529730319977,
0.20399209856987,
-0.36800602078437805,
-0.7588262557983398,
0.19058729708194733,
-0.1508299857378006,
0.5228622555732727,
-0.3026566505432129,
-0.4301762878894806,
1.135540246963501,
0.366874098777771,
0.0041742632165551186,
... |
func (c *Curry) Invoke(args []interface{}) ([]interface{}, error) {
if c.fnType.NumIn() != len(args) {
return nil, fmt.Errorf("Cumin Type Error: expected %d args for function %s, got %d", c.fnType.NumIn(), c.fnType, len(args))
}
// Iterate over the params listed in the method and try their casts
values := make([... | [
-0.7418962121009827,
0.31279873847961426,
1.1006947755813599,
0.44075027108192444,
0.9800383448600769,
-0.7810984253883362,
-0.07810712605714798,
-0.34233957529067993,
-0.5467995405197144,
0.48788976669311523,
0.4176151752471924,
0.22292225062847137,
-0.9012729525566101,
0.9073482751846313... |
func getFunctionName(fn interface{}) string {
name := runtime.FuncForPC(reflect.ValueOf(fn).Pointer()).Name()
// Method above returns functions in the form : main.foo
parts := strings.Split(name, ".")
return parts[len(parts)-1]
} | [
-0.052676934748888016,
0.03305723890662193,
0.6871885061264038,
-0.023745985701680183,
0.04004163667559624,
-0.8888618350028992,
0.4187787175178528,
-0.1105307936668396,
-0.39598894119262695,
-0.17086151242256165,
-0.07194287329912186,
0.21565715968608856,
-0.3890497386455536,
0.2391260117... |
func getValueOf(x interface{}) reflect.Value {
value := reflect.ValueOf(x)
if value.Kind() == reflect.Float64 {
asfloat := value.Float()
asint := int(asfloat)
if float64(asint) == asfloat {
value = reflect.ValueOf(asint)
}
}
return value
} | [
0.31782975792884827,
0.861519992351532,
0.4834337830543518,
0.1734783798456192,
0.023399103432893753,
-0.7093554139137268,
-0.1896660476922989,
-1.305770754814148,
0.3704192042350769,
-0.4581008553504944,
0.6596352458000183,
0.2389427274465561,
0.0733586996793747,
0.9166527986526489,
0.4... |
func UninstallOperator(ctx context.Context, client k8sclient.Client, installation *integreatlyv1alpha1.RHMI) error {
// Get the operator subscription
subscription, err := GetSubscription(ctx, client, installation)
if err != nil {
return err
}
// If the subscription is not found, finish: the operator might have ... | [
0.45080047845840454,
-0.17249345779418945,
0.5035228729248047,
0.03385152667760849,
-0.9751241207122803,
-0.6631051898002625,
0.25558406114578247,
0.725885808467865,
0.297254741191864,
0.7936028838157654,
0.1940755695104599,
0.08987206220626831,
-1.009490966796875,
0.43961289525032043,
0... |
func (r *Resolver) GetInsult(ctx context.Context, args struct{ People *model.Users }) (*insultResolver, error) {
userInfo, err := r.Services.Insult.GetUserInfo(args.People.From)
if err != nil {
return nil, errors.Wrapf(err, "error getting userInfo")
}
message, id, err := r.Services.Insult.GenerateInsult(*args.Pe... | [
-0.47561079263687134,
0.3325919806957245,
0.730565071105957,
0.1384223848581314,
0.24233274161815643,
0.4036312401294708,
-0.25099292397499084,
0.08436381071805954,
-0.27255362272262573,
-0.712149977684021,
0.06903646886348724,
0.6435005068778992,
-0.7736738324165344,
0.2282770872116089,
... |
func (*CannedMessageModuleConfig) Descriptor() ([]byte, []int) {
return file_meshtastic_cannedmessages_proto_rawDescGZIP(), []int{0}
} | [
0.39245715737342834,
-0.08643382042646408,
0.16028162837028503,
0.19910183548927307,
-0.334269642829895,
0.2728114128112793,
0.4679466784000397,
0.7420432567596436,
-0.004227302502840757,
0.5818041563034058,
-0.4317885637283325,
0.5708758234977722,
-0.12550950050354004,
1.5979658365249634,... |
func (o *GetMaterialsMaterialGUIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetMaterialsMaterialGUIDOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
... | [
0.17082947492599487,
-0.9376309514045715,
0.5186548829078674,
-0.17910636961460114,
-0.5464619398117065,
-0.8075556755065918,
-0.4827408194541931,
-0.6537184715270996,
0.2529139518737793,
0.3819598853588104,
0.6638880968093872,
-0.2927362024784088,
-1.0919203758239746,
0.04402462765574455,... |
func NewGetMaterialsMaterialGUIDOK() *GetMaterialsMaterialGUIDOK {
return &GetMaterialsMaterialGUIDOK{}
} | [
0.5930503606796265,
0.05338330194354057,
0.16275069117546082,
0.13480427861213684,
-0.749122679233551,
-0.07712853699922562,
-0.29887208342552185,
0.04972941800951958,
-0.40500226616859436,
-0.7738705277442932,
0.019444802775979042,
-0.26275792717933655,
-0.23000891506671906,
0.15718489885... |
func resourceComputePerInstanceConfigPollRead(d *schema.ResourceData, meta interface{}) transport_tpg.PollReadFunc {
return func() (map[string]interface{}, error) {
config := meta.(*transport_tpg.Config)
userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent)
if err != nil {
return nil, err... | [
-0.548814594745636,
0.5997377634048462,
0.9635002017021179,
-0.6807633638381958,
-1.0898383855819702,
0.8312352299690247,
0.21832549571990967,
-0.17076653242111206,
-0.6382947564125061,
0.9542201161384583,
0.15552257001399994,
0.5397486090660095,
-0.8669532537460327,
-0.0998711884021759,
... |
func resourceComputeRegionPerInstanceConfigPollRead(d *schema.ResourceData, meta interface{}) transport_tpg.PollReadFunc {
return func() (map[string]interface{}, error) {
config := meta.(*transport_tpg.Config)
userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent)
if err != nil {
return ni... | [
-0.5669910311698914,
0.3828514814376831,
0.9285784959793091,
-0.8746119737625122,
-1.1187705993652344,
0.9251983761787415,
0.1535484492778778,
-0.2859519422054291,
-0.5888431668281555,
0.6658514738082886,
0.3496265709400177,
0.49455946683883667,
-0.7976869344711304,
0.1461200714111328,
0... |
func (b *block) ClearBlock(ns, alarmVersion, hostname string, tag map[string]string) error {
alarmHostPath := AbsPath(TagDir(ns, alarmVersion, hostname, encodeTags(tag)))
if err := b.c.RemoveDir(alarmHostPath); err != nil {
if !strings.Contains(err.Error(), "Key not found") {
return err
}
log.Errorf("del dir... | [
-0.3672959506511688,
0.8375837206840515,
0.6721651554107666,
0.8770713806152344,
-0.0732719674706459,
0.5444586277008057,
-0.33706796169281006,
-0.4204082489013672,
-0.6605297923088074,
0.16887694597244263,
0.12982727587223053,
0.391997367143631,
-0.380778044462204,
0.9934134483337402,
0... |
func (b *block) IsBlock(ns string, alarm *loda.Alarm, hostname string, tag map[string]string) bool {
tagString := encodeTags(tag)
newBlockStatus, newBlockStatusTTL, newBlockTimes, newBlockTimesTTL, isBlock := b.readBlock(ns, alarm, hostname, tagString)
if newBlockStatus != noAction && newBlockTimes != noAction {
b... | [
-0.49480360746383667,
-0.05093040317296982,
0.72465980052948,
0.7626777291297913,
0.1363964080810547,
-0.008529230952262878,
-0.7687126994132996,
-0.46743613481521606,
0.05156445875763893,
0.20007063448429108,
-0.08065693080425262,
0.7127596735954285,
-0.2854718863964081,
0.942578673362731... |
func (b *block) readBlock(ns string, alarm *loda.Alarm, hostname, tagString string) (
newBlockStatus, newBlockStatusTTL, newBlockTimes, newTimesTTL int, isBlock bool) {
var errStatus, errTimes error
blockStatus, errStatus := b.getBlockStatus(ns, alarm.AlarmData.Version, hostname, tagString)
if errStatus != nil {
... | [
-0.2058478742837906,
0.09220108389854431,
0.9446759819984436,
1.1183022260665894,
-0.04469496011734009,
0.18320970237255096,
-0.10511330515146255,
-0.38571465015411377,
-0.24714574217796326,
0.6208592653274536,
0.2407791018486023,
0.588470458984375,
0.30235326290130615,
1.121353268623352,
... |
func getBlockKeyTTL(step, times, max, alarmCheckInterval int) (statusTTL, timesTTL int) {
statusTTL = step * times
if statusTTL == 0 {
statusTTL = 5
}
if statusTTL > max {
statusTTL = max
}
timesTTL = statusTTL + alarmCheckInterval
return
} | [
0.021885933354496956,
0.33228155970573425,
0.4210582673549652,
0.8207266330718994,
-0.4689927399158478,
-0.2725434899330139,
-0.5242989659309387,
-0.18301768600940704,
-1.0032808780670166,
1.690484881401062,
-1.191074013710022,
-0.563527524471283,
0.183829203248024,
0.6396241188049316,
-... |
func (b *block) setBlockStatus(ns, alarmVersion, hostname, tagString string, status, statusTTL int) error {
return b.c.SetWithTTL(
BlockStatusKey(ns, alarmVersion, hostname, tagString),
strconv.Itoa(int(status)),
time.Duration(statusTTL)*time.Minute-5*time.Second)
} | [
-0.16893064975738525,
-0.17914584279060364,
0.12914855778217316,
0.28652045130729675,
-0.2962566316127777,
0.156724750995636,
-0.7693771123886108,
-0.154798686504364,
-0.5739767551422119,
0.8562375903129578,
-1.7645667791366577,
0.2993728518486023,
0.05249948054552078,
0.5682613849639893,
... |
func (b *block) setBlockTimes(ns, alarmVersion, hostname, tagString string, times, timesTTL int) error {
return b.c.SetWithTTL(
BlockTimesKey(ns, alarmVersion, hostname, tagString),
strconv.Itoa(int(times)),
time.Duration(timesTTL)*time.Minute+10*time.Second)
} | [
-0.5347440242767334,
1.001809000968933,
0.3337990939617157,
0.010046778246760368,
-0.3938593864440918,
-0.4317767322063446,
-0.8828896284103394,
-0.8407408595085144,
-0.600731611251831,
1.3663513660430908,
-1.337529182434082,
-0.06880336254835129,
-0.41196203231811523,
0.5630611181259155,
... |
func UploadCSV(w http.ResponseWriter, r *http.Request) {
fmt.Println("method:", r.Method)
if r.Method == "GET" {
crutime := time.Now().Unix()
h := md5.New()
io.WriteString(h, strconv.FormatInt(crutime, 10))
token := fmt.Sprintf("%x", h.Sum(nil))
fmt.Println("TOKEN ", toke... | [
-0.15748122334480286,
0.40118733048439026,
1.1893302202224731,
0.5166727304458618,
0.313579797744751,
0.6050091981887817,
0.4736109673976898,
0.08444206416606903,
-0.9847950339317322,
0.001006250618956983,
0.43729543685913086,
-0.2817523181438446,
-0.10159995406866074,
0.21333010494709015,... |
func TestCollectorOK(t *testing.T) {
c := collector.New()
ctx := context.Background()
mpa := NewStubMeterPoints("a", 0, 100*time.Millisecond)
mpb := NewStubMeterPoints("b", 5, 200*time.Millisecond)
mpc := NewStubMeterPoints("c", 10, 50*time.Millisecond)
err := c.Register(mpa, mpb, mpc)
if err != nil {
t.Errorf... | [
0.8432663679122925,
0.5796090960502625,
0.7362787127494812,
0.22498168051242828,
1.2548191547393799,
-0.024752439931035042,
0.9279360175132751,
-0.12301567196846008,
-0.7437788844108582,
-0.5276559591293335,
-0.033414024859666824,
-0.3915984630584717,
0.016684187576174736,
0.24169008433818... |
func TestCollectorCancel(t *testing.T) {
c := collector.New()
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
mpa := NewStubMeterPoints("a", 0, 2*time.Second)
mpb := NewStubMeterPoints("b", 5, 2*time.Second)
mpc := NewStubMeterPoints("c", 10, 2*time.Second)
err := c.Register(... | [
1.09299898147583,
-0.2243388146162033,
0.7682271599769592,
0.22123484313488007,
0.7099332809448242,
0.6611725091934204,
0.44158223271369934,
0.0779772698879242,
-0.6570459604263306,
0.03912462294101715,
-0.0124832047149539,
-0.230381041765213,
0.13207845389842987,
0.1531587690114975,
0.8... |
func NewStubMeterPoints(id string, start int, delay time.Duration) *StubMeterPoints {
smp := &StubMeterPoints{
id: id,
count: start,
delay: delay,
}
return smp
} | [
-0.3829232454299927,
-0.563034176826477,
0.3412543833255768,
-0.05505365505814552,
-0.6664721965789795,
0.05367201566696167,
0.2217608541250229,
0.09268598258495331,
-0.39701440930366516,
0.5620476603507996,
-0.7853227853775024,
0.463013231754303,
-0.13589563965797424,
0.07958359271287918,... |
func (c *Claims) Valid() error {
if c.RevokedAt != 0 {
return auth.ErrTokenRevoked
}
vErr, ok := c.StandardClaims.Valid().(*jwt.ValidationError)
if !ok {
return nil
}
var multiErr errors.MultiError
if vErr.Errors&jwt.ValidationErrorExpired != 0 {
multiErr = append(multiErr, auth.ErrTokenExpired)
}
if vEr... | [
0.2371322363615036,
-0.7282469868659973,
0.510673463344574,
-0.34204337000846863,
-0.5401813387870789,
0.33735018968582153,
-1.3000606298446655,
0.1687510907649994,
0.4495542347431183,
-0.3425063490867615,
0.2584826946258545,
0.5377941727638245,
0.12886841595172882,
0.22671671211719513,
... |
func (c *AccessClaims) GetAccount() auth.Account {
return c.Account
} | [
1.6446208953857422,
-0.775187075138092,
0.27080729603767395,
0.2679011821746826,
0.730476975440979,
0.24519872665405273,
0.9098235964775085,
0.714972198009491,
1.3299527168273926,
-1.0961158275604248,
1.0936965942382812,
1.3059430122375488,
0.6613119840621948,
-0.44227370619773865,
0.942... |
func (r *RefreshClaims) GetAccountID() string {
return r.AccountID
} | [
2.069474697113037,
-0.47692230343818665,
0.4639739394187927,
0.7652401328086853,
0.5163896679878235,
1.190399408340454,
0.9178059697151184,
0.16707417368888855,
1.796566128730774,
0.03379815071821213,
0.9542750120162964,
1.4183614253997803,
0.25692614912986755,
0.7593780159950256,
0.0968... |
func GetDiskStats(disks cmn.SimpleKVs) DiskStats {
if len(disks) < largeNumDisks {
output := make(DiskStats, len(disks))
for disk := range disks {
stat, ok := readSingleDiskStat(disk)
if !ok {
continue
}
output[disk] = stat
}
return output
}
return readMultipleDiskStats(disks)
} | [
-0.5478877425193787,
0.9894101023674011,
0.45695072412490845,
0.6429495215415955,
-0.0023992364294826984,
-0.5042679309844971,
-0.25767335295677185,
-0.6527673602104187,
0.45713838934898376,
-1.1807949542999268,
-0.07310384511947632,
-0.6411216259002686,
-0.13573378324508667,
0.84849905967... |
func try_compile_plugin(tag string) {
filename := "../plugins/" + tag + ".go"
if file_exists(filename) {
compile_plugin(filename, tag)
}
} | [
0.2559816241264343,
-1.3056936264038086,
0.34067288041114807,
-0.15119032561779022,
1.1182504892349243,
-0.4967705309391022,
-0.10145360231399536,
-0.468870609998703,
-0.8856770396232605,
-0.11751817911863327,
-0.7174669504165649,
0.16824312508106232,
-0.24554823338985443,
0.38611462712287... |
func compile_plugin(filename string, tag string) {
out := globals.tmp_directory + "/" + tag
cmd := "go"
arg1 := "build"
arg2 := "-o"
arg3 := out
arg4 := filename
o, err := exec.Command(cmd, arg1, arg2, arg3, arg4).Output()
if err != nil {
println(err.Error())
println(o)
... | [
0.16918812692165375,
-1.1857078075408936,
0.6654036045074463,
0.23862361907958984,
0.9098919034004211,
-0.03997701406478882,
0.2185480296611786,
0.7006300091743469,
-0.9630367159843445,
-0.2150348722934723,
-0.6298913359642029,
0.8508437275886536,
-0.3754534423351288,
0.11897002905607224,
... |
func try_apply_plugin(tag string, payload []byte) []byte {
if tag == "" {
return nil
}
filename := globals.tmp_directory + "/" + tag
if file_exists(filename) {
return execute_plugin(filename, payload)
}
return nil
} | [
0.13411355018615723,
-0.6770841479301453,
0.5395267605781555,
-0.2511212229728699,
0.0802292674779892,
-0.44987952709198,
-0.35733696818351746,
-0.41909298300743103,
0.04476533085107803,
-0.35485371947288513,
-0.1528363674879074,
-0.3338494896888733,
-0.41117241978645325,
0.558746278285980... |
func file_exists(filename string) bool {
if _, err := os.Stat(filename); err != nil {
if os.IsNotExist(err) {
return false
}
}
return true
} | [
-0.5940374732017517,
-0.04314586892724037,
0.6282997131347656,
-0.5914417505264282,
1.4521909952163696,
0.9516180157661438,
-0.5288030505180359,
0.8185810446739197,
-1.1102350950241089,
-0.3108707070350647,
0.14809034764766693,
-1.0304458141326904,
0.5969318747520447,
0.4764006733894348,
... |
func execute_plugin(filename string, input []byte) []byte {
cmd := filename
arg := string(input)
out, err := exec.Command(cmd, arg).Output()
if err != nil {
println(err.Error())
return nil
}
return out
} | [
-0.38455820083618164,
-1.2260611057281494,
0.6649233102798462,
0.27803876996040344,
0.1397915631532669,
-0.0728338286280632,
0.026518691331148148,
0.27242323756217957,
-0.41455078125,
0.09219546616077423,
0.11815094202756882,
0.6631752252578735,
-0.5894228219985962,
-0.45372483134269714,
... |
func NewExplorer(search vectorClassSearch, vectorizer CorpiVectorizer,
distancer distancer, logger logrus.FieldLogger, nnExtender nnExtender,
projector projector, pathBuilder pathBuilder) *Explorer {
return &Explorer{search, vectorizer, distancer, logger, nnExtender, projector, pathBuilder}
} | [
-0.16665519773960114,
-0.3640134930610657,
0.1158609390258789,
0.6786102652549744,
-1.365606665611267,
0.00128991121891886,
-0.05660867691040039,
0.17187677323818207,
0.3430211544036865,
-0.5374361872673035,
0.4484117031097412,
-0.4490065574645996,
-0.2512349784374237,
1.2258728742599487,
... |
func (e *Explorer) GetClass(ctx context.Context,
params GetParams) ([]interface{}, error) {
if params.Pagination == nil {
params.Pagination = &filters.Pagination{
Limit: 100,
}
}
if params.Explore != nil {
return e.getClassExploration(ctx, params)
}
return e.getClassList(ctx, params)
} | [
-1.1670066118240356,
0.7606597542762756,
0.7679779529571533,
0.8895580768585205,
1.4457401037216187,
-0.6804585456848145,
0.5815364718437195,
0.24232217669487,
0.8536105751991272,
0.2005186676979065,
0.8511478900909424,
0.16491344571113586,
0.42274209856987,
1.051811695098877,
-0.0562949... |
func readLines(path string) (map[string]Rule, error) {
file, err := os.Open(path)
if err != nil {
return nil, err
}
defer file.Close()
bags := make(map[string]Rule)
scanner := bufio.NewScanner(file)
for scanner.Scan() {
line := scanner.Text()
contents := strings.Spli... | [
0.10966421663761139,
-0.47269099950790405,
0.710347592830658,
-0.7166141867637634,
-0.03936105966567993,
0.37254348397254944,
-0.3105718195438385,
-0.17589010298252106,
-1.0746955871582031,
-0.17856502532958984,
-0.29190754890441895,
-0.3206518590450287,
0.4156045913696289,
0.1561901271343... |
func (f *PKCS11Factory) Name() string {
return PKCS11BasedFactoryName
} | [
-0.8717756271362305,
-0.5141762495040894,
0.5747587084770203,
0.4706805944442749,
-0.8147172927856445,
0.21083083748817444,
-0.3078807592391968,
-0.4500976800918579,
0.10674504190683365,
0.2411126047372818,
0.11020861566066742,
-1.0321044921875,
1.05710768699646,
-0.3046359419822693,
-0.... |
func (f *PKCS11Factory) Get(config *FactoryOpts) (bccsp.BCCSP, error) {
// Validate arguments
if config == nil || config.PKCS11 == nil {
return nil, errors.New("Invalid config. It must not be nil.")
}
p11Opts := *config.PKCS11
ks := sw.NewDummyKeyStore()
mapper := skiMapper(p11Opts)
return pkcs11.New(p11Opts... | [
-0.11019527167081833,
-0.026351245120167732,
0.5506185293197632,
-0.17321890592575073,
0.20713776350021362,
-0.11879773437976837,
-0.9351844191551208,
0.3462558090686798,
0.7871003150939941,
0.2034459263086319,
-0.11756294220685959,
0.35495415329933167,
-0.35992324352264404,
-0.60135710239... |
func Request(method string, url url.URL, headers map[string]string) ([]byte, error) {
// Custom request
req, err := http.NewRequest(method, url.String(), strings.NewReader("q=test&b="))
if err != nil {
return nil, err
}
// Custom headers
for key, val := range headers {
req.Header.Add(key, val)
}
// Makes ... | [
-0.6656253337860107,
-0.057688865810632706,
0.7705309391021729,
0.11820623278617859,
-0.39823660254478455,
-0.2652222514152527,
-0.6934213042259216,
-0.29245632886886597,
-0.042055170983076096,
-0.303979754447937,
-0.22681394219398499,
0.5121894478797913,
-0.24998220801353455,
-0.393651753... |
func RequestJSON(result interface{}, url url.URL) error {
data, err := Request("GET", url, nil)
if err != nil {
return err
}
// Result parsing
if err := json.Unmarshal(data, result); err != nil {
return err
}
return nil
} | [
-1.4092543125152588,
0.12934833765029907,
0.8079707026481628,
0.40246105194091797,
-0.12343218922615051,
-0.3963738679885864,
-0.3538570702075958,
0.061363328248262405,
0.036361269652843475,
-0.045817602425813675,
-0.8924192190170288,
0.907900333404541,
-0.8253705501556396,
0.3309575319290... |
func RequestHTML(method string, url url.URL) (*goquery.Document, error) {
headers := map[string]string{
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KH... | [
-0.7009952068328857,
1.1459881067276,
0.5962048172950745,
0.7738913893699646,
-0.7226504683494568,
-0.2033507376909256,
-0.677740216255188,
0.49837684631347656,
-0.1223374605178833,
0.10256018489599228,
0.8289929628372192,
0.563139796257019,
-1.3201799392700195,
0.24762089550495148,
0.02... |
func WithQueryBcname(bcname string) QueryOption {
return func(opts *queryOption) error {
opts.bcname = bcname
return nil
}
} | [
0.8140349984169006,
-0.5327017903327942,
0.5429502129554749,
0.28289926052093506,
-0.3256740868091583,
0.18932746350765228,
0.24335956573486328,
-0.036488309502601624,
0.8567525148391724,
0.036578696221113205,
-0.7097751498222351,
-0.7511655688285828,
-0.49668189883232117,
0.25231549143791... |
func WithConfigFile(configFile string) ClientOption {
return func(opts *clientOptions) error {
opts.configFile = configFile
return nil
}
} | [
1.0079419612884521,
-0.3163735270500183,
0.32305005192756653,
-0.337568461894989,
-0.40154480934143066,
0.47565150260925293,
0.7386499643325806,
-0.1193435788154602,
-1.0959703922271729,
0.6452620029449463,
-0.9807224273681641,
-0.9623465538024902,
0.07818791270256042,
0.556134819984436,
... |
func WithGrpcTLS(serverName, cacertFile, certFile, keyFile string) ClientOption {
return func(opts *clientOptions) error {
if opts.grpcTLS == nil {
opts.grpcTLS = new(grpcTLSConfig)
}
opts.grpcTLS.serverName = serverName
opts.grpcTLS.cacertFile = cacertFile
opts.grpcTLS.certFile = certFile
opts.grpcTLS.... | [
0.5258058905601501,
0.22101731598377228,
0.7053511738777161,
-0.38248276710510254,
-0.7711371779441833,
0.6764990091323853,
0.006496630609035492,
-0.91682368516922,
-0.5591351985931396,
0.49441561102867126,
0.027073724195361137,
-0.3003799319267273,
-0.4206961393356323,
0.24267169833183289... |
func WithFeeFromAccount() RequestOption {
return func(opts *requestOptions) error {
opts.onlyFeeFromAccount = true
return nil
}
} | [
1.2879769802093506,
0.3609714210033417,
0.362758994102478,
0.7815501093864441,
0.35071200132369995,
-0.8825107216835022,
0.7493547201156616,
-0.2938464879989624,
1.0617339611053467,
-0.6864532828330994,
0.4712294936180115,
0.4046330749988556,
0.33358508348464966,
0.5453696250915527,
0.49... |
func WithBcname(name string) RequestOption {
return func(opts *requestOptions) error {
if name == "" {
return errors.New("invalid bcname")
}
opts.bcname = name
return nil
}
} | [
0.7127630114555359,
-0.15012072026729584,
0.8161194324493408,
0.39100122451782227,
-0.1847577542066574,
-0.6103601455688477,
-0.3607846200466156,
-0.0366637147963047,
0.5991427898406982,
0.15136435627937317,
-0.4377517104148865,
-0.7105715870857239,
-0.7976806163787842,
-0.0392888970673084... |
func WithContractInvokeAmount(amount string) RequestOption {
return func(opts *requestOptions) error {
opts.contractInvokeAmount = amount
return nil
}
} | [
0.32131218910217285,
-0.43540894985198975,
0.5634649991989136,
-0.21496687829494476,
-0.08320888131856918,
-0.08257942646741867,
-0.3082624077796936,
-0.12651807069778442,
0.5101481676101685,
-0.8181754946708679,
0.14337456226348877,
-0.8959657549858093,
0.6171938180923462,
0.1034628301858... |
func WithDesc(desc string) RequestOption {
return func(opts *requestOptions) error {
opts.desc = desc
return nil
}
} | [
0.7251580953598022,
0.03697582706809044,
0.6256154179573059,
0.4687049984931946,
0.01671517826616764,
0.0382654033601284,
-0.09369701147079468,
-0.23903623223304749,
0.7697586417198181,
-1.2437705993652344,
0.3996187448501587,
0.20287024974822998,
1.0790719985961914,
-0.24790044128894806,
... |
func WithNotPost() RequestOption {
return func(opts *requestOptions) error {
opts.notPost = true
return nil
}
} | [
-0.05636270344257355,
-0.036019548773765564,
0.6125630140304565,
0.7978425621986389,
0.3432025611400604,
0.1567101627588272,
-0.7283909916877747,
-0.7162068486213684,
0.20176835358142853,
-0.37102606892585754,
0.2495541125535965,
-0.5786667466163635,
0.031330741941928864,
0.307137072086334... |
func WithOtherAuthRequires(authRequires []string) RequestOption {
return func(opts *requestOptions) error {
opts.otherAuthRequire = authRequires
return nil
}
} | [
-0.6341573596000671,
-0.6596677303314209,
0.8123669028282166,
-0.18021972477436066,
0.28150200843811035,
-0.17460863292217255,
-0.3861621618270874,
-0.9165080189704895,
1.059105396270752,
-0.11274567246437073,
-0.3462779223918915,
-0.5276745557785034,
-0.127752423286438,
0.3747831284999847... |
func NewAllowEventsParser(allowEvents string) *AllowEventsParser {
this := &AllowEventsParser{}
this.HeaderParser.super(allowEvents)
return this
} | [
0.7950632572174072,
-0.5496659874916077,
0.46078237891197205,
-0.2308524250984192,
-1.7411882877349854,
0.2858826220035553,
0.0032988835591822863,
0.3166784942150116,
1.1172188520431519,
0.22432342171669006,
-0.1974814385175705,
0.06290117651224136,
-1.5708391666412354,
-0.6786458492279053... |
func (this *AllowEventsParser) Parse() (sh header.Header, ParseException error) {
allowEventsList := header.NewAllowEventsList()
var ch byte
lexer := this.GetLexer()
this.HeaderName(TokenTypes_ALLOW_EVENTS)
allowEvents := header.NewAllowEvents()
allowEvents.SetHeaderName(core.SIPHeaderNames_ALLOW_EVENTS)
lex... | [
0.5497862696647644,
-0.43291568756103516,
0.963906466960907,
-0.09454397857189178,
-0.8857265710830688,
-0.3696502149105072,
-0.6821088790893555,
0.2100050151348114,
0.449769526720047,
0.5411107540130615,
-0.1317412257194519,
-0.2642197012901306,
-0.8566945791244507,
-0.2182265669107437,
... |
func Version() string {
return "0.4.0"
} | [
-0.09151528775691986,
-1.2110176086425781,
0.23443379998207092,
0.656901478767395,
0.44072386622428894,
0.7809311151504517,
0.48223796486854553,
-0.0024816058576107025,
-0.8388511538505554,
0.1522311419248581,
-0.8833931088447571,
-1.036624550819397,
-0.48254451155662537,
0.637235462665557... |
func (t *Transport) Close() error {
if t.exitChan != nil {
t.exitChan <- 1
<-t.exitChan
}
return nil
} | [
-0.7368531227111816,
0.21365666389465332,
0.5781539678573608,
-0.6648856401443481,
0.06828539073467255,
0.6818081736564636,
-0.06979432702064514,
-0.5246595144271851,
-0.9750840067863464,
-0.22284293174743652,
-0.9825901389122009,
-0.014486171305179596,
-1.0358867645263672,
0.7926139235496... |
func (player *Player) Raise() {
player.obj.Call("org.mpris.MediaPlayer2.Raise", 0)
} | [
-0.8105677962303162,
-0.40753352642059326,
0.6494942307472229,
0.19201606512069702,
0.34415408968925476,
-0.6118156313896179,
0.15160231292247772,
0.1380479484796524,
-0.4567769169807434,
0.42589160799980164,
0.12368904054164886,
1.0580110549926758,
-1.422575831413269,
0.9257638454437256,
... |
func (player *Player) Quit() {
player.obj.Call("org.mpris.MediaPlayer2.Quit", 0)
} | [
-0.9449629783630371,
-0.8761559128761292,
0.4777897596359253,
-0.041977860033512115,
0.1061311736702919,
0.46581247448921204,
0.7510479092597961,
-0.6757029294967651,
-0.6250632405281067,
0.26145002245903015,
-0.18987034261226654,
0.9848435521125793,
-0.8908904194831848,
0.3168594539165497... |
func (player *Player) Next() {
player.obj.Call("org.mpris.MediaPlayer2.Player.Next", 0)
} | [
-0.9602034687995911,
-0.5278094410896301,
0.3991774916648865,
0.6901695728302002,
-0.6408928632736206,
0.058452460914850235,
0.38267576694488525,
-0.3547604978084564,
0.3428633511066437,
-0.3696098029613495,
0.008019286207854748,
1.3365379571914673,
-0.7485442757606506,
0.4764792025089264,... |
func (player *Player) Previous() {
player.obj.Call("org.mpris.MediaPlayer2.Player.Previous", 0)
} | [
-0.1729799509048462,
0.05051938444375992,
0.9291585087776184,
0.008609259501099586,
0.7190940976142883,
-0.6043299436569214,
1.3083492517471313,
-0.6417089104652405,
0.056201837956905365,
0.01734442450106144,
-0.646669328212738,
0.19777721166610718,
-0.6904067397117615,
0.2892622947692871,... |
func (player *Player) PlayPause() {
player.obj.Call("org.mpris.MediaPlayer2.Player.PlayPause", 0)
} | [
-0.39589768648147583,
-0.717070996761322,
0.6729267835617065,
0.4533159136772156,
0.8343851566314697,
-0.6489331126213074,
0.2853339910507202,
-0.29159918427467346,
0.5792474150657654,
-0.10232450813055038,
0.5296096801757812,
0.29031044244766235,
-1.275903582572937,
-0.4043765366077423,
... |
func (player *Player) Play() {
player.obj.Call("org.mpris.MediaPlayer2.Player.Play", 0)
} | [
-0.5054193735122681,
-0.5264965891838074,
0.3973374366760254,
0.4212404191493988,
0.45930245518684387,
-0.0035152211785316467,
0.41219860315322876,
0.035867299884557724,
-0.19212688505649567,
-0.1294267475605011,
0.4716472327709198,
0.18838168680667877,
-0.6727438569068909,
0.0913027748465... |
func (player *Player) Seek(offset uint32) {
player.obj.Call("org.mpris.MediaPlayer2.Player.Seek", 0, offset)
} | [
-0.9080867171287537,
-0.34592077136039734,
0.5462018251419067,
-1.0027437210083008,
-0.021772412583231926,
1.0978398323059082,
0.43336769938468933,
-0.70943683385849,
0.11097638309001923,
-0.8089442849159241,
-0.5277224779129028,
1.274532437324524,
-0.38087889552116394,
-0.1148207709193229... |
func (c *ULBClient) NewCreatePolicyRequest() *CreatePolicyRequest {
cfg := c.client.GetConfig()
return &CreatePolicyRequest{
CommonBase: request.CommonBase{
Region: cfg.Region,
ProjectId: cfg.ProjectId,
},
}
} | [
-0.04153090715408325,
-0.2098933607339859,
0.43568214774131775,
0.03340239077806473,
-0.06290964037179947,
0.10742130875587463,
-0.335787832736969,
-0.18848916888237,
-0.2689359188079834,
0.27264994382858276,
0.19952264428138733,
0.13785386085510254,
-0.686640739440918,
0.4464332163333893,... |
func WithToken(token string) {
cfg.token = token
cfg.Password = ""
cfg.UserName = ""
} | [
-0.37124717235565186,
-0.1829247921705246,
0.29139357805252075,
-0.0831296518445015,
-0.004975074902176857,
-0.16998879611492157,
0.22738666832447052,
1.0181161165237427,
-0.7242003679275513,
-0.6324806213378906,
-1.6144754886627197,
0.02256278693675995,
0.3748179078102112,
0.1400566250085... |
func WithEndpoint(endpoint string) {
cfg.endpoint = strings.TrimRight(endpoint, "/")
} | [
0.7438246607780457,
-0.42870867252349854,
0.48842546343803406,
0.22731409966945648,
0.03949882090091705,
0.30942854285240173,
-0.09571540355682373,
0.4638855457305908,
-0.1839362531900406,
0.07770296186208725,
-0.06884392350912094,
-0.6970980167388916,
-0.21420098841190338,
0.2252640873193... |
func (c *Client) NewRestRequest(ctx context.Context, method, urlPath string, data map[string]string, jsonParams map[string]string) (*http.Request, error) {
return NewRestRequest(c, ctx, method, urlPath, data, jsonParams)
} | [
-0.5369829535484314,
-0.3009491562843323,
0.5503780841827393,
-0.13250844180583954,
-0.5645960569381714,
-0.7335656881332397,
-0.9274651408195496,
-0.30918246507644653,
-0.4694575369358063,
-0.2369108647108078,
-0.2596277892589569,
1.302262783050537,
-0.31611016392707825,
-0.02805443853139... |
func (c *Client) NewRequest(ctx context.Context, method, urlPath string, data interface{}) (*http.Request, error) {
return NewRequest(c, ctx, method, urlPath, data)
} | [
-0.1807256042957306,
0.394957035779953,
0.3963516652584076,
0.5629557371139526,
-0.3027305603027344,
0.05746472254395485,
-0.6677168607711792,
-0.4744449555873871,
0.4291384816169739,
-0.547881543636322,
0.354628324508667,
1.0857560634613037,
0.10309741646051407,
-0.6519536972045898,
0.0... |
func (c Client) Do(r *http.Request, v interface{}) (*http.Response, error) {
resp, err := c.httpClient.Do(r)
if err != nil {
return nil, err
}
body, err := reader(resp.Body)
if err != nil {
resp.Body.Close()
return resp, err
}
resp.Body.Close()
resp.Body = io.NopCloser(bytes.NewReader(body))
if resp.St... | [
-0.08346497267484665,
-0.20427259802818298,
1.0510343313217163,
-0.08577558398246765,
-0.43930914998054504,
-0.16543492674827576,
0.08720270544290543,
-0.8769802451133728,
0.5568180680274963,
0.5848324298858643,
-0.011748068034648895,
0.1870637983083725,
-0.6488202214241028,
0.086675487458... |
func newAPI(cfg *ClientConfig, options ...ClientOption) *Client {
client := &Client{
Config: cfg,
httpClient: &http.Client{},
}
for _, option := range options {
option(client)
}
return client
} | [
0.3251781761646271,
-0.5528897047042847,
0.18111778795719147,
0.7319048643112183,
-0.577788770198822,
0.5160513520240784,
0.06224172189831734,
-0.5573592782020569,
-0.5870054960250854,
0.5858525633811951,
-0.21673551201820374,
-0.11803378164768219,
-0.15100501477718353,
-0.6911771297454834... |
func GetLines(file *os.File, n int) ([]string, error) {
var lines []string
var part []byte
var prefix bool
var err error
reader := bufio.NewReader(file)
buffer := new(bytes.Buffer)
for n != len(lines) || n == 0 {
if part, prefix, err = reader.ReadLine(); err != nil {
return lines, err
}
buffer.Write(par... | [
0.3090616762638092,
-0.16629363596439362,
0.6115003228187561,
0.17655055224895477,
0.4584611654281616,
-0.11082443594932556,
-1.0444008111953735,
-0.18208874762058258,
0.07723750174045563,
0.047104090452194214,
0.5777987837791443,
-0.15057025849819183,
-0.148626446723938,
0.677728176116943... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.