text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (o *DataExportQuery) GetEmailsOk() (*[]string, bool) {
if o == nil || o.Emails == nil {
return nil, false
}
return o.Emails, true
} | [
0.20455722510814667,
0.5925305485725403,
0.0766443982720375,
-0.11276043951511383,
-0.30768367648124695,
-0.2952987849712372,
0.5778639912605286,
-0.4097011685371399,
0.022711852565407753,
0.9131689667701721,
-0.8269913792610168,
-0.4683712422847748,
0.1288052797317505,
-0.1886721700429916... |
func (o *DataExportQuery) HasEmails() bool {
if o != nil && o.Emails != nil {
return true
}
return false
} | [
0.6951826810836792,
1.1546058654785156,
0.1410684585571289,
-0.5248498320579529,
0.365426629781723,
-0.37388595938682556,
-0.05164656788110733,
0.7222455143928528,
0.4496898055076599,
-0.6497054100036621,
0.12553124129772186,
-0.792951762676239,
-0.39918991923332214,
-0.4061768651008606,
... |
func (o *DataExportQuery) SetEmails(v []string) {
o.Emails = &v
} | [
0.016134964302182198,
0.38064080476760864,
-0.17252276837825775,
-0.21220259368419647,
-0.8214040994644165,
-0.21698720753192902,
-0.94422847032547,
-0.9419209957122803,
0.5245864987373352,
0.17714811861515045,
0.6012833714485168,
0.8723095059394836,
-0.5768533945083618,
-0.653353035449981... |
func (o *DataExportQuery) GetUnit() string {
if o == nil || o.Unit == nil {
var ret string
return ret
}
return *o.Unit
} | [
0.6448251008987427,
0.3839873969554901,
0.14313554763793945,
0.16316813230514526,
0.4652165174484253,
0.11565741151571274,
1.1724793910980225,
-0.5170852541923523,
0.9518064260482788,
-0.8072525858879089,
0.24879960715770721,
-0.9811258316040039,
-0.5270290374755859,
-0.2602001130580902,
... |
func (o *DataExportQuery) GetUnitOk() (*string, bool) {
if o == nil || o.Unit == nil {
return nil, false
}
return o.Unit, true
} | [
-0.610970139503479,
0.3789897561073303,
0.6122669577598572,
0.7553501129150391,
0.26604175567626953,
-0.5617688894271851,
0.9849939942359924,
1.1733367443084717,
0.5480354428291321,
-0.4924163818359375,
-1.0313400030136108,
-0.28952914476394653,
0.2851037085056305,
0.1325754076242447,
0.... |
func (o *DataExportQuery) HasUnit() bool {
if o != nil && o.Unit != nil {
return true
}
return false
} | [
0.6675279140472412,
0.2580835223197937,
0.34787842631340027,
-0.6348959803581238,
0.8839236497879028,
0.04426019266247749,
0.38949868083000183,
0.3956280052661896,
0.3137538731098175,
-1.1180789470672607,
-0.394654244184494,
-0.7879831790924072,
-0.2894398272037506,
-0.30286821722984314,
... |
func (o *DataExportQuery) SetUnit(v string) {
o.Unit = &v
} | [
0.4919168949127197,
-0.06916309893131256,
-0.249881774187088,
-1.1254570484161377,
-0.7622087001800537,
-0.10664299130439758,
-0.11231757700443268,
-0.8269753456115723,
0.4902677834033966,
-0.19202779233455658,
-0.08343880623579025,
1.131122350692749,
-0.6889419555664062,
-1.27728295326232... |
func NewClient(accessToken string) *Client {
return &Client{
token: accessToken,
unmarshal: json.Unmarshal,
marshal: json.Marshal,
client: &http.Client{},
debug: utils.GetEnv(envDebug, "false") == "true",
log: log.New(os.Stderr, "slackapi", log.LstdFlags|log.Lshortfile),
}
} | [
1.0283383131027222,
-0.7125349640846252,
0.3936150074005127,
-1.178481936454773,
0.034987062215805054,
0.08701735734939575,
-0.1600993424654007,
-0.8457679152488708,
-0.5511874556541443,
-0.9943599104881287,
0.6539503931999207,
2.012927293777466,
0.4649231433868408,
-0.71458500623703,
0.... |
func (api *Client) Debugf(format string, v ...interface{}) {
if api.debug {
api.log.Output(2, fmt.Sprintf(format, v...))
}
} | [
-0.06957317888736725,
0.2956103980541229,
0.44031959772109985,
-0.01599094085395336,
0.31963440775871277,
-0.6624332666397095,
-0.8507500290870667,
-0.2716764211654663,
-0.9267524480819702,
-0.650558352470398,
0.09029035270214081,
0.41099676489830017,
0.059385113418102264,
1.25505006313323... |
func (api *Client) Debugln(v ...interface{}) {
if api.debug {
api.log.Output(2, fmt.Sprintln(v...))
}
} | [
0.24226874113082886,
-0.32284438610076904,
0.17224937677383423,
0.10887255519628525,
0.2310408353805542,
-0.3536321222782135,
-1.2078937292099,
0.007598658557981253,
-0.07952816784381866,
-0.6903583407402039,
-0.8377764821052551,
0.4942590892314911,
0.5678955912590027,
0.8408373594284058,
... |
func (api *Client) Debug() bool {
return api.debug
} | [
-0.27328020334243774,
0.3495059609413147,
0.2801773250102997,
-0.534663200378418,
0.7630071640014648,
0.5152215957641602,
-0.6029458045959473,
0.10270823538303375,
0.05341087281703949,
-0.12185732275247574,
0.10247718542814255,
0.10167127847671509,
-1.0986160039901733,
0.3864097595214844,
... |
func StartTestService(t *testing.T) {
db, err := sqorc.Open("sqlite3", ":memory:")
require.NoError(t, err)
startService(t, db)
} | [
1.1326103210449219,
0.3443322479724884,
0.3577714264392853,
-0.3180915415287018,
0.5333296060562134,
0.13569806516170502,
0.6742613315582275,
-0.4627965986728668,
0.8318811655044556,
-0.012806739658117294,
0.021629706025123596,
0.6736341118812561,
-1.1515395641326904,
0.2394658923149109,
... |
func StartTestServiceInternal(t *testing.T, dbName, dbDriver string) (reindex.Reindexer, reindex.JobQueue) {
db := sqorc.OpenCleanForTest(t, dbName, dbDriver)
return startService(t, db)
} | [
0.15480665862560272,
-0.8018773198127747,
0.3662935197353363,
-0.5415263772010803,
-0.4415017068386078,
-0.05107588693499565,
0.20110547542572021,
0.1851525753736496,
0.09605585038661957,
-0.6279289722442627,
-0.04598240554332733,
0.9452365040779114,
-0.8423366546630859,
0.3388084769248962... |
func StartTestSingletonServiceInternal(t *testing.T) reindex.Reindexer {
db, err := sqorc.Open("sqlite3", ":memory:")
assert.NoError(t, err)
return startSingletonService(t, db)
} | [
0.6146394610404968,
0.29712381958961487,
0.478259801864624,
-0.23688307404518127,
0.09254352003335953,
0.25734835863113403,
0.9283432960510254,
0.6091647148132324,
1.145951509475708,
-0.9628933668136597,
-0.15416550636291504,
1.0580426454544067,
-1.2140949964523315,
0.30875498056411743,
... |
func FormatString(value string, params map[string]string) string {
// value should have at least 3 chars to be able to have key.
if len(value) <= 2 {
return value
}
// To avoid mistake when passing Upper or lower case, the params' keys need to be convert to lower case all.
for k, v := range params {
... | [
-0.32936832308769226,
-0.7091083526611328,
1.0726593732833862,
-0.0352039597928524,
-0.3812794089317322,
-0.5530850291252136,
0.7018663287162781,
-0.682810366153717,
-0.3479682207107544,
0.7816163897514343,
1.0956754684448242,
0.4074353277683258,
0.04735188186168671,
0.4989522099494934,
... |
func convertJsonToMapData(jsonData string) (mapData map[string]string, err error) {
jsonMap := map[string]interface{}{}
if err = json.Unmarshal([]byte(jsonData), &jsonMap); err != nil {
return nil, err
}
mapData = exposeJsonData(jsonMap)
return mapData, nil
} | [
-0.9987083673477173,
-0.9990969300270081,
0.7167100310325623,
-0.7385057806968689,
-1.1598975658416748,
0.4298158884048462,
-0.6278179287910461,
-0.20426996052265167,
1.3776084184646606,
0.6334920525550842,
-0.2743386924266815,
0.7175490856170654,
-0.04365723952651024,
0.1311902552843094,
... |
func interpretInt16Type(originalValue interface{}) (func(value interface{}) (int16, bool), error) {
switch value := originalValue.(type) {
case int16:
return func(value interface{}) (int16, bool) {
// Have to recompute value of ok even if match to ensure that subsequent values matches same type
v, ok := value... | [
0.16547012329101562,
-0.5559388399124146,
0.5405261516571045,
-0.4870862364768982,
-0.4319441318511963,
-0.4324761927127838,
0.13522465527057648,
-0.08678711205720901,
0.06121468544006348,
0.4734443128108978,
0.010987743735313416,
-0.4191815257072449,
-0.06423437595367432,
-0.3031852841377... |
func NewAuthenticator(bucket base.Bucket, channelComputer ChannelComputer) *Authenticator {
return &Authenticator{
bucket: bucket,
channelComputer: channelComputer,
}
} | [
-0.5677311420440674,
-0.581733226776123,
0.09598390758037567,
-0.550986111164093,
-1.6915525197982788,
-0.6940953731536865,
-0.11707863211631775,
0.09485000371932983,
-0.1500653624534607,
-0.6078373193740845,
-0.9187023043632507,
0.49226078391075134,
-0.6243480443954468,
0.598612904548645,... |
func (auth *Authenticator) GetUser(name string) (User, error) {
princ, err := auth.getPrincipal(docIDForUser(name), func() Principal { return &userImpl{} })
if err != nil {
return nil, err
} else if princ == nil {
if name == "" {
princ = auth.defaultGuestUser()
} else {
return nil, nil
}
}
princ.(*us... | [
-1.1578059196472168,
0.7483286261558533,
0.4937020540237427,
1.0910940170288086,
-0.7571513652801514,
-0.07981385290622711,
0.23602823913097382,
-0.7432682514190674,
0.730883002281189,
-0.23724365234375,
-0.3987111747264862,
0.41529518365859985,
-0.3064297139644623,
-0.39525243639945984,
... |
func (auth *Authenticator) GetRole(name string) (Role, error) {
princ, err := auth.getPrincipal(docIDForRole(name), func() Principal { return &roleImpl{} })
role, _ := princ.(Role)
return role, err
} | [
-0.6688781976699829,
0.7700991630554199,
0.40275704860687256,
0.31023144721984863,
-0.21818214654922485,
-0.607251763343811,
-0.23926033079624176,
-1.165318250656128,
0.7313482165336609,
-0.055355168879032135,
0.3200496733188629,
0.28132200241088867,
-0.6375871896743774,
-0.453782200813293... |
func (auth *Authenticator) getPrincipal(docID string, factory func() Principal) (Principal, error) {
var princ Principal
err := auth.bucket.Update(docID, 0, func(currentValue []byte) ([]byte, error) {
// Be careful: this block can be invoked multiple times if there are races!
if currentValue == nil {
princ = ... | [
-0.8935927152633667,
-0.5596023201942444,
0.7678984999656677,
-0.1254277229309082,
-1.2358537912368774,
-0.29017043113708496,
-0.26196518540382385,
-0.5451434850692749,
0.534243643283844,
0.1329086422920227,
0.2968944013118744,
0.7043702602386475,
-1.0200103521347046,
-0.5179631114006042,
... |
func (auth *Authenticator) GetUserByEmail(email string) (User, error) {
var info userByEmailInfo
_, err := auth.bucket.Get(docIDForUserEmail(email), &info)
if base.IsDocNotFoundError(err) {
return nil, nil
} else if err != nil {
return nil, err
}
return auth.GetUser(info.Username)
} | [
-0.43543437123298645,
0.6017673015594482,
0.36118385195732117,
0.48719096183776855,
0.24793389439582825,
-0.10447553545236588,
0.4824342429637909,
-0.9876202940940857,
0.20815424621105194,
0.22362352907657623,
-0.1639547199010849,
-0.055600348860025406,
0.21114996075630188,
-0.878803908824... |
func (auth *Authenticator) Save(p Principal) error {
if err := p.validate(); err != nil {
return err
}
data, err := json.Marshal(p)
if err != nil {
return err
}
if err := auth.bucket.SetRaw(p.DocID(), 0, data); err != nil {
return err
}
if user, ok := p.(User); ok {
if user.Email() != "" {
info := u... | [
-0.8903244137763977,
0.12261291593313217,
0.5716333389282227,
-0.257412314414978,
0.039097610861063004,
0.6349613070487976,
0.3366430103778839,
-0.4485686123371124,
0.07558803260326385,
0.10659736394882202,
-1.101631760597229,
0.736752450466156,
-0.4483587443828583,
-0.551552414894104,
1... |
func (auth *Authenticator) InvalidateChannels(p Principal) error {
if p != nil && p.Channels() != nil {
base.LogTo("Access", "Invalidate access of %q", p.Name())
if auth.channelComputer != nil && !auth.channelComputer.UseGlobalSequence() {
p.SetPreviousChannels(p.Channels())
}
p.setChannels(nil)
if err :=... | [
-0.8317749500274658,
0.43731793761253357,
0.48276254534721375,
-0.5159343481063843,
-0.10544180124998093,
-0.3033522069454193,
0.39662235975265503,
-0.7207158803939819,
0.5127950310707092,
0.12245862931013107,
0.44680213928222656,
0.28449738025665283,
-1.2808879613876343,
0.079984001815319... |
func (auth *Authenticator) InvalidateRoles(user User) error {
if user != nil && user.Channels() != nil {
base.LogTo("Access", "Invalidate roles of %q", user.Name())
user.setRolesSince(nil)
if err := auth.Save(user); err != nil {
return err
}
}
return nil
} | [
-0.09844515472650528,
0.7495629787445068,
0.5448967218399048,
-0.6134159564971924,
-0.43908172845840454,
-0.05862314999103546,
0.05193715915083885,
-0.2801157832145691,
1.0363032817840576,
0.20078858733177185,
-0.04840750992298126,
-0.07759686559438705,
-0.8842794895172119,
0.7593045830726... |
func (auth *Authenticator) AuthenticateUser(username string, password string) User {
user, _ := auth.GetUser(username)
if user == nil || !user.Authenticate(password) {
return nil
}
return user
} | [
-0.04988126829266548,
0.03357348591089249,
0.18588092923164368,
0.9744401574134827,
-0.12498878687620163,
-0.7882729172706604,
-0.39726659655570984,
-0.617411732673645,
0.7743207812309265,
-0.31096765398979187,
0.28113195300102234,
0.004304601810872555,
-0.27167585492134094,
0.332734048366... |
func (auth *Authenticator) AuthenticateUntrustedJWT(token string, providers OIDCProviderMap, callbackURLFunc OIDCCallbackURLFunc) (User, jose.JWT, error) {
base.LogTo("OIDC+", "AuthenticateJWT called with token: %s", token)
// Parse JWT (needed to determine issuer/provider)
jwt, err := jose.ParseJWT(token)
if err... | [
0.22160452604293823,
-0.09934680908918381,
0.4212307631969452,
-0.06016821414232254,
-0.4350303113460541,
-0.5465177893638611,
-0.11414726078510284,
-1.0974583625793457,
0.6861998438835144,
0.47524741291999817,
-0.04466456547379494,
0.7528355121612549,
-0.1330157220363617,
0.45575553178787... |
func (auth *Authenticator) AuthenticateTrustedJWT(token string, provider *OIDCProvider, callbackURLFunc OIDCCallbackURLFunc) (User, jose.JWT, error) {
// Parse JWT
jwt, err := jose.ParseJWT(token)
if err != nil {
base.LogTo("OIDC+", "Error parsing JWT in AuthenticateTrustedJWT: %v", err)
return nil, jose.JWT{},... | [
0.5643594264984131,
0.0775444507598877,
0.15311498939990997,
0.08178156614303589,
-0.4604737460613251,
-0.7508289217948914,
-0.042536742985248566,
-0.8548161387443542,
0.5105160474777222,
0.8462777733802795,
-0.8236852884292603,
0.904036283493042,
0.21980910003185272,
0.2636101543903351,
... |
func (auth *Authenticator) authenticateJWT(jwt jose.JWT, provider *OIDCProvider) (User, jose.JWT, error) {
// Extract identity from token
identity, identityErr := GetJWTIdentity(jwt)
base.LogTo("OIDC+", "JWT identity: %+v", identity)
if identityErr != nil {
base.LogTo("OIDC+", "Error getting JWT identity. Error:... | [
-0.49375948309898376,
0.24093474447727203,
0.5448273420333862,
0.12154322117567062,
0.00043557205935940146,
-0.9345237016677856,
0.23792599141597748,
-0.8318050503730774,
0.6505304574966431,
0.6005194187164307,
-0.5225626826286316,
0.29697778820991516,
0.005990319885313511,
0.2324784398078... |
func (auth *Authenticator) RegisterNewUser(username, email string) (User, error) {
user, err := auth.NewUser(username, base.GenerateRandomSecret(), base.Set{})
if err != nil {
return nil, err
}
user.SetEmail(email)
err = auth.Save(user)
if err != nil {
return nil, err
}
return user, err
} | [
-1.8584727048873901,
1.1011544466018677,
0.27436065673828125,
0.23886191844940186,
0.2918992340564728,
0.15115942060947418,
-0.13547976315021515,
-0.23411308228969574,
-0.043448466807603836,
-0.049128808081150055,
-1.251206398010254,
0.197983980178833,
-0.794510543346405,
-0.08360945433378... |
func (auth *Authenticator) updateVbucketSequences(docID string, factory func() Principal, seq uint64) error {
sequence := ch.NewVbSimpleSequence(seq)
err := auth.bucket.Update(docID, 0, func(currentValue []byte) ([]byte, error) {
// Be careful: this block can be invoked multiple times if there are races!
if curr... | [
-1.0890653133392334,
-1.3224412202835083,
0.7392845153808594,
-0.43651750683784485,
-1.0424009561538696,
-0.6378839015960693,
-0.15161065757274628,
-0.618327796459198,
0.48408177495002747,
0.9986338019371033,
-0.4693617522716522,
0.3565554618835449,
-0.2449815571308136,
0.02653125673532486... |
func (c *Client) AdminGetUser(ctx context.Context, params *AdminGetUserInput, optFns ...func(*Options)) (*AdminGetUserOutput, error) {
if params == nil {
params = &AdminGetUserInput{}
}
result, metadata, err := c.invokeOperation(ctx, "AdminGetUser", params, optFns, addOperationAdminGetUserMiddlewares)
if err != ... | [
-0.8240822553634644,
0.6985391974449158,
0.6381387710571289,
0.45088526606559753,
-0.36689138412475586,
-0.5111290216445923,
-0.2404046505689621,
-2.1121814250946045,
0.5885258316993713,
0.1536998301744461,
0.33965420722961426,
1.896148681640625,
-0.29465535283088684,
-0.7021185159683228,
... |
func RegisterExternalClass(name string, c ...ClassLoader) {
externalClassLock.Lock()
externalClasses[name] = c
externalClassLock.Unlock()
} | [
-0.8404585123062134,
0.6483012437820435,
0.5584783554077148,
0.37842249870300293,
-0.7248683571815491,
1.0495027303695679,
-1.481011986732483,
0.22853265702724457,
-0.5256819725036621,
-0.010420745238661766,
-1.4394018650054932,
0.3209780156612396,
-0.4715062081813812,
1.0063244104385376,
... |
func NewExternalClassLoader(className, libPath string, classMethods, instanceMethods map[string]Method) ClassLoader {
return func(v *VM) error {
pg := v.initializeClass(className)
pg.setBuiltinMethods(buildMethods(classMethods), true)
pg.setBuiltinMethods(buildMethods(instanceMethods), false)
v.objectClass.set... | [
-0.4707055389881134,
-0.15547187626361847,
0.6444028615951538,
0.1936347931623459,
-1.2932811975479126,
0.22309403121471405,
-0.6775044202804565,
0.31145572662353516,
-0.2990463376045227,
0.09561626613140106,
-0.1872832179069519,
0.05140140280127525,
-0.5636045932769775,
0.8397051692008972... |
func (vm *VM) initializeClass(name string) *RClass {
class := vm.createRClass(name)
class.isModule = false
singletonClass := vm.createRClass(fmt.Sprintf("#<Class:%s>", name))
singletonClass.isSingleton = true
class.singletonClass = singletonClass
class.inherits(vm.objectClass)
return class
} | [
-0.24479886889457703,
0.7796174883842468,
0.8965693116188049,
-0.04165233299136162,
0.4081524908542633,
0.22842742502689362,
0.210066020488739,
0.8137220144271851,
0.8600077629089355,
0.2707239091396332,
-0.22168613970279694,
-0.05614636093378067,
-0.9258934259414673,
0.11148075014352798,
... |
func (c *RClass) ReturnName() string {
return c.Name
} | [
0.11052758991718292,
-0.6608371734619141,
0.5627185106277466,
-0.026359545066952705,
-0.17669054865837097,
0.6914363503456116,
0.41971027851104736,
0.30670875310897827,
-0.32727497816085815,
0.6510909199714661,
-0.25602760910987854,
-0.6569204926490784,
-0.8591302633285522,
0.1748889982700... |
func (c *RClass) ToString() string {
return c.Name
} | [
0.10524778813123703,
-0.8044248819351196,
0.43318232893943787,
-0.584843099117279,
-0.015897179022431374,
0.8502611517906189,
0.6130776405334473,
-0.9773265719413757,
0.09037641435861588,
0.6254380345344543,
-0.9920751452445984,
-0.5436426401138306,
-0.09247653931379318,
-0.472906798124313... |
func (c *RClass) Inspect() string {
return c.ToString()
} | [
-0.2703666388988495,
-0.8405011892318726,
0.5999354720115662,
-1.0956459045410156,
0.019019290804862976,
0.5429521799087524,
0.2469320297241211,
-0.4668578505516052,
-0.238620325922966,
0.45414337515830994,
0.02670561894774437,
-0.23961763083934784,
-0.2013614922761917,
-0.0220584589987993... |
func (c *RClass) ToJSON(t *Thread) string {
return c.ToString()
} | [
-0.3575940430164337,
-1.1092509031295776,
0.5764420628547668,
-0.8650153875350952,
0.36396104097366333,
0.23020578920841217,
0.3510276675224304,
-0.8783259987831116,
0.2217043787240982,
0.8257129788398743,
-1.1509402990341187,
0.11383307725191116,
-0.38066408038139343,
-0.6463897824287415,... |
func (c *RClass) Value() interface{} {
return c
} | [
-0.3195590078830719,
-0.5294530987739563,
0.49114832282066345,
0.19892261922359467,
0.9544507265090942,
0.9507583975791931,
1.1048450469970703,
-0.9145480394363403,
0.7268804907798767,
-0.14082075655460358,
-0.17099933326244354,
0.2080063372850418,
-0.31353050470352173,
0.8191148042678833,... |
func (i ID) String() string {
return names[i]
} | [
-0.6633977293968201,
-0.8688369989395142,
-0.08750423043966293,
-0.7242255806922913,
-0.538908064365387,
0.8422621488571167,
0.04624417796730995,
-2.0737764835357666,
0.04412044584751129,
0.10724889487028122,
-1.0503432750701904,
0.1726594865322113,
-0.37542012333869934,
-0.695689797401428... |
func (t Token) Name() string {
return t.ID.String()
} | [
-0.4560658037662506,
-1.245965838432312,
0.4216233789920807,
-0.4534853994846344,
-0.8540089726448059,
0.14467991888523102,
-0.89007568359375,
-0.534748911857605,
-0.4185481667518616,
0.7069432139396667,
-1.3878822326660156,
-0.10893044620752335,
0.5900534987449646,
-0.43917161226272583,
... |
func (t Token) String() string {
return color.NewString("%v %v", color.Green(t.ID), color.Yellow(t.Value)).String()
} | [
-0.04438050091266632,
-1.0972509384155273,
0.2914612889289856,
-1.7894492149353027,
0.02397616021335125,
0.5519273281097412,
-0.9817171096801758,
-0.7825257182121277,
-0.8060927391052246,
-0.2362816333770752,
-0.6133694648742676,
0.9105967283248901,
1.1222366094589233,
-0.33923107385635376... |
func (rfv RationalFieldValue) Parse() (parsed interface{}, err error) {
parts := strings.Split(rfv.raw, "/")
if len(parts) != 2 {
return nil, ErrValueNotValid
}
numerator, err := strconv.ParseInt(parts[0], 10, 64)
if err != nil {
return nil, ErrValueNotValid
}
denominator, err := strconv.ParseInt(parts[1],... | [
0.24681125581264496,
0.1979231834411621,
0.5106726884841919,
-0.05276307836174965,
-0.12132426351308823,
-0.2988854944705963,
0.3844812214374542,
-0.6536998748779297,
-0.3577607274055481,
-1.2924810647964478,
0.26182258129119873,
-0.3114296495914459,
-0.5324234366416931,
-0.591486930847168... |
func (rft RationalFieldType) GetValueParser(raw string) ScalarValueParser {
return RationalFieldValue{
raw: raw,
}
} | [
0.1507805734872818,
-0.569969117641449,
0.17207369208335876,
-0.009438322857022285,
0.1257072538137436,
0.007838843390345573,
-0.4581710994243622,
-0.5757748484611511,
0.7961806654930115,
-0.7738240361213684,
-0.4496608376502991,
0.4184698462486267,
-0.23853084444999695,
0.0172608681023120... |
func Sign(suite abstract.Suite, random cipher.Stream, message []byte,
anonymitySet Set, linkScope []byte, mine int, privateKey abstract.Scalar) []byte {
// Note that Rivest's original ring construction directly supports
// heterogeneous rings containing public keys of different types -
// e.g., a mixture of RSA ke... | [
-0.5717410445213318,
0.0030811759643256664,
0.7790992259979248,
0.2557624876499176,
0.0720541924238205,
0.11570794880390167,
0.09019336104393005,
0.04244375601410866,
-0.3666256368160248,
0.6930264234542847,
-0.1972268670797348,
0.06896404922008514,
-0.3858516216278076,
0.17173771560192108... |
func Verify(suite abstract.Suite, message []byte, anonymitySet Set,
linkScope []byte, signatureBuffer []byte) ([]byte, error) {
n := len(anonymitySet) // anonymity set size
L := []abstract.Point(anonymitySet) // public keys in ring
// Decode the signature
buf := bytes.NewBuffer(signatureBuffer)
var... | [
0.23087680339813232,
0.10842801630496979,
0.7110607028007507,
0.6200322508811951,
0.24568992853164673,
0.0783606767654419,
0.3110949397087097,
0.09671007841825485,
-0.8937657475471497,
0.6063700318336487,
-0.5745136141777039,
-0.007245438173413277,
-0.6425409317016602,
0.40021154284477234,... |
func NewFromAppender(app storage.Appender) *AppenableOfAppender {
return &AppenableOfAppender{
app: app,
}
} | [
1.3697125911712646,
-1.1253734827041626,
0.156469464302063,
0.7001590728759766,
-1.3529106378555298,
-0.950514018535614,
-1.4603103399276733,
-0.23605456948280334,
0.2948612868785858,
0.17201724648475647,
-0.2828664779663086,
-0.6674107909202576,
0.30830177664756775,
0.6242772936820984,
... |
func NewMoveCommand(c *client.Client, stdout io.Writer, stderr io.Writer) *MoveCommand {
return &MoveCommand{
name: "mv",
client: c,
stdout: stdout,
stderr: stderr,
}
} | [
-0.3072994649410248,
-1.0187280178070068,
0.5981740951538086,
0.017138157039880753,
-0.13411454856395721,
-0.4717872738838196,
0.09956614673137665,
-0.2968478500843048,
-0.11994124948978424,
-0.07493305206298828,
-0.04590284824371338,
1.0440336465835571,
-0.0021900348365306854,
0.174329191... |
func (cmd *MoveCommand) GetName() string {
return cmd.name
} | [
-0.1580217331647873,
-0.8851473331451416,
0.7449700832366943,
0.8382184505462646,
0.372022420167923,
0.2293696254491806,
0.5469749569892883,
-0.46343645453453064,
-0.15031158924102783,
0.23275454342365265,
-0.13961972296237946,
0.03412875905632973,
0.1095266118645668,
0.6922414898872375,
... |
func (cmd *MoveCommand) IsSane() bool {
return cmd.Source != "" && cmd.Target != ""
} | [
-1.1853418350219727,
0.053490426391363144,
0.5701735019683838,
0.06009003892540932,
0.04330955073237419,
-0.5525349378585815,
-0.25694799423217773,
0.2031106948852539,
-0.012075726874172688,
-0.00003697919237310998,
0.07918686419725418,
0.3367851972579956,
-0.6394054293632507,
0.8295121788... |
func (cmd *MoveCommand) Parse(args []string) (success bool) {
if len(args) == 3 {
cmd.Source = args[1]
cmd.Target = args[2]
success = true
} else {
fmt.Println("Usage:\nmv <from> <to>")
}
return success
} | [
-1.1415072679519653,
0.5209180116653442,
0.6262525320053101,
0.04302579537034035,
0.12574481964111328,
0.40558984875679016,
-0.5792838335037231,
0.042769331485033035,
-0.6239914298057556,
-0.048575080931186676,
0.15031996369361877,
-0.23964381217956543,
-0.8051519393920898,
0.0746044591069... |
func (cmd *MoveCommand) Run() {
newSrcPwd := cmdPath(cmd.client.Pwd, cmd.Source)
newTargetPwd := cmdPath(cmd.client.Pwd, cmd.Target)
t := cmd.client.GetType(newSrcPwd)
if t != client.NODE && t != client.LEAF {
fmt.Fprintln(cmd.stderr, "Not a valid source path: "+newSrcPwd)
return
}
runCommandWithTraverseTwo... | [
-0.6863577961921692,
-1.063610315322876,
0.6320208311080933,
0.3740289509296417,
0.7358157634735107,
0.6172181367874146,
0.3939051628112793,
0.16114936769008636,
-0.200482577085495,
-0.3509218394756317,
-0.3264111280441284,
0.5797681212425232,
-0.4771997630596161,
0.32588160037994385,
0.... |
func (json Json) getContentType() (contentType string) {
return json.contentType
} | [
0.666533887386322,
-1.0153419971466064,
0.4444658160209656,
-0.36732274293899536,
-0.11464294046163559,
-0.43979302048683167,
-0.463517427444458,
-0.7127100229263306,
0.13994868099689484,
0.5619774460792542,
0.048499591648578644,
0.33732253313064575,
-0.6274594664573669,
0.4016631543636322... |
func (json Json) getAccept() (accept string) {
return json.accept
} | [
-0.12924759089946747,
-0.6235125064849854,
0.7820232510566711,
-0.4913175404071808,
-1.2553179264068604,
0.14058394730091095,
-0.33647722005844116,
-0.93271404504776,
-0.67185378074646,
1.5848095417022705,
0.08591709285974503,
0.5309464335441589,
-0.10064882040023804,
0.2787914276123047,
... |
func New(k int) *Tree {
var t *Tree
for _, v := range rand.Perm(10) {
t = insert(t, (1+v)*k)
}
return t
} | [
-0.73207688331604,
0.8366084694862366,
0.4565267562866211,
-0.8300673961639404,
-0.8410293459892273,
-0.3664313554763794,
-0.11098579317331314,
0.4330965280532837,
-0.07081219553947449,
0.671924889087677,
-0.9292771220207214,
-0.9099634289741516,
-0.41811519861221313,
0.7565761804580688,
... |
func Walk(t *Tree, ch chan int) {
defer close(ch) // <- closes the channel when this function returns
var walk func(t *Tree)
walk = func(t *Tree) {
if t == nil {
return
}
walk(t.Left)
ch <- t.Value
walk(t.Right)
}
walk(t)
} | [
-0.7378159165382385,
-0.03407235071063042,
0.7432733774185181,
-0.765028715133667,
0.13399426639080048,
0.6729907393455505,
0.00500697735697031,
-0.777136504650116,
-0.7013095617294312,
-0.6253788471221924,
-1.0160855054855347,
0.06757547706365585,
0.10637454688549042,
1.0377198457717896,
... |
func Same(t1, t2 *Tree) bool {
ch1 := make(chan int)
ch2 := make(chan int)
go Walk(t1, ch1)
go Walk(t2, ch2)
for k := range ch1 {
select {
case g := <-ch2:
if k != g {
return false
}
default:
break
}
}
return true
} | [
-0.8906652331352234,
0.02007157728075981,
0.8039417266845703,
0.1395532190799713,
-0.5858139991760254,
0.4477464556694031,
-0.33532506227493286,
-0.9545515179634094,
-1.6934691667556763,
0.7601044774055481,
-1.2502995729446411,
0.5710648894309998,
-1.1160163879394531,
-0.1405230015516281,
... |
func Equal(first, second error) bool {
if first == nil || second == nil {
return first == second
}
err1, ok1 := first.(traceableError)
err2, ok2 := second.(traceableError)
if ok1 {
if ok2 {
return err1.err.Error() == err2.err.Error()
}
return err1.err.Error() == second.Error()
}
if ok2 {
return... | [
-0.2942070960998535,
-0.5502871870994568,
0.6186209321022034,
0.05492539703845978,
0.5524500608444214,
-0.24027909338474274,
-0.2996692955493927,
-0.657071053981781,
-0.4279821813106537,
0.24747341871261597,
-1.1198272705078125,
0.44429779052734375,
0.3041975498199463,
0.14794950187206268,... |
func (f *FileCache) nextReadFile() (name string) {
var names []string
f.eLock.RLock()
for name = range f.logs {
names = append(names, name)
}
f.eLock.RUnlock()
if len(names) > 0 {
sort.Strings(names)
name = names[0]
}
return
} | [
0.08414734899997711,
-0.06293768435716629,
0.7877396941184998,
-0.5930432677268982,
-0.7630323767662048,
0.6114848256111145,
-0.3380962610244751,
-0.8273080587387085,
-0.6003091335296631,
-0.23225750029087067,
0.8939962983131409,
0.07186514884233475,
-0.37669041752815247,
0.277793616056442... |
func (f *FileCache) openLog(idx *Index) (w *os.File, err error) {
if w, err = os.OpenFile(idx.Name, os.O_RDONLY, 0666); err != nil {
log.Error("os.OpenFile(%s) error(%v)", idx.Name, err)
return
}
if _, err = w.Seek(idx.Offset, os.SEEK_SET); err != nil {
log.Error("f.Seek(%d) error(%v)", idx.Offset, err)
retu... | [
-0.505742073059082,
0.9343973994255066,
0.7381980419158936,
-0.9640880823135376,
-1.0110461711883545,
0.04003339633345604,
0.6163236498832703,
-0.855091392993927,
-0.11480436474084854,
-0.1469048261642456,
0.2637397050857544,
-0.03249962255358696,
0.3913862705230713,
-0.7055355310440063,
... |
func (f *FileCache) watchproc() {
var evt fsnotify.Event
for {
evt = <-f.wh.Events
if evt.Op&fsnotify.Create == fsnotify.Create {
if !strings.HasSuffix(evt.Name, f.c.Suffix) {
log.Warn("create invalid file: %s", evt.Name)
continue
}
fi, err := os.Stat(evt.Name)
if err != nil {
log.Error("o... | [
1.3999344110488892,
-0.5037122368812561,
0.9918121099472046,
-0.2637556195259094,
0.305888831615448,
-0.40431344509124756,
1.2428218126296997,
0.3820773661136627,
-0.143369659781456,
0.08493155986070633,
-0.5084532499313354,
0.11793927848339081,
0.5268082618713379,
0.2645636796951294,
0.... |
func (f *FileCache) tailLog(rr *bufio.Reader) (b []byte, err error) {
var (
t []byte
)
// peek magic
for {
if b, err = rr.Peek(_logMagicSize); err != nil {
return
}
if bytes.Equal(b, logMagic) {
break
}
rr.Discard(1)
}
// peek length
if t, err = rr.Peek(_logHeadSize); err != nil {
if err != i... | [
0.2779509723186493,
0.13496308028697968,
0.8350247740745544,
-0.9526669979095459,
-1.2270293235778809,
-0.3005968928337097,
0.07267654687166214,
-0.9379375576972961,
-0.3228605389595032,
0.8893188238143921,
-0.5663561820983887,
0.7553356885910034,
-0.07642092555761337,
0.22434431314468384,... |
func (f *FileCache) readProcess() {
var (
err error
idx *Index
rr = bufio.NewReaderSize(nil, f.c.ReadBuffer)
lastTime int64
length int
cur *os.File
)
if idx, cur, err = f.loadRemain(); err == nil {
rr.Reset(cur)
}
for {
if time.Now().Unix()-lastTime > 5 {
if idx != nil {
... | [
0.2097201645374298,
-0.571584939956665,
1.262043833732605,
-1.1251336336135864,
-0.4026485085487366,
-0.1043613851070404,
0.4728226661682129,
-0.8141239285469055,
-0.33890652656555176,
0.19983434677124023,
0.7302365899085999,
0.42116886377334595,
-0.33951833844184875,
0.08128001540899277,
... |
func (f *FileCache) nextFile() (err error) {
f.next <- f.nextFileName()
return
} | [
0.09087709337472916,
0.9375941753387451,
0.4215810000896454,
0.5199334025382996,
-0.3517129719257355,
0.8189539909362793,
0.3072017431259155,
0.6569715738296509,
-0.9519345760345459,
-0.5126737356185913,
0.40522804856300354,
-0.07798474282026291,
0.13682660460472107,
0.593830406665802,
0... |
func (fc *FakeCluster) Query(query string, opts *gocb.QueryOptions) (*FakeResult, error) {
if fc.Force == "true" {
return &FakeResult{}, errors.New("Function Query forced error")
}
return &FakeResult{Force: fc.Force}, nil
} | [
-0.2498568594455719,
1.1126374006271362,
0.18296107649803162,
0.3235371708869934,
0.3557664453983307,
-0.5946380496025085,
-0.023716364055871964,
-0.5077393651008606,
0.18641944229602814,
-0.19142845273017883,
0.44482699036598206,
0.3922339379787445,
-1.6002498865127563,
-0.213774353265762... |
func (fb *FakeBucket) DefaultCollection() *FakeCollection {
return &FakeCollection{Force: fb.Force}
} | [
0.15551474690437317,
-0.11898450553417206,
0.38486555218696594,
-0.09199724346399307,
0.7551470398902893,
-0.007382364943623543,
0.2576073408126831,
-0.7072446942329407,
-0.07488958537578583,
-0.9236752986907959,
-0.7093013525009155,
-0.5330572724342346,
-0.6659269332885742,
0.856628894805... |
func (fr *FakeResult) Next() bool {
if count < 3 {
count++
return true
}
count = 0
return false
} | [
-0.7658810615539551,
1.3529834747314453,
0.4780692756175995,
0.40474215149879456,
-0.7514321208000183,
0.5000225305557251,
-0.1857546716928482,
0.12509189546108246,
-0.3109995722770691,
-0.4275209307670593,
-0.9016897082328796,
-0.4669930338859558,
-1.0642939805984497,
-0.2047639638185501,... |
func (fr *FakeResult) Row(ptr interface{}) error {
if fr.Force == "true" {
return errors.New("Function Row forced error")
}
if reflect.TypeOf(ptr).String() == "**schema.Stat" {
var stat *schema.Stat
var data string
switch count {
case 0:
data = `{
"ProcessOutcome": "No Action",
"UserClassificat... | [
-0.6883310675621033,
1.1115974187850952,
0.8561009764671326,
-0.3357250690460205,
-0.16679446399211884,
-0.24719379842281342,
0.45822450518608093,
-0.3075583577156067,
0.5753803849220276,
-0.23693804442882538,
-0.18103770911693573,
0.6910185217857361,
-0.21177124977111816,
0.53405433893203... |
func (fr *FakeResult) One(ptr interface{}) error {
var count = make(map[string]int64)
if fr.Force == "true" {
return errors.New("Function One forced error")
}
count["count"] = int64(1234)
*ptr.(*map[string]int64) = count
return nil
} | [
-1.4539474248886108,
1.0937540531158447,
0.5154699683189392,
-0.02502073533833027,
1.0347131490707397,
-0.042433347553014755,
1.0668933391571045,
0.09165535122156143,
-0.5956117510795593,
0.057881321758031845,
-1.166100263595581,
0.09984175860881805,
-0.30211392045021057,
0.848622083663940... |
func (fr *FakeResult) Err() error {
return nil
} | [
-0.09892699867486954,
0.5900501012802124,
0.18673686683177948,
1.0629771947860718,
-0.31791767477989197,
0.10037132352590561,
1.0753463506698608,
0.1805340200662613,
-0.29324889183044434,
-1.3165534734725952,
-0.48795896768569946,
-0.19297552108764648,
-0.4008066952228546,
1.02579915523529... |
func (fr *FakeResult) Close() {
} | [
-0.7265509366989136,
0.23986609280109406,
0.3581106960773468,
0.06793536990880966,
-0.7865272164344788,
0.3665958344936371,
1.4028818607330322,
-0.5329069495201111,
-0.7485455274581909,
-0.8450053930282593,
-0.33312103152275085,
-0.5123429298400879,
-1.7266738414764404,
1.3027162551879883,... |
func (fc *FakeCollection) Upsert(col string, value interface{}, opts *gocb.UpsertOptions) (*gocb.MutationResult, error) {
if fc.Force == "error" {
return &gocb.MutationResult{}, errors.New("Forced collection upsert error")
}
return &gocb.MutationResult{}, nil
} | [
-1.1822237968444824,
0.5673823952674866,
0.5861973166465759,
0.05882839113473892,
0.5610215067863464,
-0.1372445672750473,
0.34956809878349304,
-1.0093272924423218,
-0.297628253698349,
0.5397977828979492,
-0.8639341592788696,
-0.17616058886051178,
-1.4428929090499878,
0.3289394974708557,
... |
func NewAuthorizer(configuration schema.AccessControlConfiguration) *Authorizer {
return &Authorizer{
configuration: configuration,
}
} | [
0.6933692693710327,
-0.7186068892478943,
0.032150547951459885,
0.5390564799308777,
-1.2863091230392456,
-0.6805989146232605,
-0.10577984154224396,
0.9390668869018555,
0.3497776389122009,
-0.1915701925754547,
0.04730381816625595,
0.42367029190063477,
0.13309325277805328,
0.4534792900085449,... |
func isIPMatching(ip net.IP, networks []string) bool {
// If no network is provided in the rule, we match any network
if len(networks) == 0 {
return true
}
for _, network := range networks {
if !strings.Contains(network, "/") {
if ip.String() == network {
return true
}
continue
}
_, ipNet, err... | [
-0.07463835924863815,
0.2529406249523163,
0.17488345503807068,
0.6755848526954651,
0.10090756416320801,
0.27808502316474915,
-0.6210881471633911,
1.2329010963439941,
0.14934557676315308,
0.6090242266654968,
0.7438445687294006,
-1.8797621726989746,
-0.6472448110580444,
0.01213658694177866,
... |
func selectMatchingSubjectRules(rules []schema.ACLRule, subject Subject) []schema.ACLRule {
selectedRules := []schema.ACLRule{}
for _, rule := range rules {
if isSubjectMatching(subject, rule.Subject) &&
isIPMatching(subject.IP, rule.Networks) {
selectedRules = append(selectedRules, rule)
}
}
return se... | [
0.6322031617164612,
-0.11450973898172379,
0.15695194900035858,
-0.08794069290161133,
-0.2925441265106201,
0.09366554021835327,
-0.7985159158706665,
-0.06282152235507965,
0.1650088131427765,
0.9773865342140198,
0.7239333987236023,
0.7010408639907837,
-0.1872989386320114,
-0.3064917922019958... |
func (p *Authorizer) GetRequiredLevel(subject Subject, requestURL url.URL) Level {
matchingRules := selectMatchingRules(p.configuration.Rules, subject, Object{
Domain: requestURL.Hostname(),
Path: requestURL.Path,
})
if len(matchingRules) > 0 {
return PolicyToLevel(matchingRules[0].Policy)
}
return Policy... | [
-0.40586715936660767,
0.8101082444190979,
0.3767109215259552,
0.9779483675956726,
0.7754191160202026,
0.6839509010314941,
-0.19538100063800812,
-0.12208797037601471,
-0.3881565034389496,
-0.026706069707870483,
0.5243695378303528,
0.9043166637420654,
-0.529600977897644,
0.7036615610122681,
... |
func Asset(name string) ([]byte, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
}
return a.bytes, nil
}
return nil, fmt.Errorf("Asset %s not foun... | [
-0.7961483001708984,
-1.2313168048858643,
0.633165180683136,
-0.6093899011611938,
-1.546921730041504,
-0.11101024597883224,
0.12971386313438416,
-1.3390334844589233,
-1.1358720064163208,
0.4855233430862427,
0.3090141713619232,
0.32495471835136414,
-0.6009681224822998,
-0.44264674186706543,... |
func MustAsset(name string) []byte {
a, err := Asset(name)
if err != nil {
panic("asset: Asset(" + name + "): " + err.Error())
}
return a
} | [
-0.012778956443071365,
0.11985661834478378,
0.4091298282146454,
-0.5268413424491882,
-0.8276715278625488,
0.4719155430793762,
-0.8186293840408325,
-1.5736604928970337,
0.16388541460037231,
0.6357062458992004,
-0.5354578495025635,
0.35693347454071045,
0.0057142809964716434,
-0.0248885955661... |
func AssetInfo(name string) (os.FileInfo, error) {
cannonicalName := strings.Replace(name, "\\", "/", -1)
if f, ok := _bindata[cannonicalName]; ok {
a, err := f()
if err != nil {
return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
}
return a.info, nil
}
return nil, fmt.Errorf("Asset... | [
0.371969997882843,
-1.1052993535995483,
0.5630446076393127,
-0.922572672367096,
-1.356387734413147,
0.0033556853886693716,
0.6777529716491699,
-0.8006685972213745,
-1.2748286724090576,
0.3115358352661133,
0.2636086046695709,
0.26388120651245117,
0.0635773167014122,
-0.3988074064254761,
0... |
func AssetNames() []string {
names := make([]string, 0, len(_bindata))
for name := range _bindata {
names = append(names, name)
}
return names
} | [
-0.7293784618377686,
-0.8460342288017273,
0.7321816682815552,
-0.39323121309280396,
-0.48951536417007446,
0.7661203145980835,
-0.5028699636459351,
-0.8655748963356018,
-0.4145073890686035,
0.8099913597106934,
0.16903363168239594,
1.163049578666687,
-0.028152840211987495,
0.0342608317732811... |
func RestoreAsset(dir, name string) error {
data, err := Asset(name)
if err != nil {
return err
}
info, err := AssetInfo(name)
if err != nil {
return err
}
err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), d... | [
0.3437124192714691,
-0.3622540235519409,
0.6770355701446533,
-1.2592030763626099,
-0.006139514967799187,
-0.04453148692846298,
-0.0072639440186321735,
-0.43950510025024414,
-0.20619122684001923,
-0.2510169744491577,
0.1784360408782959,
0.13568510115146637,
-0.23627112805843353,
-0.56985116... |
func RestoreAssets(dir, name string) error {
children, err := AssetDir(name)
// File
if err != nil {
return RestoreAsset(dir, name)
}
// Dir
for _, child := range children {
err = RestoreAssets(dir, filepath.Join(name, child))
if err != nil {
return err
}
}
return nil
} | [
0.42261892557144165,
0.30020031332969666,
0.5813396573066711,
-0.20641657710075378,
-0.23828908801078796,
-0.24414615333080292,
0.5739709138870239,
-0.029911456629633904,
0.06188219040632248,
-0.43923482298851013,
0.5113736987113953,
0.3275970220565796,
-0.6125145554542542,
0.0351656526327... |
func (r *Hint) Equal(c *Hint) bool {
if r == nil && c == nil {
return true
}
if r == nil || c == nil {
return false
}
a := *r
b := *c
if len(a) != len(b) {
return false
}
for i, v := range a {
if b[i] != v {
return false
}
}
return true
} | [
-0.09295663982629776,
-0.10204527527093887,
0.6334848999977112,
-0.2562648057937622,
0.8912596106529236,
0.6642321348190308,
0.5290420651435852,
-0.37882599234580994,
-0.5318470001220703,
1.8103607892990112,
-1.2369804382324219,
0.5673049092292786,
-1.636049747467041,
0.419839471578598,
... |
func SimdSse2DeinterleaveUv(uv, u, v View) {
_SimdSse2DeinterleaveUv(uv.GetData(), uv.GetStride(), uv.GetWidth(), uv.GetHeight(), u.GetData(), u.GetStride(), v.GetData(), v.GetStride())
} | [
-0.25146955251693726,
0.23609232902526855,
0.8676419258117676,
-0.5766773223876953,
-0.3678860664367676,
-0.6341657042503357,
0.8339838981628418,
0.9291398525238037,
0.24228385090827942,
-1.0454959869384766,
-0.35295844078063965,
0.3838673233985901,
0.3318113386631012,
-0.7118716835975647,... |
func main() {
mySecretString := "this is so very secret!"
prefix, passphrase := "/home/jon/", "xxxxxxxxx"
secretKeyring := prefix + ".gnupg/secring.gpg"
publicKeyring := prefix + ".gnupg/pubring.gpg"
if 1 == 1 {
bytes, err := ioutil.ReadFile(prefix + ".password-store/jon/facebook:jon_carlson@writeme.com.gpg")
... | [
0.3698156476020813,
0.3872912526130676,
0.6836280822753906,
0.5008143782615662,
0.29699379205703735,
-0.10431503504514694,
-0.3950670659542084,
0.4693041443824768,
-0.622593104839325,
0.5732481479644775,
-0.385754257440567,
0.27612972259521484,
-0.5176610350608826,
-0.2532307803630829,
0... |
func LookupSRV(service string, proto string, name string, resolver func(string, string, string) (string, []*net.SRV, error)) (string, []*net.SRV, error) {
mu.Lock()
defer mu.Unlock()
var err error
q := query{service, proto, name}
cname, addrs := retrieve(q)
if addrs == nil {
cname, addrs, err = resolver("", ... | [
-1.4324208498001099,
0.05030125379562378,
0.5369316935539246,
-0.22218504548072815,
-0.4087010622024536,
-0.9100685715675354,
-0.47069066762924194,
0.045113541185855865,
0.3858090341091156,
-0.26613181829452515,
-0.7821222543716431,
-0.4899976849555969,
-0.4250895082950592,
0.0180076323449... |
func SetupAPI() *gin.Engine {
router := gin.Default()
router.GET("/", getTodos)
router.GET("/todo/:id", getTodo)
router.POST("/create", createTodo)
router.POST("/update", updateTodo)
router.GET("/delete/:id", deleteTodo)
return router
} | [
-0.699421763420105,
0.010062646120786667,
0.5614008903503418,
0.7199711799621582,
0.8712155222892761,
-0.3416081368923187,
0.12126154452562332,
0.15015684068202972,
-0.41493868827819824,
-0.06732447445392609,
-0.19575338065624237,
-0.5950723886489868,
0.7193853855133057,
0.5327491164207458... |
func (elt *Element) BoolSlice(defaultValue ...[]bool) ([]bool, error) {
defValue := func() *[]bool {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []bool
return v, NewWrongPathError(elt.Path)
}
return *def, nil
... | [
-0.6077553033828735,
-0.028496677055954933,
0.6438738107681274,
1.3453712463378906,
0.37243562936782837,
-0.11487292498350143,
-0.5030195116996765,
-0.24358530342578888,
-0.6203890442848206,
0.8345881700515747,
-0.6297498941421509,
0.21869619190692902,
-0.16928759217262268,
0.9178054928779... |
func (elt *Element) IntSlice(defaultValue ...[]int) ([]int, error) {
defValue := func() *[]int {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []int
return v, NewWrongPathError(elt.Path)
}
return *def, nil
}
sw... | [
-0.9480732083320618,
0.5103335380554199,
0.582925021648407,
1.094212532043457,
0.5099700689315796,
-0.3146570026874542,
-0.3504500389099121,
-0.6564571261405945,
-0.17885525524616241,
0.9478443264961243,
-0.274445116519928,
0.40665847063064575,
-0.6633414030075073,
0.8854115009307861,
0.... |
func (elt *Element) Int8Slice(defaultValue ...[]int8) ([]int8, error) {
defValue := func() *[]int8 {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []int8
return v, NewWrongPathError(elt.Path)
}
return *def, nil
... | [
-1.4290058612823486,
0.3425900936126709,
0.2855915129184723,
0.852059543132782,
0.4338492155075073,
0.0637509673833847,
-0.45581719279289246,
-0.9790014624595642,
0.17279671132564545,
1.5652302503585815,
-0.13427111506462097,
0.9138393402099609,
-1.1286520957946777,
0.7604681849479675,
0... |
func (elt *Element) Int16Slice(defaultValue ...[]int16) ([]int16, error) {
defValue := func() *[]int16 {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []int16
return v, NewWrongPathError(elt.Path)
}
return *def, ... | [
-0.4911592900753021,
0.42176809906959534,
0.41416722536087036,
1.0572937726974487,
0.7813942432403564,
0.09060140699148178,
-0.8589692115783691,
-0.601345419883728,
-0.6456383466720581,
0.94719398021698,
-0.20630978047847748,
0.42826220393180847,
-0.43765732645988464,
0.6465857625007629,
... |
func (elt *Element) Int32Slice(defaultValue ...[]int32) ([]int32, error) {
defValue := func() *[]int32 {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []int32
return v, NewWrongPathError(elt.Path)
}
return *def, ... | [
-0.8676206469535828,
0.6844252943992615,
0.5464145541191101,
0.8585487604141235,
0.44696179032325745,
0.16015733778476715,
-0.6170209646224976,
-1.1719167232513428,
-0.33702585101127625,
1.034568190574646,
-0.17949816584587097,
0.6162552833557129,
-0.7579851746559143,
0.9172691702842712,
... |
func (elt *Element) Int64Slice(defaultValue ...[]int64) ([]int64, error) {
defValue := func() *[]int64 {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []int64
return v, NewWrongPathError(elt.Path)
}
return *def, ... | [
-1.4912792444229126,
0.3231797218322754,
0.3916212022304535,
1.4374819993972778,
0.4811423718929291,
-0.14940038323402405,
-0.2296096533536911,
-0.5664052367210388,
-0.24408313632011414,
1.1110458374023438,
-0.11626296490430832,
0.4606737196445465,
-0.5211223363876343,
0.8747355937957764,
... |
func (elt *Element) Uint8Slice(defaultValue ...[]uint8) ([]uint8, error) {
defValue := func() *[]uint8 {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []uint8
return v, NewWrongPathError(elt.Path)
}
return *def, ... | [
-1.2693537473678589,
0.4160459637641907,
0.37680235505104065,
0.5108925700187683,
0.7142720818519592,
0.017404600977897644,
-0.47188183665275574,
-1.0300049781799316,
0.5585924983024597,
0.8900496959686279,
0.11421345174312592,
0.35569313168525696,
-0.4659139811992645,
0.6030768156051636,
... |
func (elt *Element) Uint16Slice(defaultValue ...[]uint16) ([]uint16, error) {
defValue := func() *[]uint16 {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []uint16
return v, NewWrongPathError(elt.Path)
}
return *... | [
-0.4931487441062927,
0.6908575296401978,
0.48734596371650696,
1.06155264377594,
0.9103848934173584,
0.05493548512458801,
-0.953597903251648,
-0.6058842539787292,
-0.39051833748817444,
0.37666016817092896,
0.08643580228090286,
-0.09263639152050018,
-0.011636056937277317,
0.4795185923576355,... |
func (elt *Element) Uint32Slice(defaultValue ...[]uint32) ([]uint32, error) {
defValue := func() *[]uint32 {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []uint32
return v, NewWrongPathError(elt.Path)
}
return *... | [
-0.9573957324028015,
1.022745132446289,
0.571587860584259,
0.6480844020843506,
0.5208617448806763,
0.09719505906105042,
-0.5554930567741394,
-1.1556082963943481,
-0.11537116020917892,
0.6102267503738403,
0.13729767501354218,
0.09965305030345917,
-0.3103977143764496,
0.8164471387863159,
-... |
func (elt *Element) Uint64Slice(defaultValue ...[]uint64) ([]uint64, error) {
defValue := func() *[]uint64 {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []uint64
return v, NewWrongPathError(elt.Path)
}
return *... | [
-1.6430085897445679,
0.5631397366523743,
0.44948914647102356,
1.2710158824920654,
0.5841294527053833,
-0.14541234076023102,
-0.18445847928524017,
-0.6341054439544678,
0.010805387981235981,
0.4888894259929657,
0.2611898183822632,
-0.07661768794059753,
0.0496709831058979,
0.9514098167419434,... |
func (elt *Element) Float32Slice(defaultValue ...[]float32) ([]float32, error) {
defValue := func() *[]float32 {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []float32
return v, NewWrongPathError(elt.Path)
}
ret... | [
-0.33783072233200073,
0.8240122199058533,
0.5831398367881775,
0.8229971528053284,
0.6465513110160828,
0.11269795894622803,
-0.4287957549095154,
-1.0644114017486572,
-0.5412527918815613,
0.7773325443267822,
-0.3499324917793274,
0.655267059803009,
-0.4601843059062958,
1.2753857374191284,
-... |
func (elt *Element) Float64Slice(defaultValue ...[]float64) ([]float64, error) {
defValue := func() *[]float64 {
if len(defaultValue) == 0 {
return nil
}
return &defaultValue[0]
}
def := defValue()
if elt.Value == nil {
if def == nil {
var v []float64
return v, NewWrongPathError(elt.Path)
}
ret... | [
-0.8463850617408752,
0.33641889691352844,
0.4239124655723572,
1.5479763746261597,
0.8337533473968506,
-0.39215773344039917,
-0.10516833513975143,
-0.48518258333206177,
-0.39371705055236816,
0.7825954556465149,
-0.11909108608961105,
0.49983373284339905,
-0.36770057678222656,
1.2847461700439... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.