Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, **kwargs):
Kernel.__init__(self, **kwargs)
# powershell_command env variable is set by the kernel to allow both powershell and pwsh
# but on python2 we cannot pass it thru env variable, see https://github.com/vors/jupyter-powershell/issues/7
# TODO(python2): can we pass it somehow differently and still provide user-picked value on python2?
try:
powershell_command = environ['powershell_command']
except:
powershell_command = get_powershell()
repl = subprocess_repl.SubprocessRepl([powershell_command, '-noprofile', '-File', '-'])
self.proxy = powershell_proxy.ReplProxy(repl)
def __init__(self, **kwargs):
conf_file = os.path.expanduser(CONFIG_FILE)
if os.path.isfile(conf_file):
with open(conf_file, mode='r') as file_hanlde:
self.conf = json.load(file_hanlde)
pyhiveconf, sql_req = self.parse_code(code="")
self.create_conn(**pyhiveconf)
#if self.last_conn is None:
# raise ConnectionNotCreated()
Kernel.__init__(self, **kwargs)
def __init__(self, **kwargs):
Kernel.__init__(self, **kwargs)
repl = subprocess_repl.SubprocessRepl(['C:\\Program Files\\SimVascular\\SimVascular\\REPLACE_SV_TIMESTAMP\\sv.bat', '-tk', '--'])
self.proxy = simvascular_tk_proxy.ReplProxy(repl)
def __init__(self, **kwargs):
Kernel.__init__(self, **kwargs)
self.start_redis(**kwargs)
self.get_commands()
self.start_history()
def __init__(self, **kwargs):
Kernel.__init__(self, **kwargs)
if 'lc_wrapper_fluentd_host' in os.environ:
fluentd_host = os.environ['lc_wrapper_fluentd_host']
fluentd_port = int(os.environ.get('lc_wrapper_fluentd_port', '24224'))
fluentd_tag = os.environ.get('lc_wrapper_fluentd_tag', 'lc_wrapper')
self.sender = sender.FluentSender(fluentd_tag,
host=fluentd_host,
port=fluentd_port)
self.log.info('lc_wrapper: Enabled fluent logger: host=%s, port=%s, tag=%s',
fluentd_host, fluentd_port, fluentd_tag)
else:
self.sender = None
self._init_message_handler()
self.start_ipython_kernel()
def __init__(self, **kwargs):
start_time = time.time()
Kernel.__init__(self, **kwargs)
logger.debug("session %s %s", type(self.session), self.session)
logger.debug("iopub_socket %s %s", type(self.iopub_socket), self.iopub_socket)
self.original_iopub_socket = self.iopub_socket
self.iopub_socket = Splitter([self.original_iopub_socket, self])
self.shell = self.shell_class.instance(parent=self,
profile_dir=self.profile_dir,
user_ns=self.user_ns,
kernel=self)
self.shell.displayhook.session = self.session
self.shell.displayhook.pub_socket = self.iopub_socket
self.shell.displayhook.topic = self._topic('execute_result')
self.shell.display_pub.session = self.session
def __init__(self, **kwargs):
Kernel.__init__(self, **kwargs)
repl = subprocess_repl.SubprocessRepl(['C:\\Program Files\\SimVascular\\SimVascular\\2019-02-05\\sv.bat', '-tcl', '--'])
self.proxy = simvascular_tcl_proxy.ReplProxy(repl)
def __init__(self, **kwargs):
Kernel.__init__(self, **kwargs)
repl = subprocess_repl.SubprocessRepl(['C:\\cygwin64\\bin\\bash.exe','-i'])
self.proxy = cygwin_bash_proxy.ReplProxy(repl)
def __init__(self, **kwargs):
Kernel.__init__(self, **kwargs)
repl = subprocess_repl.SubprocessRepl(['C:\\Program Files\\SimVascular\\SimVascular\\REPLACE_SV_TIMESTAMP\\sv.bat', '-tcl', '--'])
self.proxy = simvascular_tcl_proxy.ReplProxy(repl)