Beispiel #1
0
 def get(self):    
   bday = self.request.get('bday')     
   btype = self.request.get('btype')    
   [lewis, spiller, chinese, millman] = calculate.calculate(bday)
   logging.debug(lewis)
   lewis_int = [int(x) for x in lewis]
   mb = calculate.calculate_mbti_full([lewis, spiller, chinese, millman]) 
   cycle, now_year, str_d = calculate.calculate_cycle(bday)
   res = {"lewis": lewis_int, "spiller": spiller, "chinese": chinese, "millman": millman, "mb": mb, "cycle": cycle}
   self.response.out.write(simplejson.dumps(res))
Beispiel #2
0
    def get(self):
        d = self.request.get('d')
        btype = self.request.get('btype')

        try:
            lewis, spiller, chinese, millman = calculate.calculate(d)

            lewi_summary = self.get_lewi(lewis[0])
            spiller_summary = self.get_spiller(spiller)
            chinese_summary = self.get_chinese(chinese)
            millman_summary = self.get_millman(millman[0])
            mbti_summary = self.get_mbti()

            cycle, now_year, str_d = calculate.calculate_cycle(d)

            mb_astro_res = calculate.calculate_mbti_full(
                [lewis, spiller, chinese, millman])
            logging.debug(mb_astro_res)

            path = os.path.join(os.path.dirname(__file__), 'reading.html')
            template_values = {
                'code_date': d,
                'date': str_d,
                'lewi_main': lewis[0],
                'lewis': lewis,
                'spiller': spiller,
                'spiller_converted': convertSpiller(spiller),
                'chinese': chinese,
                'btype': btype,
                'millman': millman,
                'millman_main': millman[0],
                'mb': mb_astro_res,
                'lewi_summary': lewi_summary,
                'spiller_summary': spiller_summary,
                'chinese_summary': chinese_summary,
                'millman_summary': millman_summary,
                'mbti_summary': mbti_summary,
                'cycle': cycle,
                'now_year': now_year
            }
        except Exception, e:
            logging.debug(e)
            path = os.path.join(os.path.dirname(__file__), 'explore.html')
            template_values = {
                'error': 'Wrong date',
            }
Beispiel #3
0
 def get(self):
     bday = self.request.get('bday')
     btype = self.request.get('btype')
     [lewis, spiller, chinese, millman] = calculate.calculate(bday)
     logging.debug(lewis)
     lewis_int = [int(x) for x in lewis]
     mb = calculate.calculate_mbti_full([lewis, spiller, chinese, millman])
     cycle, now_year, str_d = calculate.calculate_cycle(bday)
     res = {
         "lewis": lewis_int,
         "spiller": spiller,
         "chinese": chinese,
         "millman": millman,
         "mb": mb,
         "cycle": cycle
     }
     self.response.out.write(simplejson.dumps(res))
Beispiel #4
0
  def get(self):
    d = self.request.get('d')     
    btype = self.request.get('btype') 

    try:
      lewis, spiller, chinese, millman = calculate.calculate(d)
      
      lewi_summary = self.get_lewi(lewis[0])
      spiller_summary = self.get_spiller(spiller)
      chinese_summary = self.get_chinese(chinese)
      millman_summary = self.get_millman(millman[0])
      mbti_summary = self.get_mbti()

      cycle, now_year, str_d = calculate.calculate_cycle(d)

      mb_astro_res = calculate.calculate_mbti_full([lewis, spiller, chinese, millman])
      logging.debug(mb_astro_res)
      
      path = os.path.join(os.path.dirname(__file__), 'reading.html')
      template_values = {
        'code_date': d,
        'date': str_d,
        'lewi_main': lewis[0],
        'lewis': lewis,
        'spiller': spiller,
        'spiller_converted': convertSpiller(spiller),
        'chinese': chinese,
        'btype': btype,
        'millman': millman,
        'millman_main': millman[0],
        'mb': mb_astro_res,
        'lewi_summary': lewi_summary,
        'spiller_summary': spiller_summary,
        'chinese_summary': chinese_summary,
        'millman_summary': millman_summary,
        'mbti_summary': mbti_summary,
        'cycle': cycle,
        'now_year': now_year
        }  
    except Exception, e:
      logging.debug(e)
      path = os.path.join(os.path.dirname(__file__), 'explore.html')
      template_values = {
        'error': 'Wrong date',
        }        
Beispiel #5
0
# some experimental code to determine to full type based on 
# the celeb database. 
import sys; sys.path.append('..')
import calculate
import math

if __name__ == '__main__':    
    res =  calculate.calculate('19730424')
    print calculate.calculate_mbti_full(res)
    print res

    #res =  calculate.calculate('19451005')    
    #res =  calculate.calculate('19490222')
    #res =  calculate.calculate('19820108')

    #res =  calculate.calculate('19100422') # Norman Steenrod, 
    #res =  calculate.calculate('19160430') # Claude Shannon
    #res =  calculate.calculate('19230521') # Armand Borel
    #res =  calculate.calculate('19170617') # Atle Selberg
    #res =  calculate.calculate('19090821') # Nikolay Bogolyubov
    #res =  calculate.calculate('19640825') # Maxim Kontsevich
    #res =  calculate.calculate('19341012') # Albert Shiryaev
    #res =  calculate.calculate('19061024') # Alexander Gelfond
    #res =  calculate.calculate('19381103') # Martin Dunwoody    
    
    #res =  calculate.calculate('19610804') # barack obama
    #res =  calculate.calculate('19730326') # larry page
    #res =  calculate.calculate('19730821') # sergey brin
    #res =  calculate.calculate('19540226') # tayyip erdogan
    #res =  calculate.calculate('19590226') # ahmet davutoglu
    #res =  calculate.calculate('19501029') # abdullah gul
Beispiel #6
0
# some experimental code to determine to full type based on 
# the celeb database. 
import sys
import calculate
import math

if __name__ == '__main__':    
    res =  calculate.calculate('19730424')
    print calculate.calculate_mbti_full(res); print res

    #res =  calculate.calculate('19451005')    
    #res =  calculate.calculate('19490222')
    #res =  calculate.calculate('19820108')
    
    #res =  calculate.calculate('19610804') # barack obama
    #res =  calculate.calculate('19730326') # larry page
    #res =  calculate.calculate('19730821') # sergey brin
    #res =  calculate.calculate('19540226') # tayyip erdogan
    #res =  calculate.calculate('19590226') # ahmet davutoglu
    #res =  calculate.calculate('19501029') # abdullah gul
    #res =  calculate.calculate('19560120') # bill maher
    #res =  calculate.calculate('19700921') # jen
    #res =  calculate.calculate('19180511') # richard feynman
    #res =  calculate.calculate('19691228') # linus torvalds
    #res =  calculate.calculate('19200102') # isaac asimov died 19920406
    #res =  calculate.calculate('19690312') # acun
    #res =  calculate.calculate('19270622') # cetin altan
    #res =  calculate.calculate('19560101') # mumtaz turkone
    #res =  calculate.calculate('19550224') # steve jobs
    #res =  calculate.calculate('19370611') # mumford
    #res =  calculate.calculate('19470412') # tom clancy