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
-- Create table and add a row | |
create table test_table ( | |
some_text text | |
); | |
insert into test_table(some_text) values ( | |
'this is a test' | |
); | |
-- Last word: |
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 | |
from skimage import transform | |
class TestImage(object): | |
""" | |
Handler class for generating test images from different source types | |
such as from the skimage built-in images or from academic examples defined | |
by some 2D function (evaluation = pixel values). | |
""" |
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 sympy as sym | |
import time | |
def hermiteCoeffsTanh(nCoeffs): | |
""" | |
Computes the first nCoeffs Hermite coefficients of the tanh function. The r-th | |
Hermite coefficients is defined by | |
H_r(g) = int_{-oo}^{oo}g(y)h_r(y) * 1/sqrt(2 * pi) * exp(-x^2/2) dy |
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
def show_1dplots(plots, cols = 1, titles = None, xvals = None): | |
"""Display a list of plots in a single figure with matplotlib. | |
Parameters | |
--------- | |
plots: List of np.arrays compatible with plt.plot. | |
cols (Default = 1): Number of columns in figure (number of rows is | |
set to np.ceil(n_plots/float(cols))). | |
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 matplotlib.pyplot as plt | |
import numpy as np | |
def show_images(images, cols = 1, titles = None): | |
"""Display a list of images in a single figure with matplotlib. | |
Parameters | |
--------- | |
images: List of np.arrays compatible with plt.imshow. | |