Ask Your Question

kekx's profile - activity

2019-01-29 09:07:16 +0200 received badge  Notable Question (source)
2019-01-29 09:07:16 +0200 received badge  Popular Question (source)
2018-10-30 22:12:37 +0200 received badge  Famous Question (source)
2018-03-16 15:02:46 +0200 received badge  Notable Question (source)
2018-03-16 15:02:46 +0200 received badge  Popular Question (source)
2017-11-16 07:23:54 +0200 received badge  Taxonomist
2014-12-02 16:39:36 +0200 received badge  Teacher (source)
2014-12-02 16:39:36 +0200 received badge  Self-Learner (source)
2014-12-01 17:45:01 +0200 commented answer Untrusted group warning

If anyone knows a better way that would allow me to continue working in the shared folder directly I'd be happy to hear about it!

2014-12-01 17:42:39 +0200 answered a question Untrusted group warning

Alright, so I have managed to pin down the problem and also found a workaround. I am getting this warning, because I am working in a shared folder of a virtual box linux. In order to enable the automatic sharing with the host machine, virtual box gives the ownership (and write permission) of these shared folders to a group called 'vboxsf', which in turn upsets sage. Since I cannot remove the write permission without messing with the functionality of the shared folders, I created a copy of the shared folders in my home directory and set up a cron job to sync the two periodically.

2014-12-01 17:36:17 +0200 answered a question Executing python modules from package

Alright, it turned out that the problem was/is actually related to this other problem that I am also having. In short, for security reasons sage is stripping os.sys.path of the first entry which is usually the empty string and tells python to look in the current directory.

2014-12-01 17:34:13 +0200 commented answer Executing python modules from package

Thanks! This was very helpful for figuring out the problem.

2014-11-28 20:45:53 +0200 asked a question Untrusted group warning

I have 'installed' sage following these instructions, by just extracting the latests binary tarball and then adding a symbolic link like so: ln -s ~/sage/sage /usr/local/bin/sage

Now every time I execute a file with sage path/to/file I get the following warning:

sys:1: RuntimeWarning: not adding directory '' to sys.path since it's writable by an untrusted group.
Untrusted users could put fi les in this directory which might then be imported by your Python code. As a general precaution from similar exploits, you should not execute Python code from this directory

Especially during debugging sessions the additional output tends to clutter up my screen a lot and pushes away the meaningful output. Is there any way I can fix this?

2014-11-28 20:24:51 +0200 asked a question Executing python modules from package

I have a project that is primarily written in python but uses sage for some specific operations. In order to facilitate this I have only .py files and use from sage.all import * at the top of all modules that make use of sage functionalities. To execute I always used sage -python path/to/file.py.

This approach worked fine until it became necessary to split my project into multiple sub-packages. I now want to execute my modules with python -m package.subpackage.module for modules that do not use sage (which works) and correspondingly sage -python -m package.subpackage.module for modules that do. Unfortunately the latter only returns an error message of the form ~/sage/local/bin/python: No module named package.subpackage

In order to be able to use package relative imports I am kind of dependent on the -m syntax, so I would like to get it to work. Any ideas what I am doing wrong? Or is this simply not possible with the python that is bundled with sage for internal reasons? Any help is apreciated!

2014-08-27 17:36:29 +0200 asked a question Polynomial modulus in QuotientRing

I am trying to perform a polynomial modulus between elements in a QuotientRing, more or less like so:

sage: R = QuotientRing(ZZ[x], x**8+1)
sage: t = R.gen()
sage: g = 3*t^5 + 3*t^4 + 2*t^3 + 3*t^2 + t + 2
sage: a = -14*t^7 - t^6 + t^4 - 9*t^2 + 5*t + 1
sage: a.mod(g)
-14*xbar^7 - xbar^6 + xbar^4 - 9*xbar^2 + 5*xbar + 1

As you can see the modulus is not doing anything. I am not very well versed in this kind of maths, but I still believe that it should be possible to compute that modulus. Thus my question is, if it is possible to compute that modulus in sage, possibly via some kind of workaround.

I would be glad about any hints!