Tag Archives: Python

Interesting Findings #3

Python

Quite old news, but I added miniconda to chocolatey. If you need Python on Windows and do not want waste your time to setup wired stuff to compile packages like NumPy, you probably better to use Anaconda or Miniconda which is the same but with smaller number of packages pre installed. You however, always can install pre-built packages with ‘conda install’. So.. to install Miniconda for Python 2.x, use:

choco install miniconda

for Python 3.x

choco install miniconda3

Do not forget, after installation issue

conda update conda

NodeJS

Few weeks ago I completed nano project using NodeJS (express, mongodb, browserify, gulp).

  1. Feels quite good for small fire-and-forget style projects.
  2. Lol, but NodeJS still uses callbacks! Promices are almost here, but… really they are not. Every lib invents own Promices, styles.. and yet they are actually like C# from 2005.
  3. Deployment is a joy.
    1. For development npm start.
    2. For win server, iisnode works really nice. Handles restarts in case of crash. Runs node per processor by default. Nice experience.
    3. For Amazon, Beanstalk allows load balanced, autoscaled, rolling deployment with few command line commands. Super nice.
  4. gulp.watch and Co are great. Browserify, ReactJS JSX, unit tests.. all work when you hit Ctrl+S. Page auto reload when something changed are also very handy.
  5. Time to start from zero knowledge is amazing. Actually after few hours, you have comfortable workflow and running application.
  6. Node.js Tools for Visual Studio – well, I cannot find any need of it. But it works and now it support Visual Studio 2015 (It works with free Community Edition too).

Amazon Beanstalk

May be half a year ago, Amazon eventually implemented something like Web and Worker Roles from Azure.

  1. Looks quite good for NodeJS and Python, but not so good for .NET. For example, there is no Worker Environment for .NET.
  2. Works very well with Docker, I managed to run my small app with Docker on Beanstalk in just few commands.
  3. Supports integration to Visual Studio and have nice command line interface. Quite easy to integrate into build process.

Microsoft

This year Build 2015 is exceptionally interesting.

  1. Docker on Windows. I am not sure how this will change Windows development, but at least Mark Russinovich already made a demo of Docker for Windows. It works. It is really containers on windows. Demo was from non Server SKU. Windows and Linux Docker images will not be compatible.
  2. Docker is nicely integrated in ASP.NET development. New DNX infrastructure is fully supported on Linux, Visual Studio can now package DNX sites as Docker containers and… Visual Studio can debug code remotely on Linux in Docker – sounds crazy, but that was also demoed on Keynote.
  3. CoreCLR is open source. DNX stuff is also open source. Everything works on Linux and OSx.
  4. Visual Studio Code (yet another JS editor, based on Electron), well works quite nice, except I do not understand why not just a plugin for Atom. Marketing BS probably.

Misc

  1. Playing with Splunk. It is super easy to start with and it provides results immediately. The only problem for me is price. I just do not get their pricing model and it looks like quite expensive.  I still hope that I will be able to try it in real environment.
  2. Nice site with ML resources http://www.startup.ml/resources , especially I love their twitter.
Advertisements
Tagged , , ,

Terminal access from Windows Phone to VM somewhere™ in cloud

Suppose you are in situation when you need to edit and then run some Python code, or C++ or whatever. And you need to this from your Windows Phone. What you will do?

Okay, most obvious solution is just to run one of the compliers that send your code somewhere and return result. You can find few of them in store. Most of them are quite low quality, but they work. Unfortunately, this options does not work for me. In my Python scripts I am using NumPy and none of the “compilers” have one preinstalled. So the question is custom environment.

Custom VM

Requirement of custom environment leads to custom VM somewhere™ in cloud. I already have had a few VMs on Azure, so I decided just to fire up another one. I created Ubuntu VM.

image

Through SSH I configured environment:

sudo apt-get update
sudo apt-get install git
sudo apt-get install python python-numpy python-scipy

Sidenote: this might be temporary issue, but. apt-get might fail with some wired 503 errors:

E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/s/suitesparse/libamd2.3.1_4.2.1-3ubuntu1_amd64.deb  503  Service Temporarily Unavailable

E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

well… Azure distribution of Ubuntu, preconfigured with Azure own mirror for packages archive and looks like some packages are missing. To fix this replace all “azure.archive.ubuntu.com” to something like “archive.ubuntu.com” or “ua.archive.ubuntu.com” in “/etc/apt/sources.list”. One-liner do this from askubuntu:

sudo sed 's@http://azure\.archive\.ubuntu\.com/@http://archive.ubuntu.com/@' -i /etc/apt/sources.list

Windows Phone Terminal

Now we have VM in somewhere™ in cloud. Next step is to connect from Windows Phone. Search gives few SSH clients. I tried most of them. They all actually looks the same(I think they use same terminal emulator) and only difference is keyboard. I selected Admin Shell and everything else is just self explanatory.

wp_ss_20140621_0001

Vim works fine too.

wp_ss_20140621_0002

And results:

wp_ss_20140621_0004

Enjoy! Happy cheating on exams!

Tagged , ,