From: MarianCG: a code generation transformer model inspired by machine translation
Examples | Natural language | Code |
---|---|---|
Example 1 | Define the function do_filter with 2 arguments: parser and token | def do_filter ( parser , token ) : |
Example 2 | Convert priority into a floating point integer, substitute it for priority | priority = float ( priority ) |
Example 3 | Define the method as_bytes with arguments self and unixfrom set to boolean False | def as_bytes ( self , unixfrom = False ): |