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()
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()
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]
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]
from test import f f() print(X)
async def karakterAl(ctx, arg): fatechractercrawl.karakk(arg) uzanti = test.f() await ctx.send(file=discord.File(uzanti))
print ("hello") from test import g,f print(f(2),g(2))
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/
def main(): return t1.f()