I always forget how to do this on a new system:
export CUDA_PATH=/usr/local/cuda-9.2
export CUDA_HOME=/usr/local/cuda-9.2
export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64
# From instructions at https://www.tensorflow.org/versions/r1.0/get_started/mnist/pros | |
import argparse | |
import sys | |
import tensorflow as tf | |
import time | |
from tensorflow.examples.tutorials.mnist import input_data | |
FLAGS = None |
/* | |
Summer 2018 | |
CSC263 Assignment 3 Question 7 | |
We consider undirected graphs (with no weights). | |
Often there are multiple shortest paths between two nodes of a graph. | |
Describe a linear-time algorithm such that, given an undirected, unweighted graph | |
and two vertices u and v, the algorithm counts the number of distinct shortest paths | |
from u to v. Justify its correctness and the running time. |
/* | |
Summer 2018 | |
CSC263 Assignment 3 Question 4 | |
Describe an implementation of the BITREVERSEDINCREMENT procedure on A that allows | |
the bit-reversal permutation on an n-element array to be performed in time O(n). | |
Note: compile needs -lm flag for <math.h>: | |
gcc -Wall -o kbit_rev_permute kbit_rev_permute.c -lm | |
*/ |
/* | |
Summer 2018 | |
CSC263 Assignment 4 Question 2 | |
CLRS 22-4 | |
Let G = (V,E) be a directed graph in which each vertex u in V is labeled with | |
a unique integer L(u) from the set {1, 2, ...|V|}. For each vertex u in V , let | |
R(u) = {v in V: u has a path to v} be the set of vertices that are reachable from u. | |
Define min(u) to be the vertex in R(u) whose label is minimum, i.e., min(u) is the vertex v such that L(v) = min{L(w): w in R(u)}. Give an O(V+E) algorithm that |
/* | |
CLRS 21.3-4 | |
Suppose that we wish to add the operation PRINT-SET(x), which is given a node x | |
and prints all the members of x’s set, in any order. Show how we can add just | |
a single attribute to each node in a disjoint-set forest so that PRINT-SET(x) takes | |
time linear in the number of members of x’s set and the asymptotic running times | |
of the other operations are unchanged. Assume that we can print each member of | |
the set in O(1) time. | |
*/ |
/* | |
Summer 2018 | |
CSC263 Assignment 4 Question 7 | |
CLRS Problem 21-1, Offline-Minimum | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include "disjoint.h" |
I always forget how to do this on a new system:
export CUDA_PATH=/usr/local/cuda-9.2
export CUDA_HOME=/usr/local/cuda-9.2
export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64
This is a note to self of setup steps when purchasing a new domain on Namecheap, pointing its DNS to Route 53, requesting an SSL certificate, and setting up a CloudFront distribution for it to point to an S3 bucket.
Create a new hosted zone for the new domain in Route 53. Will be given the correct nameservers to use under record type 'NS'. Add these values in NameCheap under 'Custom DNS'.
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch localhost", | |
"type": "chrome", | |
"request": "launch", |