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
# $ docker run \ | |
# --device /dev/nvidia0:/dev/nvidia0 \ | |
# --device /dev/nvidiactl:/dev/nvidiactl \ | |
# --device /dev/nvidia-uvm:/dev/nvidia-uvm jcboyd/ubuntu-cuda-caffe | |
# Download base image | |
FROM ubuntu:16.04 | |
# Set environment variables | |
ENV PATH "/usr/local/cuda-8.0/bin:$PATH" |
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 os | |
import cStringIO | |
import requests | |
import wave | |
# acquire credentials at https://www.ibm.com/watson/services/text-to-speech/ | |
user_name = '' | |
password = '' |
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/ |
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.
Loading
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
\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", |
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
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 | |
OlderNewer