text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (lc *LicenseCreate) SetUpdateTime(t time.Time) *LicenseCreate {
lc.mutation.SetUpdateTime(t)
return lc
} | [
-0.5730255842208862,
0.2001125067472458,
0.39657658338546753,
0.34414276480674744,
-0.057327475398778915,
0.4474760591983795,
-0.9604437351226807,
1.273029088973999,
0.7946563959121704,
0.9225086569786072,
-0.782646894454956,
-1.3500630855560303,
0.34318628907203674,
0.9482491612434387,
... |
func (lc *LicenseCreate) SetNillableUpdateTime(t *time.Time) *LicenseCreate {
if t != nil {
lc.SetUpdateTime(*t)
}
return lc
} | [
-0.02026350423693657,
0.4121212363243103,
0.27940237522125244,
0.4882203936576843,
-1.4986789226531982,
0.01573539525270462,
-1.0426496267318726,
0.6652611494064331,
-0.09015506505966187,
0.6186714172363281,
-0.23954930901527405,
-1.8191556930541992,
-0.7071967124938965,
0.9341685175895691... |
func (lc *LicenseCreate) SetID(i int) *LicenseCreate {
lc.mutation.SetID(i)
return lc
} | [
0.19076639413833618,
-0.07276489585638046,
0.2853755056858063,
1.0871328115463257,
0.5628951787948608,
1.6130321025848389,
0.45542967319488525,
0.6514577865600586,
0.8359612226486206,
-0.22914062440395355,
-1.076981544494629,
-0.8474292755126953,
-0.3490939140319824,
0.4966844320297241,
... |
func (lc *LicenseCreate) Mutation() *LicenseMutation {
return lc.mutation
} | [
0.0657200813293457,
-0.8392810821533203,
0.12145842611789703,
0.09070006757974625,
0.11669570952653885,
0.5290824174880981,
0.14932075142860413,
0.4172053337097168,
1.2487303018569946,
-0.2873736321926117,
0.20927365124225616,
-0.25888946652412415,
-0.4146033227443695,
0.2763572931289673,
... |
func (lc *LicenseCreate) Save(ctx context.Context) (*License, error) {
lc.defaults()
return withHooks[*License, LicenseMutation](ctx, lc.gremlinSave, lc.mutation, lc.hooks)
} | [
0.2546873390674591,
-0.35185885429382324,
0.05247528851032257,
0.3917655944824219,
0.7227284908294678,
0.006621228531002998,
-0.015084078535437584,
-0.1027214452624321,
0.4102228581905365,
0.31585243344306946,
-0.49942728877067566,
-0.3155818581581116,
-0.8114960193634033,
0.39425605535507... |
func (lc *LicenseCreate) SaveX(ctx context.Context) *License {
v, err := lc.Save(ctx)
if err != nil {
panic(err)
}
return v
} | [
0.2980138957500458,
0.26401615142822266,
0.28595730662345886,
0.5135300159454346,
-0.43347877264022827,
1.2076468467712402,
-1.0669995546340942,
0.41701194643974304,
1.2355912923812866,
0.2531513273715973,
-0.9097201228141785,
-0.30264952778816223,
-0.5143704414367676,
0.15281438827514648,... |
func (lc *LicenseCreate) Exec(ctx context.Context) error {
_, err := lc.Save(ctx)
return err
} | [
0.6641791462898254,
-0.15722475945949554,
0.5156171917915344,
0.09733790904283524,
0.7566621899604797,
1.5321813821792603,
-0.5448262095451355,
0.25422894954681396,
0.04060986265540123,
0.1764649897813797,
-0.3560131788253784,
-0.36563241481781006,
-0.06536344438791275,
0.10901100933551788... |
func (lc *LicenseCreate) ExecX(ctx context.Context) {
if err := lc.Exec(ctx); err != nil {
panic(err)
}
} | [
1.159941554069519,
0.4563845992088318,
0.5516105890274048,
0.1519971489906311,
0.4842761158943176,
1.5431379079818726,
-1.0006606578826904,
0.35244375467300415,
0.583375871181488,
-0.25118371844291687,
0.0964648574590683,
0.5051938891410828,
0.49546128511428833,
0.24887673556804657,
0.60... |
func (lc *LicenseCreate) defaults() {
if _, ok := lc.mutation.CreateTime(); !ok {
v := license.DefaultCreateTime()
lc.mutation.SetCreateTime(v)
}
if _, ok := lc.mutation.UpdateTime(); !ok {
v := license.DefaultUpdateTime()
lc.mutation.SetUpdateTime(v)
}
} | [
-0.13583460450172424,
0.41863012313842773,
0.30771419405937195,
0.03937855362892151,
1.0890429019927979,
-0.2436370849609375,
-0.8393235206604004,
0.20528563857078552,
0.3863517642021179,
-0.04727311432361603,
-0.39205121994018555,
-0.3487316071987152,
0.06062325835227966,
0.99354237318038... |
func (lc *LicenseCreate) check() error {
if _, ok := lc.mutation.CreateTime(); !ok {
return &ValidationError{Name: "create_time", err: errors.New(`ent: missing required field "License.create_time"`)}
}
if _, ok := lc.mutation.UpdateTime(); !ok {
return &ValidationError{Name: "update_time", err: errors.New(`ent: ... | [
-0.0663728341460228,
0.34026429057121277,
0.5972689986228943,
0.10172362625598907,
0.8023936748504639,
1.0073859691619873,
-0.32521891593933105,
0.43602457642555237,
-0.519501805305481,
0.6444265842437744,
0.2458960860967636,
-0.3516131341457367,
0.06277590245008469,
1.7789480686187744,
... |
func bbSaveNote(w http.ResponseWriter, r *http.Request) {
taskId := gimlet.GetVars(r)["task_id"]
n := &model.Note{}
if err := utility.ReadJSON(r.Body, n); err != nil {
gimlet.WriteJSONError(w, err.Error())
return
}
// prevent incredibly large notes
if len(n.Content) > maxNoteSize {
gimlet.WriteJSONError(w,... | [
-0.6477569937705994,
0.5230176448822021,
0.9275745749473572,
-0.365160197019577,
0.19122599065303802,
-0.37365230917930603,
0.026544610038399696,
-0.6537973284721375,
0.1005050539970398,
1.2714933156967163,
-0.2597484588623047,
0.21197831630706787,
-0.19694499671459198,
0.2498226761817932,... |
func bbGetNote(w http.ResponseWriter, r *http.Request) {
taskId := gimlet.GetVars(r)["task_id"]
n, err := model.NoteForTask(taskId)
if err != nil {
gimlet.WriteJSONInternalError(w, err.Error())
return
}
if n == nil {
gimlet.WriteJSON(w, "")
return
}
gimlet.WriteJSON(w, n)
} | [
-0.45453763008117676,
0.04204200208187103,
0.6604399681091309,
-0.5622612833976746,
0.2699114978313446,
-0.1823025941848755,
-0.10497113317251205,
-0.45875459909439087,
-0.6570464372634888,
1.0165789127349854,
0.5917910933494568,
0.7058036923408508,
-0.30748456716537476,
0.3178770840167999... |
func (uis *UIServer) bbFileTicket(w http.ResponseWriter, r *http.Request) {
var input struct {
TaskId string `json:"task"`
TestIds []string `json:"tests"`
}
if err := json.NewDecoder(r.Body).Decode(&input); err != nil {
gimlet.WriteJSONInternalError(w, err.Error())
}
// Find information about the task
... | [
0.4198683500289917,
0.3667218089103699,
0.661421000957489,
-1.0023910999298096,
0.2466910034418106,
0.30379518866539,
0.6676924824714661,
-0.1433483213186264,
-1.2800219058990479,
0.4163466989994049,
-0.6096880435943604,
-0.035815391689538956,
-0.26648178696632385,
0.23547406494617462,
-... |
func (js *jiraSuggest) Suggest(ctx context.Context, t *task.Task) ([]thirdparty.JiraTicket, error) {
jql := t.GetJQL(js.bbProj.TicketSearchProjects)
results, err := js.jiraHandler.JQLSearch(jql, 0, -1)
if err != nil {
return nil, err
}
return results.Issues, nil
} | [
-0.772607147693634,
0.4614664316177368,
0.5105695128440857,
-0.33069276809692383,
-0.31478580832481384,
-0.29481130838394165,
-0.47083359956741333,
-0.8182200789451599,
-0.8121808767318726,
0.601716935634613,
-0.19456258416175842,
0.019101226702332497,
-0.48741382360458374,
0.5267350077629... |
func (m *RateLimitServiceConfig) GetClusterName() string {
if x, ok := m.GetServiceSpecifier().(*RateLimitServiceConfig_ClusterName); ok {
return x.ClusterName
}
return ""
} | [
0.26490429043769836,
0.822339653968811,
0.5345293879508972,
0.3840579092502594,
-0.43323850631713867,
0.004928162321448326,
0.3021177053451538,
0.28739216923713684,
0.33980050683021545,
0.7070992588996887,
0.5667238235473633,
1.010900616645813,
-0.5791266560554504,
-0.23108242452144623,
... |
func (*RateLimitServiceConfig) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _RateLimitServiceConfig_OneofMarshaler, _RateLimitServiceConfig_OneofUnmarshaler, _RateLimitSe... | [
0.04789556562900543,
1.1128891706466675,
0.5250774025917053,
-1.0991121530532837,
0.29101261496543884,
-0.42126625776290894,
0.6198848485946655,
-0.7993648052215576,
0.3242761492729187,
-0.14563384652137756,
-0.369049608707428,
0.339860200881958,
-0.3956694006919861,
0.4554300904273987,
... |
func NewWriter(w io.Writer, t Type, typeID DatabaseTypeID) geodbtools.Writer {
return &writer{
w: w,
t: t,
typeID: typeID,
}
} | [
0.3794851303100586,
-0.14745405316352844,
0.15902122855186462,
0.49425336718559265,
0.2628217339515686,
0.26706621050834656,
0.21163903176784515,
-0.6640646457672119,
-0.6751217246055603,
1.2241642475128174,
0.5884678363800049,
-0.03968452662229538,
-0.12779633700847626,
0.2154511213302612... |
func GetTestPod(sharedDir string) *v1.Pod {
id := uuid.NewUUID()
pod := &v1.Pod{
TypeMeta: metav1.TypeMeta{
Kind: "Pod",
APIVersion: "v1",
},
ObjectMeta: metav1.ObjectMeta{
UID: id,
Name: fmt.Sprintf("pod-%v", id[:8]),
Namespace: fmt.Sprintf("namespace-%v", id[:8]),
},
}
if s... | [
-0.22326365113258362,
-0.3582116961479187,
0.8137069344520569,
-0.7448467016220093,
0.42858201265335083,
0.16108347475528717,
1.058953046798706,
-0.2830115258693695,
0.8626929521560669,
0.460297554731369,
0.255327045917511,
0.24492408335208893,
-0.44079089164733887,
-0.5364897847175598,
... |
func newMathIParser() parser.InlineParser {
return defaultMathIParser
} | [
-0.18125596642494202,
-1.3049458265304565,
0.2359730750322342,
-0.16310925781726837,
-1.680217981338501,
-0.25376686453819275,
-0.659806489944458,
0.6176294088363647,
0.14931470155715942,
-0.7919232249259949,
0.09134096652269363,
-0.954964280128479,
0.1846611052751541,
-0.32925480604171753... |
func FindDupes(s store.SecretStore, id store.SecretIdentifier, envs []store.Environment) ([]store.SecretIdentifier, error) {
secret, err := s.Read(id)
if err != nil {
return []store.SecretIdentifier{}, err
}
var dupes []store.SecretIdentifier
for _, e := range envs {
log.Printf("reading from %s\n", e.String())... | [
-0.5676463842391968,
-0.3681313991546631,
0.6095030307769775,
0.483246386051178,
0.4597271680831909,
-0.11999136954545975,
-0.39960935711860657,
-0.5694589018821716,
0.3911844789981842,
0.7178747653961182,
-0.43309712409973145,
0.36602717638015747,
-0.6644609570503235,
0.8828353881835938,
... |
func DisplayAppError(w http.ResponseWriter, handlerError error, message string, code int) {
errObj := errorMessage{
Error: handlerError.Error(),
Code: code,
Message: message,
}
log.Error("Error processing request")
w.Header().Set("Content-Type", "application/json; charset=utf-8")
w.WriteHeader(code)... | [
-0.5976784229278564,
-0.3699002265930176,
0.6743625998497009,
-0.24088133871555328,
-0.9052714109420776,
0.5651010274887085,
0.07859303057193756,
-0.5275235176086426,
-0.2639904022216797,
0.5055027604103088,
1.1478930711746216,
0.06831767410039902,
0.6014991402626038,
0.7525461912155151,
... |
func SetSystime(t int64) {
if t == 0 {
transferTime = 0
localTime = 0
sysTimeDiff = 0
return
}
transferTime = t
localTime = time.Now().Unix()
sysTimeDiff = transferTime - localTime
if sysTimeDiff < 0 {
sysTimeDiff = 0 - sysTimeDiff
}
} | [
-0.25408363342285156,
0.06204137206077576,
0.5479743480682373,
0.6612569093704224,
-0.16849832236766815,
-0.09745606034994125,
-0.010144323110580444,
0.2195267230272293,
0.04723180830478668,
0.7723997235298157,
-1.0562548637390137,
0.24610471725463867,
-0.5342084765434265,
1.57400739192962... |
func SystimeMetrics() ([]*models.Metric, error) {
return []*models.Metric{
{
Name: systimeMetricName,
Value: float64(sysTimeDiff),
Fields: map[string]interface{}{
"portal": transferTime,
"local": localTime,
"absdiff": sysTimeDiff,
},
},
}, nil
} | [
0.5057386755943298,
0.054416120052337646,
0.31268277764320374,
-0.3434036672115326,
0.031804196536540985,
0.2674110531806946,
0.3147270083427429,
-0.26915693283081055,
-0.1372653990983963,
1.1676372289657593,
-1.8048365116119385,
-0.04793636128306389,
-0.18845197558403015,
0.86459583044052... |
func readHeader(conn net.Conn) (mtype MTypeID, datalen uint16, err error) {
var _mtype MTypeID
var _datalen uint16
// Block forever to read the fixed length header.
header, err := readData(conn, MessageHdrLen, time.Duration(0))
if err != nil {
return 0, 0, err
}
_mtype = MTypeID(header[0]) | (MTypeID(header[... | [
0.08629308640956879,
-0.5206612944602966,
0.6806851625442505,
0.0864567682147026,
0.07718579471111298,
-0.0013911679852753878,
-0.5166611075401306,
-0.5803171396255493,
-0.4926862120628357,
0.0449359305202961,
-0.32832229137420654,
0.5243584513664246,
-1.152190923690796,
1.0092275142669678... |
func readData(conn net.Conn,
datalen uint16,
timeout time.Duration) ([]byte, error) {
rb := 0
tb := int(datalen)
data := make([]byte, datalen)
if timeout.Nanoseconds() != 0 {
// The read operation will eventually timeout.
conn.SetReadDeadline(time.Now().Add(timeout))
} else {
// The read operation will bl... | [
0.10283906757831573,
0.5555480718612671,
0.5306364297866821,
0.3315225839614868,
-0.0864979699254036,
0.08644259721040726,
-1.4537353515625,
-0.14985832571983337,
-0.7179258465766907,
-0.1481732428073883,
0.24748288094997406,
-0.14687585830688477,
-0.10625855624675751,
-0.16052448749542236... |
func handlerRunner(msgHandler *mtypeInfo, conn net.Conn, data []byte) {
start := time.Now()
// Run the handler for this message type.
msgHandler.handler(conn, data)
// Update statistics for this message type.
msgHandler.statsLock.Lock()
msgHandler.stats.TotRuntime += time.Since(start)
msgHandler.stats.NrCalls +=... | [
-0.20771971344947815,
-0.23633752763271332,
0.48756682872772217,
-0.24914085865020752,
-0.04736780375242233,
0.3694198429584503,
0.712724506855011,
-0.18312665820121765,
-0.7310215830802917,
-0.5739312171936035,
-0.5087457299232483,
0.35277119278907776,
-0.3724074065685272,
1.1309905052185... |
func handleConnection(ms *TLVServ, conn net.Conn) {
var msgHandler *mtypeInfo
var ok bool
defer conn.Close()
log.Printf("%s connected\n", conn.RemoteAddr())
for {
// Block till there is data to read.
mtype, datalen, readErr := readHeader(conn)
if readErr != nil {
if readErr == io.EOF {
log.Printf("... | [
0.05155109986662865,
-0.8643258810043335,
0.6306654214859009,
-0.05992722511291504,
-0.05676865950226784,
-0.05714553967118263,
0.08689027279615402,
-0.30706387758255005,
-0.7358621954917908,
0.111491858959198,
0.29179316759109497,
-0.3044363856315613,
-0.21450106799602509,
0.5241457223892... |
func acceptConnections(ms *TLVServ, schan chan error) {
ln, err := net.Listen(ms.network, ms.addr)
if err == nil {
// Tell the caller the server is up and running.
schan <- nil
for {
conn, err := ln.Accept()
if err == nil {
go handleConnection(ms, conn)
} else {
log.Println(err)
}
}
} els... | [
-0.2865273952484131,
-0.4861794114112854,
0.48348480463027954,
-0.5091639757156372,
-0.0037010908126831055,
0.2228441685438156,
0.3649066388607025,
0.15374118089675903,
-0.1612052023410797,
-0.08698751032352448,
0.01811940036714077,
-0.404078871011734,
-0.0545891709625721,
0.62624639272689... |
func (ms *TLVServ) GetStats(mtype MTypeID) *MTypeIDStats {
ms.mtypeHandlersLock.RLock()
msgInfo, ok := ms.mtypeHandlers[mtype]
ms.mtypeHandlersLock.RUnlock()
if ok == true {
// Return a copy of the statistics object to avoid the caller needing
// to care about synchronization between themselves and the
// han... | [
0.035521216690540314,
0.031271107494831085,
0.45469871163368225,
-0.32959622144699097,
-0.10692403465509415,
-0.5454043745994568,
0.41742998361587524,
-2.0653231143951416,
0.9253849983215332,
-0.6943879723548889,
-0.07841944694519043,
0.6448158621788025,
-1.4010248184204102,
0.720419585704... |
func Server(network string,
address string,
readTimeout time.Duration,
handlers map[MTypeID]func(net.Conn, []byte)) (*TLVServ, error) {
// Create a map of mtype => mtypeInfos
mtypeHandlers := make(map[MTypeID]*mtypeInfo)
for mtype, handlerFunc := range handlers {
v := new(mtypeInfo)
v.handler = handlerFunc
... | [
-0.24804933369159698,
-0.7911555171012878,
0.45472273230552673,
-0.11669761687517166,
-0.117481529712677,
0.40263286232948303,
-0.0007246554596349597,
0.1158025860786438,
-0.4631602168083191,
-0.6587550044059753,
-0.4620610475540161,
-0.04114999622106552,
-0.7213258743286133,
0.58390027284... |
func NewDFPStateHandler(e *echo.Group, us usecase.UsecaseCRUD) {
handler := &DFPStateHandler{
us: us,
}
e.GET("/dfp-states", handler.Get)
e.POST("/dfp-states", handler.UpdateOld)
} | [
-1.0789347887039185,
0.16848725080490112,
0.3438391089439392,
0.25098884105682373,
-0.29037317633628845,
-0.4484308063983917,
0.02976187691092491,
-0.11362100392580032,
0.3188997507095337,
-0.1776806116104126,
-0.28182411193847656,
-0.6975308656692505,
0.11926582455635071,
0.13333187997341... |
func (h *DFPStateHandler) Get(c echo.Context) error {
ctx := c.Request().Context()
if ctx == nil {
ctx = context.Background()
}
c.Response().Header().Set(echo.HeaderContentType, jsonapi.MediaType)
state := &models.DFPState{}
if err := h.us.Get(ctx, dfpstate.ID, state); err != nil {
log.Errorf("Error when get... | [
-1.6426620483398438,
0.16063636541366577,
0.7583893537521362,
0.03485361486673355,
-0.2160094529390335,
-0.6031004786491394,
-0.4106524586677551,
-0.5459719896316528,
-0.1433047503232956,
-0.5618668794631958,
-0.0972195565700531,
0.13333292305469513,
-0.5349801182746887,
-0.23415507376194,... |
func (h *DFPStateHandler) UpdateOld(c echo.Context) error {
var err error
ctx := c.Request().Context()
if ctx == nil {
ctx = context.Background()
}
c.Response().Header().Set(echo.HeaderContentType, jsonapi.MediaType)
state := &models.DFPState{}
if err = jsonapi.UnmarshalPayload(c.Request().Body, state); err !... | [
-1.401901364326477,
-0.27273762226104736,
1.1088833808898926,
-0.017808925360441208,
-0.4529127776622772,
-0.2290775179862976,
0.0741896703839302,
-0.431897908449173,
0.009529047645628452,
-0.2595357298851013,
-0.7242120504379272,
-0.08085905760526657,
-0.2524557113647461,
-0.1786396652460... |
func GetPort() string {
port := os.Getenv("PORT")
if len(port) == 0 {
port = "9898"
}
return ":" + port
} | [
0.6354741454124451,
-0.04998508095741272,
0.4952889382839203,
0.3447066843509674,
0.9592556953430176,
0.5708390474319458,
0.2129969298839569,
0.16293103992938995,
-0.2283034473657608,
0.6015793681144714,
0.320006400346756,
-0.22063691914081573,
-0.20485606789588928,
0.03778448700904846,
... |
func ContextGetUserAgent(ctx context.Context) (*ua.UserAgent, bool) {
if userAgentStr, ok := ContextGetUserAgentString(ctx); ok {
userAgent := ua.Parse(userAgentStr)
return &userAgent, true
}
return nil, false
} | [
-0.4179820716381073,
-0.5504686236381531,
0.5327044129371643,
0.42756035923957825,
-0.8728570342063904,
-0.4955551028251648,
-0.33128735423088074,
-0.44178420305252075,
1.4743889570236206,
-0.017683690413832664,
-0.7583767771720886,
0.4507175385951996,
-0.5240461826324463,
-1.0915414094924... |
func ContextGetUserAgentString(ctx context.Context) (string, bool) {
md, ok := metadata.FromIncomingContext(ctx)
if !ok {
return "", false
}
userAgentLst, ok := md[UserAgentHeader]
if !ok {
userAgentLst, ok = md["user-agent"]
if !ok {
return "", false
}
}
if len(userAgentLst) == 0 {
return "", false... | [
-0.48873037099838257,
-0.5754504203796387,
0.7787293195724487,
0.2594802677631378,
-0.9824150800704956,
0.078974150121212,
-0.6091700792312622,
-0.6272151470184326,
0.9237560033798218,
1.079237699508667,
0.23242726922035217,
-0.03773815929889679,
-0.2640628516674042,
-0.8135694861412048,
... |
func ReadIO(in io.Reader) (l *Line, err error) {
s := bufio.NewScanner(in)
// scan once to get the first line
if s.Scan() == false || s.Err() != nil {
return nil, s.Err()
}
l = &Line{data: s.Text()}
scanIO(l, s)
return l, s.Err()
} | [
0.3411748707294464,
-0.05799751356244087,
0.5465924143791199,
0.4733155071735382,
-0.6322138905525208,
-0.05260806158185005,
-0.5354822874069214,
-0.4236827790737152,
-0.15134687721729279,
-1.0685733556747437,
-0.4971258044242859,
-0.4900825321674347,
0.19120252132415771,
0.075354218482971... |
func TestOwnershipDiff(t *testing.T) {
users := []*user.User{
fakeUser("1", "1", "user-1"),
fakeUser("2", "2", "user-2"),
fakeUser("3", "3", "user-3"),
}
groups := []*user.Group{
fakeGroup("1", "group-1"),
fakeGroup("2", "group-2"),
fakeGroup("3", "group-3"),
}
m := newMockOS(nil, users, groups, nil, n... | [
-0.4018719792366028,
-0.14720627665519714,
0.7815895080566406,
0.4523000419139862,
-0.023500967770814896,
0.27596795558929443,
1.049442172050476,
-0.3189660310745239,
-0.21969740092754364,
-0.6132007837295532,
0.17570394277572632,
0.12442771345376968,
-0.14137323200702667,
-0.0371523611247... |
func TestApplyOwnershipDiff(t *testing.T) {
users := []*user.User{
fakeUser("1", "1", "user-1"),
fakeUser("2", "2", "user-2"),
}
groups := []*user.Group{
fakeGroup("1", "group-1"),
fakeGroup("2", "group-2"),
}
ownershipRecords := []ownershipRecord{
makeOwned("foo", "user-1", "1", "group-1", "1"),
}
m :... | [
-0.25344401597976685,
0.17433364689350128,
0.7241634726524353,
0.2917048931121826,
-0.1832905262708664,
0.45797523856163025,
0.8053605556488037,
-0.35952410101890564,
0.04194745793938637,
-0.7783412933349609,
-0.389443576335907,
0.06906545907258987,
0.22722217440605164,
0.45608407258987427... |
func NewBirthNode(value string, children ...Node) *BirthNode {
return &BirthNode{
newSimpleNode(TagBirth, value, "", children...),
}
} | [
0.8188179731369019,
-0.16275928914546967,
0.4089154899120331,
0.5602240562438965,
-0.9603361487388611,
0.22887007892131805,
-0.14804843068122864,
-0.2161434441804886,
-0.2497413158416748,
-0.10400660336017609,
-1.022961139678955,
0.6231082081794739,
0.19912326335906982,
0.7830755710601807,... |
func (node *BirthNode) Dates() DateNodes {
return Dates(node)
} | [
-0.38096892833709717,
0.43989160656929016,
0.15110176801681519,
0.007576425094157457,
-0.013007107190787792,
0.7142465114593506,
-0.49286913871765137,
0.07410640269517899,
0.5979974865913391,
-0.637917697429657,
0.0016599108930677176,
0.8334315419197083,
0.1523171365261078,
0.9111524224281... |
func (node *BirthNode) Equals(node2 Node) bool {
if IsNil(node) {
return false
}
if IsNil(node2) {
return false
}
if _, ok := node2.(*BirthNode); !ok {
return false
}
return true
} | [
-0.9109619855880737,
-0.07537423074245453,
0.5366309881210327,
-0.00481836125254631,
-0.026974555104970932,
0.302243173122406,
-0.9609207510948181,
-0.4407535791397095,
-0.37149953842163086,
-0.15452615916728973,
-0.6933363676071167,
1.4262521266937256,
0.23201268911361694,
0.9114441871643... |
func Make(mode uint32) VAO {
vao := VAO{0, mode, nil, nil}
gl.GenVertexArrays(1, &vao.handle)
return vao
} | [
0.7260570526123047,
0.23179398477077484,
0.38759613037109375,
-0.23923726379871368,
-0.5332375764846802,
0.6761134266853333,
0.7310323119163513,
-0.15385551750659943,
-0.019261294975876808,
-0.7009426951408386,
-1.0873454809188843,
0.0001306136546190828,
0.3109391927719116,
-0.549771726131... |
func (vao *VAO) Delete() {
// delete buffers
if vao.vertexBuffers != nil {
for _, vertBuf := range vao.vertexBuffers {
vertBuf.Delete()
}
}
vao.indexBuffer.Delete()
// delete vertex array
gl.DeleteVertexArrays(1, &vao.handle)
} | [
1.7778249979019165,
-0.09784317016601562,
0.4562815725803375,
0.3286204934120178,
0.6983876824378967,
0.42066118121147156,
1.2872062921524048,
-0.36124053597450256,
1.1198281049728394,
0.013784795068204403,
-0.7435867786407471,
0.3842966854572296,
-0.42252418398857117,
0.2070893794298172,
... |
func (vao *VAO) Render() {
gl.BindVertexArray(vao.handle)
if vao.indexBuffer != nil {
gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, vao.indexBuffer.GetHandle())
gl.DrawElements(vao.mode, vao.indexBuffer.Len(), gl.UNSIGNED_SHORT, nil)
gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, 0)
} else {
gl.DrawArrays(vao.mode, 0, vao.... | [
0.8928000330924988,
-0.11877008527517319,
0.6216970086097717,
-0.02467346377670765,
0.6438357830047607,
0.5540151000022888,
0.45613235235214233,
0.20960214734077454,
1.217087745666504,
0.10099195688962936,
-0.49442383646965027,
0.1377447247505188,
-0.2746726870536804,
0.01908542588353157,
... |
func (vao *VAO) RenderInstanced(instancecount int32) {
gl.BindVertexArray(vao.handle)
if vao.indexBuffer != nil {
gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, vao.indexBuffer.GetHandle())
gl.DrawElementsInstanced(vao.mode, vao.indexBuffer.Len(), gl.UNSIGNED_SHORT, nil, instancecount)
gl.BindBuffer(gl.ELEMENT_ARRAY_BU... | [
0.4324776530265808,
0.22636938095092773,
0.7936719655990601,
-1.239787220954895,
0.050399765372276306,
1.1397513151168823,
0.4922473132610321,
0.6059997081756592,
0.9901095032691956,
0.020825220271945,
-0.8891586661338806,
0.58292555809021,
-0.8238018155097961,
0.31424060463905334,
-0.13... |
func (vao *VAO) AddVertexBuffer(vbo *vbo.VBO) {
vao.vertexBuffers = append(vao.vertexBuffers, vbo)
} | [
0.543971598148346,
-0.059695031493902206,
0.6385761499404907,
1.325545072555542,
0.18468114733695984,
0.6281108856201172,
0.14069947600364685,
-0.15277984738349915,
0.9072741270065308,
-0.32630378007888794,
-1.0348353385925293,
0.3373104929924011,
-1.0376250743865967,
0.7813602685928345,
... |
func (vao *VAO) AddIndexBuffer(ibo *ibo.IBO) {
vao.indexBuffer = ibo
} | [
0.0201171413064003,
-0.1180749386548996,
0.3752196133136749,
0.7401002049446106,
-0.07234630733728409,
0.8519154191017151,
1.028138279914856,
0.5419251322746277,
1.0952142477035522,
-0.7257115840911865,
-0.8690773248672485,
0.3394324779510498,
-1.64114511013031,
-0.051441751420497894,
0.... |
func (vao *VAO) GetVertexBuffer(idx int) *vbo.VBO {
return vao.vertexBuffers[idx]
} | [
0.4322241246700287,
0.31969383358955383,
0.2693469822406769,
1.5179064273834229,
-0.3136936128139496,
-0.2037096619606018,
0.1683225929737091,
-0.9988813996315002,
0.9803948402404785,
-0.1117972880601883,
-0.635615348815918,
0.6831349730491638,
-1.1895145177841187,
-0.5149114727973938,
-... |
func (vao *VAO) GetIndexBuffer() *ibo.IBO {
return vao.indexBuffer
} | [
0.31692424416542053,
-0.14719119668006897,
0.3178485631942749,
1.068379282951355,
-0.17418624460697174,
0.5087592601776123,
0.8066225051879883,
0.4913334846496582,
0.7708191275596619,
-0.5443752408027649,
-0.2698085904121399,
0.9512189626693726,
-1.8188660144805908,
-0.7264915108680725,
... |
func (vao *VAO) BuildBuffers(shaderProgramHandle uint32) {
gl.BindVertexArray(vao.handle)
for _, vbo := range vao.vertexBuffers {
vbo.BuildVertexAttributes(shaderProgramHandle)
}
gl.BindVertexArray(0)
} | [
0.5709778666496277,
-0.47734230756759644,
0.5419015884399414,
0.6791232228279114,
0.7273593544960022,
1.053099513053894,
0.905299723148346,
-0.1645684391260147,
0.47281283140182495,
-0.45529794692993164,
-0.550518810749054,
0.04048607125878334,
-0.5336465239524841,
0.29079023003578186,
-... |
func (c *Client) GetCustomField(name string) (CustomField, error) {
c.debugLog(fmt.Sprintf("[targetprocess] attempting to get CustomField: %s", name))
ret := CustomField{}
out := CustomFieldResponse{}
err := c.Get(&out, "CustomField", nil,
Where(fmt.Sprintf("Name == '%s'", name)),
First(),
)
if err != nil {
... | [
0.21704493463039398,
-0.07381676137447357,
0.4701766073703766,
-0.9002897143363953,
0.03141201660037041,
-0.7562401294708252,
0.33296701312065125,
-0.7115986943244934,
0.3929564952850342,
-0.03555682674050331,
-0.891497790813446,
0.8436300158500671,
-1.298926591873169,
-0.2776629328727722,... |
func NewLink() *Link {
return &Link{
ID: bson.NewObjectId(),
CreatedAt: bson.Now(),
}
} | [
0.016004301607608795,
-0.3687169551849365,
0.17313741147518158,
0.9105293154716492,
0.35222214460372925,
0.1302177906036377,
-0.264541894197464,
-0.559507429599762,
0.03117925114929676,
-1.3110648393630981,
-0.14001235365867615,
0.4793528616428375,
0.06936905533075333,
-0.00413285149261355... |
func (m *Link) Validate() (bool, []ValidationError) {
errors := []ValidationError{}
// Validate: Name
if len(m.Name) == 0 {
errors = append(errors, ValidationError{
"name", "Name is missing",
})
}
// Validate: URL
if len(m.URL) == 0 {
errors = append(errors, ValidationError{
"url", "URL is missing",... | [
-0.7735384702682495,
0.015176555141806602,
0.48849043250083923,
-0.08976665884256363,
0.5674399137496948,
0.23480649292469025,
-0.13781523704528809,
0.3106323182582855,
-0.6549971103668213,
-0.6726574897766113,
-0.4049105942249298,
-0.2894223630428314,
-0.6414608955383301,
1.12208974361419... |
func envFun(args ...object.Object) object.Object {
env := os.Environ()
newHash := make(map[object.HashKey]object.HashPair)
//
// If we get a match then the output is an array
// First entry is the match, any additional parts
// are the capture-groups.
//
for i := 1; i < len(env); i++ {
// Capture groups st... | [
-0.18798816204071045,
-1.200453519821167,
0.7018815279006958,
0.4087458848953247,
-0.03549153357744217,
-0.27053335309028625,
0.4227447807788849,
0.09107153862714767,
-1.0657048225402832,
0.9069536924362183,
-0.499230295419693,
0.5387743711471558,
0.42204469442367554,
-0.33413612842559814,... |
func getEnvFun(args ...object.Object) object.Object {
if len(args) != 1 {
return newError("wrong number of arguments. got=%d, want=1",
len(args))
}
if args[0].Type() != object.STRING_OBJ {
return newError("argument must be a string, got=%s",
args[0].Type())
}
input := args[0].(*object.String).Value
retu... | [
-0.4760110080242157,
-0.8147953748703003,
0.7945093512535095,
0.6109961271286011,
0.14838175475597382,
0.023328227922320366,
0.5434237718582153,
-0.40956857800483704,
-0.7472043633460999,
0.5826975107192993,
-0.02559238113462925,
1.6531684398651123,
0.09363570809364319,
-0.2164600938558578... |
func setEnvFun(args ...object.Object) object.Object {
if len(args) != 2 {
return newError("wrong number of arguments. got=%d, want=1",
len(args))
}
if args[0].Type() != object.STRING_OBJ {
return newError("argument must be a string, got=%s",
args[0].Type())
}
if args[1].Type() != object.STRING_OBJ {
re... | [
-0.5749995708465576,
-1.388339638710022,
0.9812607169151306,
0.11032711714506149,
-0.3064783811569214,
0.2409927248954773,
0.11265076696872711,
-0.4102478623390198,
-0.7283956408500671,
0.7949000000953674,
-1.031946063041687,
1.3707891702651978,
-0.14526021480560303,
-0.13289450109004974,
... |
func (m *StripeRefundSpecificFields) Validate(formats strfmt.Registry) error {
var res []error
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
0.15445691347122192,
0.6744768023490906,
0.26028871536254883,
-1.0123913288116455,
0.8269964456558228,
0.09742559492588043,
0.7012423276901245,
0.7106955051422119,
0.39837348461151123,
0.006849128287285566,
-0.2502540946006775,
0.6863482594490051,
-0.1342094987630844,
0.4831342399120331,
... |
func Unfollow(this *server.Context) error {
var (
req targetOpenID
)
openid, ok := this.Request().Context().Value("user").(*jwt.Token).Claims.(jwt.MapClaims)["open_id"].(string)
if !ok {
return response.WriteStatusAndDataJSON(this, constant.ErrInternalServerError, nil)
}
err := this.JSONBody(&req)
if err != ... | [
-1.0826506614685059,
-0.23597411811351776,
1.0313750505447388,
-0.27895647287368774,
-0.8059043884277344,
0.43868595361709595,
0.582118034362793,
-0.060383543372154236,
0.42256391048431396,
0.22465141117572784,
0.11780329048633575,
0.8080672025680542,
-0.3321157991886139,
0.364295989274978... |
func UseExistingDockerfile(f *customFactory, logger log.Logger) error {
logger.Info("Run sub test 'use_existing_dockerfile' of test 'init'")
logger.StartWait("Run test...")
defer logger.StopWait()
err := beforeTest(f, f.GetLog(), "tests/initcmd/testdata/data2")
defer afterTest(f)
if err != nil {
return errors.... | [
0.37861838936805725,
-0.5522263646125793,
1.0647969245910645,
0.16678348183631897,
0.3034188151359558,
0.4199700653553009,
2.0092597007751465,
-0.06114359200000763,
-0.30768653750419617,
-0.48746222257614136,
0.16420330107212067,
0.47791728377342224,
0.4717367887496948,
0.3833836615085602,... |
func SpeakerNotes(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")
fmt.Fprint(w, speakerNotesPage)
} | [
-0.003718123771250248,
-1.2160277366638184,
0.7022751569747925,
0.3632929027080536,
-0.3876877427101135,
-0.38627371191978455,
0.3355676233768463,
-0.0003912659303750843,
-0.5462113618850708,
0.4153413474559784,
1.475045919418335,
-0.39146536588668823,
-0.6339283585548401,
0.21227312088012... |
func hash(path string) string {
h, err := files.Sha256(path)
if err != nil {
return ""
}
return h[:10]
} | [
0.8778906464576721,
0.6913923025131226,
0.5789364576339722,
-0.17785809934139252,
0.6241530776023865,
0.5817906856536865,
0.1705418974161148,
0.4309031367301941,
-0.1979338824748993,
0.6303017735481262,
-0.4794926643371582,
0.19277510046958923,
0.16347430646419525,
-0.31923815608024597,
... |
func fetchXKCDComic(num int) (*model.Comic, *model.XKCD, error) {
apiURL := utils.BuildAPIURL(utils.XKCDComicName, num)
body, err := utils.FetchResponse(apiURL)
if err != nil {
return nil, nil, err
}
var xkcd model.XKCD
err = json.Unmarshal(body, &xkcd)
if err != nil {
return nil, nil, err
}
comicLink := ... | [
0.34114640951156616,
-0.42933523654937744,
0.5595882534980774,
-1.1139881610870361,
-0.7739648222923279,
-0.4368988871574402,
-1.5593022108078003,
-1.0457342863082886,
-0.0803755670785904,
-0.02387121319770813,
-0.40446993708610535,
0.10803363472223282,
0.07885584235191345,
0.0586358085274... |
func (t *treapNode) updateInvariants() bool {
m, i := t.maxPages, t.types
t.maxPages = t.span.npages
t.types = t.span.treapFilter()
if t.left != nil {
t.types |= t.left.types
if t.maxPages < t.left.maxPages {
t.maxPages = t.left.maxPages
}
}
if t.right != nil {
t.types |= t.right.types
if t.maxPages ... | [
-1.5195589065551758,
-0.16180028021335602,
0.5538625121116638,
-1.280411720275879,
-0.8514937162399292,
0.5713859796524048,
0.27613019943237305,
-0.49393653869628906,
-0.00846016313880682,
0.5791831016540527,
-0.2058541476726532,
0.3337555527687073,
-1.0397920608520508,
-0.0452660284936428... |
func (t *treapNode) findMinimal(f treapIterFilter) *treapNode {
if t == nil || !f.matches(t.types) {
return nil
}
for t != nil {
if t.left != nil && f.matches(t.left.types) {
t = t.left
} else if f.matches(t.span.treapFilter()) {
break
} else if t.right != nil && f.matches(t.right.types) {
t = t.rig... | [
-0.563815176486969,
-0.6364933848381042,
0.7252581715583801,
-0.2689379155635834,
-0.6982018351554871,
0.3180564045906067,
0.0784672200679779,
-1.1382548809051514,
-0.8228290677070618,
0.12675336003303528,
0.4602760672569275,
0.05694914609193802,
-1.0996407270431519,
0.4617699682712555,
... |
func (t *treapNode) findMaximal(f treapIterFilter) *treapNode {
if t == nil || !f.matches(t.types) {
return nil
}
for t != nil {
if t.right != nil && f.matches(t.right.types) {
t = t.right
} else if f.matches(t.span.treapFilter()) {
break
} else if t.left != nil && f.matches(t.left.types) {
t = t.le... | [
-0.39267733693122864,
-0.5359228849411011,
0.7921987175941467,
0.20939110219478607,
-0.9218904376029968,
0.4282623827457428,
0.17006690800189972,
-0.722477376461029,
-0.8157033920288086,
0.7611863613128662,
0.30202963948249817,
0.33551812171936035,
-0.6144931316375732,
0.829316258430481,
... |
func (t *treapNode) pred(f treapIterFilter) *treapNode {
if t.left != nil && f.matches(t.left.types) {
// The node has a left subtree which contains at least one matching
// node, find the maximal matching node in that subtree.
return t.left.findMaximal(f)
}
// Lacking a left subtree, look to the parents.
p :... | [
-0.024588948115706444,
0.17061525583267212,
0.9443030953407288,
-0.3023521602153778,
-1.0993109941482544,
0.7099291682243347,
0.5385756492614746,
0.025812886655330658,
-0.1643090397119522,
-0.1089576706290245,
0.2525341510772705,
0.12527580559253693,
0.19525577127933502,
0.7172089219093323... |
func (t *treapNode) succ(f treapIterFilter) *treapNode {
// See pred. This method is just the logical inversion of it.
if t.right != nil && f.matches(t.right.types) {
return t.right.findMinimal(f)
}
p := t
t = t.parent
for t != nil {
if t.left == p {
if f.matches(t.span.treapFilter()) {
return t
} e... | [
-0.05160186439752579,
0.2741837501525879,
0.5587705969810486,
-0.3197459578514099,
-1.2939327955245972,
1.0841705799102783,
0.8351112008094788,
-0.3199264705181122,
-0.531982958316803,
0.43329429626464844,
-0.2316083461046219,
0.4489918053150177,
0.6601054072380066,
0.026143331080675125,
... |
func (t *treapNode) isSpanInTreap(s *mspan) bool {
if t == nil {
return false
}
return t.span == s || t.left.isSpanInTreap(s) || t.right.isSpanInTreap(s)
} | [
-0.5702721476554871,
-0.34331807494163513,
0.38477057218551636,
-0.3116645812988281,
-0.7242209911346436,
0.1382366120815277,
-0.42176738381385803,
-0.5996596217155457,
1.5101702213287354,
0.45784902572631836,
-0.1434621959924698,
0.16179314255714417,
-0.3873254060745239,
-0.78040903806686... |
func (t *treapNode) walkTreap(fn func(tn *treapNode)) {
if t == nil {
return
}
fn(t)
t.left.walkTreap(fn)
t.right.walkTreap(fn)
} | [
-1.2870163917541504,
-0.20414991676807404,
0.6534720659255981,
-1.0599793195724487,
0.13571196794509888,
-0.23737996816635132,
0.7968801856040955,
0.16507118940353394,
0.5174640417098999,
-0.001831974950619042,
-0.2448853999376297,
-0.20515567064285278,
0.5357159972190857,
-0.8392786979675... |
func checkTreapNode(t *treapNode) {
if t == nil {
return
}
if t.span.next != nil || t.span.prev != nil || t.span.list != nil {
throw("span may be on an mSpanList while simultaneously in the treap")
}
if t.span.base() != t.key {
println("runtime: checkTreapNode treapNode t=", t, " t.key=", t.key,
"t.sp... | [
-0.4424169659614563,
-0.37568846344947815,
0.6438379287719727,
-0.75568687915802,
-0.4692773222923279,
0.131676584482193,
0.4247138202190399,
-0.8705501556396484,
0.9523599147796631,
0.3895423710346222,
-0.7752311825752258,
0.06101377680897713,
-0.3255540132522583,
0.3238260746002197,
-0... |
func (t *treapNode) validateInvariants() (uintptr, treapIterFilter) {
if t == nil {
return 0, 0
}
leftMax, leftTypes := t.left.validateInvariants()
rightMax, rightTypes := t.right.validateInvariants()
max := t.span.npages
if leftMax > max {
max = leftMax
}
if rightMax > max {
max = rightMax
}
if max != ... | [
-1.3982608318328857,
-0.4256041646003723,
0.5623725652694702,
-0.594519853591919,
-0.4323686957359314,
0.44214972853660583,
0.678596556186676,
-0.7553394436836243,
0.0013909280532971025,
0.4129185080528259,
-0.2860237956047058,
0.5438560247421265,
-0.4651329219341278,
0.54453045129776,
0... |
func treapFilter(mask, match treapIterType) treapIterFilter {
allow := treapIterFilter(0)
for i := treapIterType(0); i < 1<<treapIterBits; i++ {
if mask&i == match {
allow |= 1 << i
}
}
return allow
} | [
-0.9408150315284729,
-0.140377938747406,
0.5347045660018921,
0.4243490695953369,
-1.6232987642288208,
-0.21559911966323853,
0.9988426566123962,
-1.0102726221084595,
-0.09220176935195923,
1.0413624048233032,
0.2323702573776245,
0.5572553277015686,
-1.0102955102920532,
-1.0409049987792969,
... |
func (f treapIterFilter) matches(m treapIterFilter) bool {
return f&m != 0
} | [
-1.1153310537338257,
-0.3840213418006897,
0.22979940474033356,
-0.1431897133588791,
-0.9955611228942871,
0.34386375546455383,
0.05678216740489006,
-0.15555138885974884,
-0.5002118945121765,
-0.09394801408052444,
0.1911841183900833,
-0.8391863703727722,
-0.46500954031944275,
-0.684686183929... |
func (s *mspan) treapFilter() treapIterFilter {
have := treapIterType(0)
if s.scavenged {
have |= treapIterScav
}
if s.hugePages() > 0 {
have |= treapIterHuge
}
return treapIterFilter(uint32(1) << (0x1f & have))
} | [
-0.4271909296512604,
-0.11790800094604492,
0.3623798191547394,
-0.4525112211704254,
-1.014938235282898,
-0.03651389107108116,
0.6325317621231079,
-0.9511436223983765,
0.8362488746643066,
-0.005408895201981068,
-0.24348047375679016,
0.3381817936897278,
-0.1899239718914032,
-0.21422724425792... |
func (i *treapIter) span() *mspan {
return i.t.span
} | [
-0.6516299247741699,
-0.22731712460517883,
0.003978495951741934,
0.04886358976364136,
-1.1288132667541504,
0.6037185788154602,
1.7767739295959473,
-0.3652719557285309,
0.635991632938385,
-0.8403406739234924,
-0.420105516910553,
0.11916859447956085,
0.3209450840950012,
-0.38203802704811096,... |
func (i *treapIter) valid() bool {
return i.t != nil
} | [
-0.5617591142654419,
-0.7493160963058472,
0.3743124008178711,
-0.7786840200424194,
-0.4044472873210907,
0.8498339056968689,
-0.11988332867622375,
-0.017393313348293304,
-0.590146541595459,
0.902923583984375,
-0.39363956451416016,
-0.7473203539848328,
-0.29926878213882446,
-0.98958796262741... |
func (i treapIter) next() treapIter {
i.t = i.t.succ(i.f)
return i
} | [
-0.9286370873451233,
-0.1889103800058365,
0.10263349115848541,
0.1013793796300888,
-1.498009204864502,
1.0117610692977905,
0.8495972156524658,
-0.2734163999557495,
-0.4081617593765259,
0.36776652932167053,
-0.48905760049819946,
-0.014186237938702106,
0.3152278661727905,
-0.8362282514572144... |
func (i treapIter) prev() treapIter {
i.t = i.t.pred(i.f)
return i
} | [
-0.7136015892028809,
0.1050339862704277,
0.398806095123291,
-0.4917433261871338,
-0.6554635167121887,
0.5726050138473511,
1.6296255588531494,
0.35930806398391724,
-0.8308619260787964,
0.5794172883033752,
-0.2220931202173233,
-0.009754206985235214,
0.21347275376319885,
-1.0429801940917969,
... |
func (root *mTreap) start(mask, match treapIterType) treapIter {
f := treapFilter(mask, match)
return treapIter{f, root.treap.findMinimal(f)}
} | [
-0.3275204598903656,
-0.7432902455329895,
0.34458276629447937,
0.4782772660255432,
-1.0909301042556763,
-0.42215973138809204,
0.35301080346107483,
-0.35767894983291626,
-0.11228734999895096,
0.7055377960205078,
0.2958245575428009,
1.0511466264724731,
0.0908467024564743,
-0.9514314532279968... |
func (root *mTreap) end(mask, match treapIterType) treapIter {
f := treapFilter(mask, match)
return treapIter{f, root.treap.findMaximal(f)}
} | [
-0.22550836205482483,
-0.7879997491836548,
0.4067205786705017,
0.2278098165988922,
-0.9282400608062744,
-0.21340467035770416,
-0.0492759607732296,
-0.5501474142074585,
-0.5430290699005127,
0.9420644640922546,
0.3631150424480438,
0.6030687689781189,
-0.3763461410999298,
-0.36518678069114685... |
func (root *mTreap) mutate(i treapIter, fn func(span *mspan)) {
s := i.span()
// Save some state about the span for later inspection.
hpages := s.hugePages()
scavenged := s.scavenged
// Call the mutator.
fn(s)
// Update unscavHugePages appropriately.
if !scavenged {
mheap_.free.unscavHugePages -= hpages
}
i... | [
-1.0897908210754395,
0.011356813833117485,
0.48400795459747314,
0.0520150363445282,
-0.08263438940048218,
-0.2555009424686432,
0.14487874507904053,
-0.2966364026069641,
0.7631468176841736,
0.29447469115257263,
-0.42688632011413574,
0.3049147427082062,
0.7925208806991577,
0.2412203848361969... |
func (root *mTreap) insert(span *mspan) {
if !span.scavenged {
root.unscavHugePages += span.hugePages()
}
base := span.base()
var last *treapNode
pt := &root.treap
for t := *pt; t != nil; t = *pt {
last = t
if t.key < base {
pt = &t.right
} else if t.key > base {
pt = &t.left
} else {
throw("in... | [
-0.48366862535476685,
0.48927563428878784,
0.7551513910293579,
-0.9754171371459961,
-0.1499667912721634,
0.14599236845970154,
0.44141265749931335,
-0.27918440103530884,
0.9192938804626465,
-0.03883231058716774,
-0.7494783997535706,
-0.12340815365314484,
-0.22248682379722595,
0.385294258594... |
func (root *mTreap) find(npages uintptr) treapIter {
t := root.treap
for t != nil {
if t.span == nil {
throw("treap node with nil span found")
}
// Iterate over the treap trying to go as far left
// as possible while simultaneously ensuring that the
// subtrees we choose always have a span which can
//... | [
-0.133819580078125,
-0.19752387702465057,
0.540316641330719,
-0.9883497953414917,
-0.6906459927558899,
-0.010081890039145947,
0.31687912344932556,
-1.136419653892517,
0.5422956943511963,
0.7795705199241638,
0.47803229093551636,
-0.056556493043899536,
-0.26572945713996887,
1.038201332092285... |
func (root *mTreap) removeSpan(span *mspan) {
base := span.base()
t := root.treap
for t.span != span {
if t.key < base {
t = t.right
} else if t.key > base {
t = t.left
}
}
root.removeNode(t)
} | [
-1.179297685623169,
0.25249990820884705,
0.26035574078559875,
-0.3181430399417877,
-1.3626168966293335,
0.3894173502922058,
0.7050604224205017,
-0.362070232629776,
0.8373743891716003,
-0.08039483428001404,
-0.6383311748504639,
-0.422395795583725,
-0.42401978373527527,
0.5213165283203125,
... |
func (root *mTreap) erase(i treapIter) {
root.removeNode(i.t)
} | [
-1.1364173889160156,
0.22262097895145416,
0.23564261198043823,
-0.9271116256713867,
-0.9340560436248779,
0.8218948245048523,
0.6691997051239014,
-0.279728502035141,
-0.1583831012248993,
1.2234437465667725,
-0.11722265183925629,
0.6919049024581909,
-0.14283636212348938,
-0.2708454430103302,... |
func (root *mTreap) rotateLeft(x *treapNode) {
// p -> (x a (y b c))
p := x.parent
a, y := x.left, x.right
b, c := y.left, y.right
y.left = x
x.parent = y
y.right = c
if c != nil {
c.parent = y
}
x.left = a
if a != nil {
a.parent = x
}
x.right = b
if b != nil {
b.parent = x
}
y.parent = p
if p ... | [
0.39366579055786133,
0.037650804966688156,
0.6997715830802917,
-1.1874396800994873,
0.16026709973812103,
0.8178552389144897,
0.26062873005867004,
-1.3226079940795898,
1.441145658493042,
0.22844773530960083,
-0.5401785969734192,
0.28195783495903015,
0.14406579732894897,
-0.0528847761452198,... |
func (root *mTreap) rotateRight(y *treapNode) {
// p -> (y (x a b) c)
p := y.parent
x, c := y.left, y.right
a, b := x.left, x.right
x.left = a
if a != nil {
a.parent = x
}
x.right = y
y.parent = x
y.left = b
if b != nil {
b.parent = y
}
y.right = c
if c != nil {
c.parent = y
}
x.parent = p
if p... | [
0.04885087534785271,
0.07891007512807846,
0.8301812410354614,
-0.7331082820892334,
-0.2800346910953522,
0.4733614921569824,
0.08633723109960556,
-1.1590176820755005,
0.8201719522476196,
-0.09253675490617752,
-0.12548016011714935,
0.33789098262786865,
0.032124873250722885,
0.328010261058807... |
func itos(i int64) string {
s := strconv.FormatUint(uint64(i)+int64Adjust, 32)
const z = "0000000000000"
return z[len(s):] + s
} | [
-0.6953814625740051,
0.15751850605010986,
0.5497686862945557,
-1.288833737373352,
-0.11980754137039185,
-0.38347649574279785,
-0.21561183035373688,
-1.3904681205749512,
0.856232225894928,
0.3318711817264557,
-0.08441600203514099,
0.27632471919059753,
0.5659530162811279,
-0.678209125995636,... |
func stoi(s string) int64 {
ret, err := strconv.ParseUint(s, 32, 64)
if err != nil {
//TODO handle error?
return 0
}
return int64(ret - int64Adjust)
} | [
-0.058393243700265884,
0.13457760214805603,
0.5051212906837463,
0.20093055069446564,
-1.0070180892944336,
-0.15954190492630005,
0.3842243254184723,
-0.013115574605762959,
-0.8696761131286621,
0.2163744866847992,
-0.5424700379371643,
-0.5827212929725647,
-0.6022248864173889,
-0.734455943107... |
func NewStorageCapacityUnit(ctx *pulumi.Context,
name string, args *StorageCapacityUnitArgs, opts ...pulumi.ResourceOption) (*StorageCapacityUnit, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Capacity == nil {
return nil, errors.New("invalid value for req... | [
-0.6074488162994385,
-0.15580111742019653,
0.48052749037742615,
-0.37693458795547485,
0.7465778589248657,
0.5184552669525146,
-0.14747287333011627,
0.29970869421958923,
-0.05377212539315224,
-0.6905016899108887,
-0.5028192400932312,
0.19896194338798523,
-0.011692898347973824,
-0.7022507190... |
func GetStorageCapacityUnit(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StorageCapacityUnitState, opts ...pulumi.ResourceOption) (*StorageCapacityUnit, error) {
var resource StorageCapacityUnit
err := ctx.ReadResource("alicloud:ecs/storageCapacityUnit:StorageCapacityUnit", name, id, state, &resource,... | [
-0.3178819417953491,
-0.5084390640258789,
0.3505573272705078,
-0.5393532514572144,
0.5502666234970093,
0.09350059181451797,
-0.19081057608127594,
-0.14127285778522491,
0.7621212601661682,
-0.618184506893158,
-0.16765856742858887,
0.8422434329986572,
0.2546917200088501,
-1.4547353982925415,... |
func (o StorageCapacityUnitOutput) Capacity() pulumi.IntOutput {
return o.ApplyT(func(v *StorageCapacityUnit) pulumi.IntOutput { return v.Capacity }).(pulumi.IntOutput)
} | [
-0.2914615869522095,
-0.6051121950149536,
0.5767470598220825,
0.39392492175102234,
0.81942218542099,
0.30439823865890503,
1.1689575910568237,
0.3537108600139618,
0.379006952047348,
-0.880658745765686,
-0.0788855254650116,
0.5308715105056763,
0.9643473625183105,
-1.3526972532272339,
0.113... |
func (o StorageCapacityUnitOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StorageCapacityUnit) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
} | [
0.1948082447052002,
-0.622536301612854,
0.5308188796043396,
-0.048081979155540466,
1.18125581741333,
0.6589383482933044,
-0.08234315365552902,
0.47117510437965393,
0.516270101070404,
-0.5206494331359863,
0.39756083488464355,
1.1515955924987793,
0.38387688994407654,
-1.1287453174591064,
0... |
func (o StorageCapacityUnitOutput) Period() pulumi.IntOutput {
return o.ApplyT(func(v *StorageCapacityUnit) pulumi.IntOutput { return v.Period }).(pulumi.IntOutput)
} | [
0.12828472256660461,
-0.4560234844684601,
0.5076996684074402,
0.38845643401145935,
0.8801814317703247,
1.057769536972046,
0.5476217269897461,
0.011939308606088161,
0.9299072623252869,
-0.774909496307373,
0.3636375963687897,
0.8688367009162903,
0.5037577748298645,
-1.347184419631958,
0.73... |
func (o StorageCapacityUnitOutput) PeriodUnit() pulumi.StringOutput {
return o.ApplyT(func(v *StorageCapacityUnit) pulumi.StringOutput { return v.PeriodUnit }).(pulumi.StringOutput)
} | [
0.08753616362810135,
-0.7168623805046082,
0.5694378018379211,
-0.16289782524108887,
0.7546956539154053,
1.0993858575820923,
0.2525157034397125,
0.4990811347961426,
1.1694939136505127,
-0.9691048860549927,
0.4292009770870209,
1.1068540811538696,
0.2269013524055481,
-1.7847139835357666,
0.... |
func (o StorageCapacityUnitOutput) StartTime() pulumi.StringOutput {
return o.ApplyT(func(v *StorageCapacityUnit) pulumi.StringOutput { return v.StartTime }).(pulumi.StringOutput)
} | [
0.34625041484832764,
-0.6067361831665039,
0.5722044706344604,
0.18532133102416992,
1.0965825319290161,
0.6081809997558594,
0.13397862017154694,
0.4403359889984131,
0.5121583938598633,
-0.31896212697029114,
-0.24732252955436707,
0.6271719336509705,
0.5823156237602234,
-1.1408625841140747,
... |
func (o StorageCapacityUnitOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *StorageCapacityUnit) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
} | [
0.2104673534631729,
-1.3261396884918213,
0.38375237584114075,
-0.16201229393482208,
0.9300733208656311,
1.050500512123108,
-0.014735084027051926,
0.6638959050178528,
0.546900749206543,
-0.8093990087509155,
-0.35026150941848755,
0.795957088470459,
0.9701893329620361,
-0.9264050126075745,
... |
func (o StorageCapacityUnitOutput) StorageCapacityUnitName() pulumi.StringOutput {
return o.ApplyT(func(v *StorageCapacityUnit) pulumi.StringOutput { return v.StorageCapacityUnitName }).(pulumi.StringOutput)
} | [
-0.12244977802038193,
-1.1023552417755127,
0.6600624322891235,
-0.33000409603118896,
0.5251361727714539,
0.8795178532600403,
0.3645331561565399,
0.42377182841300964,
0.3399730622768402,
-0.5996884703636169,
0.20698775351047516,
0.7293685674667358,
0.8681160807609558,
-1.2201370000839233,
... |
func (in *GitHubWebhook) DeepCopyInto(out *GitHubWebhook) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
} | [
0.7096356153488159,
-0.2120220810174942,
0.431639164686203,
0.18629159033298492,
-0.09946120530366898,
0.7056720852851868,
0.30064865946769714,
0.7488930821418762,
-1.1352252960205078,
-0.055585701018571854,
-0.6467099785804749,
1.2610825300216675,
-0.2462921440601349,
0.28067439794540405,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.