예제 #1
0
def exec_anaconda_or_die():
    try:
        exec_anaconda.exec_anaconda()
    except Exception as e:
        cexc.abort(e)
        sys.exit(1)
예제 #2
0
import exec_anaconda
exec_anaconda.exec_anaconda()

import sys
import os
print sys.path


def test_openssl():
    import OpenSSL
    print OpenSSL.__file__


def test_splunk_rest():
    import splunk.rest


def test_requests():
    import requests
    url = "https://127.0.0.1:8089/servicesNS/nobody/system/storage/collections/data/SavedSearchHistory"
    r = requests.get(url, auth=("admin", "changeme"), verify=False)
    print r.text


if __name__ == "__main__":
    import nose
    nose.runmodule()
예제 #3
0
파일: qperform.py 프로젝트: Dragut/applog
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 09 11:21:36 2018

@author: s59018
"""

import exec_anaconda
exec_anaconda.exec_anaconda()
import numpy as np
from scipy.optimize import curve_fit
import splunk.Intersplunk 
def func(r,  q):
  #return a * np.exp(-b * x)c
  return  1-np.exp(-q * r) 

def queueanalyzer(percentiles):
     if len(percentiles)<10:
         exit(1)
     x=np.arange(0.1,1.1,0.1)
     x[9]=0.95
     popt, pcov=curve_fit(func, percentiles,x)
     return popt[0]
# this call populates the results variable with all the events passed into the search script:
results,dummyresults,settings = splunk.Intersplunk.getOrganizedResults()

# Iterate over all the events:

  # for each results, add a 'shape' attribute, calculated from the raw event text
for result in results:
       arr=np.arange(10,dtype=float)