Unverified Commit a0592714 authored by Cédric Bonhomme's avatar Cédric Bonhomme
Browse files

Refactorization.

parent b4b3ae56
# Created by https://www.gitignore.io/api/python
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# IPython Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# dotenv
.env
# virtualenv
venv/
ENV/
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject
......@@ -15,13 +15,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#exclude linking/*.pyx
#exclude primo/linking/*.pyx
include *.txt
include primo.py
include make_plots_and_stats.py
include performance_experiments.py
include bin/primo
include bin/make_plots_and_stats
include bin/performance_experiments
include setup.py
include linking/*.c
include linking/*.pxd
include linking/*.pxi
include linking/*.py
include primo/linking/*.c
include primo/linking/*.pxd
include primo/linking/*.pxi
include primo/linking/*.py
To build:
# Installation
python setup.py build
python setup.py build
The script can be run directly from the top-level directory afterwards.
It can also be installed with python setup.py install
The script can be run directly from the top-level directory afterwards.
For further instructions, please see http://siis.cse.psu.edu/primo/
......@@ -25,7 +25,7 @@ import sys
import gflags
from linking.plots_and_stats import MakePlotsAndStats
from primo.linking.plots_and_stats import MakePlotsAndStats
FLAGS = gflags.FLAGS
......
......@@ -29,7 +29,7 @@ import time
import gflags
from linking.find_links import FindLinksAndLogExceptions
from primo.linking.find_links import FindLinksAndLogExceptions
LOGGER = logging.getLogger(__name__)
......
......@@ -36,7 +36,7 @@ import time
import gflags
from linking import find_links
from primo.linking import find_links
FLAGS = gflags.FLAGS
......
......@@ -15,12 +15,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Application class and factory."""
from linking.components cimport Component
from linking.components cimport MakeComponent
from linking.intents cimport ComponentIntent
from linking.attribute_matching cimport AttributeMap
from primo.linking.components cimport Component
from primo.linking.components cimport MakeComponent
from primo.linking.intents cimport ComponentIntent
from primo.linking.attribute_matching cimport AttributeMap
from linking import ic3_data_pb2
from primo.linking import ic3_data_pb2
cdef set SAMPLES = set()
......
......@@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from linking.applications cimport Application
from primo.linking.applications cimport Application
cdef int GetSkippedFilterCount()
cdef Component MakeComponent(object component_pb, Application application,
......
......@@ -16,11 +16,11 @@
# limitations under the License.
"""A class and factory for Android application components."""
from linking.applications cimport Application
from linking.target_data cimport AddComponent
from linking.intent_filters cimport IntentFilter
from linking.intent_filters cimport MakeIntentFilter
from linking.intents cimport MakeComponentIntent
from primo.linking.applications cimport Application
from primo.linking.target_data cimport AddComponent
from primo.linking.intent_filters cimport IntentFilter
from primo.linking.intent_filters cimport MakeIntentFilter
from primo.linking.intents cimport MakeComponentIntent
cdef int _id = 0
......
......@@ -20,8 +20,8 @@ from google.protobuf import text_format
import logging
import os
from linking import applications
from linking import ic3_data_pb2
from primo.linking import applications
from primo.linking import ic3_data_pb2
LOGGER = logging.getLogger(__name__)
......
......@@ -16,8 +16,8 @@
# limitations under the License.
cimport numpy as np
from linking.components cimport Component
from linking.intents cimport Intent
from primo.linking.components cimport Component
from primo.linking.intents cimport Intent
ctypedef np.int8_t DTYPE_t
......
......@@ -24,15 +24,15 @@ import logging
import numpy as np
import time
from linking.applications cimport Application
from linking.components cimport Component
from linking.target_data cimport GetAppsMatching
from linking.target_data cimport GetComponentsOfApp
from linking.target_data cimport GetComponentsWithKind
from linking.target_data cimport GetComponentsWithName
from linking.target_data cimport GetExportedComponentCount
from linking.target_data cimport GetExportedComponents
from linking.intents cimport Intent
from primo.linking.applications cimport Application
from primo.linking.components cimport Component
from primo.linking.target_data cimport GetAppsMatching
from primo.linking.target_data cimport GetComponentsOfApp
from primo.linking.target_data cimport GetComponentsWithKind
from primo.linking.target_data cimport GetComponentsWithName
from primo.linking.target_data cimport GetExportedComponentCount
from primo.linking.target_data cimport GetExportedComponents
from primo.linking.intents cimport Intent
DTYPE = np.int8
......
......@@ -16,9 +16,9 @@
# limitations under the License.
cimport numpy as np
from linking.intent_filters cimport IntentFilter
from linking.intents cimport ComponentIntent
from linking.intents cimport Intent
from primo.linking.intent_filters cimport IntentFilter
from primo.linking.intents cimport ComponentIntent
from primo.linking.intents cimport Intent
ctypedef np.int8_t DTYPE_t
......
......@@ -21,36 +21,36 @@ DEF DEBUG = False
cimport cython
cimport numpy as np
from linking.target_data import BASE_TYPE
from linking.util import Powerset
from primo.linking.target_data import BASE_TYPE
from primo.linking.util import Powerset
import logging
import numpy as np
import time
from linking.intent_data cimport GetAttributeMaps
from linking.intent_data cimport GetPreciseIntents
from linking.target_data cimport GetExportedFilters
from linking.target_data cimport GetFiltersOfApp
from linking.target_data cimport GetFiltersWithUsedPermission
from linking.target_data cimport GetFiltersWithAction
from linking.target_data cimport GetFiltersWithAnyAction
from linking.target_data cimport GetFiltersWithBaseTypes
from linking.target_data cimport GetFiltersWithCategories
from linking.target_data cimport GetFiltersWithHost
from linking.target_data cimport GetFiltersWithKind
from linking.target_data cimport GetFiltersWithPath
from linking.target_data cimport GetFiltersWithPort
from linking.target_data cimport GetFiltersWithScheme
from linking.target_data cimport GetFiltersWithType
from linking.target_data cimport GetFiltersWithTypes
from linking.target_data cimport GetFiltersWithoutType
from linking.target_data cimport GetNoDataFilters
from linking.intent_filters cimport IntentFilter
from linking.intents cimport ComponentIntent
from linking.intents cimport Intent
from linking.attribute_matching cimport NonEmptyIntersection
include 'linking/constants.pxi'
from primo.linking.intent_data cimport GetAttributeMaps
from primo.linking.intent_data cimport GetPreciseIntents
from primo.linking.target_data cimport GetExportedFilters
from primo.linking.target_data cimport GetFiltersOfApp
from primo.linking.target_data cimport GetFiltersWithUsedPermission
from primo.linking.target_data cimport GetFiltersWithAction
from primo.linking.target_data cimport GetFiltersWithAnyAction
from primo.linking.target_data cimport GetFiltersWithBaseTypes
from primo.linking.target_data cimport GetFiltersWithCategories
from primo.linking.target_data cimport GetFiltersWithHost
from primo.linking.target_data cimport GetFiltersWithKind
from primo.linking.target_data cimport GetFiltersWithPath
from primo.linking.target_data cimport GetFiltersWithPort
from primo.linking.target_data cimport GetFiltersWithScheme
from primo.linking.target_data cimport GetFiltersWithType
from primo.linking.target_data cimport GetFiltersWithTypes
from primo.linking.target_data cimport GetFiltersWithoutType
from primo.linking.target_data cimport GetNoDataFilters
from primo.linking.intent_filters cimport IntentFilter
from primo.linking.intents cimport ComponentIntent
from primo.linking.intents cimport Intent
from primo.linking.attribute_matching cimport NonEmptyIntersection
include 'primo/linking/constants.pxi'
DTYPE = np.int8
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment