code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
# Abstract classes.
class Event(object):
def __init__(self, start_mark=None, end_mark=None):
self.start_mark = start_mark
self.end_mark = end_mark
def __repr__(self):
attributes = [key for key in ['anchor', 'tag', 'implicit', 'value']
if hasattr(self, key)]
argu... | Python |
__all__ = ['BaseConstructor', 'SafeConstructor', 'Constructor',
'ConstructorError']
from error import *
from nodes import *
import datetime
try:
set
except NameError:
from sets import Set as set
import binascii, re, sys, types
class ConstructorError(MarkedYAMLError):
pass
class BaseConstructor(ob... | Python |
#!/usr/bin/env python
#
# Open-source benchmarking suite. Similar to SPEC CPU.
# (c) 2008 Thomas Stromberg <thomas%stromberg.org>
#
# $Id: benchmark.py 771 2008-11-26 03:32:22Z thomas $
import urllib
import os
import random
import re
import shutil
import time
import os.path
import subprocess
import datetime
from optpar... | Python |
# FreeBench tool building library
# (c) 2008 Thomas Stromberg <thomas%stromberg.org>
import sys
import datetime
import os
# This needs to be made tunable again.
VERBOSE = os.getenv('VERBOSE', False)
def debug(string):
if VERBOSE:
print ': %s' % string
def msg(string):
print "- %s" % string
sys.stdout.flus... | Python |
#!/usr/bin/env python
# sysinfo, return hardware/OS information for the current machine.
#
# TODO(thomas): Use platform library for as muchh as possible here.
import os
import platform
import re
import sys
def execute(command):
return os.popen(command).read().strip()
class SysInfo(object):
def __init__(self)... | Python |
VERSION='0.5'
| Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
#!/usr/bin/env mayapy
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source ... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
#
# Copyright (c) 2010 Sony Pictures Imageworks Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source code must retain the above copyright
# notice, this list of c... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks, Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with ... | Python |
#!/usr/bin/env python2.5
#-*- mode: python -*-
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistrib... | Python |
#!/usr/bin/env python2.6
#-*- mode: python -*-
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistrib... | Python |
##-*****************************************************************************
##
## Copyright (c) 2009-2011,
## Sony Pictures Imageworks Inc. and
## Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
##
## All rights reserved.
##
## Redistribution and use in source and binary forms, with ... | Python |
#! /usr/bin/env python
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; either v... | Python |
#! /usr/bin/env python
# encoding: utf-8
import platform
import Utils
import Options
# the following two variables are used by the target "waf dist"
VERSION=''
APPNAME=''
# these variables are mandatory ('/' are converted automatically)
top = '.'
out = 'build'
# TODO extensive testing with different configuratio... | Python |
#!/usr/bin/env python
from distutils.core import setup
from distutils.extension import Extension
setup(
name = 'AES',
ext_modules=[
Extension("AES", ["AES.c"]),
],
)
| Python |
#! /usr/bin/env python
# Viewer for archives packaged by archive.py
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as publis... | Python |
import sys,os
targetdir = os.environ.get("_MEIPASS2", os.path.abspath(os.path.dirname(sys.argv[0])))
os.environ["MATPLOTLIBDATA"] = os.path.join(targetdir, "mpl-data")
| Python |
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; either version 2
# of the Licen... | Python |
# Copyright (C) 2009, Lorenzo Berni
# Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; either version 2
# ... | Python |
# Copyright (C) 2005, Giovanni Bajo
#
# 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 the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# In addition to the permissions... | Python |
# Qt4 plugins are bundled as data files (see hooks/hook-PyQt4*),
# within a "qt4_plugins" directory.
# We add a runtime hook to tell Qt4 where to find them.
import os
d = "qt4_plugins"
if "_MEIPASS2" in os.environ:
d = os.path.join(os.environ["_MEIPASS2"], d)
else:
d = os.path.join(os.path.dirname(sys.argv[0]),... | Python |
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; either version 2
# of the Licen... | Python |
import sys,os
d = "localedata"
if "_MEIPASS2" in os.environ:
d = os.path.join(os.environ["_MEIPASS2"], d)
else:
d = os.path.join(os.path.dirname(sys.argv[0]), d)
import babel.localedata
babel.localedata._dirname = os.path.abspath(d)
| Python |
#!/usr/bin/env python
#
# Make .eggs and zipfiles available at runtime
#
# Copyright (C) 2010 Giovanni Bajo <rasky@develer.com>
#
# This file is part of PyInstaller <http://www.pyinstaller.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Licens... | Python |
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; either version 2
# of the Licen... | Python |
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; either version 2
# of the Licen... | Python |
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; either version 2
# of the Licen... | Python |
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; either version 2
# of the... | Python |
# Subclass of Archive that can be understood by a C program (see launch.c).
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 1999, 2002 McMillan Enterprises, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Licen... | Python |
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; either version 2
# of the... | Python |
#!/usr/bin/env python
import time
print time.strptime(time.ctime())
| Python |
# -*- mode: python -*-
__testname__ = 'test1'
a = Analysis(['../support/_mountzlib.py', 'test1.py'],
pathex=[],
hookspath=['hooks1'])
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
exclude_binaries=1,
name=os.path.join('build', 'pyi.' + config['target_platform'], _... | Python |
# -*- mode: python -*-
__testname__ = 'test13'
a = Analysis(['../support/_mountzlib.py',
'../support/useUnicode.py',
'test13.py'],
pathex=[])
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
exclude_binaries=1,
name=os.path.join('build', 'pyi.' + confi... | Python |
# -*- mode: python -*-
__testname__ = 'test-relative-import2'
a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'),
__testname__ + '.py'],
)
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
name = os.path.join('dist', __test... | Python |
#!/usr/bin/env python
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; eit... | Python |
from relimp3a.aa import a1
if __name__ == '__main__':
print a1.getString()
| Python |
name = 'relimp.relimp.relimp3'
| Python |
from __future__ import absolute_import
name = 'relimp.relimp.relimp2'
from . import relimp3
assert relimp3.name == 'relimp.relimp.relimp3'
from .. import relimp
assert relimp.name == 'relimp.relimp'
import relimp
assert relimp.name == 'relimp'
import relimp.relimp2
assert relimp.relimp2.name == 'relimp.relimp2'
... | Python |
name = 'relimp.relimp'
| Python |
from __future__ import absolute_import
name = 'relimp.relimp1'
from . import relimp2 as upper
from . relimp import relimp2 as lower
assert upper.name == 'relimp.relimp2'
assert lower.name == 'relimp.relimp.relimp2'
if upper.__name__ == lower.__name__:
raise SystemExit("Imported the same module")
if upper.__fi... | Python |
name = 'relimp.E'
| Python |
name = 'relimp.relimp2'
| Python |
name = 'relimp.F.G'
| Python |
name = 'relimp.F'
class H:
name = 'relimp.F.H'
| Python |
name = 'relimp'
| Python |
name = 'relimp.B.D'
class X:
name = 'relimp.B.D.X'
| Python |
name = 'relimp.B'
| Python |
name = 'relimp.B.C'
from . import D # Imports relimp.B.D
from .D import X # Imports relimp.B.D.X
from .. import E # Imports relimp.E
from ..F import G # Imports relimp.F.G
from ..F import H # Imports relimp.F.H
assert D.name == 'relimp.B.D'
as... | Python |
import sys
if sys.version_info >= (2,5):
from email import utils
from email.header import Header
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.nonmultipart import MIMENonMultipart
else:
print "test-email skipped"
| Python |
# -*- mode: python -*-
__testname__ = 'test10'
a = Analysis([os.path.join(HOMEPATH,'support', '_mountzlib.py'),
os.path.join(HOMEPATH,'support', 'useUnicode.py'),
'test10.py'],
pathex=['.'])
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
exclude_binaries=1,
... | Python |
# -*- mode: python -*-
a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'), os.path.join(HOMEPATH,'support/useUnicode.py'), 'test-celementtree.py'],
pathex=[])
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
exclude_binaries=1,
name=os.path.join('build/pyi.linux2/test-cel... | Python |
# -*- mode: python -*-
__testname__ = 'test-zipimport1'
a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'),
os.path.join(HOMEPATH,'support/useUnicode.py'),
__testname__ + '.py'],
)
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
a.binaries,
... | Python |
import ctypes, ctypes.util
# Make sure we are able to load the MSVCRXX.DLL we are currently bound
# to through ctypes.
lib = ctypes.CDLL(ctypes.util.find_library('c'))
print lib
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy
from matplotlib import mlab
from matplotlib import pyplot
def main():
# Part of the example at
# http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/contour_demo.py
delta = 0.025
x = numpy.arange(-3.0, 3.0, delta)
... | Python |
#!/usr/bin/env python
# Copyright (C) 2005, Giovanni Bajo
# Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; eit... | Python |
# -*- mode: python -*-
__testname__ = 'test-pycrypto'
a = Analysis([os.path.join(HOMEPATH,'support', '_mountzlib.py'),
os.path.join(HOMEPATH,'support', 'useUnicode.py'),
__testname__ + '.py'])
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
exclude_binaries=1,
... | Python |
import os
import sys
if __name__ == "__main__":
if sys.version_info >= (2,5):
import subprocess
subprocess.check_call([os.path.dirname(sys.executable) + "/../test-nestedlaunch0/test-nestedlaunch0.exe"])
else:
fn = os.path.join(os.path.dirname(sys.executable), "..", "test-nestedlaunch0",... | Python |
assert "foo".decode("ascii") == u"foo"
| Python |
#!/usr/bin/env python
# -*- mode: python -*-
#
# Copyright (C) 2008 Hartmut Goebel <h.goebel@goebel-consult.de>
# Licence: GNU General Public License version 3 (GPL v3)
#
# This file is part of PyInstaller <http://www.pyinstaller.org>
#
# pyinstaller is free software: you can redistribute it and/or modify
# it under th... | Python |
# Copyright (C) 2007, Matteo Bertini
# Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; either version 2
# of th... | Python |
# -*- mode: python -*-
a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'),
os.path.join(HOMEPATH,'support/useUnicode.py'),
'test-nestedlaunch0.py'],
pathex=[''])
pyz = PYZ(a.pure)
exe = EXE( pyz,
a.scripts,
a.binaries,
a.zipfiles,
... | Python |
# -*- mode: python -*-
__testname__ = 'test2'
config['useZLIB'] = 0
a = Analysis(['../support/_mountzlib.py', 'test2.py'],
pathex=[],
hookspath=['hooks1'])
pyz = PYZ(a.pure, level=0)
exe = EXE(pyz,
a.scripts,
exclude_binaries=1,
name=os.path.join('build', 'pyi.'... | Python |
# -*- mode: python -*-
__testname__ = 'test9'
a = Analysis([os.path.join(HOMEPATH,'support', '_mountzlib.py'),
os.path.join(HOMEPATH,'support', 'useUnicode.py'),
'test9.py'],
pathex=['.'])
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
exclude_binaries=1,
... | Python |
attrs = [('notamodule','')]
def hook(mod):
import os, sys, marshal
other = os.path.join(mod.__path__[0], '../pkg2/__init__.pyc')
if os.path.exists(other):
co = marshal.loads(open(other,'rb').read()[8:])
else:
co = compile(open(other[:-1],'r').read()+'\n', other, 'exec')
mod.__init__(... | Python |
# Copyright (C) 2007, Matteo Bertini
# Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, Inc.
#
# 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 the Free Software Foundation; either version 2
# of th... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from numpy.core.numeric import dot
def main():
print "dot(3, 4):", dot(3, 4)
if __name__ == "__main__":
main()
| Python |
#!/usr/bin/env python
import sys
from ctypes import *
def dummy(arg):
if sys.platform == "linux2":
tct = CDLL("ctypes/testctypes.so")
elif sys.platform[:6] == "darwin":
tct = CDLL("ctypes/testctypes.dylib")
elif sys.platform == "win32":
tct = CDLL("ctypes\\testctypes.dll")
else:... | Python |
Subsets and Splits
SQL Console for ajibawa-2023/Python-Code-Large
Provides a useful breakdown of language distribution in the training data, showing which languages have the most samples and helping identify potential imbalances across different language groups.