def CWrapperFir(self, SignalIn, FilterName): for i in range((len(self.FilterDict[FilterName]["registerQueue"]) - 2), -1, -1): #if (i != 0): self.FilterDict[FilterName]["registerQueue"][i + 1] = self.FilterDict[FilterName]["registerQueue"][i] self.FilterDict[FilterName]["registerQueue"][0] = int(self.MusicFileArray[self.FilterDict[FilterName]["Counter"]]) acc = 0 for i in range(len(self.FilterDict[FilterName]["registerQueue"])): acc = example.fact(3) self.FilterDict[FilterName]["OutPort"] = acc #self.FilterDict[FilterName]["OutPort"] = self.FilterDict[FilterName]["Coefficients"][self.FilterDict[FilterName]["Counter"]] * int(self.MusicFileArray[self.FilterDict[FilterName]["Counter"]]) self.FilterDict[FilterName]["Counter"] = self.FilterDict[FilterName]["Counter"] + 1 self.outputFifo[FilterName].append(self.FilterDict[FilterName]["OutPort"]) return (self.FilterDict[FilterName]["OutPort"])
#!/usr/bin/env python import example if __name__ == '__main__': print example.fact(4)
#!/usr/bin/env python #-*- coding:utf-8 -*- import example print(example.fact(5)) print(example.my_mod(7, 3)) print(example.get_time())
import example example.set_requirments(7) print('My_varaiable: %s' % example.cvar.My_variable) print('fact(5): %s' % example.fact(5)) print('my_mod(7,3): %s' % example.my_mod(7, 3)) print('get_time(): %s' % example.get_time())
import example print(example.fact(10))
import example print(example.fact(5)) print(example.my_mod(7, 3)) print(example.get_time())
import example print(example.fact(6))
def predict(self, context, model_input): return example.fact(self.n)
#!/usr/bin/env python import example import timeit print example.fact(3) t = timeit.timeit('example.sum(100)', setup="from __main__ import example", number=1) print t print example.sum1(20) #print example.sum(2) #print example.sum(3)
#!/usr/bin/python import example print example.fact(4) print example.accumulate v = example.IntVector() v.push_back(1) v.push_back(2) v.push_back(3) print example.accumulate(v)
#!/usr/bin/python # -*- coding: utf-8 -*- import example print("fact 5 : %s" % example.fact(5)) print("my_mod 7 3 : %s" % example.my_mod(7, 3)) print("get_time : %s" % example.get_time())
#!/usr/bin/env python import example print(example.fact(4))
import example print 'fact(10):', example.fact(10)
# some_file.py import sys sys.path.insert(0, './example/') import example print "MOD: %d" %example.my_mod(4, 3) print "Factorial(5): %d" %example.fact(5) print "Global Variable: %d" %example.cvar.My_variable
import example print("factorial(5) = {}".format(example.fact(5))) print("7 modulo 3 = {}".format(example.my_mod(7, 3))) print("Current time = {}".format(example.get_time()))
def test_fact(): assert 120 == example.fact(5)
def test_func(self): self.assertEqual(1, example.my_mod(7, 3)) self.assertEqual(120, example.fact(5))
import example print example.fact(8) print example.get_time()
import example print("5! = " + str(example.fact(5))) print("5 % 2 = " + str(example.my_mod(4, 2))) print("The current time is " + str(example.get_time()))
#!/usr/bin/env python # -*- coding: utf-8 -*- import example ret = example.fact(4) print "ret = %d" % ret n, msg = example.tuple() print n print msg #print "n = %d, msg = %s" % (n, msg)
import example print example.fact(5)
import example print 'factorial of 10:', example.fact(10)
#test.py import example a = example.fact(5) print(a) b = example.my_mod(7, 4) print(b) c = example.get_time() print(c)
import example example.fact(5) example.my_mod(7, 3) example.get_time()