{"id":12122,"date":"2016-02-22T12:10:32","date_gmt":"2016-02-22T20:10:32","guid":{"rendered":"https:\/\/sudoroom.org\/?p=12122"},"modified":"2016-02-22T12:10:32","modified_gmt":"2016-02-22T20:10:32","slug":"late-afternoons-python-domestic-violence","status":"publish","type":"post","link":"https:\/\/sudoroom.org\/index.php\/2016\/02\/22\/late-afternoons-python-domestic-violence\/","title":{"rendered":"Late Afternoons \/ Python + Domestic Violence"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12121\" src=\"http:\/\/64.225.113.37\/wp-content\/uploads\/2016\/02\/Workshops-1.png\" alt=\"Workshops\" width=\"640\" height=\"299\" \/><\/p>\n<p>February 22, 3-4pm @SudoRoom<\/p>\n<p><a href=\"https:\/\/github.com\/romyilano\/SudoRoom_Python_DomesticViolence\" target=\"_blank\">https:\/\/github.com\/romyilano\/SudoRoom_Python_DomesticViolence<\/a><\/p>\n<p>We&#8217;re starting some fun early afternoon sessions on learning Python.<\/p>\n<p>Note:<em>\u00a0I&#8217;m <strong>not<\/strong> a teacher, this is <strong>not<\/strong> a bootcamp or even a class. Rather it is a <strong>cool workshop for builders to help other builders<\/strong> learn how to build things!<\/em><\/p>\n<h2>Benefits<\/h2>\n<ul>\n<li>You will get more comfortable using the command line, which opens many opportunities to learn other useful things in coding<\/li>\n<li>You can make a basic &#8220;networked&#8221; app<\/li>\n<li>You can avoid doing clerical gruntwork and using horrible Excel Macros<\/li>\n<\/ul>\n<p>This was originally created for Women Who Code East Bay but this session is open to all genders! Trans, male, female&#8230;<\/p>\n<p><em>Women dominate clerical, lower-paid clerical jobs like entry level accounting and secretarial work or lower-level marketing positions. They live their lives in Excel sheets. Enabling them to learn basic coding and taking advantage of their intelligence and potential will help make the world a better place.<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<div><b><span style=\"font-size: large;\">Session 1 done today!<\/span><\/b><\/div>\n<div><a href=\"https:\/\/github.com\/romyilano\/SudoRoom_Python_DomesticViolence#session-1---intro\" target=\"_blank\">https:\/\/github.com\/romyilano\/<wbr \/>SudoRoom_Python_<wbr \/>DomesticViolence#session-1&#8212;<wbr \/>intro<\/a><\/div>\n<div><\/div>\n<div>\n<h3>Session 1 &#8211; Preparations<\/h3>\n<ul>\n<li>Get set up on your computer &#8211; Railsbridge is excellent, great people, great installation advice (Railsbridge Installation Guide)[<a href=\"http:\/\/docs.railsbridge.org\/installfest\/choose_your_operating_system\" target=\"_blank\">http:\/\/docs.<wbr \/>railsbridge.org\/installfest\/<wbr \/>choose_your_operating_system<\/a>]<\/li>\n<li>Be comfortable with the command line &#8211;\u00a0<a href=\"http:\/\/cli.learncodethehardway.org\/book\/\" target=\"_blank\">Learn Command line the hard way<\/a>\u00a0<em>IMHO the more comfortable you get with the command line the better off you&#8217;ll be in the short and long run<\/em><\/li>\n<li>Understand how to use git<\/li>\n<li>Complete\u00a0<a href=\"http:\/\/learnpythonthehardway.org\/book\/\" target=\"_blank\">Learn Python the Hard Way<\/a>\u00a0up until\u00a0<a href=\"http:\/\/learnpythonthehardway.org\/book\/ex20.html\" target=\"_blank\">Lesson 20<\/a>\u00a0&#8211;<\/li>\n<\/ul>\n<h3>Session 1 &#8211; the Doing part<\/h3>\n<p>Open up the terminal on your computer.<\/p>\n<ul>\n<li><em>Don&#8217;t know the terminal and command line?\u00a0<a href=\"http:\/\/cli.learncodethehardway.org\/book\/\" target=\"_blank\">Go here<\/a><\/em><\/li>\n<\/ul>\n<pre><code>mkdir SudoLesson\ncd SudoLesson\n<\/code><\/pre>\n<p>Now use git to clone the\u00a0<a href=\"https:\/\/github.com\/romyilano\/SudoRoom_Python_DomesticViolence\" target=\"_blank\">github repo<\/a>\u00a0for this workshop<\/p>\n<pre><code>git clone <a href=\"https:\/\/github.com\/romyilano\/SudoRoom_Python_DomesticViolence\" target=\"_blank\">https:\/\/github.com\/romyilano\/<wbr \/>SudoRoom_Python_<wbr \/>DomesticViolence<\/a><\/code><\/pre>\n<\/div>\n<div><\/div>\n<div>\n<ul>\n<li><em>Don&#8217;t know how to use git from the command line?<\/em>\u00a0review cloning and the basics\u00a0<a href=\"http:\/\/rogerdudler.github.io\/git-guide\/\" target=\"_blank\">the simple guide<\/a><\/li>\n<\/ul>\n<pre><code>cd SudoRoom_Python_<wbr \/>DomesticViolence\n<\/code><\/pre>\n<p>write your first script in the python folder, name it\u00a0<code>intro_python.py<\/code><\/p>\n<pre><code>from sys import argv \nscript, filename = argv\n\nin_file = open(filename)\nindata = in_file.read()\n\nprint(\"Here's your file %r:\" % filename)\n\nprint(\"The sample csv is %d bytes long\" % len(indata))\ninput(\" Return to continue &gt;\")\n\nprint(\"Now I'm going to print out all the data - it's very long!\")\ninput(\" Return to continue &gt;\")\nprint(indata)\ninput(\" Return to continue &gt;\")\n\nprint(\"Closing the file\")\nin_file.close()\n<\/code><\/pre>\n<p>Run the script, we&#8217;ll be using the sample.csv which is the spreadsheet of crimes in the Oakland area in the past 90 days<\/p>\n<pre><code>python python\/intro_python.py csv\/sample.csv<\/code><\/pre>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div>\n<h3>Self-directed Learning Steps<\/h3>\n<ul>\n<li>Make 2 or 3 variations of this script<\/li>\n<li>Redo the Learn to Code the hard way lessons<\/li>\n<li>Download other csv files and read them<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-12121\" src=\"http:\/\/64.225.113.37\/wp-content\/uploads\/2016\/02\/Workshops-1.png\" alt=\"Workshops\" width=\"640\" height=\"299\" \/><\/p>\n<p>February 22, 3-4pm @SudoRoom<\/p>\n<p><a href=\"https:\/\/github.com\/romyilano\/SudoRoom_Python_DomesticViolence\" target=\"_blank\">https:\/\/github.com\/romyilano\/SudoRoom_Python_DomesticViolence<\/a><\/p>\n<p>We&#8217;re starting some fun early afternoon sessions on learning Python.<\/p>\n<p>Note:<em>\u00a0I&#8217;m <strong>not<\/strong> a teacher, this is <strong>not<\/strong> a bootcamp or even a class. Rather it is a <strong>cool workshop for builders to help other builders<\/strong> learn how to build things!<\/em><\/p>\n<h2>Benefits<\/h2>\n<ul>\n<li>You will get more comfortable using the command line, which opens many opportunities to learn other useful things in coding<\/li>\n<li>You can make a basic &#8220;networked&#8221; app<\/li>\n<li>You can avoid doing clerical gruntwork and using horrible Excel Macros<\/li>\n<\/ul>\n<p>This was originally created for Women Who Code East Bay but this session is open to all genders! Trans, male, female&#8230;<\/p>\n<p><em>Women dominate clerical, lower-paid clerical jobs like entry level accounting and secretarial work or lower-level marketing positions. They live their lives in Excel sheets. Enabling them to learn basic coding and taking advantage of their intelligence and potential will help make the world a better place.<\/em><\/p>\n<p>&nbsp;<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/sudoroom.org\/index.php\/2016\/02\/22\/late-afternoons-python-domestic-violence\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;Late Afternoons \/ Python + Domestic Violence&rdquo;<\/span>&hellip;<\/a><\/div>\n","protected":false},"author":2,"featured_media":12121,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,72,73],"tags":[],"class_list":["post-12122","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-events-2","category-late-afternoons","category-python","entry"],"_links":{"self":[{"href":"https:\/\/sudoroom.org\/index.php\/wp-json\/wp\/v2\/posts\/12122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sudoroom.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sudoroom.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sudoroom.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sudoroom.org\/index.php\/wp-json\/wp\/v2\/comments?post=12122"}],"version-history":[{"count":0,"href":"https:\/\/sudoroom.org\/index.php\/wp-json\/wp\/v2\/posts\/12122\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sudoroom.org\/index.php\/wp-json\/wp\/v2\/media\/12121"}],"wp:attachment":[{"href":"https:\/\/sudoroom.org\/index.php\/wp-json\/wp\/v2\/media?parent=12122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sudoroom.org\/index.php\/wp-json\/wp\/v2\/categories?post=12122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sudoroom.org\/index.php\/wp-json\/wp\/v2\/tags?post=12122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}