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
| exports = function(changeEvent) { | |
| const http = context.services.get("salesHTTP"); | |
| const fullDocument = changeEvent.fullDocument; | |
| return http.post({ | |
| url: "https://api.pushover.net/1/messages.json", | |
| body: { | |
| token: context.values.get("PUSHOVER_API_TOKEN"), | |
| user: context.values.get("PUSHOVER_USER"), | |
| title: 'New Sale', |
| { | |
| "emojis": [ | |
| {"emoji": "👩👩👧👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👩👩👧👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👩👩👦👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👨👩👧👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z |
| require 'yaml' | |
| desc 'Generates database.yml, optional arguments: [adapter, user, password]' | |
| task :dbconfig => 'database.yml' | |
| file 'database.yml', [:adapter, :username, :password] do |t, args| | |
| Dir.chdir('config') | |
| args.with_defaults(:project_path => Dir.pwd) | |
| DBConfigGenerator.new(t, args).generate | |
| end |
| # Hack to change the Rails cookie serializer from Marshal to JSON and therefore allow the session | |
| # to be shared between different languages but also avoid that someone knowing the | |
| # cookie secret key could execute arbitrary code on the server by unmarshalling | |
| # modified Ruby code added to the session/permanent cookie. | |
| # | |
| # Note that all users will beed to login again since both the remember me cookie and the session cookies | |
| # won't be valid. Note also that the remember me cookie is tested multiple times per request even when it fails. | |
| # for performance reasons you might want to delete it if these extra cycles are too costly for you. | |
| # | |
| # Rails 4 (not tested on Rails 3). |
| Handlebars.registerHelper('equal', function(lvalue, rvalue, options) { | |
| if (arguments.length < 3) | |
| throw new Error("Handlebars Helper equal needs 2 parameters"); | |
| if( lvalue!=rvalue ) { | |
| return options.inverse(this); | |
| } else { | |
| return options.fn(this); | |
| } | |
| }); |
| # -*- encoding : utf-8 -*- | |
| set :assets_dependencies, %w(app/assets lib/assets vendor/assets Gemfile.lock config/routes.rb) | |
| namespace :deploy do | |
| namespace :assets do | |
| desc <<-DESC | |
| Run the asset precompilation rake task. You can specify the full path \ | |
| to the rake executable by setting the rake variable. You can also \ |