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 | |
from numpy.random import multivariate_normal | |
np.random.seed(100) | |
num_samples = 20 | |
X = np.concatenate(( | |
multivariate_normal(mean=np.array([2, 2]), |
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
import matplotlib.pyplot as plt | |
import numpy as np | |
from skimage import data | |
from skimage.measure import find_contours | |
from skimage.color import rgb2rgbcie | |
img = data.astronaut() | |
img_cie = rgb2rgbcie(img) |
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 | |
import seaborn as sns | |
from matplotlib.patches import Circle, Rectangle, FancyArrowPatch | |
import matplotlib.lines as mlines | |
from scipy.ndimage import gaussian_filter | |
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
"""Two tricks enable an efficient solution: | |
2. We can solve the problem for the first i numbers in the list, for | |
i = 1, ..., N | |
1. The range of possible sums, R is bounded by an efficiently computable | |
min_sum and max_sum. | |
The lookup table is thus of dimension N x R. For each subset i = 1, ..., N, | |
we determine the range of values attainable with that subset, which are | |
simply all the targets of subset i - 1, plus nums[i] (included), and plus 0 | |
(not included). Thus, we perform only R operation per N subsets. | |
""" |
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
\documentclass[tikz]{standalone} | |
\usepackage{tikz} | |
\begin{document} | |
\def\primes{2,3,5,7,11,13,17,19,23} | |
\def\revprimes{23,19,17,13,11,7,5,3,2} | |
\def\palette{{ | |
"0.00 0.00 1.00", |
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.
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
from __future__ import print_function | |
from __future__ import division | |
import io | |
import random | |
import numpy as np | |
from PIL import Image | |
from skimage.transform import resize | |
import quantumrandom # https://qrng.anu.edu.au/ |
NewerOlder