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 heapq | |
| def max_simultaneous_tasks(tasks): | |
| # Sort tasks based on task start times | |
| tasks.sort(key=lambda x: x[0]) | |
| # Store task end times in priority queue | |
| task_end_times = [] | |
| # Iterate through task list |
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
| exports.github = function (req, res) { | |
| res.redirect(config.Github.API_ROOT + config.Github.PATH_AUTHENTICATE + '?client_id=' + config.Github.CLIENT_ID); | |
| }; | |
| exports.githubCallback = function (req, res) { | |
| var code = req.query.code; | |
| var post_data = querystring.stringify({ | |
| code: code | |
| , client_id: config.Github.CLIENT_ID |
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
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.1' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'sqlite3' |
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
| $('#products').append('<%= j render(@products) %>'); | |
| <% if @products.next_page %> | |
| $('.pagination').replaceWith('<%= j will_paginate(@products) %>'); | |
| <% else %> | |
| $('.pagination').remove(); | |
| <% end %> |