text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (ch *Channel) OutputEnabled() (bool, error) {
return ch.QueryBool("OUTP?\n")
} | [
0.0027363027911633253,
-0.04922876134514809,
0.5139499306678772,
0.16626660525798798,
-0.5794535279273987,
-0.26591649651527405,
-0.07386757433414459,
0.0653083398938179,
-0.4677911400794983,
0.6247045397758484,
-0.6440833210945129,
-0.04906698688864708,
-1.6123206615447998,
-0.06675714999... |
func (ch *Channel) SetOutputEnabled(v bool) error {
if v {
return ch.Set("OUTP ON\n")
}
return ch.Set("OUTP OFF\n")
} | [
0.12739364802837372,
0.029506530612707138,
0.5078281760215759,
-0.26319754123687744,
-0.3258233666419983,
0.023270487785339355,
-0.015270020812749863,
0.20647059381008148,
-0.3974667191505432,
0.792396068572998,
-0.47152814269065857,
-0.27618369460105896,
-1.3126075267791748,
0.26867052912... |
func (ch *Channel) DisableOutput() error {
return ch.SetOutputEnabled(false)
} | [
0.6133480668067932,
-0.3167176842689514,
0.1339832991361618,
-0.056576259434223175,
-0.19600524008274078,
-0.413078248500824,
0.8011115193367004,
0.46133100986480713,
-0.7394216656684875,
-0.6038011908531189,
-0.05003548413515091,
-0.7960395812988281,
-1.4604893922805786,
0.184792444109916... |
func (ch *Channel) EnableOutput() error {
return ch.SetOutputEnabled(true)
} | [
1.0312691926956177,
-0.38623949885368347,
0.2726806104183197,
-0.12104464322328568,
0.3019390404224396,
-0.43373608589172363,
0.3329218924045563,
0.48357176780700684,
-0.6075930595397949,
-0.3759283721446991,
-0.5524705052375793,
-0.2201632410287857,
-1.0569883584976196,
-0.258670657873153... |
func (ch *Channel) OVPEnabled() (bool, error) {
return false, nil
} | [
-0.5726420283317566,
-0.3152669370174408,
0.6655755043029785,
-0.15522564947605133,
-0.0321836844086647,
0.20723091065883636,
-0.8916447162628174,
0.09475019574165344,
0.5642846822738647,
0.9289532899856567,
-0.2235957235097885,
-0.5127037167549133,
-1.3738974332809448,
-0.4698699414730072... |
func (ch *Channel) SetOVPEnabled(v bool) error {
return dcpwr.ErrOVPUnsupported
} | [
-0.7557008862495422,
0.06698843091726303,
0.5890588760375977,
-0.5468778610229492,
-0.19662334024906158,
0.6182391047477722,
-0.0588967390358448,
0.6898511648178101,
0.7306520342826843,
0.7663342952728271,
-0.20758236944675446,
-0.39344924688339233,
-1.0100449323654175,
-0.3581203520298004... |
func (ch *Channel) DisableOVP() error {
return nil
} | [
0.4678448736667633,
-0.5294100642204285,
0.3999459147453308,
-0.21110795438289642,
0.45345863699913025,
1.1643277406692505,
0.32860273122787476,
0.24459964036941528,
0.8387047648429871,
0.33700695633888245,
0.32997027039527893,
-0.4006475806236267,
-1.5713796615600586,
-0.684196949005127,
... |
func (ch *Channel) EnableOVP() error {
return dcpwr.ErrOVPUnsupported
} | [
0.1430024802684784,
0.030192943289875984,
0.6794134378433228,
-0.638303279876709,
0.9995121359825134,
1.0585116147994995,
-0.43029141426086426,
0.28406909108161926,
0.9650822281837463,
0.6614798307418823,
0.10946119576692581,
-0.08982904255390167,
-1.0462137460708618,
-0.8243466019630432,
... |
func (ch *Channel) OVPLimit() (float64, error) {
return 0, dcpwr.ErrOVPUnsupported
} | [
-0.2722747325897217,
0.8963387608528137,
0.6665213704109192,
-0.6484654545783997,
0.06823217123746872,
-0.06431934982538223,
-1.2520514726638794,
-0.4867633879184723,
0.9995298385620117,
0.5023310780525208,
0.288011759519577,
0.30994608998298645,
-1.493125081062317,
-0.6208187341690063,
... |
func (ch *Channel) SetOVPLimit(limit float64) error {
return dcpwr.ErrOVPUnsupported
} | [
-0.6547870635986328,
0.5330721139907837,
0.6821795701980591,
-0.5034801959991455,
0.3728858232498169,
0.2985571324825287,
-0.8240702152252197,
-0.19543802738189697,
0.8630973100662231,
0.4504636824131012,
-0.2557980716228485,
0.3835830092430115,
-0.9618887901306152,
-0.43811094760894775,
... |
func (ch *Channel) VoltageLevel() (float64, error) {
return ch.queryLimit(voltageQuery)
} | [
-0.3383601903915405,
0.7783229947090149,
0.12560459971427917,
0.1250205785036087,
0.11995940655469894,
-0.39865952730178833,
-0.1890462338924408,
-0.44286060333251953,
0.340350478887558,
0.5705033540725708,
0.06067618727684021,
0.6622682213783264,
-1.093471884727478,
0.6346240639686584,
... |
func (ch *Channel) SetVoltageLevel(amp float64) error {
return ch.Set("APPL %s, %f\n", ch.Name(), amp)
} | [
-0.06840236485004425,
-0.28996744751930237,
0.16802501678466797,
-0.584092915058136,
-0.47733888030052185,
0.2564801871776581,
-0.8599592447280884,
-0.7452939748764038,
0.26607757806777954,
1.0261374711990356,
-0.652237057685852,
0.2891824543476105,
-0.06371214985847473,
0.9213572144508362... |
func (dev *E36xx) OutputCount() int {
return len(dev.Channels)
} | [
0.381511390209198,
-0.020648887380957603,
0.5984327793121338,
-0.6470958590507507,
0.503595232963562,
-0.08374520391225815,
0.7127000689506531,
-0.572113573551178,
-0.49421581625938416,
-0.4377261996269226,
0.20533394813537598,
-0.08724260330200195,
0.08257929980754852,
0.2999415695667267,... |
func (ch *Channel) ConfigureCurrentLimit(behavior dcpwr.CurrentLimitBehavior, limit float64) error {
return dcpwr.ErrNotImplemented
} | [
-0.057275157421827316,
-0.6439756155014038,
0.5484033226966858,
-0.03660251200199127,
-0.16391123831272125,
0.2113427370786667,
0.5088838338851929,
0.32319098711013794,
0.27375733852386475,
-0.0949971154332161,
-0.00234008627012372,
0.18543797731399536,
-0.16232933104038239,
0.576311647891... |
func (ch *Channel) QueryCurrentLimitMax(voltage float64) (float64, error) {
return 0.0, dcpwr.ErrNotImplemented
} | [
-0.30348798632621765,
-0.7310102581977844,
0.3497219383716583,
-0.18342874944210052,
-0.8558144569396973,
0.07836579531431198,
-0.2890605628490448,
-0.010103996843099594,
0.5698131322860718,
-0.06423534452915192,
0.1979859322309494,
0.4971954822540283,
-1.0728143453598022,
0.69557553529739... |
func (ch *Channel) QueryVoltageLevelMax(currentLimit float64) (float64, error) {
return 0.0, dcpwr.ErrNotImplemented
} | [
0.26789379119873047,
-0.14959537982940674,
0.2909955084323883,
-0.031471479684114456,
-0.5325638055801392,
0.26906394958496094,
-1.2394614219665527,
-0.06787120550870895,
0.4667993187904358,
-0.07880040258169174,
0.4390859007835388,
0.09114448726177216,
-0.9796784520149231,
0.6718829870223... |
func (ch *Channel) QueryOutputState(os dcpwr.OutputState) (bool, error) {
return false, dcpwr.ErrNotImplemented
} | [
-0.8607103228569031,
-0.5081334114074707,
0.33157238364219666,
-1.0981427431106567,
-1.213197112083435,
0.02835153415799141,
0.2948543429374695,
-0.6716621518135071,
0.2840256094932556,
-0.598809003829956,
-0.25888484716415405,
-0.6787319183349609,
-0.6142492890357971,
-0.11905637383460999... |
func (ch *Channel) ResetOutputProtection() error {
return dcpwr.ErrNotImplemented
} | [
-0.8888181447982788,
-0.16821099817752838,
0.18022635579109192,
-0.1270335465669632,
-0.029231995344161987,
-0.8851523399353027,
1.1234444379806519,
-0.559619665145874,
0.09411721676588058,
0.09585334360599518,
0.01701357774436474,
-0.29076582193374634,
-0.8304774761199951,
-0.583634912967... |
func Fixed(t time.Time) Clock {
return ClockFunc(func() time.Time {
return t
})
} | [
0.256821870803833,
-0.22500018775463104,
0.35222098231315613,
0.07730795443058014,
0.10903909802436829,
0.2490437924861908,
0.17641566693782806,
0.042232438921928406,
-0.37618473172187805,
0.4994547367095947,
-1.0915395021438599,
0.6550056338310242,
0.48359718918800354,
0.2250063270330429,... |
func (c *Core) GetTrackLyrics(ctx context.Context, eid string) (edb.Lyrics, error) {
trackID, err := edb.DecodeEID(eid)
if err != nil {
return edb.Lyrics{}, err
}
lyrics, err := edb.GetTrackLyrics(c.DB, trackID)
if err == nil {
return lyrics, nil
} else if !gorm.IsRecordNotFoundError(err) {
return edb.Lyri... | [
-0.4086032509803772,
0.7875886559486389,
0.8087972402572632,
-0.4188651442527771,
0.13356752693653107,
-0.2774912416934967,
0.493667334318161,
-0.6044354438781738,
-0.5230071544647217,
1.1494252681732178,
-0.14167647063732147,
-0.010387283749878407,
-0.7668496966362,
0.7177965641021729,
... |
func (user *User) Validate() (map[string]interface{}, bool) {
if !strings.Contains(user.Email, "@") {
return utils.Message(false, "Email address is required"), false
}
if len(user.Password) < 6 {
return utils.Message(false, "Password is required"), false
}
//Email must be unique
temp := &User{}
//check f... | [
-0.46379387378692627,
0.2021786868572235,
1.020734429359436,
-0.22229376435279846,
-0.26486775279045105,
0.07295680046081543,
0.2756226360797882,
-0.2524901032447815,
-0.4595608711242676,
0.45279809832572937,
-0.4045548141002655,
-0.31310543417930603,
-0.025330862030386925,
0.4782672226428... |
func (user *User) Create() map[string]interface{} {
fmt.Println(user, "the user object")
if resp, ok := user.Validate(); !ok {
return resp
}
hashedPassword, _ := bcrypt.GenerateFromPassword([]byte(user.Password), bcrypt.DefaultCost)
user.Password = string(hashedPassword)
GetDB().Create(user)
if user.ID <= ... | [
-0.47416451573371887,
-0.0010114472825080156,
0.9133414626121521,
0.3150399327278137,
0.2942731976509094,
-0.22330637276172638,
-0.25563281774520874,
-0.2707306742668152,
-0.18336820602416992,
0.24458566308021545,
-1.3389307260513306,
-0.9172045588493347,
-0.016951540485024452,
0.456407159... |
func GetUser(u uint) *User {
user := &User{}
GetDB().Table("users").Where("id = ?", u).First(user)
if user.Email == "" { //User not found!
return nil
}
user.Password = ""
return user
} | [
-0.09505084902048111,
0.5157864689826965,
0.4941853880882263,
0.5514006614685059,
0.50455641746521,
-0.2575971484184265,
0.503429651260376,
-0.2737552225589752,
0.7323017716407776,
-0.48255860805511475,
-0.3562038242816925,
0.043549854308366776,
-0.4486100673675537,
0.040804941207170486,
... |
func GenerateUserClaims(user uint, email string) *Token {
//Create new JWT token for the newly registered user/returnin users
expirationTime := time.Now().Add(24 * time.Hour)
claims := &Token{
user,
email,
jwt.StandardClaims{
Audience: "devs",
IssuedAt: time.Now().Unix(),
ExpiresAt: expirationTime.U... | [
-0.01696453057229519,
0.21269500255584717,
0.5644388794898987,
0.06737503409385681,
-0.6424367427825928,
0.7069666385650635,
-0.851539671421051,
0.20661722123622894,
-0.10047705471515656,
-0.21948392689228058,
-1.322379231452942,
0.6147935390472412,
0.030627649277448654,
-0.610430836677551... |
func GetLinks() []string {
var urls []string
//Fetch the -urls flag from console
cmdUrlsString := flag.String("urls", "", "a string")
flag.Parse()
//Split comma separated string of urls into slice of urls.
cmdUrls := strings.Split(*cmdUrlsString, ",")
//Merge the urls from config with the urls from command fl... | [
-0.19221672415733337,
0.389839231967926,
0.38125699758529663,
0.01489931158721447,
1.2562336921691895,
-0.287578821182251,
-0.4154130518436432,
0.25772473216056824,
0.3545391261577606,
-0.5111575126647949,
0.22919340431690216,
0.842676043510437,
-0.3891511857509613,
0.6199981570243835,
0... |
func (m *GenreRepoMysqlImpl) GetAllGenre() (*[]model.Genre, error) {
query := "SELECT id, name FROM genre"
rows, err := m.db.Query(query)
if err != nil {
if errors.Is(err, sql.ErrNoRows) {
return nil, nil
}
return nil, fmt.Errorf("[GenreRepoMysqlImpl.GetAllGenre] Error when query get all genre: %w", err)
... | [
-0.6456882953643799,
-0.33029356598854065,
0.6659762263298035,
1.1619815826416016,
0.30679795145988464,
-0.9351217746734619,
-1.026549220085144,
0.3832123875617981,
-0.32208380103111267,
0.0897478312253952,
-0.23681634664535522,
0.43676769733428955,
-1.0032074451446533,
1.0578153133392334,... |
func UpdateIdentificationClientRetiro(clientIDCard, newIdentification string) map[string]interface{} {
temp := &[]Retiro{}
err := GetDB().Table("retiros").Where("clientidentificationcard = ?", clientIDCard).Update("clientidentificationcard", newIdentification).Error
if err == gorm.ErrRecordNotFound {
return nil
... | [
-0.23272009193897247,
-1.572684645652771,
0.48794329166412354,
0.2285434603691101,
-0.1982177197933197,
-0.15111953020095825,
0.3207840025424957,
0.6791998744010925,
-0.09250924736261368,
1.3098235130310059,
-1.2853041887283325,
-0.21147015690803528,
-1.0791789293289185,
-0.27579265832901,... |
func InitSettings() {
// DEBUG mode
viper.SetDefault("DEBUG", false)
// Port
viper.SetDefault("PORT", "8000")
// AWS Section
viper.SetDefault("AWS_ACCESS_KEY_ID", "the truth lies beneath")
viper.SetDefault("AWS_SECRET_KEY", "shh.......")
// DB Section
viper.SetDefault("MONGODB_URL", "localhost/test")
// C... | [
-0.42001935839653015,
0.5968232750892639,
0.36521413922309875,
0.504120945930481,
1.046091914176941,
-0.06395117938518524,
-0.4072588086128235,
-0.6655941605567932,
-0.8567617535591125,
0.715842604637146,
-1.1722198724746704,
0.018772484734654427,
-0.8290449380874634,
0.8760958313941956,
... |
func (h *Healthcheck) Report(report Report) (error) {
if (h.config.ReportURL == "" || h.config.Token == "") {
return fmt.Errorf("missing config for ReportAPI")
}
b, _ := json.Marshal(report)
req, _ := http.NewRequest("POST", h.config.ReportURL, bytes.NewBuffer(b))
req.Header.Set("Authorizat... | [
-0.4056585431098938,
1.0054019689559937,
0.7842162847518921,
0.6829209923744202,
0.6109300255775452,
0.17913652956485748,
0.15051992237567902,
-0.5811387300491333,
-0.2546550929546356,
-0.0827203020453453,
-0.3166183531284332,
0.022572524845600128,
-0.9936726689338684,
0.27447590231895447,... |
func (pos *Position) IsValid() bool { return pos.Line > 0 } | [
0.5551814436912537,
-1.3498382568359375,
0.5105262994766235,
0.29854723811149597,
0.253631591796875,
0.529224693775177,
-1.3327627182006836,
0.49900123476982117,
0.29888856410980225,
-0.8057577610015869,
0.26016366481781006,
-0.5146162509918213,
0.12212543189525604,
0.2801206111907959,
-... |
func (pos Position) String() string {
s := pos.Filename
if pos.IsValid() {
if s != "" {
s += ":"
}
s += fmt.Sprintf("%d:%d", pos.Line, pos.Column)
}
if s == "" {
s = "-"
}
return s
} | [
0.5281165838241577,
-1.3422106504440308,
0.3511253297328949,
-0.5422581434249878,
-0.485662043094635,
0.6560770869255066,
-0.30790063738822937,
-0.31000956892967224,
-0.6376236081123352,
0.17147023975849152,
0.2054644078016281,
-0.34352314472198486,
0.5936237573623657,
-0.356875479221344,
... |
func (p Pos) File() *File {
if p.index() == 0 {
return nil
}
return p.file
} | [
-0.605556070804596,
-0.3813152313232422,
0.26816174387931824,
0.43038660287857056,
0.2598137855529785,
0.2134288251399994,
0.09050773084163666,
-0.15494094789028168,
-0.24789686501026154,
-0.8316547870635986,
0.43867844343185425,
-0.5677134990692139,
-0.15021687746047974,
0.080325104296207... |
func (p Pos) HasRelPos() bool {
return p.offset&relMask != 0
} | [
0.7663198709487915,
-0.3213336169719696,
0.7750093936920166,
-0.5106186866760254,
-0.1114339530467987,
-0.009696166962385178,
-0.155332550406456,
0.7565085887908936,
0.08766857534646988,
-0.5979936122894287,
-1.363529086112976,
-0.8298343420028687,
-0.5607485175132751,
-0.03795578330755234... |
func (p Pos) Offset() int {
return p.Position().Offset
} | [
-0.26022571325302124,
0.0515788309276104,
0.1985490918159485,
-0.028301699087023735,
-0.8975641131401062,
1.2739360332489014,
0.06146067753434181,
1.3606998920440674,
0.3053703308105469,
-0.3117028772830963,
-0.7342175245285034,
-0.20168286561965942,
-0.025572868064045906,
-0.0846845582127... |
func (p Pos) Add(n int) Pos {
return Pos{p.file, p.offset + toPos(index(n))}
} | [
-1.1444294452667236,
-0.40394327044487,
0.44397515058517456,
-0.8989228010177612,
-0.07378609478473663,
0.8033888936042786,
-0.610336422920227,
0.03839349374175072,
0.5560013055801392,
-0.5528582334518433,
-0.27231717109680176,
-0.8044025897979736,
-0.053752604871988297,
-0.154302284121513... |
func (p Pos) IsValid() bool {
return p != NoPos
} | [
0.00038664237945340574,
-0.6811620593070984,
0.38950440287590027,
0.1418534219264984,
0.2338290512561798,
0.9435896277427673,
-0.9086239337921143,
0.666964590549469,
0.5546637773513794,
-0.5972597002983093,
-0.4037938714027405,
-0.48536211252212524,
-0.5983118414878845,
-0.3844009041786194... |
func (p Pos) IsNewline() bool {
return p.RelPos() >= Newline
} | [
0.34357455372810364,
-1.031363844871521,
0.3369247019290924,
0.5914953947067261,
-0.4175776243209839,
-0.25778627395629883,
-1.4766614437103271,
-0.9169856905937195,
-0.4713049829006195,
0.20768339931964874,
-0.8583781719207764,
-0.21004559099674225,
0.04943375661969185,
0.5368356108665466... |
func NewFile(filename string, base, size int) *File {
if base < 0 {
base = 1
}
return &File{sync.RWMutex{}, filename, index(base), index(size), []index{0}, nil}
} | [
0.260945200920105,
0.1664179563522339,
0.22759979963302612,
0.8226051330566406,
-0.23453474044799805,
0.020486488938331604,
0.0049827732145786285,
-0.18406513333320618,
-0.37168067693710327,
-0.6296008229255676,
0.045345596969127655,
-0.1631380021572113,
-0.8892402648925781,
0.045121796429... |
func (f *File) Name() string {
return f.name
} | [
-0.17349159717559814,
-0.8273684978485107,
0.312704861164093,
0.22365599870681763,
-0.5419759750366211,
0.3267739713191986,
0.33482906222343445,
0.26600557565689087,
-1.6591136455535889,
0.030366376042366028,
0.07799320667982101,
-0.5011643767356873,
0.5748153328895569,
0.11328449100255966... |
func (f *File) Base() int {
return int(f.base)
} | [
-0.36958953738212585,
-0.8046507239341736,
0.4717293679714203,
0.6664847135543823,
0.3650614321231842,
0.15283606946468353,
0.7508609294891357,
0.22837772965431213,
-1.7580097913742065,
-0.5864983797073364,
-0.06465041637420654,
-0.3801303207874298,
-0.35053086280822754,
0.6986576318740845... |
func (f *File) Size() int {
return int(f.size)
} | [
-0.2722757160663605,
0.6841841340065002,
0.19918234646320343,
-0.3668532073497772,
0.04750160872936249,
0.1269250214099884,
1.0749918222427368,
0.45524150133132935,
-1.0679891109466553,
-0.8577997088432312,
0.27776479721069336,
-0.2881982624530792,
-0.1543334275484085,
0.31079885363578796,... |
func (f *File) LineCount() int {
f.mutex.RLock()
n := len(f.lines)
f.mutex.RUnlock()
return n
} | [
0.8258249163627625,
-0.7378793358802795,
0.2843937873840332,
-0.48583778738975525,
0.5832098722457886,
0.09021779894828796,
0.316895067691803,
0.8256922960281372,
-1.0846834182739258,
-1.0272796154022217,
0.43797844648361206,
-0.18259252607822418,
-0.1613341122865677,
0.5974408388137817,
... |
func (f *File) AddLine(offset int) {
x := index(offset)
f.mutex.Lock()
if i := len(f.lines); (i == 0 || f.lines[i-1] < x) && x < f.size {
f.lines = append(f.lines, x)
}
f.mutex.Unlock()
} | [
-0.22797423601150513,
0.3409656286239624,
0.851155161857605,
-0.10471465438604355,
-0.009358325973153114,
0.7873558402061462,
-0.9696774482727051,
-0.04849749058485031,
-0.5503364205360413,
-1.2900021076202393,
0.11607874929904938,
-0.37122127413749695,
-0.5606853365898132,
-0.078382708132... |
func (f *File) MergeLine(line int) {
if line <= 0 {
panic("illegal line number (line numbering starts at 1)")
}
f.mutex.Lock()
defer f.mutex.Unlock()
if line >= len(f.lines) {
panic("illegal line number")
}
// To merge the line numbered <line> with the line numbered <line+1>,
// we need to remove the entry ... | [
-0.286590039730072,
0.28094592690467834,
0.5201848745346069,
0.15280583500862122,
0.46074506640434265,
0.3057199716567993,
-0.10661397129297256,
0.2635688781738281,
0.1740913987159729,
-0.825528621673584,
-0.36208999156951904,
-0.45683619379997253,
-0.135930135846138,
0.19083371758460999,
... |
func (f *File) SetLinesForContent(content []byte) {
var lines []index
line := index(0)
for offset, b := range content {
if line >= 0 {
lines = append(lines, line)
}
line = -1
if b == '\n' {
line = index(offset) + 1
}
}
// set lines table
f.mutex.Lock()
f.lines = lines
f.mutex.Unlock()
} | [
0.2838934361934662,
-0.654206395149231,
0.1667339950799942,
-0.5570077300071716,
0.3467174768447876,
-0.0842769667506218,
-0.3119101822376251,
0.013282284140586853,
-1.3971346616744995,
-0.4812279939651489,
0.23227843642234802,
-0.48408108949661255,
-0.502564549446106,
0.7942571640014648,
... |
func (f *File) AddLineInfo(offset int, filename string, line int) {
x := index(offset)
f.mutex.Lock()
if i := len(f.infos); i == 0 || index(f.infos[i-1].Offset) < x && x < f.size {
f.infos = append(f.infos, lineInfo{offset, filename, line})
}
f.mutex.Unlock()
} | [
0.10018163919448853,
-0.607349693775177,
0.5203104615211487,
-0.7663478255271912,
0.42897674441337585,
0.8683035373687744,
-0.909417986869812,
-0.14526569843292236,
-1.039994478225708,
-1.3770383596420288,
-0.31111449003219604,
-0.2442684918642044,
0.12859749794006348,
0.18386435508728027,... |
func (f *File) Pos(offset int, rel RelPos) Pos {
if index(offset) > f.size {
panic("illegal file offset")
}
return Pos{f, toPos(f.base+index(offset)) + int(rel)}
} | [
0.5931530594825745,
-0.5069740414619446,
0.3822026252746582,
-0.6398515701293945,
-0.8524001240730286,
0.6301019787788391,
0.009312006644904613,
0.28736791014671326,
-0.8620957136154175,
-0.6645714640617371,
0.35724911093711853,
-0.3793952167034149,
0.03535445034503937,
-1.5412726402282715... |
func (f *File) Offset(p Pos) int {
x := p.index()
if x < f.base || x > f.base+index(f.size) {
panic("illegal Pos value")
}
return int(x - f.base)
} | [
-0.08123204112052917,
0.15978285670280457,
0.5099957585334778,
-0.0999956727027893,
-1.1445581912994385,
1.2231199741363525,
0.17539319396018982,
0.9332234263420105,
-0.7648215889930725,
-0.2658182382583618,
-0.03393389284610748,
-0.16768506169319153,
-0.2804659307003021,
-0.54980719089508... |
func (f *File) Line(p Pos) int {
return f.Position(p).Line
} | [
-0.6905753016471863,
-0.5137669444084167,
0.15504573285579681,
0.16268695890903473,
0.3743014335632324,
0.05123387277126312,
-0.4487965404987335,
0.29732775688171387,
-1.102797269821167,
-0.9630833268165588,
-0.30858802795410156,
-1.1978809833526611,
-0.04551281780004501,
-0.20504778623580... |
func (f *File) unpack(offset index, adjusted bool) (filename string, line, column int) {
filename = f.name
if i := searchInts(f.lines, offset); i >= 0 {
line, column = int(i+1), int(offset-f.lines[i]+1)
}
if adjusted && len(f.infos) > 0 {
// almost no files have extra line infos
if i := searchLineInfos(f.info... | [
0.0581664964556694,
-0.45932239294052124,
0.9586071968078613,
-1.0792936086654663,
-0.7833462357521057,
-0.4290148913860321,
0.17716029286384583,
0.7248769402503967,
-0.9773336052894592,
-0.691326379776001,
0.4164101481437683,
-0.5526442527770996,
1.2979340553283691,
-0.3498409688472748,
... |
func (f *File) PositionFor(p Pos, adjusted bool) (pos Position) {
x := p.index()
if p != NoPos {
if x < f.base || x > f.base+f.size {
panic("illegal Pos value")
}
pos = f.position(p, adjusted)
}
return
} | [
-0.039333511143922806,
-0.14413800835609436,
0.4146871566772461,
-0.8813245296478271,
-0.17336340248584747,
0.23868820071220398,
-0.20115600526332855,
0.31782791018486023,
-1.2049760818481445,
-0.8445813655853271,
0.6502501964569092,
-1.2319374084472656,
-0.18152740597724915,
-0.6690771579... |
func (f *File) Position(p Pos) (pos Position) {
return f.PositionFor(p, true)
} | [
-0.27495312690734863,
-0.3786570429801941,
0.2488948255777359,
-0.21184688806533813,
0.4369359016418457,
0.082857646048069,
-0.059607598930597305,
0.6651126146316528,
-0.4679715633392334,
-0.607668936252594,
0.3062981367111206,
-1.9100637435913086,
0.15461401641368866,
-0.5721126198768616,... |
func TestIsEmpty(t *testing.T) {
stack := NewStack()
isEmpty := stack.IsEmpty()
if !isEmpty {
t.Fatalf("expected: %t; got: %t", true, isEmpty)
}
} | [
0.27595674991607666,
1.1422713994979858,
0.29043343663215637,
0.8644787073135376,
1.9163579940795898,
-0.025586603209376335,
0.284383088350296,
-0.3031829297542572,
-0.127864271402359,
0.559893786907196,
-0.8838732242584229,
0.47032731771469116,
0.011129569262266159,
-0.15375402569770813,
... |
func TestPushOne(t *testing.T) {
stack := NewStack()
stack.Push("foobar")
isEmpty := stack.IsEmpty()
if isEmpty {
t.Fatalf("expected: %t; got: %t", false, isEmpty)
}
} | [
0.5165979266166687,
1.4270009994506836,
0.4916987121105194,
0.5735490918159485,
0.9833158254623413,
0.8887487649917603,
-0.5100254416465759,
-0.4643999934196472,
0.26858943700790405,
0.24750745296478271,
-0.5903005003929138,
-0.3184025287628174,
-0.34718838334083557,
0.12366543710231781,
... |
func TestPush(t *testing.T) {
stack := NewStack()
stack.Push("foobar")
stack.Pop()
isEmpty := stack.IsEmpty()
if !isEmpty {
t.Fatalf("expected: %t; got: %t", true, isEmpty)
}
} | [
0.6735793352127075,
1.068557620048523,
0.23421919345855713,
0.4652000665664673,
1.1612635850906372,
0.5385041236877441,
-0.41138792037963867,
0.11377906054258347,
-0.012273569591343403,
0.2602953314781189,
-0.32137393951416016,
0.23544669151306152,
-0.20158790051937103,
0.18870997428894043... |
func TestPushPopContentCheck(t *testing.T) {
stack := NewStack()
ourItem := "foobar"
stack.Push(ourItem)
item := stack.Pop()
if ourItem != item {
t.Fatalf("expected: %s; got: %s", ourItem, item)
}
} | [
0.03528818115592003,
0.544617235660553,
0.3515022099018097,
0.6554743647575378,
0.09606508165597916,
0.4986323416233063,
-0.23316247761249542,
-0.4782969355583191,
0.020138317719101906,
0.6105121374130249,
-0.15765856206417084,
-0.8064538836479187,
-0.4158323109149933,
-0.6518198847770691,... |
func TestPushPopMultipleElements(t *testing.T) {
tc := []string{"foo", "bar", "foobar"}
stack := NewStack()
for _, item := range tc {
stack.Push(item)
}
i := len(tc) - 1
for {
item := stack.Pop()
if item == nil {
break
}
if item != tc[i] {
t.Fatalf("expected: %s; got: %s", tc[i], item)
}
i--
... | [
-0.4589688181877136,
0.7047016620635986,
0.6048667430877686,
0.5052528977394104,
0.3015178442001343,
0.18539738655090332,
-0.5392643809318542,
-0.15042215585708618,
0.4150314927101135,
1.2905324697494507,
-0.6787199378013611,
-0.8874580264091492,
0.10832769423723221,
0.008642488159239292,
... |
func TestPopEmptyStack(t *testing.T) {
stack := NewStack()
item := stack.Pop()
if item != nil {
t.Fatalf("expected: %v; got: %v", nil, item)
}
} | [
0.171158567070961,
0.6831668019294739,
0.32841071486473083,
0.5336304306983948,
0.9289864897727966,
-0.49734845757484436,
-0.005182054825127125,
0.4156329333782196,
0.10200483351945877,
0.20875465869903564,
-0.5598355531692505,
-0.5388522744178772,
0.2836900055408478,
0.050689373165369034,... |
func TestPushTop(t *testing.T) {
stack := NewStack()
stack.Push("foobar")
isEmpty := stack.IsEmpty()
if isEmpty {
t.Fatalf("expected: %t; got: %t", false, isEmpty)
}
} | [
-0.17039114236831665,
1.3001649379730225,
0.4248652756214142,
0.4932163655757904,
0.8282858729362488,
0.5109456181526184,
-0.6791539192199707,
-0.13308872282505035,
-0.11518929153680801,
0.7802284955978394,
-0.28053510189056396,
-0.39862900972366333,
0.11163330078125,
-0.27456289529800415,... |
func TestPushTopContentCheckOneElement(t *testing.T) {
ourItem := "foobar"
stack := NewStack()
stack.Push(ourItem)
item := stack.Pop()
if item != ourItem {
t.Fatalf("expected: %s; got: %s", ourItem, item)
}
} | [
-0.09330909699201584,
0.624377429485321,
0.29639947414398193,
1.0773569345474243,
0.6353486776351929,
0.4087855815887451,
0.1906357854604721,
-0.631725549697876,
0.01642070710659027,
0.5987037420272827,
-0.4751253128051758,
-0.4450537860393524,
-0.5767062306404114,
-0.31002068519592285,
... |
func TestPushContentCheckMultiples(t *testing.T) {
ourItem := "foobar"
stack := NewStack()
stack.Push("foo")
stack.Push("bar")
stack.Push(ourItem)
item := stack.Pop()
if item != ourItem {
t.Fatalf("expected: %s; got: %s", ourItem, item)
}
} | [
0.2620864510536194,
0.5898832082748413,
0.3542104959487915,
0.6446725726127625,
0.5156854391098022,
0.15590660274028778,
-0.4765256941318512,
-0.41232115030288696,
-0.18404918909072876,
0.7570697069168091,
-0.7668004035949707,
-0.700339674949646,
-0.4606128931045532,
0.08382094651460648,
... |
func TestPushTopNoStackStateChange(t *testing.T) {
ourItem := map[string]string{
"foo": "bar",
}
stack := NewStack()
stack.Push(ourItem)
for i := 0; i < 10; i++ {
item := stack.Top()
if !reflect.DeepEqual(item, ourItem) {
t.Fatalf("expected: %v; got: %v", ourItem, item)
}
}
} | [
-0.5880236029624939,
0.9522879719734192,
0.48367831110954285,
-0.019312817603349686,
0.7209945321083069,
0.0914451852440834,
-0.12208323925733566,
-0.39690548181533813,
-0.3861781656742096,
-0.06978844851255417,
-0.7701265215873718,
-0.24715201556682587,
0.08817292004823685,
0.173436850309... |
func TestTopEmptyStack(t *testing.T) {
stack := NewStack()
item := stack.Top()
if item != nil {
t.Fatalf("expected: %v; got: %v", nil, item)
}
} | [
-0.37449172139167786,
0.6155233383178711,
0.4000413119792938,
0.3748430013656616,
0.788297176361084,
-0.42768096923828125,
0.12121559679508209,
-0.03275994956493378,
0.25004830956459045,
0.0006024620379321277,
-0.5316881537437439,
-0.07872994989156723,
0.5086782574653625,
0.004020725376904... |
func TestPushNull(t *testing.T) {
stack := NewStack()
stack.Push(nil)
isEmpty := stack.IsEmpty()
if isEmpty {
t.Fatalf("expected: %t; got: %t", false, isEmpty)
}
} | [
0.7446728348731995,
0.940109372138977,
0.2551792860031128,
0.5329647064208984,
1.0076099634170532,
-0.035288576036691666,
-0.6949760317802429,
-0.04538493603467941,
0.40349090099334717,
0.5554705858230591,
-0.5330436825752258,
0.6779859662055969,
0.06892336905002594,
0.29089435935020447,
... |
func TestPushNullCheckPop(t *testing.T) {
stack := NewStack()
stack.Push(nil)
item := stack.Pop()
if item != nil {
t.Fatalf("expected: %v; got: %v", nil, item)
}
} | [
0.7213430404663086,
0.3096707761287689,
0.2679429054260254,
0.9658488631248474,
0.7304741144180298,
-0.07384153455495834,
-0.5547630190849304,
0.2021503746509552,
0.20297007262706757,
1.0002129077911377,
-0.23317207396030426,
-0.32399049401283264,
0.3981841504573822,
-0.11056126654148102,
... |
func TestPushNullCheckTop(t *testing.T) {
stack := NewStack()
stack.Push(nil)
item := stack.Top()
if item != nil {
t.Fatalf("expected: %v; got: %v", nil, item)
}
} | [
0.25737470388412476,
0.31246864795684814,
0.35779184103012085,
0.7504366040229797,
0.5322226285934448,
-0.17152324318885803,
-0.854383647441864,
-0.11968223005533218,
0.3956621289253235,
1.0712352991104126,
-0.13088399171829224,
0.01464412547647953,
0.2954016625881195,
-0.12195870280265808... |
func main() {
reader := bufio.NewReader(os.Stdin)
fmt.Print("Please enter your API Key: ")
prodEnv := true
key, _ := reader.ReadString('\n')
key = strings.TrimSpace(key)
for {
fmt.Println("What is your environment, please enter P for production or S for sandbox: ")
env, _ := reader.ReadString('\n')
env = s... | [
-0.1766929179430008,
-0.19066525995731354,
1.3974616527557373,
0.4550992250442505,
0.10377590358257294,
0.08157805353403091,
-0.30287766456604004,
0.17086903750896454,
-1.1690516471862793,
0.39010778069496155,
0.5529629588127136,
0.6271288990974426,
-0.52036452293396,
-0.152507483959198,
... |
func NewPostgresRepository(conn *gorm.DB) *PostgresRepository {
return &PostgresRepository{
conn: conn,
}
} | [
-0.5816705226898193,
-0.007218318060040474,
-0.23489148914813995,
-0.37644603848457336,
-1.2599225044250488,
-1.2841949462890625,
-0.8604603409767151,
0.5063414573669434,
-1.030587077140808,
-0.270255982875824,
-0.7194089293479919,
-0.2301063984632492,
-0.7344126105308533,
0.77087527513504... |
func RetrieveFeeds() ([]*Feed, error) {
// Open the file.
file, err := os.Open(dataFile)
if err != nil {
return nil, err
}
// Schedule the file to be closed once
// the function returns.
defer file.Close()
println("===============json.NewDecoder(file): ",json.NewDecoder(file))
// Decode the file into a sl... | [
0.06625716388225555,
-0.5173266530036926,
0.4956039786338806,
-0.4070936441421509,
0.7303247451782227,
-0.7514533400535583,
-0.05563832074403763,
-0.3013344407081604,
-0.8000010251998901,
-0.8842832446098328,
-0.44568732380867004,
0.7040825486183167,
-1.0509246587753296,
-0.273093551397323... |
func NewTess() (*Tess, error) {
datapath := os.Getenv("TESSDATA_PREFIX")
// create new empty TessBaseAPI
tba := C.TessBaseAPICreate()
// prepare string for C call
cDatapath := C.CString(datapath)
defer C.free(unsafe.Pointer(cDatapath))
// prepare string for C call
cLanguage := C.CString("eng")
defer C.free(u... | [
0.490763396024704,
-0.7797073721885681,
0.5422623753547668,
-0.8028942942619324,
-0.7478588819503784,
0.45585939288139343,
-0.6690839529037476,
-0.733513355255127,
-0.4235292375087738,
-0.5211025476455688,
-0.4159453809261322,
0.5372771620750427,
0.4444245398044586,
0.10777445882558823,
... |
func (t *Tess) Text() string {
cText := C.TessBaseAPIGetUTF8Text(t.tba)
defer C.free(unsafe.Pointer(cText))
text := C.GoString(cText)
return text
} | [
-0.410693883895874,
-0.07635729014873505,
0.2120424509048462,
-0.00739191472530365,
-0.26014626026153564,
0.28106895089149475,
0.2357771396636963,
-1.3320437669754028,
0.5282511711120605,
0.4023822546005249,
-0.1203368678689003,
-0.6566009521484375,
-0.2461889088153839,
-0.8676339983940125... |
func mount(
dir string,
cfg *MountConfig,
ready chan<- error) (dev *os.File, err error) {
// On linux, mounting is never delayed.
ready <- nil
// Create a socket pair.
fds, err := syscall.Socketpair(syscall.AF_FILE, syscall.SOCK_STREAM, 0)
if err != nil {
err = fmt.Errorf("Socketpair: %v", err)
return
}
... | [
0.4604753851890564,
-0.009631156921386719,
0.9982749819755554,
-0.27231189608573914,
-0.5850241780281067,
-0.6832455396652222,
0.19972385466098785,
-0.49506935477256775,
-0.5791942477226257,
-0.3704911172389984,
0.538297176361084,
0.5569361448287964,
0.2882624566555023,
0.48365750908851624... |
func (fi bindataFileInfo) Name() string {
return fi.name
} | [
0.08166918903589249,
-1.4572765827178955,
0.4833078384399414,
0.14237014949321747,
-0.3545391261577606,
0.8819460272789001,
0.010945647954940796,
-0.2467803955078125,
-1.2708252668380737,
-0.10601194947957993,
-0.3917791545391083,
-0.41195377707481384,
0.39125633239746094,
0.16644497215747... |
func (fi bindataFileInfo) Size() int64 {
return fi.size
} | [
0.16575103998184204,
-0.1223422959446907,
0.17271094024181366,
-0.07949239760637283,
0.3543928861618042,
0.7548951506614685,
0.5927076935768127,
0.07495921850204468,
-1.0578577518463135,
-1.1731369495391846,
-0.10568573325872421,
-0.17690835893154144,
-0.33118754625320435,
0.30395281314849... |
func (fi bindataFileInfo) Mode() os.FileMode {
return fi.mode
} | [
-0.41162919998168945,
-0.9577594995498657,
0.44155263900756836,
-0.13144180178642273,
0.5922524929046631,
1.610377311706543,
0.009310288354754448,
0.2884019613265991,
-1.065315842628479,
-1.1910521984100342,
0.4981614947319031,
-0.2990283668041229,
-0.17645005881786346,
0.4694020748138428,... |
func (fi bindataFileInfo) ModTime() time.Time {
return fi.modTime
} | [
-0.2685695290565491,
-0.8271465301513672,
0.35384321212768555,
-0.4112885892391205,
0.37963899970054626,
0.6579224467277527,
-0.6294410824775696,
0.37015482783317566,
-0.2557626962661743,
0.014167135581374168,
0.4302074909210205,
-0.03708653151988983,
-0.8495825529098511,
0.746182441711425... |
func (fi bindataFileInfo) IsDir() bool {
return fi.mode&os.ModeDir != 0
} | [
0.10024337470531464,
-1.1714235544204712,
0.4835644066333771,
1.0096218585968018,
0.10103324800729752,
1.1084051132202148,
0.2600550055503845,
0.2042960673570633,
-0.43129751086235046,
-1.1601366996765137,
0.3743494749069214,
0.08362120389938354,
-0.2748109698295593,
0.8501272797584534,
... |
func (fi bindataFileInfo) Sys() interface{} {
return nil
} | [
-0.18937675654888153,
-0.91487056016922,
0.4192674458026886,
0.23279045522212982,
0.01389834750443697,
-0.11405561864376068,
0.5312886238098145,
-0.4064529240131378,
-0.1416921764612198,
-1.7679998874664307,
-0.9565558433532715,
0.39589381217956543,
0.34836944937705994,
0.461544007062912,
... |
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 (p *Pipeline) TableName() string {
return "pipeline"
} | [
0.6033846139907837,
-0.0842442438006401,
0.3888123333454132,
0.3678418695926666,
-0.6388910412788391,
0.3893311023712158,
0.1671644002199173,
0.7727969288825989,
-1.3567308187484741,
0.08265528827905655,
0.017220964655280113,
0.47655758261680603,
0.5284387469291687,
-0.035309579223394394,
... |
func (s *Stage) TableName() string {
return "stage"
} | [
0.023068848997354507,
-0.6951233744621277,
0.4628809988498688,
1.4413323402404785,
-1.1457632780075073,
0.3318451941013336,
1.3162310123443604,
0.9520808458328247,
-0.7085874676704407,
0.22663338482379913,
-0.33522829413414,
0.10052736103534698,
0.6716408729553223,
1.089439868927002,
0.0... |
func (a *Action) TableName() string {
return "action"
} | [
0.5605181455612183,
-0.631600558757782,
0.5173712372779846,
1.2961256504058838,
-0.04759625717997551,
0.13273604214191437,
0.6752249598503113,
0.7016716003417969,
-0.03758502006530762,
0.3859693109989166,
0.2058650255203247,
1.009583830833435,
0.5121614933013916,
0.5168064832687378,
-0.2... |
func (o *Outcome) TableName() string {
return "outcome"
} | [
0.04932232201099396,
-0.7180784344673157,
0.5711201429367065,
0.7133294343948364,
-0.9352724552154541,
0.4657917618751526,
1.028853416442871,
0.881759762763977,
-0.20135222375392914,
0.23707304894924164,
-0.33086681365966797,
-0.03466863930225372,
0.6601057052612305,
0.20352502167224884,
... |
func resolveDDLSQL(sql string) (sqls []string, ok bool, err error) {
stmt, err := parser.New().ParseOneStmt(sql, "", "")
if err != nil {
log.Errorf("Parser SQL error: %s", sql)
return nil, false, errors.Trace(err)
}
_, isDDL := stmt.(ast.DDLNode)
if !isDDL {
sqls = append(sqls, sql)
return
}
switch v :... | [
-0.6288256645202637,
0.31437426805496216,
1.2739917039871216,
0.05039643123745918,
-0.29545480012893677,
-0.5826607942581177,
-0.5841981768608093,
0.05031958594918251,
0.4253309369087219,
0.7805283069610596,
-0.5221973657608032,
-0.42112043499946594,
0.3065740168094635,
0.8502746820449829,... |
func MainHelpTemplate() string {
return `{{with or .Long .Short }}{{. | trim}}{{end}}{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
} | [
0.39896366000175476,
-0.6188569664955139,
0.7944365739822388,
-0.30992409586906433,
-0.9798157811164856,
0.4172559380531311,
-0.31283050775527954,
-0.3369593322277069,
-0.44579017162323,
0.11570362746715546,
0.40477365255355835,
-0.9555068612098694,
0.21643640100955963,
0.07053392380475998... |
func MainUsageTemplate() string {
sections := []string{
"\n\n",
SectionVars,
SectionAliases,
SectionExamples,
SectionSubcommands,
SectionFlags,
SectionUsage,
SectionTipsHelp,
SectionTipsGlobalOptions,
}
return strings.TrimRightFunc(strings.Join(sections, ""), unicode.IsSpace)
} | [
-0.15694119036197662,
-0.5940792560577393,
0.5860622525215149,
-0.5644930601119995,
-0.559750497341156,
-0.17136433720588684,
-0.08851294964551926,
0.19172878563404083,
0.0971096009016037,
0.20838451385498047,
0.7388682961463928,
-0.784084141254425,
0.046589646488428116,
0.6747995018959045... |
func OptionsHelpTemplate() string {
return ""
} | [
0.26107919216156006,
-0.1458594650030136,
0.3287883400917053,
-0.6259703636169434,
0.6499738693237305,
0.34738296270370483,
0.1712423712015152,
-0.19687949120998383,
0.4310891032218933,
-0.10201801359653473,
-0.18976914882659912,
-1.3018001317977905,
-0.500583827495575,
0.2411888837814331,... |
func OptionsUsageTemplate() string {
return `{{ if .HasInheritedFlags}}The following options can be passed to any command:
{{flagsUsages .InheritedFlags}}{{end}}`
} | [
-0.1556820422410965,
0.19028575718402863,
0.410968542098999,
-0.9568792581558228,
1.1854690313339233,
-0.04649045690894127,
0.28478193283081055,
-0.3044812083244324,
-0.16737252473831177,
0.17729561030864716,
-0.17002800107002258,
-0.4610365331172943,
-0.24340619146823883,
0.81584674119949... |
func NewProxyHandler(opt *options.ArgocdServerOptions) *proxyHandler {
cls := make(map[string]*cluster)
for _, e := range opt.Environments {
for _, c := range e.Clusters {
cls[c.ClusterID] = &cluster{
clusterID: c.ClusterID,
project: c.Project,
apiServer: e.APIServer,
token: e.Token,
}
... | [
-0.3356223702430725,
-0.07087552547454834,
0.39537471532821655,
-0.27227362990379333,
0.041121892631053925,
0.5449560880661011,
0.14837591350078583,
0.03975977376103401,
-0.43742719292640686,
0.11645402014255524,
0.3642211854457855,
0.2015562504529953,
-0.8659590482711792,
0.33132138848304... |
func Reset(svc ec2iface.EC2API, writer io.Writer, name string, dryRun bool) error {
// query the ec2 api, filtering by name tag
output, err := svc.DescribeInstances(&ec2.DescribeInstancesInput{
Filters: []*ec2.Filter{
{
Name: aws.String("tag:Name"),
Values: []*string{
aws.String(strings.Join([]strin... | [
-1.2943503856658936,
0.3711717128753662,
0.6118909120559692,
-0.7343903183937073,
-0.20157870650291443,
-0.7871218919754028,
0.24575938284397125,
-0.26759958267211914,
-0.37125852704048157,
0.6644164323806763,
-0.24355435371398926,
0.4489688575267792,
-0.43644919991493225,
-0.3026050031185... |
func (v *Virt) ImageRemove(ctx context.Context, image string, force, prune bool) (names []string, err error) {
log.Warnf(ctx, "does not implement")
return
} | [
-1.7474195957183838,
0.14930379390716553,
0.5137227177619934,
0.7536680102348328,
0.036365922540426254,
-0.1582702249288559,
-0.7129493951797485,
0.4317530691623688,
0.7169662117958069,
1.4773850440979004,
-0.41889479756355286,
0.34698888659477234,
-1.3108538389205933,
0.02656339854001999,... |
func (v *Virt) ImagePull(ctx context.Context, ref string, all bool) (rc io.ReadCloser, err error) {
return
} | [
-1.2246712446212769,
-0.18887163698673248,
0.46605560183525085,
-0.049443475902080536,
-0.27656954526901245,
0.1824716478586197,
-0.17906048893928528,
-0.08012251555919647,
0.2737389802932739,
0.6624491214752197,
0.5595435500144958,
0.4037865698337555,
-0.7763104438781738,
0.24100181460380... |
func (v *Virt) ImagePush(ctx context.Context, ref string) (rc io.ReadCloser, err error) {
log.Warnf(ctx, "does not implement")
return
} | [
-0.7860256433486938,
-0.399678498506546,
0.5711197853088379,
-0.1984725296497345,
-0.42525386810302734,
0.4874149262905121,
-0.1480782926082611,
-0.7602847218513489,
0.5413575172424316,
0.9603926539421082,
0.4289378523826599,
1.2231905460357666,
-0.49336737394332886,
0.16681186854839325,
... |
func (v *Virt) ImageBuild(ctx context.Context, input io.Reader, refs []string) (rc io.ReadCloser, err error) {
log.Warnf(ctx, "does not implement")
return
} | [
-0.902844250202179,
-1.6367902755737305,
0.5314435958862305,
0.3355976343154907,
-0.035677626729011536,
0.6131316423416138,
0.03444313630461693,
-0.41364654898643494,
0.6484434604644775,
0.03753513842821121,
0.9254451394081116,
0.5617532730102539,
-1.2696378231048584,
0.18338890373706818,
... |
func (v *Virt) ImageBuildFromExist(ctx context.Context, ID string, names []string, user string) (string, error) {
if len(user) < 1 {
return "", types.ErrNoImageUser
}
if len(names) > 1 {
return "", types.ErrBadRefs
}
name := names[0]
// TODO: removes below 2 lines
// upper layer may remove 'hub.docker.io/..... | [
-0.26914846897125244,
-0.7259308695793152,
0.6787408590316772,
1.1229039430618286,
-0.10806267708539963,
0.14620578289031982,
0.4527202844619751,
0.2459770143032074,
0.017327936366200447,
0.917370617389679,
-0.5337556004524231,
0.3372345566749573,
-0.4248499274253845,
0.35055670142173767,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.