sagemathinc / cocalc Goto Github PK
View Code? Open in Web Editor NEWCoCalc: Collaborative Calculation in the Cloud
Home Page: https://CoCalc.com
License: Other
CoCalc: Collaborative Calculation in the Cloud
Home Page: https://CoCalc.com
License: Other
Suggested line latexmk -pdf -bibtex -synctex=1 -interaction=nonstopmode '<FILENAME>.tex'
.
Says John P.: You can tell latexmk about sagetex: https://bitbucket.org/ddrake/sagetex/wiki/UsingSageTeX. Then it works well, in my experience. Should that code be put into a global latexmk RC file?
I am so used to using Cmd-Shift-[ or -] to switch between tabs in my (Mac) browsers that it's just second nature. It's super annoying not to be able to do this in SMC - say, between a .tex file and a .bib file. Since Cmd-s saves in SMC, not the usual behavior of saving the actual webpage, I assume it's possible to implement something like this in SMC, even if the specific shortcut is something other than that.
Given @williamstein's message on the cloud email list as to this being the "canonical" repo for SMC, the various issues at https://github.com/sagemathinc/smc-public and https://github.com/sagemath/cloud/issues should be moved here.
What I reported at http://trac.sagemath.org/ticket/18797 seems to be an SMC bug. It currently prevents me from installing Sage.
Hello,
I'm trying to make a docker-compose setup for smc. With docker it is easy to setup nginx, cassandra, stunnel and tinc.
Suppose, I have them up and running in separate containers listed in /etc/hosts
in current container.
Now I want to run smc-specific components, Hub for example.
I have managed cloning this repo, --build_node_modules
, --build_python_packages
and make_coffee
.
What is the next step to configure and run Hub or Compute?
I can't figure out a way to look at the documentation of lazily imported functions, e.g.
InteractiveLPProblemStandardForm(<TAB>
results in
File: /projects/sage/sage-6.7/src/sage/misc/lazy_import.pyx Unable to read docstring (source code not available)
For example
show(latex(x^2))
in SageNB results in typeset x^2
, while cloud shows LaTeX code x^{2}
. Same for manually constructed expressions like
show(LatexExpr("x^2"))
This is a problem for functions that return LatexExpr
with the idea of showing their output typeset when typeset_mode(True)
, e.g. http://trac.sagemath.org/ticket/18852
line3d(((1,0,0),(0,0,1)))
displays a 3d line, but
line3d(((1,0,0),(0,0,1))).show()
only prints
Graphics3d Object
This is particularly problematic in combination with @interact
, since returning a 3D scene from such a function doesn't cause it to get printed.
For example, paste contents of a sage worksheet into a .sage file, then try to load and get silent failure.
Reported by: Randy Leveque
Details:
I tracked down the problem with our Clawpack plotting... the following hangs:
from petsc4py import PETSc
In fact it hangs even if this is in a try-except block, although
petsc4py itself imports ok:
In [1]: import petsc4py
In [2]: petsc4py
Out[2]: <module 'petsc4py' from
'/usr/lib/pymodules/python2.7/petsc4py/__init__.pyc'>
In [3]: try:
...: from petsc4py import PETSc
...: except:
...: print "cannot import"
...:
<hangs>
This isn't essential to what we're doing since I'm not using petsc4py
and so I can easily remove this try-except block from the code, but
maybe indicates that there's something wrong with the version of
petsc4py installed on SMC? I don't know if anyone else might be using
this, so perhaps not high priority to fix.
plan: when opening a static html file, if it was generated by nbconvert, just render it. Simple as that.
See sagemathinc/smc-public#1 for a discussion.
cmd-f in Mac gives a find window, but although it highlights all the found items, there doesn't seem to be an easy way (say, Enter) to cycle through them; it's easier to use the browser's search, which is of course suboptimal in the long run for SMC. I thought the "Forward" and "Inverse" buttons were about this but I couldn't suss out what they did. Interestingly, these are not available in the plain text editor that comes up for bibtex.
It's a little incongruous that the chat only works in the TeX editor, when it might be just as useful outside of it. Maybe it should be a meta-thing that works at a project level and you can switch between things?
See this thread for many great solutions!
http://mail.scipy.org/pipermail/ipython-dev/2015-July/016631.html
Somebody (not me) reported this:
Below is a small example demonstrating the issue:
test.py
with the following content:def test_function(): pass
load('test.py')
save(test_function, 'test.sobj')
Error in lines 1-1
Traceback (most recent call last):
File "/projects/8d39729d-4566-4056-84e2-c636147c3fc3/.sagemathcloud/sage_server.py", line 879, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "sage/structure/sage_object.pyx", line 989, in sage.structure.sage_object.save (build/cythonized/sage/structure/sage_object.c:11348)
s = cPickle.dumps(obj, protocol=2)
TypeError: expected string or Unicode object, NoneType found
pickle
instead of cPickle
makes it more obvious what the issue is:import pickle
pickle.dumps(test_function, protocol=2)
which crashes with the following traceback:
Error in lines 2-2
Traceback (most recent call last):
File "/projects/8d39729d-4566-4056-84e2-c636147c3fc3/.sagemathcloud/sage_server.py", line 879, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "/projects/sage/sage-6.7/local/lib/python/pickle.py", line 1374, in dumps
Pickler(file, protocol).dump(obj)
File "/projects/sage/sage-6.7/local/lib/python/pickle.py", line 224, in dump
self.save(obj)
File "/projects/sage/sage-6.7/local/lib/python/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/projects/sage/sage-6.7/local/lib/python/pickle.py", line 748, in save_global
(obj, module, name))
PicklingError: Can't pickle <function test_function at 0x7f1af4bdccf8>: it's not found as __main__.test_function
If you try the same thing in command-line Sage, then everything works as you would expect.
Work in progress here:
This issue occurs in Firefox and in the chromium app:
Reproduce 1:
a) Scroll in one IPython notebook.
b) Select a second notebook.
c) Return to scrolled notebook: The view is returned to the top of the notebook.
Reproduce 2:
a) Click on a folder in the file browser.
b) Select a notebook.
c) Return to the file browser: The file browser will have returned to your home folder.
I was installing (stable) FEniCS project on SMC terminal via
curl -s http://fenicsproject.org/fenics-install.sh | bash
and I have slepc compilation problems.
I customize the the instalation with the instructions of
Johannes Ring (FEniCS project):
git clone https://bitbucket.org/fenics-project/fenics-developer-tools.git
cd fenics-developer-tools
cp install/profiles/fenics.Linux.yaml local.yaml
editor local.yaml
Now remove the following two lines from local.yaml:
download: |
mumps, scalapack, blacs, ml
Finally, run:
./install/fenics-install.sh local.yaml
With $ source fenics.custom comand
the FEniCS project is available on ipython calling from the terminal.
The native vtk plots are not available. Is there any way to
enable it?
( Is it possible to call an old ipython notebook version associate with the
ipython terminal in order to use FEniCS there? )
André Timótheo
Whenever I change the latex build command, it resets itself when I hit save (to recompile).
I am trying to add -shell-escape so I can use the svg package.
In the latex file, I hit click build, then edit the text box with the command right underneath it. Not sure if this is a bug, or if I am not supposed to edit the command in this way.
It does work fine if I run the command from a terminal.
That's definitely a bug. As a workaround, edit the last line of the file, which looks like this
%sagemathcloud={"latex_command":"pdflatex -shell-escape -synctex=1 -interact=nonstopmode 'PaperV1.tex'"}
@edgimar on gitter says:
By looking at the result of calling _install_spec(), it looks like the JSON you need for /usr/local/share/jupyter/kernels/ is the following: {"display_name": "Sage 6.7", "argv": ["/usr/local/sage/sage-6.7/sage", "-python", "-m", "sage.repl.ipython_kernel", "-f", "{connection_file}"]}
NOTE from william: probably need to format the JSON on multiple lines -- I've noticed ipython weirdly doesn't work otherwise...
Our computer labs have font issues with SMC in Firefox - I am attaching a screenshot with some warnings about encoding in case that is the issue. I also have font problems with SageMathCell in these labs, so maybe the labs are just messed up. Chrome works fine. On the other hand, other people were reporting similar font issues with SageMathCell, so even if it is a misconfiguration it may be common enough that a workaround would be useful.
Desired behavior: pop up a dialog box (or a little confirmation button) and say "are you sure you want to unlink?" then do the unlink.
I think this bug was caused by the very recent rewrite of the entire account settings page using React.
Somebody said:
There are the little shortcuts in the sagews view, but one thing I like about things like TeXShop (and presumably are also in Overleaf and WriteLaTeX) is having most-commonly-used things in shortcuts or icons or something. Currently I'm having trouble remembering matrix syntax for non-standard matrices so I have to look it up outside SMC 😃 Perhaps you can also provide the "symbol table" from Grätzer like TeXShop does.
Hi,
I have been in a situation where 4 people were editing the same file, at the same time (one day before manuscript submission) and here's some feedback from that experience:
When multiple people are editing the document, it would be good to show somewhere on the screen that author X is working on line # 10, author Y is working on line # 45, say.
Suppose two authors X and Y are working on lines # 25 and lines #150 respectively. The view for author X is fine, since he/she is at the top of the document. However, for author Y, the situation is terrible, because as author X keeps adding lines, author Y's screen keeps shifting below and is very distracting. Instead, it would better if the line numbers on the left change/scroll, rather than the view of the entire document scrolling.
Cheers,
Mani
So far the account settings are done and live.
When editing files (eg .sage, .sagews, etc) on smc,
line numbers are displayed in the left margin.
It would be nice if the cursor's column position could
also be displayed somewhere, eg to know when line
reaches 80 characters.
5.5.0 was released: codemirror/codemirror5@5.4.0...5.5.0
Some initial questions:
Is it even supported for the free tier? My CPU quota reads 1 (physical and virtual), so does that mean I can't (shouldn't anyway) use parallelization (multithreading, multiprocessing)?
@see: Web resources
http://ask.sagemath.org/question/8272/whenhow-to-use-parallel/
http://ask.sagemath.org/question/7578/what-are-my-best-options-for-taking-advantage-of-multiple-cores/?answer=11394#post-id-11394
https://groups.google.com/forum/#!msg/sage-cloud/wpIBtHKEgGI/P5vzp62z0Q0J
https://wiki.python.org/moin/ParallelProcessing
This is similar to rewriting the frontend UI to use React.js, in that it will make development of SMC much, much easier and pleasant, and accessible.
This non-public worksheet illustrates the problem:
https://cloud.sagemath.com/projects/20796b9f-d3bb-441e-9778-d1462cb921c0/files/testgon.sagews
I hope that switching to RethinkDB will fix this problem indirectly. We will see.
Requested by Michael Forbes
It is a bug: put there
[email protected]
and it will suggest just me, but add a comma
[email protected],
and I will be in the end of a relatively long list starting with
"Lauren Sampson".
There have been multiple reports of computations that, when run in a worksheet for many hours (or just letting a worksheet sit for a while), the underlying python process will get killed for no good reason. Is this caused by some sort of bug in the local_hub or sage worksheet server? If so, fix it. If anybody gathers data about this, then this is a good place to put it. I'll of course try to read source code and get to the bottom of this.
Hi,
It would be nice to have a column or a drop down menu which lists all the labels in your documents, so that you can click on it, and it places a ref at the position of the cursor.
Thanks,
Mani
Here are my thoughts about this from a while ago:
Add a dropdown-menu bar for a terminal window. This should cover not only the ability of inserting commands ad-verbum, but also to present the user with a dialog before inserting the command (e.g. checkboxes for command-line flags, drop-down list of filenames, etc.)
"files":
short listing, long listing, long listed sorted by size or time, "du -sch .", "file", delete, move etc. ... One could make this dialog with a dropdown list of filenames, instead of having to blindly type in the correctly spelled file name. mkdir, ...
then "git", which once again has entries like
"configure" -> dialog (wizard) to set the global user.name and user.email variable.
setup a global "gitignore" file in $HOME
add my personal aliases for git commands 😀
"init"
"clone"
"status"
"commit" -> once again a dialog?
"configure terminal" which issues "$ open ~/.bashrc"
etc.
At one point, I think we should have a dedicated full UI page for git.
This could be the start for this.
"system"
which has some monitoring tools, in particular "htop -u
whoami
"
"interrupt" (issuing a ctrl-z)
and once there is interrupt, one needs "jobs -l"
"kill" and "kill %1" etc.
or even a kill variant, which does list the users jobs in a list and the user can click on the process
"restart project"
and of course, "programs", which just starts programs.
R, octave, ...
and here could also be "make", "make config", "make clean", ... there are also cryptic ways to get all make targets, which could be presented in a list in a dialog
sage -pip install --user ...
sage -R CMD INSTALL ...
💡 Something missing? Please comment below! 💡
I unfortunately am often turning off the markdown editor realtime preview, since on every keystroke it renders the whole preview on the right... which starts to lag. Some ideas for improving matters:
return <span dangerouslySetInnerHTML={{ __html: this.renderMarkdown(child) }} />;
. If nobody has created a genuine react component yet, I think one could be authored by forking the code of a library like marked and making it generate react components instead of html as output, or by parsing the html string it generates. Forking/modifying marked would also make it possible to edit directly in the output area, or at least to click there and give reverse search (i.e., move cursor to corresponding point in input).This is supposed to plot a colored surface:
from sage.plot.plot3d.parametric_surface import ParametricSurface
def g(x,y): return x, y, - x**2 + y**2
def c(x,y): return sin((x-y/2)*y/4)**2
cm = colormaps.gist_rainbow
P = ParametricSurface(g, (srange(-10,10,0.1), srange(-5,5.0,0.1)), color=(c,cm))
P
but the colors do not appear in the cloud. They work in jmol in the old notebook.
requested by c.d. mclean in sage-cloud list.
Right now you can move the document by scrolling vertically or horizontally using your mouse, which is OK if you have a super-good mouse. However, it would also make sense to be able to click and drag the preview to change its position, especially since click and drag currently does nothing.
This is a feature requested by Mani Chandra.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.