hexsha
stringlengths
40
40
size
int64
2
1.01M
content
stringlengths
2
1.01M
avg_line_length
float64
1.5
100
max_line_length
int64
2
1k
alphanum_fraction
float64
0.25
1
189f97d1a8429e3e4bcc049e9796f9bc17b44119
1,411
class AwsSdkCpp < Formula desc "AWS SDK for C++" homepage "https://github.com/aws/aws-sdk-cpp" # aws-sdk-cpp should only be updated every 10 releases on multiples of 10 url "https://github.com/aws/aws-sdk-cpp/archive/1.7.170.tar.gz" sha256 "0ee9e5c099246dba0cd6d514bd11cf1dda3a904faff530a07db34fcbe86a0108" h...
31.355556
94
0.67966
332bd68ce41fec361150bc727269cd239ef43d60
6,069
=begin #EVE Swagger Interface #An OpenAPI for EVE Online OpenAPI spec version: 0.4.5 Generated by: https://github.com/swagger-api/swagger-codegen.git =end require 'date' module Esi # 200 ok object class CloneSummary attr_accessor :home_location # jump_clones array attr_accessor :jump_clones ...
28.227907
107
0.620036
035c4e3499c6230470f563c96a08150ff4253aef
3,404
# ComponentPaths gives an array of every folder where you find a component. require 'volt/server/rack/component_code' module Volt class ComponentPaths def initialize(root = nil) @root = root || Dir.pwd end # Yield for every folder where we might find components def app_folders # Find all...
29.094017
103
0.59812
e829e0a411fcc90c273710846f9921763b10f0d8
3,503
#!/usr/bin/env ruby # You can generate json by executing the following command on Terminal. # # $ ruby ./personal_tekezo_launcher_mode_v4.json.rb # # Parameters PARAMETERS = { :simultaneous_threshold_milliseconds => 500, :trigger_key => 'o', }.freeze ############################################################ ...
33.361905
104
0.53497
187a511a661efc49c8272f7c190695a59c3ac73d
778
require "spec_helper" describe BooksController do describe "routing" do it "routes to #index" do get("/books").should route_to("books#index") end it "routes to #new" do get("/books/new").should route_to("books#new") end it "routes to #show" do get("/books/1").should route_to(...
21.611111
69
0.587404
f819b267407764a3763c846f3ab735adcefc08d7
459
cask "jellyfin" do version "10.7.0" sha256 "0e0c32ccdf7df3e0308c26c30b3f9738dba01038b97466c4f6282a2a68b1e473" url "https://repo.jellyfin.org/releases/server/macos/stable/installer/Jellyfin_#{version}.dmg" name "Jellyfin" homepage "https://jellyfin.org/" livecheck do url "https://repo.jellyfin.org/rele...
27
96
0.716776
e25db62c343ae15578078cbe82b20bfd418b1500
1,074
# Microsoft Visual C++ redistributable name "vc_redist_140" default_version "140" if windows_arch_i386? source :url => "https://s3.amazonaws.com/dd-agent-omnibus/Microsoft_VC141_CRT_x86.msm", :sha256 => "d582b8069174edaefb1fa04b84ebca375602655b5bdbb17aa15d61f43b25a67e", :target_filename => "Micros...
42.96
143
0.758845
e949464ac0acf1013d4cbeb19295ee32a882811a
2,552
# frozen_string_literal: true require "test_helper" class RunnerTest < Test def setup ARGV.clear end QUERY = <<~QUERY { "reportRequests": [{ "viewId": "000000", "dimensions": [{"name": "ga:date"}], "dateRanges": [{ "startDate": "2017-10-01", "endDate": ...
26.583333
232
0.609718
797c7bec3da1e8f8b346a32e5ecf5d24a6fbca4c
1,214
# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE Gem::Specification.new do |spec| spec.name = 'aws-sdk-servicediscover...
37.9375
126
0.674629
abc43fcfab113b11d42adbf42c7ac9f0f3e57e83
82
# frozen_string_literal: true module Representative EMPTY = proc {}.freeze end
13.666667
29
0.768293
bfb5402917d3ff0497fe77cccca7e6e4c5559948
61
module Sprint module Rails VERSION = "0.0.2" end end
10.166667
21
0.639344
1833b6c83e0a6b0955ca10a5fdb69f31c721e92f
32
# Hello puts "Hello, world!"
5.333333
20
0.59375
2196407b8c935f1ecfb3a0f92cdaa1ef54190aba
14,335
module Audited # Specify this act if you want changes to your model to be saved in an # audit table. This assumes there is an audits table ready. # # class User < ActiveRecord::Base # audited # end # # To store an audit comment set model.audit_comment to your comment before # a create, update...
35.22113
131
0.644506
ff66bcade7fdb1467177b9e735bb11625716205f
2,590
RSpec.configure do |config| config.filter_run focus: true unless Nenv.ci? config.run_all_when_everything_filtered = true config.disable_monkey_patching! config.profile_examples = 3 config.filter_gems_from_backtrace(*Specs::BACKTRACE_OMITTED) config.verbose_retry = true config.default_retry_count = Specs:...
33.205128
112
0.683784
bfb7661cd6680d740382b7ffeca61b11320ad43f
17
move "out" waitrt
8.5
10
0.764706
79c45469e642fe9858ac29faede1a53b01a10440
732
# Copyright (C) 2018-2020 MongoDB Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
29.28
74
0.733607
bbf45774bec548c2266a0280128226ad1370cc76
151
Spree::Core::Engine.add_routes do get '/order-status' => 'orders#status', as: :order_status_page post '/order-status' => 'orders#status_check' end
30.2
64
0.715232
1855a183887ad02c257c8f26723997e12a9512c1
1,050
# begin @log.trace("Started executing 'flint-util:winrm:ntlm:pwd.rb' flintbit...") begin hostname = @input.get('hostname') protocol = @input.get('protocol') username = @input.get('username') password = @input.get('password') bit_response = @call.bit('flint-util:winrm:connect:ntlm_connect.rb').set('c...
45.652174
126
0.646667
21e4d2204c08eeb228a29189eeb6471ea42f9cf5
573
module Stupidedi module Versions module FunctionalGroups module ThirtyForty module SegmentDefs s = Schema e = ElementDefs r = ElementReqs TD5 = s::SegmentDef.build(:TD5, "Carrier Details (Routing Sequence/Transit Time)", "To specify the carrier a...
28.65
98
0.619546
281cdf1a54fc6d1fc8522c041c2259d450f92216
1,426
# frozen_string_literal: true class DeviseCreateAdminUsers < ActiveRecord::Migration[5.2] def change create_table :admin_users do |t| ## Database authenticatable t.string :email, null: false, default: "" t.string :encrypted_password, null: false, default: "" ## Recoverable ...
31.688889
104
0.66129
ac1ed89281ccb178e5cce5071b3054d084d97e2b
168
# frozen_string_literal: true module Ci class DagJobGroupEntity < Grape::Entity expose :name expose :size expose :jobs, with: Ci::DagJobEntity end end
16.8
41
0.714286
f77fccbaa1e883c1877070710f796e2f9166c9fe
6,973
require 'google/apis/sheets_v4' require 'googleauth' require 'googleauth/stores/file_token_store' require 'fileutils' class GoogleController < ApplicationController include MatchesHelper include ApplicationHelper include GoogleHelper before_filter :check_logged_in @@SETTINGS = Setting.first def project...
31.695455
118
0.694679
e8348a5a974e8bc32686df6148158b813c31f9e2
4,914
# frozen_string_literal: true # # Copyright 2017, Socrata, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
31.703226
78
0.65812
1da91da40ad424573fbb4f9d445fc60f4225558b
920
class PostsController < ApplicationController before_action :find_post, only: [:show, :edit, :update, :destroy, :upvote, :downvote] before_action :authenticate_user!, except: [:index, :show] def index @posts = Post.all.order("created_at DESC") end def show end def new @post = current_user.posts.buil...
14.153846
86
0.706522
18e53f88b74a9efabcd3e69aafbc41a6d9cbd0ae
6,124
# frozen_string_literal: true require "isolation/abstract_unit" require "active_support/dependencies/zeitwerk_integration" class ZeitwerkIntegrationTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app end def boot(env = "development") app(env) end def tea...
26.283262
100
0.72273
393a84a573e4b29f43a2f53b7445c73b1ff0704b
3,839
require 'spec_helper' describe MindBody::Services::Client do let(:creds) { double('credentials') } before do creds.stub(:log_level).and_return(:debug) creds.stub(:source_name).and_return('test') creds.stub(:source_key).and_return('test_key') creds.stub(:site_ids).and_return([-99]) creds.stub(:u...
39.989583
89
0.494139
6144e8f37fe40e71f4498f5686070ea9f7d787fe
496
# frozen_string_literal: true require 'rails_helper' # Specs in this file have access to a helper object that includes # the Admin::AirlinesHelper. For example: # # describe Admin::AirlinesHelper do # describe "string concat" do # it "concats two strings with spaces" do # expect(helper.concat_strings("thi...
27.555556
71
0.709677
e2f690e9d616635e5120b04b3b4c718d133bfb59
3,094
module PropertyList # Parse XML plist into a Ruby object def self.load_xml xml XmlParser.new(xml).parse end class XmlParser #:nodoc: def initialize src @lexer = StringScanner.new src end def skip_space_and_comments @lexer.skip(%r{(?: [\x0A\x0D\u2028\u2029\x09\x0B\x0C\x20]+ ...
25.360656
99
0.532321
33ef07120b134877a48a209f624407510c46ce77
170
class CreateEventTypes < ActiveRecord::Migration def change create_table :event_types do |t| t.string :name t.timestamps null: false end end end
17
48
0.688235
ed5cc9d57132044639d8498c9d805212a92356e8
4,979
{ matrix_id: '635', name: 'lp_israel', group: 'LPnetlib', description: 'Netlib LP problem israel: minimize c\'*x, where Ax=b, lo<=x<=hi', author: 'M. Saunders', editor: 'D. Gay', date: '', kind: 'linear programming problem', problem_2D_or_3D: '0', num_rows: '174', num_cols: '...
55.322222
90
0.448684
912ab98e8d86e2b9c1be10fb44fca5e9d4b69e1e
509
require_relative './z_order' class Star attr_reader :x, :y def initialize(animation) @animation = animation @color = Gosu::Color.new(0xff_000000) @color.red = rand(256 - 40) + 40 @color.green = rand(256 - 40) + 40 @color.blue = rand(256 - 40) + 40 @x = rand * 640 @y = rand * 480 end ...
23.136364
65
0.589391
4aee4409dadbf0bf2dfaa57a7df4611dc339081c
716
# == Schema Information # # Table name: payment_detail_coupon_codes # # id :integer not null, primary key # payment_detail_id :integer # coupon_code_id :integer # created_at :datetime # updated_at :datetime # require 'spec_helper' describe PaymentDetailCouponCode do let...
27.538462
117
0.699721
fffc785fa10cfdbf461b6acf7ea8b37647ba5f2d
720
module Netzke::Core # The following methods are used when a component is generated stand-alone (as a part of a HTML page) module Embedding # Instantiating def js_component_instance %Q{Netzke.page.#{name.to_s.camelize(:lower)} = Ext.create("#{self.class.js_config.class_alias}", #{js_config.netzke_jsoni...
36
155
0.680556
918b3351022d5dc17fb2a8a9ccef41cbd530dfa2
198
class CreateProductions < ActiveRecord::Migration def change create_table :productions do |t| t.string :title t.text :description t.timestamps null: false end end end
18
49
0.681818
3324ec7a350685106030b4b026020011c69ef1e7
1,758
require 'spec_helper' require 'actions/app_find_or_create_skeleton' module VCAP::CloudController RSpec.describe AppFindOrCreateSkeleton do let(:user_audit_info) { UserAuditInfo.new(user_email: 'gooid', user_guid: 'amelia@cats.com') } let(:space) { Space.make } let(:name) { 'banana' } subject(:action...
33.807692
116
0.629124
626f32353bd47d9d857bf8c26a76f017dd18c74c
4,888
dir = File.dirname(__FILE__) require "#{dir}/page" require "#{dir}/navbar" class Developers < Page def initialize super(:page_title => "For Developers") end def promo "images/be-an-erector-engineer.jpeg" end def body_content h1 "Want to help develop Erector? Here's what to do." h2 "...
42.504348
311
0.690057
e295e071ffe9babc33a9f56cb1b8eebe44922744
223
class QuicklookJson < Cask url 'http://www.sagtau.com/media/QuickLookJSON.qlgenerator.zip' homepage 'http://www.sagtau.com/quicklookjson.html' version 'latest' no_checksum qlplugin 'QuickLookJSON.qlgenerator' end
27.875
65
0.775785
7aa53cc1a4d2acd6dd6f8267e3cc88a3fb400cfa
2,271
require 'net/http' require 'json' require 'date' module TimesheetNags # Growl me if my timesheets are outdated class Nagger def check_and_nag if should_nag? send_nag("Your timesheet is out of date 😭 Age: #{latest_timestamp_age} days.", is_good: false) else maybe_compliment 'You roc...
26.103448
102
0.626156
f8cf57579671c5bb0e7b31dec258ce55169a8ff9
4,914
require 'TinderHTTP/request' # RinderClient is the first and the only class you have to initialize to interact with the Tinder API # # ex: # client = RinderClient.new('your_facebook_email@email.com', 'your_facebook_password') # # # Get recommendations # recommendations = client.get_recommendations # # # Like (Swipe r...
37.8
156
0.741758
1a73498e93391c6ca67e95dd57297462c135eb06
1,145
class Search::Predicates def self.call(predicates) new(predicates).call end def initialize(predicates) @predicates = predicates.map(&method(:to_predicate)) end attr_reader :predicates def call predicates.chunk(&:key).each_with_object(base) do |(_key, chunk), hash| paragon = chunk.first ...
21.603774
75
0.674236
1d2df29dd5ba719fbd1bfa5b7f177eb8ec0e85be
1,612
# frozen_string_literal: true class DiversityForm attr_reader :trainee, :diversity_forms def initialize(trainee) @trainee = trainee @disclosure_form = Diversities::DisclosureForm.new(trainee) @ethnic_background_form = Diversities::EthnicBackgroundForm.new(trainee) @ethnic_group_form = Diversities...
22.388889
84
0.773573
62e0c69b60d884366dc8f92f556bff19af3f4455
2,125
# frozen_string_literal: true module Admin class DisputesController < BaseController load_and_authorize_resource before_action :set_dispute, only: %i[show edit update delete] # GET /admin/disputes def index params[:q] ||= {} @disputes = sortable_dispute_query_for(Dispute.active.all, para...
27.597403
97
0.664941
182413a3a20e6d36536d67a00132c96bdbf0ea52
205
class ApplicationController < ActionController::Base protect_from_forgery before_filter :authenticate_admin! protected def after_sign_out_path_for(resource) new_admin_session_path end end
17.083333
52
0.819512
e8720fb9929e2e5ffba53c0bfcf56f89dd00569f
2,324
module RubySL module Socket module SocketOptions def self.socket_level(level, family = nil) if level.is_a?(Symbol) or level.is_a?(String) if ::Socket.const_defined?(level) ::Socket.const_get(level) else if family and is_ip_family?(family) ip_...
27.341176
81
0.527969
4a07ca395630af57687aa5f8ee44b5a262e81dcb
260,152
# # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.15 # from Racc grammer file "". # require 'racc/parser.rb' class Ruby20Parser < RubyParser::Parser require "ruby_lexer" require "ruby_parser_extras" include RubyLexer::State::Values # :stopdoc: # Local Variables: ** # racc-token-length-max:14...
37.867831
123
0.51528
b92c5493835c4cf7c5863ffc28c6e0129e327e7f
2,198
module OrigenStandardSubblocks # Simple subblock for modeling RAM. # @note This currently assumes 32-bit addresses. # @note This currently assumes Big-Endian address space (e.g., the RAM grows upwards). class RAM include Origen::Model attr_reader :sim_config, :ecc # Create a new <code>OrigenStanda...
32.323529
88
0.677434
ab1531732f61509381689f7873e1b807e951d06c
227
# Preview all emails at http://localhost:3000/rails/mailers/invoice_mailer class InvoiceMailerPreview < ActionMailer::Preview def simple_message InvoiceMailer.simple_message('yoda@clrmail.com', Invoice.first) end end
25.222222
74
0.797357
615efb7a9619d284e8e7879026f28753f81a158d
29,634
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Network::Mgmt::V2019_06_01 # # FirewallPolicyRuleGroups # class FirewallPolicyRuleGroups include MsRestAzure # # Creates and initializes a ...
47.338658
192
0.718297
912719255d2b11abaccc6e1c930fcdd7500722ea
1,182
# encoding: utf-8 $LOAD_PATH.unshift File.expand_path("../lib", __FILE__) require "rubocop/yast/version" Gem::Specification.new do |spec| spec.name = "rubocop-yast" spec.summary = "Specific YaST Rubocop checks" spec.description = "This is a plugin for the RuboCop code style checker.\n" \ "It checks for YaST...
30.307692
79
0.675973
33dbed2b912a4356e23c5ff1e2b4ad688d01fbe4
489
# frozen_string_literal: true module RuboCop module Cop # This module provides functionality for checking if numbering match the # configured EnforcedStyle. module ConfigurableNumbering include ConfigurableFormatting implicit_param = /\A_\d+\z/ FORMATS = { snake_case: /(?:\D|_...
25.736842
76
0.619632
e967c2e92a2d67f8b853ac54fc1299cf6f872449
260
require 'sinatra' # aos verbos HTTP # localhost:4567/hello get '/' do 'Esta eh a home do site' end get '/hello' do 'Hello World!!!! deu, agora café!!' end # localhost:4567/soma?x=3&y=7 get '/soma' do "soma eh #{params[:x].to_i + params[:y].to_i}" end
15.294118
48
0.638462
6115fa2574fbd8a89b285d05b4ec6ac222c39e82
214
module RKelly module Nodes class BracketAccessorNode < Node attr_reader :accessor def initialize(resolve, accessor) super(resolve) @accessor = accessor end end end end
17.833333
39
0.64486
f8edd11a4db416f4ee6940a34fa6a95859f0c690
431
require 'rails_helper' # Test suite for the Todo model RSpec.describe Project, type: :model do it 'is not valid without a title' do proj = Project.new(title: nil) expect(proj).to_not be_valid end # it { should have_many(:tasks) } it 'is not valid without a description' do proj = Project.new(descr...
22.684211
53
0.698376
397c74b3569eef402e6771474f5e815058e746bb
593
class ApplicationController < ActionController::API include ActionController::Cookies attr_reader :current_admin_user before_action :set_current_admin_user def set_current_admin_user admin_cookies = '' admin_cookies = cookies[:stagingAuthToken] if Rails.env.staging? admin_cookies = cookies[:authTo...
29.65
103
0.767285
0348feab700492b366140de8a78935acac2858d8
1,806
describe "Quickbooks::Model::Item" do it "parse from XML" do xml = fixture("item.xml") item = Quickbooks::Model::Item.from_xml(xml) expect(item.id).to eq("2") expect(item.sync_token).to eq(0) expect(item.meta_data).not_to be_nil expect(item.name).to eq('Plush Baby Doll') expect(item.sku)....
32.25
74
0.668328
f8e321c95b55aa1c82d8fee585f9f491673c44f9
40
class Mathquest < ApplicationRecord end
13.333333
35
0.85
330bf40b78bc3fbc0ee16684ab5e76e2f6f7239d
2,845
# encoding: utf-8 module Backup module Database class Error < Backup::Error; end class Base include Backup::Utilities::Helpers include Backup::Configuration::Helpers attr_reader :model, :database_id, :dump_path ## # If given, +database_id+ will be appended to the #dump_filena...
33.081395
85
0.588752
e83354e420dd82cc6b2c367ca0bca9d8b74b06bc
372
module NotNaughty module InstanceMethods # Returns instance of Errors. def errors() @errors ||= ::NotNaughty::Violation.new end # Returns true if all validations passed def valid? validate errors.empty? end # Clears errors and validates. def validate errors.clear ...
18.6
60
0.66129
e801632ffb54d8684a3595e374936b61bcbd25df
3,737
module Asposeemailjava module AddMapiContactToPST def initialize() data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/' # Create an instance of MapiContact mapi_contact = Rjb::import('com.aspose.email.MapiContact') # Contact #1 contact1 =...
63.338983
167
0.727321
ac23ed6b82af2eb0d13fed22e48290edc97e241f
1,121
# A simple module containing some helper methods for acceptance tests. module Helpers # Login the given user and visit the root url. def login(user) login_as user, scope: :user visit root_url end # Returns a String containing the id of the currently active element. def focused_element_id page.eva...
28.74359
87
0.724353
08858249bf8835e11c1d75dcb4c550a8507ba520
1,639
class Api::V1::ContentAreaController < ApplicationController skip_before_filter :verify_authenticity_token, :if => Proc.new { |c| c.request.format == 'application/json' } # Just skip the authentication for now # before_filter :authenticate_user! respond_to :json def index content_a...
32.137255
83
0.537523
391c83e716d118c250f6fee7a4861f0319fc1c09
45
module Washingtonleg VERSION = "0.0.1" end
11.25
20
0.711111
26068a2335aa4e1a0d7da9a30cd2b46bd8c61a18
980
# # Be sure to run `pod lib lint Siegel.podspec' to ensure this is a # valid spec and remove all comments before submitting the spec. # # Any lines starting with a # are optional, but encouraged # # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name ...
37.692308
97
0.619388
38002f22c6a696df3ef2af9590439c1966940975
618
# frozen_string_literal: true module Overcommit::Hook::PreCommit # Runs `dartanalyzer` against modified Dart files. # @see https://dart.dev/tools/dartanalyzer class DartAnalyzer < Base MESSAGE_REGEX = /(?<type>.*)•\ (?<message>[^•]+)•\ (?<file>[^:]+):(?<line>\d+):(\d+)\.*/.freeze def run result = ...
26.869565
99
0.605178
08bf5ff052265aac6cdbb43eeec3b55c1c79a783
1,453
class Album attr_reader :id, :name, :year, :genre, :artist, :sold_albums, :albums @@albums = {} @@total_rows = 0 @@sold_albums = {} def initialize(name, id, year, genre, artist) @name = name @id = id || @@total_rows += 1 @year = year @genre = genre @artist = artist end def self...
18.1625
94
0.603579
262b8063034244978166684c5b658cb8bd093749
1,447
require 'xeroizer/record/application_helper' module Xeroizer class GenericApplication include Http extend Record::ApplicationHelper attr_reader :client, :xero_url, :logger, :rate_limit_sleep, :rate_limit_max_attempts extend Forwardable def_delegators :client, :access_token record :Account...
25.839286
88
0.707671
e21215f294c1b7940d89874bfc385399c2e46177
86
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'hash_fingerprint'
28.666667
58
0.755814
61d3ab538e407b671011f2ce8d769e395bc10c80
75
module Typhoeus # The current Typhoeus version. VERSION = '0.6.8' end
12.5
33
0.693333
4abdb017cc87e79ab4e093fdb8d53e24b7d60c13
2,424
class Libhttpseverywhere < Formula desc "Bring HTTPSEverywhere to desktop apps" homepage "https://github.com/gnome/libhttpseverywhere" url "https://download.gnome.org/sources/libhttpseverywhere/0.4/libhttpseverywhere-0.4.8.tar.xz" sha256 "bc28ecceb84457c15bdb6a9cf6db74ad65d21363ce4893c22fee4dfec6e80f49" bott...
28.857143
97
0.641914
bf1dbf293b26bddc68ffb0022f99b3b58d47b494
1,784
#!/usr/bin/env ruby # Copyright (c) 2009 Cory Ondrejka. All rights reserved. # See License.txt for licensing details. # adds specific export_ScratchOut method into BalsamiqExportHTML class BalsamiqExportHTML def export_ScratchOut(c) # create a canvas tag, javascript, draw an arrow following the appro...
26.235294
140
0.622197
1df98be339354b1ff311f1faf6aef21def32cbb2
268
module OpenActive module Models module Schema class SeaBodyOfWater < ::OpenActive::Models::Schema::BodyOfWater # @!attribute type # @return [String] def type "schema:SeaBodyOfWater" end end end end end
19.142857
70
0.593284
ac560091bed65e7454180cfa04642954171e8b2d
830
class Libsoxr < Formula desc "High quality, one-dimensional sample-rate conversion library" homepage "https://sourceforge.net/projects/soxr/" url "https://downloads.sourceforge.net/project/soxr/soxr-0.1.3-Source.tar.xz" sha256 "b111c15fdc8c029989330ff559184198c161100a59312f5dc19ddeb9b5a15889" bottle do c...
37.727273
93
0.789157
bb0018a5ea78be1a8084f9f1c4c9a8b015078d81
10,853
# This class represents a Docker Container. It's important to note that nothing # is cached so that the information is always up to date. class Docker::Container include Docker::Base # Update the @info hash, which is the only mutable state in this object. # e.g. if you would like a live status from the #info h...
29.253369
93
0.641482
189f14887f1028944b65b6cb4480ac43321aee2a
6,258
#require_relative 'db_access' require 'json' #http://stackoverflow.com/questions/2070010/how-to-output-my-ruby-commandline-text-in-different-colours #with help for other colours from... #http://stackoverflow.com/questions/2616906/how-do-i-output-coloured-text-to-a-linux-terminal class Colours COLOR1 = "\e[1;36;40m" ...
32.936842
212
0.599712
91d715b2d637376ec18e268ee9aa3d4a1c46a340
768
require_relative "base_service" module Files class CreateService < Files::BaseService def commit repository.commit_file(current_user, @file_path, @file_content, @commit_message, @target_branch) end def validate super file_name = File.basename(@file_path) unless file_name =~ Git...
24.774194
102
0.669271
91e1d482740716326cf31b82fb74b3357aa6e3d7
869
require 'yadm/version' require 'yadm/entity' require 'yadm/adapters' require 'yadm/identity_map' require 'yadm/mapping' require 'yadm/mapper' require 'yadm/criteria' require 'yadm/query' require 'yadm/criteria_parser' require 'yadm/repository' module YADM class << self def setup(&block) instance_eval(&bloc...
21.725
66
0.681243
3311527cdf1bf9e779a1023550cd53b11bfef215
3,616
$controller = PagesController.new $content_dir = "./pukiwiki/content" $file_dir = "./pukiwiki/static" $storage_dir = "./storage/files" $abs_storage_dir = Dir.pwd + $storage_dir[1, $storage_dir.size - 1] $group = nil $user = User.find(1) puts $abs_storage_dir $err = "" $err_f = [] def migrate_pukiwiki readdir $content...
30.905983
205
0.668418
33cb2b8c9862c37837c56a54c232f8c7bff4eaa6
506
# encoding: utf-8 module Mutant class Mutator class Node # Mutator for return statements class Return < self handle(:return) children :value private # Emit mutants # # @return [undefined] # # @api private # def dispatch...
15.333333
37
0.494071
212888c18e397f1d9d11163ac5514ea429247d76
137
class Mumukit::Defaults::ExpectationsHook < Mumukit::Hook def compile(request) request end def run!(request) [] end end
13.7
57
0.678832
799833243f1f5ff35e1a26ac0703c70a94ce1aa9
1,346
class ResourceProject < Resource belongs_to :project, foreign_key: :reference_id validates :project, presence: true validates :sub_type, presence: true validate :name_unique_by_project SUB_TYPES = %w(ResourceProjectVariable ResourceProjectSsh) validates :sub_type, :inclusion => {:in => SUB_TYPES} afte...
24.925926
87
0.692422
18e181775ea24743978516adad73332d4712e93a
1,802
class Gdbm < Formula desc "GNU database manager" homepage "https://www.gnu.org/software/gdbm/" url "https://ftp.gnu.org/gnu/gdbm/gdbm-1.18.1.tar.gz" mirror "https://ftpmirror.gnu.org/gdbm/gdbm-1.18.1.tar.gz" sha256 "86e613527e5dba544e73208f42b78b7c022d4fa5a6d5498bf18c8d6f745b91dc" license "GPL-3.0" revisi...
36.04
95
0.727525
7a412a1a1ccca7e89a9bf07bb2135f2dbbfa29c0
9,619
RSpec::Support.require_rspec_support "directory_maker" # ## Built-in Formatters # # * progress (default) - Prints dots for passing examples, `F` for failures, `*` # for pending. # * documentation - Prints the docstrings passed to `describe` and `it` methods # (and their aliases)...
35.234432
91
0.693419
1ae53edae1df598592b9f4d80d90a391849aacae
1,143
require "csv" class UpdateSubscriberListTitles < ActiveRecord::Migration[5.1] def up csv_file = Rails.root.join( "db", "migrate", "data", "subscriber-list-titles-2018-03-05.csv" ) CSV.read(csv_file, headers: :first_row) .reject { |item| update_list(item["id"], item["gov_delivery_id"], item["...
30.078947
94
0.67979
bb5b23747b763288fc4495689d1214659c0c4967
3,314
# General Then /^I should see error messages$/ do assert_match /error(s)? prohibited/m, response.body end # Database Given /^no user exists with an email of "(.*)"$/ do |email| assert_nil User.find_by_email(email) end Given /^I signed up with "(.*)\/(.*)"$/ do |email, password| @me = user = Factory(:user, ...
28.324786
75
0.654798
4a0493ad8ede68a1ea16c9660514643366e4b50e
400
# 生年月日(月)のデータ class BirthMm < ActiveHash::Base self.data = [ { id: 1, month: '1' }, { id: 2, month: '2' }, { id: 3, month: '3' }, { id: 4, month: '4' }, { id: 5, month: '5' }, { id: 6, month: '6' }, { id: 7, month: '7' }, { id: 8, month: '8' }, { id: 9, month: '9' }, { id: 10, ...
22.222222
32
0.4
bbaa116def26895d372dde786751c1d9e883fb3b
12,341
# typed: false # frozen_string_literal: true require "resource" require "checksum" require "version" require "options" require "build_options" require "dependency_collector" require "utils/bottles" require "patch" require "compilers" require "global" require "os/mac/version" require "extend/on_os" class SoftwareSpec ...
26.313433
111
0.674419
615f02f74a6faeaadcaf199dd280610e88c3385f
11,296
#!/usr/bin/ruby # -------------------------------------------------------------------------- # OpenMS -- Open-Source Mass Spectrometry # -------------------------------------------------------------------------- # Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, # ETH Zurich, and Fre...
32.182336
100
0.579409
b94ac59fb80f310a3d6067b4b1d5e9c22fd6df8b
8,877
# # Copyright:: Copyright (c) Chef Software Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
39.986486
239
0.63152
28b34325af43f720f7a6a48ea2279ed08f13a8d1
1,402
# coding: utf-8 # frozen_string_literal: true module Stealth module Flow class Specification attr_reader :flow_name attr_accessor :states, :initial_state def initialize(flow_name, &specification) @states = Hash.new @flow_name = flow_name instance_eval(&specification) ...
24.596491
72
0.592725
6173042cc1b6dde24fa7e101db0732e0c4fbce51
611
module Chart module StorageUtils module_function def table_name_for(type) "#{type}_data" end def column_names_for(type) column_names = Enumerator.new do |y| y << 'x'; y << 'y'; y << 'z'; n = 1 loop do y << "z#{n}" n += 1 end end ...
21.821429
71
0.564648
185a3dac99671d0166cab46e278a6cfc8a312804
10,646
describe ManageIQ::Providers::Foreman::ConfigurationManager::Refresher do include Spec::Support::EmsRefreshHelper it ".ems_type" do expect(described_class.ems_type).to eq(:foreman_configuration) end context "#refresh" do let(:provider) do _guid, _server, zone = EvmSpecHelper.create_guid_miq_serv...
47.73991
128
0.630472
87799f27897c26020928db5c4e4a4654424b23e4
438
require 'spec_helper' require 'dynamic_classes' # If you comment out belows, other specs might fails. # RSpec.configuration.mock_with(:rspec) do |config| # config.before_verifying_doubles do |reference| # reference.target.define_attribute_methods # end # end describe User do it 'can be doubled' do insta...
25.764706
72
0.714612
1ce1748908dadf7968b3940eb24c59a229c49560
1,927
module Cms::Addon::OpendataRef::Dataset extend SS::Addon extend ActiveSupport::Concern included do attr_accessor :skip_assoc_opendata field :opendata_dataset_state, type: String, default: 'none', metadata: { branch: false } embeds_ids :opendata_datasets, class_name: "Opendata::Dataset", metadata: { ...
30.109375
112
0.729632
088ebf9e3326f8e100beda3065ca35baa79993f9
1,130
cask 'unity-linux-support-for-editor@2019.1.0a10' do version '2019.1.0a10,84f9b5a9b69f' sha256 :no_check url "https://download.unity3d.com/download_unity/84f9b5a9b69f/MacEditorTargetInstaller/UnitySetup-Linux-Support-for-Editor-2019.1.0a10.pkg" name 'Linux Build Support' homepage 'https://unity3d.com/unity/'...
31.388889
141
0.719469
03c71fa2198db1359ca58819cbc03cde05a5996d
1,029
# frozen_string_literal: true class Games::AddMenus include Dry::Monads[:result, :do] def call(input) game = yield fetch_game(input) yield add_notes(game) yield add_system_menus(game) Success(game) end private def fetch_game(input) game = Game.find_by(id: input) if game Succe...
23.386364
87
0.664723
1c56814ce7aea28dc44ba5e3104359bbbb22aeff
2,241
require 'digest' require 'pp' module Bitcoin class Header attr_reader :version attr_reader :prev attr_reader :merkleroot attr_reader :time attr_reader :bits attr_reader :nonce def initialize( version, prev, merkleroot, time, bits, nonce ) @version = version ...
24.626374
82
0.564926
11520fbc8daa989e273ba3544354efb022c438d7
4,340
namespace :user do # rake user:downgrade_expired task :downgrade_expired => :environment do User.pro_only.yearly.not_forever.joins(:payments).having("MAX(payments.date) < ?", 368.days.ago).group("users.id").each do |user| user.update(plan: "Free") begin UserMailer.downgraded(user).deliver_l...
39.454545
146
0.653226
d52fcb2342d60e87b150f8b45784bdb7b7917cb0
828
class CypherShell < Formula desc "Command-line shell where you can execute Cypher against Neo4j" homepage "https://github.com/neo4j/cypher-shell" url "https://github.com/neo4j/cypher-shell/releases/download/4.1.1/cypher-shell.zip" sha256 "5216e57490fe95ff5e677f1790444bd0fda7522f81c5ffca133bb9edb8fddd25" licen...
28.551724
97
0.719807
ed2fb0ee29711f19c891279cb8e98de923f5a208
1,023
require 'eeny-meeny/routing/smoke_test_constraint' require 'eeny-meeny/middleware' require 'rack/test' describe EenyMeeny::SmokeTestConstraint do let(:request) do Rack::MockSession.new(EenyMeeny::Middleware.new(MockRackApp.new)) end let(:request_with_cookie) do request.set_cookie('smoke_test_shadow_v1=...
28.416667
238
0.718475
18b0a46c92881787cad53fb445026d4c8a529b95
3,084
# frozen_string_literal: true require 'spec_helper' RSpec.describe Issue::Metrics do let(:project) { create(:project) } subject { create(:issue, project: project) } describe '.for_issues' do subject(:scope) { described_class.for_issues([issue1, issue2]) } let(:issue1) { create(:issue) } let(:issu...
36.282353
108
0.686446