Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 2,064 for yield (0.43 sec)

  1. docs_src/dependencies/tutorial008d_an.py

    from fastapi import Depends, FastAPI, HTTPException
    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)]):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 744 bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tf_passes.td

        "tf.IfRegion"(%0) ( {
          %2 = "tf.A"() : () -> (tensor<f32>)
          "tf.Yield"() : () -> ()
          }, {
          "tf.Yield"() : () -> ()
         }) { is_stateless = true } : (tensor<i1>) -> ()
        "tf.IfRegion"(%0) ( {
          %2 = "tf.B"() : () -> (tensor<f32>)
          "tf.Yield"() : () -> ()
          }, {
          "tf.Yield"() : () -> ()
          }) { is_stateless = true } : (tensor<i1>) -> ()
        ```
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 99.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FakeRoutePlanner.kt

        }
        val result = plans[nextPlanIndex++]
        events += "take plan ${result.id}"
    
        if (result.yieldBeforePlanReturns) {
          taskFaker.yield()
        }
    
        val planningThrowable = result.planningThrowable
        if (planningThrowable != null) throw planningThrowable
    
        return result
      }
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Wed Apr 24 04:40:49 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  4. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirResolveExtensionInfoProvider.kt

                    val declarationName = declaration.nameAsName ?: continue
                    if (!nameFilter(declarationName)) continue
                    with(analysisSession) {
                        yield(declaration.getSymbol() as S)
                    }
                }
            }
        }
    
        override fun getConstructors(): Sequence<KaConstructorSymbol> = withValidityAssertion {
            emptySequence()
        }
    
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Wed May 22 06:28:34 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc

        SmallVector<Type, 16> func_operand_types;
        func_operand_types.reserve(operands.size());
        for (Value operand : operands)
          func_operand_types.push_back(operand.getType());
    
        // Function results are the yield operands
        SmallVector<Type, 16> func_result_types;
        for (Value operand : island_op.GetYield().getOperands())
          func_result_types.push_back(operand.getType());
        FunctionType func_type =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/decompose_optionals.cc

        // match the "func.return" within the function.
        //
        // So this would transform
        // func.func @f(...) -> ... {
        //     yield %x : foo
        // }
        // ...
        // func.call @f(...) -> bar
        //
        // to
        //
        // func.func @f(...) -> ... {
        //     yield %x : foo
        // }
        // ...
        // func.call f(...) -> foo
        auto symbol_uses = f.getSymbolUses(f->getParentOp());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  7. docs/zh/docs/tutorial/sql-databases.md

        我们将`SessionLocal()`请求的创建和处理放在一个`try`块中。
    
        然后我们在finally块中关闭它。
    
        通过这种方式,我们确保数据库会话在请求后始终关闭。即使在处理请求时出现异常。
    
        但是您不能从退出代码中引发另一个异常(在yield之后)。可以查阅 [Dependencies with yield and HTTPException](https://fastapi.tiangolo.com/zh/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-httpexception)
    
    *然后,当在路径操作函数*中使用依赖项时,我们使用`Session`,直接从 SQLAlchemy 导入的类型声明它。
    
    *这将为我们在路径操作函数*中提供更好的编辑器支持,因为编辑器将知道`db`参数的类型`Session`:
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue May 07 21:00:22 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  8. src/go/ast/walk.go

    //
    // For greater control over the traversal of each subtree, use [Inspect].
    func Preorder(root Node) iter.Seq[Node] {
    	return func(yield func(Node) bool) {
    		ok := true
    		Inspect(root, func(n Node) bool {
    			if n != nil {
    				// yield must not be called once ok is false.
    				ok = ok && yield(n)
    			}
    			return ok
    		})
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:34:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  9. src/os/dir.go

    )
    
    // Readdir reads the contents of the directory associated with file and
    // returns a slice of up to n [FileInfo] values, as would be returned
    // by [Lstat], in directory order. Subsequent calls on the same file will yield
    // further FileInfos.
    //
    // If n > 0, Readdir returns at most n FileInfo structures. In this case, if
    // Readdir returns an empty slice, it will return a non-nil error
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/tests/convert_control_to_data_outputs.mlir

      %graph = tf_executor.graph {
        %island, %ctrl = tf_executor.island {
          %pred = "tf.SomeOp"(%arg2) : (tensor<f32>) -> tensor<i32>
          tf_executor.yield %pred : tensor<i32>
        }
        tf_executor.fetch %island : tensor<i32>
      }
      func.return %graph : tensor<i32>
    }
    
    // CHECK-LABEL:   func @simple_independent_chains
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 18:35:00 UTC 2024
    - 68.9K bytes
    - Viewed (0)
Back to top