code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ [ 8, 0, 0.033, 0.0022, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0374, 0.0022, 0, 0.66, 0.037, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0441, 0.0022, 0, 0.66, ...
[ "\"\"\"Handlers for custom HTML tags.\"\"\"", "__author__ = 'John Orr (jorr@google.com)'", "import logging", "import mimetypes", "import os", "import re", "from xml.etree import cElementTree", "import html5lib", "import lxml.html", "import safe_dom", "import webapp2", "import appengine_config"...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ [ 8, 0, 0.0685, 0.0046, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0776, 0.0046, 0, 0.66, 0.25, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.379, 0.5799, 0, 0.66, ...
[ "\"\"\"Unified method of referring to to heterogenous resources in courses\"\"\"", "__author__ = 'Mike Gainer (mgainer@google.com)'", "class AbstractResourceHandler(object):\n \"\"\"Unified accessor for heterogenous resources within CourseBuilder.\n\n CourseBuilder contains a number of different resources...
# -*- coding: utf-8; -*- # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ [ 8, 0, 0.1088, 0.0068, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1224, 0.0068, 0, 0.66, 0.1111, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1361, 0.0068, 0, 0.66,...
[ "\"\"\"Functions used for Course Builder locale support.\"\"\"", "__author__ = 'John Orr (jorr@google.com)'", "import logging", "import os", "import re", "import appengine_config", "LOCALES_DISPLAY_NAMES = {\n 'af': u'Afrikaans (af)',\n 'am': u'አማርኛ (am)',\n 'ar': u'العربية (ar)',\n 'bg': u'...
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ [ 8, 0, 0.0811, 0.0054, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0919, 0.0054, 0, 0.66, 0.0385, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1027, 0.0054, 0, 0.66,...
[ "\"\"\"Custom Jinja2 filters used in Course Builder.\"\"\"", "__author__ = 'John Orr (jorr@google.com)'", "import sys", "import traceback", "import jinja2", "import safe_dom", "import tags", "from webapp2_extras import i18n", "import appengine_config", "from common import caching", "from models ...
#!/usr/bin/python # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ [ 8, 0, 0.0733, 0.0043, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0819, 0.0043, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0905, 0.0043, 0, 0.66, ...
[ "\"\"\"Classes for processing various .yaml files in CourseBuilder installations.\"\"\"", "__author__ = 'Mike Gainer (mgainer@google.com)'", "import copy", "import re", "import yaml", "NEWLINE_BEFORE_YAML_SECTIONS = set([\n 'env_variables',\n 'includes',\n 'inbound_services',\n 'builtins',\n ...
"""Classes to build sanitized HTML.""" __author__ = 'John Orr (jorr@google.com)' import cgi import re def escape(strg): return cgi.escape(strg, quote=1).replace("'", ''').replace('`', '`') class Node(object): """Base class for the sanitizing module.""" def __init__(self): self._parent...
[ [ 8, 0, 0.0032, 0.0032, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0095, 0.0032, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0158, 0.0032, 0, 0.66,...
[ "\"\"\"Classes to build sanitized HTML.\"\"\"", "__author__ = 'John Orr (jorr@google.com)'", "import cgi", "import re", "def escape(strg):\n return cgi.escape(strg, quote=1).replace(\"'\", ''').replace('`', '`')", " return cgi.escape(strg, quote=1).replace(\"'\", ''').replace('`', '`...
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ [ 8, 0, 0.0607, 0.004, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0688, 0.004, 0, 0.66, 0.0385, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0769, 0.004, 0, 0.66, ...
[ "\"\"\"General utility functions common to all of CourseBuilder.\"\"\"", "__author__ = 'Mike Gainer (mgainer@google.com)'", "import cStringIO", "import datetime", "import logging", "import random", "import re", "import string", "import sys", "import traceback", "import zipfile", "import appeng...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ [ 8, 0, 0.0487, 0.0032, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0552, 0.0032, 0, 0.66, 0.0476, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0617, 0.0032, 0, 0.66,...
[ "\"\"\"Encryption and digest functionality.\"\"\"", "__author__ = 'Mike Gainer (mgainer@google.com)'", "import base64", "import hashlib", "import hmac", "import os", "import random", "import time", "import appengine_config", "from common import utils", "from models import config", "from google...
# -*- coding: utf-8 -*- # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
[ [ 8, 0, 0.0233, 0.0356, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0416, 0.0004, 0, 0.66, 0.0244, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0427, 0.0004, 0, 0.66,...
[ "\"\"\"HTML content transformation and manipulation functions.\n\nAbout\n\n This module performs complex HTML document transformations, which enable\n machine-assisted internationalization (I18N) of content.", "__author__ = 'Pavel Simakov (psimakov@google.com)'", "import difflib", "import htmlentitydefs...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ [ 8, 0, 0.0274, 0.0018, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0311, 0.0018, 0, 0.66, 0.0435, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0366, 0.0018, 0, 0.66,...
[ "\"\"\"Helper classes to implement caching.\"\"\"", "__author__ = 'Pavel Simakov (psimakov@google.com)'", "import collections", "import datetime", "import logging", "import sys", "import threading", "import unittest", "import appengine_config", "from models.counters import PerfCounter", "def ite...
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ [ 8, 0, 0.0225, 0.0015, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0254, 0.0015, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0284, 0.0015, 0, 0.66,...
[ "\"\"\"Mapping from schema to backend properties.\"\"\"", "__author__ = 'Abhinav Khandelwal (abhinavk@google.com)'", "import collections", "import copy", "import json", "class Property(object):\n \"\"\"Property.\"\"\"\n\n def __init__(\n self, name, label, property_type, select_data=None, des...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ [ 8, 0, 0.1154, 0.0077, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1308, 0.0077, 0, 0.66, 0.1, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1462, 0.0077, 0, 0.66, ...
[ "\"\"\"Module providing simplistic logger.\"\"\"", "__author__ = 'Mike Gainer (mgainer@google.com)'", "import datetime", "import logging", "import traceback", "import appengine_config", "_LOG_DATE_FORMAT = '%Y-%m-%dT%H:%M:%S.%f'", "_CRITICAL = 'critical'", "_WARNING = 'warning'", "_INFO = 'info'",...
""" FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/license...
[ [ 8, 0, 0.0719, 0.1375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.15, 0.0063, 0, 0.66, 0.1667, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.1562, 0.0063, 0, 0.66, ...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2008 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "import cgi", "import os", "import re", "import string", "def escape(text,...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 8, 0, 0.2586, 0.431, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.0172, 0, 0.66, 0.2, 385, 0, 1, 0, 0, 385, 0, 0 ], [ 1, 0, 0.5172, 0.0172, 0, 0.66, 0...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2008 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from connector import FCKeditorConnector", "from upload import FCKeditorQuickUp...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0638, 0.0213, 0, 0.66, 0.2, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0851, 0.0213, 0, 0.6...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorQuickUpload(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 8, 0, 0.1667, 0.2778, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3111, 0.0111, 0, 0.66, 0.1429, 934, 0, 2, 0, 0, 934, 0, 0 ], [ 1, 0, 0.3333, 0.0111, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2008 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "import cgi, os", "from fckutil import *", "from fckcommands import * \t# defa...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 1, 0, 0.0132, 0.0132, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0395, 0.0132, 0, 0.66, 0.1667, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0526, 0.0132, 0, ...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckoutput import * \t# base http, xml and html output mixins", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorConnector(\tF...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 8, 0, 0.1207, 0.1983, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2328, 0.0086, 0, 0.66, 0.1429, 654, 0, 2, 0, 0, 654, 0, 0 ], [ 1, 0, 0.2414, 0.0086, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2008 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from time import gmtime, strftime", "import string", "def escape(text, replac...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 8, 0, 0.1667, 0.2778, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3111, 0.0111, 0, 0.66, 0.1429, 934, 0, 2, 0, 0, 934, 0, 0 ], [ 1, 0, 0.3333, 0.0111, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2008 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "import cgi, os", "from fckutil import *", "from fckcommands import * \t# defa...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 1, 0, 0.0132, 0.0132, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0395, 0.0132, 0, 0.66, 0.1667, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0526, 0.0132, 0, ...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckoutput import * \t# base http, xml and html output mixins", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorConnector(\tF...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 8, 0, 0.1207, 0.1983, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2328, 0.0086, 0, 0.66, 0.1429, 654, 0, 2, 0, 0, 654, 0, 0 ], [ 1, 0, 0.2414, 0.0086, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2008 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from time import gmtime, strftime", "import string", "def escape(text, replac...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 8, 0, 0.2586, 0.431, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.0172, 0, 0.66, 0.2, 385, 0, 1, 0, 0, 385, 0, 0 ], [ 1, 0, 0.5172, 0.0172, 0, 0.66, 0...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2008 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from connector import FCKeditorConnector", "from upload import FCKeditorQuickUp...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0638, 0.0213, 0, 0.66, 0.2, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0851, 0.0213, 0, 0.6...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorQuickUpload(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t...
# -*- coding: utf-8 -*- # # jQuery File Upload Plugin GAE Python Example 2.1.0 # https://github.com/blueimp/jQuery-File-Upload # # Copyright 2011, Sebastian Tschan # https://blueimp.net # # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT # from __future__ import with_statement from google.appe...
[ [ 1, 0, 0.0788, 0.0061, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0848, 0.0061, 0, 0.66, 0.0556, 279, 0, 2, 0, 0, 279, 0, 0 ], [ 1, 0, 0.0909, 0.0061, 0, ...
[ "from __future__ import with_statement", "from google.appengine.api import files, images", "from google.appengine.ext import blobstore, deferred", "from google.appengine.ext.webapp import blobstore_handlers", "import json", "import re", "import urllib", "import webapp2", "WEBSITE = 'http://blueimp.g...
##################################################### # Python Watch and Warn Files Modification script # ##################################################### # Vallee Cedric # # 20/12/2011 # # Network and Systems Security # ##################################################### import r...
[ [ 1, 0, 0.0437, 0.0049, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0485, 0.0049, 0, 0.66, 0.1, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.0534, 0.0049, 0, 0.6...
[ "import re", "import subprocess", "import os", "import hashlib", "import smtplib", "from email.MIMEText import MIMEText", "class Analyser:\n\t#Constructor\n\t#mail : where the mail will be sent\n\t#dbpath : db location\n\t#fileList : List of files to analyse, ids.py and ids.cfg are automatically added\n...
# email_spam.py # # This file does the actual spam detection in Peter Ballard's email spam filter. # The function check() takes in an email message (the "message" class from # the standard Python module email), and returns a status # ("wham", "mham", "spam" or "ham") as well as a one line description. # # Feel free to...
[ [ 1, 0, 0.0928, 0.003, 0, 0.66, 0, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.0958, 0.003, 0, 0.66, 0.0222, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.1018, 0.003, 0, 0.6...
[ "import string", "import re", "import email_defs", "def file_to_list(filename):\n list = []\n fp = open(filename, \"r\")\n for line in fp.readlines():\n words = string.split(line)\n if len(words) and words[0][0]!=\"#\" and words[0][0]!=\";\":\n list.extend(words)\n fp.clos...
# email_defs.py # # This file is the "local definitions" part of Peter Ballard's email spam filter. # Some of this you will need to change, # and most of this you will want to change. # # Note the definitions for whitelist and blackdomains are not done here, # but are in separate files. This is because these two lists...
[ [ 14, 0, 0.2176, 0.0059, 0, 0.66, 0, 17, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2235, 0.0059, 0, 0.66, 0.0345, 728, 4, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2353, 0.0059, 0, 0....
[ "SYSMAILDIR = \"/home/pballard/sysmail/\"", "MAILNAME = SYSMAILDIR + \"pballard\"", "srcfilename = MAILNAME + \".raw\"", "storefilename = MAILNAME + \".store\"", "spamfilename = MAILNAME + \".spam\"", "hamfilename = MAILNAME + \".ham\"", "whamfilename = MAILNAME + \".wham\"", "mhamfilename = MAILNAME ...
# email_filter.py # # This file is the "bookkeeping" part of Peter Ballard's email spam filter. # This is the top level program. # It reads the user options, opens and closes the files, and sends emails # to the appropriate files. # However it is the function check() in the module email_spam, which this # program call...
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2, 0.1, 0, 0.66, 0.1429, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.2857, ...
[ "import sys", "import string", "import re", "import email", "import email.Errors", "import os", "import email_defs", "import email_spam" ]
# -*- coding: utf-8 -*- #!/usr/bin/env python import sys sys.path.append("~/5a-bucarest-vallee-cedric/asois/project") import orange class Filter: def __init__(self): print "init filt" self.file="" def isSpam(mail): pass def userDecision(): pass class kwordFilter(Filter): def __init__(self): print "in...
[ [ 1, 0, 0.0811, 0.027, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 8, 0, 0.1081, 0.027, 0, 0.66, 0.2, 243, 3, 1, 0, 0, 0, 0, 1 ], [ 1, 0, 0.1351, 0.027, 0, 0.66, ...
[ "import sys", "sys.path.append(\"~/5a-bucarest-vallee-cedric/asois/project\")", "import orange", "class Filter:\n\tdef __init__(self):\n\t\tprint(\"init filt\")\n\t\tself.file=\"\"\n\n\tdef isSpam(mail):\n\t\tpass\n\tdef userDecision():", "\tdef __init__(self):\n\t\tprint(\"init filt\")\n\t\tself.file=\"\""...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0638, 0.0213, 0, 0.66, 0.2, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0851, 0.0213, 0, 0.6...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorQuickUpload(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 8, 0, 0.1176, 0.1933, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2269, 0.0084, 0, 0.66, 0.1429, 654, 0, 2, 0, 0, 654, 0, 0 ], [ 1, 0, 0.2353, 0.0084, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2010 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from time import gmtime, strftime", "import string", "def escape(text, replac...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0638, 0.0213, 0, 0.66, 0.2, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0851, 0.0213, 0, 0.6...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorQuickUpload(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 8, 0, 0.1667, 0.2778, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3111, 0.0111, 0, 0.66, 0.1429, 934, 0, 2, 0, 0, 934, 0, 0 ], [ 1, 0, 0.3333, 0.0111, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2010 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "import cgi, os", "from fckutil import *", "from fckcommands import * \t# defa...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 8, 0, 0.2586, 0.431, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.0172, 0, 0.66, 0.2, 385, 0, 1, 0, 0, 385, 0, 0 ], [ 1, 0, 0.5172, 0.0172, 0, 0.66, 0...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2010 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from connector import FCKeditorConnector", "from upload import FCKeditorQuickUp...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 1, 0, 0.0127, 0.0127, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.038, 0.0127, 0, 0.66, 0.1667, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0506, 0.0127, 0, 0...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckoutput import * \t# base http, xml and html output mixins", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorConnector(\tF...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 8, 0, 0.1176, 0.1933, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2269, 0.0084, 0, 0.66, 0.1429, 654, 0, 2, 0, 0, 654, 0, 0 ], [ 1, 0, 0.2353, 0.0084, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2010 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from time import gmtime, strftime", "import string", "def escape(text, replac...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
[ [ 8, 0, 0.1667, 0.2778, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3111, 0.0111, 0, 0.66, 0.1429, 934, 0, 2, 0, 0, 934, 0, 0 ], [ 1, 0, 0.3333, 0.0111, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2010 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "import cgi, os", "from fckutil import *", "from fckcommands import * \t# defa...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 8, 0, 0.2586, 0.431, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.0172, 0, 0.66, 0.2, 385, 0, 1, 0, 0, 385, 0, 0 ], [ 1, 0, 0.5172, 0.0172, 0, 0.66, 0...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2010 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from connector import FCKeditorConnector", "from upload import FCKeditorQuickUp...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 1, 0, 0.0127, 0.0127, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.038, 0.0127, 0, 0.66, 0.1667, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0506, 0.0127, 0, 0...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckoutput import * \t# base http, xml and html output mixins", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorConnector(\tF...
""" FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/license...
[ [ 8, 0, 0.0719, 0.1375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.15, 0.0063, 0, 0.66, 0.1667, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.1562, 0.0063, 0, 0.66, ...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2010 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "import cgi", "import os", "import re", "import string", "def escape(text,...
#------------------------------------------------------------------------------- # Name: analyze_graph # Purpose: # # Author: Azfar Khandoker # # Created: 10/04/2013 # Copyright: (c) Azfar Khandoker 2013 # Licence: <your licence> #-------------------------------------------------------------------...
[ [ 1, 0, 0.2264, 0.0189, 0, 0.66, 0, 107, 0, 1, 0, 0, 107, 0, 0 ], [ 14, 0, 0.3019, 0.0189, 0, 0.66, 0.0625, 275, 3, 1, 0, 0, 821, 10, 1 ], [ 14, 0, 0.3962, 0.0189, 0, ...
[ "from igraph import *", "filename = raw_input(\"filename: \")", "file_to_read = \"../graphs/\" + filename", "print (\"reading \" + file_to_read)", "g = Graph.Read_GML(file_to_read)", "summary(g)", "print(\"\\naverage path length = \" + str(g.average_path_length()))", "result = filename.split('.')", ...
#------------------------------------------------------------------------------- # Name: amazon_generator # Purpose: # # Author: Azfar Khandoker # # Created: 17/04/2013 # Copyright: (c) Azfar Khandoker 2013 # Licence: <your licence> #-------------------------------------------------------...
[ [ 1, 0, 0.1644, 0.0137, 0, 0.66, 0, 107, 0, 1, 0, 0, 107, 0, 0 ], [ 1, 0, 0.1781, 0.0137, 0, 0.66, 0.1429, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 14, 0, 0.2466, 0.0959, 0, ...
[ "from igraph import *", "import re", "seeds = [\n 'las vegas',\n 'the beatles',\n 'oreo',\n 'zebra',\n 'sony'\n]", "k = 4", "f = open('amazon.gml', 'r')", "g = Graph.Read_GML(f)", "f.close()", "for seed in seeds:\n count = 0\n\n #this regular expression allows only the whole word ...
#original Amazon data from #http://snap.stanford.edu/data/bigdata/amazon/amazon-meta.txt.gz f = open("amazon-meta.txt", "r") #the ASIN id count = 0 #dictionary associates an ASIN with #its title and similar products d = dict() #list to keep the ASINs ordered according to #order in which they were encountered l = [] ...
[ [ 14, 0, 0.0435, 0.0145, 0, 0.66, 0, 899, 3, 2, 0, 0, 693, 10, 1 ], [ 14, 0, 0.087, 0.0145, 0, 0.66, 0.1, 778, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.1449, 0.0145, 0, 0....
[ "f = open(\"amazon-meta.txt\", \"r\")", "count = 0", "d = dict()", "l = []", "for line in f:\n #seen line starting with 'ASIN'\n #check next line for 'title'\n if line.startswith(\"ASIN\"):\n ASIN = line[6:-1]\n continue\n\n #seen line starting with 'title'", " if line.startsw...
#!/bin/usr/python from igraph import * print "Filename: " file = raw_input() g = Graph.Read_GML(file) print g.summary() n = g.degree_distribution().n f = open(file + "_deg_dist.csv", 'w') for left, right, count in g.degree_distribution().bins(): print >>f, "%d,%f" % (left, float(float(count)/n)) f.close()
[ [ 1, 0, 0.5, 0.5, 0, 0.66, 0, 107, 0, 1, 0, 0, 107, 0, 0 ] ]
[ "from igraph import *" ]
from igraph import * num_gs_only = 0; # gs = Google Sets num_shared = 0; num_not_gs = 0; g_name = raw_input("Google sets graph: ") g = Graph.Read_GML(g_name); h_name = raw_input("Amazon graph: ") h = Graph.Read_GML(h_name); for v in g.vs: query = v["label"] query = query.tit...
[ [ 1, 0, 0.0294, 0.0294, 0, 0.66, 0, 107, 0, 1, 0, 0, 107, 0, 0 ], [ 14, 0, 0.0882, 0.0294, 0, 0.66, 0.0714, 866, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.1176, 0.0294, 0, ...
[ "from igraph import *", "num_gs_only = 0; # gs = Google Sets", "num_shared = 0;", "num_not_gs = 0;", "g_name = raw_input(\"Google sets graph: \")", "g = Graph.Read_GML(g_name);", "h_name = raw_input(\"Amazon graph: \")", "h = Graph.Read_GML(h_name);", "for v in g.vs:\n query = v[\"labe...
#------------------------------------------------------------------------------- # Name: wiki_generator # Purpose: Generates subgraphs with k = 4 for the given seed words # # Author: Ryan Miller # # Created: 17/04/2013 # Copyright: (c) Not Azfar Khandoker 2013 # Licence: <your licence> #------...
[ [ 1, 0, 0.2264, 0.0189, 0, 0.66, 0, 107, 0, 1, 0, 0, 107, 0, 0 ], [ 1, 0, 0.2453, 0.0189, 0, 0.66, 0.0769, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 14, 0, 0.3396, 0.1321, 0, ...
[ "from igraph import *", "import re", "seeds = [\n 'Las_Vegas',\n 'The_Beatles',\n 'Oreo',\n 'Zebra',\n 'Sony'\n]", "k = 2", "print(\"Reading edge list\")", "g = Graph.Read_Edgelist(\"/homes/millerrv/scratch/links_el_final.txt\")", "print(\"Done\")", "print(\"Combining data with titles\"...
from igraph import * import matplotlib.pyplot as plt plt.figure() g = Graph.Read_GML(raw_input()) dd = g.degree_distribution() xs, ys = zip(*[(left, count / float(dd.n)) for left, _, count in dd.bins()]) plt.xscale('log') plt.yscale('log') plt.title(r"$\mathrm{"+name+"\ Degree\ Distribution}$") plt...
[ [ 1, 0, 0.0476, 0.0476, 0, 0.66, 0, 107, 0, 1, 0, 0, 107, 0, 0 ], [ 1, 0, 0.0952, 0.0476, 0, 0.66, 0.0833, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 8, 0, 0.1905, 0.0476, 0, ...
[ "from igraph import *", "import matplotlib.pyplot as plt", "plt.figure()", "g = Graph.Read_GML(raw_input())", "dd = g.degree_distribution()", "xs, ys = zip(*[(left, count / float(dd.n)) for left, _, count in dd.bins()])", "plt.xscale('log')", "plt.yscale('log')", "plt.title(r\"$\\mathrm{\"+name+\"\\...
def cosine_similarity(g,i,j): adj = g.get_adjacency() n = 0.0 for k in range(adj.shape[0]): n = n + (adj[i,k] * adj[k,j]) sim = n / math.sqrt(g.vs[i].degree() * g.vs[j].degree()) return sim # warning: takes a long time def all_cosine_similarity(g): list = [] for i in range(len(g.vs)): for j ...
[ [ 2, 0, 0.2667, 0.4667, 0, 0.66, 0, 567, 0, 3, 1, 0, 0, 0, 5 ], [ 14, 1, 0.1333, 0.0667, 1, 0.06, 0, 761, 3, 0, 0, 0, 985, 10, 1 ], [ 14, 1, 0.2, 0.0667, 1, 0.06, ...
[ "def cosine_similarity(g,i,j):\n\tadj = g.get_adjacency()\n\tn = 0.0\n\tfor k in range(adj.shape[0]):\n\t\tn = n + (adj[i,k] * adj[k,j])\n\tsim = n / math.sqrt(g.vs[i].degree() * g.vs[j].degree())\n\treturn sim", "\tadj = g.get_adjacency()", "\tn = 0.0", "\tfor k in range(adj.shape[0]):\n\t\tn = n + (adj[i,k]...
#------------------------------------------------------------------------------- # Name: edge_list_to_gml # Purpose: # # Author: Azfar Khandoker # # Created: 17/04/2013 # Copyright: (c) Azfar Khandoker 2013 # Licence: <your licence> #-------------------------------------------------------...
[ [ 1, 0, 0.2667, 0.0222, 0, 0.66, 0, 107, 0, 1, 0, 0, 107, 0, 0 ], [ 14, 0, 0.4222, 0.0222, 0, 0.66, 0.0909, 899, 3, 2, 0, 0, 693, 10, 1 ], [ 14, 0, 0.4667, 0.0222, 0, ...
[ "from igraph import *", "f = open('edge-list.txt', 'r')", "g = Graph.Read_Edgelist(f)", "f.close()", "f = open(\"vertex-labels.txt\", 'r')", "labels = []", "for line in f:\n labels.append(line[:-1].split(' ', 1)[1].replace('\"', ''))", " labels.append(line[:-1].split(' ', 1)[1].replace('\"', '')...
#!/bin/usr/python from igraph import * print "Filename: " file = raw_input() g = Graph.Read_GML(file) print g.summary() n = g.degree_distribution().n f = open(file + "_deg_dist.csv", 'w') for left, right, count in g.degree_distribution().bins(): print >>f, "%d,%f" % (left, float(float(count)/n)) f.close()
[ [ 1, 0, 0.5, 0.5, 0, 0.66, 0, 107, 0, 1, 0, 0, 107, 0, 0 ] ]
[ "from igraph import *" ]
#!/usr/bin/python import sys W = {} W['A'] = [] W['W'] = [] W['F'] = W['W'] for line in sys.stdin: i = line.find ('#') if i >= 0: line = line[:i] line = line.strip () if not len (line): continue fields = [x.strip () for x in line.split (';')] chars = fields[0] width = fields[1] if width not in ['A', 'W...
[ [ 1, 0, 0.0556, 0.0185, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.0926, 0.0185, 0, 0.66, 0.1111, 94, 0, 0, 0, 0, 0, 6, 0 ], [ 14, 0, 0.1111, 0.0185, 0, 0...
[ "import sys", "W = {}", "W['A'] = []", "W['W'] = []", "W['F'] = W['W']", "for line in sys.stdin:\n\ti = line.find ('#')\n\tif i >= 0:\n\t\tline = line[:i]\n\tline = line.strip ()\n\tif not len (line):\n\t\tcontinue", "\ti = line.find ('#')", "\tif i >= 0:\n\t\tline = line[:i]", "\t\tline = line[:i]"...
import sys import gdb # Update module path. dir_ = '/usr/local/share/glib-2.0/gdb' if not dir_ in sys.path: sys.path.insert(0, dir_) from glib import register register (gdb.current_objfile ())
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2, 0.1, 0, 0.66, 0.2, 430, 0, 1, 0, 0, 430, 0, 0 ], [ 14, 0, 0.5, 0.1, 0, 0.66, 0.4, 7...
[ "import sys", "import gdb", "dir_ = '/usr/local/share/glib-2.0/gdb'", "if not dir_ in sys.path:\n sys.path.insert(0, dir_)", " sys.path.insert(0, dir_)", "from glib import register", "register (gdb.current_objfile ())" ]
import gdb # This is not quite right, as local vars may override symname def read_global_var (symname): return gdb.selected_frame().read_var(symname) def g_quark_to_string (quark): if quark == None: return None quark = long(quark) if quark == 0: return None val = read_global_var ("...
[ [ 1, 0, 0.004, 0.004, 0, 0.66, 0, 430, 0, 1, 0, 0, 430, 0, 0 ], [ 2, 0, 0.0181, 0.008, 0, 0.66, 0.0909, 512, 0, 1, 1, 0, 0, 0, 2 ], [ 13, 1, 0.0201, 0.004, 1, 0.92,...
[ "import gdb", "def read_global_var (symname):\n return gdb.selected_frame().read_var(symname)", " return gdb.selected_frame().read_var(symname)", "def g_quark_to_string (quark):\n if quark == None:\n return None\n quark = long(quark)\n if quark == 0:\n return None\n val = read_...
import sys import gdb # Update module path. dir_ = '/usr/local/share/glib-2.0/gdb' if not dir_ in sys.path: sys.path.insert(0, dir_) from gobject import register register (gdb.current_objfile ())
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2, 0.1, 0, 0.66, 0.2, 430, 0, 1, 0, 0, 430, 0, 0 ], [ 14, 0, 0.5, 0.1, 0, 0.66, 0.4, 7...
[ "import sys", "import gdb", "dir_ = '/usr/local/share/glib-2.0/gdb'", "if not dir_ in sys.path:\n sys.path.insert(0, dir_)", " sys.path.insert(0, dir_)", "from gobject import register", "register (gdb.current_objfile ())" ]
import gdb import glib import gdb.backtrace import gdb.command.backtrace # This is not quite right, as local vars may override symname def read_global_var (symname): return gdb.selected_frame().read_var(symname) def g_type_to_name (gtype): def lookup_fundamental_type (typenode): if typenode == 0: ...
[ [ 1, 0, 0.0033, 0.0033, 0, 0.66, 0, 430, 0, 1, 0, 0, 430, 0, 0 ], [ 1, 0, 0.0066, 0.0033, 0, 0.66, 0.0556, 233, 0, 1, 0, 0, 233, 0, 0 ], [ 1, 0, 0.0098, 0.0033, 0, ...
[ "import gdb", "import glib", "import gdb.backtrace", "import gdb.command.backtrace", "def read_global_var (symname):\n return gdb.selected_frame().read_var(symname)", " return gdb.selected_frame().read_var(symname)", "def g_type_to_name (gtype):\n def lookup_fundamental_type (typenode):\n ...
#!/usr/bin/env python import gobject import time import dbus import dbus.service import dbus.mainloop.glib class TestException(dbus.DBusException): _dbus_error_name = 'com.example.TestException' class TestService(dbus.service.Object): # ---------------------------------------------------------------------...
[ [ 1, 0, 0.0105, 0.0035, 0, 0.66, 0, 90, 0, 1, 0, 0, 90, 0, 0 ], [ 1, 0, 0.0139, 0.0035, 0, 0.66, 0.1429, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0209, 0.0035, 0, 0....
[ "import gobject", "import time", "import dbus", "import dbus.service", "import dbus.mainloop.glib", "class TestException(dbus.DBusException):\n _dbus_error_name = 'com.example.TestException'", " _dbus_error_name = 'com.example.TestException'", "class TestService(dbus.service.Object):\n\n # --...
#!/usr/bin/env python # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at y...
[ [ 1, 0, 0.6098, 0.0244, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.6341, 0.0244, 0, 0.66, 0.1667, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.6829, 0.0244, 0, ...
[ "import os", "import sys", "srcdir = os.getenv('UNINSTALLED_GLIB_SRCDIR', None)", "if srcdir is not None:\n path = os.path.join(srcdir, 'gio', 'gdbus-2.0')\nelif os.name == 'nt':\n # Makes gdbus-codegen 'relocatable' at runtime on Windows.\n path = os.path.join(os.path.dirname(__file__), '..', 'lib',...
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
[ [ 1, 0, 0.0738, 0.0031, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0769, 0.0031, 0, 0.66, 0.1667, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0831, 0.0031, 0, ...
[ "import sys", "import re", "from . import config", "from . import utils", "from . import dbustypes", "from . import parser", "class DocbookCodeGenerator:\n def __init__(self, ifaces, docbook):\n self.ifaces = ifaces\n self.docbook = docbook\n self.generate_expand_dicts()\n\n d...
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
[ [ 1, 0, 0.0573, 0.0024, 0, 0.66, 0, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 3, 0, 0.0668, 0.0119, 0, 0.66, 0.1667, 568, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 1, 0.068, 0.0095, 1, 0.66, ...
[ "from . import utils", "class Annotation:\n def __init__(self, key, value):\n self.key = key\n self.value = value\n self.annotations = []", " def __init__(self, key, value):\n self.key = key\n self.value = value\n self.annotations = []", " self.key = key"...
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
[ [ 14, 0, 0.8889, 0.037, 0, 0.66, 0, 366, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.9444, 0.0741, 0, 0.66, 0.5, 366, 3, 2, 0, 0, 293, 10, 1 ], [ 14, 0, 1, 0.037, 0, 0.66, ...
[ "DATADIR = \"${prefix}/share\"", "DATADIR = DATADIR.replace(\n \"${prefix}\", \"/usr/local\")", "VERSION = \"2.30.0\"" ]
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
[ [ 1, 0, 0.12, 0.005, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.125, 0.005, 0, 0.66, 0.0667, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 1, 0, 0.135, 0.005, 0, 0.66, ...
[ "import sys", "import optparse", "from . import config", "from . import utils", "from . import dbustypes", "from . import parser", "from . import codegen", "from . import codegen_docbook", "def find_arg(arg_list, arg_name):\n for a in arg_list:\n if a.name == arg_name:\n return ...
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
[ [ 1, 0, 0.0072, 0.0003, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0077, 0.0003, 0, 0.66, 0.25, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 0, 0.008, 0.0003, 0, 0.66, ...
[ "import sys", "from . import config", "from . import utils", "from . import dbustypes", "class CodeGenerator:\n def __init__(self, ifaces, namespace, interface_prefix, generate_objmanager, docbook_gen, h, c):\n self.docbook_gen = docbook_gen\n self.generate_objmanager = generate_objmanager\...
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
[ [ 1, 0, 0.2308, 0.0096, 0, 0.66, 0, 42, 0, 1, 0, 0, 42, 0, 0 ], [ 2, 0, 0.3077, 0.125, 0, 0.66, 0.1111, 914, 0, 1, 1, 0, 0, 0, 1 ], [ 14, 1, 0.2596, 0.0096, 1, 0.9,...
[ "import distutils.version", "def strip_dots(s):\n ret = ''\n force_upper = False\n for c in s:\n if c == '.':\n force_upper = True\n else:\n if force_upper:", " ret = ''", " force_upper = False", " for c in s:\n if c == '.':\n force_upp...
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
[ [ 1, 0, 0.8276, 0.0345, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.8966, 0.0345, 0, 0.66, 0.5, 555, 3, 1, 0, 0, 607, 10, 1 ], [ 4, 0, 0.9828, 0.069, 0, 0....
[ "import os", "builddir = os.environ.get('UNINSTALLED_GLIB_BUILDDIR')", "if builddir is not None:\n __path__.append(os.path.abspath(os.path.join(builddir, 'gio', 'gdbus-2.0', 'codegen')))", " __path__.append(os.path.abspath(os.path.join(builddir, 'gio', 'gdbus-2.0', 'codegen')))" ]
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
[ [ 14, 0, 0.8889, 0.037, 0, 0.66, 0, 366, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.9444, 0.0741, 0, 0.66, 0.5, 366, 3, 2, 0, 0, 293, 10, 1 ], [ 14, 0, 1, 0.037, 0, 0.66, ...
[ "DATADIR = \"@datarootdir@\"", "DATADIR = DATADIR.replace(\n \"${prefix}\", \"@prefix@\")", "VERSION = \"@VERSION@\"" ]
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
[ [ 1, 0, 0.0828, 0.0034, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0862, 0.0034, 0, 0.66, 0.25, 573, 0, 1, 0, 0, 573, 0, 0 ], [ 1, 0, 0.0931, 0.0034, 0, 0....
[ "import sys", "import xml.parsers.expat", "from . import dbustypes", "class DBusXMLParser:\n STATE_TOP = 'top'\n STATE_NODE = 'node'\n STATE_INTERFACE = 'interface'\n STATE_METHOD = 'method'\n STATE_SIGNAL = 'signal'\n STATE_PROPERTY = 'property'\n STATE_ARG = 'arg'", " STATE_TOP = '...
#!/usr/bin/env python # -*- encoding:utf8 -*- # protoc-gen-erl # Google's Protocol Buffers project, ported to lua. # https://code.google.com/p/protoc-gen-lua/ # # Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com # All rights reserved. # # Use, modification and distribution are subject to the "New BSD License" #...
[ [ 1, 0, 0.0289, 0.0022, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0311, 0.0022, 0, 0.66, 0.0417, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.0333, 0.0022, 0, 0....
[ "import sys", "import os.path as path", "from cStringIO import StringIO", "import plugin_pb2", "import google.protobuf.descriptor_pb2 as descriptor_pb2", "_packages = {}", "_files = {}", "_message = {}", "FDP = plugin_pb2.descriptor_pb2.FieldDescriptorProto", "if sys.platform == \"win32\":\n im...
#!/usr/bin/python2 # -*- coding: utf-8 -*- # # Copyright (C) 2011 5sing-crawler contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
[ [ 14, 0, 0.099, 0.0052, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1094, 0.0052, 0, 0.66, 0.0769, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.1146, 0.0052, 0, 0....
[ "__author__ = \"antiAgainst@gmail.com\"", "import re", "import os.path", "import cookielib", "import mechanize", "import lxml.html.soupparser as sp", "control_chars = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,\n 0x07, 0x08, 0x0E, 0x0F, 0x10, 0x11, 0x12,\n 0x13, 0x14, 0x15, ...
# Copyright 2011 Tom SF Haines # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, softwar...
[ [ 1, 0, 0.0561, 0.0051, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 1, 0, 0.0612, 0.0051, 0, 0.66, 0.25, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0663, 0.0051, 0, 0....
[ "import math", "import numpy", "import numpy.random", "import scipy.stats.distributions", "class DecTree:\n \"\"\"A decision tree, uses id3 with the c4.5 extension for continuous attributes. Fairly basic - always grows fully and stores a distribution of children at every node so it can fallback for previou...
# -*- coding: utf-8 -*- # Copyright (c) 2010, Tom SF Haines # 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...
[ [ 1, 0, 0.2941, 0.0196, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.3137, 0.0196, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 3, 0, 0.6863, 0.6078, 0, 0.6...
[ "import sys", "import time", "class ProgBar:\n \"\"\"Simple console progress bar class. Note that object creation and destruction matter, as they indicate when processing starts and when it stops.\"\"\"\n def __init__(self, width = 60, onCallback = None):\n self.start = time.time()\n self.fill = 0\n ...
# -*- coding: utf-8 -*- # Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.). import cv import numpy as np def cv2array(im): """Converts a cv array to a numpy array.""" depth2dtype = { cv.IPL_...
[ [ 1, 0, 0.1296, 0.0185, 0, 0.66, 0, 492, 0, 1, 0, 0, 492, 0, 0 ], [ 1, 0, 0.1481, 0.0185, 0, 0.66, 0.3333, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.3889, 0.3519, 0, ...
[ "import cv", "import numpy as np", "def cv2array(im):\n \"\"\"Converts a cv array to a numpy array.\"\"\"\n depth2dtype = {\n cv.IPL_DEPTH_8U: 'uint8',\n cv.IPL_DEPTH_8S: 'int8',\n cv.IPL_DEPTH_16U: 'uint16',\n cv.IPL_DEPTH_16S: 'int16',\n cv.IPL_DEPTH_32S: 'int32',", " \...
# Copyright (c) 2012, Tom SF Haines # 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 the follo...
[ [ 1, 0, 0.1, 0.0077, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 14, 0, 0.5692, 0.8692, 0, 0.66, 1, 974, 4, 0, 0, 0, 0, 0, 1 ] ]
[ "from utils.start_cpp import start_cpp", "matrix_code = start_cpp() + \"\"\"\n#ifndef MATRIX_CODE\n#define MATRIX_CODE\n\ntemplate <typename T>\ninline void MemSwap(T * lhs, T * rhs, int count = 1)\n{\n while(count!=0)" ]
# -*- coding: utf-8 -*- # Copyright (c) 2011, Tom SF Haines # 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...
[ [ 1, 0, 0.1875, 0.0125, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 1, 0, 0.2, 0.0125, 0, 0.66, 0.5, 884, 0, 1, 0, 0, 884, 0, 0 ], [ 14, 0, 0.6312, 0.75, 0, 0.66, ...
[ "from utils.start_cpp import start_cpp", "from utils.numpy_help_cpp import numpy_util_code", "python_obj_code = numpy_util_code + start_cpp() + \"\"\"\n#ifndef PYTHON_OBJ_CODE\n#define PYTHON_OBJ_CODE\n\n// Extracts a boolean from an object...\nbool GetObjectBoolean(PyObject * obj, const char * name)\n{\n PyObj...
# -*- coding: utf-8 -*- # Copyright (c) 2010, Tom SF Haines # 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...
[ [ 1, 0, 0.2941, 0.0196, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.3137, 0.0196, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 3, 0, 0.6863, 0.6078, 0, 0.6...
[ "import sys", "import time", "class ProgBar:\n \"\"\"Simple console progress bar class. Note that object creation and destruction matter, as they indicate when processing starts and when it stops.\"\"\"\n def __init__(self, width = 60, onCallback = None):\n self.start = time.time()\n self.fill = 0\n ...
# -*- coding: utf-8 -*- # Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.). import cv import numpy as np def cv2array(im): """Converts a cv array to a numpy array.""" depth2dtype = { cv.IPL_...
[ [ 1, 0, 0.1296, 0.0185, 0, 0.66, 0, 492, 0, 1, 0, 0, 492, 0, 0 ], [ 1, 0, 0.1481, 0.0185, 0, 0.66, 0.3333, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.3889, 0.3519, 0, ...
[ "import cv", "import numpy as np", "def cv2array(im):\n \"\"\"Converts a cv array to a numpy array.\"\"\"\n depth2dtype = {\n cv.IPL_DEPTH_8U: 'uint8',\n cv.IPL_DEPTH_8S: 'int8',\n cv.IPL_DEPTH_16U: 'uint16',\n cv.IPL_DEPTH_16S: 'int16',\n cv.IPL_DEPTH_32S: 'int32',", " \...
# Copyright (c) 2012, Tom SF Haines # 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 the follo...
[ [ 1, 0, 0.1, 0.0077, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 14, 0, 0.5692, 0.8692, 0, 0.66, 1, 974, 4, 0, 0, 0, 0, 0, 1 ] ]
[ "from utils.start_cpp import start_cpp", "matrix_code = start_cpp() + \"\"\"\n#ifndef MATRIX_CODE\n#define MATRIX_CODE\n\ntemplate <typename T>\ninline void MemSwap(T * lhs, T * rhs, int count = 1)\n{\n while(count!=0)" ]
# -*- coding: utf-8 -*- # Copyright (c) 2011, Tom SF Haines # 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...
[ [ 1, 0, 0.1875, 0.0125, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 1, 0, 0.2, 0.0125, 0, 0.66, 0.5, 884, 0, 1, 0, 0, 884, 0, 0 ], [ 14, 0, 0.6312, 0.75, 0, 0.66, ...
[ "from utils.start_cpp import start_cpp", "from utils.numpy_help_cpp import numpy_util_code", "python_obj_code = numpy_util_code + start_cpp() + \"\"\"\n#ifndef PYTHON_OBJ_CODE\n#define PYTHON_OBJ_CODE\n\n// Extracts a boolean from an object...\nbool GetObjectBoolean(PyObject * obj, const char * name)\n{\n PyObj...
# -*- coding: utf-8 -*- # Copyright (c) 2010, Tom SF Haines # 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...
[ [ 1, 0, 0.2941, 0.0196, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.3137, 0.0196, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 3, 0, 0.6863, 0.6078, 0, 0.6...
[ "import sys", "import time", "class ProgBar:\n \"\"\"Simple console progress bar class. Note that object creation and destruction matter, as they indicate when processing starts and when it stops.\"\"\"\n def __init__(self, width = 60, onCallback = None):\n self.start = time.time()\n self.fill = 0\n ...
# -*- coding: utf-8 -*- # Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.). import cv import numpy as np def cv2array(im): """Converts a cv array to a numpy array.""" depth2dtype = { cv.IPL_...
[ [ 1, 0, 0.1296, 0.0185, 0, 0.66, 0, 492, 0, 1, 0, 0, 492, 0, 0 ], [ 1, 0, 0.1481, 0.0185, 0, 0.66, 0.3333, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.3889, 0.3519, 0, ...
[ "import cv", "import numpy as np", "def cv2array(im):\n \"\"\"Converts a cv array to a numpy array.\"\"\"\n depth2dtype = {\n cv.IPL_DEPTH_8U: 'uint8',\n cv.IPL_DEPTH_8S: 'int8',\n cv.IPL_DEPTH_16U: 'uint16',\n cv.IPL_DEPTH_16S: 'int16',\n cv.IPL_DEPTH_32S: 'int32',", " \...
# Copyright (c) 2012, Tom SF Haines # 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 the follo...
[ [ 1, 0, 0.1, 0.0077, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 14, 0, 0.5692, 0.8692, 0, 0.66, 1, 974, 4, 0, 0, 0, 0, 0, 1 ] ]
[ "from utils.start_cpp import start_cpp", "matrix_code = start_cpp() + \"\"\"\n#ifndef MATRIX_CODE\n#define MATRIX_CODE\n\ntemplate <typename T>\ninline void MemSwap(T * lhs, T * rhs, int count = 1)\n{\n while(count!=0)" ]
# -*- coding: utf-8 -*- # Copyright (c) 2011, Tom SF Haines # 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...
[ [ 1, 0, 0.1875, 0.0125, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 1, 0, 0.2, 0.0125, 0, 0.66, 0.5, 884, 0, 1, 0, 0, 884, 0, 0 ], [ 14, 0, 0.6312, 0.75, 0, 0.66, ...
[ "from utils.start_cpp import start_cpp", "from utils.numpy_help_cpp import numpy_util_code", "python_obj_code = numpy_util_code + start_cpp() + \"\"\"\n#ifndef PYTHON_OBJ_CODE\n#define PYTHON_OBJ_CODE\n\n// Extracts a boolean from an object...\nbool GetObjectBoolean(PyObject * obj, const char * name)\n{\n PyObj...
# -*- coding: utf-8 -*- # Copyright (c) 2010, Tom SF Haines # 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...
[ [ 1, 0, 0.2941, 0.0196, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.3137, 0.0196, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 3, 0, 0.6863, 0.6078, 0, 0.6...
[ "import sys", "import time", "class ProgBar:\n \"\"\"Simple console progress bar class. Note that object creation and destruction matter, as they indicate when processing starts and when it stops.\"\"\"\n def __init__(self, width = 60, onCallback = None):\n self.start = time.time()\n self.fill = 0\n ...
# -*- coding: utf-8 -*- # Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.). import cv import numpy as np def cv2array(im): """Converts a cv array to a numpy array.""" depth2dtype = { cv.IPL_...
[ [ 1, 0, 0.1296, 0.0185, 0, 0.66, 0, 492, 0, 1, 0, 0, 492, 0, 0 ], [ 1, 0, 0.1481, 0.0185, 0, 0.66, 0.3333, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.3889, 0.3519, 0, ...
[ "import cv", "import numpy as np", "def cv2array(im):\n \"\"\"Converts a cv array to a numpy array.\"\"\"\n depth2dtype = {\n cv.IPL_DEPTH_8U: 'uint8',\n cv.IPL_DEPTH_8S: 'int8',\n cv.IPL_DEPTH_16U: 'uint16',\n cv.IPL_DEPTH_16S: 'int16',\n cv.IPL_DEPTH_32S: 'int32',", " \...
# Copyright (c) 2012, Tom SF Haines # 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 the follo...
[ [ 1, 0, 0.1, 0.0077, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 14, 0, 0.5692, 0.8692, 0, 0.66, 1, 974, 4, 0, 0, 0, 0, 0, 1 ] ]
[ "from utils.start_cpp import start_cpp", "matrix_code = start_cpp() + \"\"\"\n#ifndef MATRIX_CODE\n#define MATRIX_CODE\n\ntemplate <typename T>\ninline void MemSwap(T * lhs, T * rhs, int count = 1)\n{\n while(count!=0)" ]
# -*- coding: utf-8 -*- # Copyright (c) 2011, Tom SF Haines # 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...
[ [ 1, 0, 0.1875, 0.0125, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 1, 0, 0.2, 0.0125, 0, 0.66, 0.5, 884, 0, 1, 0, 0, 884, 0, 0 ], [ 14, 0, 0.6312, 0.75, 0, 0.66, ...
[ "from utils.start_cpp import start_cpp", "from utils.numpy_help_cpp import numpy_util_code", "python_obj_code = numpy_util_code + start_cpp() + \"\"\"\n#ifndef PYTHON_OBJ_CODE\n#define PYTHON_OBJ_CODE\n\n// Extracts a boolean from an object...\nbool GetObjectBoolean(PyObject * obj, const char * name)\n{\n PyObj...
# -*- coding: utf-8 -*- # Copyright (c) 2010, Tom SF Haines # 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...
[ [ 1, 0, 0.2941, 0.0196, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.3137, 0.0196, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 3, 0, 0.6863, 0.6078, 0, 0.6...
[ "import sys", "import time", "class ProgBar:\n \"\"\"Simple console progress bar class. Note that object creation and destruction matter, as they indicate when processing starts and when it stops.\"\"\"\n def __init__(self, width = 60, onCallback = None):\n self.start = time.time()\n self.fill = 0\n ...
# -*- coding: utf-8 -*- # Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.). import cv import numpy as np def cv2array(im): """Converts a cv array to a numpy array.""" depth2dtype = { cv.IPL_...
[ [ 1, 0, 0.1296, 0.0185, 0, 0.66, 0, 492, 0, 1, 0, 0, 492, 0, 0 ], [ 1, 0, 0.1481, 0.0185, 0, 0.66, 0.3333, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.3889, 0.3519, 0, ...
[ "import cv", "import numpy as np", "def cv2array(im):\n \"\"\"Converts a cv array to a numpy array.\"\"\"\n depth2dtype = {\n cv.IPL_DEPTH_8U: 'uint8',\n cv.IPL_DEPTH_8S: 'int8',\n cv.IPL_DEPTH_16U: 'uint16',\n cv.IPL_DEPTH_16S: 'int16',\n cv.IPL_DEPTH_32S: 'int32',", " \...
# Copyright (c) 2012, Tom SF Haines # 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 the follo...
[ [ 1, 0, 0.1, 0.0077, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 14, 0, 0.5692, 0.8692, 0, 0.66, 1, 974, 4, 0, 0, 0, 0, 0, 1 ] ]
[ "from utils.start_cpp import start_cpp", "matrix_code = start_cpp() + \"\"\"\n#ifndef MATRIX_CODE\n#define MATRIX_CODE\n\ntemplate <typename T>\ninline void MemSwap(T * lhs, T * rhs, int count = 1)\n{\n while(count!=0)" ]
# -*- coding: utf-8 -*- # Copyright (c) 2011, Tom SF Haines # 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...
[ [ 1, 0, 0.1875, 0.0125, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 1, 0, 0.2, 0.0125, 0, 0.66, 0.5, 884, 0, 1, 0, 0, 884, 0, 0 ], [ 14, 0, 0.6312, 0.75, 0, 0.66, ...
[ "from utils.start_cpp import start_cpp", "from utils.numpy_help_cpp import numpy_util_code", "python_obj_code = numpy_util_code + start_cpp() + \"\"\"\n#ifndef PYTHON_OBJ_CODE\n#define PYTHON_OBJ_CODE\n\n// Extracts a boolean from an object...\nbool GetObjectBoolean(PyObject * obj, const char * name)\n{\n PyObj...
# -*- coding: utf-8 -*- # Copyright (c) 2010, Tom SF Haines # 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...
[ [ 1, 0, 0.2941, 0.0196, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.3137, 0.0196, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 3, 0, 0.6863, 0.6078, 0, 0.6...
[ "import sys", "import time", "class ProgBar:\n \"\"\"Simple console progress bar class. Note that object creation and destruction matter, as they indicate when processing starts and when it stops.\"\"\"\n def __init__(self, width = 60, onCallback = None):\n self.start = time.time()\n self.fill = 0\n ...
# -*- coding: utf-8 -*- # Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.). import cv import numpy as np def cv2array(im): """Converts a cv array to a numpy array.""" depth2dtype = { cv.IPL_...
[ [ 1, 0, 0.1296, 0.0185, 0, 0.66, 0, 492, 0, 1, 0, 0, 492, 0, 0 ], [ 1, 0, 0.1481, 0.0185, 0, 0.66, 0.3333, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.3889, 0.3519, 0, ...
[ "import cv", "import numpy as np", "def cv2array(im):\n \"\"\"Converts a cv array to a numpy array.\"\"\"\n depth2dtype = {\n cv.IPL_DEPTH_8U: 'uint8',\n cv.IPL_DEPTH_8S: 'int8',\n cv.IPL_DEPTH_16U: 'uint16',\n cv.IPL_DEPTH_16S: 'int16',\n cv.IPL_DEPTH_32S: 'int32',", " \...
# Copyright (c) 2012, Tom SF Haines # 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 the follo...
[ [ 1, 0, 0.1, 0.0077, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 14, 0, 0.5692, 0.8692, 0, 0.66, 1, 974, 4, 0, 0, 0, 0, 0, 1 ] ]
[ "from utils.start_cpp import start_cpp", "matrix_code = start_cpp() + \"\"\"\n#ifndef MATRIX_CODE\n#define MATRIX_CODE\n\ntemplate <typename T>\ninline void MemSwap(T * lhs, T * rhs, int count = 1)\n{\n while(count!=0)" ]
# -*- coding: utf-8 -*- # Copyright (c) 2011, Tom SF Haines # 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...
[ [ 1, 0, 0.1875, 0.0125, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 1, 0, 0.2, 0.0125, 0, 0.66, 0.5, 884, 0, 1, 0, 0, 884, 0, 0 ], [ 14, 0, 0.6312, 0.75, 0, 0.66, ...
[ "from utils.start_cpp import start_cpp", "from utils.numpy_help_cpp import numpy_util_code", "python_obj_code = numpy_util_code + start_cpp() + \"\"\"\n#ifndef PYTHON_OBJ_CODE\n#define PYTHON_OBJ_CODE\n\n// Extracts a boolean from an object...\nbool GetObjectBoolean(PyObject * obj, const char * name)\n{\n PyObj...
# -*- coding: utf-8 -*- # Copyright (c) 2010, Tom SF Haines # 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...
[ [ 1, 0, 0.2941, 0.0196, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.3137, 0.0196, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 3, 0, 0.6863, 0.6078, 0, 0.6...
[ "import sys", "import time", "class ProgBar:\n \"\"\"Simple console progress bar class. Note that object creation and destruction matter, as they indicate when processing starts and when it stops.\"\"\"\n def __init__(self, width = 60, onCallback = None):\n self.start = time.time()\n self.fill = 0\n ...
# -*- coding: utf-8 -*- # Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.). import cv import numpy as np def cv2array(im): """Converts a cv array to a numpy array.""" depth2dtype = { cv.IPL_...
[ [ 1, 0, 0.1296, 0.0185, 0, 0.66, 0, 492, 0, 1, 0, 0, 492, 0, 0 ], [ 1, 0, 0.1481, 0.0185, 0, 0.66, 0.3333, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.3889, 0.3519, 0, ...
[ "import cv", "import numpy as np", "def cv2array(im):\n \"\"\"Converts a cv array to a numpy array.\"\"\"\n depth2dtype = {\n cv.IPL_DEPTH_8U: 'uint8',\n cv.IPL_DEPTH_8S: 'int8',\n cv.IPL_DEPTH_16U: 'uint16',\n cv.IPL_DEPTH_16S: 'int16',\n cv.IPL_DEPTH_32S: 'int32',", " \...
# Copyright (c) 2012, Tom SF Haines # 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 the follo...
[ [ 1, 0, 0.1, 0.0077, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 14, 0, 0.5692, 0.8692, 0, 0.66, 1, 974, 4, 0, 0, 0, 0, 0, 1 ] ]
[ "from utils.start_cpp import start_cpp", "matrix_code = start_cpp() + \"\"\"\n#ifndef MATRIX_CODE\n#define MATRIX_CODE\n\ntemplate <typename T>\ninline void MemSwap(T * lhs, T * rhs, int count = 1)\n{\n while(count!=0)" ]
# -*- coding: utf-8 -*- # Copyright (c) 2011, Tom SF Haines # 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...
[ [ 1, 0, 0.1875, 0.0125, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 1, 0, 0.2, 0.0125, 0, 0.66, 0.5, 884, 0, 1, 0, 0, 884, 0, 0 ], [ 14, 0, 0.6312, 0.75, 0, 0.66, ...
[ "from utils.start_cpp import start_cpp", "from utils.numpy_help_cpp import numpy_util_code", "python_obj_code = numpy_util_code + start_cpp() + \"\"\"\n#ifndef PYTHON_OBJ_CODE\n#define PYTHON_OBJ_CODE\n\n// Extracts a boolean from an object...\nbool GetObjectBoolean(PyObject * obj, const char * name)\n{\n PyObj...
# -*- coding: utf-8 -*- # Copyright (c) 2010, Tom SF Haines # 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...
[ [ 1, 0, 0.2941, 0.0196, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.3137, 0.0196, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 3, 0, 0.6863, 0.6078, 0, 0.6...
[ "import sys", "import time", "class ProgBar:\n \"\"\"Simple console progress bar class. Note that object creation and destruction matter, as they indicate when processing starts and when it stops.\"\"\"\n def __init__(self, width = 60, onCallback = None):\n self.start = time.time()\n self.fill = 0\n ...
# -*- coding: utf-8 -*- # Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.). import cv import numpy as np def cv2array(im): """Converts a cv array to a numpy array.""" depth2dtype = { cv.IPL_...
[ [ 1, 0, 0.1296, 0.0185, 0, 0.66, 0, 492, 0, 1, 0, 0, 492, 0, 0 ], [ 1, 0, 0.1481, 0.0185, 0, 0.66, 0.3333, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.3889, 0.3519, 0, ...
[ "import cv", "import numpy as np", "def cv2array(im):\n \"\"\"Converts a cv array to a numpy array.\"\"\"\n depth2dtype = {\n cv.IPL_DEPTH_8U: 'uint8',\n cv.IPL_DEPTH_8S: 'int8',\n cv.IPL_DEPTH_16U: 'uint16',\n cv.IPL_DEPTH_16S: 'int16',\n cv.IPL_DEPTH_32S: 'int32',", " \...
# Copyright (c) 2012, Tom SF Haines # 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 the follo...
[ [ 1, 0, 0.1, 0.0077, 0, 0.66, 0, 972, 0, 1, 0, 0, 972, 0, 0 ], [ 14, 0, 0.5692, 0.8692, 0, 0.66, 1, 974, 4, 0, 0, 0, 0, 0, 1 ] ]
[ "from utils.start_cpp import start_cpp", "matrix_code = start_cpp() + \"\"\"\n#ifndef MATRIX_CODE\n#define MATRIX_CODE\n\ntemplate <typename T>\ninline void MemSwap(T * lhs, T * rhs, int count = 1)\n{\n while(count!=0)" ]