Rev 0 | Rev 1 | Rev 2 | segyio r |
segyio w |
||
---|---|---|---|---|---|---|
Byte order | ||||||
Big endian | 1 | 1 | 1 | |||
Little endian | 0 | 0 | 1 | |||
Pairwise byte-swapped | 0 | 0 | 1 | |||
Number formats | ||||||
8-bit int | 0 | 1 | 1 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.patches import Rectangle | |
import requests | |
from io import StringIO | |
from welly import Well | |
# Fetch LAS file. | |
url = "https://dropbox.com/s/n52qezp5byap4mi/WellA.las?raw=1" | |
r = requests.get(url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
arr = np.random.randint(0, 256, (200, 200), dtype=np.uint8) | |
def func(arr1d): | |
kernel = np.ones(3) / 3 | |
return np.convolve(arr1d, kernel, mode='same') | |
first_pass = np.apply_along_axis(func, axis=0, arr=arr) | |
final_result = np.apply_along_axis(func, axis=1, arr=first_pass) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import scipy.signal as ss | |
def to_volume(points, max_mb=10): | |
""" | |
Convert N x 3 array of points in a point cloud to a 3D image | |
or 'volume'. The degree of upscaling is controlled by ``max_mb`` | |
which is the target size of the 3D image in memory. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import requests | |
import numpy as np | |
from PIL import Image | |
import matplotlib.pyplot as plt | |
from matplotlib.colors import LinearSegmentedColormap as LSC | |
from scipy.interpolate import Rbf | |
class HolidayCard(): | |
"""A holiday card class.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colours = { | |
'Alkali-feldpar syenite': (244, 60, 108), | |
'Alkali-feldspar granite': (255, 209, 220), | |
'Alkali-feldspar rhyolite': (254, 220, 126), | |
'Alkali-feldspar trachyte': (254, 183, 134), | |
'Alkalic intrusive rock': (255, 111, 145), | |
'Alkalic volcanic rock': (194, 65, 0), | |
'Alkaline basalt': (169, 101, 55), | |
'Alluvial fan': (255, 255, 183), | |
'Alluvial terrace': (250, 238, 122), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# Make some fake data | |
# Make array with 100 rows, 100 columns, and 6 'features' (different maps) | |
shape = (100, 100, 3) | |
data = np.random.random(shape) | |
# Pretend it has NaNs around edge. | |
data[:10] = np.nan | |
data[-10:] = np.nan |
OlderNewer