ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 16 Jul 2020 15:57:04 -0500Smoother Derivations of Hicksian Demands in Sagehttps://ask.sagemath.org/question/52490/smoother-derivations-of-hicksian-demands-in-sage/The problem I'm solving is an economics one relating to solving for hicksian demands,[given my difficulty solving for them directly](https://ask.sagemath.org/question/52479/solve-not-working-for-expenditure-minimization-problem-in-sage/), Im trying to tackle this same problem indirectly and it works for the most part however I'd like it to run smoother.
Setting up the problem we have:
x1, x2, l, p1, p2, a, b, R= var('x1, x2, l, p1, p2, a, b, R')
U = x1^a*x2^b
m = p1*x1+p2*x2;
L = U+ l * (R-m);
dLdx = L.diff(x1);
dLdy = L.diff(x2);
dLdl = L.diff(l);
solve([dLdx == 0, dLdy == 0, dLdl == 0], x1, x2, l)
Out: [[x1 == R*a/((a + b)*p1), x2 == R*b/((a + b)*p2), l == (a + b)*(R*a/((a + b)*p1))^a*(R*b/((a + b)*p2))^b/R]]
I then manually plug in the values for $x_1$ and and $x_2$ into $U$ to get the indirect utility function and solve for the expenditure function:
expend=solve(U==(R*a/((a + b)*p1))^a*(R*b/((a + b)*p2)^b),R);expend
Out: [R == ((a + b)*p2)^b*x1^a*x2^b/(b*(R*a/((a + b)*p1))^a)]
I again need to plug in this exact functional form to get the hicksian demands using shephard's lemma:
expend1=((a + b)*p2)^b*x1^a*x2^b/(b*(R*a/((a + b)*p1))^a)
expend1.diff(p1) #the hicksian demand for x1
Out: ((a + b)*p2)^(b - 1)*(a + b)*x1^a*x2^b/(R*a/((a + b)*p1))^a
expend1.diff(p2) #the hicksian demand for x2
Out: ((a + b)*p2)^(b - 1)*(a + b)*x1^a*x2^b/(R*a/((a + b)*p1))^a
I'm interested in getting my code to run more parsimoniously as I find myself having to manually pull out solved values to move to next stages of the problem. This is frustrating because I'd have to do this each time if i change my functional form.
**Note:** I see that this method actually does not work as I didnt notice `R` on the Left hand side of this problem.EconJohnThu, 16 Jul 2020 00:04:52 -0500https://ask.sagemath.org/question/52490/Unknown exponents causing problem to not be solvedhttps://ask.sagemath.org/question/52516/unknown-exponents-causing-problem-to-not-be-solved/Right now im trying to solve one of the problems i've encountered using sage and it seems like im onto something. However I've encountered a kink at `step3` in my code.
x1, x2, l, p1, p2, a, b, R= var('x1, x2, l, p1, p2, a, b, R')
U = x1^a*x2^b
m = p1*x1+p2*x2;
L = m+ l * (R-U);
dLdx = L.diff(x1);
dLdy = L.diff(x2);
dLdl = L.diff(l);
step1=solve([dLdx == 0, dLdy == 0, dLdl == 0], p1, p2, R)
step2=solve(step1[0][0].rhs()/step1[0][1].rhs()==p1/p2,x1)
step3=solve(U.subs(step2)==R,x2)
step3
Out: x2^b == R/(a*p2*x2/(b*p1))^a
being that I want to isolate `x2` im not sure why its power `b` is not just moved over.
why is this the case?
----------
Note: The following code works
x1, x2, l, p1, p2, a, b, Ubar= var('x1, x2, l, p1, p2, a, b, Ubar')
assume(x1>0,x2>0,a>0,b>0)
U = x1*x2
m = p1*x1+p2*x2;
L = m+ l * (Ubar-U);
dLdx = L.diff(x1);
dLdy = L.diff(x2);
dLdl = L.diff(l);
step1=solve([dLdx == 0, dLdy == 0, dLdl == 0], p1, p2, Ubar)
step2=solve(step1[0][0].rhs()/step1[0][1].rhs()==p1/p2,x1)
step3good2=solve(U.subs(step2)==Ubar,x2)
step4good1=solve(step2[0].subs(step3Good2),x1)
step3good2
Out: [x2 == sqrt(R*p1/p2)]
step4good1
Out: [x1 == sqrt(R*p1/p2)*p2/p1]
This works because I'm considering a case where our utility function has no exponents `a` and `b`. What am I missing from my code?EconJohnThu, 16 Jul 2020 15:57:04 -0500https://ask.sagemath.org/question/52516/how to get y component of bezier control points?https://ask.sagemath.org/question/49460/how-to-get-y-component-of-bezier-control-points/ or is there a utility in `sage` that returns the bezier control points of a curve given that curve?
im writing a program that takes a curve in polynomial form and returns those control points, this is the part in question:
def bezierControlPoints(poly):
a = sage.var('a')
b = sage.var('b')
c = sage.var('c')
d = sage.var('d')
t = sage.var('t')
bezier = ((1 - t) ** 3) * a + 3 * ((1 - t) ** 2) * t * \
b + 3 * ((1 - t) * (t ** 2)) * c + (t ** 3) * d
eqn1 = poly.substitute(t=0)
eqn2 = poly.substitute(t=.33)
eqn3 = poly.substitute(t=.66)
eqn4 = poly.substitute(t=1)
cb1 = bezier.substitute(t=0)
cb2 = bezier.substitute(t=.33)
cb3 = bezier.substitute(t=.66)
cb4 = bezier.substitute(t=1)
solns = sage.solve([eqn1 == cb1, eqn2 == cb2, eqn3 == cb3,
eqn4 == cb4], a, b, c, d, solution_dict=True)
return [[s[a].n(30), s[b].n(30), s[c].n(30), s[d].n(30)] for s in solns]
but the control points are coordinates, and this returns single numbers like coefficients. for example
f(x) = x^4 - 10*x^3 + 35*x^2 - 50*x + 24
returns
[24.000000, 3.8069265, -4.2949254, -0.30555556]
[-0.30555556, 0.85185185, 0.85185185, -0.30555556]
[-0.30555556, -1.3680046, -1.2661527, 0.00000000]
so how do i finish processing these portions of the control points?
**background**
the parts of the program i have written that i didnt share take the polynomial of arbitrary order, break it up into simpler subcurves, parameterize those subcurves, and those parameterized subcurves are the arguements of the `bezierControlPoints()`, which is called iteratively depending on the order of the polynomial.
alienfetuseaterWed, 08 Jan 2020 21:36:39 -0600https://ask.sagemath.org/question/49460/simple script gives "ValueError: element is not in the prime field"https://ask.sagemath.org/question/48794/simple-script-gives-valueerror-element-is-not-in-the-prime-field/ I have a very simple script that does not work. It is the following.
for a in range(1,r):
for b in range(1,r):
g=a+b*x^2+x^4
if g.is_irreducible():
K.<a>=FiniteField(r^4, name='a', modulus = g)
if a^l != 1:
print("hooray")
Here l is defined somewhere else, but that is not what gives the error I think. I think the error occurs when sage goes over the line "K.<a>=FiniteField(r^4, name='a', modulus = g)", because maybe the line "g=a+b*x^2+x^4" does not work? If I do this script manually without the for loops, by just assigning some values to a and b, then it works fine.
bashaadMon, 18 Nov 2019 07:02:03 -0600https://ask.sagemath.org/question/48794/Different results with for loop and while loophttps://ask.sagemath.org/question/48767/different-results-with-for-loop-and-while-loop/ While writing a Sage script, I ran into a strange case where code worked correctly with specific constants, but when I looped over them in a `for` loop, it no longer worked. After trying this and that, I found that a `while` loop did not have this problem! As this felt very strange, recording the question here as a possible "gotcha".
Here's the code:
var('z')
from collections import defaultdict
p = defaultdict(dict)
N = 30
for h in range(N): p[0][h] = z**h
def fill(w):
for h in range(N - w):
p[w][h] = w/(w+h)*p[w-1][h+1] + h/(w+h)*(p[w][h-1] if h>=1 else 0)
## This doesn't work:
# for w in range(1, N): fill(w)
## Instead we need the below:
w = 1
while w < N:
fill(w)
w += 1
In short, the problem is that `for w in range(1, N): ...` results in all zero polynomials, while `w = 1; while w < N: ...` does not.
ShreevatsaRFri, 15 Nov 2019 16:35:56 -0600https://ask.sagemath.org/question/48767/Sending parametershttps://ask.sagemath.org/question/48695/sending-parameters/ Hi, how are you? I would like to know if there is any way to send parameters to a sage script.kevinSun, 10 Nov 2019 23:54:14 -0600https://ask.sagemath.org/question/48695/loaded file not foundhttps://ask.sagemath.org/question/46157/loaded-file-not-found/I am trying to load a python script into sage notebook, with commands load('file.py'), and attach('file.py').
But I am getting the error: `IOError: did not find file`
The file is there! I am using sage 8.6 on Windows 10.
sage: load('C:\\Program Files (x86)\\MyJournal\\Images\\functions.py')
**UPDATE** Sage loads the file from my home directory.
I seems that Sage just does not have access to Program Files directory.
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-104-057b25088154> in <module>()
----> 1 load('C:\\Program Files (x86)\\MyJournal\\Images\\functions.py')
/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/misc/persist.pyx in sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2470)()
134
135 if sage.repl.load.is_loadable_filename(filename):
--> 136 sage.repl.load.load(filename, globals())
137 return
138
/opt/sagemath-8.6/local/lib/python2.7/site-packages/sage/repl/load.py in load(filename, globals, attach)
233 break
234 else:
--> 235 raise IOError('did not find file %r to load or attach' % filename)
236
237 ext = os.path.splitext(fpath)[1].lower()
IOError: did not find file 'C:\\Program Files (x86)\\MyJournal\\Images\\functions.py' to load or attachMathF13Sun, 14 Apr 2019 07:16:06 -0500https://ask.sagemath.org/question/46157/How to create a "sage program" with command line inputhttps://ask.sagemath.org/question/44708/how-to-create-a-sage-program-with-command-line-input/I am completely new to Sage and Pyhton, so this is probably a very trivial question, but I am not able to find any answer. I have a file script.sage
N=10
sage_command1
sage_command2
sage_command3
print(result)
I use this script via `sage script.sage` and it does what I want. How can I modify this so that I can pass the variable `N` in the command line? Something like `sage script.sage 10` and then it prints the result.
Thank you!RiccardoTue, 18 Dec 2018 16:35:35 -0600https://ask.sagemath.org/question/44708/Running sage / cocalchttps://ask.sagemath.org/question/42284/running-sage-cocalc/ I don't know if this is the place but I'm confused as to how to run a sage program. I'm told that there's not really a sage editor or whatnot does cocalc allow you to write an entire program and then run it or does it autorun any command entered into it?standardtrickynessMon, 07 May 2018 10:07:37 -0500https://ask.sagemath.org/question/42284/How can I display a plot from a script?https://ask.sagemath.org/question/37719/how-can-i-display-a-plot-from-a-script/If I type
plot(x^2, (x,-2,2))
in sage, I get the expected plot, displayed as a png file by my default image viewer. If instead I put the line
plot(x^2, (x,-2,2)).show()
in a file test.sage and run
sage test.sage
from the command line, I get
Graphics object consisting of 1 graphics primitive
typed on the command line, but no displayed plot.
How do I display a plot from a script?
millermjSat, 27 May 2017 13:37:44 -0500https://ask.sagemath.org/question/37719/scripting (jupyter) notebookshttps://ask.sagemath.org/question/36875/scripting-jupyter-notebooks/Is there a way to execute a notebook file from the command line and automatically run all cells?
I am looking for something like
<pre>
sage -n jupyter --no-browser --script test1.ipynb
</pre>
however, `--script` is deprecated and `--no-browser` doesn't stop sage from opening a browser window for me. Worse yet, the cells in the notebook are not executed automatically either.
Background: My aim is to automatically run a set of different sage notebooks (which are basically scripts to generate data files) in a directory, similar to how you would compile various source files to binaries. The notebooks are a collaborative effort and in a version control system and every developer would be able to generate those data files locally on their machine by running some shell script or through a Makefile.
BjörnThu, 09 Mar 2017 04:27:32 -0600https://ask.sagemath.org/question/36875/using patches in sagemathhttps://ask.sagemath.org/question/36258/using-patches-in-sagemath/I would like to use patches in my sagemath scripts, along with certain library imports - as one does in python - but I am finding it hard to learn how to do this.
Can anyone assist in this regards? fieldofnodesWed, 11 Jan 2017 15:14:09 -0600https://ask.sagemath.org/question/36258/How to speed up running SageMath programshttps://ask.sagemath.org/question/34528/how-to-speed-up-running-sagemath-programs/I am writing a SageMath program that I want to run from within the editor (I use Atom editor, with a plugin that enables me to run sage). Whenever I run a script, it takes about 1.5 seconds, even if the script only writes "hello world". In contrast, when I run the same script using Python, it takes only 0.04 seconds.
is there a way to run SageMath scripts faster?Erel Segal-HaleviFri, 19 Aug 2016 06:03:14 -0500https://ask.sagemath.org/question/34528/R interpreter $ with forecastshttps://ask.sagemath.org/question/25379/r-interpreter-with-forecasts/Hi,
I'm trying to use the R interpreter in sage for a script I'm running that makes use of both sage and R.
I'm coming across a problem in the sagemath R interpreter where I am trying to perform the following (R script):
library(forecast)
data <- AirPassengers
data <- log(data)
ARIMA <- arima(data, order = c(1, 0, 1), list(order = c(12,0, 12), period = 1))
fc<-forecast(ARIMA,h=24)
fc\$mean<-exp(fc\$mean)
fc\$upper<-exp(fc\$upper)
fc\$lower<-exp(fc\$lower)
fc\$x<-exp(fc\$x)
Namely, I am trying to "unlog" an R forecast and then plot it. I'm finding I cannot perform the last step in sage. I don't think the "\$" operator works in sage, so I am using the other reference method fc['"x"'] = r.exp(fc['"x"']) but I get an error saying this value is not able to be assigned to. Anyone know how to get around this, or what the equivalent to the "\$" operator would be in the sage r interpreter?
joelmacFri, 02 Jan 2015 13:10:01 -0600https://ask.sagemath.org/question/25379/Implementing PARI/GP scriptshttps://ask.sagemath.org/question/23138/implementing-parigp-scripts/ Hello, I have the following `gp` script which I would like to use in SAGE.
Script: http://pages.cs.wisc.edu/~yeoh/nt/satoh-fgh.gp
Description: http://pari.math.u-bordeaux.fr/archives/pari-users-0011/msg00005.html
This script is used to find cardinality of an elliptic curve over binary fields. I've also taken a look at
http://trac.sagemath.org/ticket/11548
but was unable to implement either.
I thought that just copying and pasting the codes would enable me to call the functions used, but I was wrong. I'm using SAGE on VirtualBox on Windows. Any help will be appreciated!BlackadderSun, 29 Jun 2014 20:01:58 -0500https://ask.sagemath.org/question/23138/@fork decorator not recognized in scripthttps://ask.sagemath.org/question/10628/fork-decorator-not-recognized-in-script/I'm trying to run a test script with the @fork decorator, but it isn't being recognized. The script looks like this:
#!/home/raltman/sage-5.10/sage
@fork
def f(a):
return a;
out=f("hi");
print out;
When I run this, I get the following error message:
> Traceback (most recent call last):
> File "/home/raltman/test.sage", line
> 3, in <module>
>
>@fork
>
>NameError: name 'fork' is not defined
The same code works when I run it in the sage console, and the script itself works without the @fork decorator. I'd really appreciate any help on this!R AltmanFri, 18 Oct 2013 23:42:38 -0500https://ask.sagemath.org/question/10628/Sage error in batch jobhttps://ask.sagemath.org/question/10608/sage-error-in-batch-job/I'm trying to submit an LSF batch job containing a Sage script on a cluster, but in the output file I'm receiving the following Sage error:
> Unhandled SIGILL: An illegal
> instruction occurred in Sage. This
> probably occurred because a *compiled*
> component of Sage has a bug in it and
> is not properly wrapped with sig_on(),
> sig_off(). You might want to run Sage
> under gdb with 'sage -gdb' to debug
> this. Sage will now terminate.
>----------
>/home/raltman/sage-5.10/local/bin/sage-python:
> line 2: 29634 Illegal instruction
> (core dumped) sage -python "$@"
On the other hand, running the script on its own without submitting it as a job works perfectly.
I'm not sure what this "illegal instruction" is referring to. The "@" makes me recall that I used the @parallel decorator in my script, but I have no idea if this is in any way related. Can anyone please help me out?R AltmanMon, 14 Oct 2013 22:49:01 -0500https://ask.sagemath.org/question/10608/Using Sage in a Python CGI scripthttps://ask.sagemath.org/question/8215/using-sage-in-a-python-cgi-script/I am writing cgi scripts in python that use sage. I have been researching for weeks and even the python and sage websites say use: "from sage.all import *" in your python script, and have "#!/usr/bin/env sage -python" as the first line of the script.
Here is the exact quote from sagemath faq on what to do:
"
The following standalone Sage script factors integers, polynomials, etc:
#!/usr/bin/env sage -python
import sys
from sage.all import *
if len(sys.argv) != 2:
print "Usage: %s <n>"%sys.argv[0]
print "Outputs the prime factorization of n."
sys.exit(1)
print factor(sage_eval(sys.argv[1]))
In order to use this script, your SAGE_ROOT must be in your PATH."
I made the cgi file exactly as is, and put onto my web server (Apache running CentOS), with sage and python installed. When I try to run this file (named factor.cgi) through the bash terminal I do:
$ ./factor.cgi 2006
/usr/bin/env: sage -python: No such file or directory
Any help on what I should do to make this script work would be appreciated.randomness431Thu, 07 Jul 2011 10:19:00 -0500https://ask.sagemath.org/question/8215/running sage from a Python scripthttps://ask.sagemath.org/question/9733/running-sage-from-a-python-script/I'm using sage 5.5 on ubuntu 12.04. I'm trying to run sage via the following script
#!/usr/bin/env sage -python
import sys
from sage.all import *
sigma = 10
z = var('z')
m0 = 128
P = exp(-(1/2)*z**2/sigma**2)/(sqrt(2*pi)*sigma)
m = m0*exp(-(1/2)*z**2)
mb = m0/sqrt(1+sigma**2)
f = lambda u: 1-2*(numerical_integral(u*P*m**2/(mb*(u*mb+(1-u)*m)), 0, Infinity))[0]
print find_root(f, 0.1, 1, rtol=0.01)
I run this from the command line with
> sage -python runDispK1.py
and I get the following error
Warning: invalid value encountered in absolute
Warning: invalid value encountered in absolute
Warning: invalid value encountered in absolute
Warning: invalid value encountered in absolute
Warning: invalid value encountered in absolute
Traceback (most recent call last):
File "runDispK1.py", line 16, in <module>
print find_root(f, 0.1, 1, rtol=0.01)
File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/numerical/optimize.py", line 108, in find_root
raise RuntimeError, "f appears to have no zero on the interval"
RuntimeError: f appears to have no zero on the interval
Whereas if I run the exact same code within sage, e.g. I have a file called run.sage with this text in it:
sigma = 10
z = var('z')
m0 = 128
P = exp(-(1/2)*z**2/sigma**2)/(sqrt(2*pi)*sigma)
m = m0*exp(-(1/2)*z**2)
mb = m0/sqrt(1+sigma**2)
f = lambda u: 1-2*(numerical_integral(u*P*m**2/(mb*(u*mb+(1-u)*m)), 0, Infinity))[0]
print find_root(f, 0.1, 1, rtol=0.01)
then sage gives me the correct answer
sage: load("run.sage")
0.550279773862
Is there something I'm missing here? I'm new to sage and python scripting but it seems the numerical_integral function is returning nothing useful, so I are these functions created incorrectly?
Thanks
colin_tTue, 22 Jan 2013 04:36:49 -0600https://ask.sagemath.org/question/9733/Build for 4.8 can't find spkg-install script, setup.py, or configure scripthttps://ask.sagemath.org/question/8967/build-for-48-cant-find-spkg-install-script-setuppy-or-configure-script/The compilation (on Ubuntu 10.10) seemed to be finished, and was running tests, at which time the following message was written:
make[1]: Entering directory `/usr/local/sage/sage-x.y.z./spkg'
/usr/local/sage/sage-x.y.z./spkg/pipestatus "sage-spkg ${SAGE_SPKG_OPTS} extcode-4.8 2>&1" "tee -a /usr/local/sage/sage-x.y.z./spkg/logs/extcode-4.8.log"
extcode-4.8
Machine:
Linux jurgen-desktop 2.6.35-32-generic #68-Ubuntu SMP Tue Mar 27 18:07:17 UTC 2012 x86_64 GNU/Linux
Deleting directories from past builds of previous/current versions of extcode-4.8
Extracting package /usr/local/sage/sage-x.y.z./spkg/standard/extcode-4.8.spkg ...
-rw-r--r-- 1 richard richard 12186743 2012-01-19 22:43 /usr/local/sage/sage-x.y.z./spkg/standard/extcode-4.8.spkg
Finished extraction
There is no spkg-install script, no setup.py, and no configure script,
so I do not know how to install /usr/local/sage/sage-x.y.z./spkg/standard/extcode-4.8.spkg.
make[1]: *** [installed/extcode-4.8] Error 1
make[1]: Leaving directory `/usr/local/sage/sage-x.y.z./spkg'
I don't know how to handle this as I assume these files are generated automatically. Any suggestions?
Richard BentleyFri, 11 May 2012 09:49:08 -0500https://ask.sagemath.org/question/8967/How to correctly load and use a pari/gp script in sage notebookhttps://ask.sagemath.org/question/8800/how-to-correctly-load-and-use-a-parigp-script-in-sage-notebook/
Take for example the script http://math.stanford.edu/~stange/scripts/tate_via_nets.gp
What I do is copying the script to a txt file and name it tatepairing.gp.
Then I go to my sage notebook and choose above the option 'gp'. In the first block I write "\r filename" where filename is the whole path of the file tatepairing.gp (so C:....\tatepairing.gp) and evaluate it.
If you go to the link you see a function tate_pairing_alg with input an elliptic curve, two points on it and an integer. Therefore I define (over $\mathbb{F}_5$)
e = ellinit([0,0,0,4,0]*Mod(1,5))
P1= [2,4]
P2=[1,0]
Now I do tate_pairing_alg(e, P1, P2, 4), the answer is
*** at top-level: tatepairing.tate_pairing_alg(e,P
*** ^--------------------
*** not a function in function call
If you see me doing things wrongly please let me know it :-)
ThanksNadoriSat, 17 Mar 2012 04:22:50 -0500https://ask.sagemath.org/question/8800/plotting in a script filehttps://ask.sagemath.org/question/8787/plotting-in-a-script-file/I have install sage in my computer and i have started testing sage examples. I dont understand sth. for example
sage: v = [(1,10),(2,20)]
sage: line(v)
it runs in shell and I can look plot screen.
I try below codes
sage: load "test.sage"
or
But instead of Interactive Shell, when I try to run the file "test.sage",
on terminal :
$ sage test.sage
it isnt right.
bhdrymnMon, 12 Mar 2012 12:52:44 -0500https://ask.sagemath.org/question/8787/Loading a predefined functionhttps://ask.sagemath.org/question/8637/loading-a-predefined-function/One thread showed how to [load functions at startup](http://ask.sagemath.org/question/1072/preload-defined-functions-for-later-use)
But how to load some predefined function (or a bunch of functions from some .py file, say) only as needed?Green diodSat, 11 Feb 2012 03:26:47 -0600https://ask.sagemath.org/question/8637/How can I re-code a function into a method?https://ask.sagemath.org/question/8482/how-can-i-re-code-a-function-into-a-method/I have the following simple function 'add4' stored in a file 'foo.sage':
def add4(x):
"""Adds 4 to x"""
return x + 4
I can use this in sage by:
sage: attach 'foo.sage'
sage: add4?
Type: function
Base Class: <type 'function'>
String Form: <function add4 at 0x4f332a8>
Namespace: Interactive
File: Dynamically generated function. No source code available.
Definition: add4(x)
Docstring:
Adds 4 to x
sage: var('x')
x
sage: add4(x)
x + 4
How can I change my function to a method so that I can call it using the x.add4() syntax? I still want the method to reside in an external file.
rtrwalkerWed, 16 Nov 2011 11:57:28 -0600https://ask.sagemath.org/question/8482/reuse scripts in Sage-NBhttps://ask.sagemath.org/question/8196/reuse-scripts-in-sage-nb/Hi!
I have some existing Python scripts and data on a machine with Sage-NB running. The Python script takes in the data file as the argument. Is there a way to use them in the Sage-NB interface?
Thanks,riemannTue, 28 Jun 2011 08:49:43 -0500https://ask.sagemath.org/question/8196/