Friday, December 26, 2014

SageMathCloud to Collaborate

TL; DR: Use https://cloud.sagemath.com/ to share and collaborate with people using Sage, R, Octave, Python, Cython, GAP, Pari, Macaulay2, Singular, and more...

I'm still trying to learn more about the Scientific computing abilities of Python.  I know about the amazing SciPy modules and some others, but anybody who has written enough Statistical programs knows that sooner or later they need to compile some C code to get things to just run better.

Enter Cython C-Extensions for Python.  What a great way to get C code integrated into your Python work.  So I'm going through the Cython tutorial, and moving on to the Cython for NumPy users tutorial I came across this reference to the Sage Math project.  What the heck is this, I wonder, and as I explore it, you can even sign up for a free account to do stuff on the cloud as an academic tool.  You can create a free account here at https://cloud.sagemath.com.

And here is the link to my Cython tutorial work:

https://cloud.sagemath.com/projects/85a5f7c1-bef6-4680-945e-8ac7bc79e2ba/files/2014-12-26-165920.html

https://cloud.sagemath.com/projects/85a5f7c1-bef6-4680-945e-8ac7bc79e2ba/files/2014-12-26-165920.ipynb

Pretty Cool!

EDIT: That was the link to the HTML file, I fixed it to link to my iPython Notebook instead.

Sunday, December 21, 2014

How Do I Share Code On Blogger?

Okay, so now I finally have a blog... What do I type in it?

Well, I figured this would just be a good way of tracking some of the useful things I need to remember in case I have to repeat them again.  Hey, who knows?  Maybe it will help you as well...

I chose to use Blogger over the alternatives as a personal choice, to each their own.  My question is, however, how do I share code snippets on Blogger?

Hmm, a few Google searches which of course lead to another "closed as off topic" post in StackExchange (save that rant for another day, Brian).  In there, yodaisgreen recommends:

https://gist.github.com/

So, I click on the link and I'm logged in through google since I'm already logged into blogger.  Okay, let's see, what can I try to share.  So I took a snippet out of my .emacs to show that the blog color scheme is my UNC inspired color scheme in emacs.  I click on Create public Gist, and then on the right I see an Embed URL Link.  Okay, let's copy and paste that in the line below while I'm in Compose editing mode, and...

<script src="https://gist.github.com/statmobile/ca6261166175699d8bba.js"></script>

Hmm, that didn't seem to work.   What if I paste it in the actual HTML source editing mode:



As you can see, that worked.  Sweet!  Although I see no evidence when I go back to the Compose editing mode.  Maybe I'll put a code marker in the HTML code next time so I can see where the code insert will be when in the Compose view.

Now keep in mind, this is git versioned code, I believe.  So I have a feeling that feature will come in great since I tend to rewrite these things often as I start to learn them for the first time.  Trust me, I'll brag as soon as it does come in handy.

DISCLAIMER: Code highlighting isn't really great for emacs lisp when it comes to Git, so I'm sure other code will look much better in future posts.

Blog "Hello World"

Hello, World!

I'm finally getting around to tracking all the various notes I've accumulated over the years, and I thought I'd share them in case someone else finds them useful.

Most of this stuff I found on the Internet through Google searches.  I will try to credit everything I copy and pasted, but if I missed you it's because I didn't record it at that time.  If you see something that you wish to be cited to your blog, Stack Exchange or Reddit account, please let me know.  I'll be more than happy to give you credit where it's due, and if it's necessary remove the post all together.

@statmobile