Skip to content

Instantly share code, notes, and snippets.

@jdsiddon
Created September 10, 2025 16:56
Show Gist options
  • Select an option

  • Save jdsiddon/5ab0cb4148756e4163fd800d42eeb87b to your computer and use it in GitHub Desktop.

Select an option

Save jdsiddon/5ab0cb4148756e4163fd800d42eeb87b to your computer and use it in GitHub Desktop.
import math
regex = 'parameter_1'
user_function = math.sqrt(math.sqrt(16) * math.sin(0.5))
def serialize_function(func):
return str(func)
def main():
user_function_string = serialize_function(user_function)
exec(user_function_string)
print("start print function")
print("---", user_function_string, "---")
print("end print function")
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment