A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Untitled - Stikked
From Jittery Lemur, 12 Years ago, written in Python.
Embed
  1. import urllib2
  2. import lxml.html
  3.  
  4. def player_by_name(name):
  5.     name = urllib2.quote(name)
  6.     api = urllib2.urlopen('http://statapi.transformice.com/miceinfo.xml?n=%s' % name)
  7.     data = lxml.html.parse(api)
  8.     api.close()
  9.     return Transformice(data)
  10.    
  11. def title_by_id(title)
  12.         title = {
  13.             '0': 'Little Mouse',
  14.             '1': 'Shaman Disciple',
  15.             '2': 'Accomplished Shaman',
  16.             '3': 'Shaman',
  17.             '4': 'Shaman Master',
  18.             '5': 'Greedy Mouse',
  19.             '6': 'Here! Cheese!',
  20.             '7': 'Yeeeeah Cheese ^^',
  21.             '8': 'Cheeeeeese *-*',
  22.             '9': 'Fast Mouse',
  23.             '10': 'Agile Mouse',
  24.             '11': 'Pirate Mouse',
  25.             '12': 'Ninja Mouse',
  26.             '13': 'Inspired Shaman',
  27.             '14': 'Shaman Champion',
  28.             '15': 'Glorious Shaman',
  29.             '16': 'Shaman Duchess',
  30.             '17': 'Shaman Princess',
  31.             '18': 'Shaman Empress',
  32.             '19': 'Legendary Shaman',
  33.             '20': 'Immortal Shaman',
  34.             '21': 'The Chosen Shaman',
  35.             '22': 'Holy Shaman',
  36.             '23': 'Shaman Oracle',
  37.             '24': 'Shaman Prophet',
  38.             '25': 'Shamarvelous',
  39.             '26': 'Glutton Mouse',
  40.             '27': 'Gleany',
  41.             '28': 'Plumpy Mouse',
  42.             '29': 'Paunchy Mouse',
  43.             '30': 'Chubby Mouse',
  44.             '31': 'Fluffy Mouse',
  45.             '32': 'Tubby Mouse',
  46.             '33': 'The Chubby',
  47.             '34': 'The Puffy',
  48.             '35': 'Activist Mouse',
  49.             '36': 'Unionized Mouse',
  50.             '37': 'Mouse on Strike',
  51.             '38': 'The Cheese Initiated',
  52.             '39': 'The Cheese Adept',
  53.             '40': 'The Cheese Priest',
  54.             '41': 'The Reaper',
  55.             '42': 'Rogue Mouse',
  56.             '43': 'Looter',
  57.             '44': 'Stalker',
  58.             '45': 'Frothy Mouse',
  59.             '46': 'The Silent',
  60.             '47': 'Hawk Mouse',
  61.             '48': 'Cobra Mouse',
  62.             '49': 'Spidermouse',
  63.             '50': 'Quick Silver',
  64.             '51': 'Athletic Mouse',
  65.             '52': 'Hasty Mouse',
  66.             '53': 'Rocket Mouse',
  67.             '54': 'Sonic The Mouse',
  68.             '55': 'Pingless',
  69.             '56': 'Kamikaze',
  70.             '57': 'Warrior Mouse',
  71.             '58': 'Mach 1',
  72.             '59': 'Hunter',
  73.             '60': 'First!',
  74.             '61': 'Sniper',
  75.             '62': 'Flash',
  76.             '63': 'Supermouse',
  77.             '64': 'Light Speed',
  78.             '65': 'Time Traveler',
  79.             '66': 'Fast Wind',
  80.             '67': 'E=MouseC2',
  81.             '68': 'Jumper',
  82.             '69': 'The Untouchable',
  83.             '70': 'Wall-Jumper',
  84.             '71': 'LIGHTNING',
  85.             '72': 'Cheese Finder',
  86.             '73': 'Cheese Knight',
  87.             '74': 'Cheesegrubber',
  88.             '75': 'Fatty',
  89.             '76': 'Stout Mouse',
  90.             '77': 'Cheese Lover',
  91.             '78': 'Camembert',
  92.             '79': "Pont-L'eveque",
  93.             '80': 'Cheese Catcher',
  94.             '81': "It's Over 9000",
  95.             '82': 'Collector',
  96.             '83': 'Cheeseleader',
  97.             '84': 'Cheese Thief',
  98.             '85': 'Cheese Creator',
  99.             '86': 'Cheese Pizza',
  100.             '87': 'Cheese Minister',
  101.             '88': 'Prodigy Mouse',
  102.             '89': 'Princess of Transformice',
  103.             '90': 'Cheesoholic',
  104.             '91': 'The Cheesen One',
  105.             '92': 'Sailor Mouse',
  106.             '93': 'MAH CHEESE!',
  107.             '94': 'Ancient Shaman',
  108.             '95': 'Fearless Shaman',
  109.             '96': 'Almighty Shaman',
  110.             '97': 'Architect Shaman',
  111.             '98': 'Mademoiselle',
  112.             '99': 'Lady Shaman',
  113.             '100': 'Loved',
  114.             '101': 'Magician',
  115.             '102': 'Hero of Mice',
  116.             '103': 'Angel Shaman',
  117.             '104': 'The Creator',
  118.             '105': 'Absolute Shaman',
  119.             '106': 'Miraculous Shaman',
  120.             '107': 'Liberator',
  121.             '108': 'Troll Shaman',
  122.             '109': 'Ghost Shaman',
  123.             '110': 'Spirit',
  124.             '111': 'Demigodess Shaman',
  125.             '112': 'Last Hope',
  126.             '113': 'Redeemer',
  127.             '114': 'Alpha & Omega',
  128.             '115': 'Nice Mouse',
  129.             '116': 'Adorable Mouse',
  130.             '117': 'Charming Mouse',
  131.             '118': 'Pretty Mouse',
  132.             '119': 'Cute Mouse',
  133.             '120': 'Frivolous Mouse',
  134.             '121': 'Snob Mouse',
  135.             '122': 'Stylish Mouse',
  136.             '123': 'Actress Mouse',
  137.             '124': 'Fashion Mouse',
  138.             '125': 'Sexy',
  139.             '126': 'SuperStar',
  140.             '127': 'Little Snowflake',
  141.             '128': 'Christmas Spirit',
  142.             '129': 'Little Pixie',
  143.             '130': 'Santa Claus',
  144.             '200': 'Goddess Shaman',
  145.             '202': 'The Wind Master',
  146.             '210': 'Alluring Mouse',
  147.             '211': 'Temptress',
  148.             '212': 'Latin Lover',
  149.             '213': 'Decorator',
  150.             '214': 'Builder',
  151.             '215': 'Manufacturer',
  152.             '216': 'Technician',
  153.             '217': 'Mechanic',
  154.             '218': 'Specialist',
  155.             '219': 'Inventor',
  156.             '220': 'Engineer',
  157.             '221': 'Inventive Mouse',
  158.             '222': 'Ingenious Mouse',
  159.             '223': 'Virtuoso',
  160.             '224': 'Sprinter',
  161.             '225': 'Batmouse',
  162.             '226': 'The Unseen',
  163.             '227': 'Unstoppable',
  164.             '228': 'Andale! Andale!',
  165.             '229': 'Torpedo',
  166.             '230': 'Speedy Gorgonzola',
  167.             '231': 'Dynamite',
  168.             '232': 'Speedmaster',
  169.             '233': 'Whirlwind',
  170.             '234': 'Om Nom Nom',
  171.             '235': '*-*',
  172.             '236': 'Cheese Addict',
  173.             '237': 'Cheesus',
  174.             '238': 'Queen of Cheese',
  175.             '240': 'Cookies',
  176.             '241': 'Christmas Cake',
  177.             '242': 'Whitebeard',
  178.             '243': 'Generous',
  179.             '244': 'Snowy',
  180.             '245': 'Snowstorm',
  181.             '246': 'Dauphine',
  182.             '247': 'Foxy',
  183.             '248': 'Miss Transformice'
  184.         }
  185.         return title(title)
  186.  
  187. class Transformice:
  188.     def __init__(self, xml):
  189.         try:
  190.             err = xml.find('//mice/error').text
  191.             raise TransformiceError(err)
  192.         except AttributeError:
  193.             # Easiest && fastest way to check.
  194.             pass
  195.  
  196.         self.name         = xml.find('//mice/name').text
  197.         self.tribe        = xml.find('//mice/tribe').text
  198.         self.rounds       = xml.find('//mice/rounds').text
  199.         self.cheese       = xml.find('//mice/cheese').text
  200.         self.first        = xml.find('//mice/first').text
  201.         self.chamansave   = xml.find('//mice/chamansave').text
  202.         self.chamancheese = xml.find('//mice/chamancheese').text
  203.         self.chamangold   = xml.find('//mice/chamangold').text
  204.         self.micetitle    = xml.find('//mice/micetitle').text
  205.    
  206. class TransformiceError(Exception):
  207.     pass
  208.