text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func PathStr(path uint64) string {
treeHeight := PathHeight(path)
l := PathLen(path)
if l == 0 {
return ""
}
return fmt.Sprintf("%0[1]*[2]b", l, path>>uint(32+treeHeight-l))
} | [
-0.17376276850700378,
0.29361310601234436,
0.4739898145198822,
0.28835102915763855,
-0.5244672894477844,
0.20510520040988922,
0.3672639727592468,
-0.886850118637085,
-0.3149228096008301,
-0.07769681513309479,
0.13257935643196106,
-0.5880556702613831,
-0.9291006326675415,
-0.151375830173492... |
func main() {
v := &Vertex{3, 4}
fmt.Println(v.Abs())
f := MyFloat(-math.Sqrt2)
fmt.Println(f.Abs())
} | [
0.4947199821472168,
-0.5563296675682068,
0.4920102655887604,
0.624457597732544,
-0.4561704695224762,
0.4404136538505554,
0.16999034583568573,
0.06584163010120392,
-0.6782743334770203,
-0.49191322922706604,
0.021462813019752502,
1.1855612993240356,
-0.10746750980615616,
-0.00807624775916338... |
func UUIDKeyFunc(source io.Reader, encoding *base64.Encoding) KeyFunc {
if source == nil {
source = rand.Reader
}
if encoding == nil {
encoding = base64.RawURLEncoding
}
return func(ID, Convey, *http.Request) (Key, error) {
raw := make([]byte, 16)
if _, err := source.Read(raw); err != nil {
return inv... | [
-0.42520472407341003,
-0.4414152503013611,
0.4260809123516083,
-0.3826524317264557,
-1.171935796737671,
-0.6182670593261719,
0.3689761161804199,
0.8854835629463196,
0.12174414843320847,
0.4673321545124054,
0.05501214787364006,
-0.11808952689170837,
0.057041462510824203,
-0.6289634108543396... |
func (s *Sender) connect() net.Conn {
baseGap := 500 * time.Millisecond
for {
conn, err := net.Dial("tcp", s.addr)
if err != nil {
log.Print(err)
time.Sleep(baseGap)
baseGap *= 2
if baseGap > time.Second*30 {
baseGap = time.Second * 30
}
continue
}
debugInfo(fmt.Sprintf("local addr:%s\n"... | [
-0.08897685259580612,
-0.35432639718055725,
0.4817313253879547,
-0.002169311512261629,
-0.511741042137146,
0.10173296928405762,
0.3676387667655945,
-0.161305770277977,
-0.12850843369960785,
0.37421950697898865,
0.5237410068511963,
0.17968173325061798,
0.3134704828262329,
1.2306190729141235... |
func (s *Sender) reConnect(conn net.Conn) *bufio.Writer {
conn.Close()
conn = s.connect()
w := bufio.NewWriter(conn)
return w
} | [
0.1806108057498932,
-0.45788565278053284,
0.325492799282074,
0.2304527461528778,
-0.21279388666152954,
-1.0173453092575073,
0.4062810242176056,
0.14681631326675415,
-0.9401929974555969,
-0.35102900862693787,
-0.7653559446334839,
-0.23350314795970917,
0.011472728103399277,
-0.69081860780715... |
func NewPool(exiftool string, num int, flags ...string) (*Pool, error) {
p := &Pool{
stayopens: make([]*Stayopen, num, num),
l: num,
}
var err error
for i := 0; i < num; i++ {
p.stayopens[i], err = NewStayOpen(exiftool, flags...)
if err != nil {
return nil, errors.Wrap(err, "Could not create Sta... | [
-0.49482837319374084,
0.6343342661857605,
0.640536367893219,
1.3973388671875,
-0.049221400171518326,
0.6117634773254395,
0.9996486306190491,
-0.630539059638977,
-0.2690599858760834,
-0.21251389384269714,
-0.5896120667457581,
-0.09444217383861542,
0.022735780104994774,
-0.4038410782814026,
... |
func ExampleDatasetsClient_NewListByFactoryPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdatafactory.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
l... | [
0.37420645356178284,
0.005329101346433163,
0.3371860980987549,
-0.6757696866989136,
-0.341293603181839,
-0.7520421147346497,
-0.09377157688140869,
-0.12983308732509613,
0.13116949796676636,
-0.3057784140110016,
-0.09078140556812286,
0.6616754531860352,
0.865628182888031,
0.4606906175613403... |
func ExampleDatasetsClient_CreateOrUpdate_datasetsCreate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdatafactory.NewClientFactory("<subscription-id>", cred, nil)
if err != n... | [
0.34665122628211975,
-0.2691609561443329,
0.6155287027359009,
-1.0806251764297485,
-0.23062802851200104,
-0.029327932745218277,
-0.38801509141921997,
0.05445873737335205,
-0.29172828793525696,
-0.5387299656867981,
-0.21122004091739655,
0.6620616912841797,
-0.18021836876869202,
-0.325112938... |
func ExampleDatasetsClient_CreateOrUpdate_datasetsUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdatafactory.NewClientFactory("<subscription-id>", cred, nil)
if err != n... | [
0.2287578582763672,
-0.48508691787719727,
0.6807661652565002,
-1.3453675508499146,
-0.49724113941192627,
0.13236401975154877,
-0.5178270936012268,
0.363979697227478,
-0.19266842305660248,
-0.46706557273864746,
-0.33361321687698364,
1.0030697584152222,
-0.30272817611694336,
-0.2568592131137... |
func ExampleDatasetsClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdatafactory.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed ... | [
0.6523691415786743,
0.08948805928230286,
0.5460662841796875,
-0.7900633811950684,
-0.3054635524749756,
-0.6559264063835144,
-0.37021833658218384,
-0.05211707204580307,
-0.4147479236125946,
-0.4229426085948944,
-0.01773127168416977,
1.3604586124420166,
0.2027486264705658,
-0.695938110351562... |
func ExampleDatasetsClient_Delete() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdatafactory.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("fail... | [
0.8627227544784546,
0.4924417734146118,
0.2659457325935364,
-0.882500410079956,
-0.5074014663696289,
-0.4095349907875061,
0.29534515738487244,
0.09486470371484756,
-0.21067097783088684,
0.06284664571285248,
0.44273248314857483,
1.3587353229522705,
0.013591602444648743,
-0.5388714671134949,... |
func NewActionRunStatsInputProperties() *ActionRunStatsInputProperties {
this := ActionRunStatsInputProperties{}
return &this
} | [
0.33137246966362,
-0.8622046709060669,
0.07318662106990814,
0.28535202145576477,
-0.5117691159248352,
1.1231718063354492,
0.9548526406288147,
-0.10199598968029022,
-0.1358799785375595,
-0.4826398491859436,
0.41116777062416077,
0.31516027450561523,
0.11273203790187836,
-0.4106218218803406,
... |
func NewActionRunStatsInputPropertiesWithDefaults() *ActionRunStatsInputProperties {
this := ActionRunStatsInputProperties{}
return &this
} | [
0.5995437502861023,
-0.0303731057792902,
0.18524719774723053,
0.15349403023719788,
0.6149915456771851,
0.6181703209877014,
-0.18837250769138336,
-0.1405692994594574,
-0.08490581065416336,
-0.6330324411392212,
0.005612968001514673,
-0.800409734249115,
0.13027934730052948,
-0.424015820026397... |
func (o *ActionRunStatsInputProperties) GetInterval() ActionRunStatsInputPropertiesInterval {
if o == nil || o.Interval == nil {
var ret ActionRunStatsInputPropertiesInterval
return ret
}
return *o.Interval
} | [
0.06943083554506302,
0.0017945051658898592,
0.3747430145740509,
0.8928247094154358,
0.06798304617404938,
0.300605446100235,
0.8704102039337158,
0.042678769677877426,
-0.02773274853825569,
-1.445238709449768,
0.6619446873664856,
-0.9108569622039795,
-1.2160663604736328,
0.14801301062107086,... |
func (o *ActionRunStatsInputProperties) GetIntervalOk() (*ActionRunStatsInputPropertiesInterval, bool) {
if o == nil || o.Interval == nil {
return nil, false
}
return o.Interval, true
} | [
-0.060439568012952805,
-0.5317398309707642,
0.4620423913002014,
0.8350544571876526,
0.2100745141506195,
0.2959080934524536,
0.7977449297904968,
1.0028131008148193,
-0.629850447177887,
0.10740715265274048,
-0.6546351313591003,
-0.3477730453014374,
-1.0140107870101929,
-0.7005915641784668,
... |
func (o *ActionRunStatsInputProperties) HasInterval() bool {
if o != nil && o.Interval != nil {
return true
}
return false
} | [
0.44785624742507935,
0.08318497240543365,
0.11582520604133606,
0.6876517534255981,
0.7046421766281128,
-0.04476970434188843,
0.2721925377845764,
0.8801862597465515,
-0.6919491291046143,
-1.0248851776123047,
-0.4461152255535126,
-1.1785502433776855,
-1.0930637121200562,
-0.08490323275327682... |
func (o *ActionRunStatsInputProperties) SetInterval(v ActionRunStatsInputPropertiesInterval) {
o.Interval = &v
} | [
0.5990990996360779,
-0.41075751185417175,
0.06017082929611206,
0.5340810418128967,
-0.26186108589172363,
0.8577443361282349,
0.15093712508678436,
-0.5852416753768921,
-0.9836442470550537,
-1.1326018571853638,
1.1500537395477295,
0.13176006078720093,
-0.0952400267124176,
-0.7076049447059631... |
func LaunchWorkers(wg *sync.WaitGroup, stop <-chan bool) {
// we need to recreate the dlChan and the segChan in case we want to restart workers.
DlChan = make(chan *WJob)
segChan = make(chan *WJob)
audioChan = make(chan *WJob)
// the master worker downloads one full m3u8 at a time but
// segments are downloaded c... | [
-0.4370732009410858,
-0.03336036205291748,
0.7433199286460876,
-0.5639201402664185,
-0.143024742603302,
-0.3973574936389923,
-0.4105367660522461,
0.614380955696106,
0.4103447198867798,
-0.01874738745391369,
-0.40472283959388733,
0.20261205732822418,
-0.864483118057251,
0.3008640706539154,
... |
func (w *Worker) downloadM3u8Segment(j *WJob) {
defer func() {
if j.wg != nil {
j.wg.Done()
}
}()
Logger.Printf("[%d] - %s - segment file %d\n", w.id, j.Filename, j.Pos)
resp, err := w.client.Get(j.URL)
if err != nil {
Logger.Println("Failed to download ", j.URL)
return
}
defer resp.Body.Close()
if... | [
-0.45311471819877625,
0.0821717232465744,
0.7487851977348328,
-0.37851861119270325,
0.30662012100219727,
0.043317679315805435,
0.19775792956352234,
-0.07883083820343018,
-0.2419174611568451,
0.9967939257621765,
-0.4872424304485321,
-0.21630734205245972,
-0.9067880511283875,
-0.375127881765... |
func (s *scene) run(ctx context.Context, r *sdl.Renderer) chan error {
errc := make(chan error)
go func() {
defer close(errc)
for range time.Tick(10 * time.Millisecond) {
select {
case <-ctx.Done():
return
default:
if err := s.paint(r); err != nil {
errc <- err
}
}
}
}()
return er... | [
-0.47607147693634033,
0.13039234280586243,
0.7573956251144409,
-0.8125015497207642,
0.009614208713173866,
0.4240468442440033,
0.5969281196594238,
-0.5409504771232605,
0.3610362410545349,
-0.11780228465795517,
-0.37205424904823303,
0.0658087208867073,
-0.9770376086235046,
0.6324219107627869... |
func NewDatetimepicker(elem dom.Element, options Options) Datetimepicker {
if js.Global.Get("jQuery") == js.Undefined {
js.Global.Call("alert", "jQuery is required to use the datetimepicker.")
return Datetimepicker{}
}
dtp := Datetimepicker{}
dtp.dtp = js.Global.Call("jQuery", elem)
if dtp.dtp.Get("datetimepic... | [
-0.9431613683700562,
-0.08528678864240646,
0.7840383052825928,
0.8206403851509094,
-0.7988067865371704,
-0.29966500401496887,
-0.2790660858154297,
-0.45029860734939575,
0.29463377594947815,
0.42649543285369873,
-0.20487993955612183,
-0.4317321479320526,
-0.1274050921201706,
0.7565208673477... |
func (dtp *Datetimepicker) GetDate() time.Time {
currentDate := dtp.dtp.Call("data", "DateTimePicker").Call("date")
if currentDate == nil {
return time.Time{}
}
return currentDate.Call("toDate").Interface().(time.Time)
} | [
-0.2585441768169403,
0.5694778561592102,
0.8186342716217041,
0.9399539828300476,
0.19294321537017822,
0.2608411908149719,
-0.15616615116596222,
-0.34660473465919495,
-0.05114712938666344,
0.2782096266746521,
0.12990334630012512,
-0.4792487919330597,
-0.7617788910865784,
0.9270983934402466,... |
func (dtp *Datetimepicker) SetDate(date string) {
dtp.dtp.Call("data", "DateTimePicker").Call("date", date)
} | [
-0.6881536841392517,
0.5716672539710999,
0.21529355645179749,
0.29769155383110046,
-0.18137158453464508,
0.9998717308044434,
-0.6639984250068665,
-0.11624288558959961,
0.16893085837364197,
-0.12166639417409897,
-1.3540465831756592,
0.4321313798427582,
-0.05359683930873871,
0.61105662584304... |
func (dtp *Datetimepicker) ClearDate() {
dtp.dtp.Call("data", "DateTimePicker").Call("date", nil)
} | [
-0.20951801538467407,
1.1043217182159424,
0.4336319863796234,
0.34437990188598633,
-0.1353123039007187,
1.3014448881149292,
-0.6585614085197449,
-0.6913098692893982,
0.1869204193353653,
0.2819254398345947,
-0.15449872612953186,
0.5510601997375488,
0.017351917922496796,
0.2798391878604889,
... |
func (dtp *Datetimepicker) Subscribe(subscription chan time.Time) {
dtp.dtp.Call("on", "dp.change", func(e *js.Object) {
newDate := e.Get("date")
if !newDate.Bool() {
subscription <- time.Time{}
return
}
subscription <- newDate.Call("toDate").Interface().(time.Time)
})
} | [
-0.703229546546936,
0.3487168550491333,
0.7571091055870056,
0.40588247776031494,
-0.21201741695404053,
0.19699984788894653,
-0.7223154902458191,
-0.5955672860145569,
-0.010921954177320004,
0.5408342480659485,
-0.8150047659873962,
0.46439582109451294,
0.3468717038631439,
0.5085221529006958,... |
func (d *Dao) GetUsernameAndRole(ctx context.Context, uids []int64) (list map[int64]*model.UserRole, err error) {
var (
rows *sql.Rows
)
list = map[int64]*model.UserRole{}
uidStr := xstr.JoinInts(uids)
if rows, err = d.mngDB.Query(ctx, fmt.Sprintf(_usernameRoleSQL, uidStr)); err != nil {
PromeErr("mngdb: query... | [
-0.6016239523887634,
-0.12872955203056335,
0.40234291553497314,
-0.8115140795707703,
-0.7055748105049133,
-0.3417019844055176,
-0.6677752733230591,
-0.06856769323348999,
0.31562134623527527,
0.37589147686958313,
0.21850495040416718,
0.08693934977054596,
-0.22849249839782715,
1.056050181388... |
func (d *Dao) GetUsernameAndDepartment(ctx context.Context, uids []int64) (list map[int64]*model.UserDepart, err error) {
var (
rows *sql.Rows
)
list = map[int64]*model.UserDepart{}
uidStr := xstr.JoinInts(uids)
if rows, err = d.mngDB.Query(ctx, fmt.Sprintf(_usernameDepartmentSQL, uidStr)); err != nil {
PromeE... | [
-0.7587891817092896,
-0.4586142897605896,
0.25585809350013733,
-0.5943835973739624,
-0.9833928942680359,
-0.13468965888023376,
-0.19238542020320892,
-0.07508641481399536,
0.9041844010353088,
-0.12723620235919952,
0.45587432384490967,
-0.04903046786785126,
0.23188908398151398,
1.17670571804... |
func getConfig(cfgFile string, pCfg *ContivConfig) error {
bytes, err := ioutil.ReadFile(cfgFile)
if err != nil {
return err
}
pCfg.SvcSubnet = defSvcSubnet
err = json.Unmarshal(bytes, pCfg)
if err != nil {
return fmt.Errorf("Error parsing config file: %s", err)
}
return nil
} | [
0.6684428453445435,
0.5947931408882141,
0.6473886370658875,
0.5858064889907837,
0.07456465065479279,
0.16213558614253998,
-0.5946839451789856,
0.7890114188194275,
-1.0659146308898926,
0.33103588223457336,
-0.04647037014365196,
0.003194078803062439,
0.031674325466156006,
0.12262562662363052... |
func setUpAPIClient() *APIClient {
// Read config
err := getConfig(contivKubeCfgFile, &contivK8Config)
if err != nil {
log.Errorf("Failed: %v", err)
return nil
}
return NewAPIClient(contivK8Config.K8sAPIServer, contivK8Config.K8sCa,
contivK8Config.K8sKey, contivK8Config.K8sCert)
} | [
-0.0035816014278680086,
-1.2151907682418823,
0.5028877258300781,
-0.028877628967165947,
-0.45120465755462646,
-0.2551358938217163,
0.055078763514757156,
0.1664409637451172,
-0.1332753747701645,
0.7852493524551392,
0.16135412454605103,
-0.09637058526277542,
-0.7923522591590881,
-0.767918109... |
func makeHTTPHandler(handlerFunc restAPIFunc) http.HandlerFunc {
// Create a closure and return an anonymous function
return func(w http.ResponseWriter, r *http.Request) {
// Call the handler
resp, err := handlerFunc(r)
if err != nil {
// Log error
log.Errorf("Handler for %s %s returned error: %s", r.Meth... | [
0.10532242804765701,
-0.8189457058906555,
1.0108169317245483,
-0.07919266074895859,
-1.0336382389068604,
0.3594774305820465,
0.44103536009788513,
-0.1710105836391449,
-0.2714541554450989,
0.08517630398273468,
-0.13078919053077698,
-0.19808661937713623,
-0.16630953550338745,
-0.396681308746... |
func InitKubServiceWatch(np *plugin.NetPlugin) {
watchClient := setUpAPIClient()
if watchClient == nil {
log.Fatalf("Could not init kubernetes API client")
}
svcCh := make(chan SvcWatchResp, 1)
epCh := make(chan EpWatchResp, 1)
go func() {
for {
select {
case svcEvent := <-svcCh:
switch svcEvent.o... | [
0.7528236508369446,
-0.2518256902694702,
0.8143005967140198,
-0.22847788035869598,
0.0023753736168146133,
0.41893434524536133,
0.2937716841697693,
-0.4307062327861786,
0.33034420013427734,
-0.31017276644706726,
0.5547122955322266,
0.32017722725868225,
-0.21698474884033203,
0.55599349737167... |
func InitCNIServer(netplugin *plugin.NetPlugin) error {
netPlugin = netplugin
hostname, err := os.Hostname()
if err != nil {
log.Fatalf("Could not retrieve hostname: %v", err)
}
pluginHost = hostname
// Set up the api client instance
kubeAPIClient = setUpAPIClient()
if kubeAPIClient == nil {
log.Fatalf("... | [
0.017057379707694054,
-0.11368744820356369,
0.7864246368408203,
0.060763951390981674,
0.565520703792572,
-0.0920163169503212,
-0.2634076476097107,
-0.09005782008171082,
-0.025965649634599686,
-0.13860219717025757,
-0.6772229075431824,
0.3513124883174896,
-0.24279969930648804,
0.39372861385... |
func unknownAction(w http.ResponseWriter, r *http.Request) {
log.Infof("Unknown networkdriver action at %q", r.URL.Path)
content, _ := ioutil.ReadAll(r.Body)
log.Infof("Body content: %s", string(content))
w.WriteHeader(503)
} | [
-0.6009608507156372,
-1.242627739906311,
0.39651697874069214,
-0.49034374952316284,
0.32855749130249023,
0.36501482129096985,
0.22853364050388336,
-0.549019992351532,
0.13157440721988678,
0.3800165355205536,
-0.05152668058872223,
0.11760213971138,
-0.3097817897796631,
0.3897438049316406,
... |
func Update() {
if len(os.Args) >= inputArgsLength {
storageNamespace = os.Args[1]
} else {
storageNamespace = HUAWEINamespace
}
initInstallerLogging()
processInstallationArguments()
update()
} | [
-0.11653664708137512,
-0.2789655923843384,
0.35061201453208923,
0.7986229658126831,
0.034908477216959,
0.22269152104854584,
0.22310751676559448,
-0.49906522035598755,
-0.24400001764297485,
0.08569030463695526,
0.12218295782804489,
-0.24054835736751556,
-0.8255150318145752,
1.09377169609069... |
func InitDiagnosticsAndRecover(cfg DiagnosticsConfig) func() {
grpc.EnableTracing = true
// Package "net/http/pprof" serves /debug/pprof/.
// Package "expvar" serves /debug/vars
// Serve a liveness check at /debug/ready.
http.HandleFunc("/debug/ready", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHead... | [
-0.30550530552864075,
-0.038833700120449066,
0.8609510064125061,
0.16833029687404633,
-0.3498125970363617,
0.37806323170661926,
0.4282519817352295,
0.17102065682411194,
0.3235366642475128,
-0.5621896386146545,
-0.5446678400039673,
-0.03697492182254791,
0.06834445893764496,
0.22776138782501... |
func Must(err error, msg string, extra ...interface{}) {
if err == nil {
return
}
var f = log.Fields{"err": err}
for i := 0; i+1 < len(extra); i += 2 {
f[extra[i].(string)] = extra[i+1]
}
writeExitMessage(err)
log.WithFields(f).Fatal(msg)
} | [
-0.8686420917510986,
0.34114018082618713,
0.556052029132843,
-0.2308250367641449,
-0.21981990337371826,
0.6247259974479675,
-0.7812077403068542,
0.5933259725570679,
-0.12281841784715652,
0.01967107690870762,
-0.3884066939353943,
0.8656105995178223,
0.04400651529431343,
0.6472446322441101,
... |
func GetTxCmd() *cobra.Command {
cmd := &cobra.Command{
Use: types.ModuleName,
Short: fmt.Sprintf("%s transactions subcommands", types.ModuleName),
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
... | [
1.1795642375946045,
0.3386560380458832,
0.7266640663146973,
-0.5283287167549133,
0.44390779733657837,
-0.2894648611545563,
0.19712276756763458,
0.06896428018808365,
-0.07103735208511353,
-0.34047648310661316,
-0.4391058087348938,
0.5820478796958923,
-0.5835617184638977,
-0.4211431741714477... |
func NewLockTokensCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "lock-tokens",
Short: "lock tokens into lockup pool from user account",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
... | [
0.355574369430542,
-0.2722456753253937,
0.5191861391067505,
-0.7967914342880249,
-0.4404548704624176,
0.05564773455262184,
0.07433590292930603,
-0.454321026802063,
-0.006741846911609173,
0.11765684932470322,
0.2261929214000702,
1.1744439601898193,
-0.3307184875011444,
-0.48869889974594116,... |
func NewUnlockTokensCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "unlock-tokens",
Short: "unlock tokens from lockup pool for an account",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return er... | [
0.26226526498794556,
-0.2549954652786255,
0.33027970790863037,
-0.8420505523681641,
-0.2673617899417877,
-0.4950779974460602,
0.6370095014572144,
-0.140908345580101,
0.03212955594062805,
-0.258805513381958,
0.28980112075805664,
1.1244581937789917,
-0.5233486890792847,
-0.6186984181404114,
... |
func NewUnlockByIDCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "unlock-by-id",
Short: "unlock individual period lock by ID",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
tx... | [
-0.08748176693916321,
-0.5232849717140198,
0.6358849406242371,
-0.26713788509368896,
-0.30888012051582336,
-0.14031273126602173,
0.48197850584983826,
-0.4430358111858368,
-0.23799553513526917,
-0.3108527958393097,
0.40633493661880493,
0.6978312134742737,
-0.902108907699585,
-0.490735560655... |
func NewPutTravelExpensePassengerIDParams() *PutTravelExpensePassengerIDParams {
var ()
return &PutTravelExpensePassengerIDParams{
timeout: cr.DefaultTimeout,
}
} | [
-0.6769977807998657,
-0.33572104573249817,
0.5071687698364258,
-0.12998917698860168,
-0.2505926489830017,
0.806708574295044,
0.15069915354251862,
1.1966967582702637,
-0.9288219809532166,
1.7417893409729004,
0.03851426765322685,
-0.48849382996559143,
-1.7566145658493042,
-0.7885900139808655... |
func NewPutTravelExpensePassengerIDParamsWithTimeout(timeout time.Duration) *PutTravelExpensePassengerIDParams {
var ()
return &PutTravelExpensePassengerIDParams{
timeout: timeout,
}
} | [
0.06985683739185333,
-0.24860869348049164,
0.6650804877281189,
-0.31447693705558777,
-0.3702940344810486,
1.1319228410720825,
-0.46939703822135925,
1.2258681058883667,
-0.8432237505912781,
2.361321449279785,
0.507902979850769,
-0.3479304611682892,
-1.494167447090149,
-0.5719624161720276,
... |
func NewPutTravelExpensePassengerIDParamsWithContext(ctx context.Context) *PutTravelExpensePassengerIDParams {
var ()
return &PutTravelExpensePassengerIDParams{
Context: ctx,
}
} | [
-0.5412260890007019,
-0.09131281077861786,
0.8684679865837097,
-0.6246756911277771,
-0.16055653989315033,
1.0924859046936035,
-0.3513408601284027,
0.5554087162017822,
-0.4819902777671814,
1.967488408088684,
0.3813426196575165,
-0.5982586145401001,
-1.6675443649291992,
-1.0285537242889404,
... |
func NewPutTravelExpensePassengerIDParamsWithHTTPClient(client *http.Client) *PutTravelExpensePassengerIDParams {
var ()
return &PutTravelExpensePassengerIDParams{
HTTPClient: client,
}
} | [
-0.6221901178359985,
-0.5940820574760437,
0.6835353374481201,
-0.31477123498916626,
-0.015785401687026024,
0.9310784339904785,
0.3915643095970154,
0.8247482776641846,
-0.9510685801506042,
1.2650067806243896,
0.2716571092605591,
-0.49380800127983093,
-1.3254960775375366,
-0.9987860918045044... |
func (o *PutTravelExpensePassengerIDParams) WithTimeout(timeout time.Duration) *PutTravelExpensePassengerIDParams {
o.SetTimeout(timeout)
return o
} | [
-0.35966208577156067,
0.20628878474235535,
0.4558770954608917,
-0.9430694580078125,
-0.6379380226135254,
0.6263476014137268,
-0.0041256980039179325,
0.7457740306854248,
-0.21421444416046143,
2.394807815551758,
0.4334850013256073,
-0.43014273047447205,
-0.8609619736671448,
-0.54349243640899... |
func (o *PutTravelExpensePassengerIDParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
-0.9738619327545166,
0.37729737162590027,
0.3801709711551666,
-0.9245226383209229,
-0.09073653072118759,
1.0393264293670654,
0.11980171501636505,
0.9418706297874451,
-0.7273002862930298,
2.498556137084961,
0.36847442388534546,
-0.2984117269515991,
-1.550214409828186,
-0.3057616949081421,
... |
func (o *PutTravelExpensePassengerIDParams) WithContext(ctx context.Context) *PutTravelExpensePassengerIDParams {
o.SetContext(ctx)
return o
} | [
-1.132725477218628,
0.07399337738752365,
0.5176985263824463,
-0.9486761093139648,
-0.7123430967330933,
0.6657475233078003,
-0.30472099781036377,
0.08965793997049332,
0.1772705763578415,
1.8608777523040771,
0.11757626384496689,
-0.5121376514434814,
-1.3663471937179565,
-0.9940662980079651,
... |
func (o *PutTravelExpensePassengerIDParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-1.5694081783294678,
0.2906714677810669,
0.35983726382255554,
-0.6611480712890625,
-0.1194780021905899,
0.8622891306877136,
-0.1354471892118454,
0.22345232963562012,
0.006621099077165127,
1.957562804222107,
0.035154663026332855,
-0.27478381991386414,
-1.9682918787002563,
-0.542602419853210... |
func (o *PutTravelExpensePassengerIDParams) WithHTTPClient(client *http.Client) *PutTravelExpensePassengerIDParams {
o.SetHTTPClient(client)
return o
} | [
-0.7491532564163208,
-0.8000553846359253,
0.4738663136959076,
-1.0466786623001099,
-0.45559218525886536,
0.5108357071876526,
0.40175846219062805,
0.11485785990953445,
-0.6327921152114868,
1.1670101881027222,
0.11026322096586227,
-0.4725404381752014,
-0.7686398029327393,
-1.1424360275268555... |
func (o *PutTravelExpensePassengerIDParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
-0.7741978764533997,
-0.5831567645072937,
0.38819366693496704,
-1.4530774354934692,
-0.3578980565071106,
0.3041348159313202,
0.529036283493042,
0.2279844731092453,
-0.9476437568664551,
1.367348551750183,
-0.11442975699901581,
-0.013192297890782356,
-1.4198575019836426,
-0.8972866535186768,... |
func (o *PutTravelExpensePassengerIDParams) WithBody(body *models.Passenger) *PutTravelExpensePassengerIDParams {
o.SetBody(body)
return o
} | [
-1.5082887411117554,
-0.28032422065734863,
0.511885404586792,
-0.8580639958381653,
-0.07208186388015747,
0.7914337515830994,
-0.02208845317363739,
-0.2608655095100403,
-0.021838819608092308,
1.9965733289718628,
-0.45034050941467285,
-0.956939160823822,
-1.5121819972991943,
-0.4087719917297... |
func (o *PutTravelExpensePassengerIDParams) SetBody(body *models.Passenger) {
o.Body = body
} | [
-2.00423264503479,
-0.25641754269599915,
0.33473047614097595,
-0.6472223997116089,
0.11424346268177032,
0.881359875202179,
-0.05552377179265022,
-0.09403733909130096,
-0.27755266427993774,
2.179152011871338,
-0.48904767632484436,
-0.6110840439796448,
-2.2500953674316406,
0.3388660252094269... |
func (o *PutTravelExpensePassengerIDParams) WithID(id int32) *PutTravelExpensePassengerIDParams {
o.SetID(id)
return o
} | [
-0.8758312463760376,
-0.5164050459861755,
0.6089619398117065,
-0.6374979615211487,
-0.6258293390274048,
1.2816468477249146,
0.19757744669914246,
0.3925793766975403,
0.14685818552970886,
2.0653178691864014,
-0.33861035108566284,
-0.6786244511604309,
-1.4955933094024658,
-0.4424077272415161,... |
func (o *PutTravelExpensePassengerIDParams) SetID(id int32) {
o.ID = id
} | [
-1.4534772634506226,
-0.4228267967700958,
0.5170414447784424,
-0.7466707229614258,
-0.2268141210079193,
1.5501000881195068,
0.10661201179027557,
0.34231093525886536,
-0.3003751039505005,
1.9086984395980835,
-0.17595699429512024,
-0.42635536193847656,
-2.0484676361083984,
0.0908959358930587... |
func (o *PutTravelExpensePassengerIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Body != nil {
if err := r.SetBodyParam(o.Body); err != nil {
return err
}
}
// path param id
if err := r.S... | [
-1.636977195739746,
-0.013728776946663857,
0.8955252170562744,
-1.032738447189331,
0.7751421928405762,
0.26003497838974,
0.75550776720047,
0.3529973328113556,
-0.5819165110588074,
1.5535286664962769,
0.13944457471370697,
-0.18311144411563873,
-1.118597149848938,
-0.14555257558822632,
0.7... |
func NewWatcher() *Watcher {
w := &Watcher{
Events: make(chan Event),
Errors: make(chan error),
closed: make(chan struct{}),
names: make(map[string]struct{}),
files: make(map[string]os.FileInfo),
}
return w
} | [
-0.19001761078834534,
-1.78935968875885,
0.16200390458106995,
-0.29273340106010437,
-0.8118411898612976,
0.24608342349529266,
0.14404404163360596,
-0.8347978591918945,
-0.7948469519615173,
-0.913798987865448,
-0.1724245250225067,
0.4084259569644928,
-0.20070667564868927,
1.0298618078231812... |
func (w *Watcher) Start(d time.Duration) error {
if !w.running.CompareAndSwap(0, 1) {
return ErrWatcherStarted
}
select {
case <-w.closed:
return ErrWatcherClosed
default:
}
w.wg.Add(1)
go func() {
defer w.wg.Done()
w.doWatch(d)
}()
return nil
} | [
-0.9113035202026367,
0.7872803211212158,
0.5032967925071716,
0.5963968634605408,
0.3052007853984833,
0.4011891782283783,
0.5520274043083191,
-0.0868493989109993,
-0.8341088891029358,
-0.20200000703334808,
-0.09305177628993988,
1.3184210062026978,
-0.16615937650203705,
1.163549780845642,
... |
func (w *Watcher) Close() {
if !w.running.CompareAndSwap(1, 0) {
return
}
close(w.closed)
w.wg.Wait()
close(w.Events)
close(w.Errors)
w.mu.Lock()
w.names = make(map[string]struct{})
w.files = make(map[string]os.FileInfo)
w.mu.Unlock()
} | [
-0.6039369702339172,
-0.7086998224258423,
0.35485580563545227,
-0.04824889823794365,
-0.47180798649787903,
0.5523669123649597,
0.7956725358963013,
-1.0633366107940674,
-1.473520278930664,
-0.6169569492340088,
0.21186524629592896,
0.12071545422077179,
-0.9015392065048218,
1.5975958108901978... |
func (w *Watcher) Add(name string) error {
w.mu.Lock()
defer w.mu.Unlock()
select {
case <-w.closed:
return ErrWatcherClosed
default:
}
fileList, err := listForName(name)
if err != nil {
return errors.Trace(err)
}
w.names[name] = struct{}{}
for fp, fi := range fileList {
w.files[fp] = fi
}
return... | [
-0.6522203087806702,
-0.4988517165184021,
0.7184522747993469,
-0.4647878110408783,
0.20420365035533905,
0.46790629625320435,
-0.3339092433452606,
-0.2256665676832199,
-0.41676005721092224,
0.20357495546340942,
-0.25120896100997925,
-0.2792644798755646,
-0.533416748046875,
1.504276871681213... |
func (w *Watcher) Remove(name string) error {
w.mu.Lock()
defer w.mu.Unlock()
select {
case <-w.closed:
return ErrWatcherClosed
default:
}
w.doRemove(name)
return nil
} | [
-0.33687710762023926,
0.14471589028835297,
0.4802303910255432,
0.5778156518936157,
-0.45364055037498474,
-0.04859331622719765,
-0.2803278863430023,
-0.49788013100624084,
-0.24593324959278107,
0.4001026153564453,
-0.6227185726165771,
-0.12427372485399246,
-1.4147857427597046,
1.054326653480... |
func (w *Watcher) doRemove(name string) {
delete(w.names, name)
fi, ok := w.files[name]
if !ok {
return // not exists anymore
}
// remove itself
delete(w.files, name)
if !fi.IsDir() {
// not a directory, return
return
}
for fp := range w.files {
// remove all files in this directory
if filepath.D... | [
-0.5502760410308838,
0.07605824619531631,
0.7679688930511475,
0.2281082421541214,
0.724705696105957,
-0.6693363189697266,
0.6717455387115479,
-0.25310173630714417,
-0.024089865386486053,
0.7678569555282593,
-0.6394582986831665,
-0.8119451403617859,
-0.5880838632583618,
1.033567190170288,
... |
func (w *Watcher) doWatch(d time.Duration) {
ticker := time.NewTicker(d)
defer ticker.Stop()
for {
select {
case <-w.closed:
return
case <-ticker.C:
currFileList := w.listForAll()
w.pollEvents(currFileList)
// update file list
w.mu.Lock()
w.files = currFileList
w.mu.Unlock()
}
}
} | [
-0.4931046664714813,
0.15387427806854248,
0.6805064082145691,
0.017935048788785934,
0.5307996869087219,
1.1437721252441406,
1.3469693660736084,
-0.47914478182792664,
-0.7911871075630188,
-0.09198520332574844,
-0.14238587021827698,
0.19974984228610992,
0.14158006012439728,
1.130219221115112... |
func (w *Watcher) pollEvents(currFileList map[string]os.FileInfo) {
w.mu.Lock()
defer w.mu.Unlock()
creates := make(map[string]os.FileInfo)
removes := make(map[string]os.FileInfo)
// check for remove
for latestFp, latestFi := range w.files {
if _, ok := currFileList[latestFp]; !ok {
removes[latestFp] = lat... | [
-0.22146496176719666,
-0.7732539772987366,
0.8816101551055908,
0.2814042270183563,
-0.3831963837146759,
0.18979965150356293,
0.7385002970695496,
-0.1836860030889511,
-0.16404277086257935,
0.5511803030967712,
0.13125404715538025,
-0.5537062883377075,
-0.20385043323040009,
1.0968530178070068... |
func (w *Watcher) listForAll() map[string]os.FileInfo {
w.mu.Lock()
defer w.mu.Unlock()
fileList := make(map[string]os.FileInfo)
for name := range w.names {
fl, err := listForName(name)
if err != nil {
if os.IsNotExist(errors.Cause(err)) {
w.doRemove(name)
}
select {
case <-w.closed:
return... | [
0.6960062384605408,
-1.5513124465942383,
0.76448655128479,
-0.7033349871635437,
-0.23294232785701752,
-0.11870231479406357,
-0.4691394567489624,
-0.3256821930408478,
-0.6401276588439941,
-0.15528838336467743,
-0.023021182045340538,
-0.4177683889865875,
0.1477758139371872,
1.434891223907470... |
func listForName(name string) (map[string]os.FileInfo, error) {
stat, err := os.Stat(name)
if err != nil {
return nil, errors.Annotatef(err, "name %s", name)
}
list := make(map[string]os.FileInfo)
list[name] = stat
if !stat.IsDir() {
// not a directory, return
return list, nil
}
entries, err := os.Read... | [
-0.18201927840709686,
-0.7703773379325867,
0.6932719349861145,
-0.8990781903266907,
-0.5608923435211182,
-0.551058828830719,
-0.12698118388652802,
0.04874579235911369,
0.2080080211162567,
-0.05728515610098839,
-0.39528289437294006,
-0.53413325548172,
0.8628371357917786,
1.3844571113586426,... |
func (m Modifiers) Has(modifier Modifiers) bool {
return m&modifier == modifier
} | [
-0.904412567615509,
-0.32548007369041443,
0.1779150515794754,
-0.613952100276947,
-0.08963505178689957,
-0.3796326816082001,
-0.7438808083534241,
0.41378307342529297,
0.4587078094482422,
-0.4455903470516205,
-0.5375710725784302,
0.6756166815757751,
-0.6495651006698608,
0.6972411274909973,
... |
func (o *ModifyBundleCustomFieldsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 204:
result := NewModifyBundleCustomFieldsNoContent()
result.HttpResponse = response
if err := result.readResponse(response, consumer, o.formats... | [
-0.11609414964914322,
-0.4590618908405304,
0.6762590408325195,
0.553516685962677,
-0.08178829401731491,
-0.9842327833175659,
0.35906845331192017,
0.1735377460718155,
0.06399132311344147,
0.4189424216747284,
0.4113039970397949,
-0.3297361731529236,
-1.159666895866394,
0.1535569727420807,
... |
func NewModifyBundleCustomFieldsNoContent() *ModifyBundleCustomFieldsNoContent {
return &ModifyBundleCustomFieldsNoContent{}
} | [
-0.23044556379318237,
-0.7774758338928223,
0.05308613181114197,
-0.15339398384094238,
-0.6857606172561646,
-0.3939134478569031,
0.8810969591140747,
-0.1410790979862213,
-0.9610074758529663,
-0.1736450344324112,
-0.5907748937606812,
-0.5982074737548828,
-0.7783929705619812,
0.28098461031913... |
func NewModifyBundleCustomFieldsBadRequest() *ModifyBundleCustomFieldsBadRequest {
return &ModifyBundleCustomFieldsBadRequest{}
} | [
-0.44608110189437866,
-1.0259112119674683,
0.4344950318336487,
0.16686825454235077,
-0.2419004589319229,
-0.5415182113647461,
0.07319396734237671,
0.8751769065856934,
-0.5584844350814819,
-0.469465970993042,
-0.2579536736011505,
0.6446619033813477,
-0.4958251118659973,
0.9091895222663879,
... |
func (a *SkillCreate) Validate() error {
if a.Name == "" {
return server.NewHTTPError(http.StatusBadRequest, "skill name can not be empty")
}
return nil
} | [
0.23892156779766083,
0.13974331319332123,
0.38407042622566223,
0.6237663626670837,
0.6774662137031555,
0.4355451762676239,
-0.5209987163543701,
-0.9322445392608643,
-0.5252000093460083,
-0.28866714239120483,
0.17296621203422546,
-0.1450769156217575,
0.07872799038887024,
0.48764172196388245... |
func (a *SkillUpdate) Validate() error {
if a.Name == "" {
return server.BadRequestHTTPError
}
return nil
} | [
-0.02573682740330696,
-0.18508502840995789,
0.4250286817550659,
0.6181172132492065,
0.15409712493419647,
0.03224106878042221,
-0.8494393825531006,
-0.5488606095314026,
-0.03787200152873993,
0.14713244140148163,
0.6521874070167542,
-0.5568254590034485,
-0.5555762052536011,
0.287642031908035... |
func CPU(filename string) Activity {
return func() (activityFunc, error) {
if filename == "" {
return nil, nil
}
file, err := os.Create(filename)
if err != nil {
return nil, fmt.Errorf("Error opening cpu profile file: %v", err)
}
pprof.StartCPUProfile(file)
f := func(ctx context.Context) {
<-c... | [
0.43989425897598267,
0.19078052043914795,
0.6845011711120605,
0.8208978772163391,
-0.8049308657646179,
0.19717657566070557,
1.494773507118225,
0.09535107761621475,
-0.08979818969964981,
-0.021740900352597237,
-0.2588966190814972,
-0.23114712536334991,
-0.9370237588882446,
-0.88246881961822... |
func (h tsHeap) Less(i, j int) bool {
return h[i].ts.Less(h[j].ts)
} | [
-0.2516206204891205,
0.37826141715049744,
0.348833829164505,
-0.5942848920822144,
-0.546220064163208,
0.14898833632469177,
-0.7698531150817871,
-0.7343509793281555,
-0.6227734088897705,
0.30497655272483826,
-0.3721143901348114,
-0.09944786876440048,
0.0081178555265069,
0.07605788856744766,... |
func (h tsHeap) Swap(i, j int) {
tmp := h[i]
h[i] = h[j]
h[j] = tmp
h[i].index = i
h[j].index = j
} | [
-1.5863664150238037,
-0.42809203267097473,
0.3568156659603119,
-0.6547171473503113,
0.2830483019351959,
0.734145998954773,
-0.11695505678653717,
0.7277343273162842,
-0.777266800403595,
0.3938235342502594,
-0.705270528793335,
0.49507656693458557,
0.02328060381114483,
-0.5104740858078003,
... |
func (h *tsHeap) Push(x interface{}) {
n := len(*h)
item := x.(*item)
item.index = n
*h = append(*h, item)
} | [
-0.7832802534103394,
0.7052373290061951,
0.2323022484779358,
-0.11618582904338837,
0.012269081547856331,
0.7022997140884399,
-0.9100102782249451,
-0.49425938725471497,
0.12748976051807404,
0.9063475131988525,
-1.444091796875,
0.4459912180900574,
0.27022090554237366,
0.11342538893222809,
... |
func (h *tsHeap) Pop() interface{} {
it := (*h)[len(*h)-1]
// Poison the removed element, for safety.
it.index = -1
*h = (*h)[0 : len(*h)-1]
return it
} | [
-0.42980676889419556,
0.2836315631866455,
0.592473030090332,
0.016010448336601257,
0.12510551512241364,
0.17390340566635132,
-0.2051529437303543,
-0.1845587193965912,
-0.1650761216878891,
1.2003587484359741,
-0.2216763198375702,
-0.46480029821395874,
-0.4316498637199402,
-0.687202811241149... |
func (h *tsHeap) Len() int {
return len(*h)
} | [
0.02929411083459854,
0.0533602237701416,
0.12855660915374756,
-0.3145707845687866,
0.6729623079299927,
0.16352929174900055,
0.148825541138649,
0.8664657473564148,
-0.16199305653572083,
0.16188178956508636,
-1.3369638919830322,
-0.04085007309913635,
0.4245772659778595,
-0.06400074064731598,... |
func (h *heapTracker) Track(ctx context.Context, ts hlc.Timestamp) RemovalToken {
h.mu.Lock()
defer h.mu.Unlock()
i := &item{ts: ts}
heap.Push(&h.mu.rs, i)
return heapToken{i}
} | [
-0.1764896810054779,
0.45643454790115356,
0.341772198677063,
-0.3988533914089203,
-0.15245749056339264,
0.04880959913134575,
-0.49105268716812134,
-0.3521830439567566,
-0.2922722101211548,
-0.3270344138145447,
-0.8700535297393799,
0.2697460949420929,
-0.11816912144422531,
-0.06216761842370... |
func (h *heapTracker) Untrack(ctx context.Context, tok RemovalToken) {
idx := tok.(heapToken).index
if idx == -1 {
log.Fatalf(ctx, "attempting to untrack already-untracked item")
}
h.mu.Lock()
defer h.mu.Unlock()
heap.Remove(&h.mu.rs, idx)
} | [
0.26158392429351807,
0.6208267211914062,
0.4487924575805664,
-0.30251193046569824,
0.48158976435661316,
-0.23981980979442596,
0.46567416191101074,
-0.10970989614725113,
-0.3032093346118927,
-0.0046769711188972,
-0.3617905378341675,
0.10555287450551987,
-0.5309085845947266,
0.11005380749702... |
func (h *heapTracker) LowerBound(ctx context.Context) hlc.Timestamp {
h.mu.Lock()
defer h.mu.Unlock()
if h.mu.rs.Len() == 0 {
return hlc.Timestamp{}
}
return h.mu.rs[0].ts
} | [
0.8998661637306213,
-0.503176212310791,
0.8017206192016602,
-0.3071327209472656,
1.034348726272583,
-0.0017270840471610427,
-0.49213364720344543,
-0.9512535333633423,
0.7726296782493591,
-0.6544681191444397,
0.9560887813568115,
0.7622670531272888,
-0.970191240310669,
0.9138189554214478,
... |
func (h *heapTracker) Count() int {
h.mu.Lock()
defer h.mu.Unlock()
return h.mu.rs.Len()
} | [
0.39605268836021423,
-0.08662854880094528,
0.5294825434684753,
0.31695669889450073,
0.25224587321281433,
0.04317080229520798,
0.277616947889328,
-0.35177943110466003,
-1.0344339609146118,
-0.3249261975288391,
-0.3364098072052002,
-0.048954810947179794,
-0.8946219086647034,
1.28137910366058... |
func NewNetworkProfile(ctx *pulumi.Context,
name string, args *NetworkProfileArgs, opts ...pulumi.ResourceOption) (*NetworkProfile, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ProjectArn == nil {
return nil, errors.New("invalid value for required argumen... | [
0.23345552384853363,
1.3787786960601807,
0.3576681315898895,
0.2498791217803955,
0.10580836981534958,
0.3466065526008606,
-0.327202707529068,
-0.827325701713562,
0.06914535909891129,
-0.04187146574258804,
-1.4202826023101807,
-1.1018863916397095,
-0.43201491236686707,
-0.02462494932115078,... |
func GetNetworkProfile(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NetworkProfileState, opts ...pulumi.ResourceOption) (*NetworkProfile, error) {
var resource NetworkProfile
err := ctx.ReadResource("aws:devicefarm/networkProfile:NetworkProfile", name, id, state, &resource, opts...)
if err != nil {
... | [
0.560295045375824,
1.0504467487335205,
0.280202180147171,
0.18148978054523468,
0.19364798069000244,
-0.10532809048891068,
-0.5876018404960632,
-1.1914557218551636,
1.0587847232818604,
-0.10576578229665756,
-0.8795551657676697,
-0.3775233328342438,
-0.4015369415283203,
-0.9086304306983948,
... |
func (o NetworkProfileOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
} | [
0.725261926651001,
-0.1683761179447174,
0.2504783570766449,
0.3206871747970581,
0.6284540295600891,
0.472736120223999,
0.0332544669508934,
0.7378098964691162,
0.2452719807624817,
-0.7518613338470459,
-0.8313243389129639,
0.14804990589618683,
0.5389521718025208,
-0.7842267155647278,
0.419... |
func (o NetworkProfileOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
} | [
1.3325343132019043,
0.6530691981315613,
0.24319912493228912,
-0.11081276834011078,
0.6651103496551514,
0.8888116478919983,
-0.3663627803325653,
-0.0902378261089325,
0.48162582516670227,
-0.12300607562065125,
-0.6202048659324646,
-0.17243516445159912,
-0.3365711271762848,
-0.807831168174743... |
func (o NetworkProfileOutput) DownlinkBandwidthBits() pulumi.IntPtrOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.IntPtrOutput { return v.DownlinkBandwidthBits }).(pulumi.IntPtrOutput)
} | [
0.2580317556858063,
0.3080933392047882,
0.5020001530647278,
0.5140535831451416,
1.1122990846633911,
1.2123750448226929,
1.7662043571472168,
-0.14944055676460266,
1.7137380838394165,
-1.7181000709533691,
-0.4992135465145111,
1.0204423666000366,
-1.4441660642623901,
0.32486000657081604,
-1... |
func (o NetworkProfileOutput) DownlinkDelayMs() pulumi.IntPtrOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.IntPtrOutput { return v.DownlinkDelayMs }).(pulumi.IntPtrOutput)
} | [
0.8074239492416382,
0.17530642449855804,
0.6226128339767456,
0.029221348464488983,
0.9043678045272827,
0.8198740482330322,
0.9538007378578186,
0.5932298898696899,
1.1284964084625244,
-1.6859824657440186,
-0.20057271420955658,
0.3519880771636963,
-0.38630029559135437,
-0.3301600217819214,
... |
func (o NetworkProfileOutput) DownlinkJitterMs() pulumi.IntPtrOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.IntPtrOutput { return v.DownlinkJitterMs }).(pulumi.IntPtrOutput)
} | [
0.799283504486084,
0.04555981978774071,
0.5440438985824585,
-0.27886882424354553,
0.6812111735343933,
0.33518046140670776,
1.3380974531173706,
0.020861245691776276,
0.6454373002052307,
-0.2638067603111267,
-0.6356068849563599,
0.49357932806015015,
-0.7241159081459045,
-0.5216768980026245,
... |
func (o NetworkProfileOutput) DownlinkLossPercent() pulumi.IntPtrOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.IntPtrOutput { return v.DownlinkLossPercent }).(pulumi.IntPtrOutput)
} | [
0.7025246620178223,
0.07000049948692322,
0.5388692617416382,
-0.08946491032838821,
0.33980509638786316,
0.8905385136604309,
0.9322747588157654,
0.09888838231563568,
0.8785720467567444,
-1.2903352975845337,
0.5060176253318787,
-0.07155855000019073,
-0.7834296226501465,
-0.7671451568603516,
... |
func (o NetworkProfileOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
} | [
0.8449317812919617,
0.20947402715682983,
0.29201140999794006,
-0.3566959500312805,
-0.06763480603694916,
0.9088654518127441,
-0.05228530615568161,
-0.41477298736572266,
0.006384454667568207,
0.394945353269577,
-1.2753938436508179,
-0.8482449054718018,
0.27616146206855774,
-0.77595078945159... |
func (o NetworkProfileOutput) ProjectArn() pulumi.StringOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.StringOutput { return v.ProjectArn }).(pulumi.StringOutput)
} | [
0.4752265512943268,
0.07047554850578308,
0.3736669421195984,
0.2937246859073639,
0.43165814876556396,
1.059098482131958,
-0.12349474430084229,
1.0592149496078491,
0.46124252676963806,
-0.6844266057014465,
-0.10848326981067657,
0.22480520606040955,
0.28697729110717773,
-0.7816939949989319,
... |
func (o NetworkProfileOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
} | [
0.9815868735313416,
0.6363935470581055,
0.3087354004383087,
-0.20616789162158966,
0.807653546333313,
0.6584097743034363,
-0.3730831444263458,
0.04720047116279602,
-0.22727546095848083,
-0.3233698904514313,
-1.841963291168213,
-0.719647228717804,
0.03541000932455063,
-0.03550763055682182,
... |
func (o NetworkProfileOutput) TagsAll() pulumi.StringMapOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
} | [
1.4289065599441528,
0.34626200795173645,
0.45323148369789124,
-0.06533083319664001,
0.7080313563346863,
0.7582177519798279,
-0.717269778251648,
-0.11664076149463654,
-0.0082700215280056,
-0.30318567156791687,
-1.4372669458389282,
-0.476794958114624,
0.3460688889026642,
0.21603025496006012,... |
func (o NetworkProfileOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput)
} | [
1.3296927213668823,
0.957430899143219,
0.20100945234298706,
-0.01587851531803608,
1.1171218156814575,
1.028003454208374,
0.20024418830871582,
-0.4461043179035187,
0.7129928469657898,
-0.40333905816078186,
-0.9644507169723511,
-0.2061644047498703,
-0.5783001184463501,
-0.758187472820282,
... |
func (o NetworkProfileOutput) UplinkBandwidthBits() pulumi.IntPtrOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.IntPtrOutput { return v.UplinkBandwidthBits }).(pulumi.IntPtrOutput)
} | [
0.25198909640312195,
0.16929540038108826,
0.6956576108932495,
0.3919966220855713,
1.1493089199066162,
1.4018341302871704,
1.5265101194381714,
0.24139752984046936,
1.7036397457122803,
-1.2235602140426636,
-1.178316593170166,
0.7396607995033264,
-0.6322010159492493,
-0.008169323205947876,
... |
func (o NetworkProfileOutput) UplinkDelayMs() pulumi.IntPtrOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.IntPtrOutput { return v.UplinkDelayMs }).(pulumi.IntPtrOutput)
} | [
0.7477579712867737,
-0.07960887998342514,
0.7659121751785278,
-0.04931348189711571,
1.0171122550964355,
1.1670571565628052,
0.8477879166603088,
0.8405758738517761,
1.173403263092041,
-1.201155185699463,
-0.745972216129303,
0.07144908607006073,
0.10937398672103882,
-0.6317873001098633,
-0... |
func (o NetworkProfileOutput) UplinkJitterMs() pulumi.IntPtrOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.IntPtrOutput { return v.UplinkJitterMs }).(pulumi.IntPtrOutput)
} | [
0.8309128880500793,
-0.10730131715536118,
0.6574756503105164,
-0.39236223697662354,
0.7092600464820862,
0.43044790625572205,
0.9142140746116638,
0.2833115756511688,
0.599916398525238,
0.2840092182159424,
-1.1492589712142944,
0.2723831534385681,
-0.030509406700730324,
-0.7229406237602234,
... |
func (o NetworkProfileOutput) UplinkLossPercent() pulumi.IntPtrOutput {
return o.ApplyT(func(v *NetworkProfile) pulumi.IntPtrOutput { return v.UplinkLossPercent }).(pulumi.IntPtrOutput)
} | [
0.6586757898330688,
-0.2167564034461975,
0.7563193440437317,
-0.04495995491743088,
0.34457486867904663,
1.16239595413208,
0.7236887216567993,
0.5051952004432678,
0.9639486074447632,
-0.9188404083251953,
-0.08232864737510681,
-0.30740243196487427,
-0.22271163761615753,
-0.8802090883255005,
... |
func (b *bot) initHTTP() {
if b.HTTP.EnableEcho {
b.initEcho()
}
// Handle all routing from here.
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
b.HTTP.logger.Printf("%s %s from %s", r.Method, r.URL.Path, r.RemoteAddr)
if b.HTTP.EnableEcho && r.URL.Path == b.HTTP.EchoRoute && r.Method =... | [
0.09220581501722336,
0.18203328549861908,
0.9395790100097656,
0.21796727180480957,
0.4558006525039673,
0.5922483205795288,
0.5706011652946472,
0.27724409103393555,
-0.4495879113674164,
0.003811886999756098,
-0.10349535197019577,
-0.006644864100962877,
0.35170117020606995,
0.027580039575695... |
func IsMultiTenant(src EventSource) bool {
mt, ok := src.(multiTenant)
return ok && mt.IsMultiTenant()
} | [
-1.0053776502609253,
-0.18065233528614044,
0.46377092599868774,
-0.11942428350448608,
-1.0746876001358032,
-0.5384612083435059,
-0.5966353416442871,
-0.04353960603475571,
0.6129393577575684,
0.421463280916214,
-0.9809046983718872,
-0.02391893044114113,
-0.37021827697753906,
0.7613009810447... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.