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
Next revision Both sides next revision
cs501r_f2018:lab1 [2018/09/03 21:25]
wingated
cs501r_f2018:lab1 [2018/09/05 20:39]
wingated
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.
  
 ---- ----
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.txt ยท Last modified: 2021/06/30 23:42 (external edit)