<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7379110960796014170</id><updated>2026-07-31T04:34:15.673-04:00</updated><category term="links"/><category term="general"/><category term="SciComp"/><category term="OpenSource"/><category term="PopSci"/><category term="technical"/><category term="python"/><category term="HigherEd"/><category term="latex"/><category term="math"/><category term="PopScience"/><category term="personal"/><category term="puzzle"/><category term="finance"/><category term="link"/><category term="linux"/><category term="quicktip"/><category term="matlab"/><category term="software"/><category term="code"/><category term="coding"/><category term="octave"/><category term="Research"/><category term="computation"/><category term="opinion"/><category term="probability"/><category term="science"/><category term="History"/><category term="News"/><category term="RIPE"/><category term="education"/><category term="pop sci"/><category term="FunMath"/><category term="GenSci"/><category term="Util"/><category term="advise"/><category term="bayes"/><category term="course"/><category term="local"/><category term="mcmc"/><category term="pop science"/><category term="quotes"/><category term="Beamer"/><category term="Econ"/><category term="awk"/><category term="book review"/><category term="class"/><category term="classes"/><category term="comic"/><category term="computers"/><category term="dice"/><category term="fortran"/><category term="google"/><category term="grace"/><category term="higher ed"/><category term="india"/><category term="jupyter"/><category term="language"/><category term="misc"/><category term="modeling"/><category term="new links"/><category term="physics"/><category term="pop philosophy"/><category term="psychology"/><category term="quickip"/><category term="solution"/><category term="teaching"/><category term="techinical"/><category term="visualization"/><category term="writing"/><category term="Blog"/><category term="CompSci"/><category term="Inkscape"/><category term="Polymers"/><category term="SemiTechical"/><category term="Talk"/><category term="TeX"/><category term="academia"/><category term="algorithms"/><category term="astrology"/><category term="bibtex"/><category term="books"/><category term="computing"/><category term="crop"/><category term="detex"/><category term="eqnarray"/><category term="family"/><category term="fftw"/><category term="food"/><category term="free software"/><category term="fun"/><category term="funny"/><category term="galileo"/><category term="ghostscript"/><category term="gnuplot"/><category term="howto"/><category term="humor"/><category term="iit bombay"/><category term="install"/><category term="kid"/><category term="lammps"/><category term="lectures"/><category term="lit"/><category term="mac"/><category term="materials"/><category term="math links"/><category term="mathematica"/><category term="matplotlib"/><category term="mba"/><category term="media"/><category term="mocassin"/><category term="model"/><category term="molecular weight distribution"/><category term="mouse"/><category term="numerical"/><category term="numerics"/><category term="open source"/><category term="overconfidence"/><category term="paper"/><category term="pdf"/><category term="peer-review"/><category term="pics"/><category term="plotting"/><category term="podcasts"/><category term="polyethylene"/><category term="pop"/><category term="pop-psychology"/><category term="popular"/><category term="porn"/><category term="pregnancy"/><category term="prelim question"/><category term="programming"/><category term="puzzles"/><category term="quote"/><category term="r2i"/><category term="ramble"/><category term="random"/><category term="rattlesnake"/><category term="reco"/><category term="redundant"/><category term="regex"/><category term="regression"/><category term="renewable energy"/><category term="return"/><category term="screen"/><category term="scripts"/><category term="sed"/><category term="shell script"/><category term="simulation"/><category term="skin"/><category term="smoothing"/><category term="snakes"/><category term="solar"/><category term="speeding"/><category term="statistics"/><category term="stocks"/><category term="sympy"/><category term="tallahassee"/><category term="temperature"/><category term="thermodynamics"/><category term="tools"/><category term="tutorial"/><category term="twitter quotes"/><category term="uncertainty"/><category term="us"/><category term="variable"/><category term="viper"/><category term="viz"/><category term="wife"/><category term="wind"/><category term="wine"/><title type='text'>Clueless Fundatma</title><subtitle type='html'>A random walk through a subset of things I care about. Science, math, computing, higher education, open source software, economics, food etc.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>808</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-2132492234012960651</id><published>2024-08-20T08:14:00.002-04:00</published><updated>2024-08-20T08:14:22.499-04:00</updated><title type='text'>LaTeX and arxiv</title><content type='html'>&lt;p&gt;Posting a LaTeX manuscript on arxiv is straightforward.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Compile your document (say, main.tex). It is okay to leave all your figures in a &quot;figs/&quot; subfolder. Unlike some outlets, you don&#39;t have to flatten your directory structure.&lt;/li&gt;&lt;li&gt;Apart from main.tex, main.bbl [bibliography], and figures, you may delete all other files. You need the bbl file because arxiv does not run bibtex.&lt;/li&gt;&lt;li&gt;Zip the folder, and upload on arxiv.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;If you have a supplementary information document (say, si.tex) and you use the &quot;xr&quot; package to cross-reference between main.tex and si.tex, then a &lt;a href=&quot;https://tex.stackexchange.com/questions/514102/handling-main-text-and-supplementary-information-crossreferencing-each-other-on&quot;&gt;few extra steps are required&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;arxiv compiles all tex files in the zipped folder in alphabetic order. So it is important that &quot;main.tex&quot; appears before &quot;si.tex&quot;, in case your tex files have different labels.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Compile main.tex and si.tex several times on your machine, so that inter-document cross-references work as desired.&lt;/li&gt;&lt;li&gt;Apart from main.tex, si.tex, main.bbl, si.bbl, main.aux, si.aux, and figures, you may delete all other files. [xr uses main.aux and si.aux.]&lt;/li&gt;&lt;li&gt;Relabel main.tex to main_ren.tex, main.bbl to main_ren.bbl, si.tex to si_ren.tex, and si.bbl to si_ren.bbl. Do not relabel *.aux files. Do not compile.&lt;/li&gt;&lt;li&gt;Zip the folder, and upload on arxiv.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/2132492234012960651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/2132492234012960651' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/2132492234012960651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/2132492234012960651'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2024/08/latex-and-arxiv.html' title='LaTeX and arxiv'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-4748745287129665690</id><published>2024-02-22T07:47:00.005-05:00</published><updated>2024-02-22T07:47:25.732-05:00</updated><title type='text'>Large PDFs with Matplotlib</title><content type='html'>Vector graphics (SVG/PDF) outputs of scatterplots with thousands of points lead to bloated files, unlike say raster formats like PNG. This makes scrolling PDF documents that include such bloated files a painful affair.&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The reason is fairly obvious: vector files scale with the number of data-points, while raster files scale with the number of pixels.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;There are many potential solutions. The simplest is to rasterize only the large dataset of scatter points using the &lt;b&gt;rasterized=True&lt;/b&gt; flag. Thus,&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;plt.plot(x, y, &#39;o&#39;, alpha=0.1, rasterized=True)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;The resulting PDF is much lighter.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/4748745287129665690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/4748745287129665690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/4748745287129665690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/4748745287129665690'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2024/02/large-pdfs-with-matplotlib.html' title='Large PDFs with Matplotlib'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-335171618629390229</id><published>2023-09-08T14:11:00.001-04:00</published><updated>2023-09-08T14:11:13.217-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bibtex"/><category scheme="http://www.blogger.com/atom/ns#" term="latex"/><title type='text'>Merging BibTeX bibliography files</title><content type='html'>&lt;p&gt;Suppose you want to merge two bib files (f1.bib and f2.bib) that have considerable overlap. One easy solution using Jabref works as described below.&lt;/p&gt;&lt;p&gt;Suppose the target bibliography file without duplicates is merge.bib.&lt;/p&gt;&lt;p&gt;1. Copy f1.bib to merge.bib [cp f1.bib merge.bib]&lt;/p&gt;&lt;p&gt;2. Open merge.bib with Jabref&lt;/p&gt;&lt;p&gt;3. Then click File &amp;gt; Import into current database and select the other file [f2.bib]&lt;/p&gt;&lt;p&gt;4. You get a dialog box which allows you to manually decide what entries/versions you want to retain. If both f1.bib and f2.bib are of comparable quality, you can select &quot;Deselect all duplicates&quot; which automatically unselects duplicated entries.&lt;/p&gt;&lt;p&gt;5. Hit &quot;OK&quot; and save the modfied database [Ctrl-S]&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/335171618629390229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/335171618629390229' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/335171618629390229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/335171618629390229'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2023/09/merging-bibtex-bibliography-files.html' title='Merging BibTeX bibliography files'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-3340317422981657294</id><published>2023-07-09T11:47:00.001-04:00</published><updated>2023-07-09T11:47:15.883-04:00</updated><title type='text'>Two useful Matplotlib utilities</title><content type='html'>&lt;p&gt;&amp;nbsp;1. &lt;a href=&quot;https://github.com/google/latexify_py&quot;&gt;Latexify_py&lt;/a&gt;&lt;/p&gt;latexify is a Python package to compile a fragment of Python source code to a corresponding expression.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkvhaOt-w2nCi3Gg1-miCH7dG_M_x9tduaZpxEYSW5qBvWcVYjjbiCuRnOFxhXcfSXjjBIehNgcY1TB4OGE9HfM0r0BnTM2V9aXP4tYxHDY6hKRatXmuen1Uvj0def7QphVjD3h4hDZvvjVL2_KtTSrs4gGeEn1pHrHscawuPpMRZBN7TAHhjkTbsJZgx5/s637/example.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;637&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkvhaOt-w2nCi3Gg1-miCH7dG_M_x9tduaZpxEYSW5qBvWcVYjjbiCuRnOFxhXcfSXjjBIehNgcY1TB4OGE9HfM0r0BnTM2V9aXP4tYxHDY6hKRatXmuen1Uvj0def7QphVjD3h4hDZvvjVL2_KtTSrs4gGeEn1pHrHscawuPpMRZBN7TAHhjkTbsJZgx5/s16000/example.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;2. &lt;a href=&quot;https://pylustrator.readthedocs.io/en/latest/&quot;&gt;Pylustrator&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Pylustrator offers an interactive interface to find the best way to present your data in a figure for publication. Added formatting an styling can be saved by automatically generated code. To compose multiple figures to panels, pylustrator can compose different subfigures to a single figure.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;See &lt;a href=&quot;https://www.youtube.com/watch?v=xXPI4LLrNuM&amp;amp;t=134s&quot;&gt;Youtube&lt;/a&gt; demo.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/3340317422981657294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/3340317422981657294' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/3340317422981657294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/3340317422981657294'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2023/07/two-useful-matplotlib-utilities.html' title='Two useful Matplotlib utilities'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkvhaOt-w2nCi3Gg1-miCH7dG_M_x9tduaZpxEYSW5qBvWcVYjjbiCuRnOFxhXcfSXjjBIehNgcY1TB4OGE9HfM0r0BnTM2V9aXP4tYxHDY6hKRatXmuen1Uvj0def7QphVjD3h4hDZvvjVL2_KtTSrs4gGeEn1pHrHscawuPpMRZBN7TAHhjkTbsJZgx5/s72-c/example.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-4170163808684388264</id><published>2022-11-08T15:36:00.003-05:00</published><updated>2022-11-08T15:36:25.711-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="latex"/><title type='text'>LaTeX to Word</title><content type='html'>&lt;p&gt;Often I have a document in LaTeX, and somebody else needs an editable copy in Word. Here is a list of hacks I have learnt to use:&lt;/p&gt;&lt;p&gt;1. If the document is relatively free of math and figures then the simplest course is often to compile a PDF, and &quot;import&quot; the PDF into MS Word. This works out remarkably well in many cases.&lt;/p&gt;&lt;p&gt;2. The same thing above applies to figures. You can now directly drop PDF images into a Word doc.&lt;/p&gt;&lt;p&gt;3. If you have lots of equations, then it is worthwhile to use pandoc&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: #f2f2f2; color: #292929; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;&quot;&gt;pandoc mydoc.tex -o mydoc.docx&lt;/span&gt;&lt;/p&gt;&lt;p&gt;More &lt;a href=&quot;https://medium.com/@zhelinchen91/how-to-convert-from-latex-to-ms-word-with-pandoc-f2045a762293&quot;&gt;sophisticated options&lt;/a&gt; to copy cross-references, and bibliography exist. See &lt;a href=&quot;https://ja01.chem.buffalo.edu/tutorials/latex-pandoc-word.html&quot;&gt;this&lt;/a&gt; as well.&lt;/p&gt;&lt;p&gt;4. Many journals accept PDF figures. If they need TIFF, then you can use &lt;a href=&quot;https://www.adobe.com/acrobat/online/pdf-to-jpg.html&quot;&gt;Adobe Acrobat online&lt;/a&gt; to do this conversion. In my experience, this produces smaller files compared to other automatic converters including ImageMagick.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/4170163808684388264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/4170163808684388264' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/4170163808684388264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/4170163808684388264'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2022/11/latex-to-word.html' title='LaTeX to Word'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-7282680105888463669</id><published>2022-08-17T08:15:00.005-04:00</published><updated>2022-08-17T08:15:43.437-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="quicktip"/><title type='text'>Recursively Clean LaTeX Debris in all Sub-Folders</title><content type='html'>&lt;p&gt;&amp;nbsp;Often, I have a big folder like Lectures/ which may have sub-folders based on topics, and each topic might have additional folders. To clean auxillary LaTeX files in one fell swoop use,&lt;/p&gt;&lt;p&gt;find ./ \( -iname &quot;*.bbl&quot; -o -iname &quot;*.aux&quot; -o -iname &quot;*.log&quot; -o -iname &quot;*.blg&quot; -o -iname &quot;*.nav&quot; -o -iname &quot;*.snm&quot; -o -iname &quot;*.toc&quot; -o -iname &quot;*.vrb&quot; -o -iname &quot;*.out&quot; -o -iname &quot;*.synctex.gz&quot; -o -iname&amp;nbsp;_minted*&quot; \) -delete&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/7282680105888463669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/7282680105888463669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/7282680105888463669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/7282680105888463669'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2022/08/recursively-clean-latex-debris-in-all.html' title='Recursively Clean LaTeX Debris in all Sub-Folders'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-3983872237731886599</id><published>2022-07-18T11:22:00.006-04:00</published><updated>2022-07-18T11:22:48.646-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="regex"/><title type='text'>RegEx Help</title><content type='html'>&lt;p&gt;This ML based regex generator is quite handy!&amp;nbsp;&lt;/p&gt;&lt;p&gt;https://www.autoregex.xyz/home&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/3983872237731886599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/3983872237731886599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/3983872237731886599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/3983872237731886599'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2022/07/regex-help.html' title='RegEx Help'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-5273762668474203195</id><published>2022-06-22T14:30:00.000-04:00</published><updated>2022-06-22T14:30:02.649-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="lectures"/><category scheme="http://www.blogger.com/atom/ns#" term="probability"/><title type='text'>Lectures on Graphical Models</title><content type='html'>&lt;p&gt;Christopher Bishop has an excellent set (&lt;a href=&quot;https://www.youtube.com/watch?v=ju1Grt2hdko&quot; target=&quot;_blank&quot;&gt;1&lt;/a&gt;, &lt;a href=&quot;https://www.youtube.com/watch?v=c0AWH5UFyOk&quot;&gt;2&lt;/a&gt;, and &lt;a href=&quot;https://www.youtube.com/watch?v=QJSEQeH40hM&quot;&gt;3&lt;/a&gt;) of introductory lectures on &quot;Probabilistic Graphical Models&quot;. They are well-motivated and cover topics that include:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;directed and undirected graphs&lt;/li&gt;&lt;li&gt;conditional independence&lt;/li&gt;&lt;li&gt;factor graphs&lt;/li&gt;&lt;li&gt;inference using factor graphs and sum/product rules&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/5273762668474203195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/5273762668474203195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/5273762668474203195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/5273762668474203195'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2022/06/lectures-on-graphical-models.html' title='Lectures on Graphical Models'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-1563023955986480393</id><published>2022-03-22T10:21:00.001-04:00</published><updated>2022-03-22T10:39:24.916-04:00</updated><title type='text'>QuickTip: Extracting pages from PDF on Linux</title><content type='html'>&lt;p&gt;On a Mac OSX system, the default app Preview allows you to cut and paste pages from a PDF.&lt;/p&gt;&lt;p&gt;On Linux you can use &lt;a href=&quot;https://pdfchain.sourceforge.io/&quot;&gt;PDFChain&lt;/a&gt;&amp;nbsp;to manipulate PDFs. If you simply want to extract a certain range, then &lt;a href=&quot;https://qpdf.sourceforge.io/&quot;&gt;qpdf&lt;/a&gt; is quite handy.&lt;/p&gt;&lt;p&gt;A CLI solution is to use ghostscript as described &lt;a href=&quot;https://www.linuxjournal.com/content/tech-tip-extract-pages-pdf&quot;&gt;here&lt;/a&gt;:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER \&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-dFirstPage=1 -dLastPage=15 -sOutputFile=outfile.pdf inpfile.pdf&lt;/span&gt;&lt;/p&gt;&lt;p&gt;You can make the interface friendlier by saving a function in your bashrc as described in the article.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/1563023955986480393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/1563023955986480393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/1563023955986480393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/1563023955986480393'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2022/03/quicktip-extracting-pages-from-pdf-on.html' title='QuickTip: Extracting pages from PDF on Linux'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-7180703147324476552</id><published>2021-04-02T15:01:00.005-04:00</published><updated>2021-04-02T15:01:53.338-04:00</updated><title type='text'>Matplotlib: Lines Connecting Points and Boxes</title><content type='html'>&lt;p&gt;This &lt;a href=&quot;https://gist.github.com/shane5ul/bd7e12b6bc0c7a8915f11e638bef5195&quot;&gt;gist&lt;/a&gt;&amp;nbsp;has python functions that help Matplotlib draw lines connecting points, and to draw boxes.&lt;/p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;def drawBox(xlim, ylim):&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;pts = [[xlim[0], ylim[0]], [xlim[1], ylim[0]],&amp;nbsp;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[xlim[1], ylim[1]], [xlim[0], ylim[1]],&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[xlim[0], ylim[0]]]&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;x, y = zip(*pts)&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;return x, y&lt;br /&gt; &lt;br /&gt; def connectPoints(pts):&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;x, y = zip(*pts)&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;return x, y&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/7180703147324476552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/7180703147324476552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/7180703147324476552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/7180703147324476552'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2021/04/matplotlib-lines-connecting-points-and.html' title='Matplotlib: Lines Connecting Points and Boxes'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-1627753946851645812</id><published>2021-03-30T08:51:00.005-04:00</published><updated>2021-03-30T08:51:59.812-04:00</updated><title type='text'>Quicktip: Batch convert LibreOffice documents to PDF</title><content type='html'>&lt;p&gt;To convert all the DOCX files the current working directory to PDF&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp;lowriter --headless --convert-to pdf *.docx&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Similarly, to convert ODT files,&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp;lowriter --headless --convert-to pdf *.docx&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/1627753946851645812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/1627753946851645812' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/1627753946851645812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/1627753946851645812'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2021/03/quicktip-batch-convert-libreoffice.html' title='Quicktip: Batch convert LibreOffice documents to PDF'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-9144808658838399408</id><published>2021-02-03T21:03:00.001-05:00</published><updated>2021-02-03T21:03:02.836-05:00</updated><title type='text'>QuickTip: LaTeX multiline equations with explanations</title><content type='html'>&lt;p&gt;Sometimes you want to write a sequence of steps, and write the explanation for each step next to it.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;abc = xyz&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;pythagoras rule&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;= uvw&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;triangle inequality&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;= ABC&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;It is easy to do this with the amsmath package as detailed in &lt;a href=&quot;https://tex.stackexchange.com/questions/12621/multi-line-equations-with-explanations-on-some-lines&quot;&gt;this StackOverflow question&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;lang-tex s-code-block hljs latex&quot; style=&quot;border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 19.5px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\usepackage&lt;/span&gt;{amsmath}

&lt;span class=&quot;hljs-keyword&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\begin&lt;/span&gt;{align*}
abc &lt;span class=&quot;hljs-built_in&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-literal); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;amp;&lt;/span&gt;= xyz &lt;span class=&quot;hljs-keyword&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;
&lt;span class=&quot;hljs-built_in&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-literal); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;amp;&lt;/span&gt;= uvw &lt;span class=&quot;hljs-built_in&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-literal); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;hljs-built_in&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-literal); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\text&lt;/span&gt;{pythagoras rule} &lt;span class=&quot;hljs-keyword&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;
&lt;span class=&quot;hljs-built_in&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-literal); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;amp;&lt;/span&gt;= D &lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hljs-built_in&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-literal); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;hljs-built_in&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-literal); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\text&lt;/span&gt;{triangle inequality} &lt;span class=&quot;hljs-keyword&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;
&lt;span class=&quot;hljs-built_in&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-literal); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;amp;= ABC &lt;/span&gt;&lt;span class=&quot;hljs-built_in&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-literal); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;hljs-built_in&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-literal); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;amp;&lt;/span&gt; 
&lt;span class=&quot;hljs-keyword&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\end&lt;/span&gt;{align*}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/9144808658838399408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/9144808658838399408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/9144808658838399408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/9144808658838399408'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2021/02/quicktip-latex-multiline-equations-with.html' title='QuickTip: LaTeX multiline equations with explanations'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-6978117268717848934</id><published>2020-12-07T16:29:00.001-05:00</published><updated>2020-12-07T16:29:10.007-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="math"/><title type='text'>Smooth Transition Between Functions</title><content type='html'>&lt;p&gt;&amp;nbsp;Stitching together two functions is sometimes required as a way to transition from one dependence to another. The following schematic describes the idea pictorially:&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtM0Yk_Xgs0s81QfCgXFXk2_SlkxosU-_O4me6GdBPJOzEUa7qLZORrm_Y0M4rpN2ZmUDhbbzC4kGLmP0oFR0ikXX0GWDOmiIYjsSOUKxZeULuQPhl2aDb7koSCo2c4HXaWddRsCxPI1Ak/s917/School+Work-3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;859&quot; data-original-width=&quot;917&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtM0Yk_Xgs0s81QfCgXFXk2_SlkxosU-_O4me6GdBPJOzEUa7qLZORrm_Y0M4rpN2ZmUDhbbzC4kGLmP0oFR0ikXX0GWDOmiIYjsSOUKxZeULuQPhl2aDb7koSCo2c4HXaWddRsCxPI1Ak/w200-h188/School+Work-3.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;Two different approaches are considered in this &lt;a href=&quot;https://drive.google.com/file/d/1-6o3FvJaRSHLp3hFvUtG-Q7jhZmoEYTZ/view&quot;&gt;PDF&lt;/a&gt; (or this &lt;a href=&quot;https://drive.google.com/file/d/1dSf-806icmN1GQf0E_0P3ukj3NTaCRwx/view?usp=sharing&quot;&gt;Jupyter Notebook&lt;/a&gt;).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/6978117268717848934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/6978117268717848934' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/6978117268717848934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/6978117268717848934'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2020/12/smooth-transition-between-functions.html' title='Smooth Transition Between Functions'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtM0Yk_Xgs0s81QfCgXFXk2_SlkxosU-_O4me6GdBPJOzEUa7qLZORrm_Y0M4rpN2ZmUDhbbzC4kGLmP0oFR0ikXX0GWDOmiIYjsSOUKxZeULuQPhl2aDb7koSCo2c4HXaWddRsCxPI1Ak/s72-w200-h188-c/School+Work-3.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-8502572431310449563</id><published>2020-10-26T07:40:00.001-04:00</published><updated>2020-10-26T07:40:14.482-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="SciComp"/><title type='text'>Trapezoidal rule in log-log space</title><content type='html'>Consider the problem described in this &lt;a href=&quot;https://scicomp.stackexchange.com/questions/20901/integral-in-log-log-space&quot;&gt;StackOverFlow post&lt;/a&gt;. You have a function with certain smoothness properties that are apparent on a log-log plot. This is often accompanied by a large domain of integration. It seems worthwhile to &quot;integrate in logspace&quot;, whatever that means.&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This &lt;a href=&quot;https://gist.github.com/shane5ul/06d000b066636dbaf111187bb4264a2f&quot; target=&quot;_blank&quot;&gt;Jupyter notebook&lt;/a&gt; probes this question and makes some recommendations.&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/8502572431310449563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/8502572431310449563' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/8502572431310449563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/8502572431310449563'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2020/10/trapezoidal-rule-in-log-log-space.html' title='Trapezoidal rule in log-log space'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-6147677137041679267</id><published>2020-05-20T17:37:00.003-04:00</published><updated>2020-05-20T17:37:21.446-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Quicktip: Reindent Python Scripts</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Suppose part of a python file uses spaces for indentation, while another part uses tabs. This will throw up exceptions at runtime. So the &lt;a href=&quot;https://stackoverflow.com/questions/1024435/how-to-fix-python-indentation&quot;&gt;question&lt;/a&gt;&amp;nbsp;is how to fix it.&lt;br /&gt;
&lt;br /&gt;
One answer is to use the python script &lt;a href=&quot;https://svn.python.org/projects/python/trunk/Tools/scripts/reindent.py&quot;&gt;reindent.py&lt;/a&gt;. Stick it in some folder (~/bin/) in the default path and make it executable (&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;chmod +x reindent.py&lt;/span&gt;).&lt;br /&gt;
&lt;br /&gt;
The &lt;a href=&quot;https://stackoverflow.com/questions/27031912/howto-use-reindent-py-for-dummies&quot;&gt;usage&lt;/a&gt; is straightforward:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;reindent -n file.py&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
modifies the original file in place.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/6147677137041679267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/6147677137041679267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/6147677137041679267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/6147677137041679267'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2020/05/quicktip-reindent-python-scripts.html' title='Quicktip: Reindent Python Scripts'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-9037155008202118086</id><published>2020-05-17T21:54:00.004-04:00</published><updated>2020-05-17T21:54:30.489-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Matplotlib: Saving TIFF and JPG formats</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
With pillow installed, on my LinuxMint installation:&lt;br /&gt;
&lt;br /&gt;
import matplotlib&lt;br /&gt;
matplotlib.use(&#39;TkAgg&#39;) # backend&lt;br /&gt;
&lt;br /&gt;
x = np.linspace(0,1)&lt;br /&gt;
plt.plot(x, x**2)&lt;br /&gt;
plt.savefig(&#39;test.tiff&#39;, dpi=300, fmt=&quot;tiff&quot;, pil_kwargs={&quot;compression&quot;: &quot;tiff_lzw&quot;})&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/9037155008202118086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/9037155008202118086' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/9037155008202118086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/9037155008202118086'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2020/05/matplotlib-saving-tiff-and-jpg-formats.html' title='Matplotlib: Saving TIFF and JPG formats'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-5938818558135056286</id><published>2020-01-20T12:31:00.001-05:00</published><updated>2020-01-20T12:31:15.246-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fortran"/><category scheme="http://www.blogger.com/atom/ns#" term="quicktip"/><title type='text'>QuickTip: Catching array bounds violations in Fortran 90</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
With gfortran, you can check &lt;a href=&quot;https://jblevins.org/log/double-free&quot;&gt;if array bounds are violated&lt;/a&gt; during runtime by,&lt;br /&gt;
&lt;br /&gt;
gfortran -fbounds-check myProg.f90&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/5938818558135056286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/5938818558135056286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/5938818558135056286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/5938818558135056286'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2020/01/quicktip-catching-array-bounds.html' title='QuickTip: Catching array bounds violations in Fortran 90'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-8002400868511069481</id><published>2019-10-18T16:36:00.002-04:00</published><updated>2019-10-18T16:36:30.301-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="latex"/><category scheme="http://www.blogger.com/atom/ns#" term="quicktip"/><title type='text'>LaTeX: Cross-referencing between Different Documents</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Problem&lt;/b&gt;: I have a manuscript TeX file (main.tex), and an independent supporting information file (si.tex). I was to cross-reference (using \label and \ref) items across the two files.&lt;br /&gt;
&lt;br /&gt;
For example, I might want to reference figure 1 from si.tex in main.tex.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Solution&lt;/b&gt;: As this &lt;a href=&quot;https://tex.stackexchange.com/questions/14364/cross-referencing-between-different-files&quot;&gt;SO answer&lt;/a&gt; suggests, the answer lies in the CTAN package &lt;a href=&quot;https://ctan.org/pkg/xr?lang=en&quot;&gt;xr&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
In main.tex, just include &quot;si.tex&quot; as an external documents, and all its labels become visible!&lt;br /&gt;
&lt;br /&gt;
\usepackage{xr}&lt;br /&gt;
\externaldocument{si}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/8002400868511069481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/8002400868511069481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/8002400868511069481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/8002400868511069481'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2019/10/latex-cross-referencing-between.html' title='LaTeX: Cross-referencing between Different Documents'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-9076001693744905870</id><published>2019-10-17T08:14:00.003-04:00</published><updated>2019-10-17T08:14:59.636-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Parameter Uncertainty in Numpy Polyfit</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Say you want to fit a line to (x,y) data. With &lt;a href=&quot;https://docs.scipy.org/doc/numpy/reference/generated/numpy.polyfit.html&quot;&gt;polyfit&lt;/a&gt;, you can say,&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
coeff = np.polyfit(x, y, 1)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
With numpy 1.7 and greater, you can also &lt;a href=&quot;https://stackoverflow.com/questions/27757732/find-uncertainty-from-polyfit&quot;&gt;request the estimated covariance matrix&lt;/a&gt;,&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
coeff, cov = np.polyfit(x, y, 1, cov=True)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The standard error on the parameters is the square-root of the diagonal elements&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
print(np.sqrt(np.diag(cov)))&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This &lt;a href=&quot;https://ipnpr.jpl.nasa.gov/progress_report/42-122/122E.pdf&quot;&gt;report&lt;/a&gt; referenced in the SO page is quite useful!&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/9076001693744905870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/9076001693744905870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/9076001693744905870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/9076001693744905870'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2019/10/parameter-uncertainty-in-numpy-polyfit.html' title='Parameter Uncertainty in Numpy Polyfit'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-7783801797054789719</id><published>2019-09-30T17:17:00.000-04:00</published><updated>2019-09-30T17:17:01.178-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="technical"/><title type='text'>Learning Gaussian Processes</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I&#39;ve been studying up Gaussian process modeling for machine learning.&lt;br /&gt;
&lt;br /&gt;
For someone seeing these concepts for the first time, I would recommend the following sequence based on my experience:&lt;br /&gt;
&lt;br /&gt;
1. &lt;a href=&quot;https://distill.pub/2019/visual-exploration-gaussian-processes/&quot;&gt;A Visual Exploration of Gaussian Processes&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
It hits the key points of what makes multinormal distributions special (conditionals and marginals are normal too!), and the visuals help build intuition.&lt;br /&gt;
&lt;br /&gt;
1a. &lt;a href=&quot;https://katbailey.github.io/post/gaussian-processes-for-dummies/&quot;&gt;Gaussian Processes for Dummies&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You might not need this, but I like this essay because it is jargon-free, and focuses on how to get things going. There is python code at the end, which you can play with.&lt;br /&gt;
&lt;br /&gt;
2. Chapter 2 of &lt;a href=&quot;http://www.gaussianprocess.org/gpml/chapters/RW.pdf&quot;&gt;Gaussian Process for Machine Learning&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This &quot;bible&quot; is astonishingly well-written. If you are familiar with linear algebra and some statistics, this is a breezy read. Plus, all the important formulae and algorithms you see in different articles, are available here in one place!&lt;br /&gt;
&lt;br /&gt;
3. If you like videos, then &lt;a href=&quot;https://www.youtube.com/watch?v=R-NUdqxKjos&quot;&gt;this YouTube lecture&lt;/a&gt; might be worth watching!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/7783801797054789719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/7783801797054789719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/7783801797054789719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/7783801797054789719'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2019/09/learning-gaussian-processes.html' title='Learning Gaussian Processes'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-915547280223216176</id><published>2019-08-22T14:14:00.003-04:00</published><updated>2019-08-22T14:14:42.405-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="quicktip"/><title type='text'>QuickTip: Toggling to Previous View in PDF Readers:</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I use Preview (on my Mac laptop) and Foxit Reader (on my Linux Desktop) to read PDFs.&lt;br /&gt;
&lt;br /&gt;
While reading papers, I often find myself clicking on links to citations. This takes me to the reference section. After looking up the citation, I like to go back to the previous location on the paper (right before clicking on the link).&lt;br /&gt;
&lt;br /&gt;
How to go back to the &quot;previous view&quot; isn&#39;t well documented.&lt;br /&gt;
&lt;br /&gt;
In Preview, the short cut is &quot;Cmd + [&quot; and &quot;Cmd + ]&quot;.&lt;br /&gt;
&lt;br /&gt;
In Foxit Reader for Linux (v2.4 and above) the short cut is &quot;Alt + Left Arrow&quot; and &quot;Alt + Right Arrow&quot;, respectively.&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/915547280223216176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/915547280223216176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/915547280223216176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/915547280223216176'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2019/08/quicktip-toggling-to-previous-view-in.html' title='QuickTip: Toggling to Previous View in PDF Readers:'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-5277852549021918834</id><published>2019-07-05T08:38:00.001-04:00</published><updated>2019-07-05T08:38:12.147-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="quicktip"/><title type='text'>QuickTip: Math Font in Matplotlib</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Matplotlib (v2 and higher) uses &quot;&lt;a href=&quot;https://matplotlib.org/users/mathtext.html#mathtext-tutorial&quot;&gt;mathtext&lt;/a&gt;&quot; to render math by default. It is quite capable, but I don&#39;t like the default font, and prefer the classic &quot;Computer Modern&quot; font.&lt;br /&gt;
&lt;br /&gt;
You can fix this globally by modifying the rc file in your custom-style file (use the command matplotlib.get_configdir() to find location) by adding the line:&lt;br /&gt;
&lt;br /&gt;
mathtext.fontset : cm&lt;br /&gt;
&lt;br /&gt;
If you want to render all text using LaTeX (this slows down rendering somewhat), then use:&lt;br /&gt;
&lt;br /&gt;
text.usetex : true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/5277852549021918834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/5277852549021918834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/5277852549021918834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/5277852549021918834'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2019/07/quicktip-math-font-in-matplotlib.html' title='QuickTip: Math Font in Matplotlib'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-8701390930265791343</id><published>2019-07-03T09:15:00.000-04:00</published><updated>2019-07-03T09:15:06.051-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="math"/><title type='text'>Snip Math</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;https://mathpix.com/&quot;&gt;Mathpix Snip&lt;/a&gt; looks like an amazing tool.&lt;br /&gt;
&lt;br /&gt;
You take a screenshot of some math and get it rendered in LaTeX.&lt;br /&gt;
&lt;br /&gt;
The process as illustrated on their website:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKv5F4veekyuh8OMZzbBpvhGcDNxG0KHBRv4Sk7GxnSXzIdok6CI_IJPlmPHIVw_N9meQrl-M_w6dJO8YsoXAr7o1c-vym5h24F5T_Wltl4EKm1p7Y43I3qzp_2dTkk-FYXCfJBtVcuUDO/s1600/mathpix.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;894&quot; data-original-width=&quot;1100&quot; height=&quot;259&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKv5F4veekyuh8OMZzbBpvhGcDNxG0KHBRv4Sk7GxnSXzIdok6CI_IJPlmPHIVw_N9meQrl-M_w6dJO8YsoXAr7o1c-vym5h24F5T_Wltl4EKm1p7Y43I3qzp_2dTkk-FYXCfJBtVcuUDO/s320/mathpix.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
It is available for download on all major OS.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/8701390930265791343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/8701390930265791343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/8701390930265791343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/8701390930265791343'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2019/07/snip-math.html' title='Snip Math'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKv5F4veekyuh8OMZzbBpvhGcDNxG0KHBRv4Sk7GxnSXzIdok6CI_IJPlmPHIVw_N9meQrl-M_w6dJO8YsoXAr7o1c-vym5h24F5T_Wltl4EKm1p7Y43I3qzp_2dTkk-FYXCfJBtVcuUDO/s72-c/mathpix.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-7602759657752126246</id><published>2019-06-26T09:24:00.000-04:00</published><updated>2019-06-26T09:24:00.440-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pop philosophy"/><title type='text'>Zero and Infinity</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
A triangle has three corners.&lt;br /&gt;
&lt;br /&gt;
A pentagon has five. A decagon has ten.&lt;br /&gt;
&lt;br /&gt;
As the number of corners becomes large, the polygon becomes more &quot;circular&quot;.&lt;br /&gt;
&lt;br /&gt;
When the number of corners is &lt;b&gt;infinity&lt;/b&gt;, the polygon is a circle - a shape with &lt;b&gt;zero&lt;/b&gt; corners!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/7602759657752126246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/7602759657752126246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/7602759657752126246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/7602759657752126246'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2019/06/zero-and-infinity.html' title='Zero and Infinity'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7379110960796014170.post-1121502545138802983</id><published>2019-06-19T09:21:00.002-04:00</published><updated>2019-06-19T09:21:25.038-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="links"/><title type='text'>Links</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
1. &lt;a href=&quot;https://www.albertbridgecapital.com/drew-views/2019/6/17/stay-in-the-game&quot;&gt;Stay in the Game&lt;/a&gt;: There is hope in humanity!&lt;br /&gt;
&lt;br /&gt;
2. Kevin Simler&#39;s graphical essay on &lt;a href=&quot;https://meltingasphalt.com/interactive/going-critical/&quot;&gt;going critical&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
3. The &lt;a href=&quot;http://news.mit.edu/2019/gil-strang-still-going-strong-online-and-print-0508?fbclid=IwAR07UwAs87CQfRFRTSli6ulwZnpXMvlhENmJfAF9qNmikOPSaZLgU99FQPA&quot;&gt;force of Gilbert Strang&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
4. Strogatz&#39;s &quot;&lt;a href=&quot;https://frankeprogram.yale.edu/event/steven-strogatz-lecture-april-26-2019&quot;&gt;Beauty of Calculus&lt;/a&gt;&quot; Lecture&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sachinashanbhag.blogspot.com/feeds/1121502545138802983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7379110960796014170/1121502545138802983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/1121502545138802983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7379110960796014170/posts/default/1121502545138802983'/><link rel='alternate' type='text/html' href='http://sachinashanbhag.blogspot.com/2019/06/links.html' title='Links'/><author><name>Sachin Shanbhag</name><uri>http://www.blogger.com/profile/08932887228149182854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>