Posts

Showing posts from February, 2016

How to solve ValueError: bad marshal data when importing matplotlib

 This error occurred when I was trying to run a .py to plot my graphs using matplotlib for the research. I was able to plot graphs well before this happened. However it wasted my precious few hours dedicated to research work so I want to spare your time and thought of writing how I solved... When I googled the error it said that it was an error in .pyc files but was not specific. I tried the given solutions like reinstalling python. (not reinstalling OS which was given as solution too since uninstalling python would cause OS errors) The method I tried to remove .pyc files -> here The error again was -> Traceback (most recent call last):   File "2m.py", line 2, in <module>     import matplotlib.pyplot as plt   File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 123, in <module>     import pyparsing ValueError: bad marshal data (string ref out of range) Then I tried installing pyparsing which was already installed. So I uni

Translating Wikipedia Pages to Sinhala

Towards the end of the internship as our lab celebrated its 10 th anniversary, there was a suggestion to start translation of English wikipedia pages to Sinhala, the commonly used language in Sri Lanka. This would be a great help to break the language barrier of young new comers who like to learn technology. Here are the simple steps to start translation. Create an account in wikipedia ( Create Account ) Then you can log in and start  (Get Started ) From Beta features , you can select "Content Translation" Select a page you want to translate from here . Select an input keyboard. (I used the singlish keyboard and the Wijesekara key board) After translating, publish your translated article. This was a very interesting activity to me, since the article I started with required a lot of thinking of real meaning to translate. We also get support from the Natural Language Processing lab in our university. I hope to do this often as a hobby to open gate

Wiritng Research Papers using LaTeX & Subversion (SVN)

Towards the end of our internship period we started writing research papers based on our work. We used LaTeX to write. LaTeX Use this command to install LaTeX, sudo apt-get install texlive-full Then download a template and go to the relevant folder and type ' make ' and enter. This will run the Makefile. The .pdf file will automatically get generated based on the .tex. The .tex can be edited with 'gedit .tex' or 'gedit .tex &' SVN Apache Subversion (often abbreviated SVN , after the command name svn ) is a software versioning and revision control system distributed as free software under the Apache License. We use Subversion to maintain current and historical versions of files.  To install svn, sudo apt-get install subversion Then choose the location, eg: cd home To get the current version of the repo,by login to server, svn co svn+ssh:// uname@192.248.22. 131/var/svn/name/ Editing of files can be done with following tw