Skip to content

Instantly share code, notes, and snippets.

View metasyn's full-sized avatar

Xander Johnson metasyn

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
# Xander Johnson @metasyn
import sys
import exec_anaconda
try:
exec_anaconda.exec_anaconda()
except Exception as e:
import cexc
cexc.abort(e)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import splunk.Intersplunk
import exec_anaconda
try:
exec_anaconda.exec_anaconda()
except Exception as e:
import cexc
cexc.abort(e)
sys.exit(1)
import sys
import exec_anaconda
try:
exec_anaconda.exec_anaconda()
except Exception as e:
import cexc
cexc.abort(e)
sys.exit(1)
# Import this to get our "chunked" handler
from cexc import BaseChunkHandler

requirements

WORK IN PROGRESS

1.) Python for Scientific Computing App

2.) Splunk ML Toolkit >=1.0

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
demo@ip-10-0-0-200:/opt/splunk/bin$ ./splunk btool inputs list http --debug
/opt/splunk/etc/apps/splunk_httpinput/local/inputs.conf [http]
/opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf dedicatedIoThreads = 2
/opt/splunk/etc/apps/splunk_httpinput/local/inputs.conf disabled = 0
/opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf enableSSL = 1
host = splunk00
index = default
/opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf maxSockets = 0
/opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf maxThreads = 0
/opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf port = 8088
#!/usr/bin/env python
import sys
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.decomposition import LatentDirichletAllocation
import pandas as pd
import numpy as np