Category: Open Source

Github project support soon?

It seems github will be supporting project accounts soon:

This would be very cool. Right now Neuronvisio is hosted under my account name, something not personal, but project centric make a lot of sense. Especially when you have more than one developer.

On top of this there is this amazing plugin for mercurial, which will make git user very easy if they want to collaborate with those.

Maybe Sumatra is going in this direction, maybe not. Back on this soon.

Sumatra and git support

Sumatra is very cool idea which I felt the need from a long time. Andrew started the development of it and released the version 0.1 few days ago. The idea was great: record all the details about your simulation, storing the parameters, why you have launched it, what was the outcome. Tagging on top for categorization as well.

There was only one problem: Sumatra was not supporting git so I was unable to use it. Therefore, giving the fact was opensource I just baked a series of patches which were integrated in the tool and now sumatra has a git support 🙂

If you want to have a feel about it and want to try with git there is an example repository on github which you can use.

This is the results of the webinterface (sumatra stores everything in the django ORM system) showing the tables of the simulations:

If you click on the single record you can access the details of the simulation:

Using sumatra you will be able to:

  • search your simulations’ results
  • describe the results of the simulation on the simulation record itself, keeping everything very compact and ordered.
  • retrieve all the tiny details when you will need (papers hopefully..)

Storing all this informations is done automatically for you (except the analysis’ results of course), so you can focus more on your science, without worrrying on loosing your results.

Soon I’ll integrate sumatra in Neuronvisio.

P.S.: The patch for git integration (second part) is on its own way and it should be integrated soon in the tree, so you will need to run the bleeding edge and integrate the patch yourself if it’s not yet there (and you can’t wait 🙂 )

Have Fun

Making patch with mercurial

Just mirroring the solution I found here to find it later on.

How to make patch with git and with mercurial

git log
git log HEAD^ -p
git format-patch HEAD^
git send-email 001-patchname.patch
git send-email HEAD^ # alternatively

Doing the same w/ HG:

hg log # note this isn't paginated, a feature git has over hg imo
hg log -r tip -p
hg email -r tip

How to delete a submodule from a git repo

I found the answer here:

Let’s say that you have a submodule in your project called ’submodule1? and it’s in the following path: ‘vendors/submodule1?. In git there are 3 traces of this this submodule:
1) .gitmodules
2) .git/config
3) the submodule entry in the index/commit itself.

To remove the first two, is really simple, you just edit those files and remove the lines that specify the submdoule. In order to delete the third and last trace of the submodule in git, you need to type the following command:
git rm --cached path/to/submodule
Note: Do not put a trailing slash at the end of path. If you put a trailing slash at the end of the command, it will fail.

In the example above, we would type (do not include trailing slash after submodule1):
git rm --cached vendors/submodule1

I’ll put here, so I hope to find it easily later on.

Interested in some random math stuff?

How an Hill equation looks like?
What is the behaviour of an alpha function?

well, I have scipy installed, I know the equation, I know how to create an array of points… Let’s crunch some numbers!

Hill’s equation:
hill1

n variation
hill2

K variation:
hill3

Alpha function:
alpha_function

If you interested in this and other amenities check the code in the scipy_ex folder on github.

The Hill equation is in the mathematical functions script..