ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 24 Jul 2022 13:45:52 +0200error interact in 9.6 on my computer but not on sagecellhttps://ask.sagemath.org/question/63387/error-interact-in-96-on-my-computer-but-not-on-sagecell/HI
The code with interact still generate the same error in SageMath 9.6 in my computer than in 9.5 but this code in SageCell don't produce any error , why ?
when I type version() on sagecell I got:
'SageMath version 9.6, Release Date: 2022-05-15' same as mine.
@interact
def _(v=('vector', input_grid(1, 3, default=[[1,2,3]], to_value=lambda x: vector(flatten(x))))):
print(v.norm())
TypeError: unable to find a common ring for all elements
[related to question 63362 make-pb-when-installing-from-source](https://ask.sagemath.org/question/63362/make-pb-when-installing-from-source/)ortolljSun, 24 Jul 2022 13:45:52 +0200https://ask.sagemath.org/question/63387/The performance speed of SageMath Cellhttps://ask.sagemath.org/question/62250/the-performance-speed-of-sagemath-cell/Hi. I'm thinking of embedding SageMath Cell into some personal webpage.
Does the calculation speed of SageMath Cell heavily depends on the performance or specs of personal computer?
If so, is there any way that I can improve the calculation speed of SageMath Cell server?
Thanks.
VibapSun, 01 May 2022 18:42:55 +0200https://ask.sagemath.org/question/62250/Is there a way to center a sagecell resulthttps://ask.sagemath.org/question/61538/is-there-a-way-to-center-a-sagecell-result/ I have some tables displayed in Sagecell but I do not know how to center them. Is there a way ?CyrilleThu, 17 Mar 2022 10:19:56 +0100https://ask.sagemath.org/question/61538/¿Cómo se puede pasar variables del script de sage en la plantilla html a otro script?https://ask.sagemath.org/question/56680/como-se-puede-pasar-variables-del-script-de-sage-en-la-plantilla-html-a-otro-script/Si existe la posibilidad de pasar las variables que se hacen dentro del
<script type="text/x-sage"></script>
a otro script como
<script type="text/javascript"></script>
quisiera saber cómo hacerlo. Muchas gracias.Jhon MinaSat, 17 Apr 2021 04:54:06 +0200https://ask.sagemath.org/question/56680/output options for sagecellhttps://ask.sagemath.org/question/56635/output-options-for-sagecell/I'm working on a project where one program communicates to a sagecell server to calculate certain formulas. I managed to use the web api of sagecell to compute requests but the problem is that the output is meant to be displayed and not further used by a program.
For the request:
a = solve(x^2 + 3*x + 2, x);
print(a)
I receive this output:
{
execute_reply: {
status: 'ok',
execution_count: 1,
user_expressions: {},
payload: []
},
success: true,
stdout: '[\nx == -2,\nx == -1\n]\n'
}
My question is now, is there a way to get something like a JSON output or anything else that is computer readable and does not require to be parsed?Philipp MTue, 13 Apr 2021 11:01:52 +0200https://ask.sagemath.org/question/56635/interact: different behavior concerning **kwargs in SageCell an Jupyter notebookhttps://ask.sagemath.org/question/56620/interact-different-behavior-concerning-kwargs-in-sagecell-an-jupyter-notebook/I'm trying to use the output of one interact as the input for number of control elements in a second interact. The following examle code works in Sage Jupyter notebook but fails in SageCell (Unfortunately I can't post a link to SageCell due to my low karma).
I don't understand why it fails and how I can make the code run in SageCell.
@interact
def f(s=slider([1,2], default=1)):
kwargs = { f"C_{i}": checkbox() for i in range(s)}
print(kwargs)
@interact(**kwargs)
def f2(**kwargs):
for key, value in kwargs.items():
print(f"{key} is {value}")
VittMon, 12 Apr 2021 01:35:24 +0200https://ask.sagemath.org/question/56620/Sagecell serverhttps://ask.sagemath.org/question/55829/sagecell-server/ Is it possible to know the location of the sagecell servers. Is there one in France ? And is there a possibility to tell what server should be used ?CyrilleTue, 23 Feb 2021 10:26:28 +0100https://ask.sagemath.org/question/55829/Sagecells linked cellshttps://ask.sagemath.org/question/53486/sagecells-linked-cells/ I need the help of some one who is used with sagemath cells. I have seen that in an html page sagemath cells can be linked.I hope this permit to not repeat the code cells after cells when you need a previous result (even if it is recalculated I think). But without exemple on github my nearly zero knowledge on js forbid me to try to manage this.
In advance thank to the one who will help me.CyrilleFri, 18 Sep 2020 09:55:59 +0200https://ask.sagemath.org/question/53486/I cannot seem to figure out what's wrong with the following Sage / Pari-GP codehttps://ask.sagemath.org/question/53388/i-cannot-seem-to-figure-out-whats-wrong-with-the-following-sage-pari-gp-code/Basically, I would like to search for counterexamples to my conjecture that
$$(2xy - \sigma(xy)) < (2x - \sigma(x))(\sigma(y) - y)$$
where $\sigma$ is the sum of divisors.
I tried using the following Pari-GP script in [Sage Cell Server](https://sagecell.sagemath.org/):
for(x=1, 100000, for(y=1, 100000, if(2*x*y-sigma(x*y) >= (2x-sigma(x))*(sigma(y)-y),print(x," ",y))))
However, it is returning the following error message:
*** syntax error, unexpected ')', expecting )-> or ',':
*** ...-sigma(x*y)>=(2x-sigma(x))*(sigma(y)-y),print(
*** ^---------------------
I did already check and verified that all the parentheses are in their proper places. I also checked for missing asterisks and verified that there are none.Jose Arnaldo Bebita-DrisThu, 10 Sep 2020 01:11:31 +0200https://ask.sagemath.org/question/53388/I cannot seem to figure out what's wrong with the following Sage / Pari-GP codehttps://ask.sagemath.org/question/52390/i-cannot-seem-to-figure-out-whats-wrong-with-the-following-sage-pari-gp-code/ Basically, I would like to search for primes $p$, and positive integers $y, z$ satisfying
$$y < z$$
and
$$1 + p^y < 2p^{2y-z}.$$
for(p=1, 10000, for(y=1, 10000, for(z=1, 10000, if(isprime(p) && y<z && 1+p^y<2p^(2y-z),print(p," ",y," ",z)))))
When I try to compile the above code using [Sage Cell Server](https://sagecell.sagemath.org/), it gives me the following error:
*** syntax error, unexpected ')': ...int(p," ",y," ",z)))))
*** ^-
Help | Powered by SageMath
I did already check and verified that all the parentheses are in their proper places.
Please help!Jose Arnaldo Bebita-DrisThu, 09 Jul 2020 15:13:09 +0200https://ask.sagemath.org/question/52390/Why does implicit multiplication not work in the Sage Cell Server?https://ask.sagemath.org/question/52060/why-does-implicit-multiplication-not-work-in-the-sage-cell-server/Hello, Sage Community!
Is there any reason for `implicit_multiplication(True)` not having any effect in SageCell? Is there any way of solving this?
Thanks in advance for your answers! dsejasWed, 17 Jun 2020 22:37:41 +0200https://ask.sagemath.org/question/52060/Find the coordinate vector of x with respect to the basis Bhttps://ask.sagemath.org/question/52021/find-the-coordinate-vector-of-x-with-respect-to-the-basis-b/ Find the coordinate vector of x=[2,3,4] with respect to the basis B={[1,2,3],[4,5,6],[7,8,9] with sagemath commands pls.
I know that we should first determine vector and than basis at the end this process we should use coordinate_vector but i couldn't help pleaseRagnarMon, 15 Jun 2020 18:51:58 +0200https://ask.sagemath.org/question/52021/Problem with simple Pari/GP script in Sage Cell Serverhttps://ask.sagemath.org/question/50508/problem-with-simple-parigp-script-in-sage-cell-server/I am trying to run the following Pari/GP script in Sage Cell Server:
for(x=1, 1000000, for(y=1, 1000000, if(floor((sigma(x)/y)+(sigma(y)/x))==2x-sigma(x),print(x," ",y))))
I cannot seem to figure out what is wrong with it.
I confirm that I am choosing the correct option in the drop-down menu (i.e., GP).
I am getting the following error message:
*** expected character: ',' or ')' instead of: ...ma(x)/y)+(sigma(y)/x))==2
*** x-sigma(x),print(x," Jose Arnaldo Bebita-DrisSat, 04 Apr 2020 12:56:40 +0200https://ask.sagemath.org/question/50508/Sage won't plot more than two plainshttps://ask.sagemath.org/question/50153/sage-wont-plot-more-than-two-plains/ Hello, Sage community!
I have the following code that shows the solution of a 3x3 system of equations as an interact:
A = matrix(RR, 3, 3, [2,1,1,1,-2,1,1,3,-2] )
var('x y z')
@interact
def sol_3ecu_3inc(k1 = slider(-5, 5, 0.1, -1), k2 = slider(-5, 5, 0.1, -2), k3 = slider(-5, 5, 0.1, -3)):
bvec = vector(RR, [k1, k2, k3])
xvec = A \ bvec
augmented_matrix = A.augment(bvec, subdivide=True)
RADIUS = 6
myplot = implicit_plot3d(2*x + y + z == k1, (x,-RADIUS,RADIUS), (y,-RADIUS,RADIUS), (z,-RADIUS,RADIUS), color='red', opacity=0.1)
myplot += implicit_plot3d(x - 2*y + z == k2, (x,-RADIUS,RADIUS), (y,-RADIUS,RADIUS), (z,-RADIUS,RADIUS), color='yellow', opacity=0.1)
myplot += implicit_plot3d(x + 3*y - 2*z == k3, (x,-RADIUS,RADIUS), (y,-RADIUS,RADIUS), (z,-RADIUS,RADIUS), color='blue', opacity=0.1)
myplot += point3d((xvec[0], xvec[1], xvec[2]), color='black', size=100)
myplot += line3d([(-RADIUS,0,0), (+RADIUS,0,0)], thickness=3, color='orange')
myplot += line3d([(0,-RADIUS,0), (0,+RADIUS,0)], thickness=3, color='orange')
myplot += line3d([(0,0,-RADIUS), (0,0,+RADIUS)], thickness=3, color='orange')
show(myplot)
The result should look like this:
![image description](/upfiles/15832859699420292.png)
When I run this code in CoCalc or my own SageMath local installation, it works perfectly. However, if I try to execute this in `sagecell.sagemath.org`, Sage won't be willing to plot this. However, if I delete one the `implicit_plot3d` commands, the plot magically appears.
Can somebody explain this? Is this reproducible for other users?dsejasWed, 04 Mar 2020 02:42:24 +0100https://ask.sagemath.org/question/50153/Mixing GP and @interact in one cellhttps://ask.sagemath.org/question/49508/mixing-gp-and-interact-in-one-cell/ What's wrong with my code? It doesn't work inside Sage Cell.
gp("""
square(x)=x^2;
""")
@interact
def _(x=2):
print(square(x))
When I press evaluate button code runs forever with no output at all. I can't figure out what is the problem.PedjaSat, 11 Jan 2020 19:03:01 +0100https://ask.sagemath.org/question/49508/DeprecationWarning on SageCell (Python 3)https://ask.sagemath.org/question/49335/deprecationwarning-on-sagecell-python-3/this code was ok few months ago but ko now, I suppose because of the missing parenthesis around the string:
I need to write print (" caracteristic polynomial p(x)") ?, it stop running now. is it possible to update a sagecell code keeping the same link ?, or need I change the link and in this case is it possible to delete the old code ?
<input>:60: DeprecationWarning: invalid escape sequence \d
File "<ipython-input-1-89c4ce1b89cc>", line 85
print " caracteristic polynomial p(x)"
[code on sage cell](https://sagecell.sagemath.org/?z=eJytW2ty20iS_o9T1FLRIYAviZTb3attdIfaY894LaltSfRyW5QYEFEk0QQBGA9RHIU29u9eY2IusFfYo8xJ9st6AAWSlt0zQ4dJoCozqyrflVVK3CPrfOk9uP1Wctu3LGuPvfUidpnzlZfm7E2cLovQa7N4waZxyhL3wfL5lGAu7aidOMcWwyeYsugHt99MjoE_DdIsJ2jCZHc8jFdsEhdRzvI5Z6s49TO2CvI588KQZfxTwaMJz1g8BVS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-MZHqNhI6W_O65MYrb1O5J5BDQinZLU9OqgSD7g7ICPMZkqOQT3N7dMdnQfTopam3fnpMn0aWmPGL1kLFHf0qRqw19Dcbjp4oTsG2FLmRuFQgfeJ2yB66yu_W8q0zqYcUMGmFRuyWkdSlZnX-ppo2juGeysjVICpq_0AHuGEcL4j1JOdGTX7b4qNIaEiQ-PH0aPDiSYiy1PRGe-f2eOPz96kMK-9OwdUJPYQpJW6_jWX9ViwTaVanwTLIlS7LozIvo6tuUrXEodr7V_tIxJBep2uGFDudiguvI-tO3RcMBQnQWnEYvTILX_0lwVHjs2mXBOgbNFZxEfqIVOLcLhRuAixN5sG4z1y5yt7T45FMz6Qe6sa-VpvbRwPwiT1KuCOBkn1K88c-4YsnPLSwjv63CvVpA7elONv_mvH6AgdfBPwPjGoMK5cqT5NZr_vdty--_-67ly9f9l-8fPmvR59JtSS3tOIH2rah5-LKlUq8xK059-H2iHX6D7d9jPnAOj1xsVYrTc4yzpcS_ySc8bvUU9pCROOYLQsoMYlb_nWGlni_zBKAzxJvxln_8Fsa-OpPr9nPv_zyjv3yhp0Pzn5-fXHZZv8ezyP2py57FUcrb83-9t9_YRewDrrw8a7L_lisq6xD1PKPDw5Wq1X3LvQmi1WQ8i5mcPBfd7_Fqe9FB1dz3vkZ9tqJpx15mSLrJv5U3aCnzaK-RK9okhLLKyhwp2719wXkwr2oKh0oBUXoiYGxYQ2ymPLVsVdAe9H7sMh-ifjYi1w7K5Yi9r67PmwfyzttJLNxAhzbOai6ezu6JcFTV8zRNgm3Fy6cRBAF-do4LP17_IlLQYid7r5p9_9Z8RXa&lang=sage&interacts=eJyLjgUAARUAuQ==)
^
SyntaxError: invalid syntaxortolljFri, 03 Jan 2020 11:00:05 +0100https://ask.sagemath.org/question/49335/IPython.display.clear_output() functionality for SageMathCell.https://ask.sagemath.org/question/48932/ipythondisplayclear_output-functionality-for-sagemathcell/ I have a loop which outputs a graphic object (a plot) for each step. But I would like to replace the plot with the plot from the next iteration so I can see the progress as the loop runs. When I am using a jupyter notebook I can do this using the clear_output() function from IPython.display.
However, I am trying to use the SageMathCell server to make the program able to run completely in the browser (without having to go through CoCalc). But I am trouble clearing the output in the sage cell after each iterate of a loop..
metallicmural99Tue, 03 Dec 2019 17:12:08 +0100https://ask.sagemath.org/question/48932/linked and dynamical cellshttps://ask.sagemath.org/question/32090/linked-and-dynamical-cells/I create cells dynamically on a button click. I would like to use these cells on the same kernel (linked property in make Sagecell), but this does not work. Why?
In cells created on page load("static cells") this works fine.felipexTue, 05 Jan 2016 20:14:30 +0100https://ask.sagemath.org/question/32090/sage cell difference between Permanent and short linkhttps://ask.sagemath.org/question/47934/sage-cell-difference-between-permanent-and-short-link/Hi
what is the difference on sage cell between Permalink and Short temporary link
does it mean that Short temporary link will be able to be used only a short period of time as its name suggests ?
in the case of short temp lnk, how long the link will remain valid ?
I suppose that if the server restart the short link does not exist anymore ?
Permalink is not usable in Youtube comment, there are characters that are not accepted for a link and the link's length is insane .ortolljMon, 16 Sep 2019 09:41:27 +0200https://ask.sagemath.org/question/47934/Internal server errorhttps://ask.sagemath.org/question/47924/internal-server-error/Hi
**tired of getting this damned :
Internal server error
system error log is recorded, error will be fixed as soon as possible
please report the error to the site administrators**
when I try to ask a question on ask.sagemath.orgortolljSun, 15 Sep 2019 22:22:14 +0200https://ask.sagemath.org/question/47924/Is there a package for sagecell ?https://ask.sagemath.org/question/45697/is-there-a-package-for-sagecell/ I was trying to install sagecell on an ubuntu 18.04 machines for few days now... very frustrating...
sagecell install seems to reinstall the entire sage suit and then fails on this or that.
Is there another way? Some pre-prepared apt/pip package that only installs sagecell on top of the already existing cell installation?
Thanks,
Orenorenshani7Thu, 07 Mar 2019 11:03:41 +0100https://ask.sagemath.org/question/45697/problems with sagecellhttps://ask.sagemath.org/question/45641/problems-with-sagecell/Hi All,
I installed sagemath on Ubuntu 18.04 and am now trying to install and configure sagecell
pip install sagecell seem to work ok, but when I try to run sagecell it says:
root@shilo-ubu4:/var/tmp# sagecell
Error: No module named 'fabric'. You can install it by typing:
sudo pip install fabric
or
su -c "pip install fabric"
And yet fabric is installed:
root@shilo-ubu4:/var/tmp# pip install fabric
Requirement already satisfied: fabric in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: paramiko>=2.4 in /usr/local/lib/python2.7/dist-packages (from fabric)
Requirement already satisfied: invoke<2.0,>=1.1 in /usr/local/lib/python2.7/dist-packages (from fabric)
Requirement already satisfied: cryptography>=1.1 in /usr/lib/python2.7/dist-packages (from fabric)
Requirement already satisfied: pynacl>=1.0.1 in /usr/local/lib/python2.7/dist-packages (from paramiko>=2.4->fabric)
Requirement already satisfied: pyasn1>=0.1.7 in /usr/lib/python2.7/dist-packages (from paramiko>=2.4->fabric)
Requirement already satisfied: bcrypt>=3.1.3 in /usr/local/lib/python2.7/dist-packages (from paramiko>=2.4->fabric)
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from pynacl>=1.0.1->paramiko>=2.4->fabric)
Requirement already satisfied: cffi>=1.4.1 in /usr/local/lib/python2.7/dist-packages (from pynacl>=1.0.1->paramiko>=2.4->fabric)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.4.1->pynacl>=1.0.1->paramiko>=2.4->fabric)
So what am I missing here?
Thanks,
Oren
orenshani7Mon, 04 Mar 2019 13:19:11 +0100https://ask.sagemath.org/question/45641/Acces other cells from within other cellshttps://ask.sagemath.org/question/45120/acces-other-cells-from-within-other-cells/Is it possible?
For example, i have a function in 1 cell.
Is it possible to access it from other cell? thethaMon, 21 Jan 2019 14:40:20 +0100https://ask.sagemath.org/question/45120/Sagecell with code hosted in GitHubhttps://ask.sagemath.org/question/42115/sagecell-with-code-hosted-in-github/I would like to embed a Sage Cell in a webpage whose content comes from a GitHub `.py` file, so that changes in this file are immediately shown in the webpage. I have tried to use `javascript` / `jquery` like this (with the standard scripts in the head) and with some variations:
<div class="sage"><script type="text/x-sage" id="sage1"></script></div>
<script>$('#sage1').load("https://rawgit.com/path_to_the_file.py");</script>
and it sometimes work, but not always. I guess it has to do with the order of all the scripts involved in the process. Which would be the most appropiate and clean way to inject such code in a Sage Cell?
**EDIT:** I would like to show the input cell together with the input code, for educational purposes. So the content of the input cell has to be replaced with the content of the `.py` file.jepstraSat, 21 Apr 2018 17:51:40 +0200https://ask.sagemath.org/question/42115/Implicit Plot 3D - ThreeJShttps://ask.sagemath.org/question/41517/implicit-plot-3d-threejs/ I'm trying to plot several algebraic surfaces, most of which have singularities and other especial properties. Using `implicit_plot3d` and `viewer='threejs'` works fine for instance
var('x,y,z')
p=x^3+y^3+z^3+1-0.25*(x+y+z+1)^3
r=5
color='aquamarine'
s = implicit_plot3d(p==0, (x,-r,r), (y,-r,r), (z,-r,r), plot_points=50, region=lambda x,y,z: x**2+y**2+z**2<=r*r, color=color)
s.show(frame=False, viewer='threejs')
But when increasing `plot_points=100`, SageCell does note return any output ([demo](https://sagecell.sagemath.org/?z=eJw9jrEOwiAURfcm_Qc2aMGmtXExvtXPsEFFxdCCj6rA14saHe7JGe5wHhIZDSKKRKuycBB2PY95Ka9btM1yVbPAI0-8q3Z9WSCsyuJgjUWg8naXo0Q9KVoWngDRozP6oOfBGTv3R-YAWkFYEAsUWGWLf0s_e18HZ_U0e-jafEd11nYCI8f9UZJP2pqEul7y-EbK2ADWKMg348Pc7ht_sU92Qjkq2ErjlSAPrZ4ql84XVOrqafUCywVItg==&lang=sage)) (in a Sage Notebook, everything works fantastic). I guess the query may be too hard for SageCell...
Is there a way to optimize the code / query for SageCell to plot algebraic surfaces with acceptable quality?jepstraTue, 13 Mar 2018 11:11:37 +0100https://ask.sagemath.org/question/41517/Can we read local file from Sagecellhttps://ask.sagemath.org/question/39291/can-we-read-local-file-from-sagecell/ Can we read local file from Sagecell?
I work with SageMathCell embedded on blog.NiyamabrataFri, 27 Oct 2017 16:01:43 +0200https://ask.sagemath.org/question/39291/REST API for SageMathCell / SageCellhttps://ask.sagemath.org/question/40659/rest-api-for-sagemathcell-sagecell/ Hi All,
I spun up my own SageCell and now I want to be able to execute commands get responses via a REST API (or SOAP API).
How can I do this? There don't seem to be any docs on this.
Thanks
bragac2Wed, 17 Jan 2018 19:12:20 +0100https://ask.sagemath.org/question/40659/Mixing %cython and @interact in one cellhttps://ask.sagemath.org/question/40417/mixing-cython-and-interact-in-one-cell/I'm trying to make an interactive applet to visualize the Mandelbrot Set, much in the way of the implementation of interactive fractals (wiki.sagemath.org/interact/fractal#Exploring_Mandelbrot - cannot copy full link because of not enough karma ;-))
But I'd like to embed the applet in a webpage using SageMathCell, and for this all the code must be encapsulated in just one cell, something in the following scheme
%cython
def function(...)
...
@interact
...
Unfortunately, `%cython` and `@interact` behave badly together, because the latter is unknown to the former (just try to join the code in the two cells of the example above or try the following minimal working example
%cython
def square(float x0):
return x0*x0
@interact
def _(x0=-2.5):
print(square(x0))
which, surprisingly enough, raises different errors in a online Sage Cell and in a Sage Notebook Cell)
Which would be the smartest way to mix everything up? Any suggestion is highly appreciated.jepstraMon, 01 Jan 2018 14:03:14 +0100https://ask.sagemath.org/question/40417/how to print the printout not too long on Sagecellhttps://ask.sagemath.org/question/39240/how-to-print-the-printout-not-too-long-on-sagecell/I try to printout this.
myList = []
for i in range (64):
myList.append(i)
print myList
Result:
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]
What i need is like below
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]
Someone help me pls...NiyamabrataSat, 21 Oct 2017 17:01:06 +0200https://ask.sagemath.org/question/39240/how can SageCell read text file from url?https://ask.sagemath.org/question/39295/how-can-sagecell-read-text-file-from-url/How can SageCell read text file from url?
I work on SageCell. I will read input from text file i put on http/https.NiyamabrataFri, 27 Oct 2017 19:01:19 +0200https://ask.sagemath.org/question/39295/