Converting code to Python 3
Pledge by major Python science packages to use Python 3.
Guide to partial automatic Python 3 code update.
Detailed opinion on switching to Python 3
Pledge by major Python science packages to use Python 3.
Guide to partial automatic Python 3 code update.
Detailed opinion on switching to Python 3
Fine-grained OS Detection from Python script: windows_linux_detect.py
This standalone Python script has Boolean properties:
self.cygwin
self.wsl
self.linux
self.windows
self.mac
self.bsdMatlab and Octave are popular for machine learning prototypes due to their easier to learn (vs. R) interface.
Python via scikit-learn is also a top choice for machine learning.
Here’s how to install LibSVM for Matlab and GNU Octave.
Prereqs:
apt install make git g++Compile LibSVM
git clone https://github.com/cjlin1/libsvm
cd libsvm
makeCreates executables svm-train svm-predict svm-scale.
Compile the Matlab/Octave and Python modules, for which the API is similar.
Compile LibSVM Matlab/Octave module
cd libsvm/matlabOpen Matlab or Octave, and from that internal Terminal, type (this uses make.m)
makewhich creates a few .mex files.
See the matlab/README for examples of using LibSVM from Matlab and Octave.
Compile LibSVM Python module
cd libsvm/python
makeSee the python/README for examples of using LibSVM from Python.
The authors estimate about 75% of PMTK3 is available from Octave, while Matlab support is comprehensive. PMTK3 has been in maintenance mode for a few years, as the world has moved on Python in significant numbers. Nonetheless, PMTK3 should not be neglected for easy access to a wide variety of machine learning methods.
Install PMTK3:
git clone https://github.com/probml/pmtk3
cd pmtk3From Matlab or Octave:
initPmtk3which downloads supplementary files (one-time).
Run programs like demos/bigO.m
Trim from time to end of video–discard beginning of video. In this examples, starting at 58 seconds.
ffmpeg -i in.mp4 -ss 00:00:58 -c copy out.aviTrim from start to specified end time. In this example from 00:58 to 1:10.
ffmpeg -i in.mp4 -ss 00:00:58 -t 00:00:12 -c copy out.aviRe-encode losslessly:
ffmpeg -i in.mp4 -ss 00:00:58 -t 00:00:12 -c:v ffv1 out.aviInstall POV-Ray by:
apt install povrayor build POV-Ray from source
Example POV-Ray tutorial
#include "colors.inc"
background { color Cyan }
camera {
location <0, 2, -3>
look_at <0, 1, 2>
}
sphere {
<0, 1, 2>, 2
texture {
pigment { color Yellow }
}
}
light_source { <2, 4, -3> color White}POV-Ray can accomplish photorealistic rendering via raycasting.

To pop up your default video player upon click in Beamer LaTeX-generated PDF, use the LaTeX syntax
\href{run:myvideo.avi}{cool video}You must use either
These will NOT work
~$HOMEMatlab and GNU Octave can process PSPICE simulations using GNUCAP or NGspice.
Example for a voltage multiplier: RF energy harvesting PSPICE sim
A LaTeX Beamer presentation (slide deck) with a long table of contents as generated by
\tableofcontentsmay run off screen.
add to LaTeX preamble (near top of main .tex file):
\usepackage{multicol}Then the TOC slide will go over multiple columns. In this example Beamer slide, two column table of contents is specified:
\frame{
\begin{multicols}{2}
\tableofcontents
\end{multicols}
}For Linux desktop environments programs show up in menus from:
/usr/share/applications~/.local/share/applications ← especially for WINESometimes an application might not appear in the desktop menus because it doesn’t have a .desktop file in either of these locations.
Try opening one of the .desktop files for a program that works, and saving as a new file, editing for a program you’d like to work the same way.