UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!
- liblinear-ruby: Ruby interface to LIBLINEAR using SWIG
| class Api::UploadsController < ApiController | |
| def create | |
| @upload = Upload.new(upload_params) | |
| ensure | |
| clean_tempfile | |
| end | |
| private |
| # config/initializers/instrumentation.rb | |
| # Subscribe to grape request and log with Rails.logger | |
| ActiveSupport::Notifications.subscribe('grape.request') do |name, starts, ends, notification_id, payload| | |
| Rails.logger.info '[API] %s %s (%.3f ms) -> %s %s%s' % [ | |
| payload[:request_method], | |
| payload[:request_path], | |
| (ends-starts)*1000, | |
| (payload[:response_status] || "error"), | |
| payload[:x_organization] ? "| X-Org: #{payload[:x_organization]}" : "", |
| class City < GeoEntity | |
| def self.sti_name | |
| 3 | |
| end | |
| end |
Warning This is SEVERELY outdated, the current jupyter version is > 6.X, please refer to your current jupyter notebook installation!
Disclaimer : I just copied those shortcuts from Jupyter Menú > Help > Keyboard Shortcuts, I didn't wrote them myself.
Check your current shortcuts in your Help, shortcuts coule have been modified by extensions or your past self.
| module ActiveRecord | |
| module Querying | |
| delegate :or, :to => :all | |
| end | |
| end | |
| module ActiveRecord | |
| module QueryMethods | |
| # OrChain objects act as placeholder for queries in which #or does not have any parameter. | |
| # In this case, #or must be chained with any other relation method to return a new relation. |
| --- | |
| title: "Sample Equations used in Statistics" | |
| output: html_document | |
| --- | |
| ### Summations | |
| ### Without Indices | |
| $\sum x_{i}$ |
<hash> with your gist's hash):
# with ssh
git clone [email protected]:<hash>.git mygist
# with httpsgit clone https://gist.github.com/.git mygist
| # Add these methods to your ApplicationController. Then, any controller | |
| # that inherits from it will have these methods and can programmatically | |
| # determine what filters it has set. | |
| class ApplicationController < ActionController::Base | |
| def self.filters(kind = nil) | |
| all_filters = _process_action_callbacks | |
| all_filters = all_filters.select{|f| f.kind == kind} if kind | |
| all_filters.map(&:filter) | |
| end |