<commit_before>#!/usr/bin/env python
from __future__ import unicode_literals
from setuptools import setup, find_packages

install_requires = [
    "Jinja2",
    "boto",
    "flask",
    "httpretty>=0.6.1",
    "requests",
    "xmltodict",
    "six",
    "werkzeug",
]

import sys

if sys.version_info < (2, 7):
    # No buildint OrderedDict before 2.7
    install_requires.append('ordereddict')

setup(
    name='moto',
    version='0.4.0',
    description='A library that allows your python tests to easily'
                ' mock out the boto library',
    author='Steve Pulec',
    author_email='spulec@gmail',
    url='https://github.com/spulec/moto',
    entry_points={
        'console_scripts': [
            'moto_server = moto.server:main',
        ],
    },
    packages=find_packages(exclude=("tests", "tests.*")),
    install_requires=install_requires,
    license="Apache",
    test_suite="tests",
    classifiers=[
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "License :: OSI Approved :: Apache Software License",
        "Topic :: Software Development :: Testing",
    ],
)
<commit_msg>0.4.1<commit_after>#!/usr/bin/env python
from __future__ import unicode_literals
from setuptools import setup, find_packages

install_requires = [
    "Jinja2",
    "boto",
    "flask",
    "httpretty>=0.6.1",
    "requests",
    "xmltodict",
    "six",
    "werkzeug",
]

import sys

if sys.version_info < (2, 7):
    # No buildint OrderedDict before 2.7
    install_requires.append('ordereddict')

setup(
    name='moto',
    version='0.4.1',
    description='A library that allows your python tests to easily'
                ' mock out the boto library',
    author='Steve Pulec',
    author_email='spulec@gmail',
    url='https://github.com/spulec/moto',
    entry_points={
        'console_scripts': [
            'moto_server = moto.server:main',
        ],
    },
    packages=find_packages(exclude=("tests", "tests.*")),
    install_requires=install_requires,
    license="Apache",
    test_suite="tests",
    classifiers=[
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "License :: OSI Approved :: Apache Software License",
        "Topic :: Software Development :: Testing",
    ],
)
<|endoftext|>


<commit_before>""" Setup module for kervi generating setup package used with pip """
from distutils.core import setup
import distutils
try:
    from kervi.version import VERSION
except:
    VERSION = "0.0"

try:
    distutils.dir_util.remove_tree("dist")
except:
    pass

setup(
    name='kervi',
    packages=[
        'kervi',
        'kervi/application',
        'kervi/dashboards',
        'kervi/controllers',
        'kervi/version',
        'kervi/hal',
        'kervi/module',
        'kervi/sensors',
        'kervi/spine',
        'kervi/utility',
        'kervi/values',
        'kervi/vision',
    ],
    version=VERSION,
    description="""
    A python framework for creating robotic and automation applications on Raspbery pi (and other platforms).
    UI is web based and generated on the fly based on configuration in python code.
    """,
    author='Tim Wentzlau',
    author_email='tim.wentzlau@gmail.com',
    url='https://github.com/kervi/kervi',
    download_url='https://github.com/kervi/kervi/archive/v1.0-alpha.tar.gz',
    keywords=['raspberry pi', 'robotic', 'automation'],
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "Intended Audience :: Education",
        "Intended Audience :: Information Technology",
        "Intended Audience :: Manufacturing",
        "Intended Audience :: Science/Research",
        "Topic :: Scientific/Engineering",
        "Topic :: Scientific/Engineering :: Human Machine Interfaces",
        "Topic :: Software Development :: Documentation",
        "Topic :: System :: Monitoring",
        "Environment :: Console",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: MacOS",
        "Operating System :: POSIX :: Linux",
        "Programming Language :: Python :: 3.4"
    ],
    install_requires=[
        'kervi-ui',
        'kervi-cli',
        'kervi-hal-generic',
        'kervi-device-library',
        'autobahn',
        'pillow',
        'pyzmq'
    ],
    extras_require={
        'rpi':  ['kervi-hal-rpi'],
        'raspberry':  ['kervi-hal-rpi'],
        'win':  ['kervi-hal-win'],
        'windows':  ['kervi-hal-win'],
        'linux':  ['kervi-hal-linux'],
        'mac':  ['kervi-hal-linux'],
    },
    include_package_data=True,
    package_data={
        "kervi":[
            "vision/fonts/*.*"
        ]
    }
)
<commit_msg>add actions to setup<commit_after>""" Setup module for kervi generating setup package used with pip """
from distutils.core import setup
import distutils
try:
    from kervi.version import VERSION
except:
    VERSION = "0.0"

try:
    distutils.dir_util.remove_tree("dist")
except:
    pass

setup(
    name='kervi',
    packages=[
        'kervi',
        'kervi/actions',
        'kervi/application',
        'kervi/dashboards',
        'kervi/controllers',
        'kervi/version',
        'kervi/hal',
        'kervi/module',
        'kervi/sensors',
        'kervi/spine',
        'kervi/utility',
        'kervi/values',
        'kervi/vision',
    ],
    version=VERSION,
    description="""
    A python framework for creating robotic and automation applications on Raspbery pi (and other platforms).
    UI is web based and generated on the fly based on configuration in python code.
    """,
    author='Tim Wentzlau',
    author_email='tim.wentzlau@gmail.com',
    url='https://github.com/kervi/kervi',
    download_url='https://github.com/kervi/kervi/archive/v1.0-alpha.tar.gz',
    keywords=['raspberry pi', 'robotic', 'automation'],
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "Intended Audience :: Education",
        "Intended Audience :: Information Technology",
        "Intended Audience :: Manufacturing",
        "Intended Audience :: Science/Research",
        "Topic :: Scientific/Engineering",
        "Topic :: Scientific/Engineering :: Human Machine Interfaces",
        "Topic :: Software Development :: Documentation",
        "Topic :: System :: Monitoring",
        "Environment :: Console",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: MacOS",
        "Operating System :: POSIX :: Linux",
        "Programming Language :: Python :: 3.4"
    ],
    install_requires=[
        'kervi-ui',
        'kervi-cli',
        'kervi-hal-generic',
        'kervi-device-library',
        'autobahn',
        'pillow',
        'pyzmq'
    ],
    extras_require={
        'rpi':  ['kervi-hal-rpi'],
        'raspberry':  ['kervi-hal-rpi'],
        'win':  ['kervi-hal-win'],
        'windows':  ['kervi-hal-win'],
        'linux':  ['kervi-hal-linux'],
        'mac':  ['kervi-hal-linux'],
    },
    include_package_data=True,
    package_data={
        "kervi":[
            "vision/fonts/*.*"
        ]
    }
)
<|endoftext|>


<commit_before>#!/usr/bin/env python

import os
import sys

from distutils.core import setup

__version__ = '0.1.0'
__author__ = '@sebbrochet'

setup(name='ranlinappconf',
      version=__version__,
      description='Track changes to files on your linux servers',
      long_description='This command-line tool lets you track remotely, between successive runs, changes made to files in a list of locations on your linux servers. You get a mail for each set of changes detected on a specific location with the details of the changes.',
      author=__author__,
      author_email='contact@sebbrochet.com',
      url='https://code.google.com/p/ranlinappconf/',
      platforms=['linux'],
      license='MIT License',
      install_requires=['paramiko'],
      scripts=[
         'bin/ranlinappconf'
      ],
      classifiers=[
          'Development Status :: 4 - Beta',
          'Environment :: Console',
          'Intended Audience :: System Administrators',
          'License :: OSI Approved :: MIT License',
          'Operating System :: POSIX :: Linux',
          'Programming Language :: Python',
          'Topic :: System :: Monitoring',
          ],
      )<commit_msg>Add requirements for YAML<commit_after>#!/usr/bin/env python

import os
import sys

from distutils.core import setup

__version__ = '0.1.0'
__author__ = '@sebbrochet'

setup(name='ranlinappconf',
      version=__version__,
      description='Track changes to files on your linux servers',
      long_description='This command-line tool lets you track remotely, between successive runs, changes made to files in a list of locations on your linux servers. You get a mail for each set of changes detected on a specific location with the details of the changes.',
      author=__author__,
      author_email='contact@sebbrochet.com',
      url='https://code.google.com/p/ranlinappconf/',
      platforms=['linux'],
      license='MIT License',
      install_requires=['paramiko, yaml'],
      scripts=[
         'bin/ranlinappconf'
      ],
      classifiers=[
          'Development Status :: 4 - Beta',
          'Environment :: Console',
          'Intended Audience :: System Administrators',
          'License :: OSI Approved :: MIT License',
          'Operating System :: POSIX :: Linux',
          'Programming Language :: Python',
          'Topic :: System :: Monitoring',
          ],
      )<|endoftext|>


<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup

with open('README.md') as readme_file:
    readme = readme_file.read()

setup(
    name='django-bulma',
    version='0.3.4',
    description="""Bulma CSS Framework for Django projects""",
    long_description=readme,
    author='Tim Kamanin',
    author_email='tim@timonweb.com',
    url='https://timonweb.com/oss/django-bulma/',
    packages=[
        'bulma',
    ],
    include_package_data=True,
    install_requires=[
    ],
    license="The MIT License (MIT)",
    zip_safe=False,
    keywords='django-bulma',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python :: 3.6',
        'Operating System :: OS Independent',
        'Topic :: Software Development :: Libraries',
        'Topic :: Utilities',
        'Environment :: Web Environment',
        'Framework :: Django',
    ],
)
<commit_msg>Marks 0.4.0 release<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup

with open('README.md') as readme_file:
    readme = readme_file.read()

setup(
    name='django-bulma',
    version='0.4.0',
    description="""Bulma CSS Framework for Django projects""",
    long_description=readme,
    author='Tim Kamanin',
    author_email='tim@timonweb.com',
    url='https://timonweb.com/oss/django-bulma/',
    packages=[
        'bulma',
    ],
    include_package_data=True,
    install_requires=[
    ],
    license="The MIT License (MIT)",
    zip_safe=False,
    keywords='django-bulma',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python :: 3.6',
        'Operating System :: OS Independent',
        'Topic :: Software Development :: Libraries',
        'Topic :: Utilities',
        'Environment :: Web Environment',
        'Framework :: Django',
    ],
)
<|endoftext|>


<commit_before># Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
# You may obtain a copy of the License at: [package root]/LICENSE.txt
# Unless required by applicable law or agreed to in writing, software distributed under the License
#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and limitations under the License.

import os

import setuptools

requirements = [
    "tqdm==4.62.3",
    "pyyaml==5.4.1",
    "tabulate==0.8.9",
    "colorama==0.4.4",
    "termcolor==1.1.0",
    "wcwidth==0.2.5",
    "ida-settings==2.1.0",
    "viv-utils[flirt]==0.6.6",
    "halo==0.0.31",
    "networkx==2.5.1",
    "ruamel.yaml==0.17.16",
    "vivisect==1.0.5",
    "smda==1.6.2",
    "pefile==2021.9.3",
    "typing==3.7.4.3",
    "pyelftools==0.27",
]

# this sets __version__
# via: http://stackoverflow.com/a/7071358/87207
# and: http://stackoverflow.com/a/2073599/87207
with open(os.path.join("capa", "version.py"), "r") as f:
    exec(f.read())

# via: https://packaging.python.org/guides/making-a-pypi-friendly-readme/
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md"), "r") as f:
    long_description = f.read()

setuptools.setup(
    name="flare-capa",
    version=__version__,
    description="The FLARE team's open-source tool to identify capabilities in executable files.",
    long_description=long_description,
    long_description_content_type="text/markdown",
    author="Willi Ballenthin, Moritz Raabe",
    author_email="william.ballenthin@mandiant.com, moritz.raabe@mandiant.com",
    url="https://www.github.com/fireeye/capa",
    project_urls={
        "Documentation": "https://github.com/fireeye/capa/tree/master/doc",
        "Rules": "https://github.com/fireeye/capa-rules",
        "Rules Documentation": "https://github.com/fireeye/capa-rules/tree/master/doc",
    },
    packages=setuptools.find_packages(exclude=["tests"]),
    package_dir={"capa": "capa"},
    entry_points={
        "console_scripts": [
            "capa=capa.main:main",
        ]
    },
    include_package_data=True,
    install_requires=requirements,
    extras_require={
        "dev": [
            "pytest==6.2.5",
            "pytest-sugar==0.9.4",
            "pytest-instafail==0.4.2",
            "pytest-cov==2.12.1",
            "pycodestyle==2.7.0",
            "black==21.9b0",
            "isort==5.9.3",
            "mypy==0.910",
            "psutil==5.8.0",
            # type stubs for mypy
            "types-backports==0.1.3",
            "types-colorama==0.4.3",
            "types-PyYAML==5.4.10",
            "types-tabulate==0.8.2",
            "types-termcolor==1.1.1",
            "types-psutil==5.8.5",
        ],
    },
    zip_safe=False,
    keywords="capa malware analysis capability detection FLARE",
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Intended Audience :: Information Technology",
        "License :: OSI Approved :: Apache Software License",
        "Natural Language :: English",
        "Programming Language :: Python :: 3",
        "Topic :: Security",
    ],
    python_requires=">=3.6",
)
<commit_msg>build(deps-dev): bump types-psutil from 5.8.5 to 5.8.8<commit_after># Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
# You may obtain a copy of the License at: [package root]/LICENSE.txt
# Unless required by applicable law or agreed to in writing, software distributed under the License
#  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and limitations under the License.

import os

import setuptools

requirements = [
    "tqdm==4.62.3",
    "pyyaml==5.4.1",
    "tabulate==0.8.9",
    "colorama==0.4.4",
    "termcolor==1.1.0",
    "wcwidth==0.2.5",
    "ida-settings==2.1.0",
    "viv-utils[flirt]==0.6.6",
    "halo==0.0.31",
    "networkx==2.5.1",
    "ruamel.yaml==0.17.16",
    "vivisect==1.0.5",
    "smda==1.6.2",
    "pefile==2021.9.3",
    "typing==3.7.4.3",
    "pyelftools==0.27",
]

# this sets __version__
# via: http://stackoverflow.com/a/7071358/87207
# and: http://stackoverflow.com/a/2073599/87207
with open(os.path.join("capa", "version.py"), "r") as f:
    exec(f.read())

# via: https://packaging.python.org/guides/making-a-pypi-friendly-readme/
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md"), "r") as f:
    long_description = f.read()

setuptools.setup(
    name="flare-capa",
    version=__version__,
    description="The FLARE team's open-source tool to identify capabilities in executable files.",
    long_description=long_description,
    long_description_content_type="text/markdown",
    author="Willi Ballenthin, Moritz Raabe",
    author_email="william.ballenthin@mandiant.com, moritz.raabe@mandiant.com",
    url="https://www.github.com/fireeye/capa",
    project_urls={
        "Documentation": "https://github.com/fireeye/capa/tree/master/doc",
        "Rules": "https://github.com/fireeye/capa-rules",
        "Rules Documentation": "https://github.com/fireeye/capa-rules/tree/master/doc",
    },
    packages=setuptools.find_packages(exclude=["tests"]),
    package_dir={"capa": "capa"},
    entry_points={
        "console_scripts": [
            "capa=capa.main:main",
        ]
    },
    include_package_data=True,
    install_requires=requirements,
    extras_require={
        "dev": [
            "pytest==6.2.5",
            "pytest-sugar==0.9.4",
            "pytest-instafail==0.4.2",
            "pytest-cov==2.12.1",
            "pycodestyle==2.7.0",
            "black==21.9b0",
            "isort==5.9.3",
            "mypy==0.910",
            "psutil==5.8.0",
            # type stubs for mypy
            "types-backports==0.1.3",
            "types-colorama==0.4.3",
            "types-PyYAML==5.4.10",
            "types-tabulate==0.8.2",
            "types-termcolor==1.1.1",
            "types-psutil==5.8.8",
        ],
    },
    zip_safe=False,
    keywords="capa malware analysis capability detection FLARE",
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "Intended Audience :: Information Technology",
        "License :: OSI Approved :: Apache Software License",
        "Natural Language :: English",
        "Programming Language :: Python :: 3",
        "Topic :: Security",
    ],
    python_requires=">=3.6",
)
<|endoftext|>


<commit_before>#! /usr/bin/env python
# coding: utf-8

from setuptools import find_packages, setup

setup(name='ego.io',
      author='openego development group',
      author_email='oemof@rl-institut.de',
      description='ego input/output repository',
      version='0.0.1rc5',
      url='https://github.com/openego/ego.io',
      packages=find_packages(),
      license='GNU GENERAL PUBLIC LICENSE Version 3',
      install_requires=[
          'geoalchemy2',
          "sqlalchemy <=1.0.15",
          "numpy",
          "psycopg2"],
      extras_require={
          "sqlalchemy <=1.0.15": 'postgresql'
      }
      )
<commit_msg>No version specification for SQLAlchemy<commit_after>#! /usr/bin/env python
# coding: utf-8

from setuptools import find_packages, setup

setup(name='ego.io',
      author='openego development group',
      author_email='oemof@rl-institut.de',
      description='ego input/output repository',
      version='0.0.1rc5',
      url='https://github.com/openego/ego.io',
      packages=find_packages(),
      license='GNU GENERAL PUBLIC LICENSE Version 3',
      install_requires=[
          'geoalchemy2',
          "sqlalchemy",
          "numpy",
          "psycopg2"],
      extras_require={
          "sqlalchemy": 'postgresql'
      }
      )
<|endoftext|>


<commit_before>"""Moneta setup module."""

from setuptools import setup, find_packages
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

# Get the long description from the relevant file
with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='moneta-scheduler',

    # Versions should comply with PEP440.  For a discussion on single-sourcing
    # the version across setup.py and the project code, see
    # https://packaging.python.org/en/latest/single_source_version.html
    version='1.0.0b1',

    description='Distributed tasks scheduler',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/geneanet/moneta',

    # Author details
    author='Herve BRY',
    author_email='herve.bry@geneanet.org',

    # Choose your license
    license='BSD',

    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        # How mature is this project? Common values are
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 4 - Beta',

        # Indicate who your project is intended for
        'Intended Audience :: System Administrators',
        'Topic :: System :: Distributed Computing',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: BSD License',

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        'Programming Language :: Python :: 2.7',
    ],

    # What does your project relate to?
    keywords='cron cluster distributed task scheduler',

    # You can just specify the packages manually here if your project is
    # simple. Or you can use find_packages().
    packages=find_packages(exclude=['web']),

    # List run-time dependencies here.  These will be installed by pip when
    # your project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/requirements.html
    install_requires=['gevent','kazoo','python-dateutil','PyYAML'],

    # List additional groups of dependencies here (e.g. development
    # dependencies). You can install these using the following syntax,
    # for example:
    # $ pip install -e .[dev,test]
    extras_require={},

    # If there are data files included in your packages that need to be
    # installed, specify them here.  If using Python 2.6 or less, then these
    # have to be included in MANIFEST.in as well.
    package_data={},

    # Although 'package_data' is the preferred approach, in some case you may
    # need to place data files outside of your packages. See:
    # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa
    # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
    data_files=[],

    # To provide executable scripts, use entry points in preference to the
    # "scripts" keyword. Entry points provide cross-platform support and allow
    # pip to create the appropriate form of executable for the target platform.
    entry_points={
        'console_scripts': [
            'moneta=moneta.moneta:run',
        ],
    },
)
<commit_msg>Set version to 1.0.0<commit_after>"""Moneta setup module."""

from setuptools import setup, find_packages
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

# Get the long description from the relevant file
with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='moneta-scheduler',

    # Versions should comply with PEP440.  For a discussion on single-sourcing
    # the version across setup.py and the project code, see
    # https://packaging.python.org/en/latest/single_source_version.html
    version='1.0.0',

    description='Distributed tasks scheduler',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/geneanet/moneta',

    # Author details
    author='Herve BRY',
    author_email='herve.bry@geneanet.org',

    # Choose your license
    license='BSD',

    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        # How mature is this project? Common values are
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 4 - Beta',

        # Indicate who your project is intended for
        'Intended Audience :: System Administrators',
        'Topic :: System :: Distributed Computing',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: BSD License',

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        'Programming Language :: Python :: 2.7',
    ],

    # What does your project relate to?
    keywords='cron cluster distributed task scheduler',

    # You can just specify the packages manually here if your project is
    # simple. Or you can use find_packages().
    packages=find_packages(exclude=['web']),

    # List run-time dependencies here.  These will be installed by pip when
    # your project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/requirements.html
    install_requires=['gevent','kazoo','python-dateutil','PyYAML'],

    # List additional groups of dependencies here (e.g. development
    # dependencies). You can install these using the following syntax,
    # for example:
    # $ pip install -e .[dev,test]
    extras_require={},

    # If there are data files included in your packages that need to be
    # installed, specify them here.  If using Python 2.6 or less, then these
    # have to be included in MANIFEST.in as well.
    package_data={},

    # Although 'package_data' is the preferred approach, in some case you may
    # need to place data files outside of your packages. See:
    # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa
    # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
    data_files=[],

    # To provide executable scripts, use entry points in preference to the
    # "scripts" keyword. Entry points provide cross-platform support and allow
    # pip to create the appropriate form of executable for the target platform.
    entry_points={
        'console_scripts': [
            'moneta=moneta.moneta:run',
        ],
    },
)
<|endoftext|>


<commit_before>from setuptools import find_packages, setup

tests_requirements = [
    'pytest',
    'pytest-cov',
    'pytest-flake8',
    'pytest-isort',
]

setup(
    name="Sitenco",
    version="0.1.dev0",
    description="Simple websites for simple projects.",
    url="https://kozea.fr",
    author="Kozea",
    packages=find_packages(),
    include_package_data=True,
    scripts=['launcher.py'],
    install_requires=[
        'docutils-html5-writer',
        'Flask',
        'PyYAML',
        'pygments',
    ],
    tests_requires=tests_requirements,
    extras_require={'test': tests_requirements}
)
<commit_msg>Rewrite tests_require<commit_after>from setuptools import find_packages, setup

tests_requirements = [
    'pytest',
    'pytest-cov',
    'pytest-flake8',
    'pytest-isort',
]

setup(
    name="Sitenco",
    version="0.1.dev0",
    description="Simple websites for simple projects.",
    url="https://kozea.fr",
    author="Kozea",
    packages=find_packages(),
    include_package_data=True,
    scripts=['launcher.py'],
    install_requires=[
        'docutils-html5-writer',
        'Flask',
        'PyYAML',
        'pygments',
    ],
    tests_require=tests_requirements,
    extras_require={'test': tests_requirements}
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='python-i18n',
    version='0.0.1',
    description='Translation library for Python',
    long_description=open('README.md').read(),
    author='Daniel Perez',
    author_email='tuvistavie@gmail',
    url='https://github.com/tuvistavie/python-i18n',
    download_url='https://github.com/tuvistavie/python-i18n/archive/master.zip',
    license='MIT',
    packages=['i18n', 'i18n.tests'],
    include_package_data=True,
    zip_safe=False,
    test_suite='i18n.tests',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Other Environment',
        'Intended Audience :: Developers',
        'License :: MIT',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries'
    ],
)
<commit_msg>Change version to 0.0.2.<commit_after>from setuptools import setup

setup(
    name='python-i18n',
    version='0.0.2',
    description='Translation library for Python',
    long_description=open('README.md').read(),
    author='Daniel Perez',
    author_email='tuvistavie@gmail',
    url='https://github.com/tuvistavie/python-i18n',
    download_url='https://github.com/tuvistavie/python-i18n/archive/master.zip',
    license='MIT',
    packages=['i18n', 'i18n.tests'],
    include_package_data=True,
    zip_safe=True,
    test_suite='i18n.tests',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Other Environment',
        'Intended Audience :: Developers',
        'License :: MIT',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3',
        'Topic :: Software Development :: Libraries'
    ],
)
<|endoftext|>


<commit_before>from distutils.core import setup
from setuptools import find_packages

setup(
    name='autokeras',
    packages=find_packages(exclude=('tests',)),
    install_requires=['torch==0.4.1', 'torchvision==0.2.1', 'numpy>=1.14.5', 'keras==2.2.2', 'scikit-learn==0.19.1',
                      'tensorflow==1.10.0', 'tqdm==4.25.0', 'imageio', 'GPUtil'],
    version='0.2.19',
    description='AutoML for deep learning',
    author='Haifeng Jin',
    author_email='jhfjhfj1@gmail.com',
    url='http://autokeras.com',
    download_url='https://github.com/jhfjhfj1/autokeras/archive/0.2.19.tar.gz',
    keywords=['automl'],  # arbitrary keywords
    classifiers=[]
)
<commit_msg>new release 0.3.0『』 『』<commit_after>from distutils.core import setup
from setuptools import find_packages

setup(
    name='autokeras',
    packages=find_packages(exclude=('tests',)),
    install_requires=['torch==0.4.1', 'torchvision==0.2.1', 'numpy>=1.14.5', 'keras==2.2.2', 'scikit-learn==0.19.1',
                      'tensorflow==1.10.0', 'tqdm==4.25.0', 'imageio', 'GPUtil'],
    version='0.3.0',
    description='AutoML for deep learning',
    author='Haifeng Jin',
    author_email='jhfjhfj1@gmail.com',
    url='http://autokeras.com',
    download_url='https://github.com/jhfjhfj1/autokeras/archive/0.3.0.tar.gz',
    keywords=['automl'],  # arbitrary keywords
    classifiers=[]
)
<|endoftext|>


<commit_before>from setuptools import setup

setup(
    name='firetv',
    version='1.0.6',
    description='Communicate with an Amazon Fire TV device via ADB over a network.',
    url='https://github.com/happyleavesaoc/python-firetv/',
    license='MIT',
    author='happyleaves',
    author_email='happyleaves.tfr@gmail.com',
    packages=['firetv'],
    install_requires=['pycryptodome', 'rsa', 'adb-homeassistant'],
    extras_require={
        'firetv-server': ['Flask>=0.10.1', 'PyYAML>=3.12']
    },
    entry_points={
        'console_scripts': [
            'firetv-server = firetv.__main__:main'
        ]
    },
    classifiers=[
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3'
    ]
)
<commit_msg>Bump version to 1.0.7<commit_after>from setuptools import setup

setup(
    name='firetv',
    version='1.0.7',
    description='Communicate with an Amazon Fire TV device via ADB over a network.',
    url='https://github.com/happyleavesaoc/python-firetv/',
    license='MIT',
    author='happyleaves',
    author_email='happyleaves.tfr@gmail.com',
    packages=['firetv'],
    install_requires=['pycryptodome', 'rsa', 'adb-homeassistant'],
    extras_require={
        'firetv-server': ['Flask>=0.10.1', 'PyYAML>=3.12']
    },
    entry_points={
        'console_scripts': [
            'firetv-server = firetv.__main__:main'
        ]
    },
    classifiers=[
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 3'
    ]
)
<|endoftext|>


<commit_before>from __future__ import absolute_import
import subprocess

from setuptools import setup

try:
    pandoc = subprocess.Popen(['pandoc', 'README.md', '--to', 'rst'],
                              stdout=subprocess.PIPE)

    readme = pandoc.communicate()[0]

except OSError:
    with open('README.md') as f:
        readme = f.read()

setup(
    name="notedown",
    version="1.3.1",
    description="Convert markdown to IPython notebook.",
    long_description=readme,
    packages=['notedown'],
    author="Aaron O'Leary",
    author_email='dev@aaren.me',
    license='BSD 2-Clause',
    url='http://github.com/aaren/notedown',
    install_requires=['ipython[nbconvert] >= 3.0', 'pandoc-attributes'],
    entry_points={'console_scripts': ['notedown = notedown:cli', ]},
    package_dir={'notedown': 'notedown'},
    package_data={'notedown': ['templates/markdown.tpl']},
    include_package_data=True,
)
<commit_msg>Wrap pandoc communicate call with str for Py3<commit_after>from __future__ import absolute_import
import subprocess

from setuptools import setup

try:
    pandoc = subprocess.Popen(['pandoc', 'README.md', '--to', 'rst'],
                              stdout=subprocess.PIPE)

    readme = str(pandoc.communicate()[0])

except OSError:
    with open('README.md') as f:
        readme = f.read()

setup(
    name="notedown",
    version="1.3.1",
    description="Convert markdown to IPython notebook.",
    long_description=readme,
    packages=['notedown'],
    author="Aaron O'Leary",
    author_email='dev@aaren.me',
    license='BSD 2-Clause',
    url='http://github.com/aaren/notedown',
    install_requires=['ipython[nbconvert] >= 3.0', 'pandoc-attributes'],
    entry_points={'console_scripts': ['notedown = notedown:cli', ]},
    package_dir={'notedown': 'notedown'},
    package_data={'notedown': ['templates/markdown.tpl']},
    include_package_data=True,
)
<|endoftext|>


<commit_before>"""
Attribute Editor Widget

These classes allow for an object in the
editor's attributes to be edited in a widget
that slides in from the right of the screen.

* author: William Emfinger
* website: github.com/finger563/editor
* last edited: August 2015
"""

from PyQt4 import QtCore
from PyQt4 import QtGui

class AttributeEditor(QtGui.QWidget):
    def __init__(self, parent = None):
        super(AttributeEditor,self).__init__(parent)
        self.init_ui()

    def init_ui(self):
        self.layout = QtGui.QVBoxLayout(self)

        self.label = QtGui.QLabel(self)
        self.label.setText("Attribute\nEditor")
        self.layout.addWidget(self.label)

        self.pix = QtGui.QPixmap("icons/model/Client.png").scaled(100,100)
        self.label2 = QtGui.QLabel(self)
        self.label2.setPixmap(self.pix)
        self.layout.addWidget(self.label2)

        self.button = QtGui.QPushButton('Button',self)
        self.layout.addWidget(self.button)

        self.setToolTip('This allows editing of currently selected object attributes.')
        #self.layout.setContentsMargins(1,1,1,1)
        self.setLayout(self.layout)

    def mousePressEvent(self, event):
        self.parent().mousePressEvent(event)

    def mouseReleaseEvent(self, event):
        self.parent().mouseReleaseEvent(event)
<commit_msg>style updates<commit_after>"""
Attribute Editor Widget

These classes allow for an object in the
editor's attributes to be edited in a widget
that slides in from the right of the screen.

* author: William Emfinger
* website: github.com/finger563/editor
* last edited: August 2015
"""

from PyQt4 import QtCore
from PyQt4 import QtGui

class AttributeEditor(QtGui.QWidget):
    def __init__(self, parent = None):
        super(AttributeEditor,self).__init__(parent)
        self.init_ui()

    def init_ui(self):
        self.layout = QtGui.QVBoxLayout(self)

        self.label = QtGui.QLabel(self)
        self.label.setText("Attribute Editor")
        self.label.setWordWrap(True)
        self.layout.addWidget(self.label)

        self.pix = QtGui.QPixmap("icons/model/Client.png").scaled(100,100)
        self.label2 = QtGui.QLabel(self)
        self.label2.setPixmap(self.pix)
        self.layout.addWidget(self.label2)

        self.button = QtGui.QPushButton('Button',self)
        self.layout.addWidget(self.button)

        self.setToolTip('This allows editing of currently selected object attributes.')
        #self.layout.setContentsMargins(1,1,1,1)
        self.setMaximumSize(100,200)
        self.setLayout(self.layout)

    def mousePressEvent(self, event):
        self.parent().mousePressEvent(event)

    def mouseReleaseEvent(self, event):
        self.parent().mouseReleaseEvent(event)
<|endoftext|>


<commit_before>from setuptools import find_packages, setup
import os.path

with open(os.path.join(os.path.dirname(__file__), "treq", "_version")) as ver:
    __version__ = ver.readline().strip()

classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Programming Language :: Python",
    "Programming Language :: Python :: 2",
    "Programming Language :: Python :: 2.6",
    "Programming Language :: Python :: 2.7",
    "Programming Language :: Python :: Implementation :: CPython",
    "Programming Language :: Python :: Implementation :: PyPy",
]

setup(
    name="treq",
    version=__version__,
    packages=find_packages(),
    install_requires=["Twisted >= 12.1.0"],
    package_data={"treq" : ["_version"]},
    author="David Reid",
    classifiers=classifiers,
    description="A requests-like API built on top of twisted.web's Agent",
    license="MIT/X",
    url="http://github.com/dreid/treq",
    long_description=file('README.rst').read()
)
<commit_msg>Add author_email<commit_after>from setuptools import find_packages, setup
import os.path

with open(os.path.join(os.path.dirname(__file__), "treq", "_version")) as ver:
    __version__ = ver.readline().strip()

classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Programming Language :: Python",
    "Programming Language :: Python :: 2",
    "Programming Language :: Python :: 2.6",
    "Programming Language :: Python :: 2.7",
    "Programming Language :: Python :: Implementation :: CPython",
    "Programming Language :: Python :: Implementation :: PyPy",
]

setup(
    name="treq",
    version=__version__,
    packages=find_packages(),
    install_requires=["Twisted >= 12.1.0"],
    package_data={"treq" : ["_version"]},
    author="David Reid",
    author_email="dreid@dreid.org",
    classifiers=classifiers,
    description="A requests-like API built on top of twisted.web's Agent",
    license="MIT/X",
    url="http://github.com/dreid/treq",
    long_description=file('README.rst').read()
)
<|endoftext|>


<commit_before>#!/usr/bin/env python

from setuptools import setup, find_packages

setup(
    name='django-slack',

    url="https://chris-lamb.co.uk/projects/django-slack",
    version='4.2.1',
    description="Provides easy-to-use integration between Django projects and "
        "the Slack group chat and IM tool.",

    author="Chris Lamb",
    author_email="chris@chris-lamb.co.uk",
    license="BSD",

    packages=find_packages(),
    include_package_data=True,
    install_requires=(
        'Django>=1.6.8',
        'requests',
        'six',
    ),
)
<commit_msg>Releasing version 4.2.2<commit_after>#!/usr/bin/env python

from setuptools import setup, find_packages

setup(
    name='django-slack',

    url="https://chris-lamb.co.uk/projects/django-slack",
    version='4.2.2',
    description="Provides easy-to-use integration between Django projects and "
        "the Slack group chat and IM tool.",

    author="Chris Lamb",
    author_email="chris@chris-lamb.co.uk",
    license="BSD",

    packages=find_packages(),
    include_package_data=True,
    install_requires=(
        'Django>=1.6.8',
        'requests',
        'six',
    ),
)
<|endoftext|>


<commit_before># -*- coding: utf-8 -*-

from setuptools import setup
from setuptools import find_packages

setup(
    name="threat_intel",
    version='0.0.4',
    provides=['threat_intel'],
    author="Yelp Security",
    url='https://github.com/Yelp/threat_intel',
    setup_requires='setuptools',
    license='Copyright 2015 Yelp',
    author_email="opensource@yelp.com",
    description="Collection of the API calls for various threat intel feeds.",
    packages=find_packages(),
    install_requires=[
        "grequests==0.2.0",
        "simplejson==3.6.5",
    ],
)
<commit_msg>Updating version with unicode strings<commit_after># -*- coding: utf-8 -*-

from setuptools import setup
from setuptools import find_packages

setup(
    name="threat_intel",
    version='0.0.5',
    provides=['threat_intel'],
    author="Yelp Security",
    url='https://github.com/Yelp/threat_intel',
    setup_requires='setuptools',
    license='Copyright 2015 Yelp',
    author_email="opensource@yelp.com",
    description="Collection of the API calls for various threat intel feeds.",
    packages=find_packages(),
    install_requires=[
        "grequests==0.2.0",
        "simplejson==3.6.5",
    ],
)
<|endoftext|>


<commit_before># ===============================================================================
# Copyright 2017 dgketchum
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ===============================================================================

import os

from setuptools import setup

os.environ['TRAVIS_CI'] = 'True'

try:
    from setuptools import setup

    setup_kwargs = {'entry_points': {'console_scripts': ['landsat=landsat.landsat:cli_runner']}}
except ImportError:
    from distutils.core import setup

    setup_kwargs = {'scripts': ['bin/landsat']}

tag = '0.3.88'

setup(name='Landsat578',
      version=tag,
      description='Very simple API to download Landsat data from LT5, LE7, and LC8 from USGS',
      setup_requires=['nose>=1.0'],
      py_modules=['landsat'],
      license='Apache', classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Science/Research',
        'Topic :: Scientific/Engineering :: GIS',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.6'],
      keywords='landsat download hydrology remote sensing',
      author='David Ketchum',
      author_email='dgketchum@gmail.com',
      platforms='Posix; MacOS X; Windows',
      packages=['landsat'],
      download_url='https://github.com/{}/{}/archive/{}.tar.gz'.format('dgketchum', 'Landsat578', tag),
      url='https://github.com/dgketchum',
      test_suite='tests.test_suite.suite', install_requires=['lxml', 'numpy', 'pandas',
                                                             'python-dateutil', 'pytz',
                                                             'requests', 'six', 'future', 'pyyaml'],
      **setup_kwargs)

# ============= EOF ==============================================================
<commit_msg>working on CLI still<commit_after># ===============================================================================
# Copyright 2017 dgketchum
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ===============================================================================

import os

from setuptools import setup

os.environ['TRAVIS_CI'] = 'True'

try:
    from setuptools import setup

    setup_kwargs = {'entry_points': {'console_scripts': ['landsat=landsat.landsat:cli_runner']}}
except ImportError:
    from distutils.core import setup

    setup_kwargs = {'scripts': ['bin/landsat']}

tag = '0.3.89'

setup(name='Landsat578',
      version=tag,
      description='Very simple API to download Landsat data from LT5, LE7, and LC8 from USGS',
      setup_requires=['nose>=1.0'],
      py_modules=['landsat'],
      license='Apache', classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Science/Research',
        'Topic :: Scientific/Engineering :: GIS',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.6'],
      keywords='landsat download hydrology remote sensing',
      author='David Ketchum',
      author_email='dgketchum@gmail.com',
      platforms='Posix; MacOS X; Windows',
      packages=['landsat'],
      download_url='https://github.com/{}/{}/archive/{}.tar.gz'.format('dgketchum', 'Landsat578', tag),
      url='https://github.com/dgketchum',
      test_suite='tests.test_suite.suite', install_requires=['lxml', 'numpy', 'pandas',
                                                             'python-dateutil', 'pytz',
                                                             'requests', 'six', 'future', 'pyyaml'],
      **setup_kwargs)

# ============= EOF ==============================================================
<|endoftext|>


<commit_before># coding: utf-8
"""
A simple yet powerful CloudStack API client for Python and the command-line.
"""

from __future__ import unicode_literals

import sys
from codecs import open
from setuptools import find_packages, setup

with open('README.rst', 'r', encoding='utf-8') as f:
    long_description = f.read()

install_requires = ['pytz', 'requests']
extras_require = {
    'highlight': ['pygments'],
}
tests_require = [
    'pytest',
    'pytest-cache',
    'pytest-cov',
]

if sys.version_info < (3, 0):
    tests_require.append("mock")
elif sys.version_info >= (3, 5):
    extras_require["async"] = ["aiohttp"]
    tests_require.append("aiohttp")

setup(
    name='cs',
    version='2.5.7',
    url='https://github.com/exoscale/cs',
    license='BSD',
    author='Bruno Renié',
    description=__doc__.strip(),
    long_description=long_description,
    packages=find_packages(exclude=['tests']),
    zip_safe=False,
    include_package_data=True,
    platforms='any',
    classifiers=(
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
    ),
    setup_requires=['pytest-runner'],
    install_requires=install_requires,
    extras_require=extras_require,
    tests_require=tests_require,
    entry_points={
        'console_scripts': [
            'cs = cs:main',
        ],
    },
)
<commit_msg>prepare release<commit_after># coding: utf-8
"""
A simple yet powerful CloudStack API client for Python and the command-line.
"""

from __future__ import unicode_literals

import sys
from codecs import open
from setuptools import find_packages, setup

with open('README.rst', 'r', encoding='utf-8') as f:
    long_description = f.read()

install_requires = ['pytz', 'requests']
extras_require = {
    'highlight': ['pygments'],
}
tests_require = [
    'pytest',
    'pytest-cache',
    'pytest-cov',
]

if sys.version_info < (3, 0):
    tests_require.append("mock")
elif sys.version_info >= (3, 5):
    extras_require["async"] = ["aiohttp"]
    tests_require.append("aiohttp")

setup(
    name='cs',
    version='2.5.8',
    url='https://github.com/exoscale/cs',
    license='BSD',
    author='Bruno Renié',
    description=__doc__.strip(),
    long_description=long_description,
    packages=find_packages(exclude=['tests']),
    zip_safe=False,
    include_package_data=True,
    platforms='any',
    classifiers=(
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
    ),
    setup_requires=['pytest-runner'],
    install_requires=install_requires,
    extras_require=extras_require,
    tests_require=tests_require,
    entry_points={
        'console_scripts': [
            'cs = cs:main',
        ],
    },
)
<|endoftext|>


<commit_before>import sys
import os
import argparse

import numpy

from model import SupervisedModel
from anna import util
from anna.datasets import supervised_dataset

def load_stl10_data(train_split):

    # Load STL-10 data
    print 'Loading STL-10 Training Data'
    X_train = numpy.load('/data/stl10_matlab/train_splits/train_X_'
                         + str(train_split)+'.npy')
    y_train = numpy.load('/data/stl10_matlab/train_splits/train_y_'
                         + str(train_split)+'.npy')

    print 'Loading STL-10 Testing Data'
    X_test = numpy.load('/data/stl10_matlab/test_X.npy')
    y_test = numpy.load('/data/stl10_matlab/test_y.npy')

    X_train = numpy.float32(X_train)
    X_train /= 255.0
    X_train *= 2.0

    X_test = numpy.float32(X_test)
    X_test /= 255.0
    X_test *= 2.0

    train_dataset = supervised_dataset.SupervisedDataset(X_train, y_train)
    test_dataset = supervised_dataset.SupervisedDataset(X_test, y_test)
    train_iterator = train_dataset.iterator(mode='sequential', batch_size=128)
    test_iterator = test_dataset.iterator(mode='sequential', batch_size=128)

    return train_iterator, test_iterator

def compute_overall_accuracy(model, normer, mode, iterator):

    accuracy_list = []
    # Compute accuracy on each batch
    i = 0
    for x_batch, y_batch in iterator:

        x_batch = x_batch.transpose(1, 2, 3, 0)
        x_batch = normer.run(x_batch)
        batch_accuracy = model.eval(x_batch, y_batch-1)
        accuracy_list.append(batch_accuracy)
        i += 1

    # Compute overall accuracy
    overall_accuracy = numpy.mean(numpy.hstack(accuracy_list))
    print('\nOverall {} Accuracy: {}\n'.format(mode, overall_accuracy))
    return overall_accuracy

if __name__ == "__main__":

    parser = argparse.ArgumentParser(
        prog='stl10_checkpoint_checker',
        description='Script to select best performing checkpoint on STL10.')
    parser.add_argument(
        "-s", "--split",
        default='0',
        help='Training split of stl10 to use. (0-9)')
    parser.add_argument(
        "checkpoint_dir",
        help='Folder containing all .pkl checkpoint files.')
    args = parser.parse_args()

    train_split = int(args.split)
    if train_split < 0 or train_split > 9:
        raise Exception('Train split must be in range 0-9.')

    checkpoint_dir = args.checkpoint_dir
    if not os.path.exists(checkpoint_dir):
        raise Exception('Checkpoint directory does not exist.')
    checkpoint_list = sorted(os.listdir(checkpoint_dir))

    model = SupervisedModel('xxx', './')
    model.fc4.dropout = 0.0
    model._compile()
    num_channels = model.conv1.filter_shape[0]
    filter_size = model.conv1.filter_shape[1]
    print 'Using model trained on split '+str(train_split)+'\n'

    # Get iterators for stl10 train and test sets
    train_iterator, test_iterator = load_stl10_data(train_split)

    # Create object to local contrast normalize a batch.
    # Note: Every batch must be normalized before use.
    normer = util.Normer2(filter_size=filter_size, num_channels=num_channels)

    train_accuracies = []
    test_accuracies = []

    for i, checkpoint_file in enumerate(checkpoint_list):
        print 'Loading Checkpoint %s' % checkpoint_file
        checkpoint_path = os.path.join(checkpoint_dir, checkpoint_file)
        util.load_checkpoint(model, checkpoint_path)

        print 'Compute Test Accuracy'
        test_accuracies.append(compute_overall_accuracy(
            model, normer, 'test', test_iterator))
        print '\n'

        train_iterator.reset()
        test_iterator.reset()

    max_test_accuracy = numpy.max(test_accuracies)
    max_index = numpy.argmax(test_accuracies)

    max_checkpoint = checkpoint_list[max_index]

    print 'Max Test Accuracy: %.2f' % (max_test_accuracy*100)
    print 'Max Checkpoint: %s' % max_checkpoint
<commit_msg>Fixed model class name in stl10 checkpoint checker.<commit_after>import sys
import os
import argparse

import numpy

from model import CNNModel
from anna import util
from anna.datasets import supervised_dataset

def load_stl10_data(train_split):

    # Load STL-10 data
    print 'Loading STL-10 Training Data'
    X_train = numpy.load('/data/stl10_matlab/train_splits/train_X_'
                         + str(train_split)+'.npy')
    y_train = numpy.load('/data/stl10_matlab/train_splits/train_y_'
                         + str(train_split)+'.npy')

    print 'Loading STL-10 Testing Data'
    X_test = numpy.load('/data/stl10_matlab/test_X.npy')
    y_test = numpy.load('/data/stl10_matlab/test_y.npy')

    X_train = numpy.float32(X_train)
    X_train /= 255.0
    X_train *= 2.0

    X_test = numpy.float32(X_test)
    X_test /= 255.0
    X_test *= 2.0

    train_dataset = supervised_dataset.SupervisedDataset(X_train, y_train)
    test_dataset = supervised_dataset.SupervisedDataset(X_test, y_test)
    train_iterator = train_dataset.iterator(mode='sequential', batch_size=128)
    test_iterator = test_dataset.iterator(mode='sequential', batch_size=128)

    return train_iterator, test_iterator

def compute_overall_accuracy(model, normer, mode, iterator):

    accuracy_list = []
    # Compute accuracy on each batch
    i = 0
    for x_batch, y_batch in iterator:

        x_batch = x_batch.transpose(1, 2, 3, 0)
        x_batch = normer.run(x_batch)
        batch_accuracy = model.eval(x_batch, y_batch-1)
        accuracy_list.append(batch_accuracy)
        i += 1

    # Compute overall accuracy
    overall_accuracy = numpy.mean(numpy.hstack(accuracy_list))
    print('\nOverall {} Accuracy: {}\n'.format(mode, overall_accuracy))
    return overall_accuracy

if __name__ == "__main__":

    parser = argparse.ArgumentParser(
        prog='stl10_checkpoint_checker',
        description='Script to select best performing checkpoint on STL10.')
    parser.add_argument(
        "-s", "--split",
        default='0',
        help='Training split of stl10 to use. (0-9)')
    parser.add_argument(
        "checkpoint_dir",
        help='Folder containing all .pkl checkpoint files.')
    args = parser.parse_args()

    train_split = int(args.split)
    if train_split < 0 or train_split > 9:
        raise Exception('Train split must be in range 0-9.')

    checkpoint_dir = args.checkpoint_dir
    if not os.path.exists(checkpoint_dir):
        raise Exception('Checkpoint directory does not exist.')
    checkpoint_list = sorted(os.listdir(checkpoint_dir))

    model = CNNModel('xxx', './')
    model.fc4.dropout = 0.0
    model._compile()
    num_channels = model.conv1.filter_shape[0]
    filter_size = model.conv1.filter_shape[1]
    print 'Using model trained on split '+str(train_split)+'\n'

    # Get iterators for stl10 train and test sets
    train_iterator, test_iterator = load_stl10_data(train_split)

    # Create object to local contrast normalize a batch.
    # Note: Every batch must be normalized before use.
    normer = util.Normer2(filter_size=filter_size, num_channels=num_channels)

    train_accuracies = []
    test_accuracies = []

    for i, checkpoint_file in enumerate(checkpoint_list):
        print 'Loading Checkpoint %s' % checkpoint_file
        checkpoint_path = os.path.join(checkpoint_dir, checkpoint_file)
        util.load_checkpoint(model, checkpoint_path)

        print 'Compute Test Accuracy'
        test_accuracies.append(compute_overall_accuracy(
            model, normer, 'test', test_iterator))
        print '\n'

        train_iterator.reset()
        test_iterator.reset()

    max_test_accuracy = numpy.max(test_accuracies)
    max_index = numpy.argmax(test_accuracies)

    max_checkpoint = checkpoint_list[max_index]

    print 'Max Test Accuracy: %.2f' % (max_test_accuracy*100)
    print 'Max Checkpoint: %s' % max_checkpoint
<|endoftext|>


<commit_before>#!/bin/env python
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""

# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import subprocess
import re
import sys

GITTAG_PY = """
# This file is originally generated from Git information by running 'setup.py
# install'. Distribution tarballs contain a pre-generated copy of this file.
__gittag__ = '%s'
"""

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()

addtidepool = True

modules_list = ['rapidtide/miscmath',
                'rapidtide/correlate',
                'rapidtide/filter',
                'rapidtide/fit',
                'rapidtide/io',
                'rapidtide/resample',
                'rapidtide/stats',
                'rapidtide/util',
                'rapidtide/multiproc',
                'rapidtide/nullcorrpass',
                'rapidtide/corrpass',
                'rapidtide/corrfit',
                'rapidtide/helper_classes',
                'rapidtide/glmpass',
                'rapidtide/dlfilter',
                'rapidtide/wiener',
                'rapidtide/refine',
                'rapidtide/workflows/parser_funcs']

if addtidepool:
    modules_list.append('rapidtide/tidepoolTemplate_qt5')
    modules_list.append('rapidtide/OrthoImageItem')

script_list = ['rapidtide/scripts/rapidtide2x',
               'rapidtide/scripts/rapidtide',
               'rapidtide/scripts/rapidtide2std',
               'rapidtide/scripts/happy2std',
               'rapidtide/scripts/showxcorr',
               'rapidtide/scripts/aligntcs',
               'rapidtide/scripts/plethquality',
               'rapidtide/scripts/showxcorrx',
               'rapidtide/scripts/ccorrica',
               'rapidtide/scripts/showstxcorr',
               'rapidtide/scripts/resamp1tc',
               'rapidtide/scripts/resamplenifti',
               'rapidtide/scripts/simdata',
               'rapidtide/scripts/fingerprint',
               'rapidtide/scripts/pixelcomp',
               'rapidtide/scripts/spatialdecomp',
               'rapidtide/scripts/temporaldecomp',
               'rapidtide/scripts/spectrogram',
               'rapidtide/scripts/showtc',
               'rapidtide/scripts/histtc',
               'rapidtide/scripts/filttc',
               'rapidtide/scripts/showxy',
               'rapidtide/scripts/spatialfit',
               'rapidtide/scripts/glmfilt',
               'rapidtide/scripts/histnifti',
               'rapidtide/scripts/atlastool',
               'rapidtide/scripts/atlasaverage',
               'rapidtide/scripts/linfit',
               'rapidtide/scripts/happy',
               'rapidtide/scripts/happyx',
               'rapidtide/scripts/happywarp',
               'rapidtide/scripts/applydlfilter',
               'rapidtide/scripts/threeD',
               'rapidtide/scripts/endtidalproc',
               'rapidtide/scripts/tcfrom3col',
               'rapidtide/scripts/physiofreq',
               'rapidtide/scripts/rapidtide_dispatcher',
               # 'rapidtide/scripts/endtidalproc',
               'rapidtide/scripts/showhist',
               'rapidtide/scripts/rapidtide_dispatcher']

if addtidepool:
    script_list.append('rapidtide/scripts/tidepool')

def update_gittag_py():
    if not path.isdir(".git"):
        print("This does not appear to be a Git repository.")
        f = open("rapidtide/_gittag.py", "w")
        f.write(GITTAG_PY % "UNKNOWN-UNKNOWN")
        f.close()
        return
    try:
        p = subprocess.Popen(["git", "describe",
                              "--tags", "--dirty", "--always"],
                             stdout=subprocess.PIPE)
    except EnvironmentError:
        print("unable to run git, leaving rapidtide/_gittag.py alone")
        return
    stdout = p.communicate()[0]
    if p.returncode != 0:
        print("unable to run git, leaving rapidtide/_gittag.py alone")
        return
    # we use tags like "python-rapidtide-0.5", so strip the prefix
    if sys.version_info[0] == 3:
        ver = str(stdout.strip(), "utf-8")
    else:
        ver = stdout.strip()
    print(ver)
    f = open("rapidtide/_gittag.py", "w")
    f.write(GITTAG_PY % ver)
    f.close()

update_gittag_py()

setup(
    name='rapidtide',

    # Versions should comply with PEP440.  For a discussion on single-sourcing
    # the version across setup.py and the project code, see
    # https://packaging.python.org/en/latest/single_source_version.html
    version='1.9.0',

    description='Tools for performing correlation analysis on fMRI data.',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/bbfrederick/rapidtide',

    # Author details
    author="Blaise Frederick",
    author_email="bbfrederick@mclean.harvard.edu",

    # Choose your license
    license='Apache Software License',

    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        # How mature is this project? Common values are
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 5 - Production/Stable',

        # Indicate who your project is intended for
        'Intended Audience :: Science/Research',
        'Topic :: Scientific/Engineering :: Medical Science Apps.',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: Apache Software License',

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
    ],

    # What does your project relate to?
    keywords=['fMRI', 'correlation', 'RIPTiDe', 'noise'],

    # You can just specify the packages manually here if your project is
    # simple. Or you can use find_packages().
    packages=find_packages(exclude=['contrib', 'docs']),

    # Alternatively, if you want to distribute just a my_module.py, uncomment
    # this:
    #   py_modules=["my_module"],
    py_modules=modules_list,

    # List run-time dependencies here.  These will be installed by pip when
    # your project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/requirements.html
    install_requires=["numpy>=1.16",
                        'scipy',
                        'pandas',
                        'scikit-image',
                        'scikit-learn',
                        'nibabel',
                        'matplotlib',
                        'pyfftw',
                        'pyqtgraph',
                        'statsmodels'],

    # List additional groups of dependencies here (e.g. development
    # dependencies). You can install these using the following syntax,
    # for example:
    # $ pip install -e .[dev,test]
    extras_require={
        'jit': ['numba'],
        'doc': [
            'sphinx>=1.5.3',
            'sphinx_rtd_theme',
            'sphinx-argparse',
            'sphinx-gallery',
            'numpydoc',
            'm2r',
            ],
    },

    # If there are data files included in your packages that need to be
    # installed, specify them here.  If using Python 2.6 or less, then these
    # have to be included in MANIFEST.in as well.
    include_package_data=True,
    zip_safe=False,
    package_data={
        'reference': ['reference/*.txt',
                      'reference/*.nii.gz',
                      ],
        'testdata': ['tests/testdata/*.txt',
                      ],
        'testtargets': ['tests/testtargets/*.txt',
                      'tests/testtargets/*.nii.gz',
                      ],
        'tmpdata': ['tests/tmp/.placeholder.txt',
                      ],
    },

    # To provide executable scripts, use entry points in preference to the
    # "scripts" keyword. Entry points provide cross-platform support and allow
    # pip to create the appropriate form of executable for the target platform.
    scripts=script_list,
)
<commit_msg>Removed happyx, added happy_trans<commit_after>#!/bin/env python
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""

# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import subprocess
import re
import sys

GITTAG_PY = """
# This file is originally generated from Git information by running 'setup.py
# install'. Distribution tarballs contain a pre-generated copy of this file.
__gittag__ = '%s'
"""

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()

addtidepool = True

modules_list = ['rapidtide/miscmath',
                'rapidtide/correlate',
                'rapidtide/filter',
                'rapidtide/fit',
                'rapidtide/io',
                'rapidtide/resample',
                'rapidtide/stats',
                'rapidtide/util',
                'rapidtide/multiproc',
                'rapidtide/nullcorrpass',
                'rapidtide/corrpass',
                'rapidtide/corrfit',
                'rapidtide/helper_classes',
                'rapidtide/glmpass',
                'rapidtide/dlfilter',
                'rapidtide/wiener',
                'rapidtide/refine',
                'rapidtide/workflows/parser_funcs']

if addtidepool:
    modules_list.append('rapidtide/tidepoolTemplate_qt5')
    modules_list.append('rapidtide/OrthoImageItem')

script_list = ['rapidtide/scripts/rapidtide2x',
               'rapidtide/scripts/rapidtide',
               'rapidtide/scripts/rapidtide2std',
               'rapidtide/scripts/happy2std',
               'rapidtide/scripts/showxcorr',
               'rapidtide/scripts/aligntcs',
               'rapidtide/scripts/plethquality',
               'rapidtide/scripts/showxcorrx',
               'rapidtide/scripts/ccorrica',
               'rapidtide/scripts/showstxcorr',
               'rapidtide/scripts/resamp1tc',
               'rapidtide/scripts/resamplenifti',
               'rapidtide/scripts/simdata',
               'rapidtide/scripts/fingerprint',
               'rapidtide/scripts/pixelcomp',
               'rapidtide/scripts/spatialdecomp',
               'rapidtide/scripts/temporaldecomp',
               'rapidtide/scripts/spectrogram',
               'rapidtide/scripts/showtc',
               'rapidtide/scripts/histtc',
               'rapidtide/scripts/filttc',
               'rapidtide/scripts/showxy',
               'rapidtide/scripts/spatialfit',
               'rapidtide/scripts/glmfilt',
               'rapidtide/scripts/histnifti',
               'rapidtide/scripts/atlastool',
               'rapidtide/scripts/atlasaverage',
               'rapidtide/scripts/linfit',
               'rapidtide/scripts/happy',
               'rapidtide/scripts/happy_trans',
               'rapidtide/scripts/happywarp',
               'rapidtide/scripts/applydlfilter',
               'rapidtide/scripts/threeD',
               'rapidtide/scripts/endtidalproc',
               'rapidtide/scripts/tcfrom3col',
               'rapidtide/scripts/physiofreq',
               'rapidtide/scripts/rapidtide_dispatcher',
               # 'rapidtide/scripts/endtidalproc',
               'rapidtide/scripts/showhist',
               'rapidtide/scripts/rapidtide_dispatcher']

if addtidepool:
    script_list.append('rapidtide/scripts/tidepool')

def update_gittag_py():
    if not path.isdir(".git"):
        print("This does not appear to be a Git repository.")
        f = open("rapidtide/_gittag.py", "w")
        f.write(GITTAG_PY % "UNKNOWN-UNKNOWN")
        f.close()
        return
    try:
        p = subprocess.Popen(["git", "describe",
                              "--tags", "--dirty", "--always"],
                             stdout=subprocess.PIPE)
    except EnvironmentError:
        print("unable to run git, leaving rapidtide/_gittag.py alone")
        return
    stdout = p.communicate()[0]
    if p.returncode != 0:
        print("unable to run git, leaving rapidtide/_gittag.py alone")
        return
    # we use tags like "python-rapidtide-0.5", so strip the prefix
    if sys.version_info[0] == 3:
        ver = str(stdout.strip(), "utf-8")
    else:
        ver = stdout.strip()
    print(ver)
    f = open("rapidtide/_gittag.py", "w")
    f.write(GITTAG_PY % ver)
    f.close()

update_gittag_py()

setup(
    name='rapidtide',

    # Versions should comply with PEP440.  For a discussion on single-sourcing
    # the version across setup.py and the project code, see
    # https://packaging.python.org/en/latest/single_source_version.html
    version='1.9.0',

    description='Tools for performing correlation analysis on fMRI data.',
    long_description=long_description,

    # The project's main homepage.
    url='https://github.com/bbfrederick/rapidtide',

    # Author details
    author="Blaise Frederick",
    author_email="bbfrederick@mclean.harvard.edu",

    # Choose your license
    license='Apache Software License',

    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        # How mature is this project? Common values are
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 5 - Production/Stable',

        # Indicate who your project is intended for
        'Intended Audience :: Science/Research',
        'Topic :: Scientific/Engineering :: Medical Science Apps.',

        # Pick your license as you wish (should match "license" above)
        'License :: OSI Approved :: Apache Software License',

        # Specify the Python versions you support here. In particular, ensure
        # that you indicate whether you support Python 2, Python 3 or both.
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.7',
    ],

    # What does your project relate to?
    keywords=['fMRI', 'correlation', 'RIPTiDe', 'noise'],

    # You can just specify the packages manually here if your project is
    # simple. Or you can use find_packages().
    packages=find_packages(exclude=['contrib', 'docs']),

    # Alternatively, if you want to distribute just a my_module.py, uncomment
    # this:
    #   py_modules=["my_module"],
    py_modules=modules_list,

    # List run-time dependencies here.  These will be installed by pip when
    # your project is installed. For an analysis of "install_requires" vs pip's
    # requirements files see:
    # https://packaging.python.org/en/latest/requirements.html
    install_requires=["numpy>=1.16",
                        'scipy',
                        'pandas',
                        'scikit-image',
                        'scikit-learn',
                        'nibabel',
                        'matplotlib',
                        'pyfftw',
                        'pyqtgraph',
                        'statsmodels'],

    # List additional groups of dependencies here (e.g. development
    # dependencies). You can install these using the following syntax,
    # for example:
    # $ pip install -e .[dev,test]
    extras_require={
        'jit': ['numba'],
        'doc': [
            'sphinx>=1.5.3',
            'sphinx_rtd_theme',
            'sphinx-argparse',
            'sphinx-gallery',
            'numpydoc',
            'm2r',
            ],
    },

    # If there are data files included in your packages that need to be
    # installed, specify them here.  If using Python 2.6 or less, then these
    # have to be included in MANIFEST.in as well.
    include_package_data=True,
    zip_safe=False,
    package_data={
        'reference': ['reference/*.txt',
                      'reference/*.nii.gz',
                      ],
        'testdata': ['tests/testdata/*.txt',
                      ],
        'testtargets': ['tests/testtargets/*.txt',
                      'tests/testtargets/*.nii.gz',
                      ],
        'tmpdata': ['tests/tmp/.placeholder.txt',
                      ],
    },

    # To provide executable scripts, use entry points in preference to the
    # "scripts" keyword. Entry points provide cross-platform support and allow
    # pip to create the appropriate form of executable for the target platform.
    scripts=script_list,
)
<|endoftext|>


<commit_before>#!/usr/bin/env python
#from distribute_setup import use_setuptools
#use_setuptools()
from setuptools import setup

import re
import platform
import os
import sys

def load_version(filename='yara/version.py'):
    """Parse a __version__ number from a source file"""
    with open(filename) as source:
        text = source.read()
        match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", text)
        if not match:
            msg = "Unable to find version number in {}".format(filename)
            raise RuntimeError(msg)
        version = match.group(1)
        return version

#build the yara package data (shipped yar files)
yara_package_data = []
for path, _, files in os.walk(os.path.join('yara', 'rules')):
    rootpath = path[len('yara') + 1:]
    for f in files:
        if f.endswith('.yar'):
            yara_package_data.append(os.path.join(rootpath, f))

#see if we have a pre-built libyara for this platform
arch, exetype = platform.architecture()
system = platform.system().lower()
machine = platform.machine().lower()

if machine in ['i686', 'x86']:
    machine = 'x86_32'

if system == 'windows':
    ext = '.dll'
else:
    ext = '.so'

libyara_path = os.path.join('.', 'libs', system, machine, "libyara" + ext)
data_files = []
if os.path.exists(libyara_path):
    if system == 'windows':
        install_libdir = os.path.join(sys.prefix, 'DLLs')
    else:
        install_libdir = os.path.join(sys.prefix, 'lib')
    data_files.append((install_libdir, [libyara_path]))

setup(
    name="yara",
    version=load_version(),
    packages=['yara'],
    package_data=dict(yara=yara_package_data),
    data_files=data_files,
    zip_safe=False,
    author="Michael Dorman",
    author_email="mjdorma@gmail.com",
    url="http://code.google.com/p/yara-project/",
    description="Compile YARA rules to test against files or strings",
    long_description=open('README.rst').read(),
    license="Apache Software Licence",
    install_requires = [],
    entry_points={
        'console_scripts': [
            'yara-ctypes = yara.scan:entry'
            ]
    },
    platforms=['cygwin', 'win', 'linux'],
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Other Audience',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: Implementation :: CPython',
        'Topic :: Security',
        'Topic :: System :: Monitoring'
    ],
    test_suite="tests"
)

if not data_files:
    print("\nWARNING: Could not find %s" % libyara_path)
    print("You need to 'make install' libyara for this system/machine")
    print("See http://pythonhosted.org/yara/ for help")

<commit_msg>moved main to cli<commit_after>#!/usr/bin/env python
#from distribute_setup import use_setuptools
#use_setuptools()
from setuptools import setup

import re
import platform
import os
import sys

def load_version(filename='yara/version.py'):
    """Parse a __version__ number from a source file"""
    with open(filename) as source:
        text = source.read()
        match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", text)
        if not match:
            msg = "Unable to find version number in {}".format(filename)
            raise RuntimeError(msg)
        version = match.group(1)
        return version

#build the yara package data (shipped yar files)
yara_package_data = []
for path, _, files in os.walk(os.path.join('yara', 'rules')):
    rootpath = path[len('yara') + 1:]
    for f in files:
        if f.endswith('.yar'):
            yara_package_data.append(os.path.join(rootpath, f))

#see if we have a pre-built libyara for this platform
arch, exetype = platform.architecture()
system = platform.system().lower()
machine = platform.machine().lower()

if machine in ['i686', 'x86']:
    machine = 'x86_32'

if system == 'windows':
    ext = '.dll'
else:
    ext = '.so'

libyara_path = os.path.join('.', 'libs', system, machine, "libyara" + ext)
data_files = []
if os.path.exists(libyara_path):
    if system == 'windows':
        install_libdir = os.path.join(sys.prefix, 'DLLs')
    else:
        install_libdir = os.path.join(sys.prefix, 'lib')
    data_files.append((install_libdir, [libyara_path]))

setup(
    name="yara",
    version=load_version(),
    packages=['yara'],
    package_data=dict(yara=yara_package_data),
    data_files=data_files,
    zip_safe=False,
    author="Michael Dorman",
    author_email="mjdorma@gmail.com",
    url="http://code.google.com/p/yara-project/",
    description="Compile YARA rules to test against files or strings",
    long_description=open('README.rst').read(),
    license="Apache Software Licence",
    install_requires = [],
    entry_points={
        'console_scripts': [
            'yara-ctypes = yara.cli:entry'
            ]
    },
    platforms=['cygwin', 'win', 'linux'],
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Intended Audience :: Other Audience',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX :: Linux',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: Implementation :: CPython',
        'Topic :: Security',
        'Topic :: System :: Monitoring'
    ],
    test_suite="tests"
)

if not data_files:
    print("\nWARNING: Could not find %s" % libyara_path)
    print("You need to 'make install' libyara for this system/machine")
    print("See http://pythonhosted.org/yara/ for help")

<|endoftext|>


<commit_before>from setuptools import setup, find_packages
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

# Get the long description from the relevant file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='django-xor-formfields',

    version='0.0.2',

    description='Mutually Exclusive form field wigets for Django',
    long_description=long_description,

    url='https://github.com/dschep/django-mutuallyexclusive-formfields',

    author='Daniel Schep',
    author_email='dschep@gmail.com',

    license='MIT',

    classifiers=[
        'Development Status :: 3 - Beta',

        'Intended Audience :: Developers',

        'License :: OSI Approved :: MIT License',

        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.0',
        'Programming Language :: Python :: 3.1',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
    ],

    keywords='django development forms',

    packages=['xorformfields', 'xorformfields.forms'],

    install_requires=['django', 'requests'],

    package_data={
        'xorformfields': ['static/mutually_exclusive_widget.js'],
    },
)
<commit_msg>fix numeric dev status<commit_after>from setuptools import setup, find_packages
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

# Get the long description from the relevant file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='django-xor-formfields',

    version='0.0.2',

    description='Mutually Exclusive form field wigets for Django',
    long_description=long_description,

    url='https://github.com/dschep/django-mutuallyexclusive-formfields',

    author='Daniel Schep',
    author_email='dschep@gmail.com',

    license='MIT',

    classifiers=[
        'Development Status :: 4 - Beta',

        'Intended Audience :: Developers',

        'License :: OSI Approved :: MIT License',

        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.0',
        'Programming Language :: Python :: 3.1',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
    ],

    keywords='django development forms',

    packages=['xorformfields', 'xorformfields.forms'],

    install_requires=['django', 'requests'],

    package_data={
        'xorformfields': ['static/mutually_exclusive_widget.js'],
    },
)
<|endoftext|>