This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A script that can automatically download videos from Edx | |
| # Currently this is heavily tied to the way my Edx account and my computer is | |
| # set up. It downloads by sending the the download url and download directory | |
| # to aria2 runnig in rpc mode. | |
| # More info here: http://aria2.sourceforge.net/manual/en/html/aria2c.html#rpc-interface | |
| # You can use http://ziahamza.github.io/webui-aria2/ to see download progress | |
| # For now parameters, such as username, password, and which course to download | |
| # can be provided in the script | |
| # I intend to make it more flexible | |
| from __future__ import print_function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import('dart:dom'); | |
| class Example { | |
| void run() { | |
| HTMLDocument doc = window.document; | |
| doc.write(square(10)); | |
| } | |
| List<int> square(int n) { | |
| var result = new List<int>(); | |
| for(int i = 0; i < n; i++) { | |
| result.add(i * i); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Main.main = function() { | |
| new Main(); | |
| js.Lib.document.write(Main.square(10).join(",")); | |
| } | |
| Main.square = function(n) { | |
| var i = 0; | |
| var result = new Array(); | |
| { | |
| var _g = i; | |
| while(_g < n) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns example) | |
| (defn ^:export square [n] | |
| (for [x (range n)] | |
| (* x x))) | |
| (.write js/document | |
| (reduce str | |
| (interpose "," | |
| (square 10)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var square; | |
| square = function(n) { | |
| var i, _results; | |
| _results = []; | |
| for (i = 1; 1 <= n ? i <= n : i >= n; 1 <= n ? i++ : i--) { | |
| _results.push(i * i); | |
| } | |
| return _results; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| square = (n) -> i * i for i in [1..n] | |
| document.write square 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person(models.Model): | |
| first_name = models.CharField(max_length=50) | |
| last_name = models.CharField(max_length=50, blank=True) | |
| phone = models.CharField(max_length=15, blank=True) | |
| email = models.EmailField(blank=True) | |
| def __unicode__(self): | |
| return self.first_name + " " + self.last_name | |
| class Book(models.Model): |
NewerOlder