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
e9c113f5b71b2d6f529bdd38ea8e5ad15d93705a
1,708
module ApplicationHelper def title(title) content_for :title do title end end def on_applications "active" if controller_names.include? %w(dashboard global_applications) end def on_servers "active" if %w(dashboard servers applications ssh_keys env_vars application_databases backups). ...
23.081081
99
0.575527
b90ba9798b3ac40c2ac275522d797de9fec4f4f5
79
class CreateRides < ActiveRecord::Migration # Write your migrations here end
19.75
43
0.797468
aba472da29859bbc335d04f6ff88ed96456f44f9
2,835
class Innotop < Formula desc "Top clone for MySQL" homepage "https://github.com/innotop/innotop/" url "https://github.com/innotop/innotop/archive/v1.13.0.tar.gz" sha256 "6ec91568e32bda3126661523d9917c7fbbd4b9f85db79224c01b2a740727a65c" license any_of: ["GPL-2.0-only", "Artistic-1.0-Perl"] revision 1 head ...
39.929577
106
0.729453
61888d43d306c0e9d664a0b3d7e04d28baf36a06
568
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/devtools/artifactregistry/v1beta2/settings.proto require 'google/protobuf' require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/protobuf/field_mask_pb' require 'google/api/annotations_pb' Google::Protobuf::D...
24.695652
92
0.77993
61fdd241798c0c3066091a3a64bbd8bd54f17e52
1,290
# frozen_string_literal: true require 'ox' require_relative 'message_builder' require_relative 'find_candidate_message_error' module MPI module Messages module FindProfileMessageHelpers include MPI::Messages::MessageBuilder EXTENSION = 'PRPA_IN201305UV02' def to_xml super(EXTENSION, b...
26.875
95
0.648837
e8052c59ecbfb27b5ce1374d0671f6b1c617b519
4,957
describe Hubspot::Contact do let(:example_company_hash) do VCR.use_cassette("company_example", record: :none) do HTTParty.get("https://api.hubapi.com/companies/v2/companies/21827084?hapikey=demo").parsed_response end end before{ Hubspot.configure(hapikey: "demo") } describe "#initialize" do ...
30.98125
105
0.638491
180718b7dbaaea18d2625af44ff4787c5fc2f6eb
399
class TaxonNameClassification::Iczn < TaxonNameClassification NOMEN_URI='http://purl.obolibrary.org/obo/NOMEN_0000107'.freeze def self.applicable_ranks ICZN end def self.code_applicability_start_year 1758 end def self.disjoint_taxon_name_classes ICNP_TAXON_NAME_CLASSIFICATION_NAMES + ICN_TAX...
22.166667
117
0.819549
abc8118835028808e03a206f379e6ee5a4945093
7,600
# # Author:: Serdar Sutay (<serdar@chef.io>) # Copyright:: Copyright 2013-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 may obtain a copy of the License at # # ...
34.38914
119
0.623553
e95070f99401a7716a97eec05465cdc04c36484e
73
# typed: true :@@ # error: `@@` is not allowed as a class variable name
18.25
57
0.630137
f7783bd7e0ce08dd542d799e3a124850b3e22c3d
3,615
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
36.15
127
0.565975
797352dd25358b067251e90ab74ad0b57711b1e1
1,699
require 'declarative_authorization/maintenance' module Alchemy module Specs # Helpers for integration specs # # This file is included in rspec integration/request tests. # module IntegrationHelpers include ::Authorization::TestHelper # Shortcut method for: # # * create...
25.358209
104
0.612713
336aac8b3cfdf4ad13cd81a7b6a7a86c7e46d6e5
909
# frozen_string_literal: true require "spec_helper" RSpec.describe Gemsmith::Generators::GitLint do subject(:git_lint) { described_class.new cli, configuration: configuration } include_context "with temporary directory" let(:cli) { instance_spy Gemsmith::CLI, destination_root: temp_dir } let(:configuration)...
24.567568
88
0.652365
285373de8afa457a93889ec06cd9cee66884430d
160
module MakropoulosViewTool class Renderer def self.copyright name, msg "&copy; #{Time.now.year} | <b>#{name}</b> #{msg}".html_safe end end end
22.857143
65
0.64375
212d8b1525244df78f2cd59472de6dc223c7e979
14,596
# frozen_string_literal: true require 'spec_helper' describe Projects::PipelinesController do include ApiHelpers set(:user) { create(:user) } let(:project) { create(:project, :public, :repository) } let(:feature) { ProjectFeature::ENABLED } before do stub_not_protect_default_branch project.add_dev...
31.321888
127
0.632022
bbbef4df65c50753e4cc2972f187fd8f3659b37a
371
class CreateDevices < ActiveRecord::Migration def change create_table :devices do |t| t.string :applianceId t.string :manufacturerName t.string :modelName t.string :version t.string :friendlyName t.string :friendlyDescription t.string :isReachable t.string :photonId...
21.823529
45
0.668464
6a2180140fc9cee6b12f3b2e1f4a566cf28da29b
2,327
# 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::Storage::Mgmt::V2018_07_01 module Models # # Storage REST API operation definition. # class Operation include MsRestA...
27.702381
74
0.50838
1d519d71b3f218daeb3d36cb76d174e5a50414ef
732
module Fog module Compute class Google class Mock def list_zones zones = self.data[:zones].values build_response(:body => { "kind" => "compute#zoneList", "selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{@project}/zones", ...
24.4
105
0.521858
038aeb5e5505bbfd72364a2e6cb5fccb6029f2ff
1,133
# # Be sure to run `pod lib lint VNBase.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'VNEssential'...
32.371429
97
0.598411
01b52e4e6476f9f60049da8379f30a315e435947
22,257
=begin #DocuSign REST API #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.13-SNAPSHOT =e...
40.614964
495
0.656827
b92032890a284c0706a3dcbd13b07fd9460f933b
803
require 'lnd_client' class PaymentsController < ApplicationController before_action :require_account def create data = LndClient.decode_pay_req(params[:payment_request]) amount = data['num_satoshis'] if current_account.balance < amount return render json: { error: 'balance is not enough' }, stat...
23.617647
91
0.648817
1aec460853e9d17196a77a10660ab09b2b035ebb
3,538
RSpec.describe MagicPipe::Config do subject { described_class.new } describe "the default configuration values" do specify "client_name" do expect(subject.client_name).to be_a String end specify "producer_name" do expect(subject.producer_name).to be_a String end specify "logger" d...
28.532258
71
0.610514
e870428158fc7dc69584418b6f4515010f0d50ae
180
class AddSmsAuthCodeToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :sms_auth_code, :string add_index :users, :sms_auth_code, unique: true end end
25.714286
58
0.75
6181f155ee9f9880c0ede1ca25a82c75eccdd362
385
class CreateListings < ActiveRecord::Migration[6.0] def change create_table :listings do |t| t.string :title t.string :description t.string :rating t.string :price t.string :location t.string :host t.string :host_rating t.string :image t.references :user, null...
21.388889
56
0.633766
ab49cba964c00bc6210eb3b93fb37de60320f742
599
require_relative 'base' require 'bundler/audit/cli' module Integration class BundleAudit < Base def run_with(config) args = ['check'] ignored_cves = config.fetch('ignored_cve', []) if !ignored_cves.empty? args += ["--ignore"] ignored_cves.each do |ignored_cve| args <...
22.185185
65
0.619366
18eb020fcbb76494cae9f6060a1310de49cfadbf
22
require "stellar-base"
22
22
0.818182
0377cd497e514386b676049c7e9eab811ad4810c
469
# t.integer "event_id" # t.integer "price" # t.string "name" # t.integer "max_quantity" # t.datetime "created_at", null: false # t.datetime "updated_at", null: false # t.index ["event_id"], name: "index_ticket_types_on_event_id", using: :btree class TicketT...
31.266667
87
0.643923
115ef65578a96c1a52b636f7962ac7398c07dd1f
12,749
require 'spec_helper' describe ActiveRecordViews do describe '.create_view' do let(:connection) { ActiveRecord::Base.connection } def create_test_view(sql, options = {}) ActiveRecordViews.create_view connection, 'test', 'Test', sql, options end def drop_test_view ActiveRecordViews.drop_...
37.718935
146
0.669543
264ffecce941c349d7e800e60f593d60422425ac
781
# frozen_string_literal: true module UffizziCore::Concerns::Models::ActivityItem extend ActiveSupport::Concern included do include UffizziCore::ActivityItemRepo self.table_name = UffizziCore.table_names[:activity_items] belongs_to :deployment belongs_to :container belongs_to :build, optional...
19.525
62
0.663252
e8eeecd68c523f7a60330e3c62000006dcfd80cf
1,667
# -*- encoding: utf-8 -*- # stub: retriable 3.1.2 ruby lib Gem::Specification.new do |s| s.name = "retriable".freeze s.version = "3.1.2" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Jack Chu".fre...
41.675
204
0.677864
ac2c329b7025af159e7cf0700e066d5125a32fa6
8,855
Faraday::Response.register_middleware format_whm: Lumberg::FormatWhm module Lumberg module Whm class Server < Base # Server attr_accessor :host # Remote access hash attr_accessor :hash # Base URL to the WHM API attr_accessor :base_url # Enable Basic Authentication wit...
27.079511
117
0.555618
7a31b095cfcfd6581f2b4e98164690e697abdeb3
8,434
# frozen_string_literal: true class Label < ApplicationRecord include CacheMarkdownField include Referable include Subscribable include Gitlab::SQL::Pattern include OptionallySearch include Sortable include FromUnion include Presentable cache_markdown_field :description, pipeline: :single_line DE...
29.082759
122
0.671805
aca1f08080a2be57b96b562f342f214df1edcee3
4,829
# frozen_string_literal: true require 'active_support/all' require 'active_model_serializers' require 'state_machines-activerecord' require 'validate_url' require 'responders' require 'explicit-parameters' require 'attr_encrypted' require 'sass-rails' require 'coffee-rails' require 'jquery-rails' require 'rails-timeag...
21.654709
96
0.743632
5d04013bd6e4d0eff824d4d5aa80e89fc7ae4e4e
1,049
########################################################### # tc_each_key.rb # # Test suite for the Hash#each_key instance method. ########################################################### require "test/unit" class TC_Hash_EachKey_Instance < Test::Unit::TestCase def setup @hash = {"ant", 1, "bat", 2, "cat",...
22.804348
68
0.542421
acae3553f1bc27ce36047730469bf21f90adf2f2
906
module Api module V1 class DebfilesController < Api::V1::ApiController skip_before_filter :authenticate_user!, :upload def upload current_user = User.find_by_token(params[:token]) or raise Errors::AccessDenied log = Logger.new Rails.root.join('log', 'uploads.log') io = para...
28.3125
87
0.620309
1aca3b0a06af9c641e8193806258c3973d56cafb
752
# See https://github.com/markdownlint/markdownlint/blob/master/docs/creating_styles.md for doc # on creating and modifying this style file # rules are named by their aliases here for clarity, not their code. # But for instance, ul-indent = MD007 all rule 'no-trailing-punctuation', :punctuation=>'.,;:!' rule 'ul-indent...
34.181818
94
0.768617
875ab34b44b2e08b26fbe28e222606722d53a200
397
class CreateSpree<%= class_name.pluralize %>Translations < ActiveRecord::Migration def up Spree::<%= class_name %>.create_translation_table!({ <% attributes.each do |attribute| -%> <% next unless options[:i18n].include? attribute.name -%> <%= attribute.name %>: :<%= attribute.type %>, <% end -%> }) en...
26.466667
82
0.654912
e800b42032539eb932504414ee6097ad08aa5642
12,662
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/documentai/v1beta3/document_processor_service.proto require 'google/api/annotations_pb' require 'google/api/client_pb' require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/cloud/documentai/v1beta3/docum...
63.628141
201
0.77468
28f71ff24a7299eb49847648d8bd20aefe632f90
362
Sequel.migration do change do create_table :reg_1400 do column :id, Integer, primary_key: true column :id_pai, Integer, index: true, null: false column :cod_item_ipm, String, size: 60 column :mun, String, size: 7 column :valor, BigDecimal, size: [18, 2] column :cnpj_pai, String...
27.846154
55
0.651934
03f085c65a660b32d77a5dc15abfbebf5b3181cb
601
# # encoding: utf-8 # Inspec test for recipe hdp-chef::zookeeper_user # The Inspec reference, with examples and extensive documentation, can be # found at https://docs.chef.io/inspec_reference.html control 'hdp-chef::zookeeper_user' do title 'Testing zookeeper user' describe group('hadoop') do it { should e...
25.041667
73
0.663894
1a25e563ec637559dc1668ac41b8fb6d3a6b910c
1,228
# frozen_string_literal: true describe 'Block controls' do let(:exhibit) { FactoryBot.create(:exhibit) } let(:exhibit_curator) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) } before { login_as exhibit_curator } it 'is split into separate sections', js: true do # create page visit spotlight....
28.55814
81
0.681596
f7a403648668eefcd5d37865ef0a9536d20d0824
205
RSpec.describe FindMyRepresentative do it "has a version number" do expect(FindMyRepresentative::VERSION).not_to be nil end it "does something useful" do expect(false).to eq(true) end end
20.5
55
0.736585
ff0d49474b94d320c4ee2851c3dbbeb659c356fc
5,329
# Copyright (c) 2016, 2021, 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...
35.291391
245
0.676112
18a71239d24514fc5774ad61cc8ff4d94468d679
935
class SCREEN_NAME < Roda plugin :middleware route do |r| r.get '@:raw_name' do |raw_name| HTML.to_html( :screen_name => raw_name ) end # === on get end # === route HTML = Megauni::WWW_App.new { use ::MUE style { body { padding 0 margin 0 } div.^...
14.84127
46
0.464171
185921d8fbee0ccd070d458a11d01e7e3215d8ff
775
# Provides an ActiveRecord-like interface to a model whose data is not persisted to a database. module StaticModel extend ActiveSupport::Concern module ClassMethods # Used by ActiveRecord's polymorphic association to set object_id def primary_key 'id' end # Used by ActiveRecord's polymorphic...
16.145833
95
0.660645
bfb2f6fbe06d34699982be1bd7f66c2774a50e07
2,902
# frozen_string_literal: true module SharedRoleComponents def self.make_list_embed(embed) embed.fields = [ { name: 'Missing a class?', value: 'If we are missing a class, let us know and we will add a channel!' }, { name: 'General roles:', value: "`#{ROLES['general'].keys.join('` `')}`" }, { nam...
34.141176
117
0.555824
1c7f8e709f6e12654f057bbfa5f5dca1a5a68cf3
13,343
require 'rubygems' require 'rubygems/package' require 'time' begin gem 'builder' require 'builder/xchar' rescue LoadError end ## # Top level class for building the gem repository index. class Gem::Indexer include Gem::UserInteraction ## # Build indexes for RubyGems 1.2.0 and newer when true attr_acces...
26.739479
96
0.658098
1ce599bbab27d68cbd8cce7f922b95eefd776956
1,534
=begin #Molecule API Documentation #The Hydrogen Molecule API OpenAPI spec version: 1.3.0 Contact: info@hydrogenplatform.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.14 =end require 'spec_helper' require 'json' require 'date' # Unit tests for MoleculeApi::Docume...
25.566667
102
0.726206
018c305c16282662a850fdc8d74151f0fc33bce7
135
class AddIsAssessedFlagToProduct < ActiveRecord::Migration[5.0] def change add_column :products, :isAssessed, :boolean end end
22.5
63
0.77037
abf804fb84e58c7e6158a9afeef3d66b18e630ab
121
# frozen_string_literal: true require "rom/commands/create" require "rom/commands/update" require "rom/commands/delete"
20.166667
29
0.801653
d57ca346e6abd46ab6779fd79aac4f00c7621f06
1,998
=begin #Kubernetes #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.3 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.2.3 =end require 'spec_helper' require 'json' require 'date' # Unit tes...
27.369863
103
0.726226
5d28caa8de2d54e8c5c040093afe7dc7b8c3e77b
1,863
require "lru_cache_hashes_only" require "pry" require "complexity_assert" describe "LruCache" do cache = LruCacheHashesOnly.new(2) context "when put(key, value) is passed a key and value" do it "should set the value when key is present" do cache.put(2,2) cache.put(2,3) ...
23
74
0.552335
ab5dc77eb63e073d50929c36b4d3c41212449407
1,333
#========================================================================= # # Copyright NumFOCUS # # 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/license...
31
75
0.68042
1899cb6aa9f1a8ddfc6ef2f5b0b3963e5237fedc
72
module Tandem require 'spec_helper' describe Content do end end
9
23
0.736111
33c70a39256a902def40255030f5cfa37ba38b87
437
module Spree class Gateway::PayuPolskaGateway < Gateway preference :client_id, :string preference :merchant_pos_id, :string preference :client_secret, :password preference :notify_url, :string def provider_class ActiveMerchant::Billing::PayuPolskaGateway end def payment_source_clas...
17.48
48
0.684211
6255e3428d7d7ad12b1520cc59542597c3107af2
8,437
# Copyright 2017 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 applicable law or agreed to in writing, ...
45.117647
230
0.666232
ffe699e6a21e7d4a61245332ccf7d47e0e7391e6
1,185
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'bukovina/version' Gem::Specification.new do |spec| spec.name = "bukovina" spec.version = Bukovina::VERSION spec.authors = ["Malo Skrylevo"] spec.email = ["maj...
35.909091
81
0.683544
03c3dca1d62bf60934e08da63803e98c6e8b9aa6
60
$check_warnings_load_count += 1 $checked_verbose = $VERBOSE
20
31
0.8
18f7325492ea2db12b1ed3a74cf2afda34acd312
343
require "film_on/version" require "film_on/services/channels" require "film_on/services/groups" require "film_on/services/video_on_demand" require "film_on/base" require "film_on/models/channel" require "film_on/models/group" require "film_on/models/programme" require "film_on/models/movie" require "film_on/models/genr...
22.866667
42
0.816327
62751154d044f65d307463e50dedffd660718eac
1,399
# frozen_string_literal: true # Load default formatter gem require "simplecov-html" require "pathname" require "simplecov/profiles/root_filter" require "simplecov/profiles/test_frameworks" require "simplecov/profiles/bundler_filter" require "simplecov/profiles/hidden_filter" require "simplecov/profiles/rails" # Defau...
27.431373
87
0.768406
62156b1abd514618c43bd8a8505ce75a4fbc696c
8,132
# # httpresponse.rb -- HTTPResponse Class # # Author: IPR -- Internet Programming with Ruby -- writers # Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou # Copyright (c) 2002 Internet Programming with Ruby writers. All rights # reserved. # # $IPR: httpresponse.rb,v 1.45 2003/07/11 11:02:25 gotoyuzo Exp $ req...
24.792683
71
0.562223
bf67aa236ac535508c3914ba9b5cfa9c3d13e7c7
294
require 'leaflet-draw-rails/shape' module Leaflet::Draw module Rails::Testing class Circle < Shape def draw! @browser.move_to(*@points.first) @browser.click_and_hold @browser.move_to(*@points.second) @browser.release end end end end
15.473684
41
0.62585
6a5e08068c83e0284199958412592e41cc7eb9ab
664
# frozen_string_literal: true module AMA module Chef module User # Action represents single action required to be taken to converge # system into target state. Actions are created during planning phase # and then run by feeding in current resource they are called from within class Action ...
24.592593
79
0.65512
f79be5ace421578262e8477ef1d0a72446aaf43c
936
# # Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # # This module is written by Zaur Molotnikov, 2017 # Only for the use for test purposes! # Inspired by the coinhive miner integration (copied...
31.2
72
0.597222
3989b69ccfa60870361de6ac2f24520b0c516f96
2,775
# frozen_string_literal: true require 'test_helper' module ShopifyCli class ProjectTest < MiniTest::Test def setup @context = TestHelpers::FakeContext.new(root: Dir.mktmpdir) FileUtils.cd(@context.root) end def test_directory_recurses Dir.mktmpdir do |dir| Dir.stubs(:pwd).retur...
29.521277
83
0.637838
7a23226ec332bc57fd2b18cf08cceee62c7536df
1,972
# 1.数组 names = ["张三", "李四", "王五", "赵二麻子"] print "第一个名字:", names[0], "\n" print "第二个名字:", names[1], "\n" print "第三个名字:", names[2], "\n" print "第四个名字:", names[3], "\n" names[1] = "aaa" print "第二个名字:", names[1], "\n" print names, "\n" puts names.size print(names.size,"\n") print names.size, "\n" print names.length...
20.122449
108
0.647566
bf3964c0a75f5b760bc3533b5afc7e0ba038c5ff
630
require File.expand_path("../../Abstract/abstract-php-extension", __FILE__) class Php55Yac < AbstractPhp55Extension init desc "A fast shared memory user data cache for PHP" homepage "https://github.com/laruence/yac" url "https://github.com/laruence/yac.git", :branch => "master" head "https://github.com/larue...
28.636364
75
0.68254
ac61bc63170e81d4df320ffad2b0e8426228a183
22,314
class PanoramicCliAT151b3 < Formula include Language::Python::Virtualenv desc "Panoramic Command Line Interface" homepage "https://github.com/panoramichq/panoramic-cli" url "https://files.pythonhosted.org/packages/9d/69/124ecc25a0075367d90915f022af556fd4237fb8f97b701616ecf177a920/panoramic-cli-1.5.1b3.tar.gz" ...
49.476718
157
0.82939
3320c63904949c26ea31d8c4e5674f3059d0a2a9
2,989
# GETTING STARTED # ----------------- # This documentation is intended to show you how to get started with a # simple Appium & appium_lib test. This example is written without a specific # testing framework in mind; You can use appium_lib on any framework you like. # # INSTALLING RVM # -------------- # If you don't h...
28.466667
85
0.678488
f70954c876eaab320f0bd6aa348b068564b9d3ec
102
FactoryBot.define do factory :oembed_link do url { "MyString" } code { "MyText" } end end
14.571429
25
0.637255
4ae58f3c626444971a5ef30638343833f814f996
3,667
class Prestodb < Formula desc "Distributed SQL query engine for big data" homepage "https://prestodb.io" url "https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-server/0.243/presto-server-0.243.tar.gz" sha256 "f6db5678760a89b13200aeae9a67444afbee472b0f379e58ed3246be4d6746d0" license "A...
31.612069
126
0.672212
4acee7f1b75381c9273206d18dfb0ce6b0d4ee7c
1,798
class Wxmaxima < Formula desc "Cross platform GUI for Maxima" homepage "https://wxmaxima-developers.github.io/wxmaxima/" url "https://github.com/wxMaxima-developers/wxmaxima/archive/Version-20.09.0.tar.gz" sha256 "a2ba6797642c7efa96c5dbb6249134a0ace246ebd390e42f7c227fa94609ef27" license "GPL-2.0-or-later" h...
33.924528
93
0.723582
91102f23b9b1ecbf065cecf1b8e4e9194148ef98
25,383
# frozen_string_literal: true # Copyright 2021 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.67319
147
0.531182
184fd82713bf3c15fa371c0b6eb1bdb7b14fe428
4,153
require "test_helper" require "minitest/mock" class Pay::Braintree::Billable::Test < ActiveSupport::TestCase setup do @billable = User.new email: "test@example.com" @billable.processor = "braintree" end test "getting a customer" do customer = @billable.customer assert customer.id.present? as...
36.113043
171
0.732001
1a7bce62887049bd0a987cc6ac3b071fe0e3e6a0
3,020
require_relative "schema" module SchemaRD module MigrationContext class Loader class TableDefinition [ :bigint, :binary, :boolean, :date, :datetime, :decimal, :float, :integer, :string, :text, ...
31.789474
110
0.586093
21572ddedc19b95fee9397d56fb3cfad220b45e3
1,626
# encoding: UTF-8 version = File.read(File.expand_path("../../SPREE_VERSION", __FILE__)).strip Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = 'spree_core' s.version = version s.summary = 'The bare bones necessary for Spree.' s.description = 'The bare bones necessary...
38.714286
111
0.630996
117b6660bd67a001e5396a78cd36e4aa7161cfe5
645
#!/usr/bin/env ruby # encoding: utf-8 require "rubygems" require "bunni" puts "=> Demonstrating consumer cancellation notification" puts conn = Bunni.new conn.start ch = conn.create_channel module Bunni module Examples class ExampleConsumer < Bunni::Consumer def cancelled? @cancelled en...
16.125
58
0.672868
ed06205bd2348c240061932849c53d49ec3a1404
1,123
# Internationalization methods class Internationalization class << self def full_path(file) path(file) end def file_url(file) path(file).file_url end def path(file, add_resources_path=true) ident = NSLocale.currentLocale.localeIdentifier lang = ident.split("_").first if file.resource_pa...
28.075
78
0.694568
f7b6c8fe8b2471caa593a7795408eb323be58eb8
378
class Api::V1::EvidenceItemSerializer < Api::V1::BaseSerializer attributes :id, :title, :description, :votes_score, :current_vote has_one :submitter, serializer: Api::V1::ProfileSerializer def votes_score object.cached_votes_score || 0 end def current_vote if current_user return current_user.v...
22.235294
67
0.740741
0827f3512c7d83dba02fe73c25cc45cf8749459c
144
module ArenaApi class Item < Resource has_many :bom_items, class_name: BOMItem has_many :files, class_name: FileAssociation end end
20.571429
48
0.756944
e9be8853d2760ce0675b08bbb56ba3e8f47ec9ea
1,407
# frozen_string_literal: true require 'spec_helper' RSpec.describe Security::Configuration::SaveAutoFixService do describe '#execute' do let_it_be_with_reload(:project) { create(:project) } let(:service) { described_class.new(project, feature) } subject(:response) { service.execute(enabled: false) } ...
26.54717
96
0.681592
1aa65691dd1d2af607f838445ca7dc396f89fcf3
1,579
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
26.316667
74
0.702977
91f46dc304b06389b0f4236387faa20dd8cd6b24
4,755
require 'fileutils' require 'securerandom' require 'rugged' require 'spec_helper' $:.unshift(File.expand_path('../proto', __dir__)) require 'gitaly' if ENV.key?('GITALY_TESTING_GIT_BINARY') GIT_BINARY_PATH = ENV['GITALY_TESTING_GIT_BINARY'] elsif ENV.key?('GITALY_TESTING_BUNDLED_GIT_PATH') GIT_BINARY_PATH = File....
34.708029
141
0.768244
1cfde80e5581c71075f383f1daccd76b26dc7952
143
# frozen_string_literal: true module Fields::Validations class DateField < FieldOptions prepend Fields::Validations::Presence end end
17.875
41
0.783217
6a028acc43e84d2cae0a55b8a9ebd37d41252983
320
# == Schema Information # # Table name: shares # # id :integer not null, primary key # account_id :integer # created_at :datetime not null # updated_at :datetime not null # class Share < ApplicationRecord belongs_to :account has_one :seed has_one :project, through: :seed end
20
53
0.65
6adb832421de8e7ac8b69946d196fdfc341c2d84
125
module Contentful class SiteDocumentation < ContentfulModel::Base self.content_type_id = 'siteDocumentation' end end
20.833333
49
0.792
618efe59b21fdff91f4a3629099b116970023534
749
module Cborb::Decoding::Types # To represent part of major type: 7 # # @see https://tools.ietf.org/html/rfc7049#section-2.3 # @see https://tools.ietf.org/html/rfc7049#appendix-D class HalfPrecisionFloatingPoint < Type class << self def decode(state, additional_info) bits = state.consume(2)....
25.827586
60
0.582109
ff2e199226302291b4b0a828e8e96e846973a024
884
require_relative '../lib/typograph' require_relative 'data/test_data' describe Typograph::Client do context "Testing with valid input to get type desinged text" do typograph = Typograph::MdashTypograph.new it "Should type design the passed text if mdash.ru's API is available" do formatted_text = ty...
38.434783
116
0.725113
79a458d0b56f825d73d0f8f1f8a56d1aa9402e15
174
class AddLtiLaunchToken < ActiveRecord::Migration[5.0] def change add_column :lti_launches, :token, :string add_index :lti_launches, :token, unique: true end end
24.857143
54
0.741379
26a11a6972c741e47226a7049a66cb71653ebf75
1,219
# encoding: UTF-8 require 'spec_helper' describe Haystack::ZippedPayload do describe "#initialize" do it "should initialize a new `Haystack::ZippedPayload` and zip the body" do payload = Haystack::ZippedPayload.new({'the' => 'payload'}) expect( payload.body ).to eql(Zlib::Deflate.deflate( "...
28.348837
136
0.568499
1862f427ec5ffe9c3dc1b17264ffe942f2556f70
1,632
# frozen_string_literal: true require "dry/monads/result" module Dry module Validation # Hints extension # # @example # Dry::Validation.load_extensions(:hints) # # contract = Dry::Validation::Contract.build do # schema do # required(:name).filled(:string, min_size?: 2.....
23.314286
66
0.545343
5dd1d0e532de764a8a67f83c4e415c2b90facbe2
400
cask :v1 => 'scrup' do version '1.3.3' sha256 '5004222db9a6ddd4e6cb525d00e95f8a38e9fb623bc1397e5258b2ef2c4bd3b0' url "http://data.hunch.se/scrup/Scrup-#{version}-bd23160.zip" appcast 'https://s.rsms.me/scrup/appcast.xml', :sha256 => '140f4487d00bb157286f261bfddb8f7a8c29a4fc2e53a63119bdbe1c828a6d00' ...
30.769231
87
0.7425
4a336abbb0cc9a54257820c49a0bd6b627c1b70f
1,847
class Binutils < Formula desc "GNU binary tools for native development" homepage "https://www.gnu.org/software/binutils/binutils.html" url "https://ftp.gnu.org/gnu/binutils/binutils-2.32.tar.gz" mirror "https://ftpmirror.gnu.org/binutils/binutils-2.32.tar.gz" sha256 "9b0d97b3d30df184d302bced12f976aa1e5fbf4b0b...
34.203704
94
0.551164
28103242c3f65ab55490799f224390594b572509
2,487
# # Autogenerated by Thrift Compiler (0.9.3) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # require 'thrift' require 'serde_types' SERIALIZATION_LIB = %q"serialization.lib" SERIALIZATION_CLASS = %q"serialization.class" SERIALIZATION_FORMAT = %q"serialization.format" SERIALIZATION_DDL = %q"s...
18.286765
79
0.733816
f86883d967f33f5b848407f9f933759a3377bd87
1,540
set :stage, :production_es set :deploy_to, '/var/www/pyx4.com/translate_es' # Simple Role Syntax # ================== # Supports bulk-adding hosts to roles, the primary # server in each group is considered to be the first # unless any hosts have the primary property set. role :app, %w{deployer@prod1.pyx4.com} role :w...
34.222222
115
0.692857
793434b8fda25d570606507b583ee24dc16d15a5
36
module Iphy VERSION = "0.1.0" end
9
19
0.638889
38da0c1f440c1edc5d685856227c9ea1328065ef
243
## $:.unshift(File.dirname(__FILE__)) ## minitest setup require 'minitest/autorun' ## our own code require 'csvreader' ## add test_data_dir helper class CsvReader def self.test_data_dir "#{root}/test/data" end end
14.294118
38
0.662551
e247e60cc19ac60d4a8955cb2f8d90b374f7c2d7
1,994
class TerraformDocs < Formula desc "Tool to generate documentation from Terraform modules" homepage "https://github.com/terraform-docs/terraform-docs" url "https://github.com/terraform-docs/terraform-docs/archive/v0.10.1.tar.gz" sha256 "f3cc429d8edd129c73ca18feafd17bf1aacb0397b3653b7f65aa3978c4d6c337" license...
30.676923
94
0.630893
e87412959ae6764a8185999ae130555e354d2b8f
4,311
# frozen_string_literal: tr class DonationService include ActiveModel::Validations attr_reader :user attr_accessor :address_city, :address_country_code, :address_line1, :address_zip, :amount, :customer_ip, :email, :fund_id, :name, :phone_number, :stripe_phone_number, ...
26.776398
100
0.639295
f83a7b3e5792b9084a7c25c07566f8c6af6ce3b7
521
require('spec_helper') describe(Project) do describe("#employees") do it("tells which employees are in it") do test_project = Project.create({:title => "project"}) test_employee1 = Employee.create({:name => "employee1", :division_id => nil, :project_id => test_project.id}) test_employee2 = Empl...
40.076923
115
0.68906
ff23282bdab0a21aa6a8c176ba0233a3eab2b6d1
195
RSpec.describe New::Music::Cli do it "has a version number" do expect(New::Music::Cli::VERSION).not_to be nil end it "does something useful" do expect(false).to eq(true) end end
19.5
50
0.682051