예제 #1
0
 def testBuiltins(self):
     self.registry.newModule("test", builtin_src)
     transaction.commit()
     import test
     self.assertEqual(test.f(), len(test.x))
     test._p_deactivate()
     self.assertEqual(test.f(), len(test.x))
     self.useNewConnection()
예제 #2
0
 def testLambda(self):
     # test a lambda that contains another lambda as a default
     self.registry.newModule("test",
                             "f = lambda x, y = lambda: 1: x + y()")
     transaction.commit()
     import test
     self.assertEqual(test.f(1), 2)
     self.useNewConnection()
예제 #3
0
def upload():
    f = request.files['file']
    save_pic(f)
    a, b = test.f(f)
    conf = a.max()
    if conf < 0.6:
        return '暂时无法识别,换个姿势吧~'
    else:
        return '垃圾类别是:' + category[b]
예제 #4
0
def upload():
    f = request.files['file']
    save_pic(f)
    a, b = test.f(f)
    conf = a.max()
    if conf < 0.6:
        return '垃圾类别是:' + category[b] + ' || 置信度为:' + str(
            a.max()) + ' || 置信度过低, 建议返回人工检测'
    else:
        return '垃圾类别是:' + category[b]
예제 #5
0
from test import f

f()
print(X)
예제 #6
0
async def karakterAl(ctx, arg):
    fatechractercrawl.karakk(arg)
    uzanti = test.f()
    await ctx.send(file=discord.File(uzanti))
예제 #7
0
print ("hello")
from test import g,f

print(f(2),g(2))
예제 #8
0
from subfolder.funct import func1
from test import f


def print_hi(name):
    # Use a breakpoint in the code line below to debug your script.
    print('Hi, {name}')  # Press Ctrl+F8 to toggle the breakpoint.


print(func1(2))
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    print_hi('PyCharm')
    print("yo")
    print('wsup')
"""
Hi jorrit this is me
beng beng beng
Trying to screw things up 
"""

print(f(5))

# See PyCharm help at https://www.jetbrains.com/help/pycharm/
예제 #9
0
def main():
    return t1.f()