Posts

Showing posts from July, 2018

Date & Time Modules in Python

The time and calendar Modules These are two important modules provided by Python for referring to the date and time. Python refers to time in terms of (clock) ticks or seconds since epoch time (0:00, 1 Jan, 1970). #!/usr/bin/python3import time; ticks = time.time() print ("Number of ticks since 12:00am, January 1, 1970:", ticks) localtime = time.localtime(ticks) print ("Local current time :", localtime) print ("Local current time :", time.asctime( localtime )) This creates the output Number of ticks since 12:00am, January 1, 1970: 1531996804.3854601 Local current time : time.struct_time(tm_year=2018, tm_mon=7, tm_mday=19, tm_hour=10, tm_min=40, tm_sec=4, tm_wday=3, tm_yday=200, tm_isdst=0) Local current time : Thu Jul 1910:40:042018 The time.time() returns the number of ticks. time.localtime(ticks) returns the time tuple and time.asctime() formats this into a readable string. Time Tuple The value returned by the time.localtime(ticks) method is called the…

Affiliate Ads

Image
Blockchain Council - Certified Solidity Developer - End Date 05-31-2019 - Logo - End Date 05-31-2019 - Certified Smart Contract Developer - End Date 05-31-2019 - Certified Blockchain Expert - End Date 05-31-2019 - Certified Ethereum Expert - End Date 05-31-2019 - Certified Blockchain Developer - End Date 05-31-2019 Coursera End Date 08-08-2019 End Date 09-27-2020 End Date 09-27-2020 End Date 12-31-2018 End Date 12-31-2018 End Date 12-31-2018

Convolutional Neural Network Architectures

Image
CNN Architectures Petty neural networks with a couple of perceptrons are good for academic study. But for solving real life problems, we need much bigger networks. In fact, neural networks has been an academic topic for few decades. But today, it has started hitting the reason because of the ability to process bigger networks. But just increasing the count of perceptrons is not enough. They need to be laid out in a good architecture. Else it just does not add any value to the network. It can also load the network and reduce its performance. We always have a risk of overfitting. In deep networks, we have another very serious problem. It is possible that the entire model does not align well to the data. The regression is based on the first and the last layer, it is quite possible that the intermediate layers sway around and the model is not created properly. Identifying a good network architecture is not an easy job. Years of research have gone into it, and we look forward to a lot mor…

Introduction to Computer Vision

AI in Computer Vision With the latest developments in Big data, we are not short of the data or infrastructure we need to train an AI model. Now, algorithmic developments is pushing the testing errors of intelligent systems to converge to Bayes optimal error. This can soon take AI beyond human performance in most areas - including the natural perception. Powerful concepts like Transfer Learning and open source contributions like TensorFlow allow us to take this process much faster. With these developments, computer vision has taken a great momentum. The dream applications like face recognition are now a reality. Computer vision deals with algorithms and applications of concepts of Machine Learning to processing images. That may not always be prediction. Computer vision algorithms are also used to produce art works. Of course, CV is a major component of the AI dream project - the driverless car. Here is an overview of some important algorithmic concepts used in computer vision Edge De…

Object Oriented Perl

CPAN

Perl References

Perl Associative Arrays

Perl Arrays

Arrays Array in most programming languages implies an ordered chunk of elements that can be indexed. Each language adds its own flavors to this, but the essense remains the same. Perl arrays are not different. A single Perl array can contain any data type - including arrays (Check out References) Basic Syntax In the syntax, a Perl array is a variable that begins with @. We can also access individual elements of the array. Array elements can be indexed using negative numbers as well. Just as the first element of the array is indexed by 0, the last element is indexed by -1. Second last by -2 and so on. Thus we can also use #!/bin/perl @a = (1, 'one', $variable); print("$a[0], $a[1], $a[2]\n"); print("$a[-3], $a[-2], $a[-1]\n"); print("@a\n"); There are other ways of creating arrays. For sequential numbers / alphabets, #!/bin/perl @numbers = (1..50); @alphabets = (a..z); print"@numbers\n"; print"@alphabets\n"; Array Size The …

Perl Scalar Variables

Scalar Variables Perl does not explicitly define variable types. But, internally it manages two types of data - strings and numbers. Numbers A variable that is assigned a numeric value is a numeric variable. $numer = 1; Perl does not restrict us to simple numbers. All these are valid numbers in Perl. 43.2 .234342345. 1_123_45610E2 45e-40xbeef012 Strings A sequence of characters in quotes is a string. $string1 = "This is a string"; $string2 = 'This is also a string"; We can use single or double quotes for defining a string variable. There are some subtle differences in the way they are parsed. If a string is defined in double quotes, some values have a special meaning in the string. For example the new line \n or tab \t... also any variable within the string is parsed and its value is inserted instead. Single quote strings take everything literally. Except for the \' that is used to include a single quote inside a string marked by single quotes. #!/bin/perl $c = 1;…