<div dir="ltr"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Session 1 went well today! Hope to see you at the next session.</div><div dir="ltr"><br></div><div dir="ltr"><br><div>Super simple "no deep stuff" ;) </div><div><br></div><div><br></div><div><b><font size="4">Session 1 done today!</font></b></div><div><a href="https://github.com/romyilano/SudoRoom_Python_DomesticViolence#session-1---intro">https://github.com/romyilano/SudoRoom_Python_DomesticViolence#session-1---intro</a><br></div><div><br></div><div><h3 style="margin-top:1em;margin-bottom:16px;line-height:1.43;font-size:1.5em;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'">Session 1 - Preparations</h3><ul style="padding:0px 0px 0px 2em;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px"><li style="">Get set up on your computer - Railsbridge is excellent, great people, great installation advice (Railsbridge Installation Guide)[<a href="http://docs.railsbridge.org/installfest/choose_your_operating_system" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none">http://docs.railsbridge.org/installfest/choose_your_operating_system</a>]</li><li style="">Be comfortable with the command line - <a href="http://cli.learncodethehardway.org/book/" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none">Learn Command line the hard way</a> <em style="">IMHO the more comfortable you get with the command line the better off you'll be in the short and long run</em></li><li style="">Understand how to use git </li><li style="">Complete <a href="http://learnpythonthehardway.org/book/" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none">Learn Python the Hard Way</a> up until <a href="http://learnpythonthehardway.org/book/ex20.html" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none">Lesson 20</a> - </li></ul><h3 style="margin-top:1em;margin-bottom:16px;line-height:1.43;font-size:1.5em;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'"><a id="user-content-session-1---the-doing-part" class="" href="https://github.com/romyilano/SudoRoom_Python_DomesticViolence#session-1---the-doing-part" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none;display:inline-block;padding-right:2px;line-height:1.2"></a>Session 1 - the Doing part</h3><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px">Open up the terminal on your computer.</p><ul style="padding:0px 0px 0px 2em;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px"><li style=""><em style="">Don't know the terminal and command line? <a href="http://cli.learncodethehardway.org/book/" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none">Go here</a></em></li></ul><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;margin-top:0px;margin-bottom:16px;line-height:1.45;padding:16px;background-color:rgb(247,247,247);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;padding:0px;margin:0px;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:0px;display:inline;line-height:inherit;word-wrap:normal">mkdir SudoLesson
cd SudoLesson
</code></pre><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px">Now use git to clone the <a href="https://github.com/romyilano/SudoRoom_Python_DomesticViolence" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none">github repo</a> for this workshop </p><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;margin-top:0px;margin-bottom:16px;line-height:1.45;padding:16px;background-color:rgb(247,247,247);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;padding:0px;margin:0px;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:0px;display:inline;line-height:inherit;word-wrap:normal">git clone <a href="https://github.com/romyilano/SudoRoom_Python_DomesticViolence">https://github.com/romyilano/SudoRoom_Python_DomesticViolence</a></code></pre></div><div><br></div><div><ul style="padding:0px 0px 0px 2em;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px"><li style=""><em style="">Don't know how to use git from the command line?</em> review cloning and the basics <a href="http://rogerdudler.github.io/git-guide/" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none">the simple guide</a></li></ul><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;margin-top:0px;margin-bottom:16px;line-height:1.45;padding:16px;background-color:rgb(247,247,247);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;padding:0px;margin:0px;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:0px;display:inline;line-height:inherit;word-wrap:normal">cd SudoRoom_Python_DomesticViolence
</code></pre><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px">write your first script in the python folder, name it <code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;padding:0.2em 0px;margin:0px;background-color:rgba(0,0,0,0.0392157);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">intro_python.py</code></p><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;margin-top:0px;margin-bottom:16px;line-height:1.45;padding:16px;background-color:rgb(247,247,247);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;padding:0px;margin:0px;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:0px;display:inline;line-height:inherit;word-wrap:normal">from sys import argv 
script, filename = argv

in_file = open(filename)
indata = in_file.read()

print("Here's your file %r:" % filename)

print("The sample csv is %d bytes long" % len(indata))
input(" Return to continue >")

print("Now I'm going to print out all the data - it's very long!")
input(" Return to continue >")
print(indata)
input(" Return to continue >")

print("Closing the file")
in_file.close()
</code></pre><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px">Run the script, we'll be using the sample.csv which is the spreadsheet of crimes in the Oakland area in the past 90 days</p><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:14px;margin-top:0px;margin-bottom:16px;line-height:1.45;padding:16px;background-color:rgb(247,247,247);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;padding:0px;margin:0px;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:0px;display:inline;line-height:inherit;word-wrap:normal">python python/intro_python.py csv/sample.csv</code></pre></div><div><br></div><div><br></div><div><h3 style="margin-top:1em;margin-bottom:16px;line-height:1.43;font-size:1.5em;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'">Self-directed Learning Steps</h3><ul style="padding:0px 0px 0px 2em;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px"><li style="">Make 2 or 3 variations of this script</li><li style="">Redo the Learn to Code the hard way lessons</li><li style="">Download other csv files and read them</li><li></li></ul></div><div>=============================</div><div><br></div><div>Romy Ilano</div><div><a href="mailto:romy@snowyla.com" target="_blank">romy@snowyla.com</a></div><div><br></div><div><br></div></div></div></div>
</div>