<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>MartinsM - Personal blog</title><link href="http://mednis.info/" rel="alternate"></link><link href="http://mednis.info/feeds/howto.atom.xml" rel="self"></link><id>http://mednis.info/</id><updated>2016-02-06T16:00:00+02:00</updated><entry><title>How to install COBRApy in Lubuntu 15.10</title><link href="http://mednis.info/how-to-install-cobrapy-in-lubuntu-1510.html" rel="alternate"></link><updated>2016-02-06T16:00:00+02:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2016-02-06:how-to-install-cobrapy-in-lubuntu-1510.html</id><summary type="html">&lt;div class="highlight"&gt;&lt;pre&gt;sudo su
aptitude install python-pip
aptitude install python-dev
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Install libSBML&lt;/h2&gt;
&lt;p&gt;The next step failed for me, but one can try:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;pip install python-libsbml
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This method worked for me:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;sh -c &lt;span class="s2"&gt;&amp;quot;echo &amp;#39;deb http://download.opensuse.org/repositories/home:/fbergman:/libsbml/xUbuntu_15.10/ /&amp;#39; &amp;gt;&amp;gt; /etc/apt/sources.list.d/python-libsbml.list&amp;quot;&lt;/span&gt;
apt-get update
apt-get install python-libsbml
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Install COBRApy dependencies&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;apt-get install python-glpk
apt-get install python-numpy
apt-get install python-scipy
apt-get install glpk-utils
apt-get install libglpk-dev
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Install COBRApy&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;pip install cobra
apt-get install ipython
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Test COBRApy&lt;/h2&gt;
&lt;p&gt;In python console run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;cobra.test&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;test_all&lt;/span&gt;
&lt;span class="n"&gt;test_all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;Ran&lt;/span&gt; &lt;span class="mi"&gt;83&lt;/span&gt; &lt;span class="n"&gt;tests&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="mf"&gt;66.987&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;
&lt;span class="n"&gt;OK&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;skipped&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;As it is noted in the title these instructions work on Ubuntu. Unfortunately I couldn't get COBRApy to pass tests on Fedora 23 because it can't locate glpk. Any help in comments is appreciated.&lt;/p&gt;</summary><category term="Ubuntu"></category><category term="COBRA"></category></entry><entry><title>Python Pandas reindex and new index</title><link href="http://mednis.info/python-pandas-reindex-and-new-index.html" rel="alternate"></link><updated>2016-01-19T00:55:00+02:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2016-01-19:python-pandas-reindex-and-new-index.html</id><summary type="html">&lt;p&gt;The answer comes from &lt;a href="http://stackoverflow.com/questions/10943478/pandas-reindex-dataframe-with-datetime-objects#10943545"&gt;stackoverflow.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;So if you have a DataFrame with index &lt;strong&gt;[0, 1, 2]&lt;/strong&gt;, then doing a &lt;strong&gt;reindex([2, 1, 0])&lt;/strong&gt; will return the rows in reverse order. Doing something like &lt;strong&gt;reindex([8, 9, 10])&lt;/strong&gt; does not make a new index for the rows; rather, it will return a DataFrame with NaN values, since there are no rows with indices 8, 9, or 10.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To generate new index for existing rows try this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;</summary><category term="Python"></category><category term="Pandas"></category></entry><entry><title>How to manage printers in Fedora</title><link href="http://mednis.info/how-to-manage-printers-in-fedora.html" rel="alternate"></link><updated>2016-01-15T09:00:00+02:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2016-01-15:how-to-manage-printers-in-fedora.html</id><summary type="html">&lt;p&gt;In browser open &lt;strong&gt;http://localhost:631&lt;/strong&gt;&lt;/p&gt;</summary><category term="Fedora"></category></entry><entry><title>How to install LaTeX and XeLaTeX in Fedora 23</title><link href="http://mednis.info/how-to-install-latex-and-xelatex-in-fedora-23.html" rel="alternate"></link><updated>2016-01-10T18:00:00+02:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2016-01-10:how-to-install-latex-and-xelatex-in-fedora-23.html</id><summary type="html">&lt;p&gt;XeLaTeX requires a number packages. First become root, then run this command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;dnf -y install texlive
    texlive-latex
    texlive-xetex
    texlive-collection-latex
    texlive-collection-latexrecommended
    texlive-xetex-def
    texlive-collection-xetex
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Total download size: 182 M&lt;/p&gt;
&lt;p&gt;Installed size: 307 M&lt;/p&gt;
&lt;p&gt;Only if needed:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;dnf -y install texlive-collection-latexextra
&lt;/pre&gt;&lt;/div&gt;</summary><category term="Fedora"></category><category term="Latex"></category></entry><entry><title>How to disable SElinux on Fedora 23</title><link href="http://mednis.info/how-to-disable-selinux-on-fedora-23.html" rel="alternate"></link><updated>2015-12-15T10:00:00+02:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2015-12-15:how-to-disable-selinux-on-fedora-23.html</id><summary type="html">&lt;p&gt;Use the &lt;strong&gt;getenforce&lt;/strong&gt; or &lt;strong&gt;sestatus&lt;/strong&gt; commands to check the status of SELinux.&lt;/p&gt;
&lt;p&gt;On systems with SELinux disabled, the SELINUX=disabled option is configured in /etc/selinux/config&lt;/p&gt;
&lt;p&gt;As root open the file &lt;strong&gt;/etc/selinux/config&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;su -
gedit /etc/selinux/config
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;img alt="SElinux config file" src="http://mednis.info/images/2015-12-15_how-to-disable-selinux-on-fedora23/selinux_config.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Change the line &lt;strong&gt;SELINUX=enforcing&lt;/strong&gt; to &lt;strong&gt;SELINUX=disabled&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Reboot your system. After reboot, confirm that the &lt;strong&gt;getenforce&lt;/strong&gt; command returns &lt;strong&gt;Disabled&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Sources:
&lt;a href="https://docs.fedoraproject.org/en-US/Fedora/22/html/SELinux_Users_and_Administrators_Guide/sect-Security-Enhanced_Linux-Working_with_SELinux-Enabling_and_Disabling_SELinux.html"&gt;docs.fedoraproject.org&lt;/a&gt;.&lt;/p&gt;</summary><category term="Fedora"></category><category term="SElinux"></category></entry><entry><title>Things to do after fresh Fedora 23 installation</title><link href="http://mednis.info/things-to-do-after-fresh-fedora-23-installation.html" rel="alternate"></link><updated>2015-12-02T13:51:00+02:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2015-12-02:things-to-do-after-fresh-fedora-23-installation.html</id><summary type="html">&lt;p&gt;Become root and run update&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;su -
dnf update
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;RPM Fusion repository&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://rpmfusion.org/Configuration"&gt;http://rpmfusion.org/Configuration&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Install the missing software&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;dnf install gnome-tweak-tool gimp inkscape thunderbird bluefish filezilla vlc python-openoffice epiphany

dnf install VirtualBox
dnf install dconf-editor
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Software for development&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;dnf groupinstall &amp;quot;Development Tools&amp;quot;
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Scientific software&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;dnf install numpy scipy python-matplotlib python-pandas python-ipython
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Upgrade SciPy&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;dnf install python-pip blas-devel lapack-devel gcc-c++ rpm-build
dnf groupinstall &amp;quot;Development Tools&amp;quot;
pip install --upgrade scipy
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Install scikit-learn&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;pip install -U scikit-learn
&lt;/pre&gt;&lt;/div&gt;</summary><category term="Fedora"></category><category term="After install"></category></entry><entry><title>How to upgrade SciPy on Fedora 23</title><link href="http://mednis.info/how-to-upgrade-scipy-on-fedora-23.html" rel="alternate"></link><updated>2015-10-19T12:58:00+03:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2015-10-19:how-to-upgrade-scipy-on-fedora-23.html</id><summary type="html">&lt;p&gt;As it was with Fedora 22, the Fedora 23 still ships with SciPy version 0.14.1. To upgrade SciPy please run the following commands as root:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;dnf install python-pip
dnf install blas-devel
dnf install lapack-devel
dnf install gcc-c++
dnf groupinstall &amp;quot;Development Tools&amp;quot;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you now try to upgrade scipy you will get the following error&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;g++: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;On Fedora 23 one has also to install rpm-build to avoid errors during compilation of scipy:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;dnf search rpm-build
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Finally uninstall scipy 0.14.1, download 0.16.0, compile it and install. All with the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;pip install --upgrade scipy
&lt;/pre&gt;&lt;/div&gt;</summary><category term="Fedora"></category><category term="SciPy"></category></entry><entry><title>How to play encrypted DVDs on Fedora 22</title><link href="http://mednis.info/how-to-play-encrypted-dvds-on-fedora-22.html" rel="alternate"></link><updated>2015-09-08T19:27:00+03:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2015-09-08:how-to-play-encrypted-dvds-on-fedora-22.html</id><summary type="html">&lt;p&gt;Solution found here: &lt;a href="http://forums.fedoraforum.org/showthread.php?t=304745"&gt;http://forums.fedoraforum.org/showthread.php?t=304745&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;First become root:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;su -
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then execute these 7 commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;dnf install dh-autoreconf
git clone git://git.videolan.org/libdvdcss
cd libdvdcss/
autoreconf -i
./configure --prefix=/usr
make
make install
&lt;/pre&gt;&lt;/div&gt;</summary><category term="Fedora"></category></entry><entry><title>htaccess allow IP addresses</title><link href="http://mednis.info/htaccess-allow-ip-addresses.html" rel="alternate"></link><updated>2013-09-10T15:52:00+03:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2013-09-10:htaccess-allow-ip-addresses.html</id><summary type="html">&lt;p&gt;If your website is under construction, you can simply edit .htaccess file to disallow visits to your website.
Here is the code :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&amp;amp;lt;Limit GET POST PUT&amp;amp;gt;
order deny,allow
deny from all
allow from 12.245.67.190
&amp;amp;lt;/Limit&amp;amp;gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;allow from 12.245.67.190&lt;/strong&gt; command allows access to your server only from 12.245.67.190 IP address.&lt;/p&gt;
&lt;p&gt;You can allow more IP’s to access your website :
&lt;code&gt;&amp;lt;Limit GET POST PUT&amp;gt;
order deny,allow
deny from all
allow from 12.245.67.190
allow from 12.245.67.192
&amp;lt;/Limit&amp;gt;&lt;/code&gt;
This practice is good in case you are modifying your website (performing a new joomla installation) and don’t want others to see the process.&lt;/p&gt;
&lt;p&gt;Original source: &lt;a href="http://htaccessfile.com/htaccess-allow-ip-addresses" title="http://htaccessfile.com/htaccess-allow-ip-addresses"&gt;http://htaccessfile.com/htaccess-allow-ip-addresses&lt;/a&gt;&lt;/p&gt;</summary><category term="web"></category></entry><entry><title>How to add manual entries to Gnome Shell Launcher</title><link href="http://mednis.info/how-to-add-manual-entries-to-gnome-shell-launcher.html" rel="alternate"></link><updated>2013-06-01T14:45:00+03:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2013-06-01:how-to-add-manual-entries-to-gnome-shell-launcher.html</id><summary type="html">&lt;p&gt;With gnome-shell, you'll need to create a .desktop file in '~/.local/share/applications/' which will then allow you to add the application to the gnome-shell dash.&lt;/p&gt;
&lt;p&gt;My .desktop file for Sublime Text looks like this:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="cp"&gt;#!/usr/bin/env xdg-open&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Desktop&lt;/span&gt; &lt;span class="n"&gt;Entry&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;Version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;1.0&lt;/span&gt;
&lt;span class="n"&gt;Type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Application&lt;/span&gt;
&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Sublime&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;
&lt;span class="n"&gt;GenericName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Text&lt;/span&gt; &lt;span class="n"&gt;Editor&lt;/span&gt;
&lt;span class="n"&gt;Comment&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Sophisticated&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="n"&gt;editor&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;markup&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="n"&gt;prose&lt;/span&gt;
&lt;span class="cp"&gt;#Exec=/opt/sublime_text/sublime_text %F&lt;/span&gt;
&lt;span class="n"&gt;Exec&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;workspace&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sublime_text_3&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sublime_text&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="n"&gt;F&lt;/span&gt;
&lt;span class="n"&gt;Terminal&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;
&lt;span class="n"&gt;MimeType&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;plain&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;Icon&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;workspace&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sublime_text_3&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Icon&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="n"&gt;x48&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sublime&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
&lt;span class="n"&gt;Categories&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;TextEditor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;Development&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;StartupNotify&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;
&lt;span class="n"&gt;Actions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Window&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;Document&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Desktop&lt;/span&gt; &lt;span class="n"&gt;Action&lt;/span&gt; &lt;span class="n"&gt;Window&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;New&lt;/span&gt; &lt;span class="n"&gt;Window&lt;/span&gt;
&lt;span class="n"&gt;Exec&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;workspace&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sublime_text_3&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sublime_text&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Desktop&lt;/span&gt; &lt;span class="n"&gt;Action&lt;/span&gt; &lt;span class="n"&gt;Document&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;New&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;
&lt;span class="n"&gt;Exec&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;workspace&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sublime_text_3&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sublime_text&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="n"&gt;new_file&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Original source &lt;a title="linuxquestions.org" href="https://www.linuxquestions.org/questions/showthread.php?s=f8f1ededac4451385d6be370aec13d73&amp;amp;p=4350120#post4350120"&gt;here&lt;/a&gt;.&lt;/p&gt;</summary><category term="Gnome"></category></entry><entry><title>How to download a complete website</title><link href="http://mednis.info/how-to-download-a-complete-website.html" rel="alternate"></link><updated>2013-05-28T09:43:00+03:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2013-05-28:how-to-download-a-complete-website.html</id><summary type="html">&lt;p&gt;If you ever need to download an entire Web site, wget can do the job:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --adjust-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains example.com \
     --no-parent http://example.com.lv/thefolder/
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The options are:
&lt;code&gt;--recursive&lt;/code&gt;download the entire Web site.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;--domains example.com&lt;/code&gt; don't follow links outside example.com.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;--no-parent&lt;/code&gt; don't follow links outside the directory thefolder/.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;--page-requisites&lt;/code&gt; get all the elements that compose the page (images, CSS and so on).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;--html-extension&lt;/code&gt; save files with the .html extension.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;--convert-links&lt;/code&gt; convert links so that they work locally, off-line.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;--restrict-file-names=windows&lt;/code&gt; modify filenames so that they will work in Windows as well.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;--no-clobber&lt;/code&gt; don't overwrite any existing files (used in case the download is interrupted and resumed).&lt;/p&gt;
&lt;p&gt;Also note that in wget 1.12, –html-extension is renamed to –adjust-extension&lt;/p&gt;
&lt;p&gt;The orignal resource: &lt;a href="http://www.linuxjournal.com/content/downloading-entire-web-site-wget" title="http://www.linuxjournal.com/content/downloading-entire-web-site-wget" target="_blank"&gt;http://www.linuxjournal.com/...&lt;/a&gt;&lt;/p&gt;</summary><category term="web"></category></entry><entry><title>Mendeley's LibreOffice Plugin</title><link href="http://mednis.info/mendeleys-libreoffice-plugin.html" rel="alternate"></link><updated>2013-05-14T22:29:00+03:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2013-05-14:mendeleys-libreoffice-plugin.html</id><summary type="html">&lt;p&gt;Got this error:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DisposedException&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{{{&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Binary URP bridge disposed during call&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;star&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uno&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;XInterface&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="mf"&gt;@7f&lt;/span&gt;&lt;span class="mi"&gt;9191447838&lt;/span&gt;&lt;span class="p"&gt;}}}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I solved this by installing Python support for LibreOffice.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;yum install python-openoffice
&lt;/pre&gt;&lt;/div&gt;</summary><category term="LibreOffice"></category><category term="Fedora"></category></entry><entry><title>Enable Dell Latitude WiFi on Debian</title><link href="http://mednis.info/enable-dell-latitude-wifi-on-debian.html" rel="alternate"></link><updated>2013-04-08T11:28:00+03:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2013-04-08:enable-dell-latitude-wifi-on-debian.html</id><summary type="html">&lt;p&gt;I partly followed instructions on this page: &lt;a href="http://wiki.debian.org/wl" title="wiki.debian.org"&gt;http://wiki.debian.org/wl&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In terminal (as root):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;aptitude install broadcom-sta-dkms
modprobe -r b44 b43 b43legacy ssb brcmsmac
modprobe wl
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Run this command to verify:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;iwconfig
&lt;/pre&gt;&lt;/div&gt;</summary><category term="Debian"></category></entry><entry><title>How to create an SBML file using libSBML in Python</title><link href="http://mednis.info/how-to-create-an-sbml-file-using-libsbml-in-python.html" rel="alternate"></link><updated>2012-09-25T16:31:00+03:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2012-09-25:how-to-create-an-sbml-file-using-libsbml-in-python.html</id><summary type="html">&lt;p&gt;This tutorial is intended as a quick introduction on how to create an SBML file using libSBML. For a full developer's guide, please see &lt;a href="http://sbml.org/Software/libSBML/docs/python-api/"&gt;libSBML Python API&lt;/a&gt; has no title attribute.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;libsbml&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="n"&gt;document&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SBMLDocument&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;# SBML level and version&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;First you have to create compartments&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;c1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createCompartment&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;c1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;Forest&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;c1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;comp_FOREST&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Set the volume of compartments&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;c1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setVolume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Continue with other compartments&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;c2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createCompartment&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;c2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;Meadow&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;c2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;comp_Meadow&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;c2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setVolume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;When you have finished with compartments, proceed with species.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createSpecies&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;s1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;Foxes&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;spec_FOXES&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setCompartment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;comp_FOREST&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setInitialAmount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createSpecies&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;s2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;Rabbits&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;spec_RABBITS&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setCompartment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;comp_FOREST&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setInitialAmount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;s3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createSpecies&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;s3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;Snakes&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;spec_Snakes&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setCompartment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;comp_Meadow&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setInitialAmount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;When you are done with compartments and species, create reactions.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;r1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createReaction&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;r1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;Foxes eat rabbits&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;r1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;R1&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Create reactants and products&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;reac1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createReactant&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;reac1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setSpecies&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;spec_RABBITS&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;prod1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createProduct&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;prod1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setSpecies&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;spec_FOXES&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;if necessary, set Stoichiometry&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;reac1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setStoichiometry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;# 2 rabbits&lt;/span&gt;
&lt;span class="n"&gt;prod1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setStoichiometry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c"&gt;# 1 fox&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Notice that we create seemingly independent objects for comprartments, reaction, reactant and product. We set some values to the properties of these objects and never actually add these elements to the model. Thats because they are automatically added. You can try this inside a loop and it will still work.&lt;/p&gt;
&lt;p&gt;Now when you have done whith your model you have to add it to the document.
document.setModel(model)&lt;/p&gt;
&lt;p&gt;If you wish you can add optional information.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;My test model&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;MyModelID&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Save to file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;writeSBMLToFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;name_of_your_model.xml&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;That's it! Copy&amp;amp;paste this code and try it yourself!
Please note that this tutorial is really basic. For more comprehensive examples, please see the examples/ folder in the libSBML source tree.&lt;/p&gt;</summary><category term="Python"></category><category term="SBML"></category></entry><entry><title>How to install libSBML in Ubuntu 12.04 with Python bindings</title><link href="http://mednis.info/how-to-install-libsbml-in-ubuntu-1204-with-python-bindings.html" rel="alternate"></link><updated>2012-01-13T12:41:00+02:00</updated><author><name>MartinsM</name></author><id>tag:mednis.info,2012-01-13:how-to-install-libsbml-in-ubuntu-1204-with-python-bindings.html</id><summary type="html">&lt;h2&gt;Install compiler&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;apt-get install build-essential
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;On a fresh ubuntu 12.04 setup you will need to install some additional packages&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;apt-get install python2.7-dev
apt-get install libxml2-dev
apt-get install swig
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Compile and install libSBML&lt;/h2&gt;
&lt;p&gt;Go to the directory where you have exctracted libsbml source and run these 3 commands&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;./configure --with-python
make
make install
&lt;/pre&gt;&lt;/div&gt;</summary><category term="Ubuntu"></category><category term="SBML"></category></entry></feed>