One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| copyToClipboard(str) { | |
| /* ——— Derived from: https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f | |
| improved to add iOS device compatibility——— */ | |
| const el = document.createElement('textarea'); // Create a <textarea> element | |
| let storeContentEditable = el.contentEditable; | |
| let storeReadOnly = el.readOnly; | |
| el.value = str; // Set its value to the string that you want copied | |
| el.contentEditable = true; |
| import numpy as np | |
| from scipy.ndimage.interpolation import map_coordinates | |
| from scipy.ndimage.filters import gaussian_filter | |
| def elastic_transform(image, alpha, sigma, random_state=None): | |
| """Elastic deformation of images as described in [Simard2003]_. | |
| .. [Simard2003] Simard, Steinkraus and Platt, "Best Practices for | |
| Convolutional Neural Networks applied to Visual Document Analysis", in |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'aws-sdk' | |
| class S3FolderUpload | |
| attr_reader :folder_path, :total_files, :s3_bucket, :include_folder | |
| attr_accessor :files | |
| # Initialize the upload class |
| import numpy | |
| from scipy.ndimage.interpolation import map_coordinates | |
| from scipy.ndimage.filters import gaussian_filter | |
| def elastic_transform(image, alpha, sigma, random_state=None): | |
| """Elastic deformation of images as described in [Simard2003]_. | |
| .. [Simard2003] Simard, Steinkraus and Platt, "Best Practices for | |
| Convolutional Neural Networks applied to Visual Document Analysis", in |
origin: jerodsanto Blog
Since Rails 3 you’ve been able to configure an app to handle exceptions, which you want to point right at your router. To do this, add the following to config/application.rb:
| # 1) Create your private key (any password will do, we remove it below) | |
| $ cd ~/.ssh | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
| require "active_record" | |
| namespace :db do | |
| db_config = YAML::load(File.open('config/database.yml')) | |
| db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
| desc "Create the database" | |
| task :create do | |
| ActiveRecord::Base.establish_connection(db_config_admin) |
| files = Dir["./**/*"] | |
| files.each do |file| | |
| next if File.directory?(file) | |
| words = [] | |
| begin | |
| File.read(file).scan /[\u0400-\u04FF\-]+/ do |match| | |
| words << match | |
| end |
| #!/bin/bash | |
| # | |
| # Install Postgres 9.2 on a clean Ubuntu 12.04 | |
| """ | |
| LC_ALL issue | |
| comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file. | |
| sudo apt-get install language-pack-en-base | |
| sudo dpkg-reconfigure locales | |
| comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file. |