code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.2614, 0.0114, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.2727, 0.0114, 0, 0.66, 0.5, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.6477, 0.7159, 0, 0.6...
[ "from google.appengine.ext import db", "from handlers.AuthenticatedHandler import *", "class ArticleCommentEdit(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tself.values['tab'] = '/module/article.list'\n\t\tmethod = self.request.method\n\t\tuser = self.values['user']\n\t\tcomment_key = self.get_param('key...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.1917, 0.0083, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.2, 0.0083, 0, 0.66, 0.2, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.2167, 0.0083, 0, 0.66, ...
[ "import time", "import datetime", "from google.appengine.ext import db", "from google.appengine.api import mail", "from handlers.AuthenticatedHandler import *", "class ArticleComment(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tuser = self.values['user']\n\t\tkey = self.get_param('key')\n\t\tarticl...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.3286, 0.0143, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.3429, 0.0143, 0, 0.66, 0.5, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.6857, 0.6429, 0, 0.6...
[ "from google.appengine.ext import db", "from handlers.AuthenticatedHandler import *", "class ArticleFavourite(AuthenticatedHandler):\n\t\n\tdef execute(self):\n\t\tarticle = model.Article.get(self.get_param('key'))\n\t\tuser = self.values['user']\n\t\tif not article or article.draft or article.deletion_date:\n\...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.1655, 0.0072, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.1727, 0.0072, 0, 0.66, 0.5, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.5971, 0.8129, 0, 0.6...
[ "from google.appengine.ext import db", "from handlers.BaseHandler import *", "class ArticleView(BaseHandler):\n\n\tdef execute(self):\n\t\turl_path = self.request.path.split('/', 3)[3]\n\t\tarticle_id = self.request.path.split('/')[3]\n\t\tarticle = self.cache(article_id + '_article', self.get_article)\n\t\t\n\...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.4259, 0.0185, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.463, 0.0185, 0, 0.66, 0.3333, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.4815, 0.0185, 0, 0...
[ "import datetime", "from google.appengine.ext import db", "from handlers.AuthenticatedHandler import *", "class ArticleCommentDelete(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tuser = self.values['user']\n\t\tif user.rol != 'admin':\n\t\t\tself.forbidden()\n\t\t\treturn", "\tdef execute(self):\n\t\t...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software ...
[ [ 1, 0, 0.6216, 0.027, 0, 0.66, 0, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.8378, 0.3514, 0, 0.66, 1, 338, 0, 1, 0, 0, 94, 0, 7 ], [ 2, 1, 0.8649, 0.2973, 1, 0.85, ...
[ "from handlers.BaseHandler import *", "class ArticleList(BaseHandler):\n\n\tdef execute(self):\n\t\tself.values['tab'] = '/module/article.list'\n\t\tquery = model.Article.all().filter('draft =', False).filter('deletion_date', None)\n\t\tapp = self.get_application()\n\t\tkey = '%s?%s' % (self.request.path, self.re...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.3594, 0.0156, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.375, 0.0156, 0, 0.66, 0.5, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.7031, 0.5781, 0, 0.66...
[ "from google.appengine.ext import db", "from handlers.AuthenticatedHandler import *", "class ArticleCommentSubscribe( AuthenticatedHandler ):\n\n\tdef execute(self):\n\t\tkey = self.get_param('key')\n\t\tarticle = model.Article.get(key)\n\t\tmemcache.delete(str(article.key().id()) + '_article')\n\t\tuser = sel...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.2091, 0.0091, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.2273, 0.0091, 0, 0.66, 0.3333, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.2364, 0.0091, 0, ...
[ "import datetime", "from google.appengine.ext import db", "from handlers.AuthenticatedHandler import *", "class ArticleDelete(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tmethod = self.request.method\n\t\tuser = self.values['user']\n\t\tarticle = model.Article.get(self.get_param('key'))\n\t\tmemcache.d...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.3239, 0.0141, 0, 0.66, 0, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.6761, 0.662, 0, 0.66, 1, 753, 0, 1, 0, 0, 116, 0, 29 ], [ 2, 1, 0.6901, 0.6338, 1, 0.16,...
[ "from handlers.AuthenticatedHandler import *", "class ArticleAddCommunities(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tmethod = self.request.method\n\t\tuser = self.values['user']\n\t\tkey = self.get_param('key')\n\t\tarticle = model.Article.get(key)\n\t\tif not article or article.draft or article.deleti...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.3151, 0.0137, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.3288, 0.0137, 0, 0.66, 0.25, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.3425, 0.0137, 0, 0....
[ "import logging", "from google.appengine.api import mail", "from handlers.AuthenticatedHandler import *", "from google.appengine.runtime import apiproxy_errors", "class CommunityNewArticle(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tarticle = model.Article.get(self.get_param('article'))\n\t\tcommuni...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.575, 0.025, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.6, 0.025, 0, 0.66, 0.5, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.825, 0.375, 0, 0.66, 1...
[ "from google.appengine.ext import db", "from handlers.BaseHandler import *", "class CommunityUserList(BaseHandler):\n\n\tdef execute(self):\n\t\tself.values['tab'] = '/module/community.list'\n\t\turl_path = self.request.path.split('/', 3)[3]\n\t\tcommunity = model.Community.gql('WHERE url_path=:1', url_path).ge...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.2347, 0.0102, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.2449, 0.0102, 0, 0.66, 0.5, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.6327, 0.7449, 0, 0.6...
[ "from google.appengine.ext import db", "from handlers.AuthenticatedHandler import *", "class CommunityThreadEdit(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tself.values['tab'] = '/module/community.list'\n\t\tmethod = self.request.method\n\t\tuser = self.values['user']\n\t\tkey = self.get_param('key')", ...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.4259, 0.0185, 0, 0.66, 0, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.7315, 0.5556, 0, 0.66, 1, 979, 0, 1, 0, 0, 94, 0, 12 ], [ 2, 1, 0.75, 0.5185, 1, 0.85, ...
[ "from handlers.BaseHandler import *", "class CommunityList(BaseHandler):\n\n\tdef execute(self):\n\t\tself.values['tab'] = '/module/community.list'\n\t\tquery = model.Community.all()\n\t\tkey = '%s?%s' % (self.request.path, self.request.query)\n\t\t\n\t\tcat = self.get_param('cat')", "\tdef execute(self):\n\t\t...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.1386, 0.006, 0, 0.66, 0, 200, 0, 1, 0, 0, 200, 0, 0 ], [ 1, 0, 0.1506, 0.006, 0, 0.66, 0.2, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.1566, 0.006, 0, 0.66, ...
[ "import img", "from google.appengine.api import images", "from google.appengine.ext import db", "from google.appengine.api import memcache", "from handlers.AuthenticatedHandler import *", "class CommunityEdit(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tself.values['tab'] = '/module/community.list'...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.1554, 0.0068, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.1689, 0.0068, 0, 0.66, 0.1667, 155, 0, 1, 0, 0, 155, 0, 0 ], [ 1, 0, 0.1757, 0.0068, 0, ...
[ "import datetime", "from google.appengine.runtime import apiproxy_errors", "from google.appengine.ext import db", "from google.appengine.api import mail", "from google.appengine.api import memcache", "from handlers.AuthenticatedHandler import *", "class CommunityForumReply(AuthenticatedHandler):\n\n\tde...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.4259, 0.0185, 0, 0.66, 0, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.7315, 0.5556, 0, 0.66, 1, 707, 0, 1, 0, 0, 116, 0, 17 ], [ 2, 1, 0.75, 0.5185, 1, 0.38, ...
[ "from handlers.AuthenticatedHandler import *", "class CommunityUserUnjoin(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tuser = self.values['user']\n\t\tcommunity = model.Community.get(self.get_param('community'))\n\t\tif not community:\n\t\t\tself.not_found()\n\t\t\treturn", "\tdef execute(self):\n\t\tuse...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.377, 0.0164, 0, 0.66, 0, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.7049, 0.6066, 0, 0.66, 1, 108, 0, 1, 0, 0, 116, 0, 17 ], [ 2, 1, 0.7213, 0.5738, 1, 0.34,...
[ "from handlers.AuthenticatedHandler import *", "class CommunityUserJoin(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tuser = self.values['user']\n\t\tcommunity = model.Community.get(self.get_param('community'))\n\t\tif not community:\n\t\t\tself.not_found()\n\t\t\treturn", "\tdef execute(self):\n\t\tuser ...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.1292, 0.0056, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.1348, 0.0056, 0, 0.66, 0.5, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.573, 0.8596, 0, 0.66...
[ "from google.appengine.ext import db", "from handlers.AuthenticatedHandler import *", "class CommunityMove(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tmethod = self.request.method\n\t\tuser = self.values['user']\n\t\tif user.rol != 'admin':\n\t\t\tself.forbidden()\n\t\t\treturn", "\tdef execute(self):...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.1655, 0.0072, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.1727, 0.0072, 0, 0.66, 0.1429, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.1871, 0.0072, 0, ...
[ "import logging", "import datetime", "from google.appengine.runtime import apiproxy_errors", "from google.appengine.ext import db", "from google.appengine.api import mail", "from google.appengine.api import memcache", "from handlers.AuthenticatedHandler import *", "class CommunityForumEdit(Authenticat...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.575, 0.025, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.6, 0.025, 0, 0.66, 0.5, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.825, 0.375, 0, 0.66, 1...
[ "from google.appengine.ext import db", "from handlers.BaseHandler import *", "class CommunityArticleList(BaseHandler):\n\n\tdef execute(self):\n\t\tself.values['tab'] = '/module/community.list'\n\t\turl_path = self.request.path.split('/', 3)[3]\n\t\tcommunity = model.Community.gql('WHERE url_path=:1', url_path)...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software ...
[ [ 1, 0, 0.5, 0.0217, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.5217, 0.0217, 0, 0.66, 0.5, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.7826, 0.4565, 0, 0.66, ...
[ "from google.appengine.ext import db", "from handlers.BaseHandler import *", "class CommunityView(BaseHandler):\n\n\tdef execute(self):\n\t\tself.values['tab'] = '/module/community.list'\n\t\turl_path = self.request.path.split('/', 3)[3]\n\t\tcommunity = model.Community.gql('WHERE url_path=:1', url_path).get()\...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.5227, 0.0227, 0, 0.66, 0, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.7841, 0.4545, 0, 0.66, 1, 855, 0, 1, 0, 0, 116, 0, 11 ], [ 2, 1, 0.8068, 0.4091, 1, 0.23...
[ "from handlers.AuthenticatedHandler import *", "class CommunityArticleDelete(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tarticle = model.Article.get(self.get_param('article'))\n\t\tcommunity = model.Community.get(self.get_param('community'))\n\t\tif not article or not community:\n\t\t\tself.not_found()\n\...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.4615, 0.0192, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.4808, 0.0192, 0, 0.66, 0.3333, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.5, 0.0192, 0, 0.6...
[ "from google.appengine.ext import db", "from google.appengine.api import memcache", "from handlers.AuthenticatedHandler import *", "class CommunityDelete(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tuser = self.values['user']\n\t\t\n\t\tif user.rol != 'admin':\n\t\t\tself.forbidden()\n\t\t\treturn", ...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.6389, 0.0278, 0, 0.66, 0, 250, 0, 1, 0, 0, 250, 0, 0 ], [ 3, 0, 0.8472, 0.3333, 0, 0.66, 1, 858, 0, 1, 0, 0, 138, 0, 10 ], [ 2, 1, 0.875, 0.2778, 1, 0.66,...
[ "from handlers.BaseRest import *", "class CommunityForumVisit(BaseRest):\n\n\tdef get(self):\n\t\tthread_id = self.request.get('id')\n\t\tmemcache.delete(thread_id + '_thread')\n\t\tthread = model.Thread.get_by_id(int(thread_id))\n\t\tthread.views += 1\n\t\tthread.put()", "\tdef get(self):\n\t\tthread_id = self...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.2323, 0.0101, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.2424, 0.0101, 0, 0.66, 0.5, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.6212, 0.7273, 0, 0.6...
[ "from google.appengine.ext import db", "from handlers.AuthenticatedHandler import *", "class CommunityForumView(BaseHandler):\n\n\tdef execute(self):\n\t\tself.values['tab'] = '/module/community.list'\n\t\tuser = self.values['user']\n\t\turl_path = self.request.path.split('/', 3)[3]\n\t\tthread_id = self.reques...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.3607, 0.0164, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.377, 0.0164, 0, 0.66, 0.5, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.7049, 0.5738, 0, 0.66...
[ "from google.appengine.ext import db", "from handlers.AuthenticatedHandler import *", "class CommunityForumSubscribe( AuthenticatedHandler ):\n\n\tdef execute(self):\n\t\tkey = self.get_param('key')#TODO if key is empty app crashed\n\t\tthread = model.Thread.get(key)\n\t\tmemcache.delete(str(thread.key().id()) ...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any...
[ [ 1, 0, 0.3194, 0.0139, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.3472, 0.0139, 0, 0.66, 0.3333, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.3611, 0.0139, 0, ...
[ "import datetime", "from google.appengine.ext import db", "from handlers.AuthenticatedHandler import *", "class CommunityForumDelete(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tuser = self.values['user']\n\t\tif user.rol != 'admin':\n\t\t\tself.forbidden()\n\t\t\treturn", "\tdef execute(self):\n\t\t...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.5, 0.0227, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.5227, 0.0227, 0, 0.66, 0.5, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.7841, 0.4545, 0, 0.66, ...
[ "from google.appengine.ext import db", "from handlers.BaseHandler import *", "class CommunityForumList(BaseHandler):\n\n\tdef execute(self):\n\t\tself.values['tab'] = '/module/community.list'\n\t\turl_path = self.request.path.split('/', 3)[3]\n\t\tcommunity = model.Community.gql('WHERE url_path=:1', url_path).g...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.2347, 0.0102, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.2449, 0.0102, 0, 0.66, 0.5, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 3, 0, 0.6276, 0.7347, 0, 0.6...
[ "from google.appengine.ext import db", "from handlers.AuthenticatedHandler import *", "class CommunityForumMove(AuthenticatedHandler):\n\n\tdef execute(self):\n\t\tmethod = self.request.method\n\t\tuser = self.values['user']\n\t\tif user.rol != 'admin':\n\t\t\tself.forbidden()\n\t\t\treturn", "\tdef execute(s...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Carrasco <jose.carrasco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Founda...
[ [ 1, 0, 0.1513, 0.0066, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.1579, 0.0066, 0, 0.66, 0.0909, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.1645, 0.0066, 0, ...
[ "from google.appengine.ext import db", "from google.appengine.ext import webapp", "from google.appengine.api import memcache", "from google.appengine.ext.webapp import template", "from handlers.BaseHandler import *", "from utilities.AppProperties import AppProperties", "UPDATER_VERSION = \"0.8\"", "de...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # (C) Copyright 2011 Jose Carrasco <jose.carrasco[a]vikuit.com> # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General...
[ [ 1, 0, 0.2243, 0.0093, 0, 0.66, 0, 722, 0, 1, 0, 0, 722, 0, 0 ], [ 1, 0, 0.2336, 0.0093, 0, 0.66, 0.25, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.2523, 0.0093, 0, 0....
[ "import model", "import logging", "from google.appengine.api import memcache", "from google.appengine.ext import webapp", "class ImageDisplayer(webapp.RequestHandler):\n\n\tdef get(self):\n\t\tcached = memcache.get(self.request.path)\n\t\t\n\t\tparams = self.request.path.split('/')\n\t\tif params[2] == 'use...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (C) Copyright 2008 Alberto Gimeno <gimenete at gmail dot com> # # This file is part of "debug_mode_on". # # "debug_mode_on" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free So...
[ [ 1, 0, 0.1465, 0.0064, 0, 0.66, 0, 722, 0, 1, 0, 0, 722, 0, 0 ], [ 1, 0, 0.1529, 0.0064, 0, 0.66, 0.3333, 386, 0, 1, 0, 0, 386, 0, 0 ], [ 1, 0, 0.1656, 0.0064, 0, ...
[ "import model", "import simplejson", "from google.appengine.ext import webapp", "class TaskQueue(webapp.RequestHandler):\n\n\tdef get(self):\n\t\tself.response.headers['Content-Type'] = 'text/plain;charset=utf-8'\n\t\t\n\t\ttask = model.Task.all().order('-priority').get()\n\t\t\n\t\tif not task:", "\tdef ge...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software ...
[ [ 1, 0, 0.697, 0.0303, 0, 0.66, 0, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.8788, 0.2727, 0, 0.66, 1, 958, 0, 1, 0, 0, 94, 0, 3 ], [ 2, 1, 0.9091, 0.2121, 1, 0.75, ...
[ "from handlers.BaseHandler import *", "class Dispatcher(BaseHandler):\n\n\tdef execute(self):\n\t\treferer = self.request.path.split('/', 1)[1]\n#\t\tif referer.startswith('module'):\n#\t\t\treferer = self.request.path.split('/',2)[2]\n\t\tself.add_tag_cloud()\n\t\tself.values['tab'] = self.request.path", "\tde...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software ...
[ [ 1, 0, 0.697, 0.0303, 0, 0.66, 0, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.8788, 0.2727, 0, 0.66, 1, 116, 0, 1, 0, 0, 94, 0, 3 ], [ 2, 1, 0.9091, 0.2121, 1, 0.5, ...
[ "from handlers.BaseHandler import *", "class AuthenticatedHandler(BaseHandler):\n\n\tdef pre_execute(self):\n\t\tuser = self.get_current_user()\n\t\t#user = self.values['user']\n\t\tif not user:\n\t\t\tself.redirect(self.values['login'])\n\t\t\treturn", "\tdef pre_execute(self):\n\t\tuser = self.get_current_use...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (C) Copyright 2008 Alberto Gimeno <gimenete at gmail dot com> # # This file is part of "debug_mode_on". # # "debug_mode_on" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # t...
[ [ 1, 0, 0.7931, 0.0345, 0, 0.66, 0, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.931, 0.1724, 0, 0.66, 1, 794, 0, 1, 0, 0, 94, 0, 2 ], [ 2, 1, 0.9655, 0.1034, 1, 0.93, ...
[ "from handlers.BaseHandler import *", "class Static(BaseHandler):\n\n\tdef execute(self):\n\t\ttemplate = self.request.path.split('/', 2)[2]\n\t\tself.render('templates/static/%s' % template)", "\tdef execute(self):\n\t\ttemplate = self.request.path.split('/', 2)[2]\n\t\tself.render('templates/static/%s' % temp...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (C) Copyright 2008 Alberto Gimeno <gimenete at gmail dot com> # (C) Copyright 2008 Ignacio Andreu <plunchete at gmail dot com> # (C) Copyright 2008 Néstor Salceda <nestor.salceda at gmail dot com> # # This file is part of "debug_mode_on". # # "debug_mode_on" is free soft...
[ [ 1, 0, 0.4717, 0.0189, 0, 0.66, 0, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.7547, 0.5094, 0, 0.66, 1, 123, 0, 1, 0, 0, 94, 0, 16 ], [ 2, 1, 0.7736, 0.4717, 1, 0.82,...
[ "from handlers.BaseHandler import *", "class Search(BaseHandler):\n\n\tdef execute(self):\n\t\tq = self.get_param('q')\n\t\ttyp = self.get_param('t')\n\n\t\tif typ == 'articles':\n\t\t\tquery = model.Article.all().filter('draft', False).filter('deletion_date', None).search(q)", "\tdef execute(self):\n\t\tq = se...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.1716, 0.0075, 0, 0.66, 0, 49, 0, 1, 0, 0, 49, 0, 0 ], [ 1, 0, 0.209, 0.0075, 0, 0.66, 0.0119, 188, 0, 1, 0, 0, 188, 0, 0 ], [ 1, 0, 0.2164, 0.0075, 0, 0.6...
[ "from handlers.MainPage import *", "from handlers.module.admin.Admin import *", "from handlers.module.admin.AdminCategories import *", "from handlers.module.admin.AdminCategoryEdit import *", "from handlers.module.admin.AdminApplication import *", "from handlers.module.admin.CommunityAddRelated import *",...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Carrasco <jose.carrasco[a]vikuit.com> # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
[ [ 1, 0, 0.0632, 0.0026, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.0658, 0.0026, 0, 0.66, 0.2, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.0684, 0.0026, 0, 0.6...
[ "from google.appengine.ext import db", "from google.appengine.ext import webapp", "from google.appengine.ext.webapp import template", "from handlers.BaseHandler import *", "class Initialization(BaseHandler):\n\n\tdef get(self):\n\t\tself.response.headers['Content-Type'] = 'text/plain'\n\t\t\n\t\tapp = model...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Carrasco <jose.carrasco[a]vikuit.com> # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
[ [ 1, 0, 0.48, 0.02, 0, 0.66, 0, 437, 0, 1, 0, 0, 437, 0, 0 ], [ 3, 0, 0.75, 0.48, 0, 0.66, 1, 516, 0, 4, 0, 0, 94, 0, 16 ], [ 2, 1, 0.66, 0.22, 1, 0.9, 0, 5...
[ "from handlers.BaseHandler import *", "class MainPage(BaseHandler):\n\n\tdef execute(self):\n\t\tself.values['tab'] = '/'\n\t\t# memcache.delete('index_articles')\n\t\t# memcache.delete('index_communities')\n\t\t# memcache.delete('index_threads')\n\t\tself.values['articles'] = self.cache('index_articles', self.ge...
# -*- coding: utf-8 -*- """ jinja2.runtime ~~~~~~~~~~~~~~ Runtime helpers. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ import sys from itertools import chain, imap from jinja2.nodes import EvalContext, _context_function_types from jinja2.utils import Markup, partial, soft_unicode, e...
[ [ 8, 0, 0.011, 0.0165, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0202, 0.0018, 0, 0.66, 0.0476, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0221, 0.0018, 0, 0.66,...
[ "\"\"\"\n jinja2.runtime\n ~~~~~~~~~~~~~~\n\n Runtime helpers.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD.", "import sys", "from itertools import chain, imap", "from jinja2.nodes import EvalContext, _context_function_types", "from jinja2.utils import Markup, partial, soft_uni...
# -*- coding: utf-8 -*- """ jinja2.nodes ~~~~~~~~~~~~ This module implements additional nodes derived from the ast base node. It also provides some node tree helper functions like `in_lineno` and `get_nodes` used by the parser and translator in order to normalize python and jinja nodes. :...
[ [ 8, 0, 0.0089, 0.0144, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0166, 0.0011, 0, 0.66, 0.0128, 616, 0, 1, 0, 0, 616, 0, 0 ], [ 1, 0, 0.0178, 0.0011, 0, 0.66...
[ "\"\"\"\n jinja2.nodes\n ~~~~~~~~~~~~\n\n This module implements additional nodes derived from the ast base node.\n\n It also provides some node tree helper functions like `in_lineno` and\n `get_nodes` used by the parser and translator in order to normalize", "import operator", "from itertools im...
# -*- coding: utf-8 -*- """ jinja2.compiler ~~~~~~~~~~~~~~~ Compiles nodes into python code. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from cStringIO import StringIO from itertools import chain from copy import deepcopy from jinja2 import nodes from j...
[ [ 8, 0, 0.0037, 0.0055, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0067, 0.0006, 0, 0.66, 0.0417, 764, 0, 1, 0, 0, 764, 0, 0 ], [ 1, 0, 0.0073, 0.0006, 0, 0.66...
[ "\"\"\"\n jinja2.compiler\n ~~~~~~~~~~~~~~~\n\n Compiles nodes into python code.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "from cStringIO import StringIO", "from itertools import chain", "from copy import deepcopy", "from jinja2 import nodes...
# -*- coding: utf-8 -*- """ jinja2.optimizer ~~~~~~~~~~~~~~~~ The jinja optimizer is currently trying to constant fold a few expressions and modify the AST in place so that it should be easier to evaluate it. Because the AST does not contain all the scoping information and the compiler has to ...
[ [ 8, 0, 0.1471, 0.25, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2794, 0.0147, 0, 0.66, 0.25, 436, 0, 1, 0, 0, 436, 0, 0 ], [ 1, 0, 0.2941, 0.0147, 0, 0.66, ...
[ "\"\"\"\n jinja2.optimizer\n ~~~~~~~~~~~~~~~~\n\n The jinja optimizer is currently trying to constant fold a few expressions\n and modify the AST in place so that it should be easier to evaluate it.\n\n Because the AST does not contain all the scoping information and the", "from jinja2 import nodes...
# -*- coding: utf-8 -*- """ jinja2.visitor ~~~~~~~~~~~~~~ This module implements a visitor for the nodes. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2.nodes import Node class NodeVisitor(object): """Walks the abstract syntax tree and call visitor functions for every...
[ [ 8, 0, 0.069, 0.1034, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1264, 0.0115, 0, 0.66, 0.3333, 990, 0, 1, 0, 0, 990, 0, 0 ], [ 3, 0, 0.3333, 0.3563, 0, 0.66,...
[ "\"\"\"\n jinja2.visitor\n ~~~~~~~~~~~~~~\n\n This module implements a visitor for the nodes.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD.", "from jinja2.nodes import Node", "class NodeVisitor(object):\n \"\"\"Walks the abstract syntax tree and call visitor functions for every\...
# -*- coding: utf-8 -*- """ jinja2.parser ~~~~~~~~~~~~~ Implements the template parser. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2 import nodes from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError from jinja2.utils impo...
[ [ 8, 0, 0.0067, 0.01, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0123, 0.0011, 0, 0.66, 0.1429, 436, 0, 1, 0, 0, 436, 0, 0 ], [ 1, 0, 0.0134, 0.0011, 0, 0.66, ...
[ "\"\"\"\n jinja2.parser\n ~~~~~~~~~~~~~\n\n Implements the template parser.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "from jinja2 import nodes", "from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError", "from jinja2.utils im...
# -*- coding: utf-8 -*- """ jinja2.loaders ~~~~~~~~~~~~~~ Jinja loader classes. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys import weakref from types import ModuleType from os import path try: from hashlib import sha1 except Imp...
[ [ 8, 0, 0.0134, 0.02, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0245, 0.0022, 0, 0.66, 0.0556, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0267, 0.0022, 0, 0.66, ...
[ "\"\"\"\n jinja2.loaders\n ~~~~~~~~~~~~~~\n\n Jinja loader classes.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import os", "import sys", "import weakref", "from types import ModuleType", "from os import path", "try:\n from hashlib impo...
# -*- coding: utf-8 -*- """ jinja2.tests ~~~~~~~~~~~~ Jinja test functions. Used with the "is" operator. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re from jinja2.runtime import Undefined # nose, nothing here to test __test__ = False number_r...
[ [ 8, 0, 0.0411, 0.0616, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0753, 0.0068, 0, 0.66, 0.0476, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0822, 0.0068, 0, 0.66...
[ "\"\"\"\n jinja2.tests\n ~~~~~~~~~~~~\n\n Jinja test functions. Used with the \"is\" operator.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import re", "from jinja2.runtime import Undefined", "__test__ = False", "number_re = re.compile(r'^-?\\d...
# -*- coding: utf-8 -*- """ jinja2.filters ~~~~~~~~~~~~~~ Bundled jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import math from random import choice from operator import itemgetter from itertools import imap, groupby from jinja2....
[ [ 8, 0, 0.0084, 0.0126, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0153, 0.0014, 0, 0.66, 0.02, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0167, 0.0014, 0, 0.66, ...
[ "\"\"\"\n jinja2.filters\n ~~~~~~~~~~~~~~\n\n Bundled jinja filters.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "import re", "import math", "from random import choice", "from operator import itemgetter", "from itertools import imap, groupby"...
import gc import unittest from jinja2._markupsafe import Markup, escape, escape_silent class MarkupTestCase(unittest.TestCase): def test_markup_operations(self): # adding two strings should escape the unsafe one unsafe = '<script type="application/x-some-script">alert("foo");</script>' sa...
[ [ 1, 0, 0.0125, 0.0125, 0, 0.66, 0, 92, 0, 1, 0, 0, 92, 0, 0 ], [ 1, 0, 0.025, 0.0125, 0, 0.66, 0.1667, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0375, 0.0125, 0, 0.66,...
[ "import gc", "import unittest", "from jinja2._markupsafe import Markup, escape, escape_silent", "class MarkupTestCase(unittest.TestCase):\n\n def test_markup_operations(self):\n # adding two strings should escape the unsafe one\n unsafe = '<script type=\"application/x-some-script\">alert(\"fo...
# -*- coding: utf-8 -*- """ jinja2._markupsafe._bundle ~~~~~~~~~~~~~~~~~~~~~~~~~~ This script pulls in markupsafe from a source folder and bundles it with Jinja2. It does not pull in the speedups module though. :copyright: Copyright 2010 by the Jinja team, see AUTHORS. :license: BSD, see ...
[ [ 8, 0, 0.1429, 0.2245, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2653, 0.0204, 0, 0.66, 0.1667, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2857, 0.0204, 0, 0.66...
[ "\"\"\"\n jinja2._markupsafe._bundle\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n This script pulls in markupsafe from a source folder and\n bundles it with Jinja2. It does not pull in the speedups\n module though.", "import sys", "import os", "import re", "def rewrite_imports(lines):\n for idx, line...
# -*- coding: utf-8 -*- """ markupsafe._native ~~~~~~~~~~~~~~~~~~ Native Python implementation the C module is not compiled. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from jinja2._markupsafe import Markup def escape(s): """Convert the characters...
[ [ 8, 0, 0.1333, 0.2, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2444, 0.0222, 0, 0.66, 0.25, 409, 0, 1, 0, 0, 409, 0, 0 ], [ 2, 0, 0.4556, 0.3111, 0, 0.66, ...
[ "\"\"\"\n markupsafe._native\n ~~~~~~~~~~~~~~~~~~\n\n Native Python implementation the C module is not compiled.\n\n :copyright: (c) 2010 by Armin Ronacher.\n :license: BSD, see LICENSE for more details.", "from jinja2._markupsafe import Markup", "def escape(s):\n \"\"\"Convert the characters ...
# -*- coding: utf-8 -*- """ markupsafe ~~~~~~~~~~ Implements a Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re from itertools import imap __all__ = ['Markup', 'soft_unicode', 'escape', 'escape_silent'] _striptags_re = re.compile...
[ [ 8, 0, 0.0267, 0.04, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0489, 0.0044, 0, 0.66, 0.1111, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0533, 0.0044, 0, 0.66, ...
[ "\"\"\"\n markupsafe\n ~~~~~~~~~~\n\n Implements a Markup string.\n\n :copyright: (c) 2010 by Armin Ronacher.\n :license: BSD, see LICENSE for more details.", "import re", "from itertools import imap", "__all__ = ['Markup', 'soft_unicode', 'escape', 'escape_silent']", "_striptags_re = re.comp...
# -*- coding: utf-8 -*- """ markupsafe._constants ~~~~~~~~~~~~~~~~~~~~~ Highlevel implementation of the Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ HTML_ENTITIES = { 'AElig': 198, 'Aacute': 193, 'Acirc': 194, 'Agrave': 1...
[ [ 8, 0, 0.0225, 0.0337, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.5243, 0.9551, 0, 0.66, 1, 955, 0, 0, 0, 0, 0, 6, 0 ] ]
[ "\"\"\"\n markupsafe._constants\n ~~~~~~~~~~~~~~~~~~~~~\n\n Highlevel implementation of the Markup string.\n\n :copyright: (c) 2010 by Armin Ronacher.\n :license: BSD, see LICENSE for more details.", "HTML_ENTITIES = {\n 'AElig': 198,\n 'Aacute': 193,\n 'Acirc': 194,\n 'Agrave': 192,\n ...
# -*- coding: utf-8 -*- """ jinja2.exceptions ~~~~~~~~~~~~~~~~~ Jinja exceptions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ class TemplateError(Exception): """Baseclass for all template errors.""" def __init__(self, message=None): i...
[ [ 8, 0, 0.042, 0.0629, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.1364, 0.0979, 0, 0.66, 0.1111, 179, 0, 2, 0, 0, 645, 0, 4 ], [ 8, 1, 0.0979, 0.007, 1, 0.01, ...
[ "\"\"\"\n jinja2.exceptions\n ~~~~~~~~~~~~~~~~~\n\n Jinja exceptions.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "class TemplateError(Exception):\n \"\"\"Baseclass for all template errors.\"\"\"\n\n def __init__(self, message=None):\n i...
# -*- coding: utf-8 -*- """ jinja2.sandbox ~~~~~~~~~~~~~~ Adds a sandbox layer to Jinja as it was the default behavior in the old Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the default behavior is easier to use. The behavior can be changed by subclassing the environm...
[ [ 8, 0, 0.0295, 0.048, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0554, 0.0037, 0, 0.66, 0.0417, 616, 0, 1, 0, 0, 616, 0, 0 ], [ 1, 0, 0.059, 0.0037, 0, 0.66, ...
[ "\"\"\"\n jinja2.sandbox\n ~~~~~~~~~~~~~~\n\n Adds a sandbox layer to Jinja as it was the default behavior in the old\n Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the\n default behavior is easier to use.", "import operator", "from jinja2.runtime import Undefined", "fr...
# -*- coding: utf-8 -*- """ jinja2.meta ~~~~~~~~~~~ This module implements various functions that exposes information about templates that might be interesting for various kinds of applications. :copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details. :license: BSD, see LICENSE fo...
[ [ 8, 0, 0.0637, 0.098, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1176, 0.0098, 0, 0.66, 0.2, 436, 0, 1, 0, 0, 436, 0, 0 ], [ 1, 0, 0.1275, 0.0098, 0, 0.66, ...
[ "\"\"\"\n jinja2.meta\n ~~~~~~~~~~~\n\n This module implements various functions that exposes information about\n templates that might be interesting for various kinds of applications.\n\n :copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details.", "from jinja2 import nodes", "from ji...
# -*- coding: utf-8 -*- """ jinja2.defaults ~~~~~~~~~~~~~~~ Jinja default filters and tags. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner from gettext import gettext as _ ##ADDD # defaults for...
[ [ 8, 0, 0.1463, 0.2195, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2683, 0.0244, 0, 0.66, 0.0625, 677, 0, 3, 0, 0, 677, 0, 0 ], [ 1, 0, 0.2927, 0.0244, 0, 0.66...
[ "\"\"\"\n jinja2.defaults\n ~~~~~~~~~~~~~~~\n\n Jinja default filters and tags.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner", "from gettext import gettext as _ ##ADDD", "BLOCK_START_S...
# -*- coding: utf-8 -*- """ jinja2._stringdefs ~~~~~~~~~~~~~~~~~~ Strings of all Unicode characters of a certain category. Used for matching in Unicode-aware languages. Run to regenerate. Inspired by chartypes_create.py from the MoinMoin project, original implementation from Pygments. :co...
[ [ 8, 0, 0.0615, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1231, 0.0077, 0, 0.66, 0.0278, 924, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1385, 0.0077, 0, 0.66, ...
[ "\"\"\"\n jinja2._stringdefs\n ~~~~~~~~~~~~~~~~~~\n\n Strings of all Unicode characters of a certain category.\n Used for matching in Unicode-aware languages. Run to regenerate.\n\n Inspired by chartypes_create.py from the MoinMoin project, original", "Cc = u'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x0...
# -*- coding: utf-8 -*- """ jinja.constants ~~~~~~~~~~~~~~~ Various constants. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ #: list of lorem ipsum words used by the lipsum() helper function LOREM_IPSUM_WORDS = u'''\ a ac accumsan ad adipiscing aenean a...
[ [ 8, 0, 0.1875, 0.2812, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.7188, 0.5938, 0, 0.66, 1, 350, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "\"\"\"\n jinja.constants\n ~~~~~~~~~~~~~~~\n\n Various constants.\n\n :copyright: (c) 2010 by the Jinja Team.\n :license: BSD, see LICENSE for more details.", "LOREM_IPSUM_WORDS = u'''\\\na ac accumsan ad adipiscing aenean aliquam aliquet amet ante aptent arcu at\nauctor augue bibendum blandit cla...
# -*- coding: utf-8 -*- """ jinja2 ~~~~~~ Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. Nutshell -------- Here a small example of a Jinja2 template:: {% ...
[ [ 8, 0, 0.2055, 0.3699, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.3973, 0.0137, 0, 0.66, 0.1, 959, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.4384, 0.0685, 0, 0.66, ...
[ "\"\"\"\n jinja2\n ~~~~~~\n\n Jinja2 is a template engine written in pure Python. It provides a\n Django inspired non-XML syntax but supports inline expressions and\n an optional sandboxed environment.", "__docformat__ = 'restructuredtext en'", "try:\n __version__ = __import__('pkg_resources'...
# -*- coding: utf-8 -*- """ jinja2.bccache ~~~~~~~~~~~~~~ This module implements the bytecode cache system Jinja is optionally using. This is useful if you have very complex template situations and the compiliation of all those templates slow down your application too much. Situations whe...
[ [ 8, 0, 0.0321, 0.0536, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0607, 0.0036, 0, 0.66, 0.0714, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0643, 0.0036, 0, 0.66...
[ "\"\"\"\n jinja2.bccache\n ~~~~~~~~~~~~~~\n\n This module implements the bytecode cache system Jinja is optionally\n using. This is useful if you have very complex template situations and\n the compiliation of all those templates slow down your application too\n much.", "from os import path, li...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 14, 0, 0.8571, 0.0357, 0, 0.66, 0, 335, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.8929, 0.0357, 0, 0.66, 0.25, 884, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.9286, 0.0357, 0, 0.6...
[ "DEFAULT_LOCALE = \"en\"", "locale = \"locale\"", "appName = \"app_name\"", "appSubject = \"app_subject\"", "domain = \"domain\"" ]
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.0523, 0.1008, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1124, 0.0039, 0, 0.66, 0.0909, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.1163, 0.0039, 0, 0.66...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.028, 0.0539, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0602, 0.0021, 0, 0.66, 0.0455, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0622, 0.0021, 0, 0.66,...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 2, 0, 0.7973, 0.4324, 0, 0.66, 0, 366, 0, 1, 1, 0, 0, 0, 11 ], [ 14, 1, 0.6216, 0.027, 1, 0.02, 0, 496, 3, 2, 0, 0, 107, 10, 1 ], [ 14, 1, 0.6486, 0.027, 1, 0.02,...
[ "def loadProperties(fileName):\n propFile = file(fileName, \"rU\" )\n propDict = dict()\n for propLine in propFile:\n propDef = propLine.strip()\n if len(propDef) == 0:\n continue\n if propDef[0] in ( '!', '#' ):", " propFile = file(fileName, \"rU\" )", " propDict ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.1776, 0.3421, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3553, 0.0132, 0, 0.66, 0.25, 593, 0, 1, 0, 0, 593, 0, 0 ], [ 3, 0, 0.6711, 0.5658, 0, 0.66, ...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.1392, 0.268, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2887, 0.0103, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.299, 0.0103, 0, 0.66, ...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
[ [ 1, 0, 0.2018, 0.0092, 0, 0.66, 0, 722, 0, 1, 0, 0, 722, 0, 0 ], [ 1, 0, 0.211, 0.0092, 0, 0.66, 0.25, 123, 0, 1, 0, 0, 123, 0, 0 ], [ 1, 0, 0.2202, 0.0092, 0, 0.6...
[ "import model", "import PropertiesUtil", "import Constant", "from google.appengine.api import memcache", "class AppProperties (object):\n __instance = None\n __appDic = None\n __env = None\n\n def __new__(cls, *args, **kargs): \n if cls.__instance is None:\n cls.__instance = ob...
#!/usr/bin/env python version = "1.7" version_info = (1,7,0,"rc-2") __revision__ = "$Rev: 72 $" """ Python-Markdown =============== Converts Markdown to HTML. Basic usage as a module: import markdown md = Markdown() html = md.convert(your_text_string) See http://www.freewisdom.org/projects/python-mark...
[ [ 14, 0, 0.0016, 0.0005, 0, 0.66, 0, 623, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0021, 0.0005, 0, 0.66, 0.0079, 342, 0, 0, 0, 0, 0, 8, 0 ], [ 14, 0, 0.0026, 0.0005, 0, 0...
[ "version = \"1.7\"", "version_info = (1,7,0,\"rc-2\")", "__revision__ = \"$Rev: 72 $\"", "\"\"\"\nPython-Markdown\n===============\n\nConverts Markdown to HTML. Basic usage as a module:\n\n import markdown\n md = Markdown()", "import re, sys, codecs", "from logging import getLogger, StreamHandler, ...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software ...
[ [ 1, 0, 0.4694, 0.0204, 0, 0.66, 0, 709, 0, 1, 0, 0, 709, 0, 0 ], [ 1, 0, 0.5102, 0.0204, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.5306, 0.0204, 0, ...
[ "import wsgiref.handlers", "import os", "from handlers import *", "from google.appengine.ext import webapp", "from google.appengine.ext.webapp import template", "class NotAvailable(webapp.RequestHandler):\n\n\tdef get(self):\n\t\tself.response.clear()\n\t\tself.response.set_status(501)\n\t\tself.response....
#!/usr/bin/env python import struct from StringIO import StringIO from google.appengine.api import images def resize(image, maxwidth, maxheight): imageinfo = getimageinfo(image) width = float(imageinfo[1]) height = float(imageinfo[2]) ratio = width / height dwidth = maxheight * ratio dheight = ma...
[ [ 1, 0, 0.026, 0.013, 0, 0.66, 0, 399, 0, 1, 0, 0, 399, 0, 0 ], [ 1, 0, 0.039, 0.013, 0, 0.66, 0.25, 609, 0, 1, 0, 0, 609, 0, 0 ], [ 1, 0, 0.0649, 0.013, 0, 0.66, ...
[ "import struct", "from StringIO import StringIO", "from google.appengine.api import images", "def resize(image, maxwidth, maxheight):\n\timageinfo = getimageinfo(image)\n\twidth = float(imageinfo[1])\n\theight = float(imageinfo[2])\n\tratio = width / height\n\t\n\tdwidth = maxheight * ratio\n\tdheight = maxhe...
import simplejson import cgi class JSONFilter(object): def __init__(self, app, mime_type='text/x-json'): self.app = app self.mime_type = mime_type def __call__(self, environ, start_response): # Read JSON POST input to jsonfilter.json if matching mime type response = {...
[ [ 1, 0, 0.025, 0.025, 0, 0.66, 0, 386, 0, 1, 0, 0, 386, 0, 0 ], [ 1, 0, 0.05, 0.025, 0, 0.66, 0.3333, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 3, 0, 0.5125, 0.85, 0, 0.66, ...
[ "import simplejson", "import cgi", "class JSONFilter(object):\n def __init__(self, app, mime_type='text/x-json'):\n self.app = app\n self.mime_type = mime_type\n\n def __call__(self, environ, start_response):\n # Read JSON POST input to jsonfilter.json if matching mime type\n r...
""" Implementation of JSONDecoder """ import re import sys from simplejson.scanner import Scanner, pattern try: from simplejson import _speedups except: _speedups = None FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconstants(): import struct import sys _BYTES = '7FF800...
[ [ 8, 0, 0.006, 0.0091, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0121, 0.003, 0, 0.66, 0.0333, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0151, 0.003, 0, 0.66, ...
[ "\"\"\"\nImplementation of JSONDecoder\n\"\"\"", "import re", "import sys", "from simplejson.scanner import Scanner, pattern", "try:\n from simplejson import _speedups\nexcept:\n _speedups = None", " from simplejson import _speedups", " _speedups = None", "FLAGS = re.VERBOSE | re.MULTILINE...
""" Iterator based sre token scanner """ import sre_parse, sre_compile, sre_constants from sre_constants import BRANCH, SUBPATTERN from re import VERBOSE, MULTILINE, DOTALL import re __all__ = ['Scanner', 'pattern'] FLAGS = (VERBOSE | MULTILINE | DOTALL) class Scanner(object): def __init__(self, lexic...
[ [ 8, 0, 0.0312, 0.0469, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0625, 0.0156, 0, 0.66, 0.125, 22, 0, 3, 0, 0, 22, 0, 0 ], [ 1, 0, 0.0781, 0.0156, 0, 0.66, ...
[ "\"\"\"\nIterator based sre token scanner\n\"\"\"", "import sre_parse, sre_compile, sre_constants", "from sre_constants import BRANCH, SUBPATTERN", "from re import VERBOSE, MULTILINE, DOTALL", "import re", "__all__ = ['Scanner', 'pattern']", "FLAGS = (VERBOSE | MULTILINE | DOTALL)", "class Scanner(obj...
""" Implementation of JSONEncoder """ import re try: from simplejson import _speedups except ImportError: _speedups = None ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]') ESCAPE_ASCII = re.compile(r'([\\"/]|[^\ -~])') ESCAPE_DCT = { '\\': '\\\\', '"': '\\"', '\b': '\\b', '\f': '...
[ [ 8, 0, 0.0053, 0.008, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0106, 0.0027, 0, 0.66, 0.0714, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 7, 0, 0.0173, 0.0106, 0, 0.66,...
[ "\"\"\"\nImplementation of JSONEncoder\n\"\"\"", "import re", "try:\n from simplejson import _speedups\nexcept ImportError:\n _speedups = None", " from simplejson import _speedups", " _speedups = None", "ESCAPE = re.compile(r'[\\x00-\\x1f\\\\\"\\b\\f\\n\\r\\t]')", "ESCAPE_ASCII = re.compile(...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # (C) Copyright 2011 Jose Carrasco <jose.carrasco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
[ [ 1, 0, 0.0614, 0.0026, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.0639, 0.0026, 0, 0.66, 0.037, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.0665, 0.0026, 0, 0...
[ "from google.appengine.ext import db", "from google.appengine.api import users", "from google.appengine.ext import search", "class UserData(search.SearchableModel):\n\tnickname = db.StringProperty(required=True)\n\tpersonal_message = db.StringProperty()\n\temail = db.StringProperty(required=True)\n\tavatar = ...
# -*- coding: utf-8 -*- """ Accost ======== Accost website <http://code.google.com/p/accost/> """ import os try: from setuptools import setup except ImportError: from distutils.core import setup setup( name='Accost', version='1.0beta', url='http://code.google.com/p/accost/', download_url="http...
[ [ 8, 0, 0.0833, 0.1042, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1458, 0.0208, 0, 0.66, 0.3333, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 7, 0, 0.1979, 0.0833, 0, 0.66...
[ "\"\"\"\nAccost\n========\nAccost website <http://code.google.com/p/accost/>\n\"\"\"", "import os", "try:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup", " from setuptools import setup", " from distutils.core import setup", "setup(\n name='Accost',\n...
# -*- coding: utf-8 -*- from www.shortcuts import * from datetime import datetime from hashlib import md5 from cStringIO import StringIO import random a = 0 class Simple(Handler): rule = Rule("/simple/") def get(self): return Response("Hello Wold! %s %s"%( self.request.client_session.get("...
[ [ 1, 0, 0.026, 0.013, 0, 0.66, 0, 188, 0, 1, 0, 0, 188, 0, 0 ], [ 1, 0, 0.039, 0.013, 0, 0.66, 0.0909, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0519, 0.013, 0, 0.66,...
[ "from www.shortcuts import *", "from datetime import datetime", "from hashlib import md5", "from cStringIO import StringIO", "import random", "a = 0", "class Simple(Handler):\n rule = Rule(\"/simple/\")\n def get(self):\n return Response(\"Hello Wold! %s %s\"%(\n self.request.cli...
# -*- coding: utf-8 -*- import os from www.shortcuts import * class Static(StaticHandler): rule = Rule('/static/<path:path>') static_dir = os.path.join(base_path, 'static') class Login(Handler): rule = Rule('/login/') def get(self): tmpl = env.get_template('login.html') return Respon...
[ [ 1, 0, 0.0526, 0.0263, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0789, 0.0263, 0, 0.66, 0.25, 188, 0, 1, 0, 0, 188, 0, 0 ], [ 3, 0, 0.1842, 0.0789, 0, 0....
[ "import os", "from www.shortcuts import *", "class Static(StaticHandler):\n rule = Rule('/static/<path:path>')\n static_dir = os.path.join(base_path, 'static')", " rule = Rule('/static/<path:path>')", " static_dir = os.path.join(base_path, 'static')", "class Login(Handler):\n rule = Rule('/...
# -*- coding: utf-8 -*- import logging from . import * from accost.shortcuts import *
[ [ 1, 0, 0.5, 0.25, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.75, 0.25, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 0, 1, 0.25, 0, 0.66, 1, 647, ...
[ "import logging", "from . import *", "from accost.shortcuts import *" ]
# -*- coding: utf-8 -*- import os debug = True secret_key = '\xfd|\x1f9\x85\xab\x06Jq(\xeb\x98Ft\x83_\xdc\xad8\t' # 获取当前目录 from os.path import abspath, dirname, join base_path = abspath(dirname(__file__)) # 添加系统路径 import sys sys.path.insert(0, abspath(join(base_path, '..', '..', '..'))) # 配置session from accost.sessi...
[ [ 1, 0, 0.0333, 0.0167, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.05, 0.0167, 0, 0.66, 0.04, 924, 1, 0, 0, 0, 0, 4, 0 ], [ 14, 0, 0.0667, 0.0167, 0, 0.66...
[ "import os", "debug = True", "secret_key = '\\xfd|\\x1f9\\x85\\xab\\x06Jq(\\xeb\\x98Ft\\x83_\\xdc\\xad8\\t'", "from os.path import abspath, dirname, join", "base_path = abspath(dirname(__file__))", "import sys", "sys.path.insert(0, abspath(join(base_path, '..', '..', '..')))", "from accost.sessions im...
# -*- coding: utf-8 -*- import www from accost.cli import Command command = Command(www) application = command.application if __name__ == '__main__': command.run()
[ [ 1, 0, 0.2222, 0.1111, 0, 0.66, 0, 192, 0, 1, 0, 0, 192, 0, 0 ], [ 1, 0, 0.3333, 0.1111, 0, 0.66, 0.25, 462, 0, 1, 0, 0, 462, 0, 0 ], [ 14, 0, 0.4444, 0.1111, 0, 0...
[ "import www", "from accost.cli import Command", "command = Command(www)", "application = command.application", "if __name__ == '__main__':\n command.run()", " command.run()" ]
# -*- coding: utf-8 -*- from time import sleep from phprpc import PHPRPC_WSGIApplication def add(a, b): return a + b phprpc_app = PHPRPC_WSGIApplication(sessionName="werkzeug.session") phprpc_app.add(add) phprpc_app.add(pow) from accost.wsgiapps.xmlrpc import WSGIXMLRPCApplication xmlrpc_app = WSGIXMLRPCAppli...
[ [ 1, 0, 0.1176, 0.0588, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.1765, 0.0588, 0, 0.66, 0.1111, 226, 0, 1, 0, 0, 226, 0, 0 ], [ 2, 0, 0.3235, 0.1176, 0, ...
[ "from time import sleep", "from phprpc import PHPRPC_WSGIApplication", "def add(a, b): \n return a + b", " return a + b", "phprpc_app = PHPRPC_WSGIApplication(sessionName=\"werkzeug.session\")", "phprpc_app.add(add)", "phprpc_app.add(pow)", "from accost.wsgiapps.xmlrpc import WSGIXMLRPCApplicati...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, os from os.path import abspath, dirname, join, exists from jinja2 import Environment, PackageLoader env = Environment(loader=PackageLoader('accost', 'templates')) def main(): if len(sys.argv) != 2: print "please make a name of the project" ...
[ [ 1, 0, 0.0769, 0.0256, 0, 0.66, 0, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1026, 0.0256, 0, 0.66, 0.2, 79, 0, 4, 0, 0, 79, 0, 0 ], [ 1, 0, 0.1282, 0.0256, 0, 0.66,...
[ "import sys, os", "from os.path import abspath, dirname, join, exists", "from jinja2 import Environment, PackageLoader", "env = Environment(loader=PackageLoader('accost', 'templates'))", "def main():\n if len(sys.argv) != 2:\n print(\"please make a name of the project\")\n sys.exit(1)\n ...
# -*- coding: utf-8 -*- import json from werkzeug.wrappers import Response Response.default_mimetype = 'text/html' from accost.utils.common import shell, CachedProperty from accost.wrappers import JsonResponse, error, success from {{ project_name }} import * def render(template, **kw): tmpl = env.get_template(tem...
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.2727, 0.0909, 0, 0.66, 0.2, 918, 0, 1, 0, 0, 918, 0, 0 ], [ 14, 0, 0.3636, 0.0909, 0, 0....
[ "import json", "from werkzeug.wrappers import Response", "Response.default_mimetype = 'text/html'", "from accost.utils.common import shell, CachedProperty", "from accost.wrappers import JsonResponse, error, success", "def render(template, **kw):\n tmpl = env.get_template(template)\n return Response(...
#!/usr/bin/env python # -*- coding: utf-8 -*- import {{ project_name }} from accost.cli import NewCommand as Command command = Command({{ project_name }}) application = command.application if __name__ == '__main__': command.run()
[ [ 1, 0, 0.3333, 0.1111, 0, 0.66, 0, 462, 0, 1, 0, 0, 462, 0, 0 ], [ 14, 0, 0.4444, 0.1111, 0, 0.66, 0.3333, 842, 3, 1, 0, 0, 73, 10, 1 ], [ 14, 0, 0.5556, 0.1111, 0, ...
[ "from accost.cli import NewCommand as Command", "command = Command({{ project_name }})", "application = command.application", "if __name__ == '__main__':\n command.run()", " command.run()" ]
# -*- coding: utf-8 -*- from accost.utils.auth import UserBase #from sqlalchemy.orm import mapper class User(UserBase): pass #mapper(User, user_info)
[ [ 1, 0, 0.25, 0.125, 0, 0.66, 0, 655, 0, 1, 0, 0, 655, 0, 0 ], [ 3, 0, 0.8125, 0.25, 0, 0.66, 1, 61, 0, 0, 0, 0, 446, 0, 0 ] ]
[ "from accost.utils.auth import UserBase", "class User(UserBase):\n pass" ]
# -*- coding: utf-8 -*- from ..shortcuts import * @home.expose("/") def index(): return Response("Hello World!")
[ [ 1, 0, 0.2857, 0.1429, 0, 0.66, 0, 108, 0, 1, 0, 0, 108, 0, 0 ], [ 2, 0, 0.9286, 0.2857, 0, 0.66, 1, 780, 0, 0, 1, 0, 0, 0, 2 ], [ 13, 1, 1, 0.1429, 1, 0.02, 0...
[ "from ..shortcuts import *", "def index():\n return Response(\"Hello World!\")", " return Response(\"Hello World!\")" ]
#!{{ pythonbin }} # -*- coding: utf-8 -*- import os, sys from time import sleep os.environ["PATH"] = "/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" PORT = {{ args.port }} PIDFILE = "/tmp/{{ pname }}_{{ args.protocol }}.pid" LOGFILE = "/tmp/{{ pname }}_{{ args.protocol }}.log" MANAGE = "{{ pythonbin ...
[ [ 1, 0, 0.037, 0.0123, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0494, 0.0123, 0, 0.66, 0.0714, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 14, 0, 0.0617, 0.0123, 0, ...
[ "import os, sys", "from time import sleep", "os.environ[\"PATH\"] = \"/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"", "PORT = {{ args.port }}", "PIDFILE = \"/tmp/{{ pname }}_{{ args.protocol }}.pid\"", "LOGFILE = \"/tmp/{{ pname }}_{{ args.protocol }}.log\"", "MANAGE = \"{{ pythonbi...
#!{{ pythonbin }} # -*- coding: utf-8 -*- import os, sys from time import sleep PORT = {{ args.port }} PIDFILE = "/tmp/{{ pname }}_uwsgi.pid" LOGFILE = "/tmp/{{ pname }}_uwsgi.log" MANAGE = "{{ pythonbin }} {{ argv0 }}" BIN = "uwsgi" def start(do_test=True): if sys.platform != "darwin"...
[ [ 1, 0, 0.039, 0.013, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0519, 0.013, 0, 0.66, 0.0714, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 14, 0, 0.0649, 0.013, 0, 0.6...
[ "import os, sys", "from time import sleep", "PORT = {{ args.port }}", "PIDFILE = \"/tmp/{{ pname }}_uwsgi.pid\"", "LOGFILE = \"/tmp/{{ pname }}_uwsgi.log\"", "MANAGE = \"{{ pythonbin }} {{ argv0 }}\"", "BIN = \"uwsgi\"", "def start(do_test=True):\n if sys.platform != \"d...
# -*- coding: utf-8 -*- from os.path import join from ..shortcuts import * from urllib import quote from accost.utils.handlers import serve_static @home.expose("/static/<path:path>", methods=["GET"]) def staticApp(): return serve_static(join(base_path, "static")) @home.expose("/login/") def login(): if requ...
[ [ 1, 0, 0.0571, 0.0286, 0, 0.66, 0, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.0857, 0.0286, 0, 0.66, 0.1667, 108, 0, 1, 0, 0, 108, 0, 0 ], [ 1, 0, 0.1143, 0.0286, 0, 0....
[ "from os.path import join", "from ..shortcuts import *", "from urllib import quote", "from accost.utils.handlers import serve_static", "def staticApp():\n return serve_static(join(base_path, \"static\"))", " return serve_static(join(base_path, \"static\"))", "def login():\n if request.method ==...
# -*- coding: utf-8 -*- import os # debug mode debug = True # get current directory from os.path import abspath, dirname, join base_path = abspath(dirname(__file__)) # system path import sys sys.path.insert(0, abspath(join(base_path, '..', 'lib'))) # configure session # set template directory from jinja2 import En...
[ [ 1, 0, 0.0513, 0.0256, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.1026, 0.0256, 0, 0.66, 0.0588, 924, 1, 0, 0, 0, 0, 4, 0 ], [ 1, 0, 0.1795, 0.0256, 0, 0...
[ "import os", "debug = True", "from os.path import abspath, dirname, join", "base_path = abspath(dirname(__file__))", "import sys", "sys.path.insert(0, abspath(join(base_path, '..', 'lib')))", "from jinja2 import Environment, PackageLoader", "env = Environment(loader=PackageLoader('{{ project_name }}',...
# -*- coding: utf-8 -*- import re from werkzeug.utils import cached_property from werkzeug.wrappers import Request, Response from werkzeug.exceptions import NotFound, MethodNotAllowed from werkzeug.contrib.securecookie import SecureCookie from .paginator import Paginator, InvalidPage from .helpers import get_flashed_me...
[ [ 1, 0, 0.0174, 0.0087, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0261, 0.0087, 0, 0.66, 0.0667, 138, 0, 1, 0, 0, 138, 0, 0 ], [ 1, 0, 0.0348, 0.0087, 0, ...
[ "import re", "from werkzeug.utils import cached_property", "from werkzeug.wrappers import Request, Response", "from werkzeug.exceptions import NotFound, MethodNotAllowed", "from werkzeug.contrib.securecookie import SecureCookie", "from .paginator import Paginator, InvalidPage", "from .helpers import get...
# -*- coding: utf-8 -*- import os from datetime import datetime, timedelta try: from cPickle import dumps, loads, HIGHEST_PROTOCOL except ImportError: from pickle import dumps, loads, HIGHEST_PROTOCOL from werkzeug.contrib.sessions import FilesystemSessionStore, SessionStore, \ Session class DummySess...
[ [ 1, 0, 0.0119, 0.006, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0179, 0.006, 0, 0.66, 0.0833, 426, 0, 2, 0, 0, 426, 0, 0 ], [ 7, 0, 0.0327, 0.0238, 0, 0....
[ "import os", "from datetime import datetime, timedelta", "try:\n from cPickle import dumps, loads, HIGHEST_PROTOCOL\nexcept ImportError:\n from pickle import dumps, loads, HIGHEST_PROTOCOL", " from cPickle import dumps, loads, HIGHEST_PROTOCOL", " from pickle import dumps, loads, HIGHEST_PROTOCO...
# -*- coding: utf-8 -*- from math import ceil class InvalidPage(Exception): pass class PageNotAnInteger(InvalidPage): pass class EmptyPage(InvalidPage): pass class Paginator(object): def __init__(self, object_list, per_page, orphans=0, allow_empty_first_page=True): self.object_list = object_...
[ [ 1, 0, 0.0126, 0.0063, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 3, 0, 0.0283, 0.0126, 0, 0.66, 0.1667, 933, 0, 0, 0, 0, 645, 0, 0 ], [ 3, 0, 0.0472, 0.0126, 0, ...
[ "from math import ceil", "class InvalidPage(Exception):\n pass", "class PageNotAnInteger(InvalidPage):\n pass", "class EmptyPage(InvalidPage):\n pass", "class Paginator(object):\n def __init__(self, object_list, per_page, orphans=0, allow_empty_first_page=True):\n self.object_list = objec...
# -*- coding: utf-8 -*- from ..wrappers import SESSION_USER_KEY def get_hexdigest(algorithm, salt, raw_password): """ Returns a string of the hexdigest of the given plaintext password and salt using the given algorithm ('md5', 'sha1' or 'crypt'). """ raw_password, salt = str(raw_password), str(sa...
[ [ 1, 0, 0.0263, 0.0132, 0, 0.66, 0, 755, 0, 1, 0, 0, 755, 0, 0 ], [ 2, 0, 0.25, 0.3816, 0, 0.66, 0.2, 706, 0, 3, 1, 0, 0, 0, 13 ], [ 8, 1, 0.0987, 0.0526, 1, 0.31, ...
[ "from ..wrappers import SESSION_USER_KEY", "def get_hexdigest(algorithm, salt, raw_password):\n \"\"\" \n Returns a string of the hexdigest of the given plaintext password and salt\n using the given algorithm ('md5', 'sha1' or 'crypt').\n \"\"\"\n raw_password, salt = str(raw_password), str(salt)\n...
# -*- coding: utf-8 -*- from jinja2 import nodes from jinja2.ext import Extension class FragmentCacheExtension(Extension): # a set of names that trigger the extension. tags = set(['cache']) def __init__(self, environment): super(FragmentCacheExtension, self).__init__(environment) # add t...
[ [ 1, 0, 0.0345, 0.0172, 0, 0.66, 0, 436, 0, 1, 0, 0, 436, 0, 0 ], [ 1, 0, 0.0517, 0.0172, 0, 0.66, 0.5, 168, 0, 1, 0, 0, 168, 0, 0 ], [ 3, 0, 0.5345, 0.8793, 0, 0.6...
[ "from jinja2 import nodes", "from jinja2.ext import Extension", "class FragmentCacheExtension(Extension):\n # a set of names that trigger the extension.\n tags = set(['cache'])\n\n def __init__(self, environment):\n super(FragmentCacheExtension, self).__init__(environment)\n\n # add the d...
# -*- coding: utf-8 -*- import os, stat import threading from time import mktime from datetime import datetime, timedelta from mimetypes import guess_type from random import randint from functools import wraps from os.path import dirname, abspath, join, isfile from StringIO import StringIO from werkzeug.exceptions impo...
[ [ 1, 0, 0.0131, 0.0065, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0196, 0.0065, 0, 0.66, 0.0417, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 1, 0, 0.0261, 0.0065, 0, 0....
[ "import os, stat", "import threading", "from time import mktime", "from datetime import datetime, timedelta", "from mimetypes import guess_type", "from random import randint", "from functools import wraps", "from os.path import dirname, abspath, join, isfile", "from StringIO import StringIO", "fro...
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import date from ofc2 import * def is_holiday(dat): if isinstance(dat, str): dat = date(*map(int, dat.split("-"))) if dat.weekday() in (5, 6): return True return False _rulers = [] for i in (1, 10, 100, 1000, 10000, 100000, 1000...
[ [ 1, 0, 0.021, 0.007, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.028, 0.007, 0, 0.66, 0.1111, 145, 0, 1, 0, 0, 145, 0, 0 ], [ 2, 0, 0.0664, 0.042, 0, 0.66,...
[ "from datetime import date", "from ofc2 import *", "def is_holiday(dat):\n if isinstance(dat, str):\n dat = date(*map(int, dat.split(\"-\")))\n if dat.weekday() in (5, 6):\n return True\n return False", " if isinstance(dat, str):\n dat = date(*map(int, dat.split(\"-\")))", "...
import os from urllib import quote, unquote from logging import getLogger try: import json except ImportError: # Python < 2.6 import simplejson as json __all__ = ["Flash"] IS_DEBUG = 'WEBFLASH_DEBUG' in os.environ log = getLogger(__name__) class Flash(object): """ A flash message creator. *...
[ [ 1, 0, 0.0046, 0.0046, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0093, 0.0046, 0, 0.66, 0.1, 614, 0, 2, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0139, 0.0046, 0, 0.6...
[ "import os", "from urllib import quote, unquote", "from logging import getLogger", "try:\n import json\nexcept ImportError:\n # Python < 2.6\n import simplejson as json", " import json", " import simplejson as json", "__all__ = [\"Flash\"]", "IS_DEBUG = 'WEBFLASH_DEBUG' in os.environ", ...