DealStat Utilities
Project description
=================
DealStat Utilities
=================
.. image:: https://img.shields.io/pypi/v/dealstat.svg
:target: https://pypi.python.org/pypi/dealstat
.. image:: https://img.shields.io/travis/ecatkins/dealstat.svg
:target: https://travis-ci.org/ecatkins/dealstat
.. image:: https://readthedocs.org/projects/dealstat/badge/?version=latest
:target: https://dealstat.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/ecatkins/dealstat/shield.svg
:target: https://pyup.io/repos/github/ecatkins/dealstat/
:alt: Updates
DealStat Utilities
* Free software: MIT license
Dealstat
--------
Generic functions that may be moved to specific modules at some point:::
from dealstat.dealstat import *
# generate random letter based ID of given length
my_id = unique_id(30)
Boto
--------
Simplifies some of AWS' Boto3 functionality (at the moment, just S3)
* First save `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` as environment variables::
from dealstat.boto import Boto
s3 = Boto('s3')
location1 = {'bucket':'<some-bucket>', 'key': '<some-key'>}
location2 = {'bucket':'<some-other-bucket>', 'key': '<some-other-key'>}
# Get temporary pre-signed url
url = s3.get_temp_url(location1)
# Move object from one bucket/key to another
s3.move_object(location1, location2)
# Upload file
file_path = '/some/file/path.txt'
s3.upload_file(file_path, location1)
# Download file
destination_file_path = 'local/file/path2.txt'
s3.download_file(destination_file_path, location2)
# List contents of bucket
# Use prefix='some-prefix' to search for specific key prefixes
# Use exclude_dirs=True to not return directories in result
s3.list_bucket('<some-bucket'>, prefix=None, exclude_dirs=True)
Machine Learning
--------
Random utilities useful in ML prototyping
* Download and use Standform NLP Glove Embedings ::
from dealstat.ml import Embeddings
Embed = Embeddings()
# Download embeddings
Embed.download_embeddings()
# Unzip embeddings
Embed.extract_embeddings()
# Generate embeddings look up dict for given dimension
dim = 200
embedding_dict = Embed.generate(loc='.', dim=dim)
Credits
-------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
0.1.0 (2018-08-23)
------------------
* First release on PyPI.
DealStat Utilities
=================
.. image:: https://img.shields.io/pypi/v/dealstat.svg
:target: https://pypi.python.org/pypi/dealstat
.. image:: https://img.shields.io/travis/ecatkins/dealstat.svg
:target: https://travis-ci.org/ecatkins/dealstat
.. image:: https://readthedocs.org/projects/dealstat/badge/?version=latest
:target: https://dealstat.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/ecatkins/dealstat/shield.svg
:target: https://pyup.io/repos/github/ecatkins/dealstat/
:alt: Updates
DealStat Utilities
* Free software: MIT license
Dealstat
--------
Generic functions that may be moved to specific modules at some point:::
from dealstat.dealstat import *
# generate random letter based ID of given length
my_id = unique_id(30)
Boto
--------
Simplifies some of AWS' Boto3 functionality (at the moment, just S3)
* First save `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` as environment variables::
from dealstat.boto import Boto
s3 = Boto('s3')
location1 = {'bucket':'<some-bucket>', 'key': '<some-key'>}
location2 = {'bucket':'<some-other-bucket>', 'key': '<some-other-key'>}
# Get temporary pre-signed url
url = s3.get_temp_url(location1)
# Move object from one bucket/key to another
s3.move_object(location1, location2)
# Upload file
file_path = '/some/file/path.txt'
s3.upload_file(file_path, location1)
# Download file
destination_file_path = 'local/file/path2.txt'
s3.download_file(destination_file_path, location2)
# List contents of bucket
# Use prefix='some-prefix' to search for specific key prefixes
# Use exclude_dirs=True to not return directories in result
s3.list_bucket('<some-bucket'>, prefix=None, exclude_dirs=True)
Machine Learning
--------
Random utilities useful in ML prototyping
* Download and use Standform NLP Glove Embedings ::
from dealstat.ml import Embeddings
Embed = Embeddings()
# Download embeddings
Embed.download_embeddings()
# Unzip embeddings
Embed.extract_embeddings()
# Generate embeddings look up dict for given dimension
dim = 200
embedding_dict = Embed.generate(loc='.', dim=dim)
Credits
-------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
0.1.0 (2018-08-23)
------------------
* First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dealstat-0.1.5.tar.gz
(12.9 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
dealstat-0.1.5-py3.6.egg
(11.6 kB
view details)
File details
Details for the file dealstat-0.1.5.tar.gz.
File metadata
- Download URL: dealstat-0.1.5.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8be8f7d3547c0d32476b1312baf91ad6c208064934851878661b19831e260654
|
|
| MD5 |
d82d7c36d8ab1c44d740cbdd5cce00db
|
|
| BLAKE2b-256 |
1f43600081cc93e71ae67fa0a97eda4a9cd0b0935804227fe585bcde184aab97
|
File details
Details for the file dealstat-0.1.5-py3.6.egg.
File metadata
- Download URL: dealstat-0.1.5-py3.6.egg
- Upload date:
- Size: 11.6 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b72513f4d2e0d522b44bbfd1aa754b1bea307fcd8ff311d32bf8b694ff19705
|
|
| MD5 |
3ba588bfa513e67bd7b15a1186b927d2
|
|
| BLAKE2b-256 |
931e4d95fe80695f298dda3e9dd3066caac17faea0bace3f774eb40255a49650
|
File details
Details for the file dealstat-0.1.5-py2.py3-none-any.whl.
File metadata
- Download URL: dealstat-0.1.5-py2.py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a853210155446a661575837e73b274733d620ae1a79e99f0b5353b34755014f1
|
|
| MD5 |
532ef42ed200f2739abfbdeb38520d7a
|
|
| BLAKE2b-256 |
25a8cb733e4ac6ea7fa62dec1473aa3b2f67b73421644f8fc2b43dbcd1ed63a9
|