Skip to content

Instantly share code, notes, and snippets.

@simrit1
Forked from mGalarnyk/serialPython.py
Created September 15, 2021 00:39
Show Gist options
  • Select an option

  • Save simrit1/bc1b7e9926089e0e98167b7bf99cce4d to your computer and use it in GitHub Desktop.

Select an option

Save simrit1/bc1b7e9926089e0e98167b7bf99cce4d to your computer and use it in GitHub Desktop.
import math
import numpy as np
from timebudget import timebudget
iterations_count = round(1e7)
def complex_operation(input_index):
print("Complex operation. Input index: {:2d}".format(input_index))
[math.exp(i) * math.sinh(i) for i in [1] * iterations_count]
@timebudget
def run_complex_operations(operation, input):
for i in input:
operation(i)
input = range(10)
run_complex_operations(complex_operation, input)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment