Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

DealStat Utilities

Project description

DealStat Utilities

.. image::

.. image::

.. image::
:alt: Documentation Status

.. image::
:alt: Updates

DealStat Utilities

* Free software: MIT license

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)

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 import Embeddings

Embed = Embeddings()

# Download embeddings

# Unzip embeddings

# Generate embeddings look up dict for given dimension
dim = 200
embedding_dict = Embed.generate(loc='.', dim=dim)


This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter:
.. _`audreyr/cookiecutter-pypackage`:


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.

Files for dealstat, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size dealstat-0.1.5-py2.py3-none-any.whl (7.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size dealstat-0.1.5-py3.6.egg (11.6 kB) File type Egg Python version 3.6 Upload date Hashes View
Filename, size dealstat-0.1.5.tar.gz (12.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page