This file contains 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
AllCops: | |
Exclude: | |
- 'vendor/**/*' | |
- 'db/schema.rb' | |
RunRailsCops: true | |
DisplayCopNames: true | |
Style/AccessModifierIndentation: | |
Enabled: false |
This file contains 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 numpy as np | |
import scipy.ndimage as nd | |
import PIL.Image | |
from google.protobuf import text_format | |
import caffe | |
import sys | |
import os | |
import shutil | |
# a couple of utility functions for converting to and from Caffe's input image layout |
This file contains 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
An error occurred | |
Errno::EMFILE: Too many open files - getcwd | |
occurred at /foo/project_root/vendor/bundle/gems/rspec-core-2.99.2/lib/rspec/core/formatters/base_formatter.rb:208:in `expand_path' |
This file contains 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
begin_time = Time.now.instance_eval { '%s.%03d' % [strftime('%Y/%m/%d %H:%M:%S'), (usec / 1000.0).round] } | |
end_time = Time.now.instance_eval { '%s.%03d' % [strftime('%Y/%m/%d %H:%M:%S'), (usec / 1000.0).round] } | |
This file contains 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
require 'active_support' | |
require 'active_support/core_ext/object/to_query' | |
require 'active_support/core_ext/string/strip' | |
params = { | |
title: '問題を一言で', | |
labels: %w(bug), | |
body: <<-EOS.strip_heredoc | |
## 出す前に確認しよう |
This file contains 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
#!/usr/bin/env bash | |
uninstall() { | |
list=`gem list --no-versions` | |
for gem in $list; do | |
gem uninstall $gem -aIx | |
done | |
gem list | |
gem install bundler | |
} |
This file contains 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
% brew install clamav |
This file contains 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
% brew switch <formula> <version> |
This file contains 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
require 'faker' | |
require 'spreadsheet' | |
require 'fileutils' | |
require 'i18n' | |
require 'optparse' | |
def parse_options | |
option = {} | |
OptionParser.new do |opt| | |
opt.on('-c VALUE', '--count', 'counts') {|v| option[:size] = v} |