Section: Tech | Atom Feed

28 Sep

Part 3 - Building a Fast Event-Driven Simulator for Concurrent Systems of Hardware Processes Using Curio and Python 3.6

This is the third in my series on using Curio to build an event-driven simulator for hardware processes. The first two parts can be found here: Part 1, Part 2. We're going to use the simulator framework to implement a distributed and concurrent hardware palindrome checker in less than ...


27 Sep

Part 2 - Building a Fast Event-Driven Simulator for Concurrent Systems of Hardware Processes Using Curio and Python 3.6

This is the second in my series on using Curio to build an event-driven simulator for hardware processes. (see Part 1 for the first article)

1   Enhancing the Simulator Framework

Now, we're going to make this framework a little bit more robust and less verbose when defining the system ...


22 Sep

Part 1 - Building a Fast Event-Driven Simulator for Concurrent Systems of Hardware Processes Using Curio and Python 3.6

In this post, the first in a series of three, I'm going to show you how to build an elegant simulator of a concurrent system using the amazing Curio library from David Beazley that's built on Python 3.6's async coroutine features. I hope it'll provide ...


28 Nov

How to use Python to generate extensions with a GUI for Moneydance 2017

This post describes some of my experiences writing a python extension for Moneydance, a cross-platform personal finance manager (an alternative to Intuit Quicken). I was originally attracted to this product because it runs on a Mac (albeit using a Java look and feel), uses Direct Connect to download transactions from ...


23 Jun

Elegant command line parsing in Python using docopt, schema, and yaml

Both for my work and personal use, I tend to develop many command-line Python scripts that are very data-driven and configurable. In Python, it's pretty trivial to use argparse to support complex argument and option structures, and then use the integration with configparser to allow one to write files ...


07 Apr

[UPDATED] Reverse engineering the remote control protocol for the Nissan LEAF (the new Nissan EV protocol)

Note

This is an update to my earlier post on the Nissan Leaf remote telematics. Nissan had taken their API offline in February 2016 to address the security vulnerabilities, and this post details how to connect to the new API that went into place in early April.

1   Nissan Connect ...


10 Mar

An Example Provisioning of HACKT on a Centos 7 VM using Vagrant and Ansible

I recently needed to get an open-source circuit toolkit (HACKT)compiled and deployed on my local system. I already knew the C++ source compiled and installed fine on Linux, and didn't want to jump through the hoops to get it running on my Mac 10.11 (El Capitan) system ...


12 Jan

Reverse engineering the remote control protocol for the Nissan LEAF (the new Nissan EV protocol)

1   Nissan Connect EV

Note

Update April 2016: Nissan has updated their API calls to actually use the user login information to authenticate instead of just the VIN. You can see a summary of the newer API in my new post here.

For those of you with a Nissan LEAF ...


09 Mar

Migrating XenServer Virtual Machine VDIs to KVM

After having worked with Xenserver 6.2 for over a year now, I've decided to migrate away from it. It just wasn't stable enough with SATA pass-through on my machine, and it had some really annoying bugs with the way snapshots and backups were handled:

  • Under load, my ...

26 Jan

Building a low-power home file server using Intel's Avoton platform

In this post I'll detail the hardware I used to upgrade my 2 year old home server that was getting a little bit long in the tooth. I wanted to replace a Core i7 based XenServer host connected to an external 8-bay SATA enclosure that had an idle power ...


22 Aug

Setting up the Edgemax EdgeRouter Lite (ERLite-3) in a Home Environment

This is just my cheat sheet on setting up the EdgeRouter ERLite-3 in a home environment. I recently migrated to this after a long search for a low-power firewall and router solution. Prior to getting this beauty, I'd migrated my stand-alone PC running Ipcop/Smoothwall to a Xen virtual ...


07 May

Example of how to authenticate using Oauth2 in Ember.js using Implicit Grant (client-side)

This post will show a quick and complete example on how to authenticate someone using their Google credentials in your Ember.js web application. This uses the implicit-grant scheme in Oauth2, so everything happens on the client side, without exposing the user's Google credentials or requiring a back-end server ...


30 Mar

Detecting color vs greyscale and blank pages during scanning

Recently, I needed a way to detect if a color scanned image was actually color or just contained greyscale/BW content. I also wanted to detect if an image was "blank", or just a continuous shade of one color. I couldn't really find a simple solution on the web ...


17 Mar

One-touch scan enabling in Ubuntu Linux for the Fujitsu ScanSnap S1500

Here's how I managed to get Linux to recognise scan button presses on the S1500, and automatically initiate a scan to a pdf file. You first need to download Scanbd and install it. Unfortunately, there doesn't seem to be any apt repository for Scanbd, so I had to ...


14 Nov

Starting a simple Flask app with Heroku

Flask and Heroku

Inspired by this article on Python Weekly, I thought I'd look into deploying a simple hello world application to Heroku, built on the Flask micro framework.

Here's my workflow:

  • Create a new directory and Python virtualenv (make sure virtualenvwrapper is installed!):

    cd ~/dev
    mkdir proj
    cd proj
    mkvirtualenv ...

04 Nov

Creating new notes and attaching files using Evernote's Python API

Documents to Evernote

I managed to piece together how to attach a new PDF file to an Evernote note using their Python API, so I thought it might be useful to have a post that has all of this information together in one place.  I've put together a complete example that will ...


29 Sep

Quick web app with Go, Ember.js, and MongoDB

 Screenshot

As part of my recent foray into the Go language, I stumbled across this excellent example by Nerdyworm part 1, part 2, part 3 that shows how to build a small web application using the ember.js javascript framework and Go providing the backend server. I took this example, fixed ...


16 Aug

Reading and writing Microsoft Word docx files with Python

 python

I've been wanting to script simple text scanning and substitution in Microsoft Word documents for a while now, and after a little digging, it turns out, it's fairly straight-forward to read and edit .docx (OpenXML) or the ECMA-376 original standard, and now under ISO as ISO/IEC 29500 ...


20 Apr

Python auto sort of OCR'ed PDFs

I'd previously written about how I was using a Fujitsu ScanSnap 1500 to reduce paper clutter and move to a paperless workflow at home.  So far, this system has been working great for me, with every scanned document getting OCR'ed and uploaded to my default Evernote notebook as ...


01 Mar

Better VIM for Python

As someone who spends a large fraction of their day editing text and code, I've often thought about just investing a few days learning the more advanced time-saving features of my text-editor, VIM. Unfortunately, "a few days" just doesn't happen, and the few times I did learn some ...

© Virantha Ekanayake. Built using Pelican. Modified svbhack theme, based on theme by Carey Metcalfe