User Tools

Site Tools


cs501r_f2018:lab1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs501r_f2018:lab1 [2018/09/03 21:25]
wingated
cs501r_f2018:lab1 [2021/06/30 23:42] (current)
Line 1: Line 1:
 ====Objective:​==== ====Objective:​====
  
-Get started with colab, python, ​and pandas.  Begin producing simple visualizations of data and images.+Get started with colab and python.  Begin producing simple visualizations of data and images.
  
 ---- ----
 ====Deliverable:​==== ====Deliverable:​====
  
-For this lab, you will submit an ipython notebook via colab.  This notebook will have two parts:+For this lab, you will submit an ipython notebook via learningsuite.  This notebook will have two parts:
  
 **Part 1:**  Your notebook should generate a random image. ​ We will run this **Part 1:**  Your notebook should generate a random image. ​ We will run this
Line 22: Line 22:
 [[http://​colab.research.google.com/​|Google colab]] [[http://​colab.research.google.com/​|Google colab]]
  
 +[[https://​colab.research.google.com/​drive/​1TzaPS3jvRadN-URLbQ9nD1ZNoZktfNRy|A colab notebook teaching you how to use colab notebooks]]
 +
 +[[https://​sites.google.com/​site/​artml2018/​tutorials|Various colab tutorials]]
  
 ---- ----
Line 49: Line 52:
 type, such as random lines, and can be created in a loop). ​ We won't type, such as random lines, and can be created in a loop). ​ We won't
 count the number of elements; this is just to encourage you to create count the number of elements; this is just to encourage you to create
-random images with moderate complexity.+random images with moderate complexity ​(ie, you can't just generate randomly colored pixels, as in the example below).
  
 For part 2, you should visit the Tensorflow playground (see link above), and play with different settings. ​ Most of it will be unfamiliar, but don't worry -- you can't break it! For part 2, you should visit the Tensorflow playground (see link above), and play with different settings. ​ Most of it will be unfamiliar, but don't worry -- you can't break it!
Line 56: Line 59:
  
 ---- ----
-====Installing anaconda:====+====Starter code:====
  
 Here's some starter code to help you generate an image. ​ The ''​nbimage''​ function will display the image inline in the notebook: Here's some starter code to help you generate an image. ​ The ''​nbimage''​ function will display the image inline in the notebook:
Line 63: Line 66:
 import IPython.display import IPython.display
 import PIL.Image import PIL.Image
-import numpy+import numpy as np
  
 # A simple function to display an image in an ipython notebook # A simple function to display an image in an ipython notebook
 def nbimage( data ): def nbimage( data ):
-    IPython.display.display(PIL.Image.fromarray(data)+    IPython.display.display(PIL.Image.fromarray(data))
  
  
cs501r_f2018/lab1.1536009919.txt.gz ยท Last modified: 2021/06/30 23:40 (external edit)