Skip to main content

Posts

Python, Virtualenv and Docker

Unsurprisingly I use some very popular Scientific Python packages like Numpy, Scipy and Scikit Learn. These packages don't get on that well with virtualenv and pip as they take a lot of external dependencies to build. These dependencies can be optional libraries like libblas and libatlas which if present will make Numpy run faster, or required dependencies like a fortran compiler. Back in the good old days you wouldn't pin all your dependency versions down and you'd end up with a precarious mix of apt-get installed and pip installed packages. Working with other developers, especially on different operating system update schedules could be a pain. It was time to update your project when it breaks because of a dependency upgraded by the operating system. Does virtualenv fully solve this? No, not when you have hard requirements on the binaries that must be installed at a system level. Docker being at a lower level gives you much more control without adding too much e...

Amazon + Blender 2.74

I’ve been branching out doing some 3D modelling at work recently and wanted to share the rendering pipeline I settled on. I began on my laptop Dell XPS 15 (XPS15-6846sLV) , GPU rendering worked straight away from Windows 7, but took some setting up with Archlinux. This setup was pretty good for modeling, but I quickly realized that I needed some more serious heat dissipation for rendering. I then moved to my workstation which has much more CPU power and a dedicated NVS 310 graphics card, not too shabby but sample renders were taking too long. I borrowed a work colleague's GeForce GTX TITAN with 12GB GDDR5 ram - unsurprisingly this beast sped things up considerably. I still had to render more frames than would make sense on one machine - especially in the time I had to work with; so I set up Blender on Amazon Web Services to take advantage of the EC2 instances with GPUs (g2.2xlarge). Taking advantage of favourable spot prices in North Virginia one can run GPU instances for betw...

Building Mobile Applications with Gulp

Apache Cordova can be used to compile HTML5 applications for iOS and Android. This technique allows a developer to easily deploy a static web app to multiple mobile devices. For many genres of application its a perfectly acceptable strategy, especially with javascript performance getting better and better . Personally I want to have cross platform deployment while avoiding the hassle of programming in ObjectiveC for iOS as well as Android’s dialect of Java . AngularJS is a widely popular javascript framework for all sorts of interactive web apps. Including my own Party Sense project. It is very well suited for developing static website based mobile applications. Because angularjs is used all over the web it doesn’t have much specific support for mobile development, it can however be used to build up common mobile user interactions for example things like tabs, swipe cards etc. To avoid having to start from scratch ionicframework bridges the gap between cordova and angularjs. I...

Homomorphic encryption using RSA

I recently had cause to briefly look into Homomorphic Encryption , the process of carrying out computations on encrypted data. This technique allows for privacy preserving computation. Fully homomorphic encryption (FHE) allows both addition and multiplication, but is (currently) impractically slow. Partially homomorphic encryption just has to meet one of these criteria and can be much more efficient. An unintended, but well-known, malleability in the common RSA algorithm means that the multiplication of ciphertexts is equal to the multiplication of the original messages. So unpadded RSA is a partially homomorphic encryption system. RSA is beautiful in how simple it is. See wikipedia to see how to generate the public ( e , m ) and private keys ( d , m ). Given a message x it is encrypted with the public keys it to get the ciphertext C ( x ) with: C ( x ) = x e mod m To decrypt a ciphertext C ( x ) one applies the private key: m = C ( x ) d mod m The homomorphic prop...

Time to resume

So my partner Sarah and I decided to move from Christchurch, New Zealand to Sydney, Australia. We managed to spend a few months traveling around South America, recording lots of details over on my other blog:  thorneynz.blogspot.com The largest obstacle for me is finding an awesome job. Finding a job that I will love, a job that will test me, teach me and inspire me. Much like my job at Dynamic Controls has been done for the last three years. It's also potentially time for me to consider a change in direction of my work. Research into some of the technology companies in Sydney has me very excited about work going on around the city. I've also decided that right now is the perfect opportunity to try working for myself. I'm planning on working as a software/systems contractor and in any downtime working on a couple of startups. So before spamming dozens of companies I've decided to make a custom website resume. It's available at  http://brian.thorne.link/ I d...

Dynamic Reflection

After three years I'm leaving my engineering job at Dynamic Controls! I started as a summer intern back in 2010 and was subsequently hired as a Systems Engineer. Most of my time at Dynamic Controls was spent within the system's architecture team, designing, prototyping and specifying protocols for powered wheelchairs. I've really enjoyed and grown in my first real world job. Dynamic was a great fledgling ground, while there I've had good mentors and great friends. One thing that stood out from the first day is the company has a strong vision of where it wants to be. The culture strongly promotes innovation, openness, sustainability and a desire for excellence. I've certainly enjoyed telling people that I help design powered wheelchairs as well! I was very proud to be on the team that helped to design and implement the LiNX architecture. Of course there was plenty of pressure during my time as we released the first in a series of innovative wheelchair controller...

Prototyping User Interfaces with AngularJS

When creating responsive websites there are so many options to choose from. I've come to favour AngularJS and want to take the time to walk through creating a non trivial, useful tool. Standing on the Shoulders of Giants Using a seed app gives a well designed and extendible structure. Start by downloading the angular-seed app from github . Extract the into your project folder and start your web server. The server itself is not the concern of this post, django, nodejs or python's built in http server will work fine to serve the content. If everything has gone well you should be able to aim your web browser at localhost:8000 and sees something very exciting like: Directory Layout Lets take a quick digression to look at where all the files are: app/ --> all of the files to be used in production css/ --> css files with default stylesheet img/ --> image files index.html --> app layout file (the main...