Ask Your Question

danny's profile - activity

2023-03-20 22:02:02 +0200 received badge  Notable Question (source)
2022-10-16 17:02:11 +0200 received badge  Notable Question (source)
2021-08-31 20:40:51 +0200 received badge  Popular Question (source)
2021-05-18 16:09:52 +0200 received badge  Famous Question (source)
2020-09-14 13:40:30 +0200 received badge  Notable Question (source)
2020-04-29 15:56:47 +0200 received badge  Self-Learner (source)
2020-04-21 07:07:30 +0200 received badge  Notable Question (source)
2020-04-03 11:58:51 +0200 received badge  Popular Question (source)
2020-03-23 14:56:15 +0200 received badge  Famous Question (source)
2020-03-23 14:56:15 +0200 received badge  Popular Question (source)
2020-03-23 14:56:15 +0200 received badge  Notable Question (source)
2019-05-26 22:04:19 +0200 received badge  Famous Question (source)
2019-04-15 17:27:39 +0200 received badge  Popular Question (source)
2018-11-24 09:18:40 +0200 received badge  Notable Question (source)
2018-09-05 14:37:00 +0200 received badge  Popular Question (source)
2018-07-26 14:23:37 +0200 commented question How to show the output of print() in to jupyter notebook?

Since I use jupyter notebook in sagemath, probably from version 7.4, the outputs of print from jupter notebook are alway shown in terninal, not in jupyter notebook.

2018-07-22 07:46:50 +0200 commented question How to show the output of print() in to jupyter notebook?

run the following command in terminal. sage -n jupyter

2018-07-19 18:13:20 +0200 commented question How to show the output of print() in to jupyter notebook?

My operating system is MacOS 10.13.5 and My SageMage is installed by using sage-8.2-OSX_10.11.6-x86_64.app.dmg. I find that print command in jupyter notebook always output to terminal from sagemath 7.

2018-07-19 18:13:20 +0200 received badge  Commentator
2018-07-19 14:50:09 +0200 asked a question How to show the output of print() in to jupyter notebook?

In Sagemath's Jupyter Notebook, The output of print () always is showed into terminal. So for this reason, I can not get output of the functions such as graph_classes.Tree.description(). But in the anacanda's jupyter notebook for python, we can show the output of print() in jupyter notebook. How to solve the problem? Thanks.

2018-02-20 20:19:59 +0200 received badge  Notable Question (source)
2018-01-19 15:57:13 +0200 received badge  Popular Question (source)
2017-07-10 17:04:53 +0200 received badge  Popular Question (source)
2017-04-24 15:35:45 +0200 asked a question Why the value returned by read_data,open... are unavailable in Jupyter notebook

I run the following commands in code cell of jupyternotebook.

indata = tmp_filename()
 f = open(indata, "w")
 f.write("17\n42\n")
 f.close()
 l = read_data(indata, ZZ); l

And I get the following error message:

TypeError: 'NoneType' object is not iterable

But the result is output in terminal.

[I 21:15:07.797 NotebookApp] Saving file at /Untitled.ipynb
[17, 42]

How to solve this problem?

By the way: some functions such as "print", "tmp_filename" also can not output in Jupter notebook. These functions work well in old sage math notebook.

2017-04-22 12:03:52 +0200 received badge  Notable Question (source)
2017-03-25 01:45:53 +0200 answered a question Create a band matrix with repeating and alternating values

image description

2017-03-25 01:28:12 +0200 answered a question Create a band matrix with repeating and alternating values

image description

2017-03-24 15:10:53 +0200 answered a question Turning system of linear equations into a matrix

I give an answer for question 2. See the following : image description

The definition of GenerateMatrix is:

def GenerateMatrix(equsys, vars):
A=matrix([[equ.lhs().coefficient(v) for v in vars] for equ in equsys])
b=matrix([[equ.rhs()] for equ in equsys])
return (A,b)
2017-03-23 04:01:17 +0200 commented question sagemath notebook have no open ports

File "/Applications/SageMath-7.5.1.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sagenb/misc/misc.py", line 149, in find_next_available_port

raise RuntimeError, "no available port."

RuntimeError: no available port.

Starting Notebook in Terminal

2017-03-23 03:59:47 +0200 commented question sagemath notebook have no open ports

File "/Applications/SageMath-7.5.1.app/Contents/Resources/sage/src/bin/sage-notebook", line 234, in <module> launcher(unknown)

File "/Applications/SageMath-7.5.1.app/Contents/Resources/sage/src/bin/sage-notebook", line 74, in __init__ notebook(self.args, *self.kwds)

File "/Applications/SageMath-7.5.1.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sagenb/notebook/notebook_object.py", line 239, in __call__ return self.notebook(args, *kwds)

File "/Applications/SageMath-7.5.1.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sagenb/notebook/run_notebook.py", line 606, in notebook_run port = find_next_available_port(interface, port, port_tries)

2017-03-23 03:58:46 +0200 commented question sagemath notebook have no open ports

The following is system log:

Checking install location Checking existence of SageNB directory Starting Notebook ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 7.5.1, Release Date: 2017-01-15 │ │ Type "notebook()" for the browser-based notebook interface. │ │ Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ Please wait while the old SageNB Notebook server starts... The notebook files are stored in: sage_notebook.sagenb Traceback (most recent call last):

2017-03-21 03:06:40 +0200 commented question sagemath notebook have no open ports

My OS is macOS Sierra 10.12.3

Sagemath installed from pre-built binarie: sage-7.5.1-OSX_10.11.6-x86_64.app.dmg

The web browse can not be open whether click sws files or run " /Applications/SageMath-7.5.1.app"

But the jupyter notebook work well.

2017-03-20 08:32:14 +0200 asked a question sagemath notebook have no open ports

When I open a sws file in sagemath 7.5.1, I get the following error:

RuntimeError: no available port.

How to repair it.

By the way, is there some easily method to convert sws files to ipynb files.

Thanks.

2017-01-26 16:25:16 +0200 received badge  Enthusiast
2017-01-23 18:31:15 +0200 asked a question graph_editor doesn't work in jupyter notebook of sagemath

I want to use graph_editor to modify graphs. But when I run the code:

graph_editor(G)

there is no output.

2017-01-23 18:16:10 +0200 asked a question Is it possible to use greuler in sagemath?

greuler is graph theory visualization tool powered by d3 and on top of WebCola . Is it possible to use greuler in jupter notebook of sagemath? It looks very cool.

2017-01-20 17:01:12 +0200 answered a question How to install nbextensions for Jupyter notebook in Sagemath

I follow this post. which says :

sage -i openssl
sage -i pyopenssl

Then pip works again.

The reasons lead to such problems in the pose are figured out.

2017-01-19 13:57:21 +0200 commented question How to install nbextensions for Jupyter notebook in Sagemath

My OS is MacOS Sierra 10.12.2. I have installed Sage 7.3 from sage-7.3-OSX_10.11.6-x86_64.app.dmg. Those nbextension of Jupyter notebook can be installed normally and work well. After the Sagemath 7.4, 7.5.1 release, I try to update my sagemath to new version by installing from sage-7.?-OSX_10.11???app.dmg, Sagemath work normal. But I always fail while installing some packages such as those jupyter nbextensions. I have tried compile Sage from source, fail again and again.

Out of the sage shell environment. In the terminal, the pip install command run normally, no error about SSL is reported. But the nbextension still can not be installed for issue of permission.

What I can do next? Thanks.