예제 #1
0
"""
Title   모듈과 패키지 | module and package
Author  kadragon
Date    2018.09.05
"""

from sample import sample_func

x = 222


def main_func():
    print('x is: ', x)


print("sample.sample_func()")
sample_func()

print()

print("main_func()")
main_func()
예제 #2
0
"""
Title   모듈과 패키지 | module and package
Author  kadragon
Date    2018.09.05
"""

import sample as sp

print(sp.sample_func())
예제 #3
0
"""Just a script that
Displays Hello world."""

# tested versions: 2018

__title__ = 'Hello\nWorld'
__author__ = 'Michael Spencer Quinto'

# __context__ = 'Selection'
# Tools are active even when there are no documents available/open in Revit
# __context__ = 'zerodoc'

from Autodesk.Revit.UI import TaskDialog

TaskDialog.Show('spencerCorePyRevut', 'Hello World!')

if __name__ == '__main__':
    from sample import sample_func
    print(sample_func())
예제 #4
0
 def test_sample_func(self):
     result = sample.sample_func(1)
     self.assertEqual(result, "One")
예제 #5
0
 def test_one(self):
     """Test one"""
     self.assertTrue(sample.sample_func(False))
예제 #6
0
def cached_sample_func(model, phrase, n_samples, sampler, beam_search):
    global cache
    k = (tuple(phrase), n_samples)
    if not k in cache:
        cache[k] = sample_func(model, phrase, n_samples, sampler, beam_search)
    return cache[k]