Пример #1
0
       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"]) 
Пример #2
0
Файл: a.py Проект: kabirz/test
#!/usr/bin/env python 
import example
if __name__ == '__main__':
    print example.fact(4)
Пример #3
0
#!/usr/bin/env python
#-*- coding:utf-8 -*-

import example

print(example.fact(5))
print(example.my_mod(7, 3))
print(example.get_time())
Пример #4
0
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())
Пример #5
0
import example
print(example.fact(10))
Пример #6
0
import example
print(example.fact(5))
print(example.my_mod(7, 3))
print(example.get_time())

Пример #7
0
import example
print(example.fact(6))
Пример #8
0
 def predict(self, context, model_input):
     return example.fact(self.n)
Пример #9
0
#!/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)
Пример #10
0
#!/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)
Пример #11
0
#!/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())
Пример #12
0
#!/usr/bin/env python
import example
print(example.fact(4))
Пример #13
0
import example

print 'fact(10):', example.fact(10)
Пример #14
0
# 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
Пример #15
0
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()))
Пример #16
0
def test_fact():
    assert 120 == example.fact(5)
Пример #17
0
 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()
Пример #19
0
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()))
Пример #20
0
#!/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)
Пример #21
0
import example
print example.fact(5)
Пример #22
0
import example

print 'factorial of 10:', example.fact(10)
Пример #23
0
#test.py
import example

a = example.fact(5)
print(a)
b = example.my_mod(7, 4)
print(b)
c = example.get_time()
print(c)
Пример #24
0
import example
example.fact(5)
example.my_mod(7, 3)
example.get_time()