@.         
                @@         
          :     :@         
          .@     @         
           :@    @+        
            +@   @@        
        `@@@;'@` +@        
       '@@'+@@@@; @        
               @@@@'       
                +@@@.      
                 `@@@+     
       :@@:@.     :@@@     
        .@@@@:     @       
          @#@@@    @:      
          .@ '@@@  @@      
           ;@  #@@@`.      
            @+  @@@@@      
             @   +@@@@:    
        @@@@@@.    +@@@+   
        @@.@@@        .    
         @,                
         `@                
          +@               
        #@@;               
       :@:@@@              
       .@ #+#@             
       `@  @ @+            
        @'  @ @            
        :@  :@@            
         @@  #;            
          @:               
           @:              
                .          
                @+         
        ;:      `@         
       +@@@      ::        
        #@@@'     @        
         :@@@@    :;       
          `@@@@:   @       
           .@@@@#  @`      
             @;@@@`+@      
              @ @@@@@      
               @ '@@#      
                @  ;       
                 @         
         @@@:    :@        
        @@@@@@:   ##       
        +  :@@@@.  @`      
         @   :@@@@ ;@      
         +@    ;@@@@@      
          @#     #@@@      
           @       +.      
        @@@@@              
       @@@@@@+             
       @   ;@@             
       #,   ;@+            
        @`   @@            
        :@# @+@            
         .@@@:`            
                           
           :               
         . #;              
        @@@@@              
       @.`#@@@             
       @    @@.            
       :#    @@            
        @#   @@            
         @@@@##            
          @@@              
                           
                           
                           
       .@@@@@#`            
       @+:;;@@@@:          
       ;@ @ @@ @@@`        
        @@@@ @@` @@#       
         ;@@  :@; :@@`     
          @+    @@  @@+    
          #@     `@+ .@#   
           @:      .@#:@;  
            @         :@   
                     
 
 

Popular Posts

AS EXPLAINED TO A 4 YEAR OLD CHILD, SOME QUESTIONS THAT YOU THOUGHT WERE TOUGH


Q1.How should I explain dynamic programming to a 4-year-old?

*writes down "1+1+1+1+1+1+1+1 =" on a sheet of paper*
"What's that equal to?"
*counting* "Eight!"
*writes down another "1+" on the left*
"What about that?"
*quickly* "Nine!"
"How'd you know it was nine so fast?"
"You just added one more"
"So you didn't need to recount because you remembered there were eight! Dynamic Programming is just a fancy way to say 'remembering stuff to save time later'"


Continue Reading

Prime no are one of the most mysterious no. in the Number theory . There are a lot on method of checking if a no is Prime or not, two most famous are the Probabilistic and Naive method . Naive method is simple and efficient this.
Before know the better let's discuss what not to do, here is the python code for checking Prime that is less efficient.

def is_prime(num):
    c=0
    for i in range(2,num):
        if num % i==0:
            c+=1
        if c==0:
            return True
        else:
            return False


here the loop iterates till the given number, which is useless.
This can be optimized by running the first loop untill the square root of the number abd checking for the factors. This works because any composite number can be factorized and written into product of number in which one number is less than the square root of the number.
HERE is the better optimized NAIVE Method for checking primes 


def NaivePrime(n):
    check=True
    for i in range(2,int(n**0.5)+1):
        if i%2==0 and i !=2:
            continue
        else:
            if n%i==0:
                check=False
                print "%d is factor" % i 
                break
    return check

this runs much fast and in the conventional way if very large numbers are tested then an overflow can be encountered .
And then comes the Sieve of Eratosthenes which is much faster than previous methods given.Its modification the Sieve of Atkins is even more efficient. If space complexity is also to be taken into account then a segmented Sieve is the best method.
This is the code for Sieve of Eratosthenes

def p(n):
  is_p=[False]*2 + [True]*(n-1)
  for i in range(2, int(n**0.5)):
    if is_p[i]:
        for j in range(i*i, n, i):
            is_p[j] = False
  for i in range(2, n):
    if is_p[i]:
      yield i

print list(p(102))



Continue Reading
Taylor Swift-Golden Glow wallpaper [Photo Manipulation]

I made this image manipulation in Photoshop few week back when I had nothing to do. Eventually it turned out to be beautiful. I did not have an active internet connection then so what I did was to just extract an screenshot from on of her Music video which I had in my PC and then use it. That is the reason the size of the image is exactly of my screens resolution.

Continue Reading
Google Glasses : 8 features as they will be used in real world

Before saying anything and showing you the next pic i will say that I am a Google fan and i just happened to find this ,laughed a bit after seeing the horrible imaginative representation of a immensely hi-tech straight from the sci-fi movie and beautiful thought. So as of now just enjoy and let it come out when they shut,   drop every-ones jaws .

Continue Reading

Recently I was asked by my friend to write a simple code to check if two strings are anagram or not.I wrote three different approach to it in python.I was not allowed to change the input format so i had to do some extra work and write a function to get input.
Here is the question that was given:

Anagram

--------------------------
In this problem, you are given two strings S1 and S2, your task is to determine whether one string is an anagram of the other. An anagram of a string is a string obtained by permuting the letters of a string. For example aaba and aaab are anagrams, while abcd and deba are not.
Continue Reading


Before moving on with this I would before you can actually do that in one click you have to take a little bit of pain to set up the system, I promise it’s a one time setup and won’t poke you ever after ,just a click and that
Ugly addition to the title and filename removed in a click. So far if you are not getting as to what i am upto ; in plane and simple words: many time you must have downloaded songs that has this ugly thing like “songname_www.xyz.com” now what it will do is that it will just remove that www.xyz.com  stuff from the title and filename in a click. Just follow the steps

Continue Reading