summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--kotlin.html.markdown7
-rw-r--r--markdown.html.markdown18
-rw-r--r--python.html.markdown31
-rw-r--r--pythonstatcomp.html.markdown4
4 files changed, 33 insertions, 27 deletions
diff --git a/kotlin.html.markdown b/kotlin.html.markdown
index 57f311f9..7b1475a8 100644
--- a/kotlin.html.markdown
+++ b/kotlin.html.markdown
@@ -133,7 +133,7 @@ fun helloWorld(val name : String) {
The name of the single parameter will be "it".
*/
val notPositive = not {it > 0}
- for (i in (0..4)) {
+ for (i in 0..4) {
println("${notOdd(i)} ${notEven(i)} ${notZero(i)} ${notPositive(i)}")
}
@@ -317,5 +317,6 @@ object ObjectExample {
### Further Reading
-A web-based mini-IDE for Kotlin:
-[http://try.kotlinlang.org/)
+* [Kotlin tutorials](https://kotlinlang.org/docs/tutorials/)
+* [Try Kotlin in your browser](http://try.kotlinlang.org/)
+* [A list of Kotlin resources](http://kotlin.link/)
diff --git a/markdown.html.markdown b/markdown.html.markdown
index b4ad3202..bdf42368 100644
--- a/markdown.html.markdown
+++ b/markdown.html.markdown
@@ -7,7 +7,9 @@ filename: markdown.md
---
-Markdown was created by John Gruber in 2004. It's meant to be an easy to read and write syntax which converts easily to HTML (and now many other formats as well).
+Markdown was created by John Gruber in 2004. It's meant to be an easy to read
+and write syntax which converts easily to HTML (and now many other formats as
+well).
Markdown also varies in implementation from one parser to a next. This
guide will attempt to clarify when features are universal or when they are
@@ -28,9 +30,10 @@ specific to a certain parser.
Markdown is a superset of HTML, so any HTML file is valid Markdown.
```markdown
-<!--This means we can use HTML elements in Markdown, such as the comment element,
-and they won't be affected by a markdown parser. However, if you create an HTML element
-in your markdown file, you cannot use markdown syntax within that element's contents.-->
+<!--This means we can use HTML elements in Markdown, such as the comment
+element, and they won't be affected by a markdown parser. However, if you
+create an HTML element in your markdown file, you cannot use markdown syntax
+within that element's contents.-->
```
## Headings
@@ -214,8 +217,8 @@ highlighting of the language you specify after the \`\`\`
## Horizontal rule
-Horizontal rules (`<hr/>`) are easily added with three or more asterisks or hyphens,
-with or without spaces.
+Horizontal rules (`<hr/>`) are easily added with three or more asterisks or
+hyphens, with or without spaces.
```markdown
***
@@ -298,7 +301,8 @@ in italics, so I do this: \*this text surrounded by asterisks\*.
### Keyboard keys
-In GitHub Flavored Markdown, you can use a `<kbd>` tag to represent keyboard keys.
+In GitHub Flavored Markdown, you can use a `<kbd>` tag to represent keyboard
+keys.
```markdown
Your computer crashed? Try sending a
diff --git a/python.html.markdown b/python.html.markdown
index 12be4be1..28b0a7ae 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -8,20 +8,22 @@ contributors:
filename: learnpython.py
---
-Python was created by Guido Van Rossum in the early 90s. It is now one of the most popular
-languages in existence. I fell in love with Python for its syntactic clarity. It's basically
-executable pseudocode.
+Python was created by Guido Van Rossum in the early 90s. It is now one of the
+most popular languages in existence. I fell in love with Python for its
+syntactic clarity. It's basically executable pseudocode.
-Feedback would be highly appreciated! You can reach me at [@louiedinh](http://twitter.com/louiedinh) or louiedinh [at] [google's email service]
+Feedback would be highly appreciated! You can reach me at [@louiedinh](http://twitter.com/louiedinh)
+or louiedinh [at] [google's email service]
-Note: This article applies to Python 2.7 specifically, but should be applicable
-to Python 2.x. Python 2.7 is reaching end of life and will stop being maintained in 2020,
-it is though recommended to start learning Python with Python 3.
-For Python 3.x, take a look at the [Python 3 tutorial](http://learnxinyminutes.com/docs/python3/).
+Note: This article applies to Python 2.7 specifically, but should be applicable
+to Python 2.x. Python 2.7 is reaching end of life and will stop being
+maintained in 2020, it is though recommended to start learning Python with
+Python 3. For Python 3.x, take a look at the [Python 3 tutorial](http://learnxinyminutes.com/docs/python3/).
-It is also possible to write Python code which is compatible with Python 2.7 and 3.x at the same time,
-using Python [`__future__` imports](https://docs.python.org/2/library/__future__.html). `__future__` imports
-allow you to write Python 3 code that will run on Python 2, so check out the Python 3 tutorial.
+It is also possible to write Python code which is compatible with Python 2.7
+and 3.x at the same time, using Python [`__future__` imports](https://docs.python.org/2/library/__future__.html). `__future__` imports
+allow you to write Python 3 code that will run on Python 2, so check out the
+Python 3 tutorial.
```python
@@ -32,6 +34,7 @@ allow you to write Python 3 code that will run on Python 2, so check out the Pyt
as comments
"""
+
####################################################
## 1. Primitive Datatypes and Operators
####################################################
@@ -188,6 +191,7 @@ some_other_var # Raises a name error
# Equivalent of C's '?:' ternary operator
"yahoo!" if 3 > 2 else 2 # => "yahoo!"
+
# Lists store sequences
li = []
# You can start with a prefilled list
@@ -441,6 +445,7 @@ with open("myfile.txt") as f:
for line in f:
print line
+
####################################################
## 4. Functions
####################################################
@@ -464,7 +469,6 @@ def varargs(*args):
varargs(1, 2, 3) # => (1, 2, 3)
-
# You can define functions that take a variable number of
# keyword args, as well, which will be interpreted as a dict by using **
def keyword_args(**kwargs):
@@ -698,7 +702,6 @@ for i in double_numbers(xrange_):
# message
from functools import wraps
-
def beg(target_function):
@wraps(target_function)
def wrapper(*args, **kwargs):
@@ -709,13 +712,11 @@ def beg(target_function):
return wrapper
-
@beg
def say(say_please=False):
msg = "Can you buy me a beer?"
return msg, say_please
-
print say() # Can you buy me a beer?
print say(say_please=True) # Can you buy me a beer? Please! I am poor :(
```
diff --git a/pythonstatcomp.html.markdown b/pythonstatcomp.html.markdown
index 0b02dca8..8ee3aa64 100644
--- a/pythonstatcomp.html.markdown
+++ b/pythonstatcomp.html.markdown
@@ -1,8 +1,8 @@
---
-language: Statistical computing with Python
+category: tool
+tool: Statistical Computing with Python
contributors:
- ["e99n09", "https://github.com/e99n09"]
-filename: pythonstatcomp.py
---
This is a tutorial on how to do some typical statistical programming tasks using Python. It's intended for people basically familiar with Python and experienced at statistical programming in a language like R, Stata, SAS, SPSS, or MATLAB.