Ask Your Question

Mike Witt's profile - activity

2020-03-11 23:41:04 -0600 received badge  Famous Question (source)
2019-12-03 10:49:13 -0600 received badge  Popular Question (source)
2018-12-03 10:35:45 -0600 received badge  Popular Question (source)
2018-03-16 11:35:04 -0600 received badge  Famous Question (source)
2017-03-15 02:13:01 -0600 received badge  Notable Question (source)
2017-02-18 01:46:13 -0600 received badge  Nice Answer (source)
2017-02-05 11:50:06 -0600 received badge  Notable Question (source)
2017-02-05 11:50:06 -0600 received badge  Popular Question (source)
2017-02-05 11:50:06 -0600 received badge  Famous Question (source)
2016-07-16 07:28:56 -0600 received badge  Famous Question (source)
2016-05-30 07:15:34 -0600 received badge  Nice Question (source)
2016-05-30 07:13:54 -0600 received badge  Popular Question (source)
2015-09-29 19:39:22 -0600 received badge  Famous Question (source)
2015-06-23 13:37:33 -0600 received badge  Popular Question (source)
2015-02-26 07:31:40 -0600 received badge  Nice Answer (source)
2014-10-04 04:08:45 -0600 received badge  Famous Question (source)
2014-06-28 20:15:06 -0600 marked best answer subs_expr with e^t

Is there a reason why subs_expr() won't work here?

sage: version()
'Sage Version 4.7.2, Release Date: 2011-10-29'
sage: t = var('t')
sage: foo = e^t
sage: foo.subs_expr(e==e.n())
e^t
sage:
2014-06-28 20:15:03 -0600 marked best answer Default worksheet "sort order" in Notebook

Using the notebook interface, when you're looking at a list of worksheets, you can apparently sort them in different ways by clicking on the heading at the top of a column (I guess this is a pretty standard way to do it).

It appears that, by default, the worksheets are sorted by the last edit date. I would like to change the default behaviour to sort by the name of the worksheet instead. I'm particularly interested in making this change WRT published worksheets on my server. Is there any way to do this?

2013-10-31 09:05:47 -0600 received badge  Notable Question (source)
2013-10-04 17:04:56 -0600 received badge  Notable Question (source)
2013-08-17 21:05:51 -0600 received badge  Notable Question (source)
2013-07-18 02:48:36 -0600 received badge  Favorite Question (source)
2013-07-11 13:14:12 -0600 received badge  Good Question (source)
2013-04-19 17:15:36 -0600 received badge  Notable Question (source)
2013-01-21 02:21:40 -0600 received badge  Popular Question (source)
2012-12-28 01:48:15 -0600 received badge  Notable Question (source)
2012-10-31 23:59:29 -0600 received badge  Great Question (source)
2012-10-31 23:03:18 -0600 received badge  Famous Question (source)
2012-10-12 05:38:13 -0600 received badge  Popular Question (source)
2012-09-27 20:11:51 -0600 received badge  Notable Question (source)
2012-03-26 16:11:42 -0600 received badge  Popular Question (source)
2012-03-21 08:46:05 -0600 received badge  Notable Question (source)
2012-02-16 08:04:24 -0600 commented question Arbitrary Precision Physics Calculation

Perhaps it would help if you described one specific problem that you are working on.

2012-02-01 03:45:05 -0600 commented answer How to make my code available

That seems to me like an idea worth considering. The code itself could be in one of the places mentioned in the other answers, but having the discussion about it here could make the process more ... visible(?)

2012-01-30 05:41:58 -0600 answered a question How to make my code available

If the amount of code involved isn't too large, you could publish it as one or more worksheets on sagenb.org. But that's a fairly limited approach. Actually I'm curious too if there is a convenient way to share code other than integrating it into Sage. And, I think the point about getting feedback is an interesting one. There are probably people, knowledgeable in Sage and Python, who might be willing to comment on less experienced people's code. It might be nice to have an established mechanism for this. I would love to take advantage of something like that myself.

2012-01-30 02:41:29 -0600 received badge  Popular Question (source)
2012-01-09 08:10:01 -0600 answered a question html processing delay

To give periodic reports about what my code is doing, I sometimes do something like this:

print('About to start something')
os.system('date')
sys.stdout.flush()
#
# The code that does the thing
#
print('Finished doing something'
os.system('date')
sys.stdout.flush()

The "flush" business makes the output actually happen, rather than getting queued up for later. I think this works in both the command line and the notebook (I mostly use the command line).

2012-01-05 14:59:47 -0600 answered a question line3d fonsize option?

I'm not sure how much this helps, but could you do

line3d([(0,0,0),(1,1,1)]).show(frame=False)

and then draw the bounding frame yourself, if you need one.

2012-01-03 04:45:34 -0600 received badge  Nice Question (source)
2012-01-02 12:23:41 -0600 marked best answer subs_expr with e^t

Use a wild card (a variable that matches everything) to do complicated subs_expr. I would suggest this technique to be written in sage tutorials. It is very useful to me.

sage: t = var('t')
sage: foo = e^t
sage: w0 = SR.wild(0)
sage: foo.subs_expr(e^w0==e.n()^w0)
2.71828182845905^t
2012-01-02 04:58:47 -0600 commented answer subs_expr with e^t

Great. This worked for me, in the much more complicated expression I was actually using (which incidentally would not plot without doing this conversion first). Thanks!