Skip to main content

Posts

Showing posts from August, 2017

How to run python on android

There's a very popular question on SO "How to run python on android" but nobody actually explains what you have to do or how it's done. Since I went through all of these projects for hours to figure it out I thought I'd share how you actually do it. From a high level, to run just python on android you must: Cross compile python and any extensions for the target ABIs (arm, arm-v7a, etc.. see https://developer.android.com/ndk/guides/abis.htm l) Include the cross compiled libpython and all CC'd extensions as native libraries (gradle's jniLibs https://developer.android.com/studio/projects/add-native-code.html#link-gradle ) or optionally extract them to the assets folder Include the Python standard library and any extra python files as android assets (compress in a zip and have the app extract to assets on first launch) Create a C or C++ native file using the NDK and have it initialize Python using the C-API ( https://docs.python.org/2/c-api/intro.h

Inkcut Live plotting (Unreleased preview)

I haven't released an update to Inkcut since 2010.  I want to share some changes are coming to next version of Inkcut!  Here's a sneak preview of the live plotting feature that will be available! It streams the data and allows you to pause and resume plotting. Since data is streamed at the speed of the cutter issues related to buffers overflowing on large jobs should be resolved! I'm also working on a new website and support for Mac and Windows. I hope to have it released before the end of 2017 (Oct-Nov maybe?).  So stay tuned! Happy cutting!

Using a Namescheap domain name with AWS EC2

Most of the articles I've read show you how to do this using Route 53. However that costs $0.50/month per domain or $/6 year. Why do that when you can just use namescheaps DNS servers? Creating an Elastic IP An elastic IP allows you to switch EC2 instances seamlessly. If you upgrade, or setup a new instance and want to move over this is needed. Otherwise you have to repoint the DNS to the new instance manually every time.  So this is not required, but recommended. Login to AWS Click on EC2 Choose Elastic IPs under Network & Security at the left Click Allocate new address and then Allocate Select the new row created Click on actions and select Associate address Choose your EC2 instance and the private IP and click associate Configuring Namescheap DNS If you haven't already, login to the EC2 dashboard and select your instance. Note the new Public IP and Public DNS, we'll need these. Now we have tell Namescheap's DNS servers to point to our EC2 instance