Kill Tasks in Windows

Linux, Mac users have it easy. Top and kill are two commands that can help one take control of the system.

For windows user, until recently I was stuck with the task manager. Like all manager this one demands too much attention and is not batch able.

Summoned Google Gennie and discovered.

Tasklist and Taskkill commands in CMD.

Neat. Where were these commands hiding?

Here is two gifs for how they work

Advertisements

The Most Audacious Flying Machine Ever

It may only be a matter of weeks before Stratolaunch, the world’s biggest plane, with a wingspan longer than a football field, takes to the air for the first time. The aircraft was unveiled by Paul Allen, the Microsoft co-founder, in June 2017. The aircraft could eventually be used to transport rockets carrying satellites and people into the Earth’s upper atmosphere, where they will blast off into space. Allen recently said of Stratolaunch: “When you see that giant plane, it’s a little nutty. And you don’t build it unless you’re very serious, not only about wanting to see the plane fly but to see it fulfil its purpose. Which is getting vehicles in orbit.”

Via http://www.dailymail.co.uk/sciencetech/article-6080013/The-worlds-biggest-plane-inches-closer-takeoff.html

Homepage for the project https://www.stratolaunch.com/

If you are interested in the story and motivation for the project read this excellent post

Variable length list to Numpy array

Suppose you have a variable length list and you want to convert it to a numb array

alist = [[1,2,3],[5,6]]

What is the efficient way to convert this list to a numpy array?

My first answer was using pandas and this is what I did?

import pandas as pd
data = pd.Dataframe(alist).fillna(0).values

This worked and I moved on to my other problem, but then realised if there is any other way which is more efficient. Turns out there is.

import itertools
data=np.array(list(itertools.izip_longest(*alist, fillvalue=0))).T

In python 2.7 and the following in python3

import itertools
data=np.array(list(itertools.zip_longest(*alist, fillvalue=0))).T

How Fast and efficient? See the below image.

one

Post writing the above I googled and found this link. Here is the result of both of the methods on the example data in the link.

 

two

three

Clearly, itertools is the winner.

Feap installation with visual studio

If you ever require a FEM system for quick fem for educational or research purpose. Feap is one of the easiest to get started with.

Here’s a rundown with screenshots on how to build it with visual studio with Intel Fortran.

Hope this helps.

Step 0:

Download from:

http://projects.ce.berkeley.edu/feap/feappv/feappv41.zip

Project Page:

http://projects.ce.berkeley.edu/feap/feappv/

Two steps

  1. Build a library
  2. Build the program
  1. Select New Project

  1. Select New Project
    1. Select Library: Select Static Library
    2. Name library e.g. lib22

  1. Under the Projects tab select Add Existing Item
    1. Add all subroutines in directories: Elements, Plot, Program, User, and Windows (do not include Unix, Include, or Main).

Under the Projects tab select Properties

Select Fortran then General

b.) Set additional include path to point to the feappv include

directory (e.g. c:\users\xxx\feappv\ver22\include) and the appropriate

    directory for 32-bit or 64-bit pointers (e.g.

    c:\users\xxx\feappv\ver22\include\integer4 or

    c:\users\xxx\feappv\ver22\include\integer8)

Build library

Building the Main program

Open Visual Studio or if open new project

a.) Select QuickWin Application, select QuickWin option

(not standard graphics QuickWin)

b.) Name main program e.g. feappv

At top select Release build (as opposed to Debug)

3. Under the Projects tab select Add Existing Item

a.) Set show all files in window and add library (e.g. lib22)

Visual Studio normally places this in

c:\users\xxx\documents\visual studio\projects\lib22\lib22\release

b.) Add feappv.f from the subdirectory Main.

4. Under the Projects tab select Properties

a.) Select Fortran then General

b.) Set additional include path to point to the feappv include

directory (e.g. c:\users\xxx\feappv\ver22\include) and the appropriate

    directory for 32-bit or 64-bit pointers (e.g.

    c:\users\xxx\feappv\ver22\include\integer4 or

    c:\users\xxx\feappv\ver22\include\integer8)

Add the libraries and the library path

Build… If you get error like this, you have not included all forttan file sin the liberay include and come pback..



What is “uncertainty quantification”?

Quantifying Uncertainty in Subsurface Systems, a new book just published by the American Geophysical Union, explores what we know and don’t know about the extent underground resources, and how we can make decisions in the face of uncertainty.
 
Although the book explores how uncertainty quantification can enable optimal decisions in the exploration, appraisal, and development of subsurface resources, it covers many data scientific methods that allow representing geological variability with simple statistical tools.
 
This article include few of the questions one of the editor of this book covers, one that is particular covered in this blog on uncertainty quantification is listed below.
 
 
 
What is “uncertainty quantification”?
 
In the broadest sense, it is a measure of our lack of understanding. This is difficult: it is easier to list what we know than what we don’t know. The quantification part points to a scientific approach to the problem that involves axioms, definitions and rules. Uncertainty quantification is both prescriptive and normative: a set of rules on how to proceed are created based on mathematics and logic, in particular, probability theory and statistics. Within those rules, calculations are done that involve observed data as well as global understanding of the subsurface system created from experience. Thus, it allows making optimal decisions even if we cannot perfectly predict the outcome of the actions we take in the exploration, appraisal and development of subsurface resources.
 
See the table of contents of the book here 
 

Learning Fluid Simulation

Be it designing, analysis visualisation is a big part of engineering discipline. Such is it’s important that entire industries are based on providing physics based softwares.

But now we have a new toolkit to understand the complex behaviours of fluids and other. Neural networks are able to learn the patterns of smoke simulation etc without any pde’s. This is going to be a huge step in the industry.

Watch the video.

Can’t wait to see this technology to come to production.