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.0337, 0.0022, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0416, 0.009, 0, 0.66, 0.0435, 777, 0, 0, 0, 0, 0, 5, 0 ], [ 1, 0, 0.0494, 0.0022, 0, 0.66, ...
[ "\"\"\"MapReduce extensions for ETL.\"\"\"", "__author__ = [\n 'johncox@google.com (John Cox)',\n 'juliaoh@google.com (Julia Oh)',\n]", "import csv", "import os", "import sys", "from xml.etree import ElementTree", "import mrs", "from models import transforms", "from tools.etl import etl_lib", ...
# 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.1104, 0.0429, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1472, 0.0184, 0, 0.66, 0.0909, 777, 0, 0, 0, 0, 0, 5, 0 ], [ 1, 0, 0.1656, 0.0061, 0, 0.66,...
[ "\"\"\"Examples of custom extract-transform-load jobs.\n\nCustom jobs are run via tools/etl/etl.py. You must do environment setup before\netl.py can be invoked; see its module docstring for details.\n\nSee tools/etl/etl_lib.py for documentation on writing Job subclasses.\n\"\"\"", "__author__ = [\n 'johncox@go...
# 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.0968, 0.0065, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1097, 0.0065, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1226, 0.0065, 0, 0.66,...
[ "\"\"\"Allows export of Lessons and Units to other systems.\"\"\"", "__author__ = 'psimakov@google.com (Pavel Simakov)'", "from datetime import datetime", "import os", "import verify", "RELEASE_TAG = '1.0'", "def echo(unused_x):\n pass", "JS_GCB_REGEX = \"\"\"\nfunction gcb_regex(base, modifiers) {...
# 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.0655, 0.0044, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0742, 0.0044, 0, 0.66, 0.0556, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.083, 0.0044, 0, 0.66, ...
[ "\"\"\"Classes and methods to manage all aspects of student assessments.\"\"\"", "__author__ = 'pgbovine@google.com (Philip Guo)'", "import datetime", "import logging", "from utils import BaseHandler", "from utils import HUMAN_READABLE_DATETIME_FORMAT", "from controllers import lessons", "from models ...
# 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.0116, 0.0008, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0131, 0.0008, 0, 0.66, 0.0189, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0147, 0.0008, 0, 0.66,...
[ "\"\"\"Handlers for generating various frontend pages.\"\"\"", "__author__ = 'Saifu Angto (saifu@google.com)'", "import copy", "import datetime", "import urllib", "import urlparse", "from utils import BaseHandler", "from utils import BaseRESTHandler", "from utils import CAN_PERSIST_ACTIVITY_EVENTS",...
# 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.014, 0.0009, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0159, 0.0009, 0, 0.66, 0.0167, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0177, 0.0009, 0, 0.66, ...
[ "\"\"\"Handlers that are not directly related to course content.\"\"\"", "__author__ = 'Saifu Angto (saifu@google.com)'", "import datetime", "import HTMLParser", "import os", "import re", "import urlparse", "import jinja2", "import sites", "import webapp2", "import appengine_config", "from com...
# 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.034, 0.0023, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0385, 0.0023, 0, 0.66, 0.0417, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0454, 0.0023, 0, 0.66, ...
[ "\"\"\"Handlers for custom HTML tags.\"\"\"", "__author__ = 'John Orr (jorr@google.com)'", "import logging", "import mimetypes", "import os", "from xml.etree import cElementTree", "import html5lib", "import safe_dom", "import webapp2", "import appengine_config", "from common import schema_fields...
# -*- 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.1127, 0.007, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1268, 0.007, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1408, 0.007, 0, 0.66, ...
[ "\"\"\"Functions used for Course Builder locale support.\"\"\"", "__author__ = 'John Orr (jorr@google.com)'", "import logging", "import os", "import appengine_config", "LOCALES_DISPLAY_NAMES = {\n 'af': u'Afrikaans (af)',\n 'am': u'አማርኛ (am)',\n 'ar': u'العربية (ar)',\n 'bg': u'български (bg)'...
# 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.0806, 0.0054, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0914, 0.0054, 0, 0.66, 0.0385, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1022, 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.0033, 0.0033, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0098, 0.0033, 0, 0.66, 0.0833, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0164, 0.0033, 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.0673, 0.0045, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0762, 0.0045, 0, 0.66, 0.0435, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0852, 0.0045, 0, 0.66,...
[ "\"\"\"General utility functions common to all of CourseBuilder.\"\"\"", "__author__ = 'Mike Gainer (mgainer@google.com)'", "import cStringIO", "import datetime", "import random", "import re", "import string", "import sys", "import zipfile", "import appengine_config", "from google.appengine.api ...
# 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.0485, 0.0032, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.055, 0.0032, 0, 0.66, 0.0476, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0615, 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.0357, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0417, 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.0275, 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.0227, 0.0015, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0257, 0.0015, 0, 0.66, 0.0769, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0287, 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'",...
print 'Content-Type: text/plain' print '' print 'You probably want /tetris ...'
[ [ 8, 0, 0.3333, 0.3333, 0, 0.66, 0, 535, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 535, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 1, 0.3333, 0, 0.66, 1,...
[ "print('Content-Type: text/plain')", "print('')", "print('You probably want /tetris ...')" ]
import cgi import datetime import urllib import wsgiref.handlers import random import datetime from django.utils import simplejson from google.appengine.ext import db from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class Score(db.Model): name=db.StringProperty() ...
[ [ 1, 0, 0.0074, 0.0074, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.0148, 0.0074, 0, 0.66, 0.0556, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0222, 0.0074, 0, ...
[ "import cgi", "import datetime", "import urllib", "import wsgiref.handlers", "import random", "import datetime", "from django.utils import simplejson", "from google.appengine.ext import db", "from google.appengine.ext import webapp", "from google.appengine.ext.webapp.util import run_wsgi_app", "...
# -*- coding: utf-8 -*- import Tkinter as Tk from controlFrames import ControlFrames from tkFileDialog import askopenfilenames as getFilenames #Лигавя се :) import os """ This class contains the menu bar and its event handlers """ class MenuBar(): def __init__(self, master): ''' ACIFT_main_menu = ...
[ [ 1, 0, 0.0282, 0.0141, 0, 0.66, 0, 368, 0, 1, 0, 0, 368, 0, 0 ], [ 1, 0, 0.0423, 0.0141, 0, 0.66, 0.2, 647, 0, 1, 0, 0, 647, 0, 0 ], [ 1, 0, 0.0563, 0.0141, 0, 0.6...
[ "import Tkinter as Tk", "from controlFrames import ControlFrames", "from tkFileDialog import askopenfilenames as getFilenames #Лигавя се :)", "import os", "\"\"\"\nThis class contains the menu bar and its event handlers\n\"\"\"", "class MenuBar():\n def __init__(self, master):\n\n '''\n A...
""" This file serves as a hub for all imports, so that the Main can look pretty. """ from menu import * #from controlFrames import *
[ [ 8, 0, 0.3571, 0.5714, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.8571, 0.1429, 0, 0.66, 1, 671, 0, 1, 0, 0, 671, 0, 0 ] ]
[ "\"\"\"\nThis file serves as a hub for all imports, so that the Main\ncan look pretty.\n\"\"\"", "from menu import *" ]
# -*- coding: utf-8 -*- from tkFileDialog import askopenfilenames as getFilenames #Лигавя се :) import os class ControlFrames: """ Filenames е или един или няколко файла, или папка Във всеки от случаите програмата отваря съответните файлове Това е клас в нов стил, наследяващ списък - има доста готови ...
[ [ 1, 0, 0.0571, 0.0286, 0, 0.66, 0, 377, 0, 1, 0, 0, 377, 0, 0 ], [ 1, 0, 0.1143, 0.0286, 0, 0.66, 0.5, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 3, 0, 0.5714, 0.8286, 0, 0.6...
[ "from tkFileDialog import askopenfilenames as getFilenames #Лигавя се :)", "import os", "class ControlFrames:\n \"\"\"\n Filenames е или един или няколко файла, или папка\n Във всеки от случаите програмата отваря съответните файлове\n Това е клас в нов стил, наследяващ списък - има доста готови мето...
#!/usr/bin/python from utils import * #from menu import MenuBar class ACIFT(wx.PySimpleApp): def __init__(self, *args, **kwargs): wx.PySimpleApp.__init__(self, *args, **kwargs) if __name__ == "__main__": ACIFT = ACIFT() wx.InitAllImageHandlers() Main = ImageFrame(None, -1, "") Menu = Me...
[ [ 1, 0, 0.0952, 0.0476, 0, 0.66, 0, 970, 0, 1, 0, 0, 970, 0, 0 ], [ 3, 0, 0.2857, 0.1429, 0, 0.66, 0.5, 448, 0, 1, 0, 0, 792, 0, 1 ], [ 2, 1, 0.3095, 0.0952, 1, 0.4...
[ "from utils import *", "class ACIFT(wx.PySimpleApp):\n def __init__(self, *args, **kwargs):\n wx.PySimpleApp.__init__(self, *args, **kwargs)", " def __init__(self, *args, **kwargs):\n wx.PySimpleApp.__init__(self, *args, **kwargs)", " wx.PySimpleApp.__init__(self, *args, **kwargs)",...
import wx class MenuBar(): def __init__(self, master): ID_OPEN=111 ID_ABOUT=101 ID_EXIT=110 self.master = master #needed for internal functions Main_MenuBar = wx.MenuBar() menu_file = wx.Menu() menu_file.Append(ID_OPEN, "Open", "") menu_file.AppendSep...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 666, 0, 1, 0, 0, 666, 0, 0 ], [ 3, 0, 0.5417, 0.875, 0, 0.66, 1, 629, 0, 2, 0, 0, 0, 0, 12 ], [ 2, 1, 0.5, 0.7083, 1, 0.07, ...
[ "import wx", "class MenuBar():\n def __init__(self, master):\n ID_OPEN=111\n ID_ABOUT=101\n ID_EXIT=110\n self.master = master #needed for internal functions\n Main_MenuBar = wx.MenuBar()\n menu_file = wx.Menu()", " def __init__(self, master):\n ID_OPEN=111...
#!/usr/bin/python from utils import * #from menu import MenuBar class ACIFT(wx.PySimpleApp): def __init__(self, *args, **kwargs): wx.PySimpleApp.__init__(self, *args, **kwargs) if __name__ == "__main__": ACIFT = ACIFT() wx.InitAllImageHandlers() Main = ImageFrame(None, -1, "") Menu = Me...
[ [ 1, 0, 0.0952, 0.0476, 0, 0.66, 0, 970, 0, 1, 0, 0, 970, 0, 0 ], [ 3, 0, 0.2857, 0.1429, 0, 0.66, 0.5, 448, 0, 1, 0, 0, 792, 0, 1 ], [ 2, 1, 0.3095, 0.0952, 1, 0.0...
[ "from utils import *", "class ACIFT(wx.PySimpleApp):\n def __init__(self, *args, **kwargs):\n wx.PySimpleApp.__init__(self, *args, **kwargs)", " def __init__(self, *args, **kwargs):\n wx.PySimpleApp.__init__(self, *args, **kwargs)", " wx.PySimpleApp.__init__(self, *args, **kwargs)",...
""" This file serves as a hub for all imports, so that the Main can look pretty. """ from menu import * from ImageClass import * """ Nice trick - keep this in mind :) source = self.source source.one = "ASDASDASDASDASDASD" print self.source.one """ """ From ImageClass Old code: def getImag...
[ [ 8, 0, 0.061, 0.0976, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1463, 0.0244, 0, 0.66, 0.125, 671, 0, 1, 0, 0, 671, 0, 0 ], [ 1, 0, 0.1707, 0.0244, 0, 0.66, ...
[ "\"\"\"\nThis file serves as a hub for all imports, so that the Main\ncan look pretty.\n\"\"\"", "from menu import *", "from ImageClass import *", "\"\"\"\nNice trick - keep this in mind :)\nsource = self.source\n source.one = \"ASDASDASDASDASDASD\"\n print(self.source.one)\n\"\"\"", "...
class Options(): def __init__(self): self.fullScreen = False self.fit = False
[ [ 3, 0, 0.625, 1, 0, 0.66, 0, 971, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 1, 0.75, 0.75, 1, 0.08, 0, 555, 0, 1, 0, 0, 0, 0, 0 ], [ 14, 2, 0.75, 0.25, 2, 0.32, 0, 120, ...
[ "class Options():\n def __init__(self):\n self.fullScreen = False\n self.fit = False", " def __init__(self):\n self.fullScreen = False\n self.fit = False", " self.fullScreen = False", " self.fit = False" ]
from cStringIO import StringIO class Zip(): def __init__(self, dir = "./", files = ""): self.dir = dir self.files = files def getImage(self): return StringIO(self.zip.read(self.files[self.current])) class Files(): def __init__(self, dir = "./", files = ""): self.dir = dir ...
[ [ 1, 0, 0.0556, 0.0556, 0, 0.66, 0, 764, 0, 1, 0, 0, 764, 0, 0 ], [ 3, 0, 0.3333, 0.3889, 0, 0.66, 0.5, 363, 0, 2, 0, 0, 0, 0, 2 ], [ 2, 1, 0.2778, 0.1667, 1, 0.11,...
[ "from cStringIO import StringIO", "class Zip():\n def __init__(self, dir = \"./\", files = \"\"):\n self.dir = dir\n self.files = files\n\n def getImage(self):\n return StringIO(self.zip.read(self.files[self.current]))", " def __init__(self, dir = \"./\", files = \"\"):\n se...
# coding=gbk import scipy.sparse as sp import sys import numpy import unittest def get_cosine_sim(matrix): sq_sum = numpy.multiply(matrix, matrix).sum(1) sq_sum = sq_sum * sq_sum.T matrix = sp.csc_matrix(matrix) matrix = (matrix * matrix.T).todense() numpy.divide(matrix, numpy.power(sq_s...
[ [ 1, 0, 0.0571, 0.0286, 0, 0.66, 0, 683, 0, 1, 0, 0, 683, 0, 0 ], [ 1, 0, 0.0857, 0.0286, 0, 0.66, 0.1667, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1143, 0.0286, 0, ...
[ "import scipy.sparse as sp", "import sys", "import numpy", "import unittest", "def get_cosine_sim(matrix):\n sq_sum = numpy.multiply(matrix, matrix).sum(1)\n sq_sum = sq_sum * sq_sum.T\n matrix = sp.csc_matrix(matrix)\n matrix = (matrix * matrix.T).todense()\n numpy.divide(matrix, numpy.power...
#------------------------------------------------------------------------------- # Name: pre # Purpose: # # Author: Administrator # # Created: 26/12/2012 # Copyright: (c) Administrator 2012 # Licence: <your licence> #------------------------------------------------------------------------...
[ [ 1, 0, 0.2131, 0.0164, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.3934, 0.2787, 0, 0.66, 0.1667, 801, 0, 3, 1, 0, 0, 0, 12 ], [ 14, 1, 0.2787, 0.0164, 1, ...
[ "import numpy", "def load_last_n_correct(filename, n, udict):\n user_solved_problem_cnt=[0 for i in range(len(udict))]\n last_n_correct = [[0 for j in range(650)] for i in range(len(udict))]\n user_solved_problem = [[0 for j in range(650)] for i in range(len(udict))]\n with open (filename) as f:\n ...
#!/bin/env python # hdfs_client.py # zhangyuncong @ baidu import os import sys from subprocess import * import re import unittest class FileItem: def __init__(self,filename,filesize,fileattr,owner,group,modifyday,modifytime): self.filename = filename self.fileattr = fileattr self.filesize = fil...
[ [ 1, 0, 0.0404, 0.0101, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0505, 0.0101, 0, 0.66, 0.125, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0606, 0.0101, 0, 0...
[ "import os", "import sys", "from subprocess import *", "import re", "import unittest", "class FileItem:\n\tdef __init__(self,filename,filesize,fileattr,owner,group,modifyday,modifytime):\n\t\tself.filename = filename\n\t\tself.fileattr = fileattr\n\t\tself.filesize = filesize\n\t\tself.owner\t = ow...
#!/bin/env python # hdfs_client.py # zhangyuncong @ baidu import os import sys from subprocess import * import re import unittest class FileItem: def __init__(self,filename,filesize,fileattr,owner,group,modifyday,modifytime): self.filename = filename self.fileattr = fileattr self.filesize = fil...
[ [ 1, 0, 0.0404, 0.0101, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0505, 0.0101, 0, 0.66, 0.125, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0606, 0.0101, 0, 0...
[ "import os", "import sys", "from subprocess import *", "import re", "import unittest", "class FileItem:\n\tdef __init__(self,filename,filesize,fileattr,owner,group,modifyday,modifytime):\n\t\tself.filename = filename\n\t\tself.fileattr = fileattr\n\t\tself.filesize = filesize\n\t\tself.owner\t = ow...
#!/usr/bin/env python import csv, sys, re from common import read_table if __name__ == "__main__": a, m, n = read_table(sys.stdin) b = [["" for j in range(n)] for i in range((m + 1) / 2)] for y in range(n): for x in range(0, m, 2): b[x / 2][y] = a[x][y] if x + 1 < m: ...
[ [ 1, 0, 0.1765, 0.0588, 0, 0.66, 0, 312, 0, 3, 0, 0, 312, 0, 0 ], [ 1, 0, 0.2353, 0.0588, 0, 0.66, 0.5, 718, 0, 1, 0, 0, 718, 0, 0 ], [ 4, 0, 0.6765, 0.7059, 0, 0.6...
[ "import csv, sys, re", "from common import read_table", "if __name__ == \"__main__\":\n a, m, n = read_table(sys.stdin)\n b = [[\"\" for j in range(n)] for i in range((m + 1) / 2)]\n for y in range(n):\n for x in range(0, m, 2):\n b[x / 2][y] = a[x][y]\n if x + 1 < m:\n ...
#!/usr/bin/env python import csv, sys, re from common import read_table if __name__ == "__main__": a, m, n = read_table(sys.stdin) b = [["" for j in range(n)] for i in range((m + 1) / 2)] for y in range(n): for x in range(0, m, 2): b[x / 2][y] = a[x][y] if x + 1 < m: ...
[ [ 1, 0, 0.1765, 0.0588, 0, 0.66, 0, 312, 0, 3, 0, 0, 312, 0, 0 ], [ 1, 0, 0.2353, 0.0588, 0, 0.66, 0.5, 718, 0, 1, 0, 0, 718, 0, 0 ], [ 4, 0, 0.6765, 0.7059, 0, 0.6...
[ "import csv, sys, re", "from common import read_table", "if __name__ == \"__main__\":\n a, m, n = read_table(sys.stdin)\n b = [[\"\" for j in range(n)] for i in range((m + 1) / 2)]\n for y in range(n):\n for x in range(0, m, 2):\n b[x / 2][y] = a[x][y]\n if x + 1 < m:\n ...
#!/usr/bin/env python # Outputs to stdout import os, sys from optparse import OptionParser if __name__ == "__main__": parser = OptionParser(usage = "%prog <input extension> <output extension>") parser.add_option("-d", "--datadir", type = "string", dest = "datadir", default = "data", help = "The directory of ...
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 1, 0, 0.6667, 0.3333, 0, 0.66, 1, 323, 0, 1, 0, 0, 323, 0, 0 ] ]
[ "import os, sys", "from optparse import OptionParser" ]
# by Jingyue ''' Read the table from <fin>. Returns a 2D array of strings, # of rows, and # of colomns. The caller opens and closes the file. ''' import sys import csv def read_table(fin): MAX_N = 256 a = [['' for j in range(MAX_N)] for i in range(MAX_N)] m = 0 n = 0 fin = csv.reader(fin) fo...
[ [ 8, 0, 0.1389, 0.1389, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.25, 0.0278, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2778, 0.0278, 0, 0.66, ...
[ "'''\nRead the table from <fin>.\nReturns a 2D array of strings, # of rows, and # of colomns.\nThe caller opens and closes the file.\n'''", "import sys", "import csv", "def read_table(fin):\n MAX_N = 256\n a = [['' for j in range(MAX_N)] for i in range(MAX_N)]\n\n m = 0\n n = 0\n fin = csv.read...
#!/usr/bin/env python # Outputs to stdout import os, sys from optparse import OptionParser if __name__ == "__main__": parser = OptionParser(usage = "%prog <input extension> <output extension>") parser.add_option("-d", "--datadir", type = "string", dest = "datadir", default = "data", help = "The directory of ...
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 1, 0, 0.6667, 0.3333, 0, 0.66, 1, 323, 0, 1, 0, 0, 323, 0, 0 ] ]
[ "import os, sys", "from optparse import OptionParser" ]
import breathe.parser.doxygen.index import breathe.parser.doxygen.compound import os class ParserError(Exception): pass class Parser(object): def __init__(self, cache, path_handler): self.cache = cache self.path_handler = path_handler class DoxygenIndexParser(Parser): def parse(self,...
[ [ 1, 0, 0.0241, 0.012, 0, 0.66, 0, 190, 0, 1, 0, 0, 190, 0, 0 ], [ 1, 0, 0.0361, 0.012, 0, 0.66, 0.125, 791, 0, 1, 0, 0, 791, 0, 0 ], [ 1, 0, 0.0482, 0.012, 0, 0.66...
[ "import breathe.parser.doxygen.index", "import breathe.parser.doxygen.compound", "import os", "class ParserError(Exception):\n pass", "class Parser(object):\n\n def __init__(self, cache, path_handler):\n\n self.cache = cache\n self.path_handler = path_handler", " def __init__(self, ...
from breathe.renderer.rst.doxygen.base import Renderer class DoxygenTypeSubRenderer(Renderer): def render(self): nodelist = [] # Process all the compound children for compound in self.data_object.get_compound(): compound_renderer = self.renderer_factory.create_renderer(self....
[ [ 1, 0, 0.0274, 0.0137, 0, 0.66, 0, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 3, 0, 0.1301, 0.1644, 0, 0.66, 0.3333, 784, 0, 1, 0, 0, 406, 0, 4 ], [ 2, 1, 0.1438, 0.137, 1, 0...
[ "from breathe.renderer.rst.doxygen.base import Renderer", "class DoxygenTypeSubRenderer(Renderer):\n\n def render(self):\n\n nodelist = []\n\n # Process all the compound children\n for compound in self.data_object.get_compound():", " def render(self):\n\n nodelist = []\n\n ...
class Renderer(object): def __init__(self, project_info, data_object, renderer_factory, node_factory, state, document, domain_handler, target_handler ): self.project_info = project_info sel...
[ [ 3, 0, 0.5, 0.875, 0, 0.66, 0, 406, 0, 1, 0, 0, 186, 0, 0 ], [ 2, 1, 0.5417, 0.7917, 1, 0.93, 0, 555, 0, 9, 0, 0, 0, 0, 0 ], [ 14, 2, 0.625, 0.0417, 2, 0.27, 0...
[ "class Renderer(object):\n\n def __init__(self,\n project_info,\n data_object,\n renderer_factory,\n node_factory,\n state,", " def __init__(self,\n project_info,\n data_object,\n renderer_factory,\n node_fact...
from breathe.renderer.rst.doxygen.base import Renderer class DoxygenTypeSubRenderer(Renderer): def render(self): compound_renderer = self.renderer_factory.create_renderer(self.data_object, self.data_object.compounddef) return compound_renderer.render() class CompoundDefTypeSubRenderer(Renderer...
[ [ 1, 0, 0.0029, 0.0014, 0, 0.66, 0, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 3, 0, 0.0093, 0.0086, 0, 0.66, 0.037, 784, 0, 1, 0, 0, 406, 0, 2 ], [ 2, 1, 0.0108, 0.0057, 1, 0...
[ "from breathe.renderer.rst.doxygen.base import Renderer", "class DoxygenTypeSubRenderer(Renderer):\n\n def render(self):\n\n compound_renderer = self.renderer_factory.create_renderer(self.data_object, self.data_object.compounddef)\n return compound_renderer.render()", " def render(self):\n\n...
from breathe.finder.doxygen.base import ItemFinder class DoxygenTypeSubItemFinder(ItemFinder): def find(self, matcher_stack): compounds = self.data_object.get_compound() results = [] for compound in compounds: if matcher_stack.match("compound", compound): ...
[ [ 1, 0, 0.0238, 0.0119, 0, 0.66, 0, 909, 0, 1, 0, 0, 909, 0, 0 ], [ 3, 0, 0.1845, 0.2857, 0, 0.66, 0.3333, 150, 0, 2, 0, 0, 419, 0, 8 ], [ 2, 1, 0.1429, 0.1548, 1, ...
[ "from breathe.finder.doxygen.base import ItemFinder", "class DoxygenTypeSubItemFinder(ItemFinder):\n\n def find(self, matcher_stack):\n\n compounds = self.data_object.get_compound()\n\n results = []", " def find(self, matcher_stack):\n\n compounds = self.data_object.get_compound()\n\n...
class ItemFinder(object): def __init__(self, project_info, data_object, item_finder_factory): self.data_object = data_object self.item_finder_factory = item_finder_factory self.project_info = project_info
[ [ 3, 0, 0.5, 0.7, 0, 0.66, 0, 419, 0, 1, 0, 0, 186, 0, 0 ], [ 2, 1, 0.6, 0.5, 1, 0.45, 0, 555, 0, 4, 0, 0, 0, 0, 0 ], [ 14, 2, 0.6, 0.1, 2, 0.2, 0, 817, ...
[ "class ItemFinder(object):\n\n def __init__(self, project_info, data_object, item_finder_factory):\n\n self.data_object = data_object\n self.item_finder_factory = item_finder_factory\n self.project_info = project_info", " def __init__(self, project_info, data_object, item_finder_factory...
from breathe.finder.doxygen.base import ItemFinder class DoxygenTypeSubItemFinder(ItemFinder): def find(self, matcher_stack): compound_finder = self.item_finder_factory.create_finder(self.data_object.compounddef) return compound_finder.find(matcher_stack) def filter_(self, parent, filter_,...
[ [ 1, 0, 0.0308, 0.0154, 0, 0.66, 0, 909, 0, 1, 0, 0, 909, 0, 0 ], [ 3, 0, 0.1385, 0.1692, 0, 0.66, 0.25, 150, 0, 2, 0, 0, 419, 0, 4 ], [ 2, 1, 0.1154, 0.0615, 1, 0....
[ "from breathe.finder.doxygen.base import ItemFinder", "class DoxygenTypeSubItemFinder(ItemFinder):\n\n def find(self, matcher_stack):\n\n compound_finder = self.item_finder_factory.create_finder(self.data_object.compounddef)\n return compound_finder.find(matcher_stack)\n\n def filter_(self, pa...
from breathe.finder.doxygen import index as indexfinder from breathe.finder.doxygen import compound as compoundfinder from breathe.parser.doxygen import index, compound class MissingLevelError(Exception): pass class Matcher(object): pass class ItemMatcher(Matcher): def __init__(self, name, type_): ...
[ [ 1, 0, 0.0136, 0.0068, 0, 0.66, 0, 697, 0, 1, 0, 0, 697, 0, 0 ], [ 1, 0, 0.0204, 0.0068, 0, 0.66, 0.0769, 697, 0, 1, 0, 0, 697, 0, 0 ], [ 1, 0, 0.034, 0.0068, 0, 0...
[ "from breathe.finder.doxygen import index as indexfinder", "from breathe.finder.doxygen import compound as compoundfinder", "from breathe.parser.doxygen import index, compound", "class MissingLevelError(Exception):\n pass", "class Matcher(object):\n pass", "class ItemMatcher(Matcher):\n\n def __i...
class FinderError(Exception): pass class MultipleMatchesError(FinderError): pass class NoMatchesError(FinderError): pass class Finder(object): def __init__(self, root, item_finder_factory): self._root = root self.item_finder_factory = item_finder_factory def find(self, matcher...
[ [ 3, 0, 0.0385, 0.0308, 0, 0.66, 0, 816, 0, 0, 0, 0, 645, 0, 0 ], [ 3, 0, 0.0846, 0.0308, 0, 0.66, 0.25, 368, 0, 0, 0, 0, 816, 0, 0 ], [ 3, 0, 0.1308, 0.0308, 0, 0....
[ "class FinderError(Exception):\n pass", "class MultipleMatchesError(FinderError):\n pass", "class NoMatchesError(FinderError):\n pass", "class Finder(object):\n\n def __init__(self, root, item_finder_factory):\n\n self._root = root\n self.item_finder_factory = item_finder_factory\n\n...
import os, subprocess def PhonyTarget(target, action): phony = Environment( ENV = os.environ, BUILDERS = { 'phony' : Builder(action = action) }) return AlwaysBuild( phony.phony(target = target, source = 'SConscript')) def build_docs(target, source, env): root = Dir('#').abs...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 2, 0, 0.25, 0.2727, 0, 0.66, 0.3333, 418, 0, 2, 1, 0, 0, 0, 4 ], [ 14, 1, 0.2273, 0.1364, 1, 0.7...
[ "import os, subprocess", "def PhonyTarget(target, action):\n phony = Environment(\n ENV = os.environ,\n BUILDERS = { 'phony' : Builder(action = action) })\n return AlwaysBuild(\n phony.phony(target = target, source = 'SConscript'))", " phony = Environment(\n ENV = os.environ...
import imp, logging, os import bygg import build # Create and register our own debug variant class DebugVariant(bygg.DebugVariant): def configure(self, env): super(DebugVariant, self).configure(env) env.AppendUnique(CPPDEFINES=['ACKWARD_DEBUG']) bygg.register_variant('debug', DebugVariant()) # I...
[ [ 1, 0, 0.0135, 0.0135, 0, 0.66, 0, 201, 0, 3, 0, 0, 201, 0, 0 ], [ 1, 0, 0.0405, 0.0135, 0, 0.66, 0.0476, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 1, 0, 0.0541, 0.0135, 0, ...
[ "import imp, logging, os", "import bygg", "import build", "class DebugVariant(bygg.DebugVariant):\n def configure(self, env):\n super(DebugVariant, self).configure(env)\n env.AppendUnique(CPPDEFINES=['ACKWARD_DEBUG'])", " def configure(self, env):\n super(DebugVariant, self).confi...
import build Import(['env']) akw_files = [ 'Module.py', 'UUID.py', ] sources = [ 'Initialize.cpp', ] headers = [ 'Initialize.hpp', 'Types.hpp', 'Variant.hpp', ] build.shared_library( env, name='uuid', sources=sources, headers=headers, akw_files=akw_files, ...
[ [ 1, 0, 0.0385, 0.0385, 0, 0.66, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 0, 0.1154, 0.0385, 0, 0.66, 0.2, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.25, 0.1538, 0, 0.66, ...
[ "import build", "Import(['env'])", "akw_files = [\n 'Module.py',\n 'UUID.py',\n ]", "sources = [\n 'Initialize.cpp',\n ]", "headers = [\n 'Initialize.hpp',\n 'Types.hpp',\n 'Variant.hpp',\n ]", "build.shared_library(\n env,\n name='uuid',\n sources=sources,\n headers...
from ackward import (Class, InlineFunction, Namespace, Property, TranslationUnit) from_hex1=''' static UUID fromHex(const std::string& hex) { try { boost::python::object obj = UUID::cls()(hex); return UUID(obj); ...
[ [ 1, 0, 0.0111, 0.0185, 0, 0.66, 0, 974, 0, 5, 0, 0, 974, 0, 0 ], [ 14, 0, 0.0387, 0.0295, 0, 0.66, 0.0833, 437, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0886, 0.0627, 0, ...
[ "from ackward import (Class,\n InlineFunction,\n Namespace,\n Property,\n TranslationUnit)", "from_hex1='''\nstatic UUID fromHex(const std::string& hex) {\n try {\n boost::python::object obj = UUID::cls()(hex);\n retu...
from ackward import (function, Module, ModuleProperty, Namespace, TranslationUnit) get_node_doc = '''Get the hardware address as a 48-bit positive integer. The first time this runs, it may launch a separate program, which could be qui...
[ [ 1, 0, 0.0341, 0.0568, 0, 0.66, 0, 974, 0, 5, 0, 0, 974, 0, 0 ], [ 14, 0, 0.0966, 0.0455, 0, 0.66, 0.1667, 947, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1364, 0.0114, 0, ...
[ "from ackward import (function,\n Module,\n ModuleProperty,\n Namespace,\n TranslationUnit)", "get_node_doc = '''Get the hardware address as a 48-bit positive integer.\n\nThe first time this runs, it may launch a separate program, whi...
import functools, operator from ackward import (function, Namespace, TranslationUnit) fileConfig1_doc = ''' Read the logging configuration from a ConfigParser-format file. This can be called several times from an application, allowing an end user the ability to s...
[ [ 1, 0, 0.012, 0.012, 0, 0.66, 0, 711, 0, 2, 0, 0, 711, 0, 0 ], [ 1, 0, 0.0482, 0.0361, 0, 0.66, 0.1667, 974, 0, 3, 0, 0, 974, 0, 0 ], [ 14, 0, 0.1506, 0.1446, 0, 0...
[ "import functools, operator", "from ackward import (function,\n Namespace,\n TranslationUnit)", "fileConfig1_doc = '''\n Read the logging configuration from a ConfigParser-format file.\n\n This can be called several times from an application, allowing an end user\n ...
from ackward import (function, Module, Namespace, TranslationUnit) def tunit(): return TranslationUnit( guard='INCLUDE_ACKWARD_LOGGING_CONFIG_MODULE_HPP') def definition(env): t = tunit() ns = Namespace('ackward', 'logging', 'config', ...
[ [ 1, 0, 0.1786, 0.2857, 0, 0.66, 0, 974, 0, 4, 0, 0, 974, 0, 0 ], [ 2, 0, 0.5, 0.2143, 0, 0.66, 0.5, 988, 0, 0, 1, 0, 0, 0, 1 ], [ 13, 1, 0.5357, 0.1429, 1, 0.19, ...
[ "from ackward import (function,\n Module,\n Namespace,\n TranslationUnit)", "def tunit():\n return TranslationUnit(\n guard='INCLUDE_ACKWARD_LOGGING_CONFIG_MODULE_HPP')", " return TranslationUnit(\n guard='INCLUDE_ACKWARD_LOGGING_CO...
from ackward import (Class, method, Namespace, Property, TranslationUnit) def tunit(): return TranslationUnit( forward_declarations=[('ackward', 'logging', 'class Filter'), ('ackward', 'logging...
[ [ 1, 0, 0.0417, 0.0694, 0, 0.66, 0, 974, 0, 5, 0, 0, 974, 0, 0 ], [ 2, 0, 0.1597, 0.1389, 0, 0.66, 0.3333, 988, 0, 0, 1, 0, 0, 0, 1 ], [ 13, 1, 0.1667, 0.125, 1, 0....
[ "from ackward import (Class,\n method,\n Namespace,\n Property,\n TranslationUnit)", "def tunit():\n return TranslationUnit(\n forward_declarations=[('ackward', 'logging', 'class Filter'),\n ('ac...
from ackward import (Class, Constructor, method, Namespace, Property, TranslationUnit) log_record_doc='''\\rst A wrapper around Python `logging.LogRecord <http://docs.python.org/py3k/library/logging.html#logging.Lo...
[ [ 1, 0, 0.0343, 0.0588, 0, 0.66, 0, 974, 0, 6, 0, 0, 974, 0, 0 ], [ 14, 0, 0.0882, 0.0294, 0, 0.66, 0.25, 259, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.152, 0.0784, 0, 0.6...
[ "from ackward import (Class,\n Constructor,\n method,\n Namespace,\n Property,\n TranslationUnit)", "log_record_doc='''\\\\rst\nA wrapper around Python `logging.LogRecord <http://docs.python.org/py3k/library/loggin...
from ackward import (function, Module, Namespace, TranslationUnit) def tunit(): return TranslationUnit( guard='INCLUDE_ACKWARD_LOGGING_HANDLERS_MODULE_HPP') def definition(env): t = tunit() ns = Namespace('ackward', 'logging', 'handler...
[ [ 1, 0, 0.1786, 0.2857, 0, 0.66, 0, 974, 0, 4, 0, 0, 974, 0, 0 ], [ 2, 0, 0.5, 0.2143, 0, 0.66, 0.5, 988, 0, 0, 1, 0, 0, 0, 1 ], [ 13, 1, 0.5357, 0.1429, 1, 0.21, ...
[ "from ackward import (function,\n Module,\n Namespace,\n TranslationUnit)", "def tunit():\n return TranslationUnit(\n guard='INCLUDE_ACKWARD_LOGGING_HANDLERS_MODULE_HPP')", " return TranslationUnit(\n guard='INCLUDE_ACKWARD_LOGGING_...
import build Import(['env']) akw_files = [ 'config/Config.py', 'config/Module.py', 'Filter.py', 'Formatter.py', 'Handler.py', 'handlers/Module.py', 'LoggerAdapter.py', 'LoggerBase.py', 'LogRecord.py', 'Module.py', ] sources = [ 'BasicConfig.cpp', 'FileHandler.cpp',...
[ [ 1, 0, 0.0204, 0.0204, 0, 0.66, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 0, 0.0612, 0.0204, 0, 0.66, 0.2, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.2143, 0.2449, 0, 0.66...
[ "import build", "Import(['env'])", "akw_files = [\n 'config/Config.py',\n 'config/Module.py',\n 'Filter.py',\n 'Formatter.py',\n 'Handler.py',\n 'handlers/Module.py',\n 'LoggerAdapter.py',", "sources = [\n 'BasicConfig.cpp',\n 'FileHandler.cpp',\n 'Initialize.cpp',\n 'Logger.c...
from ackward import (function, Module, Namespace, TranslationUnit) basicConfig_doc = ''' Does basic configuration for the logging system by creating a StreamHandler with a default Formatter and adding it to the root logger. The following keyword arguments...
[ [ 1, 0, 0.0298, 0.0476, 0, 0.66, 0, 974, 0, 4, 0, 0, 974, 0, 0 ], [ 14, 0, 0.1726, 0.2143, 0, 0.66, 0.25, 25, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.4107, 0.2381, 0, 0.66...
[ "from ackward import (function,\n Module,\n Namespace,\n TranslationUnit)", "basicConfig_doc = '''\nDoes basic configuration for the logging system by creating a StreamHandler with a default Formatter and adding it to the root logger.\n\nThe following ke...
from ackward import (Class, Constructor, method, Namespace, TranslationUnit) def tunit(): return TranslationUnit( forward_declarations=[ ('boost', 'python', 'class dict'), ('ackward', 'logging', 'cla...
[ [ 1, 0, 0.0667, 0.1111, 0, 0.66, 0, 974, 0, 5, 0, 0, 974, 0, 0 ], [ 2, 0, 0.3, 0.3111, 0, 0.66, 0.3333, 988, 0, 0, 1, 0, 0, 0, 1 ], [ 13, 1, 0.3111, 0.2889, 1, 0.09...
[ "from ackward import (Class,\n Constructor,\n method,\n Namespace,\n TranslationUnit)", "def tunit():\n return TranslationUnit(\n forward_declarations=[\n ('boost', 'python', 'class dict'),\n ('ackward'...
import functools, operator from ackward import (Class, Constructor, method, Namespace, TranslationUnit) formatter_doc = '''\\rst Wrapper around ``logging.Formatter`` objects. See `<http://docs.python.org/py3k/library/logging.html#form...
[ [ 1, 0, 0.0208, 0.0208, 0, 0.66, 0, 711, 0, 2, 0, 0, 711, 0, 0 ], [ 1, 0, 0.1042, 0.1042, 0, 0.66, 0.2, 974, 0, 5, 0, 0, 974, 0, 0 ], [ 14, 0, 0.2083, 0.0625, 0, 0....
[ "import functools, operator", "from ackward import (Class,\n Constructor,\n method,\n Namespace,\n TranslationUnit)", "formatter_doc = '''\\\\rst\nWrapper around ``logging.Formatter`` objects. See `<http://docs.python.org/py3k/libra...
from ackward import (Class, method, Method, Namespace, TranslationUnit) def tunit(): return TranslationUnit( guard='INCLUDE_ACKWARD_LOGGING_HANDLER_HPP', forward_declarations=[ ('ackward', 'logging', 'cl...
[ [ 1, 0, 0.0484, 0.0806, 0, 0.66, 0, 974, 0, 5, 0, 0, 974, 0, 0 ], [ 2, 0, 0.25, 0.2903, 0, 0.66, 0.3333, 988, 0, 0, 1, 0, 0, 0, 1 ], [ 13, 1, 0.2581, 0.2742, 1, 0.5...
[ "from ackward import (Class,\n method,\n Method,\n Namespace,\n TranslationUnit)", "def tunit():\n return TranslationUnit(\n guard='INCLUDE_ACKWARD_LOGGING_HANDLER_HPP',\n forward_declarations=[\n ('ackward...
from ackward import (Class, Constructor, Namespace, TranslationUnit) filter_doc='''\\rst A wrapper around Python `logging.Filter <http://docs.python.org/py3k/library/logging.html#filter-objects>`_ objects. \\endrst''' def tunit(): return TranslationUn...
[ [ 1, 0, 0.0658, 0.1053, 0, 0.66, 0, 974, 0, 4, 0, 0, 974, 0, 0 ], [ 14, 0, 0.2105, 0.1316, 0, 0.66, 0.3333, 182, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.4474, 0.2895, 0, 0...
[ "from ackward import (Class,\n Constructor,\n Namespace,\n TranslationUnit)", "filter_doc='''\\\\rst\nA wrapper around Python `logging.Filter\n<http://docs.python.org/py3k/library/logging.html#filter-objects>`_\nobjects.\n\\\\endrst'''", "def tunit():\...
from ackward import (Class, Function, InlineFunction, method, Module, Namespace, TranslationUnit) queue_doc = '''\\rst A wrapper for {0} objects in the ``queue`` module. See `<http://docs.pytho...
[ [ 1, 0, 0.0268, 0.047, 0, 0.66, 0, 974, 0, 7, 0, 0, 974, 0, 0 ], [ 14, 0, 0.0671, 0.0201, 0, 0.66, 0.125, 176, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1107, 0.0671, 0, 0....
[ "from ackward import (Class,\n Function,\n InlineFunction,\n method,\n Module,\n Namespace,\n TranslationUnit)", "queue_doc = '''\\\\rst\nA wrapper for {0} objects in the ``queue`` module. See `...
import build Import(['env']) akw_files = [ 'Queue.py', ] sources = [ 'Initialize.cpp', ] headers = [ 'Initialize.hpp', ] build.shared_library(env, # TODO: "Queue" in py2 name='queue', sources=sources, header...
[ [ 1, 0, 0.0435, 0.0435, 0, 0.66, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 0, 0.1304, 0.0435, 0, 0.66, 0.2, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.2609, 0.1304, 0, 0.66...
[ "import build", "Import(['env'])", "akw_files = [\n 'Queue.py',\n ]", "sources = [\n 'Initialize.cpp',\n ]", "headers = [\n 'Initialize.hpp',\n ]", "build.shared_library(env,\n # TODO: \"Queue\" in py2\n name='queue',\n sources=...
Import(['env']) subdirs = [ 'core', 'time', 'datetime', 'logging', 'queue', 're', 'uuid', ] SConscript(dirs=subdirs, exports='env')
[ [ 8, 0, 0.0667, 0.0667, 0, 0.66, 0, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.4667, 0.6, 0, 0.66, 0.5, 536, 0, 0, 0, 0, 0, 5, 0 ], [ 8, 0, 0.9, 0.1333, 0, 0.66, 1,...
[ "Import(['env'])", "subdirs = [\n 'core',\n 'time',\n 'datetime',\n 'logging',\n 'queue',\n 're',\n 'uuid',", "SConscript(dirs=subdirs, \n exports='env')" ]
import build Import(['env']) akw_files = [ 'Module.py' ] sources = [ 'Initialize.cpp', ] headers = [ 'Initialize.hpp', ] build.shared_library( env, name='time', sources=sources, headers=headers, akw_files=akw_files, deps=['core'])
[ [ 1, 0, 0.0435, 0.0435, 0, 0.66, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 0, 0.1304, 0.0435, 0, 0.66, 0.2, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.2609, 0.1304, 0, 0.66...
[ "import build", "Import(['env'])", "akw_files = [\n 'Module.py'\n ]", "sources = [\n 'Initialize.cpp',\n ]", "headers = [ \n 'Initialize.hpp',\n ]", "build.shared_library(\n env,\n name='time',\n sources=sources,\n headers=headers,\n akw_files=akw_files,\n deps=['core']...
from ackward import (function, Module, Namespace, TranslationUnit) def tunit(): return TranslationUnit( ) def definition(env): t = TranslationUnit( guard='INCLUDE_ACKWARD_TIME_MODULE_HPP') n = Namespace('ackward', 'time', paren...
[ [ 1, 0, 0.1471, 0.2353, 0, 0.66, 0, 974, 0, 4, 0, 0, 974, 0, 0 ], [ 2, 0, 0.4118, 0.1765, 0, 0.66, 0.5, 988, 0, 0, 1, 0, 0, 0, 1 ], [ 13, 1, 0.4412, 0.1176, 1, 0.35...
[ "from ackward import (function,\n Module,\n Namespace,\n TranslationUnit)", "def tunit():\n return TranslationUnit(\n )", " return TranslationUnit(\n )", "def definition(env):\n t = TranslationUnit(\n guard='INCLUDE_ACKW...
import build Import('env') sources = [ 'ByteArray.cpp', 'Bytes.cpp', 'ExceptionTranslation.cpp', 'ExceptionTranslator.cpp', 'GetClass.cpp', 'Import.cpp', 'Initialize.cpp', 'Kwargs.cpp', 'Object.cpp', 'Util.cpp', 'Version.cpp', ] headers = [ 'ByteArray.hpp', 'Bytes....
[ [ 1, 0, 0.0238, 0.0238, 0, 0.66, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 0, 0.0714, 0.0238, 0, 0.66, 0.25, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.2619, 0.3095, 0, 0.6...
[ "import build", "Import('env')", "sources = [\n 'ByteArray.cpp',\n 'Bytes.cpp',\n 'ExceptionTranslation.cpp',\n 'ExceptionTranslator.cpp',\n 'GetClass.cpp',\n 'Import.cpp',\n 'Initialize.cpp',", "headers = [\n 'ByteArray.hpp',\n 'Bytes.hpp',\n 'Enum.hpp',\n 'Exceptions.hpp',\n...
from ackward import (Class, method, Namespace, TranslationUnit) def tunit(): return TranslationUnit( guard='INCLUDE_ACKWARD_RE_MATCH_OBJECT_HPP', header_includes=[('string',), ('boost', 'python', 'dict.hpp'), ...
[ [ 1, 0, 0.0333, 0.0533, 0, 0.66, 0, 974, 0, 4, 0, 0, 974, 0, 0 ], [ 2, 0, 0.1267, 0.1067, 0, 0.66, 0.5, 988, 0, 0, 1, 0, 0, 0, 1 ], [ 13, 1, 0.1333, 0.0933, 1, 0.23...
[ "from ackward import (Class,\n method,\n Namespace,\n TranslationUnit)", "def tunit():\n return TranslationUnit(\n guard='INCLUDE_ACKWARD_RE_MATCH_OBJECT_HPP',\n header_includes=[('string',),\n ('boost', 'python',...
import build Import(['env']) akw_files = [ 'MatchObject.py', 'Module.py', 'RegexObject.py', ] sources = [ # 'Initialize.cpp', ] headers = [ # 'Initialize.hpp', ] build.shared_library( env, name='re', sources=sources, headers=headers, akw_files=akw_files, dep...
[ [ 1, 0, 0.04, 0.04, 0, 0.66, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 0, 0.12, 0.04, 0, 0.66, 0.2, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.28, 0.2, 0, 0.66, 0.4, ...
[ "import build", "Import(['env'])", "akw_files = [\n 'MatchObject.py',\n 'Module.py',\n 'RegexObject.py',\n ]", "sources = [\n # 'Initialize.cpp',\n ]", "headers = [ \n # 'Initialize.hpp',\n ]", "build.shared_library(\n env,\n name='re',\n sources=sources,\n headers=head...
from ackward import (Class, method, Namespace, TranslationUnit) def tunit(): return TranslationUnit( guard='INCLUDE_ACKWARD_RE_REGEX_OBJECT_HPP', forward_declarations=[('ackward', 're', 'class MatchObject')], header_includes=[('...
[ [ 1, 0, 0.0391, 0.0625, 0, 0.66, 0, 974, 0, 4, 0, 0, 974, 0, 0 ], [ 2, 0, 0.1406, 0.1094, 0, 0.66, 0.5, 988, 0, 0, 1, 0, 0, 0, 1 ], [ 13, 1, 0.1484, 0.0938, 1, 0.64...
[ "from ackward import (Class,\n method,\n Namespace,\n TranslationUnit)", "def tunit():\n return TranslationUnit(\n guard='INCLUDE_ACKWARD_RE_REGEX_OBJECT_HPP',\n forward_declarations=[('ackward', 're', 'class MatchObject')],\n hea...
from ackward import (Module, Namespace, TranslationUnit) def tunit(): return TranslationUnit( guard='INCLUDE_ACKWARD_RE_MODULE_HPP') def definition(env): t = tunit() ns = Namespace('ackward', 're', parent=t) Module(name='re', parent=ns) # objs = [...
[ [ 1, 0, 0.069, 0.1034, 0, 0.66, 0, 974, 0, 3, 0, 0, 974, 0, 0 ], [ 2, 0, 0.2069, 0.1034, 0, 0.66, 0.5, 988, 0, 0, 1, 0, 0, 0, 1 ], [ 13, 1, 0.2241, 0.069, 1, 0.22, ...
[ "from ackward import (Module,\n Namespace,\n TranslationUnit)", "def tunit():\n return TranslationUnit(\n guard='INCLUDE_ACKWARD_RE_MODULE_HPP')", " return TranslationUnit(\n guard='INCLUDE_ACKWARD_RE_MODULE_HPP')", "def definition(env):\n t = tun...
import build Import(['env']) akw_files = [ 'Date.py', 'DateTime.py', 'Time.py', 'TimeDelta.py', ] sources = [ 'Initialize.cpp', 'Module.cpp', 'TZInfo.cpp', ] headers = [ 'Initialize.hpp', 'Module.hpp', 'TZInfo.hpp', ] build.shared_library(env, ...
[ [ 1, 0, 0.0333, 0.0333, 0, 0.66, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 0, 0.1, 0.0333, 0, 0.66, 0.2, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.25, 0.2, 0, 0.66, 0....
[ "import build", "Import(['env'])", "akw_files = [\n 'Date.py',\n 'DateTime.py',\n 'Time.py',\n 'TimeDelta.py',\n ]", "sources = [\n 'Initialize.cpp',\n 'Module.cpp',\n 'TZInfo.cpp',\n ]", "headers = [\n 'Initialize.hpp',\n 'Module.hpp',\n 'TZInfo.hpp',\n ]", "build.s...
from ackward import (Class, class_method, ClassProperty, Constructor, InlineFunction, method, Method, Namespace, Property, Translat...
[ [ 1, 0, 0.0404, 0.0735, 0, 0.66, 0, 974, 0, 10, 0, 0, 974, 0, 0 ], [ 14, 0, 0.0993, 0.0294, 0, 0.66, 0.1667, 114, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1434, 0.0441, 0, ...
[ "from ackward import (Class,\n class_method,\n ClassProperty,\n Constructor,\n InlineFunction,\n method,\n Method,\n Namespace,", "equality_operator='''\nbool operator==(cons...
from ackward import (Class, ClassProperty, Constructor, InlineFunction, method, Method, Namespace, Property, TranslationUnit) lt_operator=''' bool oper...
[ [ 1, 0, 0.0345, 0.0621, 0, 0.66, 0, 974, 0, 9, 0, 0, 974, 0, 0 ], [ 14, 0, 0.0862, 0.0276, 0, 0.66, 0.1667, 136, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1207, 0.0276, 0, ...
[ "from ackward import (Class,\n ClassProperty,\n Constructor,\n InlineFunction,\n method,\n Method,\n Namespace,\n Property,", "lt_operator='''\nbool operator<(const Time& t) ...
from ackward import (Class, ClassProperty, Constructor, InlineFunction, Namespace, Property, TranslationUnit) eq_operator=''' bool operator==(const TimeDelta& td) const { return obj() == td.obj...
[ [ 1, 0, 0.0276, 0.0483, 0, 0.66, 0, 974, 0, 7, 0, 0, 974, 0, 0 ], [ 14, 0, 0.0724, 0.0276, 0, 0.66, 0.0667, 43, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1069, 0.0276, 0, 0...
[ "from ackward import (Class,\n ClassProperty,\n Constructor,\n InlineFunction,\n Namespace,\n Property,\n TranslationUnit)", "eq_operator='''\nbool operator==(const TimeDelta& td) const\n{ retur...
from ackward import (Class, class_method, Constructor, Namespace, TranslationUnit) def tunit(): return TranslationUnit( forward_declarations=[ ('ackward', 'datetime', 'class TZInfo'), ], impl...
[ [ 1, 0, 0.0682, 0.1136, 0, 0.66, 0, 974, 0, 5, 0, 0, 974, 0, 0 ], [ 2, 0, 0.25, 0.2045, 0, 0.66, 0.3333, 988, 0, 0, 1, 0, 0, 0, 1 ], [ 13, 1, 0.2614, 0.1818, 1, 0.6...
[ "from ackward import (Class,\n class_method,\n Constructor,\n Namespace,\n TranslationUnit)", "def tunit():\n return TranslationUnit(\n forward_declarations=[\n ('ackward', 'datetime', 'class TZInfo'),\n ...
import os import build Import('env') local_env = env.Clone() local_env.AppendUnique(CPPDEFINES=['BOOST_TEST_DYN_LINK']) local_env.AppendUnique(LIBS=['boost_unit_test_framework']) sources = [ 'core/bytearray_test.cpp', 'core/bytes_test.cpp', 'core/exception_translator_test.cpp', 'core/import_test.cp...
[ [ 1, 0, 0.0179, 0.0179, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0536, 0.0179, 0, 0.66, 0.1429, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 0, 0.0893, 0.0179, 0, ...
[ "import os", "import build", "Import('env')", "local_env = env.Clone()", "local_env.AppendUnique(CPPDEFINES=['BOOST_TEST_DYN_LINK'])", "local_env.AppendUnique(LIBS=['boost_unit_test_framework'])", "sources = [\n 'core/bytearray_test.cpp',\n 'core/bytes_test.cpp',\n 'core/exception_translator_te...
import build Import(['env']) build.program( env, 'log_example_embed', ['log_example.cpp'], deps=['core', 'logging'])
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 0, 0.3333, 0.1111, 0, 0.66, 0.5, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 8, 0, 0.7778, 0.5556, 0, 0.66,...
[ "import build", "Import(['env'])", "build.program(\n env,\n 'log_example_embed',\n ['log_example.cpp'],\n deps=['core', 'logging'])" ]
import build Import(['env']) subdirs = [ 'embed', 'extension', ] SConscript(dirs=subdirs, exports='env') programs = { 'file_config_example': ['FileConfig.cpp'], 'file_handler_example': ['FileHandler.cpp'], 'filter_example': ['Filter.cpp'], 'formatter_example': ['Formatter.cpp'...
[ [ 1, 0, 0.0286, 0.0286, 0, 0.66, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 0, 0.0857, 0.0286, 0, 0.66, 0.2, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.1857, 0.1143, 0, 0.66...
[ "import build", "Import(['env'])", "subdirs = [\n 'embed',\n 'extension',\n ]", "SConscript(dirs=subdirs,\n exports='env')", "programs = {\n 'file_config_example': ['FileConfig.cpp'],\n 'file_handler_example': ['FileHandler.cpp'],\n 'filter_example': ['Filter.cpp'],\n 'formatt...
import os import bygg Import(['env']) env = env.Clone() env['SHLIBPREFIX'] = '' bygg.build_shared_library( env, name='log_test', sources=['log_test.cpp'], headers=[], deps=['core', 'logging'], lib_dir=os.path.join('$INSTALL_DIR', 'lib'), include_dir='', include_subdir='')
[ [ 1, 0, 0.0526, 0.0526, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1579, 0.0526, 0, 0.66, 0.2, 337, 0, 1, 0, 0, 337, 0, 0 ], [ 8, 0, 0.2632, 0.0526, 0, 0.6...
[ "import os", "import bygg", "Import(['env'])", "env = env.Clone()", "env['SHLIBPREFIX'] = ''", "bygg.build_shared_library(\n env,\n name='log_test',\n sources=['log_test.cpp'],\n headers=[],\n deps=['core', 'logging'],\n lib_dir=os.path.join('$INSTALL_DIR', 'lib'),\n include_dir=''," ...
import logging, sys import log_test logging.basicConfig(stream=sys.stdout) l = logging.getLogger() log_test.log_message(l, "This gets logged by the C++ extension module.")
[ [ 1, 0, 0.1667, 0.1667, 0, 0.66, 0, 715, 0, 2, 0, 0, 715, 0, 0 ], [ 1, 0, 0.3333, 0.1667, 0, 0.66, 0.25, 268, 0, 1, 0, 0, 268, 0, 0 ], [ 8, 0, 0.6667, 0.1667, 0, 0....
[ "import logging, sys", "import log_test", "logging.basicConfig(stream=sys.stdout)", "l = logging.getLogger()", "log_test.log_message(l, \"This gets logged by the C++ extension module.\")" ]
import os Import(['env']) subdirs = [ 'core', 'logging', ] SConscript(dirs=subdirs, exports='env')
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 8, 0, 0.25, 0.0833, 0, 0.66, 0.3333, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.5417, 0.3333, 0, 0.6...
[ "import os", "Import(['env'])", "subdirs = [\n 'core',\n 'logging',\n ]", "SConscript(dirs=subdirs,\n exports='env')" ]
import build Import(['env']) programs = { 'bytearray_example' : ['ByteArray.cpp'], 'bytes_example' : ['Bytes.cpp'], 'exception_translation_example' : ['ExceptionTranslation.cpp'], 'exception_translator_example' : ['ExceptionTranslator.cpp'], 'exceptions_example' : ['Exceptions.cpp'], 'find_obj...
[ [ 1, 0, 0.0345, 0.0345, 0, 0.66, 0, 448, 0, 1, 0, 0, 448, 0, 0 ], [ 8, 0, 0.1034, 0.0345, 0, 0.66, 0.3333, 248, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.4655, 0.6207, 0, 0...
[ "import build", "Import(['env'])", "programs = {\n 'bytearray_example' : ['ByteArray.cpp'],\n 'bytes_example' : ['Bytes.cpp'],\n 'exception_translation_example' : ['ExceptionTranslation.cpp'],\n 'exception_translator_example' : ['ExceptionTranslator.cpp'],\n 'exceptions_example' : ['Exceptions.cp...
import ackward as akw def TOOL_ACKWARD(env): def akw_header(target, source, env): return akw.translate_header(env, str(source[0]), str(target[0])) akw_header = Builder(action = akw_header, suffix = '.hpp', src_suffix = '.py') def akw_impl(targ...
[ [ 1, 0, 0.05, 0.05, 0, 0.66, 0, 974, 0, 1, 0, 0, 974, 0, 0 ], [ 2, 0, 0.575, 0.9, 0, 0.66, 1, 287, 0, 1, 1, 0, 0, 0, 9 ], [ 2, 1, 0.225, 0.1, 1, 0.59, 0, 50...
[ "import ackward as akw", "def TOOL_ACKWARD(env):\n def akw_header(target, source, env): \n return akw.translate_header(env, str(source[0]), str(target[0]))\n akw_header = Builder(action = akw_header,\n suffix = '.hpp',\n src_suffix = '.py')\n \n d...
from .element import TemplateElement from .include import HeaderInclude, ImplInclude from .trace import trace open_header_template = ''' class $class_name $bases { public: /** Construct a new $class_name from an existing Python object. */ $class_name(boost::python::object); ''' close_header_template = ''' u...
[ [ 1, 0, 0.0093, 0.0093, 0, 0.66, 0, 736, 0, 1, 0, 0, 736, 0, 0 ], [ 1, 0, 0.0185, 0.0093, 0, 0.66, 0.1667, 142, 0, 2, 0, 0, 142, 0, 0 ], [ 1, 0, 0.0278, 0.0093, 0, ...
[ "from .element import TemplateElement", "from .include import HeaderInclude, ImplInclude", "from .trace import trace", "open_header_template = '''\nclass $class_name $bases {\npublic:\n /** Construct a new $class_name from an existing Python object.\n */\n $class_name(boost::python::object);\n'''", "clo...
from .element import SigTemplateElement from .include import ImplInclude from .signature import parse from .trace import trace header_template = 'static $return_type $method_name($header_signature);' impl_template = ''' $return_type $class_name::$method_name($impl_signature) { try { return boost::python:...
[ [ 1, 0, 0.0127, 0.0127, 0, 0.66, 0, 736, 0, 1, 0, 0, 736, 0, 0 ], [ 1, 0, 0.0253, 0.0127, 0, 0.66, 0.1429, 142, 0, 1, 0, 0, 142, 0, 0 ], [ 1, 0, 0.038, 0.0127, 0, 0...
[ "from .element import SigTemplateElement", "from .include import ImplInclude", "from .signature import parse", "from .trace import trace", "header_template = 'static $return_type $method_name($header_signature);'", "impl_template = '''\n$return_type $class_name::$method_name($impl_signature) {\n try {\...
import decorator, logging log = logging.getLogger('trace') @decorator.decorator def trace(f, *args, **kw): '''A simple tracing decorator, mostly to help with debugging. ''' log.debug("calling %s with args %s, %s" % (f.__name__, args, kw)) return f(*args, **kw)
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 373, 0, 2, 0, 0, 373, 0, 0 ], [ 14, 0, 0.3, 0.1, 0, 0.66, 0.5, 432, 3, 1, 0, 0, 71, 10, 1 ], [ 2, 0, 0.8, 0.5, 0, 0.66, 1, 211...
[ "import decorator, logging", "log = logging.getLogger('trace')", "def trace(f, *args, **kw):\n '''A simple tracing decorator, mostly to help with debugging.\n '''\n log.debug(\"calling %s with args %s, %s\" % (f.__name__, args, kw))\n return f(*args, **kw)", " '''A simple tracing decorator, mos...
from .element import Element from .trace import trace @trace def _declare(decl): '''Generate a single forward declaration statement. ''' if len(decl) == 0: return str() elif len(decl) == 1: return '{0};'.format(decl[0]) else: return 'namespace {0} {{ {1} }}'.format( ...
[ [ 1, 0, 0.0312, 0.0312, 0, 0.66, 0, 736, 0, 1, 0, 0, 736, 0, 0 ], [ 1, 0, 0.0625, 0.0312, 0, 0.66, 0.3333, 211, 0, 1, 0, 0, 211, 0, 0 ], [ 2, 0, 0.3438, 0.4062, 0, ...
[ "from .element import Element", "from .trace import trace", "def _declare(decl):\n '''Generate a single forward declaration statement.\n '''\n if len(decl) == 0:\n return str()\n\n elif len(decl) == 1:\n return '{0};'.format(decl[0])", " '''Generate a single forward declaration st...
import re from .trace import trace @trace def build_signature(sig, header): '''Builds a method parameter signature given an akw signature The `sig` parameter specifies the types, names, and (optionally) default values for the signature of a C++ method. This method converts that into a string that can ...
[ [ 1, 0, 0.0109, 0.0109, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0217, 0.0109, 0, 0.66, 0.25, 211, 0, 1, 0, 0, 211, 0, 0 ], [ 2, 0, 0.2065, 0.3152, 0, 0....
[ "import re", "from .trace import trace", "def build_signature(sig, header):\n '''Builds a method parameter signature given an akw signature\n\n The `sig` parameter specifies the types, names, and (optionally)\n default values for the signature of a C++ method. This method\n converts that into a stri...
from .element import SigTemplateElement from .include import ImplInclude from .signature import parse from .trace import trace header_template = '$virtual $return_type $method_name($header_signature) \ $const $virtual_tail;' impl_template = ''' $return_type $class_name::$method_name($impl_signature) $const { try...
[ [ 1, 0, 0.0093, 0.0093, 0, 0.66, 0, 736, 0, 1, 0, 0, 736, 0, 0 ], [ 1, 0, 0.0185, 0.0093, 0, 0.66, 0.125, 142, 0, 1, 0, 0, 142, 0, 0 ], [ 1, 0, 0.0278, 0.0093, 0, 0...
[ "from .element import SigTemplateElement", "from .include import ImplInclude", "from .signature import parse", "from .trace import trace", "header_template = '$virtual $return_type $method_name($header_signature) \\\n$const $virtual_tail;'", "impl_template = '''\n$return_type $class_name::$method_name($im...
import imp, sys, threading from .trace import trace class Cache: '''Imported module cache. Avoids re-importing of modules. ''' cache = {} count = 0 load_lock = threading.Lock() @staticmethod @trace def load(infile): with Cache.load_lock: try: mo...
[ [ 1, 0, 0.0135, 0.0135, 0, 0.66, 0, 201, 0, 3, 0, 0, 201, 0, 0 ], [ 1, 0, 0.027, 0.0135, 0, 0.66, 0.1667, 211, 0, 1, 0, 0, 211, 0, 0 ], [ 3, 0, 0.2365, 0.3784, 0, 0...
[ "import imp, sys, threading", "from .trace import trace", "class Cache:\n '''Imported module cache.\n\n Avoids re-importing of modules.\n '''\n cache = {}\n count = 0\n load_lock = threading.Lock()", " '''Imported module cache.\n\n Avoids re-importing of modules.\n '''", " cach...
from .element import SigTemplateElement from .include import ImplInclude from .signature import parse from .trace import trace header_template = '$return_type $name($header_signature);' impl_template = ''' $return_type $name($impl_signature) { try { return boost::python::extract<$return_type>( module().at...
[ [ 1, 0, 0.0139, 0.0139, 0, 0.66, 0, 736, 0, 1, 0, 0, 736, 0, 0 ], [ 1, 0, 0.0278, 0.0139, 0, 0.66, 0.125, 142, 0, 1, 0, 0, 142, 0, 0 ], [ 1, 0, 0.0417, 0.0139, 0, 0...
[ "from .element import SigTemplateElement", "from .include import ImplInclude", "from .signature import parse", "from .trace import trace", "header_template = '$return_type $name($header_signature);'", "impl_template = '''\n$return_type $name($impl_signature) {\n try {\n return boost::python::extract<$...
import unittest if __name__ == '__main__': unittest.TestLoader().discover()
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 4, 0, 0.875, 0.5, 0, 0.66, 1, 0, 0, 0, 0, 0, 0, 0, 2 ], [ 8, 1, 1, 0.25, 1, 0.28, 0, 208, ...
[ "import unittest", "if __name__ == '__main__':\n unittest.TestLoader().discover()", " unittest.TestLoader().discover()" ]
# This just a module for the tests to use when testing Elements. It # has no real meaning.
[]
[]
from .element import TemplateElement from .include import ImplInclude from .trace import trace header_template = '$type $module_property_name();' impl_template = ''' $type $module_property_name() { using namespace boost::python; try { object prop = $module_function().attr("$python_name"); ...
[ [ 1, 0, 0.0159, 0.0159, 0, 0.66, 0, 736, 0, 1, 0, 0, 736, 0, 0 ], [ 1, 0, 0.0317, 0.0159, 0, 0.66, 0.2, 142, 0, 1, 0, 0, 142, 0, 0 ], [ 1, 0, 0.0476, 0.0159, 0, 0.6...
[ "from .element import TemplateElement", "from .include import ImplInclude", "from .trace import trace", "header_template = '$type $module_property_name();'", "impl_template = '''\n$type $module_property_name() {\n using namespace boost::python;\n try {\n object prop =\n $module_funct...
from .element import SigTemplateElement from .include import ImplInclude from .trace import trace header_template = '${class_name}($header_signature);' impl_template = ''' ${class_name}::${class_name}($impl_signature) try : core::Object ( ${class_name}::cls()($parameters) ) $constructor_initializers { } TRANS...
[ [ 1, 0, 0.0222, 0.0222, 0, 0.66, 0, 736, 0, 1, 0, 0, 736, 0, 0 ], [ 1, 0, 0.0444, 0.0222, 0, 0.66, 0.2, 142, 0, 1, 0, 0, 142, 0, 0 ], [ 1, 0, 0.0667, 0.0222, 0, 0.6...
[ "from .element import SigTemplateElement", "from .include import ImplInclude", "from .trace import trace", "header_template = '${class_name}($header_signature);'", "impl_template = '''\n${class_name}::${class_name}($impl_signature) try :\n core::Object (\n ${class_name}::cls()($parameters) )\n $constru...
from .element import Element from .trace import trace class Using(Element): @trace def __init__(self, using): Element.__init__(self) self.using = using def open_phase(self, mod, phase, symbols): if phase == 'using': yield 'using {0};'.format(self.using)
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 736, 0, 1, 0, 0, 736, 0, 0 ], [ 1, 0, 0.1667, 0.0833, 0, 0.66, 0.5, 211, 0, 1, 0, 0, 211, 0, 0 ], [ 3, 0, 0.6667, 0.75, 0, 0.66,...
[ "from .element import Element", "from .trace import trace", "class Using(Element):\n @trace\n def __init__(self, using):\n Element.__init__(self)\n self.using = using\n\n def open_phase(self, mod, phase, symbols):\n if phase == 'using':", " def __init__(self, using):\n ...
from .element import SigTemplateElement from .include import HeaderInclude from .trace import trace header_const = 'ackward::core::ROProperty<$type> $property_name;' header_non_const = 'ackward::core::Property<$type> $property_name;' constructor_initializer = '$property_name(obj(), "$python_name")' class Property(S...
[ [ 1, 0, 0.0196, 0.0196, 0, 0.66, 0, 736, 0, 1, 0, 0, 736, 0, 0 ], [ 1, 0, 0.0392, 0.0196, 0, 0.66, 0.1667, 142, 0, 1, 0, 0, 142, 0, 0 ], [ 1, 0, 0.0588, 0.0196, 0, ...
[ "from .element import SigTemplateElement", "from .include import HeaderInclude", "from .trace import trace", "header_const = 'ackward::core::ROProperty<$type> $property_name;'", "header_non_const = 'ackward::core::Property<$type> $property_name;'", "constructor_initializer = '$property_name(obj(), \"$pyth...
import string from .signature import build_signature from .trace import trace class Element: '''An Element represents a concept in an ackward mapping. Elements are composed into a tree via their `children` member. Elements are visited in-order and allowed to generate output a) before their children a...
[ [ 1, 0, 0.0052, 0.0052, 0, 0.66, 0, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.0157, 0.0052, 0, 0.66, 0.2, 932, 0, 1, 0, 0, 932, 0, 0 ], [ 1, 0, 0.0209, 0.0052, 0, 0.6...
[ "import string", "from .signature import build_signature", "from .trace import trace", "class Element:\n '''An Element represents a concept in an ackward mapping.\n\n Elements are composed into a tree via their `children`\n member. Elements are visited in-order and allowed to generate\n output a) ...