text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (c *Client) URL(path string, a ...interface{}) string {
u, _ := urlx.Parse(c.addr)
u.Path = fmt.Sprintf(path, a...)
return u.String()
} | [
0.039541058242321014,
-0.06414016336202621,
0.14359188079833984,
-0.25970691442489624,
-0.6231702566146851,
0.6572390794754028,
0.3743816912174225,
0.869269609451294,
0.19598080217838287,
0.013086223974823952,
-0.05106480419635773,
0.5342785120010376,
-0.292850136756897,
-0.921948730945587... |
func New(store stores.Store, writer stores.Writer) Transactor {
return &transactor{
store: store,
transactionCommands: make(map[int64][]kvdb.Command),
writer: writer,
}
} | [
0.04452919587492943,
-0.9225550293922424,
0.2542578876018524,
-0.5102737545967102,
-1.2582883834838867,
-1.2924641370773315,
-0.20862148702144623,
0.5835978984832764,
-0.35134539008140564,
0.5122908353805542,
-0.09631208330392838,
-0.36549389362335205,
0.8241656422615051,
-0.17103262245655... |
func CollectionAlphabetical() {
//Read the collection from the json file
collection := readInCollection(mfi.MASTER)
fmt.Println("\nHere is your collection in alphabetical order by name")
fmt.Println("-------------------------------------------------------")
for i, f := range collection.FragrancesByName {
num :=... | [
0.6171755790710449,
-1.513196349143982,
1.0122257471084595,
-1.0599092245101929,
-0.5690866708755493,
0.7221447825431824,
0.05890989303588867,
-0.3028213679790497,
-1.7514607906341553,
0.17140676081180573,
-0.41051310300827026,
0.9463323950767517,
0.5302112698554993,
0.2633630335330963,
... |
func CollectionAlphabeticalByBrand() {
//Read the collection from the json file
collection := readInCollection(mfi.MASTER)
// output the collection in alphabetical order by brand and then by
var currentHouse string
fmt.Println("\nHere is your collection in alphabetical order by brand")
fmt.Println("-----------... | [
0.519266664981842,
-1.4449565410614014,
0.9947023987770081,
-0.5982164144515991,
-0.44543391466140747,
0.47984614968299866,
0.3932781219482422,
0.18059754371643066,
-1.438589334487915,
0.22785675525665283,
-0.11065322905778885,
0.9826755523681641,
0.15460360050201416,
0.8175272345542908,
... |
func CollectionNotes() {
notesMap := readInCollection(mfi.MASTER).Notes
fmt.Println("\nHere is your collection broken down by scent notes")
fmt.Println("-------------------------------------------------------")
var noteList []string
for note := range notesMap {
noteList = append(noteList, note)
}
sort.Slice(n... | [
0.9640337228775024,
-1.3529181480407715,
1.0322251319885254,
-0.5187041759490967,
0.08337996155023575,
0.6723314523696899,
0.721102237701416,
-0.38133999705314636,
-1.0287766456604004,
-0.4220316410064697,
-0.1185721606016159,
0.8192206025123596,
-0.41335931420326233,
0.4278029501438141,
... |
func SingleNote() {
notesMap := readInCollection(mfi.MASTER).Notes
var noteList []string
for note := range notesMap {
noteList = append(noteList, note)
}
max := len(noteList)
sort.Slice(noteList, func(i, j int) bool { return noteList[i] < noteList[j] })
fmt.Println("\nPlease type in the number corresponding ... | [
0.052312109619379044,
-0.39216098189353943,
1.3399428129196167,
0.30550363659858704,
-0.045599352568387985,
0.6167083978652954,
1.1807911396026611,
0.010808792896568775,
-0.35662585496902466,
-0.20726153254508972,
0.11706412583589554,
0.6593590974807739,
-0.8071829080581665,
0.429348051548... |
func FragranceInfo() {
collection := readInCollection(mfi.MASTER)
fmt.Println("\nWhich fragrance's info would you like")
fmt.Println("-------------------------------------------------------")
index := mfi.ShowOptionsByBrandAndGetNumericInput(collection) - 1
frag := collection.MasterCollection[collection.Fragrances... | [
0.8542227149009705,
-0.4858268201351166,
0.7483954429626465,
-0.2016083002090454,
-0.2125740647315979,
0.17123574018478394,
0.870509922504425,
0.40620318055152893,
-0.9792248010635376,
-0.5712975263595581,
-0.5709090828895569,
0.7985116839408875,
-0.338901549577713,
0.07435286790132523,
... |
func FragranceListInfo() {
collection := readInCollection(mfi.MASTER)
fmt.Println("\nWhich fragrance's info would you like")
fmt.Println("-------------------------------------------------------")
index := mfi.ShowOptionsAndGetNumericInput(collection) - 1
frag := collection.MasterCollection[collection.FragrancesByN... | [
0.4715477526187897,
-0.8112592101097107,
0.7572577595710754,
-0.39837414026260376,
-0.2746959328651428,
0.11954110860824585,
0.5620147585868835,
0.36559924483299255,
-0.8316029906272888,
-0.4387242794036865,
-1.0212993621826172,
0.77073073387146,
-0.33294665813446045,
0.17566397786140442,
... |
func GeneralLogisticallFunction(input float64, L float64, k float64, x0 float64) float64 {
return (1 / (1 + math.Exp(-k*(input-x0))))
} | [
1.4464517831802368,
-0.313866525888443,
0.3682323098182678,
-0.44685059785842896,
-0.765047550201416,
0.21123112738132477,
-0.5862947702407837,
0.9846228957176208,
0.1860695779323578,
0.08533554524183273,
-0.03149201348423958,
0.5359522700309753,
0.30622875690460205,
-0.43627500534057617,
... |
func (r *ResourceRequestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error) {
var resourceRequest discoveryv1alpha1.ResourceRequest
err = r.Get(ctx, req.NamespacedName, &resourceRequest)
if err != nil {
klog.Errorf("unable to get resourceRequest %s: %s", req.NamespacedName,... | [
-0.45320695638656616,
-0.4676198661327362,
1.0105150938034058,
0.1963770091533661,
0.2602025270462036,
0.017577677965164185,
-0.3294661045074463,
-0.4262304902076721,
-0.2967449426651001,
0.187818706035614,
1.0361578464508057,
-0.19901348650455475,
-0.8535551428794861,
1.1241624355316162,
... |
func (r *ResourceRequestReconciler) SetupWithManager(mgr ctrl.Manager) error {
// generate the predicate to filter just the ResourceRequest created by the remote cluster checking crdReplicator labels
p, err := predicate.LabelSelectorPredicate(crdreplicator.ReplicatedResourcesLabelSelector)
if err != nil {
klog.Err... | [
-0.08448763936758041,
-0.1767064481973648,
0.5909423828125,
-0.41094353795051575,
-0.505105197429657,
-0.17390356957912445,
0.3346567153930664,
0.2904452681541443,
0.19528836011886597,
0.0018844533478841186,
0.9345018267631531,
-0.39865440130233765,
-0.1786615550518036,
1.1842575073242188,... |
func AgentMetadata() *agents.Metadata {
return &agents.Metadata{
Name: "backplane",
Description: "Choria Management Backplane",
Author: "R.I.Pienaar <rip@devco.net>",
Version: Version,
License: "Apache-2.0",
URL: "https://choria.io",
Timeout: 10,
}
} | [
0.44758129119873047,
-1.5896883010864258,
0.29539820551872253,
-0.09103014320135117,
0.5181738138198853,
0.3572724461555481,
-0.8367067575454712,
-0.033749472349882126,
0.17507287859916687,
1.3743999004364014,
-0.46316638588905334,
0.5326811671257019,
0.17616604268550873,
-0.34773415327072... |
func AgentDDL() *agent.DDL {
ddl := &agent.DDL{
Metadata: AgentMetadata(),
Actions: []*agent.Action{},
Schema: "https://choria.io/schemas/mcorpc/ddl/v1/agent.json",
}
act := &agent.Action{
Name: "ping",
Description: "Backplane communications test",
Display: "failed",
Input: json.Ra... | [
-0.13050265610218048,
-1.0509874820709229,
0.9339420199394226,
-0.5078606605529785,
-0.30464255809783936,
-0.3372443914413452,
-0.01449520792812109,
-0.5411373376846313,
0.7446796894073486,
0.18180133402347565,
0.41953232884407043,
0.40485408902168274,
0.743739902973175,
0.0171273183077573... |
func NewGetSearchClinicsParams() *GetSearchClinicsParams {
var ()
return &GetSearchClinicsParams{
timeout: cr.DefaultTimeout,
}
} | [
-0.07376465201377869,
-0.1446022391319275,
0.10283428430557251,
0.3266265392303467,
0.16769807040691376,
-0.251315712928772,
-0.48197826743125916,
-0.07075826078653336,
-0.8824189901351929,
-0.3480757474899292,
-0.12792730331420898,
0.9363242983818054,
-0.23750516772270203,
-0.322975128889... |
func NewGetSearchClinicsParamsWithTimeout(timeout time.Duration) *GetSearchClinicsParams {
var ()
return &GetSearchClinicsParams{
timeout: timeout,
}
} | [
0.3902696371078491,
-0.24427039921283722,
0.3355356752872467,
0.1628362238407135,
0.13969095051288605,
0.5093514323234558,
-1.3392691612243652,
0.005777829326689243,
-0.7478649616241455,
0.7014253735542297,
0.14184316992759705,
1.0167316198349,
-0.1706068068742752,
-0.15801391005516052,
... |
func NewGetSearchClinicsParamsWithContext(ctx context.Context) *GetSearchClinicsParams {
var ()
return &GetSearchClinicsParams{
Context: ctx,
}
} | [
-0.15204842388629913,
-0.10988836735486984,
0.5032655596733093,
-0.22578322887420654,
0.17757739126682281,
0.49118396639823914,
-1.244137167930603,
-0.772864580154419,
-0.5548036098480225,
0.20223897695541382,
-0.04871075972914696,
0.7841618061065674,
-0.01799883134663105,
-0.4244421720504... |
func NewGetSearchClinicsParamsWithHTTPClient(client *http.Client) *GetSearchClinicsParams {
var ()
return &GetSearchClinicsParams{
HTTPClient: client,
}
} | [
0.23564383387565613,
-0.3370584547519684,
0.46140316128730774,
0.08470088243484497,
0.5219676494598389,
0.3831363916397095,
-0.5549142360687256,
-0.20478439331054688,
-1.03767728805542,
-0.11729205399751663,
-0.1651986837387085,
0.837208092212677,
0.15936607122421265,
-0.6461485624313354,
... |
func (o *GetSearchClinicsParams) WithTimeout(timeout time.Duration) *GetSearchClinicsParams {
o.SetTimeout(timeout)
return o
} | [
-0.34017065167427063,
0.2258303165435791,
0.3363296389579773,
-0.17492923140525818,
0.014757970348000526,
-0.24573060870170593,
-0.5276119709014893,
-0.5315762758255005,
0.10408096760511398,
0.5269516110420227,
0.38706016540527344,
0.5364629626274109,
0.4878939986228943,
-0.214251860976219... |
func (o *GetSearchClinicsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
-0.46388718485832214,
0.5910999774932861,
0.23091500997543335,
-0.20912407338619232,
0.7087018489837646,
0.0945872962474823,
-0.341621994972229,
-0.3030183017253876,
-0.2281632125377655,
0.5234995484352112,
0.3479030132293701,
0.8794092535972595,
-0.09917069226503372,
-0.41928985714912415,... |
func (o *GetSearchClinicsParams) WithContext(ctx context.Context) *GetSearchClinicsParams {
o.SetContext(ctx)
return o
} | [
-1.2004586458206177,
0.27718111872673035,
0.4590155780315399,
-0.20587420463562012,
-0.16849468648433685,
-0.1668071299791336,
-0.6242645978927612,
-0.981674075126648,
0.42307499051094055,
-0.1609068214893341,
0.45495718717575073,
0.45780232548713684,
-0.059915948659181595,
-0.661381483078... |
func (o *GetSearchClinicsParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-1.09599769115448,
0.6387046575546265,
0.24802547693252563,
-0.043437130749225616,
0.7330211400985718,
0.11093784868717194,
-0.43593910336494446,
-0.8331396579742432,
0.4297337532043457,
-0.15480436384677887,
0.24579370021820068,
0.7623740434646606,
-0.46737754344940186,
-0.687078297138214... |
func (o *GetSearchClinicsParams) WithHTTPClient(client *http.Client) *GetSearchClinicsParams {
o.SetHTTPClient(client)
return o
} | [
-0.5627155303955078,
-0.4277373254299164,
0.43227502703666687,
-0.5388168692588806,
0.15364539623260498,
-0.3248295485973358,
-0.05405981466174126,
-0.8547996878623962,
-0.26780685782432556,
-0.4138171374797821,
0.2277839183807373,
0.4997015595436096,
0.5942295789718628,
-0.815229177474975... |
func (o *GetSearchClinicsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
-0.3011195957660675,
-0.05440433323383331,
0.29611796140670776,
-0.9335102438926697,
0.316598117351532,
-0.32958999276161194,
0.07954265177249908,
-0.9203281998634338,
-0.600174069404602,
-0.31950345635414124,
-0.04148203879594803,
0.9650030732154846,
0.004679400473833084,
-1.1104646921157... |
func (o *GetSearchClinicsParams) WithArchived(archived *bool) *GetSearchClinicsParams {
o.SetArchived(archived)
return o
} | [
0.008716083131730556,
-0.6578400135040283,
0.288195937871933,
-0.4381742477416992,
0.024307914078235626,
-0.33481407165527344,
-0.17188377678394318,
-0.0020299924071878195,
-0.2871638536453247,
-0.48655179142951965,
-0.15971332788467407,
0.4879247844219208,
0.7717827558517456,
-0.557150125... |
func (o *GetSearchClinicsParams) SetArchived(archived *bool) {
o.Archived = archived
} | [
-0.27666735649108887,
-0.3541899621486664,
0.2675080895423889,
-0.41937267780303955,
0.6736013293266296,
0.08108972758054733,
0.17065465450286865,
0.10058202594518661,
-0.8680160045623779,
-0.4215647280216217,
-0.2353287786245346,
1.1632927656173706,
-0.009932778775691986,
-0.3393031060695... |
func (o *GetSearchClinicsParams) WithLimit(limit *int64) *GetSearchClinicsParams {
o.SetLimit(limit)
return o
} | [
-0.7097588777542114,
0.37003687024116516,
0.46436402201652527,
-0.23517721891403198,
0.3017338812351227,
-0.4733230471611023,
-0.08086223155260086,
-0.7104754447937012,
0.04798749461770058,
-0.263397753238678,
0.8749085664749146,
0.42643293738365173,
0.2924634516239166,
-1.0990360975265503... |
func (o *GetSearchClinicsParams) SetLimit(limit *int64) {
o.Limit = limit
} | [
-0.9081133008003235,
0.5948821306228638,
0.36657196283340454,
-0.003877409501001239,
0.970811665058136,
-0.15752780437469482,
0.04452027752995491,
-0.4690342843532562,
-0.23352625966072083,
-0.27160707116127014,
0.6185015439987183,
0.6750108003616333,
-0.4949018657207489,
-0.84499406814575... |
func (o *GetSearchClinicsParams) WithName(name *string) *GetSearchClinicsParams {
o.SetName(name)
return o
} | [
-1.1818128824234009,
-0.03865259885787964,
0.2793634831905365,
-0.27899616956710815,
-0.07829775661230087,
-0.9601870179176331,
-0.1111290380358696,
-0.8912665843963623,
-0.1791977435350418,
0.475741446018219,
0.15297989547252655,
-0.13422149419784546,
0.12901990115642548,
-0.4273779690265... |
func (o *GetSearchClinicsParams) SetName(name *string) {
o.Name = name
} | [
-1.4548739194869995,
0.1082034558057785,
0.19289936125278473,
-0.13986599445343018,
0.3820716142654419,
-0.5958625078201294,
-0.3249252736568451,
-0.7043057084083557,
-0.3865828216075897,
0.3926873505115509,
-0.152454674243927,
0.10476569086313248,
-0.29315051436424255,
-0.1020816639065742... |
func (o *GetSearchClinicsParams) WithOffset(offset *int64) *GetSearchClinicsParams {
o.SetOffset(offset)
return o
} | [
-1.1010321378707886,
-0.07339600473642349,
0.359352707862854,
-0.8787530660629272,
-0.13174378871917725,
-0.2569212019443512,
-0.07158396393060684,
-0.5662792325019836,
-0.12807191908359528,
-0.09822145849466324,
0.5608170628547668,
0.2751665711402893,
0.45047059655189514,
-0.8011868596076... |
func (o *GetSearchClinicsParams) SetOffset(offset *int64) {
o.Offset = offset
} | [
-1.1464016437530518,
0.3916764259338379,
0.1621299535036087,
-0.6864206194877625,
0.4378276765346527,
0.1736527681350708,
-0.007314169779419899,
-0.17363539338111877,
-0.38989177346229553,
-0.15912950038909912,
0.3826521039009094,
0.7320416569709778,
-0.28750917315483093,
-0.54221749305725... |
func (o *GetSearchClinicsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Archived != nil {
// query param archived
var qrArchived bool
if o.Archived != nil {
qrArchived = *o.Archived
}
qA... | [
-0.9957643747329712,
-0.4569837749004364,
1.1437580585479736,
-1.1145687103271484,
0.4373180568218231,
-0.08631598949432373,
0.5670726895332336,
-0.2957858741283417,
-0.1526290476322174,
0.13220232725143433,
-0.004428268410265446,
0.43537819385528564,
-0.04565966874361038,
-0.1739278286695... |
func Billing() *cobra.Command {
billingCmd := &cobra.Command{
Use: "billing",
Short: "Display billing information",
Long: billingLong,
Example: billingExample,
}
historyCmd := &cobra.Command{
Use: "history",
Aliases: []string{"h"},
Short: "Display billing history information",
Long: ... | [
0.34929215908050537,
-0.2930757701396942,
0.9780329465866089,
0.10140223056077957,
0.5347386598587036,
0.06387637555599213,
0.2441820204257965,
0.5809512138366699,
0.5922408699989319,
-0.9896641969680786,
0.6356585025787354,
0.18082347512245178,
0.35836687684059143,
0.8880763649940491,
0... |
func ParseOptions() *Options {
options := &Options{}
flagSet := goflags.NewFlagSet()
flagSet.SetDescription(`Naabu is a port scanning tool written in Go that allows you to enumerate open ports for hosts in a fast and reliable manner.`)
flagSet.CreateGroup("input", "Input",
flagSet.NormalizedStringSliceVarP(&opt... | [
0.5274782776832581,
0.768806517124176,
0.8488389253616333,
-0.6900526285171509,
0.2777595818042755,
0.11634662747383118,
0.7803868055343628,
-0.9380137920379639,
-0.6231017112731934,
-0.45751845836639404,
-0.036453310400247574,
0.045791592448949814,
-0.31099653244018555,
0.2782587110996246... |
func SetLimits() error {
return nil
} | [
0.9417709112167358,
0.39065277576446533,
0.06884239614009857,
0.7962809801101685,
0.2843098044395447,
0.36171990633010864,
0.26941153407096863,
-0.21360409259796143,
0.3286502957344055,
-0.7032952904701233,
-0.6010638475418091,
0.4481104910373688,
-0.6562900543212891,
0.7552961707115173,
... |
func WithConfig(parent context.Context) context.Context {
if parent == nil {
parent = context.Background()
}
value := parent.Value(vppAgentConfigKey)
if value == nil {
vppAgentConfig := &configurator.Config{}
return context.WithValue(parent, vppAgentConfigKey, vppAgentConfig)
}
// Note on why this type asse... | [
0.12672114372253418,
-0.09041956812143326,
0.6347465515136719,
-0.09050150960683823,
-0.5458986163139343,
-0.2300477921962738,
-0.12986701726913452,
-0.027867544442415237,
0.8105368614196777,
0.8573399186134338,
0.17731653153896332,
-0.7742685079574585,
0.04400346055626869,
0.7134672403335... |
func Config(ctx context.Context) *configurator.Config {
return ctx.Value(vppAgentConfigKey).(*configurator.Config)
} | [
0.19117717444896698,
-0.14230364561080933,
0.25332415103912354,
-0.06997048854827881,
0.009402072988450527,
0.14171837270259857,
-0.024148190394043922,
0.39474719762802124,
1.1447964906692505,
0.3729671537876129,
0.5147488713264465,
-0.4710312485694885,
0.3771504759788513,
-0.2175036370754... |
func WithConnectionMap(parent context.Context) context.Context {
if parent == nil {
parent = context.Background()
}
value := parent.Value(connectionMapKey)
if value == nil {
connectionMap := make(map[string]*interfaces.Interface)
return context.WithValue(parent, connectionMapKey, connectionMap)
}
// Note on... | [
-0.0059836991131305695,
-0.4692089855670929,
0.6436328887939453,
0.2632529139518738,
0.07743167877197266,
0.07104603946208954,
0.15401726961135864,
-0.6538053154945374,
0.9167104363441467,
0.5414255261421204,
0.49262741208076477,
-0.8326377272605896,
-0.26313599944114685,
0.350238323211669... |
func ConnectionMap(ctx context.Context) map[string]*interfaces.Interface {
connectionMap := ctx.Value(connectionMapKey)
if connectionMap != nil {
return connectionMap.(map[string]*interfaces.Interface)
}
return nil
} | [
-0.37245017290115356,
-0.4154230058193207,
0.5630314350128174,
0.6356075406074524,
1.1145586967468262,
-0.06559046357870102,
0.5548909902572632,
-0.5979853868484497,
1.3198736906051636,
0.6090672016143799,
0.7451844811439514,
-0.6196448802947998,
-0.598430335521698,
0.09308213740587234,
... |
func TestGatewayOwnership(t *testing.T) {
testName := "test-gateway-owned"
contourName := fmt.Sprintf("%s-contour", testName)
gcName := "test-gatewayclass-owned"
cfg := objcontour.Config{
Name: contourName,
Namespace: operatorNs,
SpecNs: specNs,
NetworkType: operatorv1alpha1.NodePortServic... | [
0.2565529942512512,
0.3757707476615906,
0.721268892288208,
0.23209287226200104,
0.3772219121456146,
0.17185476422309875,
1.0277451276779175,
-0.6755881309509277,
0.4633699655532837,
-0.06944658607244492,
-0.2421519160270691,
0.05730912461876869,
-0.3371812701225281,
1.3897675275802612,
0... |
func isPossible2(x int) int {
s := strconv.Itoa(x)
var (
lastC rune
gs [10]int
notIncreasing bool
hasDouble bool
)
for pos, c := range s {
if pos > 0 {
if lastC == c {
gs[c - '0']++
}
if c < lastC {
notIncreasing = true
break
}
}
lastC = c
}
for i := range gs {
if gs[i] == ... | [
-0.47334954142570496,
-0.4322653114795685,
0.7066335082054138,
0.10837330669164658,
-0.8346316814422607,
-0.2918158173561096,
-0.018826529383659363,
-0.2043677121400833,
-1.1253317594528198,
0.17642253637313843,
-0.6980259418487549,
0.052577655762434006,
0.1258775144815445,
1.3672183752059... |
func isPossible(x int) int {
s := strconv.Itoa(x)
var (
lastC rune
hasDouble bool
notIncreasing bool
)
for pos, c := range s {
if pos > 0 {
if lastC == c {
hasDouble = true
}
if c < lastC {
notIncreasing = true
break
}
}
lastC = c
}
if hasDouble && !notIncreasing {
return 1
... | [
-0.18360725045204163,
0.2214556485414505,
0.6940720677375793,
-0.28424569964408875,
-0.425565630197525,
-0.263571560382843,
-0.07749903202056885,
-0.3600611090660095,
-1.1767029762268066,
0.6627404093742371,
-0.49777111411094666,
-0.1380118578672409,
0.10479921847581863,
0.8121090531349182... |
func CreateArrayList() *ArrayList {
return &ArrayList{
Capacity: 10,
Length: 0,
}
} | [
0.7419977784156799,
-0.129334956407547,
0.4302516281604767,
-0.06503386795520782,
1.0214755535125732,
-0.0630006492137909,
-0.41768506169319153,
0.3706682622432709,
-0.17129598557949066,
0.23884791135787964,
-0.9958176016807556,
-0.3132166266441345,
0.3425840139389038,
0.5815246105194092,
... |
func (arrayList *ArrayList) AddItemToArrayList(newItem int) {
if arrayList.Capacity == arrayList.Length {
arrayList.Capacity *= 2
newBaseArray := make([]int, 0, arrayList.Capacity)
newBaseArray = append(newBaseArray[:0], arrayList.BaseArray...)
arrayList.BaseArray = newBaseArray
}
newSlice := []int{newItem}
... | [
-0.5728616714477539,
-0.7726249098777771,
0.6690511107444763,
0.5940482020378113,
0.789262592792511,
-0.025109322741627693,
-0.08167465776205063,
-0.06609576940536499,
0.4181120991706848,
0.7076097726821899,
-1.2538719177246094,
0.08931215107440948,
0.17677921056747437,
0.983630895614624,
... |
func GetElementOfArrayList(arrayList *ArrayList, index uint) int {
return arrayList.BaseArray[index]
} | [
-0.5774979591369629,
-0.17309048771858215,
0.385109007358551,
0.7373299598693848,
-0.05840402841567993,
-0.1856384426355362,
-0.48207753896713257,
-0.11568547785282135,
0.36600834131240845,
0.05965520814061165,
-0.7847595810890198,
0.45997148752212524,
-0.03602955490350723,
0.0951422080397... |
func (ref FileView) File() resource.ID {
return ref.file
} | [
0.19506783783435822,
-0.3436954915523529,
0.3081340491771698,
0.06904484331607819,
-0.4729240834712982,
0.4919007420539856,
1.2416032552719116,
0.16083234548568726,
0.5302748680114746,
-1.381662130355835,
0.6550067067146301,
0.07662421464920044,
0.4920198619365692,
0.9639660716056824,
-0... |
func (ref FileView) Drive() resource.ID {
return ref.drive
} | [
0.7891972661018372,
-0.765058696269989,
0.4699130952358246,
0.04630227014422417,
0.5521464347839355,
0.7066329121589661,
0.7746734619140625,
-0.2899700105190277,
0.5127606391906738,
-1.6731563806533813,
1.4038554430007935,
0.49415087699890137,
-0.8657819032669067,
0.8828282952308655,
-0.... |
func (ref FileView) At(seqNum commit.SeqNum) (r fileversion.Reference, err error) {
file, ok := ref.repo.files[ref.file]
if !ok {
return nil, fileview.NotFound{File: ref.file, Drive: ref.drive, Commit: seqNum}
}
view, ok := file.Views[ref.drive]
if !ok {
return nil, fileview.NotFound{File: ref.file, Drive: ref... | [
0.21192702651023865,
-1.346118688583374,
0.6353161931037903,
-1.48752760887146,
-0.10743697732686996,
-0.8005684614181519,
0.08294905722141266,
-0.1947057992219925,
-0.26530134677886963,
0.10459358245134354,
0.9606178402900696,
0.43859338760375977,
0.4020302891731262,
0.4807887077331543,
... |
func (ref FileView) Add(seqNum commit.SeqNum, version resource.Version) error {
file, ok := ref.repo.files[ref.file]
if !ok {
file = newFileEntry()
}
view, ok := file.Views[ref.drive]
if !ok {
view = make(map[commit.SeqNum]resource.Version)
file.Views[ref.drive] = view
}
view[seqNum] = version
ref.repo.fi... | [
0.24537192285060883,
-0.9763931632041931,
0.47993743419647217,
-1.0008922815322876,
0.07774906605482101,
-0.07529947906732559,
-0.004489975981414318,
1.082424521446228,
0.11894044280052185,
-0.6637730598449707,
0.7423855066299438,
0.043303877115249634,
0.22990785539150238,
0.90999013185501... |
func StringWithCharset(byteLen int, charset Charset) string {
bytes := randomBytes(byteLen)
length := len(charset)
for i, b := range bytes {
bytes[i] = charset[b%byte(length)]
}
return string(bytes)
} | [
0.7702247500419617,
-0.611613929271698,
0.11443068087100983,
-1.6685521602630615,
-0.7112602591514587,
-0.31239259243011475,
-0.6551284790039062,
-1.1087415218353271,
0.36272114515304565,
0.44702592492103577,
-0.7273054122924805,
0.1256812959909439,
-0.300331711769104,
-0.7220766544342041,... |
func String(length int) string {
return randStringBytesMaskImprSrcUnsafe(length)
} | [
0.0915592685341835,
-0.3268497586250305,
0.06576579809188843,
-0.4811645746231079,
-0.7309954762458801,
0.45453310012817383,
0.4425303041934967,
-1.0792324542999268,
1.061719298362732,
-0.09962878376245499,
-0.6160823106765747,
0.05860384926199913,
-1.008313536643982,
-0.703725278377533,
... |
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
return &Client{transport: transport, formats: formats}
} | [
-0.053929269313812256,
-1.4649492502212524,
-0.09012952446937561,
-0.8262796401977539,
-0.550800621509552,
0.6438911557197571,
0.3526709973812103,
-0.1351967602968216,
-0.9943568110466003,
-0.7430494427680969,
-0.3152836263179779,
0.610390305519104,
0.2375689148902893,
0.0706297904253006,
... |
func (a *Client) GetHistoryEvents(params *GetHistoryEventsParams) (*GetHistoryEventsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetHistoryEventsParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "GetHistoryEvents",
Method: ... | [
-0.836047887802124,
0.8434268236160278,
0.7840647101402283,
0.483754426240921,
0.7971092462539673,
-0.4303658902645111,
0.708729088306427,
-0.24791039526462555,
0.18396493792533875,
-0.26792261004447937,
-0.8099236488342285,
1.8023226261138916,
-1.6308084726333618,
0.23696202039718628,
0... |
func (a *Client) GetHistoryPrintJobs(params *GetHistoryPrintJobsParams) (*GetHistoryPrintJobsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetHistoryPrintJobsParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "GetHistoryPrintJobs... | [
-1.1148494482040405,
-0.17643991112709045,
0.7466452121734619,
-0.09430675953626633,
0.5035791397094727,
0.06252135336399078,
0.13844330608844757,
-0.4687572419643402,
-0.2023233324289322,
-0.5149073600769043,
0.0234315674751997,
1.9976454973220825,
-1.444054365158081,
0.15075305104255676,... |
func (a *Client) GetHistoryPrintJobsUUID(params *GetHistoryPrintJobsUUIDParams) (*GetHistoryPrintJobsUUIDOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetHistoryPrintJobsUUIDParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "Get... | [
-0.8319129347801208,
-0.30619096755981445,
0.633514404296875,
-0.43583807349205017,
-0.032277852296829224,
0.07531299442052841,
-0.08854012191295624,
0.35606619715690613,
0.2271319329738617,
-0.22936734557151794,
0.31749358773231506,
1.7023628950119019,
-1.232128620147705,
0.18073219060897... |
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
} | [
0.43289124965667725,
-0.16396044194698334,
0.06502870470285416,
0.17467869818210602,
-0.022012455388903618,
0.3327627182006836,
1.1535402536392212,
-0.7375835180282593,
0.32833772897720337,
-1.0833802223205566,
-1.4707483053207397,
0.4919946491718292,
-0.44076064229011536,
0.62663459777832... |
func cobraConfig() {
if err := viper.ReadInConfig(); err != nil {
if _, ok := err.(viper.ConfigFileNotFoundError); ok {
log.Debug().Err(err).Msg("unable to read config file")
} else {
log.Warn().Err(err).Msg("unable to read config file")
}
}
} | [
0.6218327879905701,
-0.4164882302284241,
0.7987740635871887,
-0.148997962474823,
-0.0380137600004673,
0.42882025241851807,
0.2013276368379593,
1.764098882675171,
-1.4814497232437134,
1.3593311309814453,
-0.5226144194602966,
0.2545676529407501,
-0.1904565989971161,
0.38417157530784607,
1.... |
func NewImageUnmarshalBinary(marshalledData []byte) (*Image, error) {
image := new(Image)
err := image.UnmarshalBinary(marshalledData)
if err != nil {
return nil, err
}
return image, nil
} | [
-0.18107165396213531,
-0.4425837993621826,
0.6306756138801575,
-0.27762022614479065,
0.11258495599031448,
-1.0419713258743286,
-0.8343029618263245,
0.4798206686973572,
0.009949583560228348,
0.20341666042804718,
0.4737182855606079,
-0.05553841218352318,
-0.32749074697494507,
0.3391807377338... |
func (image *Image) MarshalBinary() ([]byte, error) {
buffer := new(bytes.Buffer)
formatLen := uint32(len(image.Format))
binary.Write(buffer, binary.LittleEndian, &formatLen)
buffer.Write([]byte(image.Format))
dataLen := uint32(len(image.Data))
binary.Write(buffer, binary.LittleEndian, &dataLen)
buffer.Write(i... | [
0.4203433096408844,
-0.3016272187232971,
0.7051016092300415,
-0.646104097366333,
0.7084474563598633,
-0.025893867015838623,
-1.140518069267273,
-1.0481394529342651,
0.12482817471027374,
0.01316811889410019,
-0.3417011797428131,
0.9785040020942688,
-0.3124258816242218,
1.0859321355819702,
... |
func (image *Image) UnmarshalBinary(data []byte) error {
dataPosition := 0
readData := func(length int) ([]byte, error) {
dataEnd := dataPosition + length
if dataEnd > len(data) {
return nil, fmt.Errorf("unexpected end of data at index %d instead of %d", len(data), dataEnd)
}
d := data[dataPosition:dataEnd... | [
0.044645458459854126,
-0.3579053580760956,
1.219743251800537,
-1.2786619663238525,
0.005446945317089558,
-1.04817533493042,
-0.35115107893943787,
-0.822747528553009,
0.23664692044258118,
0.14138972759246826,
0.2978821396827698,
0.7172409892082214,
-0.044264670461416245,
0.6079688668251038,... |
func ImageEqual(image1, image2 *Image) bool {
if image1 == image2 {
return true
}
if image1 == nil || image2 == nil {
return false
}
if image1.Format != image2.Format {
return false
}
if !bytes.Equal(image1.Data, image2.Data) {
return false
}
return true
} | [
-0.8713008165359497,
-0.7623737454414368,
0.5473853945732117,
-0.13800688087940216,
0.36493200063705444,
-0.07198119908571243,
-1.6668094396591187,
-0.13797497749328613,
-0.3452812135219574,
0.8871007561683655,
-0.7561681270599365,
0.8274012804031372,
-0.4210602641105652,
1.284206867218017... |
func CheckBadCompilerFlags(ctx BaseModuleContext, prop string, flags []string) {
for _, flag := range flags {
flag = strings.TrimSpace(flag)
if !strings.HasPrefix(flag, "-") {
ctx.PropertyErrorf(prop, "Flag `%s` must start with `-`", flag)
} else if strings.HasPrefix(flag, "-I") || strings.HasPrefix(flag, "-... | [
0.2937677800655365,
-0.5778460502624512,
0.7124438881874084,
0.87409508228302,
0.47616973519325256,
0.5128651857376099,
0.012907282449305058,
-0.23239590227603912,
-0.3859630227088928,
-0.04145648702979088,
0.7653986811637878,
0.6104656457901001,
-0.9254860281944275,
0.8978032469749451,
... |
func CheckBadLinkerFlags(ctx BaseModuleContext, prop string, flags []string) {
for _, flag := range flags {
flag = strings.TrimSpace(flag)
if !strings.HasPrefix(flag, "-") {
ctx.PropertyErrorf(prop, "Flag `%s` must start with `-`", flag)
} else if strings.HasPrefix(flag, "-l") {
if ctx.Host() {
ctx.Pr... | [
0.023522648960351944,
-0.48426946997642517,
0.5780622363090515,
0.49432528018951416,
0.2924618422985077,
0.20642921328544617,
-0.3950527310371399,
0.12984630465507507,
0.07485581934452057,
-0.7371469140052795,
0.49904486536979675,
0.837676465511322,
-1.0165133476257324,
1.1138614416122437,... |
func CheckBadHostLdlibs(ctx ModuleContext, prop string, flags []string) {
allowedLdlibs := ctx.toolchain().AvailableLibraries()
if !ctx.Host() {
panic("Invalid call to CheckBadHostLdlibs")
}
for _, flag := range flags {
flag = strings.TrimSpace(flag)
// TODO: Probably should just redo this property to pref... | [
0.20711341500282288,
0.1980932652950287,
0.5188875794410706,
0.740392804145813,
0.298585444688797,
1.5042433738708496,
-0.17808154225349426,
0.15657509863376617,
-0.08970806747674942,
-0.06206965819001198,
0.28289517760276794,
0.06539279222488403,
-0.6909722685813904,
1.4144001007080078,
... |
func CheckBadTidyFlags(ctx ModuleContext, prop string, flags []string) {
for _, flag := range flags {
flag = strings.TrimSpace(flag)
if !strings.HasPrefix(flag, "-") {
ctx.PropertyErrorf(prop, "Flag `%s` must start with `-`", flag)
} else if strings.HasPrefix(flag, "-fix") {
ctx.PropertyErrorf(prop, "Flag... | [
0.17796483635902405,
0.3553726077079773,
0.5651760697364807,
0.25286203622817993,
0.8400550484657288,
0.12229400873184204,
-0.21385082602500916,
-0.23169830441474915,
-0.3429498076438904,
-0.2863694727420807,
0.17145301401615143,
1.1004661321640015,
-0.5404000878334045,
1.295122742652893,
... |
func CheckBadTidyChecks(ctx ModuleContext, prop string, checks []string) {
for _, check := range checks {
if strings.Contains(check, " ") {
ctx.PropertyErrorf("tidy_checks", "Check `%s` invalid, cannot contain spaces", check)
} else if strings.Contains(check, ",") {
ctx.PropertyErrorf("tidy_checks", "Check `... | [
0.06212257221341133,
-0.260251522064209,
0.39865097403526306,
0.12100832909345627,
1.0827473402023315,
0.4599151015281677,
-0.32771778106689453,
0.09575166553258896,
-0.13497048616409302,
-0.6034656763076782,
1.3243364095687866,
0.677659273147583,
-0.43610531091690063,
1.2361981868743896,
... |
func (w WatchObject) NextEvent() EventInfo {
return <-w.EventInfoChan
} | [
0.8498249650001526,
-0.5080959796905518,
0.3315170705318451,
-0.25821277499198914,
-0.10616215318441391,
0.7312480807304382,
0.5188485980033875,
-1.1723021268844604,
0.14695405960083008,
-1.050331711769104,
-0.7010818719863892,
0.7131916284561157,
0.2320813089609146,
0.2967888116836548,
... |
func (w WatchObject) Done() <-chan bool { return w.DoneChan } | [
-0.16552676260471344,
0.15588954091072083,
0.7423216700553894,
0.19533522427082062,
0.5025690197944641,
0.6186080574989319,
0.18410667777061462,
-1.150773048400879,
-0.18621723353862762,
-0.32308852672576904,
-0.862988293170929,
0.5526280999183655,
-0.13041125237941742,
0.41902071237564087... |
func (w *WatchObject) Events() chan EventInfo {
return w.EventInfoChan
} | [
0.21612344682216644,
-1.6549623012542725,
0.3747411370277405,
-1.1710177659988403,
0.42037132382392883,
0.7395193576812744,
0.3350631594657898,
-1.1467761993408203,
0.5265915393829346,
-1.035433292388916,
-0.4190610349178314,
0.7370172142982483,
0.17901110649108887,
-0.09763629734516144,
... |
func (w *WatchObject) Close() {
close(w.DoneChan)
} | [
0.2925364673137665,
-0.21188686788082123,
0.606615424156189,
-0.17088082432746887,
0.33105742931365967,
1.2012698650360107,
0.760103166103363,
-1.9460383653640747,
-1.0194053649902344,
-0.7022383213043213,
-0.5938259363174438,
0.7164356112480164,
-0.5777684450149536,
1.2338416576385498,
... |
func NewTransfer(cfg *config.Config) *Transfer {
return &Transfer{cfg}
} | [
0.3465343415737152,
-0.8629001975059509,
0.07565191388130188,
0.5805210471153259,
-0.5689511895179749,
0.7200205326080322,
-0.6334260106086731,
-0.513424813747406,
0.09613687545061111,
-0.6854783296585083,
-0.3609856963157654,
0.42333537340164185,
-0.37215134501457214,
1.0470246076583862,
... |
func (a *apiServer) isTaskTerminalFunc(
taskID model.TaskID, buffer time.Duration,
) api.TerminationCheckFn {
return func() (bool, error) {
switch task, err := a.m.db.TaskByID(taskID); {
case err != nil:
return true, err
case task.EndTime != nil && task.EndTime.UTC().Add(buffer).Before(time.Now().UTC()):
... | [
0.1387052983045578,
-0.36793744564056396,
0.6564690470695496,
0.11226441711187363,
-0.16056036949157715,
0.14627705514431,
-0.030165741220116615,
-0.05073252692818642,
-0.1016174703836441,
1.2151826620101929,
-0.5382025837898254,
-0.1490965038537979,
0.1420455127954483,
-0.3442788124084472... |
func newServiceAccount(cr *argoprojv1a1.ArgoCD) *corev1.ServiceAccount {
return &corev1.ServiceAccount{
ObjectMeta: metav1.ObjectMeta{
Name: cr.Name,
Namespace: cr.Namespace,
Labels: argoutil.LabelsForCluster(cr),
},
}
} | [
0.10047932714223862,
-1.1450145244598389,
0.28701943159103394,
0.22942186892032623,
-0.8017190098762512,
0.11047042161226273,
1.165142297744751,
-0.12593598663806915,
-0.0642741471529007,
0.3826782703399658,
0.12310059368610382,
1.670548915863037,
0.1738833636045456,
0.4929746389389038,
... |
func newServiceAccountWithName(name string, cr *argoprojv1a1.ArgoCD) *corev1.ServiceAccount {
sa := newServiceAccount(cr)
sa.ObjectMeta.Name = getServiceAccountName(cr.Name, name)
lbls := sa.ObjectMeta.Labels
lbls[common.ArgoCDKeyName] = name
sa.ObjectMeta.Labels = lbls
return sa
} | [
0.2633337080478668,
-1.4009740352630615,
0.31117576360702515,
-0.2237250953912735,
-1.2365827560424805,
-0.12696710228919983,
0.7603499293327332,
-0.671739935874939,
0.1018906906247139,
0.691523551940918,
-0.03252437338232994,
0.8601970672607422,
0.3604879081249237,
0.45191630721092224,
... |
func (r *ReconcileArgoCD) reconcileServiceAccounts(cr *argoprojv1a1.ArgoCD) error {
params := getPolicyRuleList(r.Client)
for _, param := range params {
if err := r.reconcileServiceAccountPermissions(param.name, param.policyRule, cr); err != nil {
return err
}
}
clusterParams := getPolicyRuleClusterRoleLis... | [
0.001759149832651019,
-0.11678982526063919,
0.5617949366569519,
0.3166198134422302,
0.4168602526187897,
0.22459913790225983,
0.974402129650116,
0.2914816439151764,
-0.38815221190452576,
0.38430264592170715,
1.016007423400879,
0.4709244966506958,
-0.8150457739830017,
0.503760039806366,
0.... |
func BenchmarkSumOfIntervals(b *testing.B) {
for index := 0; index < b.N; index++ {
SumOfIntervals([][2]int{{871449449, 877662470}, {-268549689, -261004812}, {-835388635, -828788097}, {45401873, 52949237}, {177585208, 181781905}, {-100271665, -95363846}, {946075754, 955466359}, {-190173129, -184597153}, {575878820, ... | [
0.5213695764541626,
0.07005545496940613,
1.2245081663131714,
-0.6912641525268555,
0.5519495606422424,
0.19980521500110626,
1.3052200078964233,
-0.6573781967163086,
0.23474161326885223,
0.412748783826828,
-0.8540810346603394,
0.06728193908929825,
0.3540804088115692,
-0.2695463001728058,
-... |
func main() {
var n, x, y int
fmt.Scan(&n)
/*
x, y > n
n < x <= 2*n
y = (n*x) / x - n
x = 2*n
tant que x > n
x--
y = (n*x) / (x-n)
if (n*x) % (x-n) == 0 and y > n alors
found solution: y = (n*x) / (x-n)
sinon KO
*/
for x = n + 1; x <= 2*n; x++ {
... | [
-0.3904890716075897,
0.5024244785308838,
0.6058720946311951,
0.6051582098007202,
-0.788207471370697,
-0.02743687480688095,
0.04601225256919861,
-1.7941313982009888,
-0.27934521436691284,
-0.14366969466209412,
0.04505004361271858,
-0.08894220739603043,
0.5822914838790894,
0.4864127933979034... |
func NewParser(r io.Reader) textparse.Parser {
// TODO(dipack95): Maybe use bufio.Reader.Readline instead?
// https://stackoverflow.com/questions/21124327/how-to-read-a-text-file-line-by-line-in-go-when-some-lines-are-long-enough-to-ca
return &Parser{s: bufio.NewScanner(r)}
} | [
0.6251526474952698,
-1.5142303705215454,
0.2096582055091858,
-0.6658102869987488,
-1.2464449405670166,
-0.3674452602863312,
-0.9972904920578003,
0.6522355675697327,
0.09844905138015747,
-0.7779492139816284,
0.03300270810723305,
-0.7203428149223328,
0.006119479425251484,
0.31507569551467896... |
func (p *Parser) Next() (textparse.Entry, error) {
for p.s.Scan() {
// TODO(bwplotka): Assuming all line by line. If not do refetch like in previous version with more lines.
line := p.s.Bytes()
p.Parser = textparse.New(line, "") // use promtext format
if et, err := p.Parser.Next(); err != io.EOF {
return e... | [
0.5506681203842163,
-0.18533769249916077,
0.48243752121925354,
0.3310997486114502,
-1.146235466003418,
-0.004604026209563017,
-0.5389367938041687,
-0.13679368793964386,
0.15411585569381714,
-0.11678805202245712,
0.6572708487510681,
0.34465834498405457,
-0.1913234144449234,
0.73533082008361... |
func (p *Parser) Series() ([]byte, *int64, float64) {
b, ts, v := p.Parser.Series()
return b, ts, v
} | [
-0.45573168992996216,
0.3152516782283783,
0.3733440637588501,
-0.23175910115242004,
0.6810829043388367,
-0.0706474781036377,
-0.15902253985404968,
-0.7867212891578674,
-0.6835199594497681,
-0.2509252727031708,
-0.7626968026161194,
0.614582359790802,
-0.38057953119277954,
0.1314398944377899... |
func New(input ...interface{}) (SteamID, error) {
steamID := SteamID{UniverseInvalid, TypeInvalid, InstanceAll, 0}
if len(input) == 0 {
return steamID, nil
}
idstr := fmt.Sprintf("%v", input[0])
id2 := regexp.MustCompile("^STEAM_([0-5]):([0-1]):([0-9]+)$")
if id2.MatchString(idstr) {
sidid2 := id2.FindStri... | [
-0.34811127185821533,
-0.7977286577224731,
1.0282891988754272,
-0.24609699845314026,
-1.2328877449035645,
0.1127568706870079,
0.3445262610912323,
0.46252134442329407,
-0.21577699482440948,
0.11927022784948349,
-0.3955129086971283,
1.2142889499664307,
0.08678878098726273,
0.3400267064571380... |
func (sid *SteamID) IsValid() bool {
if sid.Type <= TypeInvalid || sid.Type > TypeAnonUser {
return false
}
if sid.Universe <= UniverseInvalid || sid.Universe > UniverseDev {
return false
}
if sid.Type == TypeIndividual && (sid.AccountID == 0 || sid.Instance > InstanceWeb) {
return false
}
if sid.Type ... | [
-0.5604497790336609,
-1.008838415145874,
0.6379374265670776,
0.4177875220775604,
-0.38046759366989136,
0.5451018810272217,
0.0489022359251976,
-0.5318226218223572,
1.2804185152053833,
-0.3621307909488678,
0.16744689643383026,
2.0485565662384033,
-0.689649760723114,
0.6358018517494202,
0.... |
func (sid *SteamID) IsGroupChat() bool {
return !!(sid.Type == TypeChat && (sid.Instance&chatInstanceFlagClan) != 0)
} | [
-0.18130797147750854,
-0.15763790905475616,
0.5069273114204407,
0.5801337957382202,
-0.32215073704719543,
0.26047998666763306,
0.49915850162506104,
-0.8653725981712341,
0.05129369720816612,
0.1720053255558014,
0.432529091835022,
1.3508926630020142,
-0.6275021433830261,
0.6774951815605164,
... |
func (sid *SteamID) IsLobby() bool {
return !!(sid.Type == TypeChat &&
((sid.Instance&chatInstanceFlagLobby) != 0 ||
(sid.Instance&chatInstanceFlagMMSLobby) != 0))
} | [
-0.3844272196292877,
-0.21390043199062347,
0.6401048898696899,
0.9059296250343323,
-0.7669914364814758,
0.7428946495056152,
0.10967416316270828,
-0.8180833458900452,
0.8132585883140564,
-0.1991025060415268,
-0.8728986978530884,
0.8158745169639587,
-0.8693695068359375,
0.9476865530014038,
... |
func (sid *SteamID) GetSteam2RenderedID(newerFormat ...bool) string {
universe := 0
if len(newerFormat) > 0 && newerFormat[0] && universe == 0 {
universe = 1
}
return "STEAM_" + strconv.Itoa(universe) + ":" + strconv.Itoa(sid.AccountID&1) + ":" + strconv.Itoa(sid.AccountID/2)
} | [
-0.035172853618860245,
-0.8412063121795654,
0.9280574917793274,
-0.48918333649635315,
-0.8159202337265015,
0.06705331057310104,
-0.37145447731018066,
-0.2377985119819641,
-0.4460400342941284,
-0.6255432367324829,
0.2566904127597809,
1.583014965057373,
0.10216090083122253,
0.144205123186111... |
func (sid *SteamID) GetSteam3RenderedID() string {
typeChar := "i"
switch sid.Type {
case TypeInvalid:
typeChar = "i"
case TypeIndividual:
typeChar = "U"
case TypeMultiSeat:
typeChar = "M"
case TypeGameServer:
typeChar = "G"
case TypeAnonGameServer:
typeChar = "A"
case TypePending:
typeChar = "P"
... | [
-0.08741030097007751,
-0.40000835061073303,
0.9530388116836548,
-0.9308692812919617,
-0.7276579141616821,
0.6744717359542847,
-0.18696622550487518,
-0.012855724431574345,
0.7700030207633972,
-0.07694526016712189,
-0.25770431756973267,
1.5672852993011475,
-0.9699003100395203,
-0.10841950774... |
func (sid *SteamID) GetSteamID64() uint64 {
highPart := uint64((sid.Universe<<24)|(sid.Type<<20)|sid.Universe) << 32
return highPart | uint64(sid.AccountID)
} | [
-0.12016478925943375,
-0.06413668394088745,
0.5612520575523376,
0.8664555549621582,
0.2729843854904175,
-0.5733827352523804,
-0.049022603780031204,
-0.6883917450904846,
0.5939959287643433,
-0.46025320887565613,
-0.4404284656047821,
1.0455716848373413,
-0.4359630048274994,
0.255200386047363... |
func (client OperationsClient) ListKeys(ctx context.Context) (result *ListKeyResponse, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, "ListKeys")
defer func() {
sc := -1
/* if result.olr.Response.Response != nil {
sc = result.olr.Response.Response.StatusCode
} */
tracing.EndS... | [
-0.8868592977523804,
0.0027360108215361834,
0.8849252462387085,
0.14577531814575195,
-0.5581896305084229,
-0.37625452876091003,
0.8252460956573486,
-1.0824589729309082,
0.7366107106208801,
0.8167517781257629,
0.014226803556084633,
0.6941246390342712,
-0.5202893018722534,
-0.284000962972641... |
func (client OperationsClient) preparer(ctx context.Context) (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.config.Endpoint),
autorest.WithPath("/keys"),
NewHMACAuthorizer(client.config.ID, client.config.Secret).WithAuthorization(),
)
return prepar... | [
0.07167262583971024,
0.3367514908313751,
0.5308923125267029,
0.9775266051292419,
-0.8075664639472961,
-0.21261030435562134,
0.025081362575292587,
-0.483845591545105,
0.09725639969110489,
-0.6496556997299194,
0.7981513142585754,
0.008754834532737732,
0.4175680875778198,
0.4199541509151459,
... |
func (client OperationsClient) sender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req,
autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
} | [
-0.0628390684723854,
-0.5310677886009216,
0.42137154936790466,
0.8588235974311829,
-0.05078615993261337,
-0.20608089864253998,
0.69443279504776,
-0.6504335999488831,
-0.21225093305110931,
-0.1616022288799286,
-0.019723882898688316,
0.23107175529003143,
0.3614901602268219,
0.040703080594539... |
func (client OperationsClient) responder(resp *http.Response) (result *ListKeyResponse, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
return
} | [
-0.2544061839580536,
-0.8030271530151367,
0.42668986320495605,
-0.021301547065377235,
-0.18815118074417114,
-0.541858434677124,
0.769597053527832,
-0.6184595227241516,
0.5229073166847229,
-0.3252304196357727,
-0.12634333968162537,
-0.6241651177406311,
-0.13263675570487976,
0.29705938696861... |
func haar(input []float32, depth int) []float32 {
//Sums and subtraction array, later we append subtract to the sums
sums := make([]float32, 0, len(input)/2)
subtr := make([]float32, 0, len(input)/2)
//Input should always be just a row
//So we're expecting 8 x of 8 sized rows to be inputted N times
for i := 1; i ... | [
0.30486512184143066,
0.7455191612243652,
0.9789049625396729,
0.26298245787620544,
-0.7545075416564941,
-0.2555558383464813,
0.811885416507721,
-0.6333381533622742,
0.42559340596199036,
-0.3938193619251251,
0.6850678324699402,
-0.17737093567848206,
0.4129398763179779,
1.5090242624282837,
... |
func getRow(block [][]float32, index int) []float32 {
row := block[index][:]
return row
} | [
0.30627158284187317,
0.9147852063179016,
0.4102284014225006,
0.47234025597572327,
0.4379229247570038,
-0.5261325836181641,
0.016645336523652077,
-0.9561871886253357,
0.020495133474469185,
0.1933230608701706,
0.4412754774093628,
1.0032472610473633,
-0.05039437860250473,
0.25666549801826477,... |
func getColumn(block [][]float32, index int) []float32 {
column := make([]float32, 8)
//alternative := block[:][index]
for i := range column {
column[i] = block[i][index]
}
return column
} | [
0.6574167013168335,
-0.3488004505634308,
0.6669753789901733,
0.46316757798194885,
1.3098440170288086,
-0.5479798316955566,
0.4562142491340637,
-0.4662967622280121,
-0.41573113203048706,
0.5749019384384155,
-0.7727487087249756,
1.2660516500473022,
0.25505974888801575,
-0.5143551230430603,
... |
func indent(text, indent string) string {
if text[len(text)-1:] == "\n" {
result := ""
for _, j := range strings.Split(text[:len(text)-1], "\n") {
result += indent + j + "\n"
}
return result
}
result := ""
for _, j := range strings.Split(strings.TrimRight(text, "\n"), "\n") {
result += indent + j + "\n... | [
0.5709145069122314,
0.34937018156051636,
0.7343098521232605,
-0.26746290922164917,
-1.0076535940170288,
-0.7914605140686035,
-0.7436525821685791,
-0.17081885039806366,
-0.2871190905570984,
0.20102103054523468,
0.6650031208992004,
0.6128458976745605,
-0.7437565922737122,
-0.6103862524032593... |
func (p *clientConnPool) getStartDialLocked(ctx context.Context, addr string) *dialCall {
if call, ok := p.dialing[addr]; ok {
// A dial is already in-flight. Don't start another.
return call
}
call := &dialCall{p: p, done: make(chan struct{}), ctx: ctx}
if p.dialing == nil {
p.dialing = make(map[string]*dial... | [
-0.0005212943069636822,
0.06940606981515884,
0.772296130657196,
0.08306269347667694,
-0.08450248092412949,
0.13263554871082306,
0.08244699239730835,
-1.0688809156417847,
0.989553689956665,
-0.22800946235656738,
-0.10121798515319824,
1.259525179862976,
-0.371925413608551,
-0.084363281726837... |
func (c *dialCall) dial(ctx context.Context, addr string) {
const singleUse = false // shared conn
c.res, c.err = c.p.t.dialClientConn(ctx, addr, singleUse)
c.p.mu.Lock()
delete(c.p.dialing, addr)
if c.err == nil {
c.p.addConnLocked(addr, c.res)
}
c.p.mu.Unlock()
close(c.done)
} | [
0.23990675806999207,
0.3915768265724182,
0.6413888931274414,
0.1798582375049591,
-0.19742847979068756,
0.7891719341278076,
0.2959362864494324,
0.19204868376255035,
0.9590524435043335,
0.5003760457038879,
0.2649489641189575,
0.532477617263794,
-0.6482942700386047,
0.006584652233868837,
0.... |
func (p *clientConnPool) addConnIfNeeded(key string, t *Transport, c *tls.Conn) (used bool, err error) {
p.mu.Lock()
for _, cc := range p.conns[key] {
if cc.CanTakeNewRequest() {
p.mu.Unlock()
return false, nil
}
}
call, dup := p.addConnCalls[key]
if !dup {
if p.addConnCalls == nil {
p.addConnCalls ... | [
-0.8356233239173889,
-0.018913855776190758,
0.9502801299095154,
-0.2005276381969452,
0.05312494933605194,
0.37821164727211,
-0.856509804725647,
-1.013630986213684,
-0.6633764505386353,
0.21040846407413483,
-0.30690303444862366,
-0.6297757625579834,
-0.8146658539772034,
0.8014019131660461,
... |
func (p *clientConnPool) addConnLocked(key string, cc *ClientConn) {
for _, v := range p.conns[key] {
if v == cc {
return
}
}
if p.conns == nil {
p.conns = make(map[string][]*ClientConn)
}
if p.keys == nil {
p.keys = make(map[*ClientConn][]string)
}
p.conns[key] = append(p.conns[key], cc)
p.keys[cc] ... | [
-0.26949822902679443,
-0.5003741979598999,
0.6524612307548523,
-0.13010050356388092,
0.27844104170799255,
-0.1918039619922638,
-0.2977779507637024,
-0.35840892791748047,
0.06794459372758865,
0.2848045229911804,
-0.5409947633743286,
-0.09440317749977112,
-0.8395774960517883,
0.4728630781173... |
func shouldRetryDial(call *dialCall, req *http.Request) bool {
if call.err == nil {
// No error, no need to retry
return false
}
if call.ctx == req.Context() {
// If the call has the same context as the request, the dial
// should not be retried, since any cancellation will have come
// from this request.
... | [
-0.045276157557964325,
0.26183587312698364,
0.501426100730896,
0.19013838469982147,
-0.45572271943092346,
0.9952307939529419,
-1.157557725906372,
-0.5754004716873169,
1.1712931394577026,
-0.3751782774925232,
0.5078285932540894,
0.6807292103767395,
-0.10166391730308533,
-0.04335470125079155... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.