Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@lambda_solid(
input_defs=[InputDefinition('num', PoorMansDataFrame)],
output_def=OutputDefinition(PoorMansDataFrame),
)
def sum_solid(num):
sum_df = deepcopy(num)
for x in sum_df:
x['sum'] = x['num1'] + x['num2']
return PoorMansDataFrame(sum_df)
@lambda_solid(output_def=OutputDefinition(Int))
def return_one():
return 1
@lambda_solid(input_defs=[InputDefinition('num_one'), InputDefinition('num_two')])
def add(num_one, num_two):
return num_one + num_two
@lambda_solid
def do_something():
return 1
@lambda_solid()
def first():
return ['first']
@lambda_solid
def user_throw_exception():
raise Exception('whoops')
@lambda_solid
def produce_invalid_ssn_string():
return '394-30-203239483'
@lambda_solid(output_def=OutputDefinition(list))
def emit_list():
return [1]
@lambda_solid(input_defs=[InputDefinition('num')])
def div_two(num):
return num / 2
@lambda_solid
def return_two():
return 2