Questions tagged [interactive-session]

7 questions
462
votes
20 answers

How to save a Python interactive session?

I find myself frequently using Python's interpreter to work with databases, files, etc -- basically a lot of manual formatting of semi-structured data. I don't properly save and clean up the useful bits as often as I would like. Is there a way to…
unmounted
  • 33,530
  • 16
  • 61
  • 61
16
votes
1 answer

Is there a way to automatically suppress Matlab from printing big matrices in command window?

Is there an option in matlab or a plugin/app or a trick such that if you are in an interactive command session, every time it would print out a matrix way too big for a human to look through, it redacts the output to either a warning of how big the…
BW0
  • 757
  • 8
  • 14
8
votes
1 answer

TensorFlow: generating a random constant

In ipython I imported tensorflow as tf and numpy as np and created an TensorFlow InteractiveSession. When I am running or initializing some normal distribution with numpy input, everything runs fine: some_test = tf.constant(np.random.normal(loc=0.0,…
daniel451
  • 10,626
  • 19
  • 67
  • 125
4
votes
1 answer

Get active sessions with wmi (Win32_LogonSession returns also inactive/old sessions)

Is there a way to show only active sessions with wmi? The problem is that Win32_LogonSession shows also inactive/disconnected sessions. ManagementScope scope = new ManagementScope(ManagementPath.DefaultPath); SelectQuery query = new…
domueni
  • 304
  • 8
  • 19
3
votes
2 answers

Get code entered so far in Python interpreter session

Is there a fast, convenient way to get all the code typed into the python interpreter so far? E.g., if I type this into the interpreter: Steven$ python Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0…
Steven
  • 2,538
  • 3
  • 31
  • 40
2
votes
0 answers

Unable to Connect Remote Spark Session with YARN mode on Kubeflow

The main problem is that we are unable to run spark in client mode. Whenever we try to connect to spark on YARN mode from kubeflow notebook we have the following error: `Py4JJavaError: An error occurred while calling o81.showString. :…
0
votes
1 answer

How to resolve interactive session error in tensorflow (version 2.0.0a), python version 3.6.8, anaconda version 5.3.1?

I run the following code snippet from __future__ import print_function import tensorflow as tf import numpy as np which returns the following error `` AttributeError Traceback (most recent call last) in ----> 1 sess =…
sarkar
  • 11
  • 4