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
1d8dd7e83e8b4ccede85f1a8d787e972a25f7e4b
4,047
module ResponseFixtures def accessible_users_response { "users" => [ { "id" => 100, "email" => "bob@yourcompany.com", "first_name" => "Bob", "last_name" => "Anderson" } ] } end def sign_on_tokens_response { "sign_on_token" => {...
24.828221
184
0.51149
1a770a4d8c70f5fb3abb5a7f81eb53ec9c7987cb
4,305
# Copyright (C) 2019 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 writi...
34.166667
89
0.656214
5d8fd9f6f6bd8b4f3ac8d8b6c2f44dfc8693dbd1
15,967
require 'rubygems' require 'rest_client' require 'nokogiri' #require '/var/www/openshift/broker/config/environment' require 'logger' require 'parseconfig' require 'rspec' $hostname = "localhost" begin if File.exists?("/etc/openshift/node.conf") config = ParseConfig.new("/etc/openshift/node.conf") val = confi...
33.614737
135
0.660299
79fef90295bde30135b7c62775a901d5a56d7a72
2,827
# frozen_string_literal: true require 'spec_helper' module LicenseFinder describe ConanInfoParser do subject { ConanInfoParser.new } let(:parsed_config) do [ { 'name' => 'conanfile.txt', 'ID' => '4c3dfe99a9c2d5003148e0054b9bacf58ac69f66', 'BuildID' => 'None', ...
40.971014
129
0.551468
bb00daad9ab205ceb4fce36893272aabb32f4a71
3,200
# frozen_string_literal: true module Results module Csv # Responsible for converting DB result rows into calls to buffer.write with appropriate # header names. Expects the following columns in the passed rows: # - question_code # - value # - time_value # - date_value # - datetime_value ...
27.826087
91
0.583438
e8042fff7d23bfedd25a691292d00f42ff647286
9,825
class Event < ApplicationRecord has_many :event_instances belongs_to :project serialize :exclusions belongs_to :creator, class_name: 'User', touch: true extend FriendlyId friendly_id :name, use: :slugged include IceCube validates :name, :time_zone, :repeats, :category, :start_datetime, :duration, pre...
33.192568
175
0.727532
5d64e70d6e10d7975274ad28c783bb9a2fd03a87
1,058
Gem::Specification.new do |s| s.name = "cqm-reports" s.summary = "A library for import and export of reports for use with electronic Clinical Quality Measures (eCQMs)." s.description = "A library for import and export of reports for use with electronic Clinical Quality Measures (eCQMs)." s.email = "tacoma-list@...
35.266667
162
0.652174
f7d5192f997331ce6904dc1979dd84d31b4dc974
259
require 'wrap_response_decorator' module HaikuBot class WrapResponse < Grape::API use WrapResponseDecorator format :json namespace :decorated do desc 'Returns pong.' get :ping do { ping: 'pong' } end end end end
17.266667
33
0.644788
7acfef7e975303b7b9d3f0564bc43764788d1ed3
3,606
require 'spec_helper' require 'matchers/paper' describe Arx do context '.search' do let :papers do [ 'Parallel Coordinate Descent for L1-Regularized Loss Minimization', 'Optical absorption of non-interacting tight-binding electrons in a Peierls-distorted chain at half band-filling' ] ...
38.774194
121
0.634498
3891b509adbcafca887dc7d348ecd90346b9b340
270
class AddMessageThreadsPublicTokenColumn < ActiveRecord::Migration def up add_column :message_threads, :public_token, :string add_index :message_threads, :public_token, unique: true end def down remove_column :message_threads, :public_token end end
24.545455
66
0.777778
b9ace5e3422b4b5268b35afa84be36b2516b6789
13,222
module ArelExtensions module Visitors class Arel::Visitors::SQLite DATE_MAPPING = { 'd' => '%d', 'm' => '%m', 'w' => '%W', 'y' => '%Y', 'wd' => '%w', 'M' => '%M', 'h' => '%H', 'mn' => '%M', 's' => '%S' }.freeze DATE_FORMAT_DIRECTIVES = { # ISO C / POSIX '%Y' => '%Y', '%C...
33.055
128
0.550371
ff57f976614de6f898bd6015c5d22b427a6569ff
2,897
# encoding: utf-8 module Ebooks # This generator uses data identical to a markov model, but # instead of making a chain by looking up bigrams it uses the # positions to randomly replace suffixes in one sentence with # matching suffixes in another class SuffixGenerator # Build a generator from a corpus of...
30.177083
95
0.581981
261aef9518e2a2516f715f3dabe91fd533ec2643
2,344
# frozen_string_literal: true module SmimeHelper INFINITE_EXPIRY = 1000.years SHORT_EXPIRY = 30.minutes def generate_root issue(cn: 'RootCA', signed_by: nil, expires_in: INFINITE_EXPIRY, certificate_authority: true) end def generate_intermediate(signer_ca:) issue(cn: 'IntermediateCA', signed_by: si...
39.066667
117
0.726536
38a7126c7a7f300a2a6b1cc7382c8c7fb45c8272
6,493
# frozen_string_literal: true class Bridgetown::Site module Configurable # Set the site's configuration. This handles side-effects caused by # changing values in the configuration. # # @param config [Configuration] # An instance of {Configuration}, # containing the new configuration. ...
34.908602
95
0.67026
bf2290e2cc396982504ad814d9f41007f9f4bbe5
7,480
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either lic...
38.358974
245
0.684893
91574b31de7988251e2dc380a9209aeecf4c82e9
1,039
require 'set' describe "SortedSet#classify" do before(:each) do @set = SortedSet["one", "two", "three", "four"] end it "yields each Object in self in sorted order" do res = [] @set.classify { |x| res << x } res.should == ["one", "two", "three", "four"].sort end ruby_version_is "" ... "1.8.8...
29.685714
108
0.623677
0100444a9e542d5e17c983fe7cb9764a927d268e
372
require_relative '../helper' describe "show-input" do before do @t = pry_tester end it 'should correctly show the current lines in the input buffer' do @t.push(*unindent(<<-STR).split("\n")) def hello puts :bing STR @t.process_command 'show-input' expect(@t.last_output).to mat...
20.666667
74
0.629032
e26f2ae87c03ffaadeab3d9f5ac77fe65ebc9987
1,607
module Fog module AWS class AutoScaling class Real require 'fog/aws/parsers/auto_scaling/describe_adjustment_types' # Returns policy adjustment types for use in the put_scaling_policy # action. # # ==== Returns # * response<~Excon::Response>: # * ...
29.759259
108
0.554449
3861be64b0a1484c9594e985d6d9b5952a578d88
17,232
#-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2018 the OpenProject Foundation (OPF) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 3. # # OpenProject is a fork of ChiliProject, which is a fork of ...
31.387978
125
0.576602
03dd1c9ffb09f907aa8f1edd6e61a1149e5833bb
762
#encoding: utf-8 # Copyright (c) 2013 Universidade Federal Fluminense (UFF). # This file is part of SAPOS. Please, consult the license terms in the LICENSE file. class PhaseDuration < ActiveRecord::Base belongs_to :phase belongs_to :level has_paper_trail validates :phase, :presence => true validates :level...
29.307692
138
0.730971
283fb6106855495c11b663a9dc01dae52a28d155
221
class Testify::CaseNotFoundError < Testify::TestifyError def initialize(msg = nil, error_code = nil) msg ||= 'Test case was not found.' super(msg) error_code ||= 'NOT_FOUND' @code = error_code end end
24.555556
56
0.674208
1db63757ed30bd140332e2f95e4c9c7050ec1210
1,860
require 'test_helper' class UsersSignupTest < ActionDispatch::IntegrationTest def setup ActionMailer::Base.deliveries.clear end test "invalid signup information" do get signup_path assert_no_difference 'User.count' do # 以下と等価 # before_count = User.count # post users_path, ... # ...
32.631579
78
0.638172
015d9da9dcfa6c8c9ee507ab7f8a270d5d200564
1,434
require "feedjira" require_relative "../repositories/story_repository" require_relative "../repositories/feed_repository" require_relative "../commands/feeds/find_new_stories" class FetchFeed USER_AGENT = "Stringer (https://github.com/swanson/stringer)" def initialize(feed, parser: Feedjira::Feed, logger: nil) ...
25.607143
88
0.677127
ed1b82f049d57a393fcf2f7eec81d5dc4e5b7bb2
2,305
require 'rails_helper' require 'json2qti' require 'nokogiri' describe Json2Qti::Converter do let(:json) { { "title" => "This & That", "ident" => "ib7b957_swyk", "assessmentId" => "152", "standard" => "qti", "items" => [ { "id" => "4965", "title" => "", "questio...
31.148649
91
0.576139
6a918dcd72c8ae416a1870e64d9bb7cbfb09ff9c
483
# frozen_string_literal: true class Remove3StateBooleans < ActiveRecord::Migration[5.0] def change change_column_null :stages, :confirm, false, false change_column_null :stages, :deploy_on_release, false, false change_column_null :stages, :production, false, false change_column_null :stages, :no_code_...
40.25
68
0.778468
382b2aa7c4a4b54aeb55b504a8281efdc2508285
735
# This migration comes from spree (originally 20151021163309) class ConvertSalePromotions < ActiveRecord::Migration def up sale_promotions.update_all(apply_automatically: true) end def down # intentionally left blank end private def sale_promotions promo_table = Spree::Promotion.arel_table ...
24.5
82
0.707483
8727756ce501fc42288c80be4dea777ada77b439
2,969
# frozen_string_literal: true require 'spec_helper' RSpec.describe Gitlab::GithubImport::ReschedulingMethods do let(:worker) do Class.new { include(Gitlab::GithubImport::ReschedulingMethods) }.new end describe '#perform' do context 'with a non-existing project' do it 'does not perform any work' d...
26.274336
94
0.59616
91074347345de84416c6a26b9ecccd884cd8fe3b
1,861
# frozen_string_literal: true # Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
35.113208
121
0.744224
abbd8a2f6dc5e49d3bbd94b837e837fc6937bce8
1,376
# 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/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE require 'aws-sdk-core' require 'aws-sigv4' require_relative 'aws-sdk-guarddu...
25.481481
84
0.74564
28e01f30475439490ef383ed30df87de44ba1f72
717
Pod::Spec.new do |s| s.name = 'AWSCloudWatch' s.version = '2.10.0' s.summary = 'Amazon Web Services SDK for iOS.' s.description = 'The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS.' s.homepage = 'ht...
39.833333
157
0.615063
33cd08b666908ac35e68892ee5de2cc7e8d8d960
334
# frozen_string_literal: true class FilterUsernameParamsValidator < ActiveModel::EachValidator def validate_each(record, _attribute, value) return if value.blank? return if value.match?(/\A[A-Za-z0-9_]+\z/) message = I18n.t('messages._validators.is_invalid') record.errors.add(:filter_username, messa...
27.833333
64
0.745509
6aa5c16fe6c926261a05881ea1c4a27ad944ce55
39
module Mockjax VERSION = "0.0.3" end
9.75
19
0.666667
acd6b609e390b711439b97156227d9aee1c5deb5
488
cask 'gingko' do version '2.1.1' sha256 '17af34934998c27b5fb09366bd887daaca8458338fef950f79c00fcba92db506' # github.com/gingko/client was verified as official when first introduced to the cask url "https://github.com/gingko/client/releases/download/v#{version}/gingko-client-#{version}-mac.zip" appcast 'https...
32.533333
103
0.758197
1aaa341ec8fea955401696ceae142e38edc9a2d4
1,780
class UsersController < ApplicationController before_action :set_user, only: [:show, :edit, :update, :destroy] # GET /users # GET /users.json def index @users = User.all end # GET /users/1 # GET /users/1.json def show end # GET /users/new def new @user = User.new end # GET /users/1...
23.733333
88
0.637079
ffef0720fd01f29c0c1aedc359ae8e9df8ae35c4
202
require 'bundler/setup' require 'sinatra' require 'json' set :bind, '0.0.0.0' set :port, 1300 get '/', :provides => :json do {:status => 'success',:info => 'yes!!!', :service => 'ruby'}.to_json end
18.363636
70
0.613861
791a32747aa5aa4dde93fd10fbf5a241aacc4190
496
class SessionsController < ApplicationController def new end def create user = User.find_by(email: params[:session][:email].downcase) if user && user.authenticate(params[:session][:password]) # Log the user in and redirect to the user's show page. log_in user redirect_to user else ...
22.545455
81
0.677419
1d322a80f809a40fd54247fa562ad721d23e0f98
421
module Octokit class Client # Methods for the Emojis API module Emojis # List all emojis used on GitHub # # @return [Sawyer::Resource] A list of all emojis on GitHub # @see https://developer.github.com/v3/emojis/#emojis # @example List all emojis # Octokit.em...
22.157895
66
0.579572
e8ea25a391858c6a28b18b0d15673c5372b108de
820
# frozen_string_literal: true OmniAuth.config.logger = Rails.logger Rails.application.config.middleware.use OmniAuth::Builder do if Rails.env.development? || Rails.env.test? ENV['GPLUS_KEY'] = '463111787485-rj34ev5ai9pncbjl0oreqg3gr86jt92j.apps.googleusercontent.com' ENV['GPLUS_SECRET'] = 'IR5APLsAJhmP8NPLS...
34.166667
97
0.709756
bb2b612d173e14421860258d7a4dadcb57d137f3
3,010
#!/usr/bin/env ruby require 'spec_helper' require 'easy_type/helpers.rb' describe "convert_csv_data_to_hash" do include EasyType::Helpers context "with deprecated option :column_delimeter" do subject { "col1,col2,col3\nvalue1,value2,value3"} it "returns an Array of Hashes" do expect(convert_csv_data_to_ha...
25.726496
86
0.672093
bbd58a4c762a90dbee54ae0b496658863dac9825
910
cask "zulu" do if Hardware::CPU.intel? version "15.0.2,15.29.15-ca" sha256 "6284c7fb89cbbc8552788a3db522f6226a64d84454d21e075558c050328f6ed7" url "https://cdn.azul.com/zulu/bin/zulu#{version.after_comma}-jdk#{version.before_comma}-macosx_x64.dmg", referer: "https://www.azul.com/downloads/zulu/zul...
36.4
113
0.732967
5d5a6620ea74b5c755e42f140a97e2c0aedfa235
97
require "tv_chart_rails/version" module TvChartRails class Engine < ::Rails::Engine end end
13.857143
32
0.762887
269762931129670fa2c7167d7e40178cb9b6ba1c
1,707
Puppet::Parser::Functions::newfunction(:redact, :doc => <<DOC This function will modify the catalog during compilation to remove the named parameter from the class from which it was called. For example, if you wrote a class named `foo` and called `redact('bar')` from within that class, then the catalog would not reco...
38.795455
122
0.732279
398eb8b88d6c8294c05c5c05d554a865539c795f
1,547
require File.expand_path('../boot', __FILE__) require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module EngineerMatching class Application < Rails::Application # Settings in config/environments/* t...
38.675
99
0.714932
f8ffa95cde47e7884b6a3b8a411018b6b6794183
979
module Gitlab module Ci module Status module Build class Stop < SimpleDelegator include Status::Extended def text 'manual' end def label 'manual stop action' end def icon 'icon_status_manual' ...
19.58
72
0.446374
013cb60b5885ba7836b3ee5bbe5c4e618f846ed6
880
module Less2Sass module Less module Tree # CSS color representation. # # Usually appears at variable definitions. # Example: # - `@color: #fff;` rule contains ColorNode # - `color: #fff;` property declaration does # not contain ColorNode # # The Sass e...
29.333333
122
0.597727
1add3f9e3885fe8cd8a61879ef55e89efc4dbe90
477
require "tinet/command/base" module Tinet module Command class Exec < Base def run(node_name, command) node = nodes.find { |node| node.name == node_name } raise "No such container: #{node_name}" if node.nil? case node.type when :docker sudo "docker exec -it #{names...
25.105263
68
0.589099
4a88d7bbbe93d0317369a639b138deebfeff4465
975
class Help2man < Formula desc "Automatically generate simple man pages" homepage "https://www.gnu.org/software/help2man/" url "https://ftpmirror.gnu.org/help2man/help2man-1.47.4.tar.xz" mirror "https://ftp.gnu.org/gnu/help2man/help2man-1.47.4.tar.xz" sha256 "d4ecf697d13f14dd1a78c5995f06459bff706fd1ce593d1c02d...
34.821429
92
0.757949
87c9d0d970154a392ec9f649c1f3039960113959
941
maintainer 'Bryan Crossland' maintainer_email 'bacrossland@gmail.com' license 'Apache 2.0' description 'Installs and configures Passenger under Ruby Enterprise Edition with Apache' source_url 'https://github.com/bacrossland/passenger-enterprise-install' issues_url 'https://github.com/bac...
44.809524
129
0.768332
b9576d6de04957c4792e4e8c34b427a306d47476
2,576
module ActsAsSplittable module Splittable def splittable_attributes @splittable_attributes ||= self.class.splittable_attributes_class.new end def split_column_values!(columns = nil) splittable_aggregate_columns(columns) do |column, splitter| begin value = __send__(column) ...
30.666667
110
0.706134
01651d546098629ee870e9a1a7a2eec0fa931391
4,004
# # Author:: Adam Leff (<adamleff@chef.io>) # Author:: Ryan Cragun (<ryan@chef.io>) # # Copyright:: Copyright 2012-2016, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You...
32.290323
111
0.636114
5de2ded9b9ff348c8538c05e54d18f4e726036a7
1,456
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ServiceFabric::V6_2_0_9 module Models # # Metadata about an Analysis Event. # class AnalysisEventMetadata include MsR...
25.103448
70
0.525412
79301c1f08731377475037c4411ddca5a39ef8c4
436
# The Book of Ruby - http://www.sapphiresteel.com class MyClass def initialize @aVar = "Hello world" end end ob = MyClass.new p( ob.instance_eval { @aVar } ) #=> "Hello world" p( ob.instance_eval( "@aVar" ) ) #=> "Hello world" # p( ob.eval( "@aVar" ) ) #=> error: eval is a private method # c...
24.222222
66
0.582569
616f28fc6f48828556c2103d096d0eab3830dc40
571
module HTTP module Protocol class Request include Message extend Forwardable def self.build(request_line) Builder.(request_line) end def_delegators :headers, :accept, :accept_charset attr_reader :action attr_reader :path def initialize(action, path) ...
17.84375
55
0.597198
edb502adf18144eb2876d708aab7bbf744d75f51
1,449
class Api::V3::Transformer class << self def redirect_to_deduped_patient(attributes) # NOTE: Move this to a different layer if/when this becomes more complex deduped_record = DeduplicationLog.find_by(deleted_record_id: attributes["id"])&.deduped_record deduped_patient = DeduplicationLog.find_by(...
31.5
116
0.717736
1dc772f8bdbdcb7b43b4d4ac9f35085111a5addf
381
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::MediaServices::Mgmt::V2018_03_30_preview module Models # # Defines values for StretchMode # module StretchMode None = "None" AutoS...
22.411765
70
0.690289
f8df08233692d578cba3f598d4c45cf7a5cd6439
66
class Admin::Checkout::BaseController < Admin::BaseController end
22
61
0.818182
03df66a6ef2cfb5132f46d4f1a40879088d84727
411
cask 'mouse-locator' do version '1.1' sha256 '1809760210e5afb80f9be34dc930c0c6fb84efee91747640d2d9717561149645' url 'http://www.2point5fish.com/files/MouseLocator.dmg' appcast 'http://www.2point5fish.com/index.html' name 'Mouse Locator' homepage 'http://www.2point5fish.com/index.html' prefpane "Mouse Lo...
34.25
106
0.788321
e9ab710cba53737014b00984c9347cade06975b9
1,035
require 'net/ftp' module Seek module DownloadHandling ## # A class to handle streaming remote content over FTP. class FTPStreamer def initialize(url, options = {}) @url = url @size_limit = options[:size_limit] end # yields a chunk of data to the given block def st...
27.972973
104
0.601932
38295461de46c1d40356385dcaba15ce34c67118
5,357
# Copyright:: (c) Autotelik Media Ltd 2016 # Author :: Tom Statter # Date :: March 2016 # License:: MIT. # # Usage:: # # thor help datashift:paperclip:attach # require 'datashift' require 'thor' # Note, not DataShift, case sensitive, create namespace for command line : datashift module Datashift class P...
41.207692
169
0.680791
394ccb5f66f304d043685638a15c52c0c4311448
96
# frozen_string_literal: true module IronBank VERSION = "5.2.6" API_VERSION = "v1" end
13.714286
29
0.677083
1dda08d6d13c4e4ab2e816b1739b7fde4356f4c0
583
# frozen_string_literal: true describe IssuesController, type: :controller do describe 'GET :new' do before { sign_in manager } let(:manager) { create :manager } let!(:first_link) { create :link } let!(:second_link) { create :link } it 'returns new issue page' do get :new expect(as...
24.291667
70
0.667238
e891d85b958d23d802136874b8afe2cc32fef0f6
53,399
# frozen_string_literal: true # Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
49.581244
114
0.586977
870119dc7f97b923558f10af2cc4daabfb85bd52
3,410
# frozen_string_literal: true require "date" require "active_support/inflector/methods" require "active_support/core_ext/date/zones" require "active_support/core_ext/module/redefine_method" class Date DATE_FORMATS = { short: "%d %b", long: "%B %d, %Y", db: "%Y-%m-%d", number: "%Y%m%d", long_ordi...
35.154639
109
0.628152
bbf34fbcc40886852e588a016f0e309ac2b4dc6f
2,745
class Gtkdatabox < Formula desc "Widget for live display of large amounts of changing data" homepage "https://sourceforge.net/projects/gtkdatabox/" url "https://downloads.sourceforge.net/project/gtkdatabox/gtkdatabox/0.9.2.0/gtkdatabox-0.9.2.0.tar.gz" sha256 "745a6843e8f790504a86ad1b8642e1a9e595d75586215e0d2cb2...
30.164835
105
0.638616
ed448606251938372c87840e5c517f5ae63b5485
190
require "spec_helper" describe Aaet do it "has a version number" do expect(Aaet::VERSION).not_to be nil end it "does something useful" do expect(false).to eq(true) end end
15.833333
39
0.694737
26117574cf60639e9222d62fb25b6456f7286bba
428
class Public::PagesController < ApplicationController layout 'public' skip_before_filter :authenticate_user! skip_before_filter :authenticate_client! def home render :layout => false end def about end def services end def contact end def download_blank_manifest send_file...
17.12
107
0.726636
bfd3471c99a79f233e7f199519fa6a47e6913c0c
3,646
require "rails_helper" RSpec.describe HandleSfnNotificationsTimeout, type: :job do subject { HandleSfnNotificationsTimeout.perform } describe "#perform" do let(:project) { create(:project) } let(:sample) { create(:sample, project: project) } let(:run1) { create(:workflow_run, sample: sample, status: ...
51.352113
164
0.717773
d5724e407b77934dcc7560575cab9067a43f89b0
1,869
module DL # Adds Windows type aliases to the including class for use with # DL::Importer. # # The aliases added are: # * ATOM # * BOOL # * BYTE # * DWORD # * DWORD32 # * DWORD64 # * HANDLE # * HDC # * HINSTANCE # * HWND # * LPCSTR # * LPSTR # * PBYTE # * PDWORD # * PHANDLE # * PV...
25.958333
77
0.581594
e2d33ce3f73cf5aafa22426b115a8f01d751654b
4,177
class BlockchainService Error = Class.new(StandardError) BalanceLoadError = Class.new(StandardError) attr_reader :blockchain, :currencies, :adapter def initialize(blockchian) @blockchain = blockchian @currencies = blockchian.currencies.enabled @adapter = Peatio::Blockchain.registry[blockchian.clie...
33.95935
127
0.731147
2639455e910a22139ab7b5e27ad493bdbc0deba8
23,029
# frozen_string_literal: true $: << File.expand_path(__dir__) Encoding.default_external = 'UTF-8' require_relative '../lib/gitlab' require_relative '../lib/gitlab/utils' require_relative '../config/initializers/0_inject_enterprise_edition_module' require 'chemlab' module QA ## # Helper classes to represent fre...
34.892424
107
0.688523
03b914f66506a85c242fcca4d6a4e6cb3e35ed15
346
require 'rails/generators' module Railwaymen class InstallGenerator < ::Rails::Generators::Base namespace 'railwaymen:install' source_root File.expand_path('../templates', __FILE__) desc 'Generates railwaymen gem initializer.' def install template 'initializer.rb', 'config/initializers/railway...
24.714286
68
0.734104
7a620b3f5d11a8b70212b97a058e50f3a9d686bc
250
require "./lib/initializer" require "clockwork" module Clockwork every(1.minute, "top-off-workers") do PGPerf::PGBenchToolsWorker.top_off_workers end every(4.hours, "mark-restart") do PGPerf::PGBenchToolsWorker.mark_restart end end
19.230769
46
0.748
87d8455a4872b0e316fc11fb51e4292c550af4d3
400
cask "sunlogincontrol" do version "3.0" sha256 "87ff12a9192ed809c2c8668e63cf44b1101544e52f43e8cc912ed2b20acf077f" url "https://download.oray.com/sunlogin/mac/SunloginControl#{version}.dmg" name "SunloginControl" name "向日葵控制端" homepage "https://sunlogin.oray.com/" pkg "SunloginControl.pkg" uninstall q...
26.666667
76
0.7375
3366a0466f7afda8d729f59994891c477ac60d8f
1,038
# # webhook_service.rb # ShipHero # # Copyright (c) 2017 Kyle Schutt. All rights reserved. module ShipHero module Services class WebhookService < BaseService def get_webhooks response = client.query ShipHero::Queries::GetWebhooksQuery edges = response&.data&.webhooks&.data&.edges we...
32.4375
113
0.684008
1c5f60ce7f23ea87cc21f0258e8840283a129523
1,685
require 'spec_helper' require 'pp' describe Databox::Client do before do Databox.configure do |c| c.push_token = 'adxg1kq5a4g04k0wk0s4wkssow8osw84' end allow_any_instance_of(Databox::Client).to receive(:raw_push)\ .and_return({'id' => '147251'}) end let!(:client) { Databox::Client.new }...
31.203704
97
0.455786
e2d95fe4c85f1d597dd0401e1b7fa1f167df879b
132
# frozen_string_literal: true class Required < ActiveRecord::Base has_one :account, required: true, null_object: NullAccount end
22
60
0.795455
f7ffbd0f0540c007e0c6794f51af8273cb28ce29
2,455
require 'quickeebooks/online/service/service_base' require 'quickeebooks/online/model/payment' require 'quickeebooks/online/model/payment_header' require 'quickeebooks/online/model/payment_line_item' require 'quickeebooks/online/model/payment_detail' require 'quickeebooks/online/model/credit_card' require 'quickeebooks...
38.968254
129
0.657841
2807e3abc0d4647ab465c9a6df59fc8df54f2936
165
class AddStaffOnlyCommentsToQuestions < ActiveRecord::Migration[4.2] def change add_column :course_assessment_questions, :staff_only_comments, :text end end
27.5
72
0.812121
286ade573083f847b36de63279f475f7ba422d26
1,430
#====================================================================== # VXA_DefaultScripts.rb #====================================================================== # Stub definitions of default RPGMaker script objects used by the # OmoSystem module. #=================================================================...
29.183673
93
0.567133
6ae0fed0510941d15edeb24aad32be017721ba55
735
Pod::Spec.new do |s| s.name = "TiPixelReader" s.version = "1.0.0" s.summary = "The TiPixelReader Titanium module." s.description = <<-DESC The TiPixelReader Titanium module. DESC s.homepage = "https://example.com" s.license ...
27.222222
85
0.534694
bbd49eddb114c4806ed4de47e713d0c0d571d0b3
41
module Teamstuff VERSION = "0.1.0" end
10.25
19
0.682927
bbdfdaaab12ca32172d29c0f96df76af1869f5ea
2,188
# frozen_string_literal: true module Consent module Rspec # @private class ConsentView def initialize(view_key, conditions) @conditions = comparable_conditions(conditions) if conditions @view_key = view_key end def to(*context) @context = context self ...
27.35
79
0.558501
260276317eb2e70579a9e3001ab1a68855b6ddcb
361
require 'bundler/setup' require File.expand_path("../../test/dummy/config/environment", __FILE__) Bundler.setup require 'rspec/rails' require 'factory_girl' Dir[Rails.root.join("spec/factories/*.rb")].each { |f| require f } RSpec.configure do |config| config.fixture_path = "#{::Rails.root}/spec/fixtures" config....
25.785714
73
0.742382
1882439d63710bbed4634aa3d873b76087933c7d
8,182
# Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/retail/v2alpha/product_service.proto for package 'Google.Cloud.Retail.V2alpha' # Original file comments: # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in...
59.289855
140
0.671963
1c36e81f6a271207e612697a2180424045295e69
2,404
require 'spec_helper' context 'Numeric' do describe '#to_num' do context 'String' do context 'containing fixnum' do it 'converts to Fixnum' do expect('12'.to_num).to eq 12 expect('-1'.to_num).to eq(-1) end end # on containing fixnum context 'containing dot ...
25.041667
58
0.571963
1d7b5b0f6e82510af7bc49d96aa287b6444a8515
10,179
require 'fog/openstack' #see https://github.com/fog/fog/blob/master/lib/fog/openstack/docs/storage.md require 'dragonfly' require 'cgi' require 'uri' require 'securerandom' Dragonfly::App.register_datastore(:openstack_swift){ Dragonfly::OpenStackDataStore } module Dragonfly class OpenStackDataStore # Exception...
33.93
128
0.589842
f7d139efe8566511f540c435ab25fc7185bc1e76
2,724
class Plplot < Formula desc "Cross-platform software package for creating scientific plots" homepage "https://plplot.sourceforge.io" url "https://downloads.sourceforge.net/project/plplot/plplot/5.15.0%20Source/plplot-5.15.0.tar.gz" sha256 "b92de4d8f626a9b20c84fc94f4f6a9976edd76e33fb1eae44f6804bdcc628c7b" revi...
32.428571
100
0.64978
acc1a53fea1e19e897d6313b0ae34ee721491d65
4,445
# frozen_string_literal: true require "spec_helper" RSpec.describe AcaEntities::BenefitMarkets::Products::ProductContract do let(:benefit_market_kind) { :benefit_market_kind } let(:effective_date) { Date.today.next_month } let(:effective_period) { effective_date..(effectiv...
45.824742
140
0.67649
389c7710a4d1dddc772a034511d7539b47fcdeb9
9,752
require 'chronic' require 'sexp_processor' require 'ruby_parser' require 'json' require 'hirb' require 'fileutils' require_relative 'scm/source_control' require_relative 'scm/git_analyzer' require_relative 'scm/svn_analyzer' require_relative 'scm/hg_analyzer' require_relative 'scm/bzr_analyzer' require_relative 'loca...
34.828571
143
0.672067
ac2f82eec29357c29bc0ce98799cf937b4a157c2
1,025
require 'active_support/core_ext/hash/deep_merge' module AxlsxStyler module Cell attr_accessor :raw_style def add_style(style) self.raw_style ||= {} add_to_raw_style(style) workbook.add_styled_cell self end private def workbook row.worksheet.workbook end def ad...
22.777778
101
0.657561
1cd8ef403cf9983d7db80aa98c1dc767afe3ce30
829
cask "lens" do arch = Hardware::CPU.intel? ? "" : "-arm64" version "5.2.7-latest.20211110.1" if Hardware::CPU.intel? sha256 "51312def38e7c00030a285204ac47f6822ad1b31b93b0d8369947e4ab05cb07f" else sha256 "8f220e3541c6e5a6d1524532e3a9cafe7e9c33fa9ae0a27c7646500df6af63fe" end url "https://api.k8slen...
25.121212
77
0.717732
38152f0fe21d01ef9fe48d835cb47e2e779d6575
2,606
require 'spec_helper' require 'data_magic' describe "DataMagic #import_without_data_yaml" do describe "without ALLOW_MISSING_YML" do it "not found locally raises error" do ENV['DATA_PATH'] = './spec/fixtures/cities_without_yml' expect { DataMagic.init(load_now: true) }.to raise_error(IO...
31.780488
155
0.599386
03b1d52c3fe722a976ce1920fd3f41c6d2b86451
1,749
module Librarian module Puppet module Source module Local def install!(manifest) manifest.source == self or raise ArgumentError debug { "Installing #{manifest}" } name, version = manifest.name, manifest.version found_path = found_path(name) raise ...
30.155172
119
0.58948
b959d87e3f1bcde05dd177d8dd77cc7c9e401c48
1,956
## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' class Metasploit3 < Msf::Exploit::Local Rank = ExcellentRanking include Post::Windows::Priv include Post::Windows::Runas def initialize(inf...
30.092308
90
0.587935
1d6a9c7f7d4b8888edc7a91d4d933bbeb96cb895
332
# frozen_string_literal: true class WeightRecord < ApplicationRecord include ActsAsRecordable UNITS = [ KILOGRAMS = "kg", GRAMS = "g", POUNDS = "lb" ].freeze # Associations belongs_to :animal # Validations validates :weight, presence: true validates :unit, presence: true, inclusion: {in:...
17.473684
57
0.686747
6a8fd521f7525ee98280157dc69744d42252ec82
182,092
# 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/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE require 'seahorse/client/plugins/content_length.rb' require 'aws-sdk-core/plug...
44.729059
247
0.669294
e2bb624e75c0a270abb3915c4b1705f8cbe7ee97
545
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::OperationalInsights::Mgmt::V2020_03_01_preview module Models # # Defines values for ClusterEntityStatus # module ClusterEntityStatus Cre...
25.952381
70
0.695413
e93a85d76e3284ab03af22435577ffbd9e2a2f09
4,805
raise "Only JRuby is supported at this time." unless RUBY_PLATFORM == "java" require "net/http" require "uri" require "digest/sha1" def vendor(*args) return File.join("vendor", *args) end directory "vendor/" => ["vendor"] do |task, args| mkdir task.name end def fetch(url, sha1, output) puts "Downloading #{url...
27.146893
92
0.613944
f8aba313861c6172fb6a4c9d63b92477bf94b2d1
1,423
# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative sou...
36.487179
86
0.741391
876b1041c4091023ccf8bc38d929d22b5f8aa783
650
# # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'animated_widgets' s.version = '0.0.1' s.summary = 'A new Flutter plugin.' s.description = <<-DESC A new Flutter plugin. DESC s.homepa...
29.545455
83
0.54