Late Afternoons / Python + Domestic Violence

Workshops

February 22, 3-4pm @SudoRoom

https://github.com/romyilano/SudoRoom_Python_DomesticViolence

We’re starting some fun early afternoon sessions on learning Python.

Note: I’m not a teacher, this is not a bootcamp or even a class. Rather it is a cool workshop for builders to help other builders learn how to build things!

Benefits

  • You will get more comfortable using the command line, which opens many opportunities to learn other useful things in coding
  • You can make a basic “networked” app
  • You can avoid doing clerical gruntwork and using horrible Excel Macros

This was originally created for Women Who Code East Bay but this session is open to all genders! Trans, male, female…

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.

 

Session 1 done today!

Session 1 – Preparations

Session 1 – the Doing part

Open up the terminal on your computer.

  • Don’t know the terminal and command line? Go here
mkdir SudoLesson
cd SudoLesson

Now use git to clone the github repo for this workshop

git clone https://github.com/romyilano/SudoRoom_Python_DomesticViolence
  • Don’t know how to use git from the command line? review cloning and the basics the simple guide
cd SudoRoom_Python_DomesticViolence

write your first script in the python folder, name it intro_python.py

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()

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

python python/intro_python.py csv/sample.csv

Self-directed Learning Steps

  • Make 2 or 3 variations of this script
  • Redo the Learn to Code the hard way lessons
  • Download other csv files and read them

2 comments on “Late Afternoons / Python + Domestic ViolenceAdd yours →

Comments are closed. You can not add new comments.