[sage-support] Re: How to import the file "function.py" to worksheet sage? sagemath loaded by virtual machine (VBox)

2016-02-06 Thread kcrisman
See also the answer to your question for Jupyter 
at 
http://ask.sagemath.org/question/32474/how-to-import-the-file-functionpy-to-worksheet-sage-sagemath-loaded-by-virtual-machine-virtualbox/

On Saturday, February 6, 2016 at 6:36:02 PM UTC-5, kcrisman wrote:
>
>
> I want to import a file function called "function.py" to my Worksheet. How 
>> to do?
>>
>
> I don't use the VM solution, but likely we'd want to know where your file 
> is located, whether you are using the notebook interface or the Jupyter 
> notebook or the command line, etc. in order to say how to load that.  In 
> the Sage NB (not Jupyter) the "best" way is to actually upload the file to 
> the Data of the worksheet, though you can also probably use "load" to load 
> it from the VM filesystem (untested by me).
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] how to user a external program to plot graphic?

2016-02-06 Thread William Stein
On Saturday, February 6, 2016, kcrisman  wrote:

>
> how to user a external program to plot graphic? ex: gnuplot, xmaxima,
>> mgnuplot
>>
>
>
> I don't believe Sage includes any of those external plotting programs,
> though we have an interface
>
>
>
Correct. Gnuplot is not GPL compatibly licensed.



> gnuplot.  See
> http://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/gnuplot.html
> for some details, assuming it still works.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to sage-support@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Sent from my massive iPhone 6 plus.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: how to user a external program to plot graphic?

2016-02-06 Thread kcrisman


> how to user a external program to plot graphic? ex: gnuplot, xmaxima, 
> mgnuplot
>


I don't believe Sage includes any of those external plotting programs, 
though we have an interface to gnuplot.  See 
http://doc.sagemath.org/html/en/reference/interfaces/sage/interfaces/gnuplot.html
 
for some details, assuming it still works. 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: How to import the file "function.py" to worksheet sage? sagemath loaded by virtual machine (VBox)

2016-02-06 Thread kcrisman


> I want to import a file function called "function.py" to my Worksheet. How 
> to do?
>

I don't use the VM solution, but likely we'd want to know where your file 
is located, whether you are using the notebook interface or the Jupyter 
notebook or the command line, etc. in order to say how to load that.  In 
the Sage NB (not Jupyter) the "best" way is to actually upload the file to 
the Data of the worksheet, though you can also probably use "load" to load 
it from the VM filesystem (untested by me).
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] how to user a external program to plot graphic?

2016-02-06 Thread jmarcellopereira
how to user a external program to plot graphic? ex: gnuplot, xmaxima, 
mgnuplot

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] How to import the file "function.py" to worksheet sage? sagemath loaded by virtual machine (VBox)

2016-02-06 Thread jmarcellopereira
I want to import a file function called "function.py" to my Worksheet. How 
to do?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Approximating real roots of cubic equation

2016-02-06 Thread Dominique Laurain
Hello,

I opened a ticket

Wrong approximate real roots of cubic equation and matrix eigenvalues #412 
because frustrating me too much :-)  (joking)

Is it ok or am i  math foolish ?

Maybe there are two tickets in one : one for Maxima (behind the scene 
solver) and one for Sage (converting argument calls).

I have seen similar problems on other geometric computations involving 
equations solving ... but in my special case of geometric worksheet 
(intersection of conics) it is a core problem, because trying to get a 
degenerate conic...I need to have sometimes EXACT roots of cubics and 
sometimes APPROXIMATE but "pure real" root finding is a necessary condition 
for my computations.

Dominique.

PS : I am not in hurry ... I will code  a cubic equation solver myself (for 
symmetric matrix/equations).

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: All hamiltonian cycles in graphs

2016-02-06 Thread Nathann Cohen

>
> there is subgraph_search_iterator()
> which might not be optimized for cycles too much, but does the job, I 
> guess:
>

+1. That's the easiest way to get them. If performance is a problem you may 
want to work a bit more on the exploration algorithm, but if you do so do 
not overestimate what speed you could gain this way: there is no magical 
way to compute a TSP, and no magical way to get them all either.

Just be careful when using the subgraph_search_iterator() function, as you 
will get every cycle on 'n' vertices for a total of 2n times.

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Sage Crash Report

2016-02-06 Thread Dima Pasechnik
Thanks, but without knowing how this is obtained, it is not useful, sorry.
(we need to know OS, which Sage version, binary or source install, and a 
sequence of commands that led to the crash)

On Saturday, February 6, 2016 at 9:47:13 AM UTC, Herb Doughty wrote:
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: All hamiltonian cycles in graphs

2016-02-06 Thread Dima Pasechnik
there is subgraph_search_iterator()
which might not be optimized for cycles too much, but does the job, I guess:

sage: p=graphs.HeawoodGraph(); p
Heawood graph: Graph on 14 vertices
sage: c=graphs.CycleGraph(14); c
Cycle graph: Graph on 14 vertices
sage: len(list(p.subgraph_search_iterator(c)))
672



On Saturday, February 6, 2016 at 7:16:31 AM UTC, Christian Stump wrote:
>
> Hi there,
>
> is the functionality to get *ALL* hamiltonian cycles in a graph somehow 
> already available in Sage? (Mathematica provides that, 
> http://reference.wolfram.com/language/Combinatorica/ref/HamiltonianCycle.html,
>  
> but I would prefer not to pay for each hamiltonian cycle I am offered by my 
> computer...)
>
> Thanks, Christian
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Sage Crash Report

2016-02-06 Thread Herb Doughty


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.
***

IPython post-mortem report

{'commit_hash': u'1961f94',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': 
'/home/herbdoughty/sage-root/SageMath/local/lib/python2.7/site-packages/IPython',
 'ipython_version': '4.0.0',
 'os_name': 'posix',
 'platform': 'Linux-4.2.0-23-generic-x86_64-with-debian-jessie-sid',
 'sys_executable': '/home/herbdoughty/sage-root/SageMath/local/bin/python',
 'sys_platform': 'linux2',
 'sys_version': '2.7.10 (default, Oct 14 2015, 16:09:02) \n[GCC 5.2.1 
20151010]'}

***



***

Crash traceback:

---
---
ImportErrorPython 2.7.10: /home/herbdoughty/sage-root/SageMath/local/bin/python
   Sat Feb  6 01:39:09 2016
A problem occurred executing Python code.  Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/home/herbdoughty/sage-root/SageMath/src/bin/sage-ipython in ()
  1 #!/usr/bin/env python
  2 # -*- coding: utf-8 -*-
  3 """
  4 Sage IPython startup script.
  5 """
  6 
  7 # Install extra readline commands before IPython initialization
  8 from sage.repl.readline_extra_commands import *
  9 
 10 from sage.repl.interpreter import SageTerminalApp
 11 
 12 app = SageTerminalApp.instance()
---> 13 app.initialize()
global app.initialize = >
 14 app.start()

 in initialize(self=, argv=None)

/home/herbdoughty/sage-root/SageMath/local/lib/python2.7/site-packages/traitlets/config/application.pyc
 in catch_config_error(method=, 
app=, *args=(None,), **kwargs={})
 60 
 61 
#-
 62 # Application class
 63 
#-
 64 
 65 @decorator
 66 def catch_config_error(method, app, *args, **kwargs):
 67 """Method decorator for catching invalid config 
(Trait/ArgumentErrors) during init.
 68 
 69 On a TraitError (generally caused by bad config), this will print 
the trait's
 70 message, and exit the app.
 71 
 72 For use on init methods, to prevent invoking excepthook on invalid 
input.
 73 """
 74 try:
---> 75 return method(app, *args, **kwargs)
method = 
app = 
args = (None,)
kwargs = {}
 76 except (TraitError, ArgumentError) as e:
 77 app.print_help()
 78 app.log.fatal("Bad config encountered during initialization:")
 79 app.log.fatal(str(e))
 80 app.log.debug("Config at the time: %s", app.config)
 81 app.exit(1)
 82 
 83 
 84 class ApplicationError(Exception):
 85 pass
 86 
 87 class LevelFormatter(logging.Formatter):
 88 """Formatter with additional `highlevel` record
 89 
 90 This field is empty if log level is less than highlevel_limit,

/home/herbdoughty/sage-root/SageMath/local/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc
 in initialize(self=, argv=None)
299 
300 return super(TerminalIPythonApp, self).parse_command_line(argv)
301 
302 @catch_config_error
303 def initialize(self, argv=None):
304 """Do actions after construct, but before starting the app."""
305 super(TerminalIPythonApp, self).initialize(argv)
306 if self.subapp is not None:
307 # don't bother initializing further, starting subapp
308 return
309 # print self.extra_args
310 if self.extra_args and not self.something_to_run:
311 self.file_to_run = self.extra_args[0]
312 self.init_path()
313 # create the shell
--> 314 self.init_shell()
self.init_shell = >
315 # and draw the banner
316 self.init_banner()
317 # Now a variety of things that happen after the banner is 
printed.
318 self.init_gui_pylab()
319 self.init_extensions()
320 self.init_code()
321 
322 def init_shell(self):
323 """initiali