initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
from .cli import main
|
||||
|
||||
main()
|
||||
@@ -0,0 +1,3 @@
|
||||
VERSION = (1, 0, 0)
|
||||
|
||||
__version__ = '.'.join(map(str, VERSION))
|
||||
@@ -0,0 +1,12 @@
|
||||
from argparse import ArgumentParser
|
||||
|
||||
|
||||
def main():
|
||||
parser = ArgumentParser(prog='cli')
|
||||
parser.add_argument('name', help="The user's name.")
|
||||
args = parser.parse_args()
|
||||
print("Hello, %s!" % args.name)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,9 @@
|
||||
certifi==2018.1.18
|
||||
chardet==3.0.4
|
||||
idna==2.6
|
||||
pkginfo==1.4.1
|
||||
requests==2.21.0
|
||||
requests-toolbelt==0.8.0
|
||||
tqdm==4.19.7
|
||||
twine==1.10.0
|
||||
urllib3==1.24.2
|
||||
@@ -0,0 +1,4 @@
|
||||
from app.cli import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,108 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Note: To use the 'upload' functionality of this file, you must install Twine:
|
||||
# $ pip install -r requirements.txt
|
||||
|
||||
import io
|
||||
import os
|
||||
import sys
|
||||
from shutil import rmtree
|
||||
|
||||
from setuptools import find_packages, setup, Command
|
||||
|
||||
# Package meta-data.
|
||||
NAME = 'mypackage'
|
||||
DESCRIPTION = 'My short description for my project.'
|
||||
URL = 'https://github.com/me/myproject'
|
||||
EMAIL = 'me@example.com'
|
||||
AUTHOR = 'Awesome Soul'
|
||||
REQUIRES_PYTHON = '>=3.6.0'
|
||||
VERSION = None
|
||||
LICENSE = 'MIT'
|
||||
# What packages are required for this module to be executed?
|
||||
REQUIRED = [
|
||||
# 'requests', 'maya', 'records',
|
||||
]
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
with io.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
|
||||
long_description = '\n' + f.read()
|
||||
|
||||
about = {}
|
||||
if not VERSION:
|
||||
with open(os.path.join(here, NAME, '__version__.py')) as f:
|
||||
exec(f.read(), about)
|
||||
else:
|
||||
about['__version__'] = VERSION
|
||||
|
||||
|
||||
class UploadCommand(Command):
|
||||
"""Support setup.py upload."""
|
||||
|
||||
description = 'Build and publish the package.'
|
||||
user_options = []
|
||||
|
||||
@staticmethod
|
||||
def status(s):
|
||||
"""Prints things in bold."""
|
||||
print('\033[1m{0}\033[0m'.format(s))
|
||||
|
||||
def initialize_options(self):
|
||||
pass
|
||||
|
||||
def finalize_options(self):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
self.status('Removing previous builds…')
|
||||
rmtree(os.path.join(here, 'dist'))
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
self.status('Building Source and Wheel (universal) distribution…')
|
||||
os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))
|
||||
|
||||
self.status('Uploading the package to PyPi via Twine…')
|
||||
os.system('twine upload dist/*')
|
||||
|
||||
self.status('Pushing git tags…')
|
||||
os.system('git tag v{0}'.format(about['__version__']))
|
||||
os.system('git push --tags')
|
||||
|
||||
sys.exit()
|
||||
|
||||
setup(
|
||||
name=NAME,
|
||||
version=about['__version__'],
|
||||
description=DESCRIPTION,
|
||||
long_description=long_description,
|
||||
author=AUTHOR,
|
||||
author_email=EMAIL,
|
||||
python_requires=REQUIRES_PYTHON,
|
||||
url=URL,
|
||||
py_modules=['mypackage'],
|
||||
|
||||
entry_points={
|
||||
'console_scripts': ['app=cli:main'],
|
||||
},
|
||||
install_requires=REQUIRED,
|
||||
include_package_data=True,
|
||||
license=LICENSE,
|
||||
classifiers=[
|
||||
# Trove classifiers
|
||||
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: Implementation :: CPython',
|
||||
'Programming Language :: Python :: Implementation :: PyPy'
|
||||
],
|
||||
# $ setup.py publish support.
|
||||
cmdclass={
|
||||
'upload': UploadCommand,
|
||||
},
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
import unittest
|
||||
|
||||
class ApplicationTests(unittest.TestCase):
|
||||
|
||||
def test_hello(self):
|
||||
self.assertTrue(True)
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# How-to-identify-Spam-using-Natural-Language-Processing-NLP-
|
||||
The purpose of this article is to show you how to detect spam in SMS.
|
||||
For that, we use a dataset from the UCI datasets, which is a public set that contain SMS labelled messages that have been collected for mobile phone spam research.
|
||||
It has one collection composed by 5.574 SMS phone messages in English, tagged according being legitimate (ham) or spam.
|
||||
Therefore, we will train a model to learn to automatically discriminate between ham / spam. Then we will use "test data" to test the model.
|
||||
Finally to evaluate if our model is efficient, we will calculate Accuracy, Classification report and Confusion Matrix.
|
||||
|
||||
For more information see https://medium.com/p/af91f4170113/edit
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user