prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>hashes.py<|end_file_name|><|fim▁begin|># This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from cryptography imp...
finalize
<|file_name|>test_generate_product_templates_tfidf_api.py<|end_file_name|><|fim▁begin|>""" Tests barbante.api.generate_product_templates_tfidf. """ import json import nose.tools import barbante.api.generate_product_templates_tfidf as script import barbante.utils.logging as barbante_logging import barbante.tests as t...
<|file_name|>test_generate_product_templates_tfidf_api.py<|end_file_name|><|fim▁begin|>""" Tests barbante.api.generate_product_templates_tfidf. """ import json import nose.tools import barbante.api.generate_product_templates_tfidf as script import barbante.utils.logging as barbante_logging import barbante.tests as t...
""" Tests a call to script barbante.api.generate_product_templates_tfidf. """ result = script.main([tests.TEST_ENV]) log.debug(result) result_json = json.dumps(result) nose.tools.ok_(result_json) # a well-formed json is enough
<|file_name|>test_generate_product_templates_tfidf_api.py<|end_file_name|><|fim▁begin|>""" Tests barbante.api.generate_product_templates_tfidf. """ import json import nose.tools import barbante.api.generate_product_templates_tfidf as script import barbante.utils.logging as barbante_logging import barbante.tests as t...
test_script()
<|file_name|>test_generate_product_templates_tfidf_api.py<|end_file_name|><|fim▁begin|>""" Tests barbante.api.generate_product_templates_tfidf. """ import json import nose.tools import barbante.api.generate_product_templates_tfidf as script import barbante.utils.logging as barbante_logging import barbante.tests as t...
test_script
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
class CodeFormatterEventListener(sublime_plugin.EventListener):
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
cprint('CodeFormatter: Plugin Initialized') # settings = sublime.load_settings('CodeFormatter.sublime-settings') # debug_mode = settings.get('codeformatter_debug', False) # if debug_mode: # from pprint import pprint # pprint(settings) # debug_write('Debug mode enabled') # ...
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
def run(self, edit, syntax=None, saving=None): run_formatter(self.view, edit, syntax=syntax, saving=saving)
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
run_formatter(self.view, edit, syntax=syntax, saving=saving)
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
def run(self, edit, syntax=None): window = sublime.active_window() for view in window.views(): run_formatter(view, edit, quiet=True)
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
window = sublime.active_window() for view in window.views(): run_formatter(view, edit, quiet=True)
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
def on_pre_save(self, view): view.run_command('code_formatter', {'saving': True})
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
view.run_command('code_formatter', {'saving': True})
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
def run(self, edit, syntax=False): import subprocess import re platform = sublime.platform() settings = sublime.load_settings('CodeFormatter.sublime-settings') opts = settings.get('codeformatter_php_options') php_path = 'php' if ('php_path' in opts and opt...
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
import subprocess import re platform = sublime.platform() settings = sublime.load_settings('CodeFormatter.sublime-settings') opts = settings.get('codeformatter_php_options') php_path = 'php' if ('php_path' in opts and opts['php_path']): php_path = o...
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
if view.is_scratch(): show_error('File is scratch') return # default parameters syntax = kwargs.get('syntax') saving = kwargs.get('saving', False) quiet = kwargs.get('quiet', False) formatter = Formatter(view, syntax) if not formatter.exists(): if not quiet and not ...
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
if prefix: sys.stdout.write('CodeFormatter: ') sys.stdout.write(text + '\n')
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
console_write(text, True)
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
sublime.error_message(u'CodeFormatter\n\n%s' % text)
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
st_version = 3
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
reloader_name = 'CodeFormatter.' + reloader_name from imp import reload
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
reload(sys.modules[reloader_name])
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
import stat path = ( sublime.packages_path() + '/CodeFormatter/codeformatter/lib/phpbeautifier/fmt.phar' ) st = os.stat(path) os.chmod(path, st.st_mode | stat.S_IEXEC)
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
plugin_loaded()
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
php_path = opts['php_path']
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
php55_compat = opts['php55_compat']
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
cmd.append( '{}/CodeFormatter/codeformatter/lib/phpbeautifier/fmt.phar'.format( sublime.packages_path()))
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
cmd.append( '{}/CodeFormatter/codeformatter/lib/phpbeautifier/phpf.phar'.format( sublime.packages_path()))
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow = subprocess.SW_HIDE p = subprocess.Popen( cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, std...
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
p = subprocess.Popen( cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
stderr = 'Error while gethering list of php transformations'
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
text = stdout.decode('utf-8') text = re.sub( 'Usage:.*?PASSNAME', 'Available PHP Tranformations:', text) window = self.view.window() pt = window.get_output_panel('paneltranformations') pt.set_read_only(False) pt.insert(edit, pt.size...
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
show_error('Formatter error:\n' + stderr)
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
show_error('File is scratch') return
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
if not quiet and not saving: show_error('Formatter for this file type ({}) not found.'.format( formatter.syntax)) return
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
show_error('Formatter for this file type ({}) not found.'.format( formatter.syntax))
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
return
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
return
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
view.replace(edit, file_text, stdout)
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
show_error('Format error:\n' + stderr)
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
sys.stdout.write('CodeFormatter: ')
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
plugin_loaded
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
run
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
run
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
on_pre_save
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
run
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
run_formatter
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
console_write
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
debug_write
<|file_name|>CodeFormatter.py<|end_file_name|><|fim▁begin|># @author Avtandil Kikabidze # @copyright Copyright (c) 2008-2015, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com) # @link http://longman.me # @license The MIT License (MIT) import os import sys import sublime impo...
show_error
<|file_name|>utils_lib.py<|end_file_name|><|fim▁begin|># Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|># http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# you may not use this file except in compliance with the License. # You may obtain a copy of the License at #
<|file_name|>ws_BinaryClass_10_DecisionTreeClassifier_db2_code_gen.py<|end_file_name|><|fim▁begin|>from sklearn2sql_heroku.tests.classification import generic as class_gen <|fim▁hole|><|fim▁end|>
class_gen.test_model("DecisionTreeClassifier" , "BinaryClass_10" , "db2")
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): <|fim_middle|> <|fim▁end|>
COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) self.width = 0 self.hasDoor = False def setWidth(self, width): self.width = width def getWidth(self): return self.width def setCurrentWallHeight(sel...
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): <|fim_middle|> def setWidth(self...
DNANode.DNANode.__init__(self, name) self.width = 0 self.hasDoor = False
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
self.width = width
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
return self.width
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
DNAFlatBuilding.currentWallHeight = currentWallHeight
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
return DNAFlatBuilding.currentWallHeight
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
self.hasDoor = hasDoor
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
return self.hasDoor
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
DNANode.DNANode.makeFromDGI(self, dgi) self.width = dgi.getInt16() / 100.0 self.hasDoor = dgi.getBool()
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
name = self.getName() if name[:2] != 'tb': return name = 'sb' + name[2:] node = nodePath.attachNewNode(name) node.setPosHpr(self.getPos(), self.getHpr()) numCodes = dnaStorage.getNumCatalogCodes('suit_wall') if numCodes < 1: return ...
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
name = self.getName() if name[:2] != 'tb': return name = 'cb' + name[2:] node = nodePath.attachNewNode(name) node.setPosHpr(self.getPos(), self.getHpr()) numCodes = dnaStorage.getNumCatalogCodes('cogdo_wall') if numCodes < 1: return ...
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
DNAFlatBuilding.currentWallHeight = 0 node = nodePath.attachNewNode(self.getName()) internalNode = node.attachNewNode(self.getName() + '-internal') scale = self.getScale() scale.setX(self.width) internalNode.setScale(scale) node.setPosHpr(self.getPos(), self.getHp...
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
return
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
return
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
return
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
wallNodePath = node.find('wall_*') doorNode = dnaStorage.findNode('suit_door') doorNode = doorNode.copyTo(wallNodePath, 0) doorNode.setScale(NodePath(), (1, 1, 1)) doorNode.setPosHpr(0.5, 0, 0, 0, 0, 0) wallNodePath.setEffect(DecalEffect.make())
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
return
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
return
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
return
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
wallNodePath = node.find('wall_*') doorNode = dnaStorage.findNode('suit_door') doorNode = doorNode.copyTo(wallNodePath, 0) doorNode.setScale(NodePath(), (1, 1, 1)) doorNode.setPosHpr(0.5, 0, 0, 0, 0, 0) wallNodePath.setEffect(DecalEffect.make())
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
child.traverse(internalNode, dnaStorage)
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
child.traverse(node, dnaStorage)
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
print 'empty flat building with no walls'
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
cameraBarrier = dnaStorage.findNode('wall_camera_barrier') if cameraBarrier is None: raise DNAError.DNAError('DNAFlatBuilding requires that there is a wall_camera_barrier in storage') cameraBarrier = cameraBarrier.copyTo(internalNode, 0) cameraBarrier.setS...
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
raise DNAError.DNAError('DNAFlatBuilding requires that there is a wall_camera_barrier in storage')
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
collisionNode.setName('KnockKnockDoorSphere_' + dnaStorage.getBlock(self.getName()))
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def <|fim_middle|>(self, name): DNANode.DNANode.__init__(self, n...
__init__
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
setWidth
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
getWidth
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
setCurrentWallHeight
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
getCurrentWallHeight
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
setHasDoor
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
getHasDoor
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
makeFromDGI
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
setupSuitFlatBuilding
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
setupCogdoFlatBuilding
<|file_name|>DNAFlatBuilding.py<|end_file_name|><|fim▁begin|>from panda3d.core import NodePath, DecalEffect import DNANode import DNAWall import random class DNAFlatBuilding(DNANode.DNANode): COMPONENT_CODE = 9 currentWallHeight = 0 def __init__(self, name): DNANode.DNANode.__init__(self, name) ...
traverse
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from . import models from . import wizards<|fim▁end|>
# Copyright (C) 2018 - TODAY, Pavlov Media # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
<|file_name|>crm_job.py<|end_file_name|><|fim▁begin|>from odoo import fields, models class Job(models.Model): _inherit = "crm.team" survey_id = fields.Many2one(<|fim▁hole|> 'survey.survey', "Interview Form", help="Choose an interview form") def action_print_survey(self): return se...
<|file_name|>crm_job.py<|end_file_name|><|fim▁begin|>from odoo import fields, models class Job(models.Model): <|fim_middle|> <|fim▁end|>
_inherit = "crm.team" survey_id = fields.Many2one( 'survey.survey', "Interview Form", help="Choose an interview form") def action_print_survey(self): return self.survey_id.action_print_survey()
<|file_name|>crm_job.py<|end_file_name|><|fim▁begin|>from odoo import fields, models class Job(models.Model): _inherit = "crm.team" survey_id = fields.Many2one( 'survey.survey', "Interview Form", help="Choose an interview form") def action_print_survey(self): <|fim_middle|> <|fi...
return self.survey_id.action_print_survey()
<|file_name|>crm_job.py<|end_file_name|><|fim▁begin|>from odoo import fields, models class Job(models.Model): _inherit = "crm.team" survey_id = fields.Many2one( 'survey.survey', "Interview Form", help="Choose an interview form") def <|fim_middle|>(self): return self.survey_id.act...
action_print_survey
<|file_name|>test_docx.py<|end_file_name|><|fim▁begin|>from datetime import datetime from zipfile import ZipFile from io import BytesIO from lxml import etree from docxgen import * from docxgen import nsmap from . import check_tag def test_init(): doc = Document() check_tag(doc.doc, ['document', 'body']) c...
creator='Jill Smith',
<|file_name|>test_docx.py<|end_file_name|><|fim▁begin|>from datetime import datetime from zipfile import ZipFile from io import BytesIO from lxml import etree from docxgen import * from docxgen import nsmap from . import check_tag def test_init(): <|fim_middle|> def test_save(): doc = Document() tmp = By...
doc = Document() check_tag(doc.doc, ['document', 'body']) check_tag(doc.body, ['body'])
<|file_name|>test_docx.py<|end_file_name|><|fim▁begin|>from datetime import datetime from zipfile import ZipFile from io import BytesIO from lxml import etree from docxgen import * from docxgen import nsmap from . import check_tag def test_init(): doc = Document() check_tag(doc.doc, ['document', 'body']) c...
doc = Document() tmp = BytesIO() doc.save(tmp) with ZipFile(tmp) as zippy: assert(zippy.testzip() is None) assert(set(zippy.namelist()) == set([ '[Content_Types].xml', '_rels/.rels', 'docProps/app.xml', 'word/fontTable.xml', 'word/numbering.xml', 'word/settings.x...
<|file_name|>test_docx.py<|end_file_name|><|fim▁begin|>from datetime import datetime from zipfile import ZipFile from io import BytesIO from lxml import etree from docxgen import * from docxgen import nsmap from . import check_tag def test_init(): doc = Document() check_tag(doc.doc, ['document', 'body']) c...
d = Document() tmp = BytesIO() d.save(tmp) doc = Document.load(tmp) check_tag(doc.doc, 'document body'.split()) check_tag(doc.body, 'body'.split())
<|file_name|>test_docx.py<|end_file_name|><|fim▁begin|>from datetime import datetime from zipfile import ZipFile from io import BytesIO from lxml import etree from docxgen import * from docxgen import nsmap from . import check_tag def test_init(): doc = Document() check_tag(doc.doc, ['document', 'body']) c...
doc = Document() assert doc.dumps()