Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def eye(self, _line, cell):
if not self.server_url:
server.db = Database(self.db_url)
server.Function = server.db.Function
server.Call = server.db.Call
server.Session = server.db.Session
Thread(
target=run_server,
args=(
self.port,
self.bind_host,
self.show_server_output,
),
).start()
eye.db = Database(self.db_url)
def callback(call_id):
"""
Always executes after the cell, whether or not an exception is raised
def run_server(port, bind_host, show_server_output):
if not show_server_output:
thread_proxies[currentThread().ident] = fake_stream()
try:
server.app.run(
debug=True,
port=port,
host=bind_host,
use_reloader=False,
)
except socket.error:
pass
def eye(self, _line, cell):
if not self.server_url:
server.db = Database(self.db_url)
server.Function = server.db.Function
server.Call = server.db.Call
server.Session = server.db.Session
Thread(
target=run_server,
args=(
self.port,
self.bind_host,
self.show_server_output,
),
).start()
eye.db = Database(self.db_url)
def callback(call_id):
"""
Always executes after the cell, whether or not an exception is raised
in the user code.
def eye(self, _line, cell):
if not self.server_url:
server.db = Database(self.db_url)
server.Function = server.db.Function
server.Call = server.db.Call
server.Session = server.db.Session
Thread(
target=run_server,
args=(
self.port,
self.bind_host,
self.show_server_output,
),
).start()
eye.db = Database(self.db_url)
def callback(call_id):
"""
Always executes after the cell, whether or not an exception is raised
in the user code.
"""