Skip to content
This repository

Fixed type "maked a branch" #22

Closed
wants to merge 3 commits into from

2 participants

Jakub Holy Lynn Root
Jakub Holy

No description provided.

Lynn Root
Owner

Manually fixed since you have some other commits in there. See: adb1ec0

thank you @jakubholynet !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
8 dataviz/full_source/dataviz.py
@@ -19,9 +19,10 @@ def parse(raw_file, delimiter):
19 19 """Parses a raw CSV file to a JSON-like object"""
20 20
21 21 # Open CSV file, and safely close it when we're done
22   - with open(raw_file) as opened_file:
23   - # Read CSV file
24   - csv_data = csv.reader(opened_file, delimiter=delimiter)
  22 + opened_file = open(raw_file)
  23 +
  24 + # Read the CSV data
  25 + csv_data = csv.reader(opened_file, delimiter=delimiter)
25 26
26 27 # Setup an empty list
27 28 parsed_data = []
@@ -39,7 +40,6 @@ def parse(raw_file, delimiter):
39 40 return parsed_data
40 41
41 42
42   -
43 43 def visualize_days(data_file):
44 44 """Visualize data by day of week"""
45 45
7 dataviz/tutorial_source/graph.py
@@ -22,9 +22,10 @@ def parse(raw_file, delimiter):
22 22 """Parses a raw CSV file to a JSON-like object"""
23 23
24 24 # Open CSV file, and safely close it when we're done
25   - with open(raw_file) as opened_file:
26   - # Read CSV file
27   - csv_data = csv.reader(opened_file, delimiter=delimiter)
  25 + opened_file = open(raw_file)
  26 +
  27 + # Read the CSV data
  28 + csv_data = csv.reader(opened_file, delimiter=delimiter)
28 29
29 30 # Setup an empty list
30 31 parsed_data = []
7 dataviz/tutorial_source/parse.py
@@ -22,9 +22,10 @@ def parse(raw_file, delimiter):
22 22 """Parses a raw CSV file to a JSON-like object"""
23 23
24 24 # Open CSV file, and safely close it when we're done
25   - with open(raw_file) as opened_file:
26   - # Read CSV file
27   - csv_data = csv.reader(opened_file, delimiter=delimiter)
  25 + opened_file = open(raw_file)
  26 +
  27 + # Read the CSV data
  28 + csv_data = csv.reader(opened_file, delimiter=delimiter)
28 29
29 30 # Setup an empty list
30 31 parsed_data = []
21 docs/_posts/2013-01-04-Part-1-Parse.md
Source Rendered
@@ -113,14 +113,16 @@ Just to quickly put these two lines in our `parse` function:
113 113 def parse(raw_file, delimiter):
114 114 """Parses a raw CSV file to a JSON-line object"""
115 115
116   - # Open CSV file, and safely close it when we're done
117   - with open(raw_file) as opened_file:
  116 + # Open CSV file
  117 + open_file = open(raw_file)
118 118
119   - # Read CSV file
120   - csv_data = csv.reader(opened_file, delimiter=delimiter)
  119 + # Read the CSV data
  120 + csv_data = csv.reader(opened_file, delimiter=delimiter)
121 121
122 122 # Build a data structure to return parsed_data
123 123
  124 + # Close the CSV file
  125 +
124 126 return parsed_data
125 127 ```
126 128
@@ -159,11 +161,11 @@ Now let’s put the function together:
159 161 def parse(raw_file, delimiter):
160 162 """Parses a raw CSV file to a JSON-like object"""
161 163
162   - # Open CSV file, and safely close it when we're done
163   - with open(raw_file) as opened_file:
  164 + # Open CSV file
  165 + opened_file = open(raw_file)
164 166
165   - # Read CSV file
166   - csv_data = csv.reader(opened_file, delimiter=delimiter)
  167 + # Read the CSV data
  168 + csv_data = csv.reader(opened_file, delimiter=delimiter)
167 169
168 170 # Setup an empty list
169 171 parsed_data = []
@@ -175,6 +177,9 @@ def parse(raw_file, delimiter):
175 177 for row in csv_data:
176 178 parsed_data.append(dict(zip(fields, row)))
177 179
  180 + # Close the CSV file
  181 + opened_file.close()
  182 +
178 183 return parsed_data
179 184 ```
180 185
4 docs/_posts/2013-09-30-Save-your-progress.md
Source Rendered
@@ -32,7 +32,7 @@ Resources for using git:
32 32
33 33 With git, users can do what’s called branching and merging. With a repo, you have a main, original branch called master. Off of master, you can make branches. Consider this to give you the ability to play around with code, break things, etc, while keeping the original/master safe. If you’re happy with what has been completed within a branch, you merge the branch into the master branch, and it becomes your new original.
34 34
35   -It’s good to start off using git with good habits. Whenever you start something new, like as soon as you clone a repository, one good habit is to maked a branch to merge in later when you’re satisfied with your progress.
  35 +It’s good to start off using git with good habits. Whenever you start something new, like as soon as you clone a repository, one good habit is to make a branch to merge in later when you’re satisfied with your progress.
36 36
37 37 When you are intermittingly saving your progress on a branch, make a commit to your branch. Commit your code regularly, whether when you’re done for the day, when you‘ve finished coding out one of the parts of the tutorial, before you answer the phone when someone calls you, etc. Rather than making one big “atomic” commit at big milestones (e.g. after the completion of one tutorial, an implementation of a feature), doing this makes it very easy to undo changes that you’ve made without losing big progress.
38 38
@@ -253,4 +253,4 @@ When you have code up on GitHub and/or BitBucket, not only do they implicitly pr
253 253
254 254 As you work through these tutorials, I encourage you to use GitHub or BitBucket (or any other service that allows you to publicly share repositories) to “push” your code to so others can see your progress. While I suggest you to locally commit often and commit happily, only push code to GitHub/BitBucket when there is a good completion point (e.g. when you've finished a tutorial).
255 255
256   -[git]: "http://en.wikipedia.org/wiki/Git_(software)#History"
  256 +[git]: "http://en.wikipedia.org/wiki/Git_(software)#History"

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.