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
61f3184547104d7dc33630b101c99e254ba85e7d
565
cask 'grids' do version '5.4' sha256 'c4359aa61073c9e0f412b522ce030d631741365e8b96e195760067fdc43489bd' url "https://gridsapp.net/bin/Grids_#{version}.zip" appcast 'https://gridsapp.net/appcast.json' name 'Grids' homepage 'https://gridsapp.net/' auto_updates true depends_on macos: '>= :sierra' app ...
25.681818
75
0.690265
28d7a00297876d32adb23e315696b54d9f4c14d7
2,122
module Fog module AWS class EFS class Real # Create a new, empty file system # http://docs.aws.amazon.com/efs/latest/ug/API_CreateFileSystem.html # ==== Parameters # * CreationToken <~String> - String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent cre...
40.807692
414
0.561734
1d8c7050911d283c037c09da1dd7ffb4dbbfed64
1,543
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::CostManagement::Mgmt::V2018_05_31 module Models # # The group by expression to be used in the report. # class ReportConfigGrouping incl...
26.603448
73
0.534673
abeb00fb43060763abeb2912fe4be1db9471b5c9
5,733
require 'spec_helper' describe Fuzzily::Searchable do # Prepare ourselves a Trigram repository before do silence_warnings do Trigram = Class.new(ActiveRecord::Base) end Trigram.class_eval { include Fuzzily::Model } end before(:each) { prepare_trigrams_table } before(:each) { prepare_owners...
30.989189
101
0.631258
918860b5c12a2edb112227448428efd66cef283a
5,295
# Protoc wants all of its generated files on the LOAD_PATH $LOAD_PATH << File.expand_path('./gen', __dir__) require 'securerandom' require 'temporal/configuration' require 'temporal/execution_options' require 'temporal/client' require 'temporal/activity' require 'temporal/activity/async_token' require 'temporal/workfl...
30.606936
101
0.70085
f833dff97902ac333487dccb92a79bb8a7656e5b
319
class CreateWebHooks < ActiveRecord::Migration def self.up create_table :web_hooks do |table| table.string :gem_name table.integer :user_id table.string :url table.integer :failure_count, default: 0 table.timestamps end end def self.down drop_table :web_hooks end end
19.9375
46
0.68652
f7636312403d8bb3b2731969e76e0300d63a8ac8
5,041
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...
44.219298
114
0.762349
26a794334747493a7c045efbc992bb5ba399e32f
270
module ApplicationHelper # $user_id is for testing def logged_in? return session[:user_id].present? || $user_id.present? end def current_user if logged_in? return @current_user ||= User.find(session[:user_id] || $user_id) else return nil end end end
18
68
0.714815
33bcb38525db57a09ed843bffce50b456315b54f
2,816
require 'coveralls' Coveralls.wear!('rails') ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' require 'sidekiq/testing' include ActionDispatch::TestProcess # Requires supporting ruby files with custom matchers and macros, etc, # ...
39.661972
79
0.764205
edc41dbd2c5db7a0470501579a21f9d54b5b792c
436
require 'spec_helper' module JayaMegaLotto describe Configuration do let(:config) { Configuration.new } it "default value is 6" do expect(config.drawing_count).to eq(6) # Configuration.new.drawing_count = 6 end end describe "#drawing_count=" do let(:config) { Configuration.new } ...
20.761905
43
0.669725
01602835043b9e588be73eb6bd709808d452930f
2,077
#-- 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 ...
30.544118
91
0.692345
e93f2cb64de4200e845bc74a1c248e78f9d112f9
717
# frozen_string_literal: true require 'spec_helper' require Rails.root.join('db', 'post_migrate', '20200615111857_unconfirm_wrongfully_verified_emails.rb') RSpec.describe UnconfirmWrongfullyVerifiedEmails do before do user = table(:users).create!(name: 'user1', email: 'test1@test.com', projects_limit: 1) ta...
32.590909
126
0.747559
bfe40dfa2b4947358c2dd75ea836dc571a32e077
559
require 'socky/server' require 'redom' require './chat/chat' require './othello/othello' class RedomApp < Rack::WebSocket::Application def on_open(env) Redom.on_open self end def on_message(env, msg) Redom.on_message self, msg end def on_close(env) Redom.on_close self end def send(msg) ...
15.971429
84
0.686941
33eb33d314b221ed3fd70597cf8eb16536109121
3,439
# frozen_string_literal: true class DiffFileBaseEntity < Grape::Entity include RequestAwareEntity include BlobHelper include DiffHelper include TreeHelper include ChecksCollaboration include Gitlab::Utils::StrongMemoize expose :content_sha expose :submodule?, as: :submodule expose :submodule_link d...
27.95935
165
0.751963
39584300e5e505555c762079dffda585dd81112b
1,226
# frozen_string_literal: true # Copyright 2015 Australian National Botanic Gardens # # This file is part of the NSL Editor. # # 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 # # ht...
38.3125
79
0.729201
18a3961fb2ded2ecbd8d51d8f25c7d1682fa5ef5
4,377
class Grafana < Formula desc "Gorgeous metric visualizations and dashboards for timeseries databases" homepage "https://grafana.com" url "https://github.com/grafana/grafana/archive/v6.2.5.tar.gz" sha256 "d91b9ef38bfa5a04ff6cd3502647f85057266c3fdef69cf56b67e323b6c0c284" head "https://github.com/grafana/grafana...
32.422222
341
0.639708
5d8dfb0c7dc5756264755a44acf504481d1796e0
6,194
#! /usr/bin/env ruby $LOAD_PATH << "#{File.dirname(File.dirname(__FILE__))}/atomic_red_team" unless $LOAD_PATH.include? "#{File.dirname(File.dirname(__FILE__))}/atomic_red_team" require 'erb' require 'fileutils' require 'atomic_red_team' class AtomicRedTeamDocs ATTACK_API = Attack.new ATOMIC_RED_TEAM = AtomicRedTe...
39.705128
174
0.702777
6a69250efe1513e35acf6e661760238bb44f8697
1,314
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' require 'msf/base/sessions/meterpreter_armbe_linux' ...
27.957447
98
0.629376
03ef402038f1098e491e8c09a4627bb49cbb6802
927
cask "linear-linear" do version "1.5.1" sha256 :no_check if Hardware::CPU.intel? url "https://desktop.linear.app/mac/dmg/x64" livecheck do url "https://desktop.linear.app/mac/dmg/x64" strategy :header_match regex(/Linear\s*(\d+(?:\.\d+)*?)[._-]x64.dmg/) end else url "https://...
23.769231
62
0.638619
ed99f878c6850b52a6f9b918b8581a645cb173c7
10,108
# encoding: UTF-8 module TZInfo module Definitions module Europe module Rome include TimezoneDefinition timezone 'Europe/Rome' do |tz| tz.offset :o0, 2996, 0, :LMT tz.offset :o1, 2996, 0, :RMT tz.offset :o2, 3600, 0, :CET tz.offset :o3, 3600,...
46.796296
56
0.582212
337ed1948f4e43becedc621823cd37bcb17eb036
2,898
require 'spec_helper' require 'f5/icontrol' require_relative '../../../libraries/vip' require_relative '../../../libraries/credentials' require_relative '../../../libraries/gem_helper' describe 'f5_test::test_create_vip_none_http_profile' do let(:api) { double('F5::Icontrol') } let(:server_api) { double('F5::Icont...
32.561798
151
0.636301
216ea4494e06a6ca2b03a729b033f8156290206e
1,420
require 'spec_helper' describe RubyLint::VirtualMachine do describe 'scoping method definitions' do example 'process a global method' do defs = build_definitions('def example; end') example = defs.lookup(:instance_method, 'example') example.is_a?(ruby_method).should == true example.t...
22.539683
65
0.621831
01acbd7b2d802947fa7bf027f140c6da3a9d7c63
1,417
class Issue < ReportPart belongs_to :reportable, polymorphic: true belongs_to :issue_template, required: false def self.create_from_template(issue_group, issue_template) Issue.create( reportable: issue_group, title: issue_template.title, description: issue_template.description, rating...
20.838235
126
0.613267
4a4fe3093dba1b167242b14878336dd09e80ad2a
477
# 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::Network::Mgmt::V2018_10_01 module Models # # Defines values for VirtualNetworkGatewayConnectionType # module VirtualNetworkG...
25.105263
70
0.714885
5d4518993a2b0a2630cb91d554d471f922c877c5
1,236
# # Author:: Joshua Timberman <opensource@housepub.org> # Copyright:: Copyright (c) 2012, Joshua Timberman # 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...
44.142857
112
0.775081
382645e8b7fa5a925d7b3f9fc45cef7a5ce7447a
693
# -*- coding: UTF-8 -*- require 'haml/util' require 'haml/engine' module Zorglub module Engines module Haml def self.proc path,obj if obj.app.opt(:engines_cache_enabled) key = path.sub obj.app.opt(:root),'' haml = obj.app.engines_cache[ke...
28.875
142
0.496392
91042da600b6c1c819116e55c6d80fda673c75ac
6,280
## # This module requires Metasploit: http//metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' require 'zlib' class Metasploit3 < Msf::Exploit::Remote Rank = GoodRanking include Msf::Exploit::Remote::HttpServer::HTML def initialize(info = {}) sup...
30.634146
156
0.543631
0189958ab536662d3b677d7ee581b469e9e8adea
3,439
#!/usr/bin/ruby # -------------------------------------------------------------------------- # # Copyright 2002-2020, OpenNebula Project, OpenNebula Systems # # # # Licensed under the Apache License, Version 2.0 (the "License"); ...
35.822917
80
0.503053
7a19e38c5da4296f83a03b3c4ff830a27876bc0d
3,970
# # Author:: Sean OMeara (<sean@sean.io>) # Recipe:: yum-mysql-community::mysql56-community # # Copyright:: 2014-2019, 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 # # ...
81.020408
133
0.722166
6255e345ee43eb963e1777e6d0b83eca49523f4e
7,807
require 'spec_helper' class TestSubject include DataMagic end describe "DataMagic translations" do context "when delivering data" do let(:example) { TestSubject.new } def set_field_value(value) DataMagic.should_receive(:yml).twice.and_return({'key' => {'field' => value}}) end it "shoul...
35.648402
84
0.660049
79e199e046dbd897536bf2770424545187baf659
93
class Page < ActiveRecord::Base belongs_to :book mount_uploader :image, PageUploader end
18.6
37
0.784946
1897293e213f4a206e40353ce6fb9b2f7c7719e1
1,307
class Project attr_accessor :title attr_reader :id def initialize(attributes) @title = attributes.fetch(:title) @id = attributes.fetch(:id) end def save() new_id = DB.exec("INSERT INTO projects (title) VALUEs ('#{@title}') RETURNING id; ") @id = new_id.first().fetch("id").to_i end def =...
24.203704
93
0.626626
0178b3689ffff1f893e39385036afe4407149417
1,004
require "base64" require "openssl" require "time" module Cassieq class Authentication attr_reader :key, :account def self.generate_auth_headers(key, account, method, path) new(key, account).auth_headers(method, path) end def initialize(key, account) @key = key @account = account ...
26.421053
97
0.683267
bbdea2f54c94711bd24e2b90789f9629eb5230be
1,870
class Cpprestsdk < Formula desc "C++ libraries for cloud-based client-server communication" homepage "https://github.com/Microsoft/cpprestsdk" url "https://github.com/Microsoft/cpprestsdk/archive/v2.10.6.tar.gz" sha256 "5fecccc779b077f18acf0f7601b19b39c3da963498ed5b10bb2700dccfe66c5a" head "https://github.com...
41.555556
103
0.671123
ffd7d776f0b9fdf2b5a99c6b32a48ae6c457955d
1,423
action :create do template "shinken/arbiter/#{template? ? "templates/": ""}hostgroups/#{new_resource.hostgroup_key}" do path full_path source "definitions/hostgroups/hostgroup.cfg.erb" mode 00644 variables({ :hostgroup_key => new_resource.hostgroup_key, :hostgroup_name => new_resource...
24.964912
103
0.683064
f76582700c4bf84ae3deb9cd2d1d5d2ac65380a4
491
class Student < ApplicationRecord belongs_to :parent belongs_to :course has_many :lessons has_one :teacher, through: :course # has_many :courses # has_many :teachers, through: :courses # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable d...
25.842105
62
0.741344
5d41d3990260885c8059e1116cf5d30e9d8c3a79
15,358
require 'support/spec_support' require 'cheffish/rspec/chef_run_support' require 'support/key_support' repo_path = Dir.mktmpdir('chef_repo') describe Chef::Resource::PrivateKey do extend Cheffish::RSpec::ChefRunSupport before :each do FileUtils.remove_entry_secure(repo_path) Dir.mkdir(repo_path) end ...
38.782828
120
0.627425
2632fdc375a2a6cc3a7f2dd7e4c809556b9d91b3
19,598
require 'json' require 'rest-client' module Kubeclient # Common methods # this is mixed in by other gems module ClientMixin ENTITY_METHODS = %w[get watch delete create update patch].freeze DEFAULT_SSL_OPTIONS = { client_cert: nil, client_key: nil, ca_file: nil, cert_store: ...
35.632727
116
0.642055
21b69f41b38f77be0a658212dcd7a2514850266f
1,446
require "spec_helper" describe Viewpoint::EWSClient do describe "#set_auto_deepen" do let(:client) { described_class.new "http://www.example.com", "test", "test" } it "sets autodeepen to true on the web service" do ews = double "ews" expect(ews).to receive(:auto_deepen=).with(true) {true} ...
32.133333
101
0.66805
ac414a981e00000af5db04ebe9e4a9c8531b215f
702
Pod::Spec.new do |s| s.platform = :ios s.ios.deployment_target = '10.0' s.name = "SwipeDownViewController" s.summary = "SwipeDownViewController lets a user dismiss a ViewController using a swipe down gesture." s.requires_arc = true s.version = "0.1.0" s.license = { :type => "MIT", :file => ...
39
112
0.65812
1af9c78a8d38ebfb58b43c66b0eb45246143eea4
3,919
require 'json' require 'date' root = ENV['EMISSION_ROOT'] || __dir__ pkg_version = lambda do |dir_from_root = '', version = 'version'| path = File.join(root, dir_from_root, 'package.json') JSON.load(File.read(path))[version] end emission_version = pkg_version.call emission_native_version = pkg_version.call('', 'n...
40.402062
138
0.734116
01d93ea8483c2e1d2a1f2eaf464464d9d86f545f
638
class Country include ActiveModel::Model attr_reader :simple_id, :entity_id, :enabled validates_presence_of :simple_id, :entity_id, :enabled def initialize(hash) @simple_id = hash['simple_id'] @entity_id = hash['entity_id'] @enabled = hash['enabled'] end def self.from_api(hash) new( ...
24.538462
108
0.667712
114a4acd354a6c80b37e1b6633245341134af994
12,124
require 'rails_helper' feature 'Curriculum Editor', js: true do include UserSpecHelper include MarkdownEditorHelper include NotificationHelper # Setup a course with a single founder target, ... let!(:school) { create :school, :current } let!(:course) { create :course, school: school } let!(:course_2) { ...
38.858974
142
0.728225
3327d014f0cc474467b4607bc61edca257049dcc
6,051
#-- encoding: UTF-8 #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2021 the OpenProject GmbH # # 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 ChiliProje...
34.775862
123
0.69096
e8136039f3b206863f0cbf5ef0b32a3c1fae62fd
2,863
module Bosh::Cli::Command class Snapshot < Base usage 'snapshots' desc 'List all snapshots' def list(job = nil, index = nil) auth_required deployment_name = prepare_deployment_manifest(show_state: true).name snapshots = director.list_snapshots(deployment_name, job, index) if sna...
28.919192
118
0.623472
189eaa4e1dcf8af996a4801c9b4a9fcf7d68dc77
1,812
#-- encoding: UTF-8 #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2021 the OpenProject GmbH # # 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 ChiliProje...
34.188679
91
0.752759
01e437f3e997c04f4a6caf7bcb7f713764e6cc4d
298
# frozen_string_literal: true class Course::LessonPlan::Milestone < ActiveRecord::Base belongs_to :course, inverse_of: :lesson_plan_milestones def initialize_duplicate(duplicator, other) self.start_at += duplicator.time_shift self.course = duplicator.duplicate(other.course) end end
29.8
57
0.788591
21f8ec2e45552eeeaf43293c38a33028a1a6c43b
85
# desc "Explaining what the task does" # task :matanza2 do # # Task goes here # end
21.25
38
0.682353
edf603fc0acaeff85a1c04b5fb0ea259a477a194
3,585
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...
41.206897
102
0.759554
bf149191c794aadd42aa8d251867703c511e100c
11,180
=begin #NSX-T Manager API #VMware NSX-T Manager REST API OpenAPI spec version: 2.3.0.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.3.1 =end require 'date' module NSXT # LACP group class Lag # uplink names attr_accessor :uplinks # Lag name attr...
31.142061
151
0.636404
4a152d0c08de37aecbe8084aa46cf88ae96e99ff
270
require 'spec_helper' describe '::cassandra::params' do let :facts do { osfamily: 'RedHat', operatingsystemmajrelease: 7 } end it do should compile should contain_class('cassandra::params') should have_resource_count(0) end end
15.882353
45
0.662963
ed5c60d3666154e6634fe3fc89bb3944988712aa
169
# Set up the load path. lib = File.expand_path(File.dirname(__FILE__)) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "wax/version" require "wax/main"
24.142857
55
0.757396
f8507669bcc0c91200667255f07f8bfe94706634
3,282
module Nucleon module Util class Cache < Core @@cache_lock = Mutex.new #----------------------------------------------------------------------------- # This class already inherits much of what we need from the core config class. # Right now we just have to worry about persistence #-----------------...
19.652695
85
0.519805
5d6819506e085250d525e250b15efac7e0b3aab1
1,361
cask 'vlc' do version '2.2.4' sha256 'fd071b9817c9efccac5a144d69893a4a5323cbde4a74d5691c3cf3ab979d4160' url "https://get.videolan.org/vlc/#{version}/macosx/vlc-#{version}.dmg" appcast 'http://update.videolan.org/vlc/sparkle/vlc-intel64.xml', checkpoint: '0e71dfa9874979a8a9e6a9a3a7fdd21366a92082bce283...
37.805556
148
0.669361
91de0f13bab678baf08ddeb5f59f0c3528a45a3c
278
require 'sidekiq/web' Rails.application.routes.draw do resources :txns root to: 'pages#home' resources :banks resources :users mount Sidekiq::Web => '/sidekiq' # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html end
25.272727
102
0.741007
5d468ff7867482bf7dff860e5a5be9fb77f5428d
804
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe ZPNG::Metadata do # itxt.png contains all possible text chunks describe "itxt.png" do let!(:metadata){ ZPNG::Image.load( File.join(SAMPLES_DIR, "itxt.png") ).metadata } it "should get all values" do metadata.size.sho...
34.956522
130
0.674129
798ebfa4507445e6efb0b4a41169f191b79a7352
646
class DeviseInvitable::RegistrationsController < Devise::RegistrationsController protected def build_resource(hash = nil) hash ||= resource_params || {} if hash[:email] self.resource = resource_class.where(:email => hash[:email]).first if self.resource && self.resource.respond_to?(:invited_to_s...
34
110
0.713622
91d18e548cb848941b9831bbdaa7807acf0b75ca
998
# 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. # # This file is the source Rails uses to define your schema when running `rails #...
36.962963
86
0.759519
39f8940978007a000dc682ee9f7f5518a28756a5
592
require 'byebug' post '/friendships' do current_user.friendships.create(:friend_id => params[:friend_id]) redirect '/' end post '/destroyfriendships' do if current_user.friends.where(id: params[:friend_id]) == [] friendship_to_be_destroyed =Friendship.where(friend_id: params[:current_user_id], user_id: params...
25.73913
118
0.785473
abe3b5d1e579661c2cd0f80d1dfa8829843f149f
143
class AddPictureToIrbSelections < ActiveRecord::Migration def change add_attachment :irb_selections_pictures, :picture end end
23.833333
57
0.769231
f8db957df80e887054b4b2f24fd38a9700cb3eaf
2,733
describe UseCase::UpdateAssessmentStatus do include RSpecRegisterApiServiceMixin scheme_id = nil subject(:use_case) do described_class.new( assessments_gateway: assessments_gateway, assessments_search_gateway: assessments_search_gateway, assessors_gateway: Gateway::AssessorsGateway.new, ...
30.366667
183
0.712404
1caa0c78bfa2b90a7dd8f5cedb23adfed4153d89
1,890
Pod::Spec.new do |s| s.name = 'sReto' s.version = '3.0.0' s.summary = 'P2P Framework for realtime collaboration in Swift with independent modules for WLAN, Bluetooth and Remote support' s.homepage = 'https://github.com/ls1intum/sReto' s.license = 'MIT' ...
32.586207
140
0.61164
87c4392fa259742eedc50e4f3d61f1a0e0dc640e
764
module Aviator define_request :get_default_quotas, inherit: [:openstack, :common, :v2, :admin, :base] do meta :service, :volume meta :api_version, :v2 link 'documentation', 'http://docs.openstack.org/trunk/openstack-ops/content/projects_users.html' link 'documentation', 'https://g...
22.470588
94
0.65445
d5501c15bc35e3f4ee11c4d8edf57f7a1e43babe
391
# 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::Network::Mgmt::V2020_07_01 module Models # # Defines values for FirewallPolicyNatRuleCollectionActionType # module FirewallP...
24.4375
70
0.744246
38e4437a91582d78b3e19228985642e27459eec5
1,134
require 'sprockets' require 'sprockets/htmlimports/patches/asset_attributes' require 'sprockets/htmlimports/patches/base' require 'sprockets/htmlimports/patches/compressing' require 'sprockets/htmlimports/patches/context' require 'sprockets/htmlimports/base_processor' require 'sprockets/htmlimports/bundle_reprocessor...
32.4
96
0.840388
181b46161b49c4307f0ad6fd907744d7034618ba
1,361
# encoding: UTF-8 module Lambit module Aws module CloudWatch class Alarm OPTIONS = [ :alarm_name, :alarm_description, :actions_enabled, :ok_actions, :alarm_actions, :insufficient_data_actions, :metric_...
22.683333
65
0.495959
6299fabf383ede56a1fa8bce58d40b29ef3f7146
494
# encoding: utf-8 require 'spec/expectations' $:.unshift(File.dirname(__FILE__) + '/../../lib') # This line is not needed in your own project require 'cucumber/formatter/unicode' require 'calculadora' Before do @calc = Calculadora.new end After do end Given /que eu digitei (\d+) na calculadora/ do |n| @calc.push...
19.76
95
0.704453
ab95eaa6448d9a2f6cc9523a022f4c5983ab4b81
1,232
module Admin class PermissionsController < ::AdminController before_action :find_employee, only: %i[update destroy] before_action :valid_employee def update @employee.update(role: :manager) @employees = current_company.employees.active.order(role: :desc, name: :asc) respond_to do |form...
28
129
0.691558
26c8a73c09adaed89cd7aa30bb9abb717c8dcf09
1,068
module GamesAdmin class GamesController < ApplicationController before_action :set_game, only: [:show, :edit, :update, :destroy] def index @games = AppComponent::Game.all end def show end def new @game = AppComponent::Game.new end def edit end def create ...
20.538462
141
0.626404
0358fbaa047c773b0c656f295168aa2fe78132ca
3,488
component "rubygem-ffi" do |pkg, settings, platform| pkg.version '1.9.25' pkg.md5sum "e8923807b970643d9e356a65038769ac" instance_eval File.read('configs/components/_base-rubygem.rb') # Windows versions of the FFI gem have custom filenames, so we overwite the # defaults that _base-rubygem provides here, just...
40.55814
160
0.635608
08ef5b7f11035209fd1e6a276ec0c1d4d246a88d
3,331
# # Cookbook:: ruby_rbenv # Provider:: ruby # # Author:: Fletcher Nichol <fnichol@nichol.ca> # # Copyright:: 2011-2017, Fletcher Nichol # # 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 # # ...
26.436508
93
0.720805
e2c8a801301a362f14b2471ba4c8316bbf20bec6
1,606
test_name 'C3436 - checkout a branch (git protocol)' # Globals repo_name = 'testrepo_branch_checkout' branch = 'a_branch' hosts.each do |host| tmpdir = host.tmpdir('vcsrepo') step 'setup - create repo' do git_pkg = 'git' if host['platform'] =~ %r{ubuntu-10} git_pkg = 'git-core' end install_p...
30.301887
93
0.634496
d559e1de48341f6c1b9565aab2a0a4a7ab82ee5f
479
cask 'bunq' do version '0.8.11' sha256 'ff461b377e5b6acd9bffd86e2c8367eb3ec2e1e6734c8a64f58ef4b8aed3eb05' # github.com/BunqCommunity/BunqDesktop was verified as official when first introduced to the cask url "https://github.com/BunqCommunity/BunqDesktop/releases/download/#{version}/BunqDesktop-#{version}.dmg" ...
36.846154
108
0.787056
0393bfb07a851614389bf3f1d7f150582274cf12
1,902
require 'spec_helper' describe Admin::Merchandise::Multi::VariantsController do render_views before(:each) do activate_authlogic @user = create_admin_user login_as(@user) end it "edit action should render edit template" do @product = FactoryGirl.create(:product) get :edit, product_id: @pr...
40.468085
125
0.644585
21609933d2f9678b0c0a8536b9f00377b1aa75ad
723
begin require_relative 'helper' rescue LoadError end class TestFiddle < Fiddle::TestCase def test_constants_match [ :TYPE_VOID, :TYPE_VOIDP, :TYPE_CHAR, :TYPE_SHORT, :TYPE_INT, :TYPE_LONG, :TYPE_LONG_LONG, :TYPE_FLOAT, :TYPE_DOUBLE, ].each do |name| ...
21.909091
90
0.659751
6af41b21e2d733a3a7440bdd9a79da6ef7c78ab6
211
class AddSpecialTypeToSubmission < ActiveRecord::Migration[4.2] def self.up add_column :submissions, :special_type, :integer end def self.down remove_columnn :submissions, :special_type end end
21.1
63
0.758294
bb4c061d09515530e10bf31059fdcdcb511e9ad3
424
class RemoveMandatoryOfResumeUrlAddFeedbackFromApplications < ActiveRecord::Migration[5.0] #add_feedback_from_applications def self.up change_column_null :my_applications, :cv_url, true add_column :my_applications, :overall_feedback, :text, null: true, default: '' end def self.down remove_column :m...
32.615385
90
0.78066
d5ad201cd4f78b4268f277e3d2daf18ce1f383d7
3,479
# 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::Network::Mgmt::V2019_08_01 module Models # # Trusted Root certificates of an application gateway. # class ApplicationGateway...
30.252174
79
0.511066
ac317390bcb290c03f310243540feb9dd589b052
137
require "rubygems_test_repo_3fd2/version" module RubygemsTestRepo3fd2 class Error < StandardError; end # Your code goes here... end
19.571429
41
0.788321
e84ac2f57d9eb051d3a0c52f99c3f2e950f9f87f
2,198
class CollectorSidecar < Formula desc "Manage log collectors through Graylog" homepage "https://github.com/Graylog2/collector-sidecar" url "https://github.com/Graylog2/collector-sidecar/archive/1.0.2.tar.gz" sha256 "ee7ddb725d3475656df0bb08476e64c7f919acfc011a338b4532249363778130" bottle do cellar :any_s...
32.80597
94
0.685623
18a806c64487da150e69eed6e77d82fcb9e08d62
278
require 'rails' require 'jbuilder' require "shp_api/version" require "shp_api/rescue_from" require "shp_api/json_responder" module ShpApi def self.root File.expand_path('../..', __FILE__) end def self.view_path File.join(root, 'app', 'views') end end
14.631579
39
0.690647
3323785494916f8d3bf930d227d77c17c6c14f8d
3,160
# frozen_string_literal: true require "test_helper" class ActionCable::Connection::SubscriptionsTest < ActionCable::TestCase class Connection < ActionCable::Connection::Base attr_reader :websocket def send_async(method, *args) send method, *args end end class ChatChannel < ActionCable::Chann...
27.008547
137
0.709177
01c3936f40907252dc6e52eb057780b277510669
125
json.extract! comment, :id, :user, :post_id, :content, :created_at, :updated_at json.url comment_url(comment, format: :json)
41.666667
79
0.744
0159ceaf4effddef6432b0a44573d9f03266d8bb
4,994
## Releasing a new version of octofacts ## ## 1. Update `.version` with new version number ## 2. Run `script/bootstrap` to update Gemfile.lock ## 3. Commit changes, PR, and merge to master ## 4. Check out master branch locally ## 5. Run `bundle exec rake gem:release` require "fileutils" require "open3" require "shellw...
31.408805
123
0.639167
4a0cea39e888454e9def786c4e4a2a9e12eaa5e9
1,336
require "spec_helper" p __FILE__ describe "Parsing the generic URL 'tcp://fbeausoleil:thepassword@c.com:3391/def'" do def url @url ||= UrlParser.parse("tcp://fbeausoleil:thepassword@c.com/def") end it "should recognize the 'tcp' scheme" do url.scheme.must_equal "tcp" end it "should recognize the '...
20.875
84
0.689371
398f94b0d42995289ad5050dd4882a0ad51c3122
2,543
# 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::CognitiveServices::Customvisiontraining::V2_0 module Models # # Model object. # # class ImageRegionCreateEntry in...
24.68932
70
0.447503
2124b53de1aa0c0e2c1b0da9c7ed59b0864262c8
20,465
# frozen_string_literal: true Doorkeeper.configure do # Change the ORM that doorkeeper will use (requires ORM extensions installed). # Check the list of supported ORMs here: https://github.com/doorkeeper-gem/doorkeeper#orms orm :active_record # This block will be called to check whether the resource owner is ...
42.195876
109
0.739262
7ab3aaa2f3c6117aef12edcfd0638e258616a721
70
require "env-dependencies/railtie" require "env-dependencies/version"
23.333333
34
0.828571
e2b4c0619284b22d45bb6814518e88542f9a209b
1,427
class Lc0 < Formula desc "Open source neural network based chess engine" homepage "https://lczero.org/" url "https://github.com/LeelaChessZero/lc0.git", :tag => "v0.26.0", :revision => "09edc73cf177f5f1d00e54549b6fa491e0507b56" license "GPL-3.0" revision 1 bottle do cellar :any_skip_r...
31.711111
138
0.728101
bbde92f8260bf5a2491a3eab0d67a1339ed715e5
330
class CreateProjects < ActiveRecord::Migration def change create_table :projects do |t| t.string :name t.references :user, index: true t.float :latitude t.float :longitude t.float :sqft t.string :street t.string :city t.string :state t.string :country end ...
20.625
46
0.621212
79f271f0e0de5f4fe4c6bcfe5e0049c367b7a1f2
1,021
require_relative '../../../spec_helper' class CoreConceptPage < CoreAuthorityPage include Logging include Page include CollectionSpacePages DEPLOYMENT = Deployment::CORE def display_name_input(index); input_locator([fieldset(CoreConceptData::CONCEPT_TERMS.name, index)], CoreConceptData::TERM_DISPLAY_NAM...
30.939394
147
0.77669
21be54a7f032aab1e65986dad2bb61fcbe25a791
122
module Consumer module Postgres module Controls Identifier = Consumer::Controls::Identifier end end end
15.25
49
0.713115
2181530dde90ff6d4e87e2be8322c263cad505a9
288
require 'mkmf' dir_config('bsdiff') fail unless have_header('unistd.h') fail unless have_header('bzlib.h') fail unless have_library('bz2') fail unless have_func('BZ2_bzWrite','bzlib.h') fail unless have_macro('BZ_OK','bzlib.h') create_header('bsdiff_config.h') create_makefile('bsdiff')
26.181818
46
0.770833
87baaadbfa942650d2ed55163455fc0fdcb4abd5
652
# -*- encoding: utf-8 -*- # stub: pyu-ruby-sasl 0.0.3.3 ruby lib Gem::Specification.new do |s| s.name = "pyu-ruby-sasl" s.version = "0.0.3.3" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Stephan Maka", "Ping Y...
32.6
105
0.679448
21e4e1cc17c906f5e670418123f26b83ea3b8f77
153
require File.expand_path('../../../spec_helper', __FILE__) describe "Kernel#protected_methods" do it "needs to be reviewed for spec completeness" end
25.5
58
0.751634
6a27971b1eee9e90a3e9e5316ea25c8433b6f95c
92
# desc "Explaining what the task does" # task :active_preview do # # Task goes here # end
18.4
38
0.695652
d569324f6f457bde2c00802457ac4575e40726c7
209
# frozen_string_literal: true class AddOverviewAndDescriptionToTopic < ActiveRecord::Migration[5.0] def change add_column :topics, :overview, :text add_column :topics, :description, :text end end
23.222222
69
0.760766
87812a42a3eaacd97522ee34d855e67e73a4d54c
644
Gem::Specification.new do |spec| spec.name = "web-under-construction" spec.version = "0.1.1" spec.authors = ["Farid Nizam"] spec.email = ["faridsaja12@gmail.com"] spec.summary = "Website Under Construction Jekyll theme." spec.homepage = "https://github....
40.25
126
0.597826
1cd0a1755308d56cb5117fdce05a4ef930677274
553
class UserMailer < ApplicationMailer # Subject can be set in your I18n file at config/locales/en.yml # with the following lookup: # # en.user_mailer.account_activation.subject # def account_activation(user) @user = user mail to: user.email, subject: "Account activation" end # Subject can be...
22.12
65
0.707052
62092376dbb52d106419fbd70ec9ca0bbc1b993c
1,765
#: * `uninstall`, `rm`, `remove` [`--force`] <formula>: #: Uninstall <formula>. #: #: If `--force` is passed, and there are multiple versions of <formula> #: installed, delete all installed versions. require "keg" require "formula" require "migrator" module Homebrew def uninstall raise KegUnspecifiedE...
26.742424
78
0.583569