Skip to content

Instantly share code, notes, and snippets.

@TosinJayeola
TosinJayeola / example_plot3dseis.py
Created September 28, 2020 13:17 — forked from aadm/example_plot3dseis.py
Python function to plot inline, crossline or horizontal slice from 3D seismic volume. Also included example showing how to load a 3D cube and display it.
import numpy as np
import matplotlib.pyplot as plt
import time
from obspy.io.segy.segy import _read_segy
# sample 3d cube from GOM, download here:
# https://walrus.wr.usgs.gov/namss/survey/b-05-88-la/
filename='G3D1304_005_L88_056_LN_1664-3428.sgy'
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@TosinJayeola
TosinJayeola / svm.py
Created August 1, 2020 05:12 — forked from mblondel/svm.py
Support Vector Machines
# Mathieu Blondel, September 2010
# License: BSD 3 clause
import numpy as np
from numpy import linalg
import cvxopt
import cvxopt.solvers
def linear_kernel(x1, x2):
return np.dot(x1, x2)
@TosinJayeola
TosinJayeola / install_VADER.py
Created May 25, 2020 18:57 — forked from quantra-go-algo/install_VADER.py
Installing VADER in anaconda
!pip install vaderSentiment
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
analyzer = SentimentIntensityAnalyzer()