Skip to content

Instantly share code, notes, and snippets.

@vadimkantorov
vadimkantorov / svgscatter.py
Last active December 6, 2018 12:54
Example of interactive SVG scatter plot (with image thumbnails) produced by running t-SNE on MNIST
import base64
import random
import cv2
import torch
import torchvision
def svg(points, labels, thumbnails, legend_size = 1e-1, legend_font_size = 5e-2, circle_radius = 5e-3):
points = (points - points.min(0)[0]) / (points.max(0)[0] - points.min(0)[0])
class_index = sorted(set(labels))
class_colors = [360.0 * i / len(class_index) for i in range(len(class_index))]
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 6, 2024 07:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites