- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 57 for test_value (0.23 sec)
-
docs/zh/docs/tutorial/dependencies/sub-dependencies.md
在高级使用场景中,如果不想使用「缓存」值,而是为需要在同一请求的每一步操作(多次)中都实际调用依赖项,可以把 `Depends` 的参数 `use_cache` 的值设置为 `False` : ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value} ``` ## 小结 千万别被本章里这些花里胡哨的词藻吓倒了,其实**依赖注入**系统非常简单。 依赖注入无非是与*路径操作函数*一样的函数罢了。 但它依然非常强大,能够声明任意嵌套深度的「图」或树状的依赖结构。 !!! tip "提示"
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 3.2K bytes - Viewed (0) -
src/internal/syscall/windows/registry/registry_test.go
} } func TestValues(t *testing.T) { softwareK, err := registry.OpenKey(registry.CURRENT_USER, "Software", registry.QUERY_VALUE) if err != nil { t.Fatal(err) } defer softwareK.Close() testKName := randKeyName("TestValues_") k, exist, err := registry.CreateKey(softwareK, testKName, registry.CREATE_SUB_KEY|registry.QUERY_VALUE|registry.SET_VALUE) if err != nil { t.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 06 19:19:00 UTC 2024 - 18.5K bytes - Viewed (0) -
src/slices/iter_test.go
t.Errorf("at iteration %d got %d, %d want %d, %d", cnt, i, v, ei, ev) } ei-- ev-- cnt++ } if cnt != size { t.Errorf("read %d values expected %d", cnt, size) } } } func TestValues(t *testing.T) { for size := 0; size < 10; size++ { var s []int for i := range size { s = append(s, i) } ev := 0 cnt := 0 for v := range Values(s) { if v != ev {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:28:50 UTC 2024 - 5.7K bytes - Viewed (0) -
src/sync/atomic/value_test.go
// license that can be found in the LICENSE file. package atomic_test import ( "math/rand" "runtime" "strconv" "sync" "sync/atomic" . "sync/atomic" "testing" ) func TestValue(t *testing.T) { var v Value if v.Load() != nil { t.Fatal("initial Value is not nil") } v.Store(42) x := v.Load() if xx, ok := x.(int); !ok || xx != 42 { t.Fatalf("wrong value: got %+v, want 42", x)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 6.1K bytes - Viewed (0) -
src/internal/syscall/windows/registry/key.go
CREATE_LINK = 0x00020 CREATE_SUB_KEY = 0x00004 ENUMERATE_SUB_KEYS = 0x00008 EXECUTE = 0x20019 NOTIFY = 0x00010 QUERY_VALUE = 0x00001 READ = 0x20019 SET_VALUE = 0x00002 WOW64_32KEY = 0x00200 WOW64_64KEY = 0x00100 WRITE = 0x20006 ) // Key is a handle to an open Windows registry key.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 16:42:41 UTC 2023 - 5.4K bytes - Viewed (0) -
src/flag/flag.go
} ptrVal.Elem().Set(defVal) return textValue{p} } func (v textValue) Set(s string) error { return v.p.UnmarshalText([]byte(s)) } func (v textValue) Get() interface{} { return v.p } func (v textValue) String() string { if m, ok := v.p.(encoding.TextMarshaler); ok { if b, err := m.MarshalText(); err == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 18:38:24 UTC 2024 - 39.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc
auto retValOp = dyn_cast<TFRReturnOp>(op); if (!retValOp) return; for (auto ret_value : llvm::zip(valuesToRepl, retValOp.getOperands())) { std::get<0>(ret_value).replaceAllUsesWith(std::get<1>(ret_value)); } } // Attempts to materialize a conversion for a type mismatch between a call
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Nov 21 16:55:41 UTC 2023 - 38.2K bytes - Viewed (0) -
src/runtime/vdso_linux.go
return false } // Check symbol version. if info.versym != nil && version != 0 && int32(info.versym[symIndex]&0x7fff) != version { return false } *k.ptr = info.loadOffset + uintptr(sym.st_value) return true } if !info.isGNUHash { // Old-style DT_HASH table. for _, k := range vdsoSymbolKeys { if len(info.bucket) > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 19 19:32:35 UTC 2022 - 7.8K bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/sub-dependencies.md
高度なシナリオでは、「キャッシュされた」値を使うのではなく、同じリクエストの各ステップ(おそらく複数回)で依存関係を呼び出す必要があることがわかっている場合、`Depens`を使用する際に、`use_cache=False`というパラメータを設定することができます。 ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value} ``` ## まとめ ここで使われている派手な言葉は別にして、**依存性注入** システムは非常にシンプルです。 *path operation関数*と同じように見えるただの関数です。
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Mon Jan 15 16:43:41 UTC 2024 - 4.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize.cc
bool is_mul = llvm::isa<MulOp>(binary_op); auto new_filter = filter_cst.mapValues(filter_type.getElementType(), [&](APFloat it) { return (is_mul ? it * cst_value : it / cst_value).bitcastToAPInt(); }); // We recreate the constant op in case it is shared by the other ops. This // might increase the model size. auto new_filter_op = rewriter.create<ConstOp>(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 102.3K bytes - Viewed (0)