code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
# Author: Huang Jiahua <jhuangjiahua@gmail.com>
# License: LGPLv3+
# Last modified:
__version__ = '0.5.1'
import gtk, gobject
import webkit
import jswebkit
import gtklatex
import urllib2
import os, errno
import re
impor... | [
[
14,
0,
0.006,
0.0008,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0075,
0.0008,
0,
0.66,
0.0588,
166,
0,
2,
0,
0,
166,
0,
0
],
[
1,
0,
0.0083,
0.0008,
0,
0.... | [
"__version__ = '0.5.1'",
"import gtk, gobject",
"import webkit",
"import jswebkit",
"import gtklatex",
"import urllib2",
"import os, errno",
"import re",
"import docfilter",
"try: import i18n\nexcept: from gettext import gettext as _",
"try: import i18n",
"except: from gettext import gettext a... |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
# Author: Huang Jiahua <jhuangjiahua@gmail.com>
# License: GNU LGPL
# Last modified:
"""
"""
__revision__ = '0.1'
if __name__=="__main__":
import gwrite.gwrite
gwrite.gwrite.main()
| [
[
8,
0,
0.4474,
0.1053,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.5263,
0.0526,
0,
0.66,
0.5,
809,
1,
0,
0,
0,
0,
3,
0
],
[
4,
0,
0.7895,
0.1579,
0,
0.66,
... | [
"\"\"\"\n\"\"\"",
"__revision__ = '0.1'",
"if __name__==\"__main__\":\n import gwrite.gwrite\n gwrite.gwrite.main()",
" import gwrite.gwrite",
" gwrite.gwrite.main()"
] |
#!/usr/bin/python
from distutils.core import setup
from DistUtilsExtra.command import *
from glob import glob
setup(name='gwrite',
version='0.5.1',
description='HTML5 Doc Writer based on GTK2',
long_description ="""GWrite is a simple HTML5 Doc Writer base on Gtk2.
Features include:
1. HTML Form... | [
[
1,
0,
0.0638,
0.0213,
0,
0.66,
0,
152,
0,
1,
0,
0,
152,
0,
0
],
[
1,
0,
0.0851,
0.0213,
0,
0.66,
0.3333,
80,
0,
1,
0,
0,
80,
0,
0
],
[
1,
0,
0.1064,
0.0213,
0,
0.... | [
"from distutils.core import setup",
"from DistUtilsExtra.command import *",
"from glob import glob",
"setup(name='gwrite',\n version='0.5.1',\n description='HTML5 Doc Writer based on GTK2',\n long_description =\"\"\"GWrite is a simple HTML5 Doc Writer base on Gtk2.\n\nFeatures include:\n\n 1.... |
from sqlalchemy import *
from sqlalchemy.orm import *
hostname = "127.0.0.1"
username = "userpython"
password = "python"
dbname = "test"
db = create_engine("mysql://%s:%s@%s/%s" %(username, password, hostname, dbname))
db.echo = True
metadata = MetaData(db)
users = Table('users', metadata,
Column('user_id', I... | [
[
1,
0,
0.0086,
0.0086,
0,
0.66,
0,
835,
0,
1,
0,
0,
835,
0,
0
],
[
1,
0,
0.0172,
0.0086,
0,
0.66,
0.0625,
518,
0,
1,
0,
0,
518,
0,
0
],
[
14,
0,
0.0345,
0.0086,
0,
... | [
"from sqlalchemy import *",
"from sqlalchemy.orm import *",
"hostname = \"127.0.0.1\"",
"username = \"userpython\"",
"password = \"python\"",
"dbname = \"test\"",
"db = create_engine(\"mysql://%s:%s@%s/%s\" %(username, password, hostname, dbname))",
"db.echo = True",
"metadata = MetaData(db)",
"us... |
import dbtest
dbtype = "mysql"
hostname = "db4free.net"
username = "userpython"
password = "python"
port = "3306"
dbname = "groupsixdatabase"
success = dbtest.init(dbtype, username, password, hostname, port, dbname)
john = dbtest.User('John', 42, 'pass')
mary = dbtest.User(name='Mary', age=30, password='secret')
jac... | [
[
1,
0,
0.5,
0.5,
0,
0.66,
0,
297,
0,
1,
0,
0,
297,
0,
0
]
] | [
"import dbtest"
] |
# Note: this executes in the global scope
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, String, Integer
import sqlalchemy
engine=sqlalchemy.create_engine('mysql://localhost/test')
debug=False # set this to true and only the generated code is printed.
MYSQL_TO_ALCHEMY_TYPE = d... | [
[
1,
0,
0.0682,
0.0227,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.0909,
0.0227,
0,
0.66,
0.1111,
835,
0,
3,
0,
0,
835,
0,
0
],
[
1,
0,
0.1136,
0.0227,
0,
... | [
"from sqlalchemy.ext.declarative import declarative_base",
"from sqlalchemy import Column, String, Integer",
"import sqlalchemy",
"engine=sqlalchemy.create_engine('mysql://localhost/test')",
"debug=False # set this to true and only the generated code is printed.",
"MYSQL_TO_ALCHEMY_TYPE = dict(\n char=... |
import os
from google.appengine.ext.webapp import template
import cgi
from google.appengine.ext.webapp.util import login_required
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from goog... | [
[
1,
0,
0.0156,
0.0156,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0312,
0.0156,
0,
0.66,
0.0714,
8,
0,
1,
0,
0,
8,
0,
0
],
[
1,
0,
0.0469,
0.0156,
0,
0.66... | [
"import os",
"from google.appengine.ext.webapp import template",
"import cgi",
"from google.appengine.ext.webapp.util import login_required",
"from google.appengine.api import users",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from google.a... |
SECRET_CODE = 'whateveryourcodeis'
| [
[
14,
0,
1,
0.5,
0,
0.66,
0,
52,
1,
0,
0,
0,
0,
3,
0
]
] | [
"SECRET_CODE = 'whateveryourcodeis'"
] |
#!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ... | [
[
1,
0,
0.1818,
0.0909,
0,
0.66,
0,
879,
0,
1,
0,
0,
879,
0,
0
],
[
7,
0,
0.5,
0.5455,
0,
0.66,
0.5,
0,
0,
1,
0,
0,
0,
0,
2
],
[
1,
1,
0.3636,
0.0909,
1,
0.27,
... | [
"from django.core.management import execute_manager",
"try:\n import settings # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\\nYou'll have to run dj... |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.1591,
0.2727,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.303,
0.0152,
0,
0.66,
0.3333,
831,
0,
1,
0,
0,
831,
0,
0
],
[
2,
0,
0.4091,
0.1667,
0,
0.66,... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from django.core.pagina... |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.2059,
0.3529,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3922,
0.0196,
0,
0.66,
0.25,
389,
0,
1,
0,
0,
389,
0,
0
],
[
1,
0,
0.4118,
0.0196,
0,
0.66,
... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from django.utils.trans... |
from django.conf import settings
def path_context_processor(request):
path = {
'PATH': settings.APP_PATH,
}
return path | [
[
1,
0,
0.125,
0.125,
0,
0.66,
0,
128,
0,
1,
0,
0,
128,
0,
0
],
[
2,
0,
0.6875,
0.75,
0,
0.66,
1,
950,
0,
1,
1,
0,
0,
0,
0
],
[
14,
1,
0.625,
0.375,
1,
0.63,
0,... | [
"from django.conf import settings",
"def path_context_processor(request):\n path = {\n 'PATH': settings.APP_PATH,\n }\n\n return path",
" path = {\n 'PATH': settings.APP_PATH,\n }",
" return path"
] |
# -*- encoding: utf-8 -*-
DATE_FORMAT = 'N j, Y' | [
[
14,
0,
1,
0.5,
0,
0.66,
0,
843,
1,
0,
0,
0,
0,
3,
0
]
] | [
"DATE_FORMAT = 'N j, Y'"
] |
# -*- coding: utf-8 -*-
DATE_FORMAT = r'j N Y'
| [
[
14,
0,
1,
0.5,
0,
0.66,
0,
843,
1,
0,
0,
0,
0,
3,
0
]
] | [
"DATE_FORMAT = r'j N Y'"
] |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option)... | [
[
8,
0,
0.1694,
0.2903,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3226,
0.0161,
0,
0.66,
0.1667,
341,
0,
1,
0,
0,
341,
0,
0
],
[
1,
0,
0.3387,
0.0161,
0,
0.66... | [
"'''\nCopyright Cobalys (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from django.conf.urls.defau... |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.0755,
0.1295,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
8,
0,
0.1511,
0.0216,
0,
0.66,
0.0227,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1655,
0.0072,
0,
0.66,
... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"'''\nLoad Celery\n'''",... |
import sys
import os
sys.path.append('/usr/django')
os.environ["CELERY_LOADER"] = "django"
os.environ['DJANGO_SETTINGS_MODULE'] = 'video365.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
| [
[
1,
0,
0.125,
0.125,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.25,
0.125,
0,
0.66,
0.1667,
688,
0,
1,
0,
0,
688,
0,
0
],
[
8,
0,
0.5,
0.125,
0,
0.66,
... | [
"import sys",
"import os",
"sys.path.append('/usr/django')",
"os.environ[\"CELERY_LOADER\"] = \"django\"",
"os.environ['DJANGO_SETTINGS_MODULE'] = 'video365.settings'",
"import django.core.handlers.wsgi",
"application = django.core.handlers.wsgi.WSGIHandler()"
] |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.2838,
0.4865,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5405,
0.027,
0,
0.66,
0.25,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.5676,
0.027,
0,
0.66,
... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from django import form... |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.1842,
0.3158,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3509,
0.0175,
0,
0.66,
0.1667,
128,
0,
1,
0,
0,
128,
0,
0
],
[
1,
0,
0.3684,
0.0175,
0,
0.66... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from django.conf import... |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.0833,
0.1429,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1587,
0.0079,
0,
0.66,
0.1,
30,
0,
1,
0,
0,
30,
0,
0
],
[
1,
0,
0.1667,
0.0079,
0,
0.66,
... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from celery.task import... |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.0316,
0.0542,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0602,
0.003,
0,
0.66,
0.0385,
128,
0,
1,
0,
0,
128,
0,
0
],
[
1,
0,
0.0633,
0.003,
0,
0.66,
... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from django.conf import... |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.42,
0.72,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.8,
0.04,
0,
0.66,
0.3333,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.84,
0.04,
0,
0.66,
0.6667,... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from django import form... |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.2625,
0.45,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.025,
0,
0.66,
0.2,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.525,
0.025,
0,
0.66,
0.4,
... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from django.db import m... |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.3,
0.5143,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5714,
0.0286,
0,
0.66,
0.3333,
30,
0,
1,
0,
0,
30,
0,
0
],
[
1,
0,
0.6143,
0.0571,
0,
0.66,
... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from celery.task import... |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.0734,
0.1259,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1399,
0.007,
0,
0.66,
0.0625,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.1469,
0.007,
0,
0.66,
... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from django.contrib imp... |
# -*- coding: utf-8 -*-
'''
Copyright Cobalys.com (c) 2011
This file is part of 365Video.
365Video is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opt... | [
[
8,
0,
0.181,
0.3103,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3448,
0.0172,
0,
0.66,
0.0909,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.3621,
0.0172,
0,
0.66,... | [
"'''\nCopyright Cobalys.com (c) 2011\n\nThis file is part of 365Video.\n\n 365Video is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or",
"from django.contrib imp... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '3dlp_slicer.ui'
#
# Created: Sat Jun 01 20:47:44 2013
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf... | [
[
1,
0,
0.0187,
0.0019,
0,
0.66,
0,
154,
0,
2,
0,
0,
154,
0,
0
],
[
7,
0,
0.0253,
0.0075,
0,
0.66,
0.3333,
0,
0,
1,
0,
0,
0,
0,
0
],
[
14,
1,
0.0243,
0.0019,
1,
0.4... | [
"from PyQt4 import QtCore, QtGui",
"try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s",
" _fromUtf8 = QtCore.QString.fromUtf8",
" _fromUtf8 = lambda s: s",
"class Ui_MainWindow(object):\n def setupUi(self, MainWindow):\n MainWindow.setObjectNa... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'manual_control_gui.ui'
#
# Created: Mon May 06 20:43:40 2013
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.... | [
[
1,
0,
0.0469,
0.0047,
0,
0.66,
0,
154,
0,
2,
0,
0,
154,
0,
0
],
[
7,
0,
0.0634,
0.0188,
0,
0.66,
0.3333,
0,
0,
1,
0,
0,
0,
0,
0
],
[
14,
1,
0.061,
0.0047,
1,
0.61... | [
"from PyQt4 import QtCore, QtGui",
"try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s",
" _fromUtf8 = QtCore.QString.fromUtf8",
" _fromUtf8 = lambda s: s",
"class Ui_Manual_Control(object):\n def setupUi(self, Manual_Control):\n Manual_Control... |
#!/usr/bin/env python
#
# build_arduino.py - build, link and upload sketches script for Arduino
# Copyright (c) 2010 Ben Sasson. All right reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# ... | [
[
1,
0,
0.0936,
0.0043,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0979,
0.0043,
0,
0.66,
0.0476,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.1021,
0.0043,
0,
... | [
"import sys",
"import os",
"import optparse",
"EXITCODE_OK = 0",
"EXITCODE_NO_UPLOAD_DEVICE = 1",
"EXITCODE_NO_WPROGRAM = 2",
"EXITCODE_INVALID_AVR_PATH = 3",
"CPU_CLOCK = 16000000",
"ARCH = 'atmega328p'",
"ENV_VERSION = 18",
"BAUD = 57600",
"CORE = 'arduino'",
"COMPILERS = {\n '.c': 'gcc... |
#!/usr/bin/env python
#
# build_arduino.py - build, link and upload sketches script for Arduino
# Copyright (c) 2010 Ben Sasson. All right reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# ... | [
[
1,
0,
0.0936,
0.0043,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0979,
0.0043,
0,
0.66,
0.0476,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.1021,
0.0043,
0,
... | [
"import sys",
"import os",
"import optparse",
"EXITCODE_OK = 0",
"EXITCODE_NO_UPLOAD_DEVICE = 1",
"EXITCODE_NO_WPROGRAM = 2",
"EXITCODE_INVALID_AVR_PATH = 3",
"CPU_CLOCK = 16000000",
"ARCH = 'atmega328p'",
"ENV_VERSION = 18",
"BAUD = 57600",
"CORE = 'arduino'",
"COMPILERS = {\n '.c': 'gcc... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'settingsdialog.ui'
#
# Created: Mon May 13 19:24:11 2013
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.from... | [
[
1,
0,
0.0266,
0.0027,
0,
0.66,
0,
154,
0,
2,
0,
0,
154,
0,
0
],
[
7,
0,
0.0359,
0.0106,
0,
0.66,
0.5,
0,
0,
1,
0,
0,
0,
0,
0
],
[
14,
1,
0.0346,
0.0027,
1,
0.98,
... | [
"from PyQt4 import QtCore, QtGui",
"try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s",
" _fromUtf8 = QtCore.QString.fromUtf8",
" _fromUtf8 = lambda s: s",
"class Ui_SettingsDialogBaseClass(object):\n def setupUi(self, SettingsDialogBaseClass):\n ... |
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 17 21:01:39 2012
@author: Chris Marion
"""
import serial
import math
import time
from threading import Thread
class Heartbeat(Thread):
def __init__(self, parent):
self.stopped = False
self.parent = parent
Thread.__init__(self)
... | [
[
8,
0,
0.0377,
0.0472,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.066,
0.0094,
0,
0.66,
0.1111,
601,
0,
1,
0,
0,
601,
0,
0
],
[
1,
0,
0.0755,
0.0094,
0,
0.66,... | [
"\"\"\"\nCreated on Mon Dec 17 21:01:39 2012\n\n@author: Chris Marion\n\"\"\"",
"import serial",
"import math",
"import time",
"from threading import Thread",
"class Heartbeat(Thread):\n def __init__(self, parent):\n self.stopped = False\n self.parent = parent\n Thread.__init__(sel... |
import slicer
import vtk
import sys
from PyQt4 import QtCore,QtGui
from PyQt4.Qt import *
from PyQt4.QtGui import QFileDialog, QPixmap, QSplashScreen
#from PyQt4.Qt import *
from slicer_gui import Ui_MainWindow
from slicer_settings_dialog_gui import Ui_Dialog
from vtk.qt4.QVTKRenderWindowInteractor import QVTK... | [
[
1,
0,
0.0023,
0.0023,
0,
0.66,
0,
588,
0,
1,
0,
0,
588,
0,
0
],
[
1,
0,
0.0047,
0.0023,
0,
0.66,
0.0588,
665,
0,
1,
0,
0,
665,
0,
0
],
[
1,
0,
0.007,
0.0023,
0,
0... | [
"import slicer",
"import vtk",
"import sys",
"from PyQt4 import QtCore,QtGui",
"from PyQt4.Qt import *",
"from PyQt4.QtGui import QFileDialog, QPixmap, QSplashScreen",
"from slicer_gui import Ui_MainWindow",
"from slicer_settings_dialog_gui import Ui_Dialog",
"from vtk.qt4.QVTKRenderWindowInteractor... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'slicer_settings_dialog.ui'
#
# Created: Sun Mar 31 19:34:46 2013
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QStr... | [
[
1,
0,
0.0694,
0.0069,
0,
0.66,
0,
154,
0,
2,
0,
0,
154,
0,
0
],
[
7,
0,
0.0938,
0.0278,
0,
0.66,
0.5,
0,
0,
1,
0,
0,
0,
0,
0
],
[
14,
1,
0.0903,
0.0069,
1,
0.84,
... | [
"from PyQt4 import QtCore, QtGui",
"try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s",
" _fromUtf8 = QtCore.QString.fromUtf8",
" _fromUtf8 = lambda s: s",
"class Ui_Dialog(object):\n def setupUi(self, Dialog):\n Dialog.setObjectName(_fromUtf8... |
import vtk
import time
import os
import ConfigParser
import cPickle as pickle
import zipfile
import StringIO
import numpy
import Image
from vtk.util.numpy_support import vtk_to_numpy
class MyInteractorStyle(vtk.vtkInteractorStyleTrackballCamera): #defines all the mouse interactions for the render views
... | [
[
1,
0,
0.0061,
0.0061,
0,
0.66,
0,
665,
0,
1,
0,
0,
665,
0,
0
],
[
1,
0,
0.0121,
0.0061,
0,
0.66,
0.0909,
654,
0,
1,
0,
0,
654,
0,
0
],
[
1,
0,
0.0182,
0.0061,
0,
... | [
"import vtk",
"import time",
"import os",
"import ConfigParser",
"import cPickle as pickle",
"import zipfile",
"import StringIO",
"import numpy",
"import Image",
"from vtk.util.numpy_support import vtk_to_numpy",
"class MyInteractorStyle(vtk.vtkInteractorStyleTrackballCamera): #defines all the m... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'aboutdialog.ui'
#
# Created: Sun Mar 03 18:00:57 2013
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf... | [
[
1,
0,
0.1429,
0.0143,
0,
0.66,
0,
154,
0,
2,
0,
0,
154,
0,
0
],
[
7,
0,
0.1929,
0.0571,
0,
0.66,
0.5,
0,
0,
1,
0,
0,
0,
0,
0
],
[
14,
1,
0.1857,
0.0143,
1,
0.08,
... | [
"from PyQt4 import QtCore, QtGui",
"try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s",
" _fromUtf8 = QtCore.QString.fromUtf8",
" _fromUtf8 = lambda s: s",
"class Ui_Dialog(object):\n def setupUi(self, Dialog):\n Dialog.setObjectName(_fromUtf8... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '3dlp_v2.ui'
#
# Created: Sun Jun 30 18:26:15 2013
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
e... | [
[
1,
0,
0.007,
0.0007,
0,
0.66,
0,
154,
0,
2,
0,
0,
154,
0,
0
],
[
7,
0,
0.0094,
0.0028,
0,
0.66,
0.3333,
0,
0,
1,
0,
0,
0,
0,
0
],
[
14,
1,
0.0091,
0.0007,
1,
0.99... | [
"from PyQt4 import QtCore, QtGui",
"try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s",
" _fromUtf8 = QtCore.QString.fromUtf8",
" _fromUtf8 = lambda s: s",
"class Ui_MainWindow(object):\n def setupUi(self, MainWindow):\n MainWindow.setObjectNa... |
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 05 22:20:39 2012
@author: Chris Marion Copyright 2012-2013
www.chrismarion.net
Still to add/known issues:
-projector control functionality is not finished.
-still looking for a good method of calibrating for X and Y (image size)
-raise the bed to a ... | [
[
8,
0,
0.0028,
0.0047,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0053,
0.0003,
0,
0.66,
0.0217,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0059,
0.0003,
0,
0.66... | [
"\"\"\"\nCreated on Thu Apr 05 22:20:39 2012\n\n@author: Chris Marion Copyright 2012-2013\nwww.chrismarion.net\n\nStill to add/known issues:\n -projector control functionality is not finished.",
"import sys",
"import comscan",
"import webbrowser",
"from ConfigParser import *",
"import printmodel",
"i... |
## Pre-defined animation.
##
## Move selected object to the top right corner.
import animation
from keyframe import PosKeyFrame
def anim_topRight(firstFrame, lastFrame, nFrames):
#self.firstFrame = firstFrame
#self.lastFrame = lastFrame
#self.nframes = nframes
anim = animation.Animation ([Pos... | [
[
1,
0,
0.2667,
0.0667,
0,
0.66,
0,
733,
0,
1,
0,
0,
733,
0,
0
],
[
1,
0,
0.3333,
0.0667,
0,
0.66,
0.5,
391,
0,
1,
0,
0,
391,
0,
0
],
[
2,
0,
0.7333,
0.6,
0,
0.66,
... | [
"import animation",
"from keyframe import PosKeyFrame",
"def anim_topRight(firstFrame, lastFrame, nFrames):\n #self.firstFrame = firstFrame\n #self.lastFrame = lastFrame\n #self.nframes = nframes\n anim = animation.Animation ([PosKeyFrame (firstFrame, [0,0,0]),\n PosK... |
## Pre-defined animation.
##
##class DefAnimTransRot():
import animation
from keyframe import PosKeyFrame, RotKeyFrame
## FUTURO - Chamar bringObj.py
## * The code bellow is responsable for creating keyframe animation structure to bring an' object near to the user.
def anim_bringObj(firstFrame, lastFrame, nFra... | [
[
1,
0,
0.2353,
0.0588,
0,
0.66,
0,
733,
0,
1,
0,
0,
733,
0,
0
],
[
1,
0,
0.2941,
0.0588,
0,
0.66,
0.5,
391,
0,
2,
0,
0,
391,
0,
0
],
[
2,
0,
0.7647,
0.5294,
0,
0.6... | [
"import animation",
"from keyframe import PosKeyFrame, RotKeyFrame",
"def anim_bringObj(firstFrame, lastFrame, nFrames):\n #self.firstFrame = firstFrame\n #self.lastFrame = lastFrame\n #self.nframes = nframes\n anim = animation.Animation([PosKeyFrame(firstFrame, [0, 0, 0]),\n ... |
# -*- coding: utf-8 -*-
## This code is responsable for creating keyframe animation structure.
## Master Research: Elisabete Thomaselli Nogueira
## Professor: Claudio Esperanca
## Graduate Student: Victor Soares Bursztyn
## Created in: 13-03-08
## Last updated in:
class KeyFrame:
... | [
[
3,
0,
0.2553,
0.1915,
0,
0.66,
0,
699,
0,
1,
0,
0,
0,
0,
0
],
[
8,
1,
0.1915,
0.0213,
1,
0.93,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
1,
0.2128,
0.0213,
1,
0.93,
... | [
"class KeyFrame:\n \"\"\"Represents a key frame item in an animation.\"\"\"\n frameno = 0\n translation=(0.0,0.0,0.0)\n rotation=(0.0,0.0,1.0,0.0)\n scale=(1.0,1.0,1.0)\n def __init__(self, frameno):\n \"\"\"Constructor.\"\"\"",
" \"\"\"Represents a key frame item in an animation.\"\"\... |
# -*- coding: utf-8 -*-
## This code is responsable for creating keyframe animation structure.
## Master Research: Elisabete Thomaselli Nogueira
## Professor: Claudio Esperanca
## Graduate Student: Victor Soares Bursztyn
## Created in: 13-02-08
## Last updated in:
from scipy import *
... | [
[
1,
0,
0.069,
0.0086,
0,
0.66,
0,
265,
0,
1,
0,
0,
265,
0,
0
],
[
1,
0,
0.0776,
0.0086,
0,
0.66,
0.5,
391,
0,
1,
0,
0,
391,
0,
0
],
[
3,
0,
0.5388,
0.8966,
0,
0.66... | [
"from scipy import *",
"from keyframe import *",
"class Animation:\n \"\"\"Represents keyframed animations of 3d objects.\"\"\"\n def __init__(self, keys):\n \"\"\"Constructor.\n @param keys: a list of objects of type keyframe.\"\"\"\n self.keys = keys[:]\n self.keys.sort(cmp=l... |
class c:
def __init__(self):
self.a = 1
def geta (self) : return self.a
def seta (self,val) : self.a = val
class d:
def __init__(self,getter,setter):
self.getter = getter
self.setter = setter
def update (self):
self.setter (self.getter()+1)
c0=c()
d0=d(c0.g... | [
[
3,
0,
0.1579,
0.2632,
0,
0.66,
0,
411,
0,
3,
0,
0,
0,
0,
0
],
[
2,
1,
0.1316,
0.1053,
1,
0.56,
0,
555,
0,
1,
0,
0,
0,
0,
0
],
[
14,
2,
0.1579,
0.0526,
2,
0.96,
... | [
"class c:\n def __init__(self):\n self.a = 1\n def geta (self) : return self.a\n def seta (self,val) : self.a = val",
" def __init__(self):\n self.a = 1",
" self.a = 1",
" def geta (self) : return self.a",
" def geta (self) : return self.a",
" def seta (self,val) ... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'interfAnim_sem_Delay_sem_Graph.ui'
#
# Created: Fri May 02 01:04:07 2008
# by: PyQt4 UI code generator 4.1.1
#
# WARNING! All changes made in this file will be lost!
import sys
from PyQt4 import QtCore, QtGui
class Ui_Dial... | [
[
1,
0,
0.098,
0.0098,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1078,
0.0098,
0,
0.66,
0.5,
154,
0,
2,
0,
0,
154,
0,
0
],
[
3,
0,
0.5588,
0.8725,
0,
0.66... | [
"import sys",
"from PyQt4 import QtCore, QtGui",
"class Ui_Dialog_Anim(object):\n def setupUi(self, Dialog_Anim):\n Dialog_Anim.setObjectName(\"Dialog_Anim\")\n Dialog_Anim.resize(QtCore.QSize(QtCore.QRect(0,0,285,234).size()).expandedTo(Dialog_Anim.minimumSizeHint()))\n\n self.label_Ani... |
# -*- coding: utf-8 -*-
## This code is responsable for creating keyframe animation structure.
## Master Research: Elisabete Thomaselli Nogueira
## Professor: Claudio Esperanca
## Graduate Student: Victor Soares Bursztyn
## Created in: 13-03-08
## Last updated in:
## Rotine responsable for imp... | [
[
1,
0,
0.4545,
0.0455,
0,
0.66,
0,
613,
0,
1,
0,
0,
613,
0,
0
],
[
1,
0,
0.5,
0.0455,
0,
0.66,
0.1667,
622,
0,
1,
0,
0,
622,
0,
0
],
[
1,
0,
0.5455,
0.0455,
0,
0.6... | [
"import anim_TransRot ## Translate and Rotate selected object after a while.",
"import anim_bringObj ## Bring selected object to front.",
"import anim_topRight ## Move selected object to the top right corner.",
"from animation import * # ou import animation?",
"from keyframe... |
## Pre-defined animation.
##
##class DefAnimTransRot():
import animation
from keyframe import PosKeyFrame, RotKeyFrame
def anim_TransRot(firstFrame, lastFrame, nFrames):
#self.firstFrame = firstFrame
#self.lastFrame = lastFrame
#self.nframes = nframes
anim = animation.Animation ([PosKeyFrame ... | [
[
1,
0,
0.2222,
0.0556,
0,
0.66,
0,
733,
0,
1,
0,
0,
733,
0,
0
],
[
1,
0,
0.2778,
0.0556,
0,
0.66,
0.5,
391,
0,
2,
0,
0,
391,
0,
0
],
[
2,
0,
0.6944,
0.6667,
0,
0.6... | [
"import animation",
"from keyframe import PosKeyFrame, RotKeyFrame",
"def anim_TransRot(firstFrame, lastFrame, nFrames):\n #self.firstFrame = firstFrame\n #self.lastFrame = lastFrame\n #self.nframes = nframes\n anim = animation.Animation ([PosKeyFrame (firstFrame, [0,0,0]),\n ... |
# -*- coding: utf-8 -*-
## This code is responsable for creating keyframe animation structure.
## Master Research: Elisabete Thomaselli Nogueira
## Professor: Claudio Esperanca
## Graduate Student: Victor Soares Bursztyn
## Created in: 13-03-08
## Last updated in:
## Rotine responsab... | [
[
1,
0,
0.5882,
0.0588,
0,
0.66,
0,
613,
0,
1,
0,
0,
613,
0,
0
],
[
1,
0,
0.6471,
0.0588,
0,
0.66,
0.3333,
622,
0,
1,
0,
0,
622,
0,
0
],
[
1,
0,
0.7059,
0.0588,
0,
... | [
"import anim_TransRot ## Translate and Rotate selected object after a while.",
"import anim_bringObj ## Bring selected object to front.",
"import anim_topRight ## Move selected object to the top right corner.",
"print(\"animacoes importadas\")"
] |
#!/usr/bin/env python
"""extremely simple demonstration playing a soundfile
and waiting for it to finish. you'll need the pygame.mixer
module for this to work. Note how in this simple example we
don't even bother loading all of the pygame package. Just
pick the mixer for sound and time for the delay function."""... | [
[
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.0909,
79,
0,
1,
0,
0,
79,
0,
0
],
[
1,
0,
0.2778,
0.0278,
0,
0.66,
... | [
"\"\"\"extremely simple demonstration playing a soundfile\nand waiting for it to finish. you'll need the pygame.mixer\nmodule for this to work. Note how in this simple example we\ndon't even bother loading all of the pygame package. Just\npick the mixer for sound and time for the delay function.\"\"\"",
"import o... |
#!/usr/bin/env python
"""extremely simple demonstration playing a soundfile
and waiting for it to finish. you'll need the pygame.mixer
module for this to work. Note how in this simple example we
don't even bother loading all of the pygame package. Just
pick the mixer for sound and time for the delay function."""... | [
[
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.2,
79,
0,
1,
0,
0,
79,
0,
0
],
[
1,
0,
0.2778,
0.0278,
0,
0.66,
0... | [
"\"\"\"extremely simple demonstration playing a soundfile\nand waiting for it to finish. you'll need the pygame.mixer\nmodule for this to work. Note how in this simple example we\ndon't even bother loading all of the pygame package. Just\npick the mixer for sound and time for the delay function.\"\"\"",
"import o... |
#!/usr/bin/env python
"""extremely simple demonstration playing a soundfile
and waiting for it to finish. you'll need the pygame.mixer
module for this to work. Note how in this simple example we
don't even bother loading all of the pygame package. Just
pick the mixer for sound and time for the delay function."""... | [
[
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.0909,
79,
0,
1,
0,
0,
79,
0,
0
],
[
1,
0,
0.2778,
0.0278,
0,
0.66,
... | [
"\"\"\"extremely simple demonstration playing a soundfile\nand waiting for it to finish. you'll need the pygame.mixer\nmodule for this to work. Note how in this simple example we\ndon't even bother loading all of the pygame package. Just\npick the mixer for sound and time for the delay function.\"\"\"",
"import o... |
#!/usr/bin/env python
"""extremely simple demonstration playing a soundfile
and waiting for it to finish. you'll need the pygame.mixer
module for this to work. Note how in this simple example we
don't even bother loading all of the pygame package. Just
pick the mixer for sound and time for the delay function."""... | [
[
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.2,
79,
0,
1,
0,
0,
79,
0,
0
],
[
1,
0,
0.2778,
0.0278,
0,
0.66,
0... | [
"\"\"\"extremely simple demonstration playing a soundfile\nand waiting for it to finish. you'll need the pygame.mixer\nmodule for this to work. Note how in this simple example we\ndon't even bother loading all of the pygame package. Just\npick the mixer for sound and time for the delay function.\"\"\"",
"import o... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'interfQtPrototipo.ui'
#
# Created: Tue Apr 15 21:47:42 2008
# by: PyQt4 UI code generator 4.1.1
#
# WARNING! All changes made in this file will be lost!
import sys
from PyQt4 import QtCore, QtGui
class Ui_MainWindow(object... | [
[
1,
0,
0.0151,
0.0015,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0166,
0.0015,
0,
0.66,
0.3333,
154,
0,
2,
0,
0,
154,
0,
0
],
[
3,
0,
0.5053,
0.9729,
0,
... | [
"import sys",
"from PyQt4 import QtCore, QtGui",
"class Ui_MainWindow(object):\n\n ## __side - o anderscore duplo e' um recurso para tornar o atributo privado.\n #def __init__(self, MainWindow):\n #self.__side = side\n\n def setupUi(self, MainWindow):\n MainWindow.setObjectName(\"MainWindow\"... |
import scene.vector as vector
from math import *
__all__ = ["ArcBall"]
class ArcBall(object):
"""Implements an arcball manipulator for specifying rotations."""
def __init__(self, center, radius):
"""Creates a new arcball manipulator.
@param center: Triple of coordinates of center point ... | [
[
1,
0,
0.0085,
0.0085,
0,
0.66,
0,
441,
0,
1,
0,
0,
441,
0,
0
],
[
1,
0,
0.0171,
0.0085,
0,
0.66,
0.25,
526,
0,
1,
0,
0,
526,
0,
0
],
[
14,
0,
0.0342,
0.0085,
0,
0... | [
"import scene.vector as vector",
"from math import *",
"__all__ = [\"ArcBall\"]",
"class ArcBall(object):\n \"\"\"Implements an arcball manipulator for specifying rotations.\"\"\"\n \n def __init__(self, center, radius):\n \"\"\"Creates a new arcball manipulator. \n @param center: Tripl... |
# -*- coding: utf-8 -*-
## ****************************************************************** PROTOTIPO.PY
## * Description:
## * 3DbyStep main window calls.
## * The code bellow is very simplistic. It only shows a small window.
## *******************************************************************************
## * Cre... | [
[
1,
0,
0.359,
0.0256,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.3846,
0.0256,
0,
0.66,
0.25,
154,
0,
1,
0,
0,
154,
0,
0
],
[
1,
0,
0.4359,
0.0256,
0,
0.6... | [
"import sys",
"from PyQt4 import QtGui",
"from interfBehavior import myMainBehavior",
"class Prototype:\n def __init__(self):\n \"\"\"\n Constructor\n \"\"\"\n if __name__ == \"__main__\":\n \n ## Every PyQt4 application must create an application object.",... |
# -*- coding: utf-8 -*-
## ************************************************************* INTERFBEHAVIOR.PY
## * Description:
## * This code is responsable for treat application buttons Behaviors.
## * (events, routines and classes) that exist in the glwidget canvas.
## **************************************************... | [
[
1,
0,
0.0256,
0.002,
0,
0.66,
0,
821,
0,
1,
0,
0,
821,
0,
0
],
[
1,
0,
0.0276,
0.002,
0,
0.66,
0.0909,
760,
0,
1,
0,
0,
760,
0,
0
],
[
1,
0,
0.0295,
0.002,
0,
0.6... | [
"from interfPrototipo import * ## Main interface Layout to Prototype",
"from interfTextDoc import * ## Interface Layout to Documentation Window",
"from animations import * ## Animation needs",
"import sound ## Pygame wave sound player",
"from PyQt4 import *",
... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'interfTextDoc.ui'
#
# Created: Tue May 6 08:09:59 2008
# by: PyQt4 UI code generator 4.3.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_Dialog_Doc(object):
def setupUi(self, Di... | [
[
1,
0,
0.1493,
0.0149,
0,
0.66,
0,
154,
0,
2,
0,
0,
154,
0,
0
],
[
3,
0,
0.5821,
0.8209,
0,
0.66,
1,
367,
0,
2,
0,
0,
186,
0,
69
],
[
2,
1,
0.5224,
0.6716,
1,
0.85... | [
"from PyQt4 import QtCore, QtGui",
"class Ui_Dialog_Doc(object):\n def setupUi(self, Dialog_Doc):\n Dialog_Doc.setObjectName(\"Dialog_Doc\")\n Dialog_Doc.resize(QtCore.QSize(QtCore.QRect(0,0,391,425).size()).expandedTo(Dialog_Doc.minimumSizeHint()))\n\n self.textDocEdit = QtGui.QTextEdit(D... |
# -*- coding: utf-8 -*-
## This code is responsable for creating visual element structures to support other 3DbyStep routines.
## dispose a group of interations inside these environment.
## Master Research: Elisabete Thomaselli Nogueira
## Professor: Claudio Esperanca
## Graduate student: V... | [
[
14,
0,
0.0189,
0.0015,
0,
0.66,
0,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.0218,
0.0015,
0,
0.66,
0.1,
280,
0,
1,
0,
0,
280,
0,
0
],
[
1,
0,
0.0233,
0.0015,
0,
0.66... | [
"__all__=[\"EditableVisualElement\", \"visualElement\"]",
"from OpenGL.GL import *",
"from OpenGL.GLU import *",
"from math import sin, cos",
"from numpy import array, dot",
"from scene import *",
"from bbox import *",
"class EditableVisualElement:\n \"Base class for graphic objects.\"\n\n tx, t... |
"""
Implementation of a very simple set of classes for representing objects in a
given scene. Most of the attributes and properties model OpenGL primitives and
state variables, so that their meaning is mostly self-documenting. The idea here
is that objects may be passed around or maybe stored (using pickle or something... | [
[
8,
0,
0.006,
0.0104,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0149,
0.0015,
0,
0.66,
0.0769,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.0179,
0.0015,
0,
0.66,
... | [
"\"\"\"\nImplementation of a very simple set of classes for representing objects in a\ngiven scene. Most of the attributes and properties model OpenGL primitives and\nstate variables, so that their meaning is mostly self-documenting. The idea here\nis that objects may be passed around or maybe stored (using pickle ... |
__all__=["Cube"]
from mesh import Mesh
import vector
from bbox import *
class Cube(Mesh):
"""A Cube of side length 2 centered at the origin."""
face = [[3, 2, 1, 0], [7, 6, 2, 3], [4, 5, 6, 7],
[0, 1, 5, 4], [1, 2, 6, 5], [3, 0, 4, 7] ]
vertex = [[-1, -1,1],[-1, -1,-1], [-1,1,-1], [-1,1,1],
... | [
[
14,
0,
0.0294,
0.0294,
0,
0.66,
0,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.0588,
0.0294,
0,
0.66,
0.2,
975,
0,
1,
0,
0,
975,
0,
0
],
[
1,
0,
0.0882,
0.0294,
0,
0.66... | [
"__all__=[\"Cube\"]",
"from mesh import Mesh",
"import vector",
"from bbox import *",
"class Cube(Mesh):\n \"\"\"A Cube of side length 2 centered at the origin.\"\"\"\n face = [[3, 2, 1, 0], [7, 6, 2, 3], [4, 5, 6, 7],\n [0, 1, 5, 4], [1, 2, 6, 5], [3, 0, 4, 7] ]\n vertex = [[-1, -1,1],[... |
__all__=["Sphere"]
from OpenGL.GL import *
from OpenGL.GLU import *
from graphicobject import *
from bbox import *
class Sphere(GraphicObject):
"A Sphere of a given radius."
def __init__(self,radius=1, material=None, transformation=None):
"""Constructor.
@param radius: sphere radius.
... | [
[
14,
0,
0.0294,
0.0294,
0,
0.66,
0,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.0882,
0.0294,
0,
0.66,
0.1667,
280,
0,
1,
0,
0,
280,
0,
0
],
[
1,
0,
0.1176,
0.0294,
0,
0... | [
"__all__=[\"Sphere\"]",
"from OpenGL.GL import *",
"from OpenGL.GLU import *",
"from graphicobject import *",
"from bbox import *",
"class Sphere(GraphicObject):\n \"A Sphere of a given radius.\"\n\n def __init__(self,radius=1, material=None, transformation=None):\n \"\"\"Constructor.\n ... |
"""
Various mesh loaders. Each function receives a filename which points to
a file in some format and returns a Mesh object.
"""
__all__=["loadoff"]
from graphicobject import *
from mesh import *
def loadoff (filename,invertCirculations=False):
"""Reads an off file and returns a corresponding Mesh object.
@p... | [
[
8,
0,
0.0595,
0.0952,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.119,
0.0238,
0,
0.66,
0.2,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.1667,
0.0238,
0,
0.66,
... | [
"\"\"\"\nVarious mesh loaders. Each function receives a filename which points to \na file in some format and returns a Mesh object.\n\"\"\"",
"__all__=[\"loadoff\"]",
"from graphicobject import *",
"from mesh import *",
"def loadoff (filename,invertCirculations=False):\n \"\"\"Reads an off file and retur... |
"""
Light sources.
"""
__all__ = ["Light"]
from OpenGL.GL import *
from graphicobject import *
# Some globals
defaultLightAmbient = (0,0,0,1)
defaultLightDiffuse = (1,1,1,1)
defaultLightSpecular = (1,1,1,1)
defaultLightPosition = (0,0,1,0)
class Light(object):
"Represents a positional or directional light source... | [
[
8,
0,
0.0351,
0.0526,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0702,
0.0175,
0,
0.66,
0.1111,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.1053,
0.0175,
0,
0.66,... | [
"\"\"\"\nLight sources.\n\"\"\"",
"__all__ = [\"Light\"]",
"from OpenGL.GL import *",
"from graphicobject import *",
"defaultLightAmbient = (0,0,0,1)",
"defaultLightDiffuse = (1,1,1,1)",
"defaultLightSpecular = (1,1,1,1)",
"defaultLightPosition = (0,0,1,0)",
"class Light(object):\n \"Represents a... |
from math import sqrt
def sub(v1,v2):
"""Difference of two vectors.
@param v1: first vector
@param v2: second vector
@return: v1 - v2
"""
return [a-b for a,b in zip(v1,v2)]
def add(v1,v2):
"""Sum of two vectors.
@param v1: first vector
@param v2: second vector
@return: v1 - ... | [
[
1,
0,
0.0137,
0.0137,
0,
0.66,
0,
526,
0,
1,
0,
0,
526,
0,
0
],
[
2,
0,
0.0822,
0.0959,
0,
0.66,
0.1111,
819,
0,
2,
1,
0,
0,
0,
1
],
[
8,
1,
0.0822,
0.0685,
1,
0.... | [
"from math import sqrt",
"def sub(v1,v2): \n \"\"\"Difference of two vectors.\n @param v1: first vector\n @param v2: second vector\n @return: v1 - v2\n \"\"\"\n return [a-b for a,b in zip(v1,v2)]",
" \"\"\"Difference of two vectors.\n @param v1: first vector\n @param v2: second vector... |
__all__ = ["Mesh"]
from graphicobject import *
from halfedge import *
from OpenGL.GL import *
from bbox import *
from math import sqrt
class Mesh(GraphicObject):
"A Mesh object"
def __init__(self,face=[],vertex=[],
drawmode="fill",normalmode="face",
material=None,transfo... | [
[
14,
0,
0.0069,
0.0069,
0,
0.66,
0,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.0208,
0.0069,
0,
0.66,
0.1429,
24,
0,
1,
0,
0,
24,
0,
0
],
[
1,
0,
0.0278,
0.0069,
0,
0.6... | [
"__all__ = [\"Mesh\"]",
"from graphicobject import *",
"from halfedge import *",
"from OpenGL.GL import *",
"from bbox import *",
"from math import sqrt",
"class Mesh(GraphicObject):\n \"A Mesh object\"\n \n def __init__(self,face=[],vertex=[],\n drawmode=\"fill\",normalmode=\"f... |
__all__=["HandleBox"]
from OpenGL.GL import *
from OpenGL.GLU import *
from graphicobject import *
class HandleBox(GraphicObject):
"""This object is to be used as a manipulator for other graphicobjects.
The idea is that each handlebox object is attached to some other object.
Altering the transformation o... | [
[
14,
0,
0.0149,
0.0149,
0,
0.66,
0,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.0448,
0.0149,
0,
0.66,
0.25,
280,
0,
1,
0,
0,
280,
0,
0
],
[
1,
0,
0.0597,
0.0149,
0,
0.6... | [
"__all__=[\"HandleBox\"]",
"from OpenGL.GL import *",
"from OpenGL.GLU import *",
"from graphicobject import *",
"class HandleBox(GraphicObject):\n \"\"\"This object is to be used as a manipulator for other graphicobjects. \n The idea is that each handlebox object is attached to some other object.\n ... |
"""Several matrix utilities."""
import vector
from math import *
def cofactor(m,irow,icol):
"""Returns the cofactor icol,irow of matrix m."""
def minor():
"""Returns a minor matrix of m, where row irow and col icol were removed."""
return [row[:icol]+row[icol+1:] for row in m[:irow]+m[irow+1:]... | [
[
8,
0,
0.0058,
0.0058,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0175,
0.0058,
0,
0.66,
0.0435,
347,
0,
1,
0,
0,
347,
0,
0
],
[
1,
0,
0.0234,
0.0058,
0,
0.66... | [
"\"\"\"Several matrix utilities.\"\"\"",
"import vector",
"from math import *",
"def cofactor(m,irow,icol):\n \"\"\"Returns the cofactor icol,irow of matrix m.\"\"\"\n def minor():\n \"\"\"Returns a minor matrix of m, where row irow and col icol were removed.\"\"\"\n return [row[:icol]+row... |
from EditableVisualElement import EditableVisualElement, visualElement
from graphicobject import GraphicObject, GraphicObjectCollection
from cube import Cube
from sphere import Sphere
from material import Material
from mesh import Mesh
from halfedge import Halfedge,HalfedgeDS
from light import Light
from bbox import Bo... | [
[
1,
0,
0.0833,
0.0833,
0,
0.66,
0,
945,
0,
2,
0,
0,
945,
0,
0
],
[
1,
0,
0.1667,
0.0833,
0,
0.66,
0.0909,
24,
0,
2,
0,
0,
24,
0,
0
],
[
1,
0,
0.25,
0.0833,
0,
0.66... | [
"from EditableVisualElement import EditableVisualElement, visualElement",
"from graphicobject import GraphicObject, GraphicObjectCollection",
"from cube import Cube",
"from sphere import Sphere",
"from material import Material",
"from mesh import Mesh",
"from halfedge import Halfedge,HalfedgeDS",
"fro... |
"""
An implementation of the halfedge data structure, sometimes known as the
*DCEL* (double connected edge list). It is capable of storing the topology of
(planar?) graphs, which makes it very useful for handling polyedra, for instance.
"""
__all__=["Halfedge","HalfedgeDS"]
from managedlist import ManagedList
cl... | [
[
8,
0,
0.0086,
0.0144,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0201,
0.0029,
0,
0.66,
0.2,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.0259,
0.0029,
0,
0.66,
... | [
"\"\"\"\nAn implementation of the halfedge data structure, sometimes known as the \n*DCEL* (double connected edge list). It is capable of storing the topology of\n(planar?) graphs, which makes it very useful for handling polyedra, for instance.\n\"\"\"",
"__all__=[\"Halfedge\",\"HalfedgeDS\"]",
"from managedlis... |
"""
Stuff to do with bounding boxes.
"""
__all__ = ["BoundingBox"]
from OpenGL.GL import *
from math import *
import matrix
class BoundingBox(object):
"""A Bounding Box. Used to approximate the locus of a graphic object."""
def __init__ (self, center=(0,0,0), side=(0,0,0)):
"""Constructor
@pa... | [
[
8,
0,
0.0222,
0.0333,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0444,
0.0111,
0,
0.66,
0.1667,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.0667,
0.0111,
0,
0.66,... | [
"\"\"\"\nStuff to do with bounding boxes.\n\"\"\"",
"__all__ = [\"BoundingBox\"]",
"from OpenGL.GL import *",
"from math import *",
"import matrix",
"class BoundingBox(object):\n \"\"\"A Bounding Box. Used to approximate the locus of a graphic object.\"\"\"\n\n def __init__ (self, center=(0,0,0), si... |
"""
Implementation of a very simple set of classes for representing objects in a
given scene. Most of the attributes and properties model OpenGL primitives and
state variables, so that their meaning is mostly self-documenting. The idea here
is that objects may be passed around or maybe stored (using pickle or somethin... | [
[
8,
0,
0.0183,
0.032,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0411,
0.0046,
0,
0.66,
0.1111,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.0502,
0.0046,
0,
0.66,
... | [
"\"\"\"\nImplementation of a very simple set of classes for representing objects in a \ngiven scene. Most of the attributes and properties model OpenGL primitives and\nstate variables, so that their meaning is mostly self-documenting. The idea here\nis that objects may be passed around or maybe stored (using pickle... |
"""
Implementation of a list with stable index positions.
"""
class ManagedList(list):
"""This is a list where index positions are stable, i.e, whenever an element
is removed (with del), the array is not shrunk, but rather, the position is
marked as free. On the other hand, rather than appending, one may i... | [
[
8,
0,
0.0364,
0.0545,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
3,
0,
0.4,
0.6364,
0,
0.66,
0.5,
659,
0,
5,
0,
0,
430,
0,
10
],
[
8,
1,
0.1364,
0.0727,
1,
0.88,
... | [
"\"\"\"\nImplementation of a list with stable index positions.\n\"\"\"",
"class ManagedList(list):\n \"\"\"This is a list where index positions are stable, i.e, whenever an element\n is removed (with del), the array is not shrunk, but rather, the position is\n marked as free. On the other hand, rather th... |
"""
Material properties of objects.
"""
__all__=["Material"]
from OpenGL.GL import *
defaultMaterialDiffuse = (0.8, 0.8, 0.8, 1.0)
defaultMaterialAmbient = (0.2, 0.2, 0.2, 1.0)
defaultMaterialSpecular = (0,0,0,1)
defaultMaterialEmission = (0,0,0,1)
defaultMaterialShininess = 0
class Material(object):
"A Material... | [
[
8,
0,
0.0408,
0.0612,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0816,
0.0204,
0,
0.66,
0.1111,
272,
0,
0,
0,
0,
0,
5,
0
],
[
1,
0,
0.1224,
0.0204,
0,
0.66,... | [
"\"\"\"\nMaterial properties of objects.\n\"\"\"",
"__all__=[\"Material\"]",
"from OpenGL.GL import *",
"defaultMaterialDiffuse = (0.8, 0.8, 0.8, 1.0)",
"defaultMaterialAmbient = (0.2, 0.2, 0.2, 1.0)",
"defaultMaterialSpecular = (0,0,0,1)",
"defaultMaterialEmission = (0,0,0,1)",
"defaultMaterialShinin... |
import wx
from wx import glcanvas
from OpenGL.GLUT import *
from OpenGL.GLU import *
from OpenGL.GL import *
import sys,math
name = 'ball_glut'
class myGLCanvas(glcanvas.GLCanvas):
def __init__(self, parent):
#wx.EvtHandler.__init__(self)
glcanvas.GLCanvas.__init__(self, parent,-1)
wx.EVT_... | [
[
1,
0,
0.0114,
0.0114,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.0227,
0.0114,
0,
0.66,
0.1111,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.0341,
0.0114,
0,
... | [
"import wx",
"from wx import glcanvas",
"from OpenGL.GLUT import *",
"from OpenGL.GLU import *",
"from OpenGL.GL import *",
"import sys,math",
"name = 'ball_glut'",
"class myGLCanvas(glcanvas.GLCanvas):\n def __init__(self, parent):\n #wx.EvtHandler.__init__(self)\n glcanvas.GLCanvas.... |
class CanvasSettings:
nearZ = 1.0
farZ = 1000.0
fov = 40.0
class Settings:
canvas = CanvasSettings()
settings = Settings()
| [
[
3,
0,
0.25,
0.4,
0,
0.66,
0,
682,
0,
0,
0,
0,
0,
0,
0
],
[
14,
1,
0.2,
0.1,
1,
0.42,
0,
775,
1,
0,
0,
0,
0,
2,
0
],
[
14,
1,
0.3,
0.1,
1,
0.42,
0.5,
431,
... | [
"class CanvasSettings:\n nearZ = 1.0\n farZ = 1000.0\n fov = 40.0",
" nearZ = 1.0",
" farZ = 1000.0",
" fov = 40.0",
"class Settings:\n canvas = CanvasSettings()",
" canvas = CanvasSettings()",
"settings = Settings()"
] |
class ObjectRegistry(object):
def __init__(self):
self.oidGObjectmap = {}
self.count = 0
def register(self, gobject):
self.count += 1
self.oidGObjectmap[self.count] = gobject
return self.count
def getGObject(self, oid):
return self.oidGObjectmap.get... | [
[
3,
0,
0.5,
0.8,
0,
0.66,
0,
610,
0,
3,
0,
0,
186,
0,
1
],
[
2,
1,
0.2667,
0.2,
1,
0.66,
0,
555,
0,
1,
0,
0,
0,
0,
0
],
[
14,
2,
0.2667,
0.0667,
2,
0.86,
0,
... | [
"class ObjectRegistry(object):\n def __init__(self):\n self.oidGObjectmap = {}\n self.count = 0\n \n def register(self, gobject):\n self.count += 1\n self.oidGObjectmap[self.count] = gobject",
" def __init__(self):\n self.oidGObjectmap = {}\n self.count = 0",
... |
import logging
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
#The background is set with 40 plus the number of the color, and the foreground with 30
#These are the sequences need to get colored ouput
RESET_SEQ = "\033[0m"
COLOR_SEQ = "\033[1;%dm"
BOLD_SEQ = "\033[1m"
def formatter_message(messag... | [
[
1,
0,
0.0159,
0.0159,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
14,
0,
0.0476,
0.0159,
0,
0.66,
0.0833,
822,
3,
1,
0,
0,
816,
10,
1
],
[
14,
0,
0.127,
0.0159,
0,
... | [
"import logging",
"BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)",
"RESET_SEQ = \"\\033[0m\"",
"COLOR_SEQ = \"\\033[1;%dm\"",
"BOLD_SEQ = \"\\033[1m\"",
"def formatter_message(message, use_color = True):\n if use_color:\n message = message.replace(\"$RESET\", RESET_SEQ).repla... |
from math import sin, cos, sqrt, atan2
dotp = lambda u, v: sum([u[i]*v[i] for i in range(3)])
scalarp = lambda s, v: tuple([s*v[i] for i in range(3)])
vsum = lambda u, v: tuple([u[i] + v[i] for i in range(3)])
vdiff = lambda u, v: tuple([u[i] - v[i] for i in range(3)])
mag = lambda v: sqrt(sum([v[i]*v[i... | [
[
1,
0,
0.0233,
0.0233,
0,
0.66,
0,
526,
0,
4,
0,
0,
526,
0,
0
],
[
14,
0,
0.0698,
0.0233,
0,
0.66,
0.0833,
436,
9,
0,
0,
0,
0,
0,
2
],
[
14,
0,
0.093,
0.0233,
0,
0... | [
"from math import sin, cos, sqrt, atan2",
"dotp = lambda u, v: sum([u[i]*v[i] for i in range(3)])",
"scalarp = lambda s, v: tuple([s*v[i] for i in range(3)])",
"vsum = lambda u, v: tuple([u[i] + v[i] for i in range(3)])",
"vdiff = lambda u, v: tuple([u[i] - v[i] for i in range(3)])",
"mag = la... |
from time import time
class TimeStat(object):
def __init__(self):
self.tsdata = {}
def __call__(self, func, name=None):
name = func.__name__ if not name else name
self.tsdata[name] = (0, 0, 0, 0)
def wrapper(*args, **kw):
ts = time()
t... | [
[
1,
0,
0.0435,
0.0217,
0,
0.66,
0,
654,
0,
1,
0,
0,
654,
0,
0
],
[
3,
0,
0.5217,
0.8913,
0,
0.66,
0.5,
122,
0,
4,
0,
0,
186,
0,
13
],
[
2,
1,
0.1196,
0.0435,
1,
0.... | [
"from time import time",
"class TimeStat(object):\n def __init__(self):\n self.tsdata = {}\n \n def __call__(self, func, name=None):\n name = func.__name__ if not name else name\n self.tsdata[name] = (0, 0, 0, 0)\n def wrapper(*args, **kw):",
" def __init__(... |
import FTGL
import os
from logger import log
class Fonts(object):
def __init__(self):
self.fontRef = {}
self.uiFonts = []
def __call__(self, fontfilename, fonttype, size):
f = self.fontRef.get((fontfilename, fonttype, size), None)
if f:
ret... | [
[
1,
0,
0.0278,
0.0278,
0,
0.66,
0,
122,
0,
1,
0,
0,
122,
0,
0
],
[
1,
0,
0.0556,
0.0278,
0,
0.66,
0.1429,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.1111,
0.0278,
0,
... | [
"import FTGL",
"import os",
"from logger import log",
"class Fonts(object):\n def __init__(self):\n self.fontRef = {}\n self.uiFonts = []\n \n def __call__(self, fontfilename, fonttype, size):\n f = self.fontRef.get((fontfilename, fonttype, size), None)\n ... |
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
from random import random, randint
from gobjects import Sphere, GObject, Tetrahedron, \
Cylinder, Scene, Arrow
from fonts ... | [
[
1,
0,
0.0055,
0.0055,
0,
0.66,
0,
280,
0,
1,
0,
0,
280,
0,
0
],
[
1,
0,
0.011,
0.0055,
0,
0.66,
0.1,
26,
0,
1,
0,
0,
26,
0,
0
],
[
1,
0,
0.0166,
0.0055,
0,
0.66,
... | [
"from OpenGL.GL import *",
"from OpenGL.GLU import *",
"from OpenGL.GLUT import *",
"from random import random, randint",
"from gobjects import Sphere, GObject, Tetrahedron, \\\n Cylinder, Scene, Arrow"... |
#!/usr/bin/python
import sys
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
import FTGL
fonts = []
width = 600
height = 600
def do_ortho():
w, h = width, height
glViewport(0, 0, w, h)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
size = max(w, h) / 2.0
aspect = fl... | [
[
1,
0,
0.0211,
0.007,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0352,
0.007,
0,
0.66,
0.0769,
280,
0,
1,
0,
0,
280,
0,
0
],
[
1,
0,
0.0423,
0.007,
0,
0.6... | [
"import sys",
"from OpenGL.GL import *",
"from OpenGL.GLU import *",
"from OpenGL.GLUT import *",
"import FTGL",
"fonts = []",
"width = 600",
"height = 600",
"def do_ortho():\n w, h = width, height\n glViewport(0, 0, w, h)\n glMatrixMode(GL_PROJECTION)\n glLoadIdentity()\n size = max(... |
COLOR_GREY = (0.6, 0.6, 0.6, 1.0)
COLOR_BLACK = (0.0, 0.0, 0.0, 1.0)
COLOR_WHITE = (1.0, 1.0, 1.0, 1.0)
GEN_GREY = lambda x: (x, x, x, 1.0)
| [
[
14,
0,
0.25,
0.25,
0,
0.66,
0,
264,
0,
0,
0,
0,
0,
8,
0
],
[
14,
0,
0.5,
0.25,
0,
0.66,
0.3333,
228,
0,
0,
0,
0,
0,
8,
0
],
[
14,
0,
0.75,
0.25,
0,
0.66,
0.66... | [
"COLOR_GREY = (0.6, 0.6, 0.6, 1.0)",
"COLOR_BLACK = (0.0, 0.0, 0.0, 1.0)",
"COLOR_WHITE = (1.0, 1.0, 1.0, 1.0)",
"GEN_GREY = lambda x: (x, x, x, 1.0)"
] |
#########################################################
##
##
## OpenGl Canvas for drawing stereo 3D images and
## handling mouse and keyboard control
##
##
#########################################################
import wx
import traceback
from OpenGL.GL import *
from OpenGL.GLU import... | [
[
1,
0,
0.0145,
0.0015,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.016,
0.0015,
0,
0.66,
0.04,
423,
0,
1,
0,
0,
423,
0,
0
],
[
1,
0,
0.0203,
0.0015,
0,
0.6... | [
"import wx",
"import traceback",
"from OpenGL.GL import *",
"from OpenGL.GLU import *",
"from OpenGL.GLUT import *",
"from wx.glcanvas import GLCanvas as wxGLCanvas",
"from wx.glcanvas import WX_GL_RGBA, WX_GL_DOUBLEBUFFER",
"from math ... |
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
from math import sin, cos, pi, exp, floor, sqrt, atan2
from logger import log
from timestat import timestat
from vector import dotp, scal... | [
[
1,
0,
0.003,
0.003,
0,
0.66,
0,
280,
0,
1,
0,
0,
280,
0,
0
],
[
1,
0,
0.0059,
0.003,
0,
0.66,
0.0909,
26,
0,
1,
0,
0,
26,
0,
0
],
[
1,
0,
0.0089,
0.003,
0,
0.66,
... | [
"from OpenGL.GL import *",
"from OpenGL.GLU import *",
"from OpenGL.GLUT import *",
"from math import sin, cos, pi, exp, floor, sqrt, atan2",
"from logger import log",
"from timestat import timestat",
"from vector ... |
from gobjects import GObject
from fonts import regularFont
class Text(GObject):
def __init__(self, x=0, y=0, z=0, text='', **kw):
GObject.__init__(self, x, y, z, **kw)
self.text = text
def render(self):
glPushMatrix()
glTranslatef(*self.translation)
... | [
[
1,
0,
0.087,
0.0435,
0,
0.66,
0,
382,
0,
1,
0,
0,
382,
0,
0
],
[
1,
0,
0.1304,
0.0435,
0,
0.66,
0.5,
208,
0,
1,
0,
0,
208,
0,
0
],
[
3,
0,
0.6522,
0.6522,
0,
0.66... | [
"from gobjects import GObject",
"from fonts import regularFont",
"class Text(GObject):\n def __init__(self, x=0, y=0, z=0, text='', **kw):\n GObject.__init__(self, x, y, z, **kw)\n self.text = text\n\n def render(self):\n glPushMatrix()\n glTranslatef(*self.translation)",
... |
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
from colors import COLOR_BLACK, COLOR_GREY, COLOR_WHITE, GEN_GREY
from objectregistry import objectRegistry
from logger import log
from math imp... | [
[
1,
0,
0.0027,
0.0027,
0,
0.66,
0,
280,
0,
1,
0,
0,
280,
0,
0
],
[
1,
0,
0.0053,
0.0027,
0,
0.66,
0.0476,
26,
0,
1,
0,
0,
26,
0,
0
],
[
1,
0,
0.008,
0.0027,
0,
0.6... | [
"from OpenGL.GL import *",
"from OpenGL.GLU import *",
"from OpenGL.GLUT import *",
"from colors import COLOR_BLACK, COLOR_GREY, COLOR_WHITE, GEN_GREY",
"from objectregistry import objectRegistry",
"from logger import log",
... |
#
# Program to find new coordinates when the angle of a point is compressed
# to half original value in the negative z direction
#
import math
def compressAngle(x,y,z):
r = math.sqrt(x*x + y*y + z*z)
zn = - math.sqrt(0.5*(r*(r - z) ))
xn = r*(math.sqrt((1+math.sqrt(1 - x*x/(r*r)))/2))
yn = r*(math.sq... | [
[
1,
0,
0.3889,
0.0556,
0,
0.66,
0,
526,
0,
1,
0,
0,
526,
0,
0
],
[
2,
0,
0.6389,
0.3333,
0,
0.66,
0.5,
230,
0,
3,
1,
0,
0,
0,
6
],
[
14,
1,
0.5556,
0.0556,
1,
0.35... | [
"import math",
"def compressAngle(x,y,z):\n r = math.sqrt(x*x + y*y + z*z)\n zn = - math.sqrt(0.5*(r*(r - z) ))\n xn = r*(math.sqrt((1+math.sqrt(1 - x*x/(r*r)))/2))\n yn = r*(math.sqrt((1+math.sqrt(1 - y*y/(r*r)))/2))\n return xn, yn, zn",
" r = math.sqrt(x*x + y*y + z*z)",
" zn = - math.... |
# Utils (c) 2002, 2004, 2007, 2008 David Turner <david@freetype.org>
#
import string, sys, os, glob
# current output directory
#
output_dir = None
# This function is used to sort the index. It is a simple lexicographical
# sort, except that it places capital letters before lowercase ones.
#
def index_sort( s1, ... | [
[
1,
0,
0.0303,
0.0076,
0,
0.66,
0,
890,
0,
4,
0,
0,
890,
0,
0
],
[
14,
0,
0.0606,
0.0076,
0,
0.66,
0.125,
577,
1,
0,
0,
0,
0,
9,
0
],
[
2,
0,
0.2121,
0.2197,
0,
0.... | [
"import string, sys, os, glob",
"output_dir = None",
"def index_sort( s1, s2 ):\n if not s1:\n return -1\n\n if not s2:\n return 1\n\n l1 = len( s1 )",
" if not s1:\n return -1",
" return -1",
" if not s2:\n return 1",
" return 1",
" l1 = le... |
#!/usr/bin/env python
#
# DocBeauty (c) 2003, 2004, 2008 David Turner <david@freetype.org>
#
# This program is used to beautify the documentation comments used
# in the FreeType 2 public headers.
#
from sources import *
from content import *
from utils import *
import utils
import sys, os, time, string, getopt
... | [
[
1,
0,
0.0796,
0.0088,
0,
0.66,
0,
648,
0,
1,
0,
0,
648,
0,
0
],
[
1,
0,
0.0885,
0.0088,
0,
0.66,
0.1111,
273,
0,
1,
0,
0,
273,
0,
0
],
[
1,
0,
0.0973,
0.0088,
0,
... | [
"from sources import *",
"from content import *",
"from utils import *",
"import utils",
"import sys, os, time, string, getopt",
"content_processor = ContentProcessor()",
"def beautify_block( block ):\n if block.content:\n content_processor.reset()\n\n markups = content_processor.pro... |
#!/usr/bin/env python
#
# DocMaker (c) 2002, 2004, 2008 David Turner <david@freetype.org>
#
# This program is a re-write of the original DocMaker took used
# to generate the API Reference of the FreeType font engine
# by converting in-source comments into structured HTML.
#
# This new version is capable of outputting ... | [
[
1,
0,
0.1509,
0.0094,
0,
0.66,
0,
648,
0,
1,
0,
0,
648,
0,
0
],
[
1,
0,
0.1604,
0.0094,
0,
0.66,
0.1111,
273,
0,
1,
0,
0,
273,
0,
0
],
[
1,
0,
0.1698,
0.0094,
0,
... | [
"from sources import *",
"from content import *",
"from utils import *",
"from formatter import *",
"from tohtml import *",
"import utils",
"import sys, os, time, string, glob, getopt",
"def usage():\n print(\"\\nDocMaker Usage information\\n\")\n print(\" docmaker [options] file1 [... |
#!/usr/bin/env python
#
# DocMaker (c) 2002, 2004, 2008 David Turner <david@freetype.org>
#
# This program is a re-write of the original DocMaker took used
# to generate the API Reference of the FreeType font engine
# by converting in-source comments into structured HTML.
#
# This new version is capable of outputting ... | [
[
1,
0,
0.1509,
0.0094,
0,
0.66,
0,
648,
0,
1,
0,
0,
648,
0,
0
],
[
1,
0,
0.1604,
0.0094,
0,
0.66,
0.1111,
273,
0,
1,
0,
0,
273,
0,
0
],
[
1,
0,
0.1698,
0.0094,
0,
... | [
"from sources import *",
"from content import *",
"from utils import *",
"from formatter import *",
"from tohtml import *",
"import utils",
"import sys, os, time, string, glob, getopt",
"def usage():\n print(\"\\nDocMaker Usage information\\n\")\n print(\" docmaker [options] file1 [... |
# Sources (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009
# David Turner <david@freetype.org>
#
#
# this file contains definitions of classes needed to decompose
# C sources files into a series of multi-line "blocks". There are
# two kinds of blocks:
#
# - normal blocks, which contain source code or ordinary comment... | [
[
1,
0,
0.0634,
0.0029,
0,
0.66,
0,
286,
0,
5,
0,
0,
286,
0,
0
],
[
3,
0,
0.1167,
0.0231,
0,
0.66,
0.05,
659,
0,
1,
0,
0,
0,
0,
3
],
[
2,
1,
0.1196,
0.0173,
1,
0.19... | [
"import fileinput, re, sys, os, string",
"class SourceBlockFormat:\n\n def __init__( self, id, start, column, end ):\n \"\"\"create a block pattern, used to recognize special documentation blocks\"\"\"\n self.id = id\n self.start = re.compile( start, re.VERBOSE )\n self.colum... |
# Formatter (c) 2002, 2004, 2007, 2008 David Turner <david@freetype.org>
#
from sources import *
from content import *
from utils import *
# This is the base Formatter class. Its purpose is to convert
# a content processor's data into specific documents (i.e., table of
# contents, global index, and individual API... | [
[
1,
0,
0.0213,
0.0053,
0,
0.66,
0,
648,
0,
1,
0,
0,
648,
0,
0
],
[
1,
0,
0.0266,
0.0053,
0,
0.66,
0.3333,
273,
0,
1,
0,
0,
273,
0,
0
],
[
1,
0,
0.0319,
0.0053,
0,
... | [
"from sources import *",
"from content import *",
"from utils import *",
"class Formatter:\n\n def __init__( self, processor ):\n self.processor = processor\n self.identifiers = {}\n self.chapters = processor.chapters\n self.sections = processor.sections.values()\n ... |
# Content (c) 2002, 2004, 2006, 2007, 2008, 2009
# David Turner <david@freetype.org>
#
# This file contains routines used to parse the content of documentation
# comment blocks and build more structured objects out of them.
#
from sources import *
from utils import *
import string, re
# this regular expression... | [
[
1,
0,
0.0137,
0.0017,
0,
0.66,
0,
648,
0,
1,
0,
0,
648,
0,
0
],
[
1,
0,
0.0154,
0.0017,
0,
0.66,
0.0667,
970,
0,
1,
0,
0,
970,
0,
0
],
[
1,
0,
0.0171,
0.0017,
0,
... | [
"from sources import *",
"from utils import *",
"import string, re",
"re_code_start = re.compile( r\"(\\s*){\\s*$\" )",
"re_code_end = re.compile( r\"(\\s*)}\\s*$\" )",
"re_identifier = re.compile( r'(\\w*)' )",
"re_header_macro = re.compile( r'^#define\\s{1,}(\\w{1,}_H)\\s{1,}<(.*)>' )",
"class Do... |
#!/usr/bin/env python
#
# DocBeauty (c) 2003, 2004, 2008 David Turner <david@freetype.org>
#
# This program is used to beautify the documentation comments used
# in the FreeType 2 public headers.
#
from sources import *
from content import *
from utils import *
import utils
import sys, os, time, string, getopt
... | [
[
1,
0,
0.0796,
0.0088,
0,
0.66,
0,
648,
0,
1,
0,
0,
648,
0,
0
],
[
1,
0,
0.0885,
0.0088,
0,
0.66,
0.1111,
273,
0,
1,
0,
0,
273,
0,
0
],
[
1,
0,
0.0973,
0.0088,
0,
... | [
"from sources import *",
"from content import *",
"from utils import *",
"import utils",
"import sys, os, time, string, getopt",
"content_processor = ContentProcessor()",
"def beautify_block( block ):\n if block.content:\n content_processor.reset()\n\n markups = content_processor.pro... |
# compute arctangent table for CORDIC computations in fttrigon.c
import sys, math
#units = 64*65536.0 # don't change !!
units = 256
scale = units/math.pi
shrink = 1.0
comma = ""
def calc_val( x ):
global units, shrink
angle = math.atan(x)
shrink = shrink * math.cos(angle)
return angle/math.pi *... | [
[
1,
0,
0.026,
0.013,
0,
0.66,
0,
509,
0,
2,
0,
0,
509,
0,
0
],
[
14,
0,
0.0649,
0.013,
0,
0.66,
0.0714,
805,
1,
0,
0,
0,
0,
1,
0
],
[
14,
0,
0.0779,
0.013,
0,
0.66... | [
"import sys, math",
"units = 256",
"scale = units/math.pi",
"shrink = 1.0",
"comma = \"\"",
"def calc_val( x ):\n global units, shrink\n angle = math.atan(x)\n shrink = shrink * math.cos(angle)\n return angle/math.pi * units",
" angle = math.atan(x)",
" shrink = shrink * math.co... |
#!/usr/bin/env python
#
#
# FreeType 2 glyph name builder
#
# Copyright 1996-2000, 2003, 2005, 2007, 2008, 2011 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LI... | [
[
8,
0,
0.0042,
0.0016,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0055,
0.0002,
0,
0.66,
0.0714,
509,
0,
5,
0,
0,
509,
0,
0
],
[
14,
0,
0.0173,
0.0195,
0,
0.6... | [
"\"\"\"\\\n\nusage: %s <output-file>\n\n This python script generates the glyph names tables defined in the\n `psnames' module.\n\n Its single argument is the name of the header file to be created.",
"import sys, string, struct, re, os.path",
"mac_standard_names = \\\n[\n # 0\n \".notdef\", \".null\", \"no... |
#!/usr/bin/env python
#
# Check trace components in FreeType 2 source.
# Author: suzuki toshiya, 2009
#
# This code is explicitly into the public domain.
import sys
import os
import re
SRC_FILE_LIST = []
USED_COMPONENT = {}
KNOWN_COMPONENT = {}
SRC_FILE_DIRS = [ "src" ]
TRACE_DEF_FILES = [ "include/freetype/in... | [
[
1,
0,
0.0796,
0.0088,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0885,
0.0088,
0,
0.66,
0.0455,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0973,
0.0088,
0,
... | [
"import sys",
"import os",
"import re",
"SRC_FILE_LIST = []",
"USED_COMPONENT = {}",
"KNOWN_COMPONENT = {}",
"SRC_FILE_DIRS = [ \"src\" ]",
"TRACE_DEF_FILES = [ \"include/freetype/internal/fttrace.h\" ]",
"for i in range( 1, len( sys.argv ) ):\n if sys.argv[i].startswith( \"--help\" ):\n pr... |
#!/usr/bin/env python
#
#
# FreeType 2 glyph name builder
#
# Copyright 1996-2000, 2003, 2005, 2007, 2008, 2011 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LI... | [
[
8,
0,
0.0042,
0.0016,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.0055,
0.0002,
0,
0.66,
0.0714,
509,
0,
5,
0,
0,
509,
0,
0
],
[
14,
0,
0.0173,
0.0195,
0,
0.6... | [
"\"\"\"\\\n\nusage: %s <output-file>\n\n This python script generates the glyph names tables defined in the\n `psnames' module.\n\n Its single argument is the name of the header file to be created.",
"import sys, string, struct, re, os.path",
"mac_standard_names = \\\n[\n # 0\n \".notdef\", \".null\", \"no... |
#!/usr/bin/env python
#
# Check trace components in FreeType 2 source.
# Author: suzuki toshiya, 2009
#
# This code is explicitly into the public domain.
import sys
import os
import re
SRC_FILE_LIST = []
USED_COMPONENT = {}
KNOWN_COMPONENT = {}
SRC_FILE_DIRS = [ "src" ]
TRACE_DEF_FILES = [ "include/freetype/in... | [
[
1,
0,
0.0796,
0.0088,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0885,
0.0088,
0,
0.66,
0.0455,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0973,
0.0088,
0,
... | [
"import sys",
"import os",
"import re",
"SRC_FILE_LIST = []",
"USED_COMPONENT = {}",
"KNOWN_COMPONENT = {}",
"SRC_FILE_DIRS = [ \"src\" ]",
"TRACE_DEF_FILES = [ \"include/freetype/internal/fttrace.h\" ]",
"for i in range( 1, len( sys.argv ) ):\n if sys.argv[i].startswith( \"--help\" ):\n pr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.