Example #1
0
 def __init__(self, csv_file):
     csv_data = pd.read_csv(csv_file)
     self.filenames = []
     self.labels = []
     for i in range(0, len(csv_data)):
         # Retrieve Youtube video url of Discogs release.
         discogs_id = csv_data.iloc[i, 0]
         release = get_release(discogs_id)
         video_url = release.videos[0].url
         # Download the .wav of the video, store it.
         download_wav(video_url)
         filename = utils.video_url_to_wav_filename(video_url)
         # Add to this data set.
         self.filenames.append(filename)
         self.labels.append(release.genres[0])
Example #2
0
#    http://www.apache.org/licenses/LICENSE-2.0
#

# Import from the Standard Library
from distutils import core
from os import listdir
from os.path import join
from sys import executable

# Import from lpod
from release import has_git, get_release, get_git_files


if has_git():
    # Make the version.txt file
    release = get_release()
    open('version.txt', 'w').write(release)
    # Make the MANIFEST file and search for the data
    filenames = get_git_files()
    filenames = [ name for name in filenames if not name.startswith('test') ]
    filenames.extend(['MANIFEST', 'version.txt'])
    open('MANIFEST', 'w').write('\n'.join(filenames))
else:
    release = open('version.txt').read().strip()
    filenames = [ line.strip() for line in open('MANIFEST') ]

# Find all non-Python source
data_files = [ name for name in filenames if not name.endswith('.py') ]

# Find all the scripts => It's easy: all the files in scripts/
scripts = [ join('scripts', filename) for filename in listdir('scripts') ]
Example #3
0
#    http://www.apache.org/licenses/LICENSE-2.0
#

# Import from the Standard Library
from distutils import core
from os import listdir
from os.path import join
from sys import executable

# Import from lpod
from release import has_git, get_release, get_git_files

if has_git():
    # Make the version.txt file
    try:
        release = get_release()
    except ValueError:
        release = 'unknown-version'
    open('version.txt', 'w').write(release)
    # Make the MANIFEST file and search for the data
    filenames = get_git_files()
    filenames = [name for name in filenames if not name.startswith('test')]
    filenames.extend(['MANIFEST', 'version.txt'])
    open('MANIFEST', 'w').write('\n'.join(filenames))
else:
    release = open('version.txt').read().strip()
    filenames = [line.strip() for line in open('MANIFEST')]

# Find all non-Python source
data_files = [name for name in filenames if not name.endswith('.py')]
Example #4
0
#

from setuptools import setup
import os
from sys import executable
import re

# Import local
from release import has_git, get_release

g = {}
execfile(os.path.join('lpod', '_version.py'), g)
lpod_version = g['__version__']

if has_git():
    release = '-'.join((lpod_version, get_release()))
else:
    release = lpod_version

# Find all the scripts => It's easy: all the files in scripts/
scripts = [
    os.path.join('scripts', filename) for filename in os.listdir('scripts')
]

# Make the python_path.txt file
open('python_path.txt', 'w').write(executable)

setup(description='lpOD Library',
      license='GPLv3 + Apache v2',
      name='lpod-python',
      package_data={'': ['templates/*']},
Example #5
0
#

from setuptools import setup
import os
from sys import executable
import re

# Import local
from release import has_git, get_release

g = {}
execfile(os.path.join('lpod', '_version.py'), g)
lpod_version = g['__version__']

if has_git():
    release = '-'.join((lpod_version, get_release()))
else:
    release = lpod_version

# Find all the scripts => It's easy: all the files in scripts/
scripts = [ os.path.join('scripts', filename)
           for filename in os.listdir('scripts') ]

# Make the python_path.txt file
open('python_path.txt', 'w').write(executable)

setup(description='lpOD Library',
      license='GPLv3 + Apache v2',
      name='lpod-python',
      package_data={'': ['templates/*']},
      package_dir={'lpod': 'lpod'},