Tool for testing/grading IPython notebook homeworks - jupyter

I'll be teaching a scientific computing class with IPython notebook in the next term. Both the course content and the homework will be distributed/returned as IPython notebooks.
I remember that about half a year ago, I had stumbled across a tool designed to hand-in homework as IPython notebook. In my recollection, it had some really nice features such as
tracking of returned homework tasks per student
integrated grading system
auto-testing for errors / code compliance
unit-testing of code segments
auto-grading features based on various metrics (e.g. speed of implementation)
Unfortunately, it seem I never saved the link - anyone seen this or any similar tool?

Writing this question actually made me think about the right buzz-words for my web search - et voila "notebook grading system" gives https://github.com/jupyter/nbgrader right at the top (quite in contrast to "ipython notebook homework tool")!
Sorry for the noise...

Related

Problems in OpenModelica v1.19.2 when installing OpenHydraulics v1.0.1 with Modelica Standard Lib v3.2

Greeting Everyone, I am a new one here.
I'm a brand new Modelica user. I'm trying to learn the language with OpenModelica. I'd like to use OpenHydraulics which is in github link in OpenModelica (specifically in the OMEdit Connection Editor).
I downloaded OpenModelica v1.19.2 and Modelica Standard Lib v3.2 to browse and run the library OpenHydraulics v1.0.1. However, when I open the Excavator example and try to Instantiate or Simulate the model I get many errors of the form:
[OpenHydraulics.Basic.VariableRestriction: 51:3-54:64]: Function ReynoldsNumber_m_flow not found in scope VariableRestriction.
Could you help me with this problem?
Thanks in advance.
there are a couple of things you need to take into consideration:
The current version of OpenHydraulics is still the original release from almost 10 years ago.
The library was developed using Dymola which at the time also supported a couple of non-standard Modelica, Dymola-specific constructs that other tools struggle to work with.
The example you are trying to run is the most complex one utilizing almost all of the power of the library and hence has quite a high degree of complexity.
Taking all this together means that OpenModelica is bound to struggle with that example. But all is not lost. If you actually look at the more simple circuit examples (under Circuit) you'll find that they work just fine. And depending on your application area they might already demonstrate a usage that will fit your needs.
I hope this helps.

Scala IDE for data science applications (like RStudio / Spyder / Rodeo)

With the rise of Spark, Scala has gained a tremendous momentum as programming language of choice for data science applications.
To increase the efficiency when working on data science applications, specialized IDEs have been released for
R (e.g. RStudio) and
Python (e.g. Spyder or Rodeo, see Is there something like RStudio for Python?).
Is there something similar for Scala?
Unfortunately there doesn't seem to be any dedicated Data Science IDEs for Scala at this time. I think these would be your best options:
IntelliJ Worksheets:
This is basically a text editor with an output window which gets updated as often as you want. Eclipse has something similar, I just prefer IntelliJ.
Pros:
Backed by IntelliJ's fantastic code completion, error checking, and sbt/maven integration.
You can prototype within the same project setup as your actual development system (if you have one).
Cons:
I am not aware of any caching/selective evaluation so the entire worksheet is evaluated each time you want an answer, something you may not want if you have some operations which take a long time to complete.
No workspace variables window or plot integration.
Jupyter Notebooks
The Jupyter Notebook is a generalization of the iPython notebook which now supports dozens of interpreted languages (new kernels are being added all of the time).
Pros:
Scala and Spark Scala Kernels are fairly easy to install, both have the ability to add maven/sbt dependencies and JARs.
The cells in the notebook can be run individually (allowing you to train a model once and use it many times, for example).
The cells support markdown (with LaTeX!) which can be rendered on its own (a github example), allowing you to use your notebooks as a report/demonstration.
Notebooks are backed by a Notebook Server so you could easily use a more powerful computer as your notebook server and then interact with the notebook from another location.
Some kernels have autocompletion.
Looks like there is some plot integration (example) but it is not totally polished.
Cons:
Not all kernels are perfect, some have bugs or limited functionality.
No workspace variables window.
You really need to be careful about the ordering of your cells, failure to do so can cause a lot of confusion.
For most of the data-sciency stuff I do I use Jupyter but it is far from perfect. In order for Scala to really take over as a Data Science language it really needs more data science libraries (scikit-learn is sooo far ahead here) and it needs a solid plotting library (there are a few options but none I have seen both use idiomatic Scala and are able to run without a server). I think as soon as it has those two elements it will become more popular and hopefully someone will make a nice RStudio-esque IDE.
Your best shot (nothing like rstudio but this would be your best shot for scala) is apache zeppelin
I would recommend you to look at Scala IDE for Eclipse. But i think, it really depends on your personal choice in which you are comfortable writing the code. For testing code by code, i would still use jupyter notebook

SciPy special functions source and citations

I would like to know where I can find the original source of the algorithms used in the various Bessel functions within scipy.special (jn, yn, kn, in), so that I could cite them, as well as read about them. I'd also like to understand the limits of reliability (e.g. high orders and very large or small arguments). I'm guessing I could start by reading the citations. I understand that I'll also have to learn about how to deal with very large and small values within python itself.
If the source code (C?) is viewable within my Python and/or SciPy installation, it would be great to understand how I could find it! I'm using python but not familiar with its installation - I really just dragged the python and scipy icons into the applications folder icon a year ago, and haven't looked since. (I'm using python 2.7 on OSX).
If this is already available somewhere I haven't found, a link to that would also be appreciated!

Where can I find good open source code flow visualization software?

I am working on an academic research regarding some very long functions in the Linux kernel (link, link).
For that research, I would like to use some code flow visualization tool, that would be able to plot a graph in which each vertex is a decision point and each edge is a piece of code which runs in a consequent way.
Do you know of any good, open source project that can visualize C code?
Perhaps a tool like KCacheGrind would be of help. It generates call graphs based on actual calls and cannot pre-generate a call graph without actually running the program, which may not suit your needs, but then it again it may.
History flow's are very neat for changes/diff across multiple versions.
Codeplex has a project, Dependency Visualizer which does support C also.
Gprof2Dot can render oprofile, this would get you dynamic info also.
CodeViz also (static tool) would work.
If your using gcc, gcc-xml has an introspector plugin also todo this.
You appears to want to acquire a flowchart of C source code ("decisions", "code blocks").
Something like this C flowchart?
To do this correctly, esp. for Linux kernal code, I'd expect you to have to preprocess the code first to get rid of macros and conditionals. I would assume that GCC would construct such a graph internally and that you ought to be able to get your hands on that graph.
Doxygen does some amount of 'visualization',
but you need to work on the code a bit for it to be usable.
Another interesting thing to check would be lxr
Linux Cross Referencer is a software toolset for indexing and presenting source code repositories. LXR was initially targeted at the Linux source code, but has proved usable for a wide range of software projects. lxr.linux.no is currently running an experimental fork of the LXR software.
I can recommend Sourcetrail. Can work with a compile_commands.json. Not sure if it's still maintained, though. But it's foss and you can fork it!

free MATLAB environment

I'm learning the MATLAB language and would like to have some kind of free environment to experiment with. The MATLAB environment provided by MathWorks is commercial. There appears to be a trial available, but I can't figure out how to get the trial license.
For the moment, all I need is a command-line and the "standard libraries".
Octave is mostly compatible with matlab: http://www.gnu.org/software/octave/
If you are just starting with MATLAB I would strongly suggest to go the Python path instead (unless there is some very specific reason why you must use MATLAB). The basics (like array / matrix operations) are very similar to MATLAB.
In my current area of work (neuroscience) there is a strong migration from MATLAB to Python. Many groups are making the switch because Python is free and generally more powerful.
The basic packages you will probably need to get started would be numpy (basic array numerics), scipy (more algorithms) and matplotlib (plotting). Since you want to work on the command line I suggest IPython as well.
As already mentioned in another answer there are also some Python distributions which include many packages, like PythonXY, the Enthought Python Distribution, or Anaconda.
There are many tutorials available on the web, search a little and pick one you like.
Look into these:
Scilab
Octave
Sage
Read this blog entry from Ryan Morlok for more info on open source Matlab alternatives.
I'm a big fan of R, but it's not a substitute for Matlab... it's an alternative. There's a big difference!
I was recently enamoured of Python XY. It's not exactly like Matlab but it has many of the same functions and copies the look and feel. I would personally use it if I didn't want to buy a Matlab license though - not if I wanted to practice with a Matlab stand-in.
www.pythonxy.com
Other users have given you the examples that I would have suggested - Octave and Scilab. Of the two, I would say that Scilab is more powerful BUT Octave tries really hard to be source compatible with standard MATLAB and Scilab does not.
So, if your aim is to experiment with a MATLAB like language and learn skills that you will eventually be able to transfer over to MATLAB then I suggest that you stick with Octave.
If you're interested in trying things out in MATLAB directly, there was a recent blog entry on The MathWorks website regarding free trial downloads of MATLAB and its various toolboxes. If you haven't tried contacting them already, the blog links to this page where you can request product trials or, if you already have a licensed product, you can sign in and downloads trials of toolboxes.