| Attrs/fastText_discard/40_args-8 | 2 0 码力 |
26 页 |
1.90 MB
| 1 月前 3 := funcFileLine(pkg: "github.com/redis/go-redis")
attrs := make([]attribute.KeyValue, 0, 8)
attrs := append(attrs, semconv.CodeFunctionKey.String(fn), semconv.CodeFilepathKey.String(file) Since(start)
attrs := make([]attribute.KeyValue, 0, len(mh.attrs)+2)
attrs = append(attrs, mh.attrs...)
attrs = append(attrs, attribute.String(k: "type", v: "command"))
attrs = append(attrs append(attrs, statusAttr(err))
mh.useTime.Record(ctx, milliseconds(dur), metric.WithAttributes(attrs...))
return err
## 指标数据
← → C 127.0.0.1:2223/metrics
# HELP db_client_connections_create_time_milliseconds 0 码力 |
35 页 |
2.88 MB
| 2 年前 3 function for operator to check the type and compute the output shape
- Shape function has two modes (op_attrs, input_tensors, out_ndims) -> out_shape_tensors
☐ Data dependent
(op_attributes, input_data, two modes
(op_attrs, input_tensors, out_ndims) -> out_shape_tensors
☐ Data dependent
(op_attributes, input_data, out_ndims) -> out_shape_tensors
☐ Data independent
(op_attrs, input_shapes, out_ndims) @conv2d_strategy.register("cpu")
def conv2d_strategy_cpu(attrs, inputs, out_type, target):
strategy = OpStrategy()
layout = attrs.data_layout
if layout == "NCHW":
oc, ic 0 码力 |
24 页 |
417.46 KB
| 1 年前 3 "int".
## --include-object-attrs
This will make the daemon include attributes of object (excluded by default) in case of an atts inspection.
## --union-attrs
Include attributes valid for some they were dataclasses (even though they may fail at runtime).
## The attr's package
attrs [https://www.attrs.org/en/stable/index.html] is a package that lets you define classes without writing boilerplate finds. Type annotations can be added as follows:
import attr
@attrs.define
class A:
one: int
two: int = 7
three: int = attrs.field(8)
If you’re using auto_attribs=False you must use attr 0 码力 |
318 页 |
270.84 KB
| 2 年前 3 "int".
## --include-object-attrs
This will make the daemon include attributes of object (excluded by default) in case of an atts inspection.
## --union-attrs
Include attributes valid for some they were dataclasses (even though they may fail at runtime).
## The attr's package
attrs [https://www.attrs.org/en/stable/index.html] is a package that lets you define classes without writing boilerplate finds. Type annotations can be added as follows:
import attr
@attrs.define
class A:
one: int
two: int = 7
three: int = attrs.field(8)
If you’re using auto_attribs=False you must use attr 0 码力 |
318 页 |
271.55 KB
| 2 年前 3 same as command() just that the cls parameter is set to Group.
### click.argument(*param_decls, **attrs)
Attaches an option to the command. All positional arguments are passed as parameter declarations Option instance manually and attaching it to the Command.params list.
### click.option(*param_decls, **attrs)
Attaches an option to the command. All positional arguments are passed as parameter declarations manually and attaching it to the Command.params list.
### click.password_option(*param_decls, **attrs) Shortcut for password prompts
This is equivalent to decorating a function with option() with the 0 码力 |
64 页 |
301.16 KB
| 2 年前 3 | paragraph;
12 Picture = “Pic”, Colon | Attrs | paragraph;
13 Text = “Text”, Colon | Attrs | paragraph;
14 Audio = “Audio”, Colon | Attrs | paragraph;
15 Attrs = LeftParen, ( Attr { Attr }),RightParen 0 码力 |
81 页 |
4.72 MB
| 1 月前 3 the kind will appear first, for example NameExpr:1:2:1:4 -> "int".
## --include-object-attrs
This will make the daemon include attributes of object (excluded by default) in case of an atts inspection they were dataclasses (even though they may fail at runtime).
#### 1.34.3 The attr's package
attrs is a package that lets you define classes without writing boilerplate code. Mypy can detect uses of follows:
import attr
@attrs.define
class A:
one: int
two: int = 7
three: int = attrs.field(8)
If you're using auto_attribs=False you must use attr.field:
import attrs
@attrs.define
class A: 0 码力 |
234 页 |
902.89 KB
| 2 年前 3
|