tag: posts

Opencv-python script with argparse

May 2, 2024

This is a post cover adding comand line arguments to an opencv-python script using argparse. This continues the series of post on opencv-python in Pop!_OS/Ubuntu 22.04.

Save video capture using opencv-python on Pop!_OS 22.04

Apr 25, 2024

This is a short post describing how to save captured video to mp4 format using opencv-python on Pop!_OS 22.04 (this should work on all/most Ubuntu 22.04-related operating systems as well!

Video capture using opencv-python on Pop!_OS 22.04

Apr 23, 2024

This is a short post to document a script that captures video and converts to grayscale using opencv-python on Pop!_OS 22.04 (this should work on all/most Ubuntu 22.04-related operating systems as well!

Install OpenCV-python using pip

Apr 19, 2024

This is a very short post to document how I installed opencv-python on Pop!_OS 22.04 using pip and virtualenvwrapper. This should work for Ubuntu 22.04 as well.

Install Inkscape using PPA on Pop!_OS 22.04

Nov 3, 2022

This is a very short post to document how I installed Inkscape on Pop!_OS 22.04 using their PPA. Of course, this would work for Ubuntu 22.04 as well.

VPS setup on digitalocean

Nov 2, 2022

In this post I will document my setup of an Ubuntu 22.04 VPS at Digital Ocean. I will provide links to resources at digitalocean that guided the choices I made. Of course, this is just one way to do it so read mutiple resources if you are trying this yourself.

Install OpenToonz on Pop!_OS 22.04

Oct 4, 2022

In this post I detail my install process for OpenToonz, an amazing tool for creating animation videos, on Pop!_OS 22.04. Again, I will be using flatpak, as I did with Shotcut in the previous post.

Install Shotcut on Pop!_OS 22.04

Oct 3, 2022

In this post I detail my install process for Shotcut, a video editor, on Pop!_OS 22.04. Pop!_OS 22.04 is very similar to Ubuntu 22.04, but has chosen to use flatpak instead of snap.

Install Tex Live 2016 on Ubuntu 16.04

Oct 31, 2016

On Ubuntu 14.04 I went through a fairly involved procedure to get the current TeX Live (TeX Live 2013 at that time) installed because it was not in the standard repository. However, it seems that there is now a much easier way to get TeX Live 2016: J Fernyhough has put together a PPA-- kudos to him! (sorry, no longer exists)

dropbox on Ubuntu 16.04

Oct 10, 2016

This a very brief post on installing dropbox on Ubuntu 16.04, mainly to remind myself how I got it working. In the end, it's the most straightforward approach, but not the one I found at the dropbox website. So, be careful.

Python setup on Ubuntu 16.04

Sep 21, 2016

In this post I will document my approach to python on Ubuntu 16.04. To be clear, this is not the only way to do things and I make no claims that it is the best strategy. However, it is useful for me to write this information down for future reference. Who knows, it might be helpful for you too!? Let me know if it is. I also love to read about other approaches, so leave comments and/or links below.

vim and vundle on Ubuntu 16.04

Sep 21, 2016

I have just upgraded to Ubuntu 16.04, the new long-term-stable distribution of Ubuntu. This means I will be installing all of my trusted computing tools on this new distribution as well as reconsidering some of my approaches. In this post I'll go over a new approach to my vim setup for Ubuntu 16.04, changing from pathogen to vundle plugin management.

ES2015 using Node, Babel and Webpack

Jul 13, 2016

In this post I will cover setting up a project that uses ES2015/ES6 -- modern JavaScript-- that will still work in current web browsers that need ES5. The trick is to use Babel to transpile ES2015/ES6 code to ES5, which can run on current browsers. Why do this? Well, ES2015/ES6 is the future of JavaScript and I'd like to start using it now.

Upgrading to Meteor 1.3 on Ubuntu 14.04

Mar 30, 2016

In a recent post I documented the install process for Meteor -- at that time the current version was 1.2.1. Well, the new version -- 1.3 -- is out and I will briefly document the upgrade process and provide some links to new guides and tutorials that the MDG (Meteor Development Group) has released.

A d3 experiment on my Tinkerer blog

Mar 15, 2016

This blog uses Tinkerer, which is based on the Sphinx documentation framework, to create static html pages from rest (rst) markup. If you are familiar with the Python world you've probably created documentation using Sphinx, or at the very least, you have read documenation created in Sphinx. Because the setup is Python-focused, it is not straightforward to write posts that employ javascript libraries like d3. This post describes my method for doing javascript examples in Tinkerer blog posts or Sphinx docs, as well as how to do some d3.

Install Meteor on Ubuntu 14.04

Mar 14, 2016

I've been spending a lot of time working with Meteor recently. This framework uses javascript and MongoDB to create a full stack solution that is pretty easy to use. The installation is simple and painless on Ubuntu 14.04, but I'll document my process here for reference and provide some links for learning more about Meteor.

Installing node LTS version on Ubuntu 14.04

Mar 14, 2016

In a previous post I installed nodejs on Ubuntu 14.04 using what were current instructions at the time. Those notes are outdated at this point so I thought I'd document the current way to install the LTS version of node.

Installing MongoDB Community Edition on Ubuntu 14.04

Feb 18, 2016

In this post I'll cover installing the Community Edition of MongoDB on Ubuntu 14.04 in a way that lets me use more recent versions of MongoDB than are available using the standard sudo apt-get install. If that sounds interesting, follow along.

Arduino on Ubuntu 14.04 without the Arduino IDE

Dec 8, 2015

In this post I will document my setup for working with an Arduino Uno on Ubuntu 14.04. However, be warned, I am not going to use the official Arudino IDE. Instead I'm going to setup the basic requirements for writing and pushing code, including libraries and make files, and use vim as my editor. So, if you're interested in this approach, follow along.

Installing Fiona on Ubuntu 14.04

Aug 20, 2015

This post consists of some quick notes on installing Fiona, a Python interface to OGR, which is a tool that one might want if working with GIS data on a regular basis. I'm trying to do things like convert shapefiles to geojson-- without much luck until now (see below)-- and this is one of the tools I'm looking at as part of the solution. If you want to install Fiona on Ubuntu 14.04 follow along.

Decision trees in python again, cross-validation

Jun 25, 2015

This is my second post on decision trees using scikit-learn and Python. The first post focused on visualizing the resulting tree. This post will concentrate on using cross-validation methods to choose the parameters used to train the tree. In particular, I'll focus on grid and random search for decision tree parameter settings. If this sounds interesting to you, following along. As always, comments, questions and corrections are welcome below.

PySoundFile and Python 3.4 on Ubuntu 14.04

Jun 16, 2015

In a previous post I went over installing PySoundFile on Ubuntu 14.04 using the default version of Python-- that's version 2.7.6. In this post I'll cover the use of Python 3.4 in a virtual environment-- the goal here, at least in the long run, is to write audio processing (dsp) code in Python that is version 2- and 3-compatible.

Decision trees in python with scikit-learn and pandas

Jun 8, 2015

In this post I will cover decision trees (for classification) in python, using scikit-learn and pandas. The emphasis will be on the basics and understanding the resulting decision tree.

Revisiting the medical tests example with Python and Lea

May 27, 2015

In this post I will use Python, and the probabilistic programming package Lea, to re-analyze an example of Bayes' Theorem covered in an earlier post. The focus will be on translating the by-hand calculations into Python code.

Probabilistic programming with Python and Lea

May 4, 2015

In this post I will cover installation of a probabilistic programming package for Python called Lea and provide some simple examples of using the package to do calculations with joint, conditional and marginal distributions. These examples follow the by-hand calculations done in a previous post.

JOINs, and some VIEWs, in MySQL

Apr 30, 2015

This is the third in a series of posts on MySQL. The first post covered setting up MySQL and basic queries and the second post covered simple queries using SELECT, LIMIT, ORDER BY, etc. If you are starting out, you should start with these posts. In this post I will go over multi-table queries, using JOINs (with some help from VIEWs).

Employees database for MySQL, setup and simple queries

Apr 22, 2015

In a recent post I covered MySQL setup on Ubuntu 14.04. In this post I will cover downloading and setting up the employees sample database that will be used for the example queries in this, and other posts, on my blog. As mentioned in the previous post, I'm using Jump Start MySQL as a guide book for these posts-- you should check it out for more examples.

Installing MySQL on Ubuntu 14.04

Apr 21, 2015

In this post I will cover installing MySQL on Ubuntu 14.04, using the repository available at the mysql apt repo. The idea is to setup a repository that allows our MySQL to be current-- in this case MySQL 5.6. The instructions I'm documenting here are derived from the above link, as well as the nice book Jump Start MySQL (April 2015). If this is of interest to you, follow along and be sure checkout the resources mentioned above.

Getting started with responsive websites and JavaScript

Apr 3, 2015

In this post I'm going to describe two basic web pages I've been working on: 1) a basic responsive page, and 2) a responsive page that uses JavaScript to detect the current size of the screen. My goal here is to use basic HTML, CSS and JavaScript -- no js libraries -- to help myself learn JavaScript and responsive data visualization techniques. That said, I'm not an expert, and the examples should be considered with that in mind. Please comment at the end of the post if you have better, or different, ways of doing the same thing.

Installing PySoundFile on Ubuntu 14.04

Mar 3, 2015

In this post I will go over installing PySoundFile using pip and virtualenvwrapper. PySoundFile is a utility for reading and writing sound files of various types, like wav, flac, and ogg using the abilities of the libsndfile library. Noticeably absent is mp3 due to the license issue-- use a tool like (the wonderful) sox to convert mp3's to a supported file type.

Install QGIS on Ubuntu 14.04

Feb 17, 2015

In this post I will cover my install process for QGIS on Ubuntu 14.04. QGIS is a tool for creating maps and working with geospatial information. The official QGIS installation instructions provide three different ways to install the software. I'll be using the UbuntuGIS ppa to get access to more recent versions of the relevant GIS software, including QGIS.

Using Python to query data from Socrata

Feb 17, 2015

I've started going to Open Oakland meetings on Tuesday nights. The group works on a variety of projects related to making city data more accessible and usable for Oakland citizens by creating websites, or apps.

Installing Node.js and npm on Ubuntu 14.04

Jan 12, 2015

I've decided to start being systematic about learning javascript, with a focus on getting good with d3js. I'll be installing nodejs and npm (node package manager) as a way to get access to a javascript console and, for later, a powerful javascript environment.

Inferring probabilities with a Beta prior, a third example of Bayesian calculations

Dec 11, 2014

In this post I will expand on a previous example of inferring probabilities from a data series. In particular, instead of considering a discrete set of candidate probabilities, I'll consider all (continuous) values between \( 0 \) and \( 1 \). This means our prior (and posterior) will now be a probability density function (pdf) instead of a probabilty mass function (pmf). More specifically, I'll use the Beta Distribution for this example.

Installing essentia for audio feature extraction

Dec 10, 2014

Some notes on the installation of essentia, a collection of c++ code with Python wrappers for audio feature extraction, following the essentia installation guide.

Getting started with Latent Dirichlet Allocation in Python

Nov 13, 2014

In this post I will go over installation and basic usage of the lda Python package for Latent Dirichlet Allocation (LDA). I will not go through the theoretical foundations of the method in this post. However, the main reference for this model, Blei et. al. (2003) is freely available online and I think the main idea of assigning documents in a corpus (set of documents) to latent (hidden) topics based on a vector of words is fairly simple to understand and the example will help to solidify our understanding of the LDA model.

Inferring probabilities, a second example of Bayesian calculations

Oct 24, 2014

In this post I will focus on an example of inferring probabilities given a short data series. I will start by tackling the theory of how to do the desired inference in a Bayesian way and will end by implementing the theory in Python so that we can play around with the ideas. In an attempt to keep the post more accessible, I will only consider a small set of candidate probabilities. This restriction allows me to minimize the mathematical difficulty of the inference and still obtain really cool results, including nice plots of the prior, likelihood and posterior.

Python 3.4 on Ubuntu 14.04 using virtual environments

Sep 16, 2014

In a previous post I talked about using virtual environments with the default Python version-- this is Python 2.7.6 for Ubuntu 14.04. However, both Python 2.7 and 3.4 are available on Ubuntu 14.04. In this post I'll go over setting up a virtual environment for working with Python 3 code.

Medical tests, a first example of Bayesian calculations

Sep 11, 2014

In this post I will discuss a first example of a Bayesian calculation using a well-known example of testing for breast cancer.

virtualenv and virtualenvwrapper on Ubuntu 14.04

Sep 4, 2014

In this post I'll go over my attempt to setup virtual environments for Python development. Most Python users probably don't want to use virtual environments and should just set up a single user environment that works for their needs. However, if you are working on writing one or more Python modules or packages, these tools are geared towards creating isolated Python environments for each project. This is very useful for keeping track of such things as the minimal Python requirements for each project.

Installing virtualbox on Ubuntu 14.04

Sep 2, 2014

In this post I will cover installing Oracle's virtualbox on Ubuntu 14.04. This will allow me to run Windows and tableau, a program for putting together interactive visualizations. If you are running Ubuntu and taking Coursera's introduction to data science class you might find this post useful as well. However, having virtualbox installed and available is always a good thing for those situations where Win or Mac are the only options.

Joint, conditional and marginal probabilities

Aug 26, 2014

In this post I will discuss a topic that seems very dry at first but turns out to have many cool applications. While I will not discuss Bayesian inference in this post, understanding the relationship between joint, conditional and marginal probabilities is essential for the application of Bayesian thinking. As a result, I'll will often refer back to this discussion in future posts.

Garmin forerunner and Ubuntu 14.04

Aug 16, 2014

This post is about getting running data off of a Garmin Forerunner 305 and uploaded to the Garmin Connect website. This post follows my previous post on the Garmin forerunner and Ubuntu 12.04. Basically I will repeat these previous instructions, making sure that everything can still be done on Ubunu 14.04-- the good news is that everything works on 14.04, so read on if you are interested.

Install R on Ubuntu 14.04

Aug 15, 2014

In this post I will go over installing R on Ubuntu 14.04 following the installation instructions at cran. I will also cover installing the packages required to do the Topics in machine learning assignment for Coursera's Introduction to Data Science.

Install igraph for Python on Ubuntu 14.04

Jul 29, 2014

In this post I will describe installing python-igraph on Ubuntu 14.04, using the default Python 2.7. Previously I wrote a (long) post about how to create an initial python setup, which provides lots of detail about how I approach Python package installation. In particular, I use pip and install as a user. Of course, you can do otherwise.

Python and YAML on Ubuntu 14.04

Jul 12, 2014

In this post I will cover installing PyYAML using Python 2.7. I've previously covered my approach to Python package installation using pip, so you can read more there to get a sense of my approach.

Install sqlite3 on Ubuntu 14.04

Jul 10, 2014

The second assignment for Coursera's Introduction to Data Science focuses on databases and relational algebra. The programming assignments are done with sqlite3, so I need to install it on my Ubuntu 14.04 machine.

Install and use sphinx-bootstrap-theme on Ubuntu 14.04

Jul 7, 2014

In this post I will try out the sphinx-bootstrap-theme. As the name suggests, this project combines Sphinx, a Python documentation tool that generates html/pdf/etc from rst files, and bootstrap, a modern web framework from Twitter for generating responsive websites.

Install oauth2 Python package on Ubuntu 14.04

Jul 2, 2014

The first assignment for Coursera's Introduction to Data Science focuses on sentiment analysis of twitter data. To do this the oauth2_ package needs to be installed. Following the style outlined in a previous post, I will use pip to install the package as a user.

Ubuntu VPS setup at digitalocean

Jun 27, 2014

This blog is hosted on an Ubuntu 14.04 VPS at digitalocean. This post is mainly a reminder for me of the tutorials I used to set things up, however you might find it a helpful guide as well.

Installing Octave on Ubuntu 14.04

Jun 20, 2014

I'm taking Andrew Ng's machine learning class at Coursera that started June 17, 2014. In the Silicon Valley tech world, this seems to be the online course that many people recommend for machine learning. The course is taught using Octave or Matlab. I'll use Octave because I'm on Ubuntu and Octave is a Gnu project.

Install Python packages on Ubuntu 14.04

Jun 4, 2014

In this post I will document my setup of Python 2.7.6 in Ubuntu 14.04. Of course, the base Python is installed by default, but both Python 2.7.6 and Python 3.4 are available.

Install vanilla LaTeX on Ubuntu 14.04

Jun 2, 2014

In this post I will go through a vanilla installation of Tex Live-- you may not want to do this. I'm choosing this installation method because of the ability to stay current with LaTeX updates and greater flexibility. However, for most people I would suggest installing the LaTeX setup in Ubuntu 14.04 repositories-- search for texlive-full.

Migrate ssh keys for new computer

May 30, 2014

I need to use a set of ssh keys on a new machine. In general, it is probably best to generate new keys instead of copying old keys, but this is a temporary solution for now.

Install and setup git on Ubuntu 14.04

May 29, 2014

In this post I go over the basics of getting git up and running on Ubuntu 14.04.

Install and setup screen on Ubuntu 14.04

May 29, 2014

screen is a great tool for the terminal, allowing me to have many windows (sessions) open at the same time-- say vim in one, an ssh session in another, etc. This post documents my basic setup -- if you have cool/different ideas about how to do this type of thing let me know.

Install and setup vim on Ubuntu 14.04

May 29, 2014

Vim is a powerful editor that can be used on your laptop/desktop and is also typically found on any Linux server you might encounter. As a result, I started using vim as my main editor.