Search Options

Results per page
Sort
Preferred Languages
Advance

Results 381 - 390 of 540 for fprintf (0.2 sec)

  1. docs_src/dependencies/tutorial008d.py

    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("We don't swallow the internal error here, we raise again 😎")
            raise
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 694 bytes
    - Viewed (0)
  2. ci/official/containers/linux_arm64/devel.bashrc

    # See the License for the specific language governing permissions and
    # limitations under the License.
    #
    # ==============================================================================
    
    # Do not print anything if this is not being used interactively
    [ -z "$PS1" ] && return
    
    # Set up attractive prompt
    export PS1="\[\e[31m\]tf-docker\[\e[m\] \[\e[33m\]\w\[\e[m\] > "
    export TERM=xterm-256color
    Registered: Tue Oct 29 12:39:09 UTC 2024
    - Last Modified: Mon Sep 18 14:52:45 UTC 2023
    - 988 bytes
    - Viewed (0)
  3. ci/official/containers/linux_arm64/devel.usertools/get_test_list.sh

    # Hides all extra output and always exits with success for now.
    
    OUTPUT=$1
    shift
    Registered: Tue Oct 29 12:39:09 UTC 2024
    - Last Modified: Mon Sep 18 14:52:45 UTC 2023
    - 1K bytes
    - Viewed (0)
  4. docs_src/dependencies/tutorial008d_an.py

    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("We don't swallow the internal error here, we raise again 😎")
            raise
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 744 bytes
    - Viewed (0)
  5. clause/where_test.go

    					}),
    				}}},
    			"SELECT * FROM `users` WHERE NOT ((`users`.`id` = ? AND `age` > ?) OR `score` < ?)",
    			[]interface{}{"1", 18, 100},
    		},
    	}
    
    	for idx, result := range results {
    		t.Run(fmt.Sprintf("case #%v", idx), func(t *testing.T) {
    			checkBuildClauses(t, result.Clauses, result.Result, result.Vars)
    		})
    	}
    Registered: Sun Oct 27 09:35:08 UTC 2024
    - Last Modified: Thu Apr 25 12:22:53 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  6. cmd/data-scanner_test.go

    			ilm:       *delMarkerLc,
    			retention: lock.Retention{},
    			obj:       delMarker,
    			want:      lifecycle.DelMarkerDeleteAllVersionsAction,
    		},
    	}
    
    	for i, test := range tests {
    		t.Run(fmt.Sprintf("TestEvalAction-%d", i), func(t *testing.T) {
    			if got := evalActionFromLifecycle(context.TODO(), test.ilm, test.retention, nil, test.obj); got.Action != test.want {
    				t.Fatalf("Expected %v but got %v", test.want, got)
    			}
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Fri May 03 11:18:58 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  7. internal/etag/reader.go

    // computed ETag does not match an expected
    // ETag.
    type VerifyError struct {
    	Expected ETag
    	Computed ETag
    }
    
    func (v VerifyError) Error() string {
    	return fmt.Sprintf("etag: expected ETag %q does not match computed ETag %q", v.Expected, v.Computed)
    }
    
    // UUIDHash - use uuid to make md5sum
    type UUIDHash struct {
    	uuid []byte
    }
    
    // Write -  implement hash.Hash Write
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  8. utils/utils.go

    			results[idx] = string(v)
    		case uint:
    			results[idx] = strconv.FormatUint(uint64(v), 10)
    		default:
    			results[idx] = "nil"
    			vv := reflect.ValueOf(v)
    			if vv.IsValid() && !vv.IsZero() {
    				results[idx] = fmt.Sprint(reflect.Indirect(vv).Interface())
    			}
    		}
    	}
    
    	return strings.Join(results, "_")
    }
    
    func Contains(elems []string, elem string) bool {
    	for _, e := range elems {
    		if elem == e {
    			return true
    		}
    Registered: Sun Oct 27 09:35:08 UTC 2024
    - Last Modified: Thu Aug 22 11:03:42 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  9. cmd/admin-handlers-idp-config.go

    		return
    	}
    
    	cfg, err := readServerConfig(ctx, objectAPI, nil)
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	cfgKey := fmt.Sprintf("%s:%s", subSys, cfgName)
    	if cfgName == madmin.Default {
    		cfgKey = subSys
    	}
    	if err = cfg.DelKVS(cfgKey); err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  10. cmd/admin-handlers-pools.go

    			idx = i
    		}
    	} else {
    		idx = globalEndpoints.GetPoolIdx(v)
    	}
    
    	if idx == -1 {
    		apiErr := toAdminAPIErr(ctx, errInvalidArgument)
    		apiErr.Description = fmt.Sprintf("specified pool '%s' not found, please specify a valid pool", v)
    		// We didn't find any matching pools, invalid input
    		writeErrorResponseJSON(ctx, w, apiErr, r.URL)
    		return
    	}
    
    Registered: Sun Oct 27 19:28:09 UTC 2024
    - Last Modified: Fri Jun 28 00:22:30 UTC 2024
    - 10.9K bytes
    - Viewed (0)
Back to top