text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func AppleAsFruit(v *Apple) Fruit {
return Fruit{
Apple: v,
}
} | [
0.33434388041496277,
0.38002851605415344,
0.13369248807430267,
-0.33491817116737366,
-1.9990743398666382,
-0.597065269947052,
-0.32356730103492737,
0.20715729892253876,
0.902714729309082,
-0.7059347033500671,
-1.2509889602661133,
1.076673150062561,
0.9427402019500732,
-0.4325542151927948,
... |
func BananaAsFruit(v *Banana) Fruit {
return Fruit{
Banana: v,
}
} | [
0.85642409324646,
-0.17878146469593048,
-0.029513344168663025,
-0.6717548370361328,
-1.5656745433807373,
-0.5184176564216614,
-0.08152654021978378,
-0.03766358643770218,
0.7866771221160889,
-1.0328893661499023,
-1.2348814010620117,
1.3332157135009766,
0.2919217050075531,
-0.505882322788238... |
func (dst *Fruit) UnmarshalJSON(data []byte) error {
var err error
match := 0
// try to unmarshal data into Apple
err = newStrictDecoder(data).Decode(&dst.Apple)
if err == nil {
jsonApple, _ := json.Marshal(dst.Apple)
if string(jsonApple) == "{}" { // empty struct
dst.Apple = nil
} else {
match++
}
... | [
-0.6817141175270081,
0.7217437624931335,
0.7186618447303772,
-0.5903317928314209,
-1.0513032674789429,
-0.43572181463241577,
0.5042231678962708,
0.19311131536960602,
0.25806179642677307,
-0.6974940896034241,
-0.05615326389670372,
0.09536392241716385,
-0.2113555520772934,
-0.231751754879951... |
func (src Fruit) MarshalJSON() ([]byte, error) {
if src.Apple != nil {
return json.Marshal(&src.Apple)
}
if src.Banana != nil {
return json.Marshal(&src.Banana)
}
return nil, nil // no data in oneOf schemas
} | [
-0.24531857669353485,
0.666616678237915,
0.17114533483982086,
0.24575680494308472,
-0.5550990700721741,
-0.5326674580574036,
-0.11783435940742493,
0.22992528975009918,
0.8999293446540833,
-0.498567670583725,
-0.5846368670463562,
0.8458842039108276,
0.15565770864486694,
0.6450647115707397,
... |
func (obj *Fruit) GetActualInstance() (interface{}) {
if obj == nil {
return nil
}
if obj.Apple != nil {
return obj.Apple
}
if obj.Banana != nil {
return obj.Banana
}
// all schemas are nil
return nil
} | [
-0.08173034340143204,
-0.3308654725551605,
0.7021365165710449,
0.21911892294883728,
-0.8802322149276733,
0.2567586302757263,
-0.010010289028286934,
0.515769362449646,
0.48479267954826355,
-0.10026685893535614,
0.22281622886657715,
0.015288285911083221,
-0.3430249094963074,
-0.0204369816929... |
func Test_handleMessage_once(t *testing.T) {
session := &Mock4handleMessageAWSSession{}
finish := make(chan bool)
const expectedReceipt = "a receipt handle"
const expectedMessage = "a message"
handler := func(msg interface{}) error {
finish <- true
assert.Equal(t, expectedMessage, msg)
return nil
}
queu... | [
-0.2722151577472687,
0.2598285377025604,
0.6972593665122986,
-0.5538319945335388,
0.7246507406234741,
0.15845125913619995,
0.04232366010546684,
-0.8398113250732422,
0.7944214344024658,
-0.9251545667648315,
-0.12636348605155945,
-0.46163588762283325,
-0.18974435329437256,
0.7687184810638428... |
func Test_handleMessage_resend(t *testing.T) {
session := &Mock4handleMessageAWSSession{}
finish := make(chan bool)
const expectedReceipt = "a receipt handle"
const expectedMessage = "a message"
handler := func(msg interface{}) error {
go func() {
finish <- true
}()
assert.Equal(t, expectedMessage, msg)... | [
0.39282944798469543,
-0.1117279976606369,
0.7406241297721863,
-0.5118597149848938,
0.17514453828334808,
-0.18929272890090942,
-0.05905164033174515,
-0.48420295119285583,
0.5683057308197021,
-0.7759570479393005,
-0.4450032114982605,
-0.12110048532485962,
-0.1861063838005066,
-0.003140747547... |
func Test_handleMessage_deletion_error(t *testing.T) {
session := &Mock4handleMessageAWSSession{
ShouldDeleteMessageFail: true,
DeleteMessageFailError: "an intentional error",
}
const expectedReceipt = "a receipt handle"
const expectedMessage = "a message" // it's not important, but it's OK to define it
han... | [
0.3231564164161682,
-0.20441311597824097,
0.5493833422660828,
-0.7039680480957031,
0.2647656798362732,
-0.0007770987576805055,
-0.14881502091884613,
-0.3284826874732971,
1.0884122848510742,
-0.6328278183937073,
0.14300064742565155,
-0.22834512591362,
0.10444003343582153,
0.2405283898115158... |
func Test_handleMessage_deletion_timeout(t *testing.T) {
session := &Mock4handleMessageAWSSession{
DeleteMessageTimeout: 2,
}
const expectedReceipt = "a receipt handle"
const expectedMessage = "a message" // it's not important, but it's OK to define it
handler := func(msg interface{}) error {
return nil
}
... | [
0.5415569543838501,
-0.18427510559558868,
0.5426855087280273,
-0.6792495250701904,
-0.09035947918891907,
0.19316668808460236,
-0.5549344420433044,
-0.23176433145999908,
0.8444401025772095,
-0.5214964151382446,
-0.17067468166351318,
0.013365453109145164,
0.173324853181839,
0.354886144399642... |
func Test_handleMessage_resend_maxNumberOfRetries_reached(t *testing.T) {
session := &Mock4handleMessageAWSSession{}
const expectedReceipt = "a receipt handle"
const expectedMessage = "a message"
i := 0
handler := func(msg interface{}) error {
i++
assert.Equal(t, expectedMessage, msg)
return errors.New("in... | [
0.3418288230895996,
0.3118551969528198,
0.6406378149986267,
-0.4891171455383301,
0.20644868910312653,
-0.20749883353710175,
-0.4063609838485718,
-0.00789404846727848,
0.6026355028152466,
-0.985810399055481,
-0.4180161952972412,
-0.08034371584653854,
0.30906999111175537,
-0.2450366914272308... |
func Test_unmarshal_complex_thing(t *testing.T) {
queue := queueSQS{
thens: map[string][]MessageHandler{},
}
type complexObject struct {
Field1 *string
Field2 int64
Field3 float64
Field4 []string
Field5 struct {
Key *string
ValueA *string
ValueB *float64
}
}
params := complexObject{
F... | [
0.05491802468895912,
-0.5386790037155151,
0.9491310119628906,
-0.6225545406341553,
0.18896222114562988,
0.3675740659236908,
0.516765832901001,
-0.3247040808200836,
-0.7645115852355957,
-0.8782599568367004,
-0.4838392436504364,
0.14581361413002014,
-0.2914823889732361,
-0.3768487274646759,
... |
func Test_unmarshal_2_several_structures(t *testing.T) {
type Type1 struct {
Type1 string `json:"type1" validate:"string" type:"string" required:"true"`
Field1 float64 `json:"field1" validate:"number"`
}
type Type2 struct {
Type2 string `json:"type2" type:"string" required:"true"`
Field2 *float64 `json... | [
-0.056894995272159576,
0.20885252952575684,
1.0958833694458008,
-0.24581147730350494,
0.30612534284591675,
0.3889126181602478,
0.4754856824874878,
-0.36337462067604065,
-0.8339366912841797,
-0.5234562158584595,
-0.6130771040916443,
0.21786607801914215,
-0.3333277404308319,
-0.5065525174140... |
func (r *ReactFacade) CallMe() {
fmt.Println("React")
} | [
0.017212416976690292,
-0.14517110586166382,
0.421551376581192,
0.31107404828071594,
0.47973406314849854,
0.14108139276504517,
0.7815161943435669,
-0.22170935571193695,
-0.027052897959947586,
-0.4763741195201874,
0.17680369317531586,
0.6403340697288513,
-0.46306487917900085,
0.2882204055786... |
func (r *VueFacade) CallMe() {
fmt.Println("Vue")
} | [
0.10247927904129028,
-0.4502483606338501,
0.48030051589012146,
0.3330465257167816,
0.16432829201221466,
0.8027008771896362,
0.09482856094837189,
0.6883041858673096,
-0.05588255077600479,
0.5780919194221497,
0.9072335362434387,
1.0610204935073853,
0.17175669968128204,
0.3193562626838684,
... |
func (r *AngularFacade) CallMe() {
fmt.Println("Angular")
} | [
-0.20184434950351715,
-0.21072211861610413,
0.3786987364292145,
0.3793518841266632,
0.19228671491146088,
0.7293198704719543,
0.698727548122406,
-0.39177846908569336,
-0.4508313536643982,
-0.017409075051546097,
0.32836511731147766,
0.6921110153198242,
-0.28445932269096375,
0.456980466842651... |
func NewAllFacade() *AllFacade {
return &AllFacade{
React: &ReactFacade{},
Vue: &VueFacade{},
Angular: &AngularFacade{},
}
} | [
0.357147753238678,
-0.3513088822364807,
0.38760238885879517,
0.680518627166748,
-1.1661584377288818,
-1.122717022895813,
-0.6722461581230164,
0.32712027430534363,
1.5822709798812866,
-0.2560780346393585,
-0.5605660080909729,
0.6161960959434509,
-0.2423398494720459,
0.8503358364105225,
0.... |
func NewECBEncrypter(b cipher.Block) cipher.BlockMode {
return (*ecbEncrypter)(newECB(b))
} | [
-0.6551313996315002,
0.20057514309883118,
0.21018345654010773,
1.0716112852096558,
-0.3820731043815613,
-0.16653060913085938,
-0.4197894036769867,
-0.6251885294914246,
-0.4478392004966736,
0.4815981686115265,
-1.641845941543579,
-0.31876930594444275,
-0.6671017408370972,
0.7208642363548279... |
func (x *ecbEncrypter) CryptBlocks(dst, src []byte) {
if len(src)%x.blockSize != 0 {
logx.Error("crypto/cipher: input not full blocks")
return
}
if len(dst) < len(src) {
logx.Error("crypto/cipher: output smaller than input")
return
}
for len(src) > 0 {
x.b.Encrypt(dst, src[:x.blockSize])
src = src[x.b... | [
-0.4407763183116913,
0.8305196166038513,
0.5187848210334778,
0.1589226871728897,
-0.39470401406288147,
-0.22722546756267548,
0.2682708203792572,
-1.0826855897903442,
-0.4840409755706787,
1.001682996749878,
-1.1357625722885132,
0.5377670526504517,
-0.7953709959983826,
0.11352206766605377,
... |
func NewECBDecrypter(b cipher.Block) cipher.BlockMode {
return (*ecbDecrypter)(newECB(b))
} | [
-0.6994566321372986,
0.15202465653419495,
0.2504788935184479,
0.8126768469810486,
-0.7620362043380737,
-0.13637606799602509,
-0.3511471152305603,
-0.6406726241111755,
-0.08687257021665573,
-0.029793405905365944,
-1.029482126235962,
-0.8014670610427856,
-0.14332224428653717,
0.6117871403694... |
func (x *ecbDecrypter) CryptBlocks(dst, src []byte) {
if len(src)%x.blockSize != 0 {
logx.Error("crypto/cipher: input not full blocks")
return
}
if len(dst) < len(src) {
logx.Error("crypto/cipher: output smaller than input")
return
}
for len(src) > 0 {
x.b.Decrypt(dst, src[:x.blockSize])
src = src[x.b... | [
-0.3493689298629761,
0.8289920687675476,
0.5239595174789429,
-0.049512144178152084,
-0.5087106823921204,
-0.45498132705688477,
0.2753833532333374,
-0.8834088444709778,
-0.40171870589256287,
0.8417045474052429,
-1.0617715120315552,
0.4190913140773773,
-0.7610459923744202,
0.0492686256766319... |
func EcbDecrypt(key, src []byte) ([]byte, error) {
block, err := aes.NewCipher(key)
if err != nil {
logx.Errorf("Decrypt key error: % x", key)
return nil, err
}
decrypter := NewECBDecrypter(block)
decrypted := make([]byte, len(src))
decrypter.CryptBlocks(decrypted, src)
return pkcs5Unpadding(decrypted, dec... | [
0.3106462359428406,
1.3597288131713867,
0.7004404067993164,
-0.5370985865592957,
-0.7971639037132263,
-0.11214972287416458,
-0.20279642939567566,
-0.4475022554397583,
-0.0457683801651001,
0.524591326713562,
-0.8031193614006042,
-0.36618316173553467,
-0.6998713612556458,
-0.0016837946604937... |
func EcbDecryptBase64(key, src string) (string, error) {
keyBytes, err := getKeyBytes(key)
if err != nil {
return "", err
}
encryptedBytes, err := base64.StdEncoding.DecodeString(src)
if err != nil {
return "", err
}
decryptedBytes, err := EcbDecrypt(keyBytes, encryptedBytes)
if err != nil {
return "", ... | [
0.011626402847468853,
0.3301957845687866,
0.48174649477005005,
-0.1879139393568039,
-0.14363260567188263,
-0.41144952178001404,
-0.7602477073669434,
0.0134176816791296,
-0.27322182059288025,
0.7348376512527466,
0.21016979217529297,
0.3311598002910614,
-0.7504398226737976,
0.136509567499160... |
func EcbEncrypt(key, src []byte) ([]byte, error) {
block, err := aes.NewCipher(key)
if err != nil {
logx.Errorf("Encrypt key error: % x", key)
return nil, err
}
padded := pkcs5Padding(src, block.BlockSize())
crypted := make([]byte, len(padded))
encrypter := NewECBEncrypter(block)
encrypter.CryptBlocks(crypt... | [
-0.2013772428035736,
1.2853294610977173,
0.6098138689994812,
-0.0051718102768063545,
-0.05024982988834381,
-0.0036099960561841726,
-0.449051171541214,
-0.8604394197463989,
-0.3687630593776703,
1.1311719417572021,
-1.3207743167877197,
0.017257021740078926,
-1.0521711111068726,
0.43420264124... |
func EcbEncryptBase64(key, src string) (string, error) {
keyBytes, err := getKeyBytes(key)
if err != nil {
return "", err
}
srcBytes, err := base64.StdEncoding.DecodeString(src)
if err != nil {
return "", err
}
encryptedBytes, err := EcbEncrypt(keyBytes, srcBytes)
if err != nil {
return "", err
}
ret... | [
-0.2918933033943176,
0.3411964774131775,
0.38816094398498535,
0.2546122372150421,
0.03519652038812637,
-0.34265753626823425,
-0.9481848478317261,
-0.3021882176399231,
-0.27259913086891174,
1.6596555709838867,
-0.2216600775718689,
0.588706910610199,
-0.8899558782577515,
0.007385553326457739... |
func (b Binomial) CDF(x float64) float64 {
if x < 0 {
return 0
}
if x >= b.N {
return 1
}
x = math.Floor(x)
return mathext.RegIncBeta(b.N-x, x+1, 1-b.P)
} | [
0.2395157366991043,
0.43952813744544983,
0.23247766494750977,
0.7319191098213196,
0.07136920839548111,
0.6966716051101685,
0.12103504687547684,
0.1652139574289322,
-0.07248842716217041,
-0.6147783994674683,
-0.21078142523765564,
0.49465152621269226,
-0.5450075268745422,
-0.3628270626068115... |
func (b Binomial) ExKurtosis() float64 {
v := b.P * (1 - b.P)
return (1 - 6*v) / (b.N * v)
} | [
0.29560503363609314,
1.0115289688110352,
0.4032258987426758,
0.19096770882606506,
0.48388028144836426,
-0.18438485264778137,
-0.1147267147898674,
0.49885785579681396,
-0.3064170479774475,
0.9343850612640381,
-0.051016535609960556,
0.13865070044994354,
-0.3399308919906616,
-0.82880872488021... |
func (b Binomial) LogProb(x float64) float64 {
if x < 0 || x > b.N || math.Floor(x) != x {
return math.Inf(-1)
}
lb := combin.LogGeneralizedBinomial(b.N, x)
return lb + x*math.Log(b.P) + (b.N-x)*math.Log(1-b.P)
} | [
0.6155908703804016,
0.5551941990852356,
0.8890388011932373,
0.806586742401123,
0.027950270101428032,
0.7526227831840515,
-1.1651540994644165,
-0.44086289405822754,
0.5359052419662476,
0.13356703519821167,
-0.3793538808822632,
0.20719194412231445,
-0.8385645151138306,
-0.8930327892303467,
... |
func (b Binomial) Mean() float64 {
return b.N * b.P
} | [
-0.8655310869216919,
0.2702229619026184,
0.23992344737052917,
0.3944774270057678,
0.7531095147132874,
1.1222004890441895,
-0.20875371992588043,
-0.07589993625879288,
-0.3805636465549469,
0.19766341149806976,
-0.2551746964454651,
0.4701683223247528,
-1.38077712059021,
-0.7505836486816406,
... |
func (Binomial) NumParameters() int {
return 2
} | [
-0.7106385827064514,
0.21960484981536865,
0.4549999237060547,
0.3774450719356537,
0.061638619750738144,
0.07399222999811172,
0.09292857348918915,
0.056163981556892395,
-0.68858802318573,
0.3132050335407257,
-1.138676404953003,
-0.5191712379455566,
-0.9644527435302734,
-0.05234132707118988,... |
func (b Binomial) Prob(x float64) float64 {
return math.Exp(b.LogProb(x))
} | [
1.0192135572433472,
0.5614639520645142,
0.38769176602363586,
0.9394724369049072,
-0.14463551342487335,
0.8967031836509705,
-0.4809006452560425,
-0.5181010961532593,
0.5444260835647583,
0.06521181762218475,
0.4176690876483917,
-0.30833250284194946,
-0.1510120928287506,
-1.1994911432266235,
... |
func (b Binomial) Rand() float64 {
// NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)
// p. 295-6
// http://www.aip.de/groups/soe/local/numres/bookcpdf/c7-3.pdf
runif := rand.Float64
rexp := rand.ExpFloat64
if b.Src != nil {
rnd := rand.New(b.Src)
runif = rnd.Float64
rexp = rnd... | [
0.42038723826408386,
0.41557371616363525,
0.7945056557655334,
-0.0893172100186348,
-0.763248860836029,
0.37454596161842346,
0.31928473711013794,
-0.24164627492427826,
0.5517322421073914,
0.08096466213464737,
0.5456299781799316,
0.39552250504493713,
-0.7919716238975525,
-0.09193716198205948... |
func (b Binomial) Skewness() float64 {
return (1 - 2*b.P) / b.StdDev()
} | [
-0.11480917036533356,
-0.27313095331192017,
0.37045058608055115,
1.1600207090377808,
0.42589619755744934,
0.4606269896030426,
0.11455819010734558,
0.2769003212451935,
-0.17980872094631195,
-0.24418313801288605,
0.11367732286453247,
0.6576009392738342,
-0.6770917773246765,
-0.06663081049919... |
func (b Binomial) StdDev() float64 {
return math.Sqrt(b.Variance())
} | [
0.8793611526489258,
-0.3089197278022766,
0.2885524332523346,
0.8888543844223022,
0.09330593794584274,
0.9149209260940552,
0.3524162769317627,
0.12625868618488312,
-0.4722810983657837,
-0.8633541464805603,
-0.2644585371017456,
0.2939583361148834,
-0.8362982869148254,
-0.2743189334869385,
... |
func (b Binomial) Survival(x float64) float64 {
return 1 - b.CDF(x)
} | [
-0.5427039265632629,
0.333825021982193,
0.3424281179904938,
0.9752256274223328,
-0.3392672836780548,
0.9927571415901184,
-0.3743095099925995,
-0.846487283706665,
0.08479975908994675,
0.36957600712776184,
-1.2702528238296509,
-0.4752156734466553,
-0.3067726492881775,
-1.2853606939315796,
... |
func (b Binomial) Variance() float64 {
return b.N * b.P * (1 - b.P)
} | [
-0.013171391561627388,
-0.32816067337989807,
0.4700859785079956,
0.7665358781814575,
1.0935145616531372,
1.043286681175232,
0.691498875617981,
-0.1527213305234909,
-0.7901124954223633,
-0.9615129828453064,
-0.37816378474235535,
1.0470629930496216,
-1.005276083946228,
-0.30771711468696594,
... |
func toJSON(a interface{}) ([]byte, error) {
bs, err := json.Marshal(a)
if err != nil {
return []byte{}, fmt.Errorf("Error caught by Onur Gurel")
}
return bs, nil
} | [
-0.21761158108711243,
-0.10392077267169952,
0.7914044260978699,
0.4229925572872162,
-0.6598269939422607,
-0.1789650321006775,
0.4989889860153198,
-0.2779536545276642,
1.189809799194336,
0.6963537931442261,
-0.7297643423080444,
1.230997920036316,
-0.5467255711555481,
0.20729516446590424,
... |
func NewControllerServiceAPI() *ControllerServiceAPI {
this := ControllerServiceAPI{}
return &this
} | [
-0.8164920210838318,
-1.4633065462112427,
0.08459692448377609,
0.7608515620231628,
-0.3738551437854767,
-0.2734888792037964,
0.9041153192520142,
-0.7407500743865967,
0.47935885190963745,
-0.07629185169935226,
-0.5941938757896423,
-0.03049027919769287,
-1.2165907621383667,
1.282239198684692... |
func NewControllerServiceAPIWithDefaults() *ControllerServiceAPI {
this := ControllerServiceAPI{}
return &this
} | [
-0.7291098833084106,
-0.6893213987350464,
0.002628524089232087,
0.6657751202583313,
0.5053417086601257,
-0.4383403956890106,
0.028443239629268646,
-0.7560257315635681,
0.4846000075340271,
-0.3997882008552551,
-0.8292812705039978,
-0.9302464723587036,
-1.2919037342071533,
1.1793909072875977... |
func (o *ControllerServiceAPI) GetType() string {
if o == nil || o.Type == nil {
var ret string
return ret
}
return *o.Type
} | [
0.41111886501312256,
0.8219162821769714,
0.12132631987333298,
1.1006152629852295,
0.6580129265785217,
-0.6930816173553467,
0.9307127594947815,
-0.8112452030181885,
1.1666988134384155,
-0.22235119342803955,
0.03149092197418213,
-1.2895797491073608,
-0.9645757079124451,
0.9134827852249146,
... |
func (o *ControllerServiceAPI) GetTypeOk() (*string, bool) {
if o == nil || o.Type == nil {
return nil, false
}
return o.Type, true
} | [
-0.12576332688331604,
0.1655522733926773,
0.4372214376926422,
0.7123420238494873,
0.5178379416465759,
0.3512633740901947,
0.7667249441146851,
-0.05153276398777962,
0.4050880968570709,
1.021638035774231,
-0.9306536912918091,
-0.42704376578330994,
-0.29833659529685974,
0.5327687859535217,
... |
func (o *ControllerServiceAPI) HasType() bool {
if o != nil && o.Type != nil {
return true
}
return false
} | [
0.3729477822780609,
0.7970387935638428,
0.17253457009792328,
0.2972087562084198,
1.3141239881515503,
-0.5037449598312378,
0.04188024625182152,
0.10062404721975327,
0.4384586811065674,
0.20907282829284668,
0.09646675735712051,
-1.0978220701217651,
-0.7449676990509033,
0.5280949473381042,
... |
func (o *ControllerServiceAPI) SetType(v string) {
o.Type = &v
} | [
0.26146575808525085,
0.23581422865390778,
-0.4662681519985199,
0.40239089727401733,
-0.09422826766967773,
-0.4405859410762787,
-0.3323043882846832,
-1.4653087854385376,
0.6782597303390503,
0.013612675480544567,
-0.006766528822481632,
0.7870071530342102,
-1.065392017364502,
-0.0340924784541... |
func (o *ControllerServiceAPI) GetBundle() Bundle {
if o == nil || o.Bundle == nil {
var ret Bundle
return ret
}
return *o.Bundle
} | [
0.1626422107219696,
0.5904974937438965,
0.2908177077770233,
1.003086805343628,
-0.03316771239042282,
-0.3417576551437378,
1.0814528465270996,
-0.21809428930282593,
0.929718017578125,
-1.2324345111846924,
0.3773225247859955,
-1.2995736598968506,
-1.0156817436218262,
1.0218925476074219,
1.... |
func (o *ControllerServiceAPI) GetBundleOk() (*Bundle, bool) {
if o == nil || o.Bundle == nil {
return nil, false
}
return o.Bundle, true
} | [
0.09537778794765472,
0.058317631483078,
0.27923327684402466,
0.7068930864334106,
-0.1905471682548523,
0.21619807183742523,
1.090013861656189,
0.8189631104469299,
-0.13861362636089325,
0.4789500832557678,
-0.8388805985450745,
-0.6557799577713013,
-0.08799026906490326,
0.6346082091331482,
... |
func (o *ControllerServiceAPI) HasBundle() bool {
if o != nil && o.Bundle != nil {
return true
}
return false
} | [
0.5215083360671997,
0.7493448257446289,
0.31254875659942627,
0.5066803693771362,
0.48329588770866394,
-0.23511900007724762,
0.4404675364494324,
0.6907714009284973,
0.21503587067127228,
-1.200404405593872,
-0.07813357561826706,
-1.0595494508743286,
-0.6472885012626648,
0.6358261108398438,
... |
func (o *ControllerServiceAPI) SetBundle(v Bundle) {
o.Bundle = &v
} | [
-0.11045846343040466,
0.2977878153324127,
-0.21053369343280792,
0.6434082388877869,
-0.2852189242839813,
-0.39909011125564575,
-0.11322115361690521,
-0.8513455390930176,
0.09324102848768234,
-0.8189939856529236,
0.24338653683662415,
0.5316521525382996,
-0.9930211901664734,
0.73721802234649... |
func (c *conf) getConf() *conf {
yamlFile, err := ioutil.ReadFile("logex.yml")
if err != nil {
log.Printf("yamlFile.Get err #%v ", err)
}
err = yaml.Unmarshal(yamlFile, c)
if err != nil {
log.Fatalf("Unmarshal: %v", err)
}
return c
} | [
1.0587044954299927,
-0.5476905107498169,
0.7794625163078308,
-0.4406473934650421,
0.15670885145664215,
-0.28225454688072205,
0.5481805205345154,
1.3134350776672363,
-0.7165849208831787,
-0.6134017109870911,
-0.31797781586647034,
1.1832423210144043,
0.11555763334035873,
-0.04907416179776192... |
func parseGhPost(rw http.ResponseWriter, request *http.Request) {
//A temporary map to store the values for each label
var labelvaluemap = make(map[string] string)
//Decode the log message from JSON
var mapstringinterface MapStringInterface
decoder := json.NewDecoder(request.Body)
err := decoder.Decode(&mapstring... | [
-0.158454030752182,
-0.2528206706047058,
1.0515990257263184,
-0.3066650927066803,
0.653904378414154,
0.3662674129009247,
-0.5364464521408081,
-0.4121139645576477,
-0.7772423028945923,
-0.005521183833479881,
0.4534822702407837,
0.1349107325077057,
-0.4856080114841461,
0.9660557508468628,
... |
func current(c *cli.Context) error {
allFiles, err := findManifests(getGivenPathOrWorkingDir(c), handlers)
// validations
if err != nil {
return cli.NewExitError(err, 1)
}
if len(allFiles) == 0 {
return cli.NewExitError("No application has been found", 2)
}
for _, file := range allFiles {
if file.HasErr... | [
-0.06787080317735672,
-1.4156348705291748,
0.5130820274353027,
-0.11987850815057755,
-0.1623135507106781,
0.9699658155441284,
0.9544059634208679,
-0.042045336216688156,
-0.8867745399475098,
0.17412355542182922,
1.3776962757110596,
0.44699758291244507,
0.7476000189781189,
0.5557391047477722... |
func increment(c *cli.Context) error {
allFiles, err := findManifests(getGivenPathOrWorkingDir(c), handlers)
// validations
if err != nil {
return cli.NewExitError(err, 1)
}
if len(allFiles) == 0 {
return cli.NewExitError("No application has been found", 2)
}
for _, file := range allFiles {
if file.HasE... | [
-0.15757982432842255,
-1.2530885934829712,
0.8994234204292297,
0.5298622846603394,
-0.21758243441581726,
0.9772476553916931,
0.922260046005249,
0.1206977516412735,
-0.2534318268299103,
0.5411247611045837,
0.31659379601478577,
0.0758298859000206,
-0.11191052943468094,
0.4493076801300049,
... |
func set(c *cli.Context) error {
if !c.Args().Present() {
return cli.NewExitError("Missing paramter: `version`", 1)
}
newVersion := c.Args().Get(0)
if len(newVersion) <= 0 {
return cli.NewExitError("Empty parameter: `version`", 2)
}
isValid := isVersion(newVersion)
if !isValid {
return cli.NewExitError(fmt... | [
-0.07482846081256866,
-1.2186976671218872,
0.8755306005477905,
0.3436785936355591,
0.11385598033666611,
0.8666571378707886,
0.4512746334075928,
-0.015203231945633888,
-0.8996161818504333,
1.266037940979004,
0.06652768701314926,
0.18275593221187592,
-0.026452073827385902,
0.6000640392303467... |
func (*ExtAuthz) Descriptor() ([]byte, []int) {
return file_envoy_config_filter_network_ext_authz_v2_ext_authz_proto_rawDescGZIP(), []int{0}
} | [
-0.7578513026237488,
0.018789542838931084,
0.16479907929897308,
0.38049784302711487,
-1.0288983583450317,
-0.14748133718967438,
0.36473503708839417,
0.7724572420120239,
0.28266066312789917,
0.1502670794725418,
-1.049822449684143,
0.40540793538093567,
-0.09168883413076401,
0.705670177936554... |
func NewSpotDatafeedSubscription(ctx *pulumi.Context,
name string, args *SpotDatafeedSubscriptionArgs, opts ...pulumi.ResourceOpt) (*SpotDatafeedSubscription, error) {
if args == nil || args.Bucket == nil {
return nil, errors.New("missing required argument 'Bucket'")
}
inputs := make(map[string]interface{})
if a... | [
-0.4310275614261627,
-0.19806307554244995,
0.31497880816459656,
-0.5395931601524353,
0.13201536238193512,
0.043527502566576004,
-0.12970802187919617,
0.40876495838165283,
-0.4439584016799927,
-0.2763538658618927,
-0.8272817134857178,
0.8180447220802307,
-0.1509930044412613,
-0.677752971649... |
func GetSpotDatafeedSubscription(ctx *pulumi.Context,
name string, id pulumi.ID, state *SpotDatafeedSubscriptionState, opts ...pulumi.ResourceOpt) (*SpotDatafeedSubscription, error) {
inputs := make(map[string]interface{})
if state != nil {
inputs["bucket"] = state.Bucket
inputs["prefix"] = state.Prefix
}
s, e... | [
-0.2863953709602356,
-0.19703274965286255,
0.26838821172714233,
-0.7501880526542664,
0.17163445055484772,
-0.17094352841377258,
-0.4874688386917114,
0.008922656998038292,
0.26871949434280396,
-0.6146315336227417,
-0.3991127610206604,
1.6518807411193848,
0.17455236613750458,
-1.504726290702... |
func (r *SpotDatafeedSubscription) URN() pulumi.URNOutput {
return r.s.URN()
} | [
0.30529844760894775,
-0.3141486644744873,
0.2643280625343323,
0.08122824132442474,
0.8309582471847534,
-0.21840648353099823,
0.204941526055336,
1.4436445236206055,
0.23612433671951294,
-1.2263476848602295,
-0.14785946905612946,
1.6954882144927979,
0.49691537022590637,
-1.0209405422210693,
... |
func (r *SpotDatafeedSubscription) ID() pulumi.IDOutput {
return r.s.ID()
} | [
1.0685505867004395,
-0.13522347807884216,
0.21149376034736633,
0.24759240448474884,
0.8283290863037109,
0.18221989274024963,
-0.024933090433478355,
0.24911239743232727,
0.742424488067627,
-0.6039787530899048,
0.04792045056819916,
1.0293766260147095,
-0.12935569882392883,
-0.593259513378143... |
func (r *SpotDatafeedSubscription) Bucket() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["bucket"])
} | [
0.4088802933692932,
0.2744646668434143,
0.3079049587249756,
-0.1010291799902916,
0.5816190242767334,
0.7412854433059692,
-0.24685010313987732,
0.10409687459468842,
0.3174811899662018,
-0.7511638402938843,
0.3602786064147949,
1.6114684343338013,
1.2837402820587158,
-1.062699556350708,
-0.... |
func (r *SpotDatafeedSubscription) Prefix() pulumi.StringOutput {
return (pulumi.StringOutput)(r.s.State["prefix"])
} | [
0.6466366052627563,
0.16861681640148163,
0.30410662293434143,
-0.18166951835155487,
0.8393497467041016,
0.032420553267002106,
-0.6871144771575928,
0.6061970591545105,
1.4221981763839722,
-0.20874416828155518,
0.1646355241537094,
1.5881973505020142,
0.8562928438186646,
-0.8982845544815063,
... |
func assertPodsPendingForDuration(c clientset.Interface, deployment *appsv1.Deployment, pendingPodsNum int, pendingDuration time.Duration) error {
pendingPods := make(map[string]time.Time)
err := wait.PollImmediate(pollInterval, pollTimeout+pendingDuration, func() (bool, error) {
var err error
currentPodList, e... | [
-0.8291333317756653,
-0.5022289156913757,
0.8095027804374695,
-0.7739588022232056,
-0.3501553535461426,
0.25504255294799805,
0.1703590452671051,
0.024146176874637604,
-0.24063068628311157,
0.6817171573638916,
0.07285769283771515,
-0.19462169706821442,
-0.1669532209634781,
0.495403587818145... |
func newReplicaSet(name, namespace string, replicas int32, podLabels map[string]string, imageName, image string) *appsv1.ReplicaSet {
return &appsv1.ReplicaSet{
TypeMeta: metav1.TypeMeta{
Kind: "ReplicaSet",
APIVersion: "apps/v1",
},
ObjectMeta: metav1.ObjectMeta{
Namespace: namespace,
Name: ... | [
-0.3112877607345581,
-0.26145780086517334,
0.34394651651382446,
-0.20980523526668549,
-1.3041515350341797,
-0.37090596556663513,
-0.852983832359314,
-0.2168128490447998,
0.32970547676086426,
0.14033770561218262,
0.0907229632139206,
0.9396193027496338,
-0.20400278270244598,
-0.2432271242141... |
func balanceXdrToProto(amountXdr xdr.Int64, assetXdr xdr.Asset) (amt string, asset stellar1.Asset, err error) {
unpad := func(in []byte) (out string) {
return strings.TrimRight(string(in), string([]byte{0}))
}
amt = amount.String(amountXdr)
switch assetXdr.Type {
case xdr.AssetTypeAssetTypeNative:
return amt, ... | [
0.11754274368286133,
-0.4504590332508087,
0.9147393703460693,
-1.2629070281982422,
-0.5567237734794617,
0.030446186661720276,
-0.4897463619709015,
-1.10041081905365,
0.6643627285957336,
0.3562193512916565,
0.3159157931804657,
0.5880124568939209,
0.07472279667854309,
-0.3073314428329468,
... |
func pkg(c *cobra.Command, _ []string) {
var err error
// cwd, err := os.Getwd()
if err != nil {
fmt.Println("lambda-phage can't find your package!")
return
}
binName := "lambda-phage-" + cuid.New()
cmd := exec.Command("go", "build", "-o", "/tmp/"+binName)
cmd.Stderr = os.Stderr
// copy the environment ... | [
0.14096613228321075,
0.24080970883369446,
0.9600068926811218,
-0.06557038426399231,
0.3586396276950836,
0.47155171632766724,
0.8361477255821228,
0.5613775849342346,
-0.17882174253463745,
0.02394045703113079,
-0.4628903865814209,
0.3277498483657837,
0.4415404796600342,
1.0126535892486572,
... |
func newZipFile(fName string) (*zipFile, error) {
f, err := os.Create(fName)
if err != nil {
return nil, err
}
return &zipFile{
f,
zip.NewWriter(f),
}, nil
} | [
0.309977263212204,
-0.1716105341911316,
0.2129010707139969,
0.2260899692773819,
-0.7590796947479248,
-0.06441790610551834,
0.40924936532974243,
0.22972562909126282,
-0.8295417428016663,
0.22033441066741943,
-0.5569947957992554,
-1.010780930519104,
-0.1024562194943428,
0.2144889533519745,
... |
func (z *zipFile) AddFile(fName string) (int64, error) {
debug := debug.Debug("zipFile.AddFile")
debug("opening source file")
f, err := os.Open(fName)
if err != nil {
return 0, err
}
debug("source file opened")
// want to make sure we get the base name for a file,
// so fstat it, which is able to do that
d... | [
-0.6542534232139587,
0.2854166030883789,
0.8836520314216614,
-0.3543047606945038,
-0.49025988578796387,
-0.021659797057509422,
1.2547047138214111,
0.708753228187561,
-0.08769634366035461,
-0.21969875693321228,
0.00677832867950201,
-0.3040459454059601,
-0.28454726934432983,
0.30813008546829... |
func (z *zipFile) AddString(fName string, str []byte) (int64, error) {
debug := debug.Debug("zipFile.AddString")
buf := bytes.NewBuffer(str)
// add file to archive
debug("adding file to archive")
wr, err := z.Create(fName)
if err != nil {
return 0, err
}
debug("copying data for file")
n, err := io.Copy(w... | [
-0.39784321188926697,
-0.29470834136009216,
0.6306483745574951,
-0.21790629625320435,
-0.5276476740837097,
0.24677829444408417,
0.30789485573768616,
0.16056518256664276,
-0.2859276533126831,
-0.04831846058368683,
0.4800247251987457,
-0.10205008834600449,
-0.25261178612709045,
-0.3779691457... |
func (z *zipFile) Close() error {
err := z.Writer.Close()
if err != nil {
return err
}
return z.f.Close()
} | [
0.08147314190864563,
-0.32461783289909363,
0.45682138204574585,
-0.3556040823459625,
0.2516399025917053,
0.06228364631533623,
1.1331156492233276,
0.3237113058567047,
-0.7348276376724243,
-0.8913615942001343,
0.7730996608734131,
-1.0296270847320557,
-0.8686412572860718,
0.17693106830120087,... |
func init() {
// initialize logger
log.SetFlags(log.Ldate | log.Ltime | log.Lmicroseconds | log.Lshortfile)
} | [
1.0726513862609863,
-0.592837393283844,
0.4788207411766052,
-0.17737895250320435,
-0.08423268795013428,
0.8500874042510986,
-0.3856542110443115,
0.2804687023162842,
-0.9949400424957275,
-0.5999899506568909,
-0.3872494101524353,
1.1076992750167847,
0.07805134356021881,
1.378432035446167,
... |
func main() {
fmt.Printf("\nProgram:\n")
fmt.Printf(" Name : %s\n", progName)
fmt.Printf(" Release : %s - %s\n", progVersion, progDate)
fmt.Printf(" Purpose : %s\n", progPurpose)
fmt.Printf(" Info : %s\n", progInfo)
// command line option... | [
0.5592665076255798,
-0.6588320732116699,
1.1668994426727295,
0.4511180818080902,
0.27066364884376526,
0.3841564655303955,
0.8437202572822571,
-0.1045711487531662,
-1.0113894939422607,
0.09252213686704636,
0.30994078516960144,
0.6193679571151733,
-0.30684521794319153,
-0.3743925988674164,
... |
func newElementStats() *elementStats {
return &elementStats{
Ranges: map[osm.Type]*idRange{
osm.TypeNode: {Min: math.MaxInt64},
osm.TypeWay: {Min: math.MaxInt64},
osm.TypeRelation: {Min: math.MaxInt64},
},
}
} | [
-0.04335571825504303,
-0.27131640911102295,
0.21632489562034607,
-0.32687392830848694,
-0.7507346868515015,
0.21657010912895203,
-0.49430856108665466,
-1.1764066219329834,
0.1968473345041275,
-0.7239560484886169,
-0.06764323264360428,
0.5475499629974365,
-0.45734772086143494,
0.52881479263... |
func (s *elementStats) Add(id osm.ElementID, tags osm.Tags) {
s.Ranges[id.Type()].Add(id.Ref())
if v := id.Version(); v > s.MaxVersion {
s.MaxVersion = v
}
if l := len(tags); l > s.MaxTags {
s.MaxTags = l
s.MaxTagsID = id
}
} | [
-0.04146141931414604,
-0.17985759675502777,
0.26305535435676575,
-0.20933888852596283,
0.3571024239063263,
0.5468491315841675,
-0.9228904843330383,
-0.3562794327735901,
0.4885927140712738,
-0.3176846206188202,
-0.013822021894156933,
0.8670238852500916,
0.13473863899707794,
0.85756653547286... |
func (r *idRange) Add(ref int64) {
if ref > r.Max {
r.Max = ref
}
if ref < r.Min {
r.Min = ref
}
} | [
-1.401542067527771,
-0.2818427085876465,
0.25450727343559265,
-0.3701793849468231,
-0.13989704847335815,
0.8322464823722839,
-0.47718483209609985,
-0.40709805488586426,
0.4914935231208801,
0.019888926297426224,
0.07719714939594269,
0.5136081576347351,
-0.7953198552131653,
0.508607447147369... |
func createNewNodeNetworkObject(writer *bufio.Writer, sourceOsmNode *osm.Node) {
tags := sourceOsmNode.TagMap()
// Punktnetzwerk 'Fahrrad'
newOsmNode := *sourceOsmNode // copy content (don't modify origin/source node)
newOsmNode.ID = 0
newOsmNode.Tags = []osm.Tag{} // remove all source tags
refValue, found := ta... | [
0.07638177275657654,
-0.37168872356414795,
0.6332194805145264,
-0.406997412443161,
-0.03386799618601799,
-0.17434875667095184,
-0.23047851026058197,
-0.869647741317749,
-0.49655887484550476,
-0.6350066661834717,
-0.8668319582939148,
-0.38908320665359497,
0.5967971682548523,
0.7601451873779... |
func writeNewNodeObject(writer *bufio.Writer, newOsmNode *osm.Node) {
newOsmNode.ID = newNodeID
newNodeID++
data, err := xml.MarshalIndent(newOsmNode, " ", " ")
if err != nil {
log.Fatalf("error <%v> at xml.MarshalIndent()", err)
}
_, err = fmt.Fprintf(writer, "%s\n", string(data))
if err != nil {
log.Fat... | [
-0.23062506318092346,
-1.0361065864562988,
0.5828222036361694,
-0.8280283212661743,
0.2717127203941345,
0.16155315935611725,
0.13101907074451447,
-0.5096312165260315,
-0.8500205874443054,
-0.5137859582901001,
-0.8927364349365234,
0.7455450296401978,
0.16427022218704224,
0.11760672181844711... |
func addHighwayTypeToTurningCircleLoop(e *osm.Way, tags map[string]string, turningCircleLoop map[osm.NodeID]*osm.Node, highwayType string) int {
found := 0
/*
fmt.Printf("\nID: %v, nodes = %v\n", e.ElementID(), len(e.Nodes))
for key, value := range tags {
fmt.Printf("ID: %v, %v = %v\n", e.ElementID(), key, val... | [
-0.2937731146812439,
-0.03870179504156113,
0.8135203123092651,
-0.603456437587738,
0.24665196239948273,
-0.06138134002685547,
0.3198675811290741,
-0.626644492149353,
-0.9449782967567444,
0.4145508110523224,
-0.3507342040538788,
0.20474791526794434,
-0.3909347653388977,
1.3955823183059692,
... |
func printProgUsage() {
fmt.Printf("\nUsage:\n")
fmt.Printf(" %s -inputOSM=filename -outputNodes=filename -startNode=number\n", progName)
fmt.Printf("\nExample:\n")
fmt.Printf(" %s -inputOSM=osmdata.pbf -outputNodes=osmpp.xml -startNode=1000000000000\n", progName)
fmt.Printf("\nOptions:\n")
flag.PrintDefaults()... | [
0.12714022397994995,
-0.30939972400665283,
0.9977385997772217,
-0.34713083505630493,
0.25299331545829773,
0.8237209320068359,
0.05426530912518501,
0.21181388199329376,
-0.4937697947025299,
0.6215607523918152,
0.563267707824707,
0.9747098088264465,
-1.4302102327346802,
0.6302410364151001,
... |
func setup() *session.Session {
if sess == nil {
// server is the mock server that simply writes a 200 status back to the client
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}))
return session.Must(session.NewSession(&aws.Config... | [
-0.20981527864933014,
-0.24965691566467285,
0.6391336917877197,
-0.2517528533935547,
-0.1725274622440338,
0.08382295817136765,
0.03927803412079811,
-0.37752053141593933,
1.239938497543335,
0.5173116326332092,
-0.25729456543922424,
0.27800726890563965,
-0.08031828701496124,
-0.2011757791042... |
func TestCreate(t *testing.T) {
appFs := NewS3Fs(setup(), "bucket_name")
file, err := appFs.Create("output.jpg")
if err != nil {
t.Fatal(err)
}
info, err := file.Stat()
if err != nil {
t.Fatal(err)
}
if info.Name() != "output.jpg" {
t.Fatal("couldnt open file")
}
} | [
1.0004512071609497,
0.0967525988817215,
0.4822923243045807,
0.8432767391204834,
0.4186580777168274,
0.5472745299339294,
0.0346861258149147,
-0.6099246144294739,
-0.7768879532814026,
-1.1629645824432373,
0.06582744419574738,
-1.478945016860962,
0.06961560249328613,
0.22863662242889404,
-0... |
func TestName(t *testing.T) {
appFs := NewS3Fs(setup(), "bucket_name")
if appFs.Name() != "S3Fs" {
t.Fatal("unknown module name")
}
} | [
0.7736302614212036,
0.2313937395811081,
0.34442782402038574,
0.7969584465026855,
0.6082510352134705,
0.4941253066062927,
-0.6569778919219971,
-0.9756125807762146,
0.6357491612434387,
0.10375678539276123,
-0.20997413992881775,
-0.3964748680591583,
0.410513699054718,
0.05517774075269699,
-... |
func TestOpen(t *testing.T) {
appFs := NewS3Fs(setup(), "bucket_name")
file, err := appFs.Open("output.jpg")
if err != nil {
t.Fatal(err)
}
info, err := file.Stat()
if err != nil {
t.Fatal(err)
}
if info.Name() != "output.jpg" {
t.Fatal("couldnt open file")
}
} | [
0.5472967624664307,
-0.08560305833816528,
0.5940893292427063,
0.6207985877990723,
-0.543880045413971,
0.7178052663803101,
0.37295857071876526,
0.3331986367702484,
-0.46455949544906616,
-1.1393402814865112,
0.05122451111674309,
-1.2307801246643066,
-0.041489243507385254,
-0.1988618820905685... |
func TestS3OpenFile(t *testing.T) {
appFs := NewS3Fs(setup(), "bucket_name")
file, err := appFs.OpenFile("output.jpg", 0, 0777)
if err != nil {
t.Fatal(err)
}
info, err := file.Stat()
if err != nil {
t.Fatal(err)
}
if info.Name() != "output.jpg" {
t.Fatal("couldnt open file")
}
} | [
0.7960777878761292,
-0.06559886783361435,
0.8094721436500549,
0.4913378357887268,
-0.5742952823638916,
0.79413241147995,
0.30321210622787476,
0.05681054666638374,
-0.3294346034526825,
-0.6408354640007019,
-0.1793358027935028,
-1.0321825742721558,
0.07982305437326431,
-0.1275297850370407,
... |
func MountPoint(path string) nfsOption {
opt := nfsOption{
optionString: "mountpoint",
}
if path != "" {
opt.extra = []string{path}
}
return opt
} | [
0.7214305996894836,
-0.4391236901283264,
0.34592702984809875,
-0.08509273082017899,
0.3896447718143463,
0.012127351947128773,
-0.8208922147750854,
-0.7055996060371399,
1.0329983234405518,
0.3477690815925598,
0.4745962917804718,
-0.36691978573799133,
-1.0012280941009521,
0.4089358448982239,... |
func MP(path string) nfsOption {
opt := MountPoint(path)
opt.optionString = "mp"
return opt
} | [
0.3829575181007385,
-0.708321213722229,
0.44072914123535156,
0.47398245334625244,
-0.051258690655231476,
0.6574840545654297,
-0.15284359455108643,
-0.20741985738277435,
1.0262619256973267,
0.0998941957950592,
0.9143257737159729,
-0.028756041079759598,
-0.5644272565841675,
0.5069620013237,
... |
func FsID(id string) nfsOption {
return nfsOption{
optionString: "fsid",
extra: []string{id},
}
} | [
0.34397807717323303,
-0.7073885202407837,
0.24242982268333435,
-0.3835248649120331,
-0.04979369416832924,
-0.16519571840763092,
-0.82859206199646,
-0.974875271320343,
1.5249043703079224,
0.2266247421503067,
-0.37721943855285645,
-0.15001541376113892,
-0.15945738554000854,
-0.11855793744325... |
func Replicas(replicas ...string) nfsOption {
return nfsOption{
optionString: "replicas",
extra: replicas,
omitIfExtraEmpty: true,
}
} | [
-0.33882585167884827,
0.5317732095718384,
0.23571939766407013,
0.004478331655263901,
-0.428425669670105,
0.12476003915071487,
-0.584283173084259,
-0.06738988310098648,
0.5705744624137878,
0.24917878210544586,
-0.2751286029815674,
0.12331365048885345,
-0.2644633948802948,
-0.640719652175903... |
func AnonUID(uid int) nfsOption {
return nfsOption{
optionString: "anonuid",
extra: []string{fmt.Sprintf("%d", uid)},
}
} | [
-0.4133397042751312,
-0.44274261593818665,
0.13871987164020538,
-1.1522479057312012,
-0.7168488502502441,
0.07979025691747665,
-0.16989538073539734,
0.24980349838733673,
0.9592517614364624,
-0.2820580005645752,
-0.6371584534645081,
0.6712008118629456,
-0.5201704502105713,
-0.00878782384097... |
func AnonGID(gid int) nfsOption {
return nfsOption{
optionString: "anongid",
extra: []string{fmt.Sprintf("%d", gid)},
}
} | [
0.31615108251571655,
-0.03829595446586609,
0.23796704411506653,
-1.2477885484695435,
-0.2174472063779831,
0.3094145655632019,
-0.7778231501579285,
-0.5870048999786377,
0.5413414239883423,
0.984150230884552,
-0.2979307174682617,
0.5300243496894836,
-0.31244832277297974,
0.11594613641500473,... |
func (n *nfsManager) ExportFs(path string, host string, options ...nfsOption) error {
return n.commandRetrier(exportFSCommandLine(path, host, options), n.Command)
} | [
-0.0444791354238987,
0.7756176590919495,
0.27870410680770874,
0.8848400712013245,
-0.11716488003730774,
-0.774168074131012,
-0.35567420721054077,
-0.9413700699806213,
0.7443004846572876,
-0.6518733501434326,
0.6126081943511963,
-0.16372783482074738,
-0.6311520338058472,
0.6913949251174927,... |
func (n *nfsManager) UnExportFs(path string, host string) error {
return n.commandRetrier(unExportFSCommandLine(path, host), n.Command)
} | [
-0.20384924113750458,
0.5449081659317017,
0.3022155165672302,
-0.07475104928016663,
-0.4966256320476532,
-0.9483864307403564,
0.27527567744255066,
0.4798349440097809,
-0.6450926065444946,
-0.6460109353065491,
0.5246155261993408,
-0.24168828129768372,
-0.7476996183395386,
-0.597809553146362... |
func PrebuiltLibraryFactory() android.Module {
module, _ := NewPrebuiltLibrary(android.HostAndDeviceSupported)
// Prebuilt shared libraries can be included in APEXes
android.InitApexModule(module)
return module.Init()
} | [
0.21112269163131714,
-0.4603951573371887,
0.43339282274246216,
0.22308701276779175,
-0.13438135385513306,
1.0881850719451904,
0.5303217768669128,
0.38896480202674866,
0.8301064372062683,
-1.0886962413787842,
-0.5914967656135559,
-0.11075058579444885,
-0.140371635556221,
0.2099953442811966,... |
func PrebuiltSharedLibraryFactory() android.Module {
module, _ := NewPrebuiltSharedLibrary(android.HostAndDeviceSupported)
return module.Init()
} | [
0.5410954356193542,
-0.28112995624542236,
0.42742854356765747,
0.48800718784332275,
0.15018701553344727,
1.1289714574813843,
1.3533953428268433,
0.09863582253456116,
0.28322044014930725,
-0.9914882779121399,
-0.7807759046554565,
0.06261713802814484,
-0.41107943654060364,
0.3501647114753723... |
func PrebuiltSharedTestLibraryFactory() android.Module {
module, library := NewPrebuiltLibrary(android.HostAndDeviceSupported)
library.BuildOnlyShared()
library.baseInstaller = NewTestInstaller()
return module.Init()
} | [
0.43071603775024414,
-0.44878894090652466,
0.33411288261413574,
0.543077826499939,
0.45133787393569946,
0.8479146361351013,
1.776355266571045,
0.1784345656633377,
0.8109652996063232,
-0.8983946442604065,
-0.5612764954566956,
-0.3479836881160736,
-0.9178473353385925,
0.5120958089828491,
0... |
func PrebuiltStaticLibraryFactory() android.Module {
module, _ := NewPrebuiltStaticLibrary(android.HostAndDeviceSupported)
return module.Init()
} | [
-0.33593884110450745,
-0.26581430435180664,
0.4457181990146637,
0.7884625792503357,
-0.018757278099656105,
1.0543023347854614,
0.8088606595993042,
-0.018017999827861786,
0.2311834990978241,
-0.513389527797699,
-0.6789377927780151,
-0.018439490348100662,
-0.01077929325401783,
0.603319287300... |
func prebuiltBinaryFactory() android.Module {
module, _ := NewPrebuiltBinary(android.HostAndDeviceSupported)
return module.Init()
} | [
-0.0015859876293689013,
0.0008098275866359472,
0.5615809559822083,
0.7573173642158508,
-0.08772791922092438,
0.6175504326820374,
1.1144468784332275,
-0.49448511004447937,
0.25597748160362244,
-1.3319437503814697,
-1.3604844808578491,
0.5165081024169922,
-0.5246884822845459,
0.4626893699169... |
func init() {
cdt.CustomDateFormat = "2006-01-02"
cdt.CustomTimeFormat = "15:04"
cdt.CustomDateTimeFormat = time.RFC3339
} | [
0.788378119468689,
-0.6366826295852661,
0.5209009647369385,
-0.7636233568191528,
-0.5579270720481873,
0.2799377739429474,
-0.4864390790462494,
0.19250229001045227,
0.02633986435830593,
0.08868694305419922,
-0.7696640491485596,
0.3725743293762207,
0.6433015465736389,
0.6466547250747681,
-... |
func (wp *WPLock) Lock() {
wp.waitingLock.Lock()
if atomic.CompareAndSwapInt32(&wp.waiting, 0, 1) {
wp.writeLock.Lock()
} else {
atomic.AddInt32(&wp.waiting, 1)
}
wp.waitingLock.Unlock()
wp.lock.Lock()
} | [
-0.7326382398605347,
0.9793149828910828,
0.6164803504943848,
-0.17823077738285065,
0.6442864537239075,
0.6782528162002563,
1.5967671871185303,
-0.38938024640083313,
-0.23101672530174255,
-0.730364203453064,
0.4660559594631195,
-0.2818201184272766,
-0.7232479453086853,
0.19823715090751648,
... |
func (wp *WPLock) Unlock() {
wp.waitingLock.Lock()
if atomic.CompareAndSwapInt32(&wp.waiting, 1, 0) {
wp.writeLock.Unlock()
} else {
atomic.AddInt32(&wp.waiting, -1)
}
wp.waitingLock.Unlock()
wp.lock.Unlock()
} | [
-1.0259701013565063,
0.7968717813491821,
0.6993839144706726,
-0.022889360785484314,
0.3238784968852997,
0.5058355927467346,
1.1833139657974243,
0.4838922321796417,
-0.34125247597694397,
-0.2037157565355301,
0.4238870441913605,
0.015993749722838402,
-0.9500331878662109,
0.006648734211921692... |
func (wp *WPLock) RLock() {
wp.writeLock.Lock()
wp.writeLock.Unlock()
wp.lock.RLock()
} | [
-0.23918461799621582,
0.47638073563575745,
0.47154057025909424,
-0.03956136107444763,
0.836304783821106,
0.39760199189186096,
1.3681708574295044,
-0.6972674131393433,
-0.46953099966049194,
-0.23860642313957214,
0.409420371055603,
0.311968594789505,
-0.544865071773529,
0.6518478989601135,
... |
func (wp *WPLock) RUnlock() {
wp.lock.RUnlock()
} | [
-0.9078761339187622,
0.753616213798523,
0.478683739900589,
0.17007331550121307,
0.8523483276367188,
0.7992677092552185,
1.3286620378494263,
0.36018842458724976,
-0.1060749962925911,
-1.3531785011291504,
0.13422492146492004,
0.7085610032081604,
-0.8413223028182983,
0.9480615854263306,
0.2... |
func castString(input map[string]interface{}, key string) *string {
var intf interface{}
var rv string
var ok bool
intf, ok = input[key]
if !ok {
return nil
}
rv, ok = intf.(string)
if !ok {
log.Print("WARNING: type mismatch for field ", key,
". Expected string, found ", reflect.TypeOf(intf).Name())
... | [
-0.4332271218299866,
-0.4276276230812073,
0.501449465751648,
0.1506076455116272,
-0.25596997141838074,
0.10295179486274719,
-0.3621509075164795,
-0.7550934553146362,
-0.5644128322601318,
0.9735755920410156,
1.2393933534622192,
0.2873770296573639,
-0.8417797088623047,
-0.4701656699180603,
... |
func castBool(input map[string]interface{}, key string) *bool {
var intf interface{}
var rv bool
var ok bool
intf, ok = input[key]
if !ok {
return nil
}
rv, ok = intf.(bool)
if !ok {
log.Print("WARNING: type mismatch for field ", key,
". Expected bool, found ", reflect.TypeOf(intf).Name())
return nil... | [
-0.38707759976387024,
-0.2841319441795349,
0.6583553552627563,
0.730211079120636,
0.0389423668384552,
0.536156415939331,
-0.13440574705600739,
-0.15590299665927887,
-0.668195366859436,
1.2696090936660767,
0.12835107743740082,
0.20721204578876495,
-0.6984893083572388,
-0.4012221097946167,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.