agenda
play

Agenda Announcements List comprehension Set Password example - PowerPoint PPT Presentation

Agenda Announcements List comprehension Set Password example 1/14/2013 CompSci101 Peter Lorensen 1 List comprehension [ element for element in sequence if element ] [ [ ] x for loop if pay = [850.0, 1250.0, 900.0, 1400.0,


  1. Agenda • Announcements • List comprehension • Set • Password example 1/14/2013 CompSci101 Peter Lorensen 1

  2. List comprehension [ element for element in sequence if element ] [ [ ] x for loop if pay = [850.0, 1250.0, 900.0, 1400.0, 1100.0] lowPay = [ pay for pay in salary if pay < 1000.00 ] >>[ 850.0, 900.0 ] 1/14/2013 CompSci101 Peter Lorensen 2

  3. Set • Set is similar to a list, but can only have unique elements. • Set are unordered. No index. • Use set() or set(list) to create a set. Then add. passengers = set([“John”, “Bob”, “Lisa”]) passengers.add (“peter”) >> set([“John”, “Bob”, “Lisa”, “peter”]) 1/14/2013 CompSci101 Peter Lorensen 3

  4. Set We often use for comparison Operation Function Short Union set1.union( set2 ) | Intersection set1.intersection( set2 ) & Difference set1.difference( set2 ) - Symmetric set1.symmetric_differe ^ difference nce( set2 ) 1/14/2013 CompSci101 Peter Lorensen 4

  5. Daphne Koller Computers learn to diagnose breast cancer? • AI and Machine Learning – http://www.youtube.com/watch?v=DX2_9ntOcQI – http://med.stanford.edu/ism/2011/november/compu ter.html "But to practice problem-solving, a student must first master certain concepts. By providing a cost-effective solution for this first step, we can focus precious classroom time on more interactive problem-solving activities that achieve deeper understanding — and foster creativity." Coursera Founder, NY Times, December 5, 2011 1/14/2013 CompSci101 Peter Lorensen 5

  6. 12 MILLION 2011 1/14/2013 CompSci101 Peter Lorensen 6

  7. Passwords http://zd.net/ME10pW http://bit.ly/XSGIaT http://on.mash.to/MjlDRs http://bit.ly/YPlrWn 1/14/2013 CompSci101 Peter Lorensen 7

  8. Passwords Troy Hunt analysis of leaked Sony password (http://bit.ly/kr2jpL): -People re-use their passwords on different sites. “The only secure password is the one you cant remember” (http://bit.ly/hhwE4n) 1/14/2013 CompSci101 Peter Lorensen 8

  9. Duke IT Strategies for good passwords Use lines from a childhood verse: Verse Line: Yankee Doodle went to town Password: YDwto#town Use lines from a favorite song: Lyric: How Much is that Doggie in the Window? Password: H$itditw? City Expression: Chicago is my kind of town Password: CimYKot! Foods disliked during childhood: Food: rice and raisin pudding Password: ric&raiPudng Note: Obviously, you shouldn't use any of the passwords used as examples in this document. Treat these examples as guidelines only. 1/14/2013 CompSci101 Peter Lorensen 9

  10. Password lists on the Internet • Accessible list of passwords on the Internet: https://dazzlepod.com/site_media/txt/passwords.txt • Disclosure Project by Dazzlepod “ The disclosures on this website have been made available publicly so that users can find out if they were exposed as a result of the releases made by hackers.” (https://dazzlepod.com/disclosure/) 1/14/2013 CompSci101 Peter Lorensen 10

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend