Пример #1
0
def getMetadata(accountId, vpcList, credentials, readOnly):
  
  accountDetailsList = [] 
  currentAccount = accountId
  key=inputKey+metadataFileName

  print "calling downloaddocument"
  supportingFunctions.downloadDocument(inputS3BucketName, key, metadataPath, master_role_credentials)
  if accountId != '':
    if vpcList != ():
      mdata=metadata.readMetadata(metadataPath)
      if mdata == None:
        print "No meta data available."
        sys.exit(0)
      accountDetails=metadata.checkAccountInMetadata(accountId, mdata)
      accountDetailsList.append(accountDetails)
      vm_validation(accountId,credentials, vpcList, accountDetailsList, readOnly)
def getActiveAccountList(metadataPath, activeCsvPath):
  accountIdList=[]
  accountDetailsList=[]
  try:
    accountList=metadata.getActiveAccounts(activeCsvPath)
    if accountList == []:
      print "No active Accounts."
      sys.exit(0)
    mdata=metadata.readMetadata(metadataPath)
    if mdata == None:
      print "No meta data available."
      sys.exit(0)

    for accountId in accountList:
      accountDetails=metadata.checkAccountInMetadata(accountId, mdata)
      if accountDetails is not None:
        accountDetailsList.append(accountDetails)  
        accountIdList.append(accountId)
  except Exception as e:
    print e.message
  return accountIdList, accountDetailsList
Пример #3
0
    from metadata import readMetadata
    import replaygain

    opts, args = parse_args()

    if len(args) != 2:
        sys.exit(1)
        cmd = './' + os.path.basename(sys.argv[0]) + ' -h'
        os.system(cmd)
        sys.exit(1)

    startTime = float(opts.startTime)
    endTime = float(opts.endTime)
    pool = essentia.Pool()
    readMetadata(args[0], pool)
    replaygain.compute(args[0], pool, startTime, endTime)
    rgain, sampleRate, downmix = getAnalysisMetadata(pool)

    loader = streaming.EqloudLoader(filename=args[0],
                                    sampleRate=sampleRate,
                                    startTime=startTime,
                                    endTime=endTime,
                                    replayGain=rgain,
                                    downmix=downmix)

    compute(loader.audio,
            loader.audio,
            pool,
            startTime,
            endTime,
Пример #4
0
    if len(args) != 2: #3:
        print "Incorrect number of arguments\n", essentia_usage
        sys.exit(1)


    #profile = args[0]
    input_file = args[0]
    output_file = args[1]

    pool = Pool()
    startTime = float(opt.startTime)
    endTime = float(opt.endTime)

    # compute descriptors

    readMetadata(input_file, pool)
    INFO('Process step 1: Replay Gain')
    replaygain.compute(input_file, pool, startTime, endTime)

    segments_namespace=[]
    if opt.segmentation:
        INFO('Process step 2: Low Level')
        computeLowLevel(input_file, pool, startTime, endTime)
        segmentation.compute(input_file, pool, startTime, endTime)
        segments = pool['segmentation.timestamps']
        for i in xrange(len(segments)-1):
            startTime = segments[i]
            endTime = segments[i+1]

            INFO('**************************************************************************')
            INFO('Segment ' + str(i) + ': processing audio from ' + str(startTime) + 's to ' + str(endTime) + 's')
Пример #5
0
    from metadata import readMetadata
    import replaygain

    opts, args = parse_args()

    if len(args) != 2:
        sys.exit(1)
        cmd = './'+os.path.basename(sys.argv[0])+ ' -h'
        os.system(cmd)
        sys.exit(1)

    startTime = float(opts.startTime)
    endTime=float(opts.endTime)
    pool = essentia.Pool()
    readMetadata(args[0], pool)
    replaygain.compute(args[0], pool, startTime, endTime)
    rgain, sampleRate, downmix = getAnalysisMetadata(pool)

    loader = streaming.EqloudLoader(filename = args[0],
                                    sampleRate = sampleRate,
                                    startTime = startTime,
                                    endTime = endTime,
                                    replayGain = rgain,
                                    downmix = downmix)

    compute(loader.audio, loader.audio, pool, startTime, endTime,
            sampleRate=analysisSampleRate)

    essentia.run(loader)
    if len(args) != 2:  #3:
        print "Incorrect number of arguments\n", essentia_usage
        sys.exit(1)

    #profile = args[0]
    input_file = args[0]
    output_file = args[1]

    pool = Pool()
    startTime = float(opt.startTime)
    endTime = float(opt.endTime)

    # compute descriptors

    readMetadata(input_file, pool)
    INFO('Process step 1: Replay Gain')
    replaygain.compute(input_file, pool, startTime, endTime)

    segments_namespace = []
    if opt.segmentation:
        INFO('Process step 2: Low Level')
        computeLowLevel(input_file, pool, startTime, endTime)
        segmentation.compute(input_file, pool, startTime, endTime)
        segments = pool['segmentation.timestamps']
        for i in xrange(len(segments) - 1):
            startTime = segments[i]
            endTime = segments[i + 1]

            INFO(
                '**************************************************************************'
        print "Incorrect number of arguments\n", essentia_usage
        sys.exit(1)


    #profile = args[0]
    input_file = args[0]
    output_file = args[1]

    neqPool = Pool()
    eqPool = Pool()
    startTime = float(opt.startTime)
    endTime = float(opt.endTime)

    # compute descriptors

    readMetadata(input_file, eqPool)
    INFO('Process step 1: Replay Gain')
    replaygain.compute(input_file, eqPool, startTime, endTime)

    segments_namespace=[]
    neqPool.merge(eqPool, 'replace')
    if opt.segmentation:
        INFO('Process step 2: Low Level')
        computeLowLevel(input_file, neqPool, eqPool, startTime, endTime)
        segmentation.compute(input_file, eqPool, startTime, endTime)
        segments = eqPool['segmentation.timestamps']
        for i in xrange(len(segments)-1):
            startTime = segments[i]
            endTime = segments[i+1]

            INFO('**************************************************************************')
Пример #8
0
    if len(args) != 2:  #3:
        print "Incorrect number of arguments\n", essentia_usage
        sys.exit(1)

    #profile = args[0]
    input_file = args[0]
    output_file = args[1]

    neqPool = Pool()
    eqPool = Pool()
    startTime = float(opt.startTime)
    endTime = float(opt.endTime)

    # compute descriptors

    readMetadata(input_file, eqPool)
    INFO('Process step 1: Replay Gain')
    replaygain.compute(input_file, eqPool, startTime, endTime)

    segments_namespace = []
    neqPool.merge(eqPool, 'replace')
    if opt.segmentation:
        INFO('Process step 2: Low Level')
        computeLowLevel(input_file, neqPool, eqPool, startTime, endTime)
        segmentation.compute(input_file, eqPool, startTime, endTime)
        segments = eqPool['segmentation.timestamps']
        for i in xrange(len(segments) - 1):
            startTime = segments[i]
            endTime = segments[i + 1]

            INFO(