content_type stringclasses 8
values | main_lang stringclasses 7
values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
PHP | PHP | fix ambiguous content types in requesthandler | 6e4493cc146bc98fdea9ebf70165e86297a37668 | <ide><path>lib/Cake/Controller/Component/RequestHandlerComponent.php
<ide> protected function _setExtension() {
<ide> }
<ide> $extensions = Router::extensions();
<ide> $preferred = array_shift($accept);
<del> $preferredTypes = $this->mapType($preferred);
<add> $preferredTypes = $this->response->mapType($preferr... | 2 |
Java | Java | implement measure for nodes textinput | 055b31a16590954c79b90ac2b9d5ad7cd89a0509 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/flat/RCTTextInput.java
<ide>
<ide> package com.facebook.react.flat;
<ide>
<del>import android.text.SpannableStringBuilder;
<add>import javax.annotation.Nullable;
<ide>
<add>import android.text.SpannableStringBuilder;
<add>import android.util.TypedValue;
<add>i... | 1 |
Ruby | Ruby | fix typo in dispatcher#controller documentation | 702aecb126712de9f996da74357cafe14f449d24 | <ide><path>actionpack/lib/action_dispatch/routing/route_set.rb
<ide> def prepare_params!(params)
<ide>
<ide> # If this is a default_controller (i.e. a controller specified by the user)
<ide> # we should raise an error in case it's not found, because it usually means
<del> # an user error. Howeve... | 1 |
Go | Go | add missing defines | a015f38f4a886518828fe3807ee7dc9ff8ab9585 | <ide><path>graphdriver/devmapper/devmapper_wrapper.go
<ide> package devmapper
<ide> #include <linux/loop.h> // FIXME: present only for defines, maybe we can remove it?
<ide> #include <linux/fs.h> // FIXME: present only for BLKGETSIZE64, maybe we can remove it?
<ide>
<add>#ifndef LOOP_CTL_GET_FREE
<add> #define LOOP... | 1 |
Ruby | Ruby | push the parameter parsers on to the class | b93c226d19615fe504f9e12d6c0ee2d70683e5fa | <ide><path>actionpack/lib/action_dispatch/http/parameters.rb
<ide> module Http
<ide> module Parameters
<ide> PARAMETERS_KEY = 'action_dispatch.request.path_parameters'
<ide>
<add> DEFAULT_PARSERS = {
<add> Mime::JSON => lambda { |raw_post|
<add> data = ActiveSupport::JSON.decode(raw_post... | 3 |
PHP | PHP | fix tests that relied on protected methods | e9f7c4127a71f335b0def5d3a304b06e0a183084 | <ide><path>tests/TestCase/Controller/Component/RequestHandlerComponentTest.php
<ide> public function testStartupCallback()
<ide> $event = new Event('Controller.beforeRender', $this->Controller);
<ide> $_SERVER['REQUEST_METHOD'] = 'PUT';
<ide> $_SERVER['CONTENT_TYPE'] = 'application/xml';
<del> ... | 1 |
Python | Python | fix string in test for python 3k | 677d349c22dd5538dd4bb962df11814f23a46b35 | <ide><path>numpy/core/tests/test_regression.py
<ide> def test_string_astype(self):
<ide>
<ide> def test_string_astype(self):
<ide> """Ticket #1756 """
<del> s = '12345'
<add> s = asbytes('12345')
<ide> a = np.array([s]*5)
<ide> for i in range(1,6):
<ide> a1 = np.ar... | 1 |
Python | Python | add `python_requires` metadata for pypi | a22d143f96ee3c7d14887e871b34a84683835a3f | <ide><path>setup.py
<ide> include_package_data=True,
<ide> zip_safe=False,
<ide> platforms='any',
<add> python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
<ide> install_requires=[
<ide> 'Werkzeug>=0.14',
<ide> 'Jinja2>=2.10', | 1 |
Text | Text | update a link | 1f0267bb6dfdfc1871a488b35fe7d2821b73ffac | <ide><path>SUPPORTERS.md
<ide> These brilliant people supported our Kickstarter by giving us £15 or more:
<ide> * [Chuck Fouts](https://github.com/gnarl)
<ide> * [Chip Warden](https://twitter.com/lgw4)
<ide> * [Ethan Schoonover](http://ethanschoonover.com)
<del>* [Chi Trung Nguyen](http://www.napcaesmind.de)
<add>* [Ch... | 1 |
PHP | PHP | remove unused method | b9a51803b7fd191e9665db1fd9f9686db6755ad4 | <ide><path>src/Illuminate/Database/Eloquent/Model.php
<ide> public static function findOrNew($id, $columns = ['*'])
<ide> return new static;
<ide> }
<ide>
<del> /**
<del> * Refresh the current model with the current attributes from the database.
<del> *
<del> * @return void
<del> */
<del... | 1 |
Mixed | Go | add more cgroup config to docker info | 458ec418cd11989c58d4a4485436eccadf91a91d | <ide><path>api/client/info.go
<ide> func (cli *DockerCli) CmdInfo(args ...string) error {
<ide> if !info.SwapLimit {
<ide> fmt.Fprintf(cli.err, "WARNING: No swap limit support\n")
<ide> }
<add> if !info.OomKillDisable {
<add> fmt.Fprintf(cli.err, "WARNING: No oom kill disable support\n")
<add> }
<add> ... | 4 |
Text | Text | fix code snippet in tutorial (async logic) | 7adc605aef42bb8fa228be3e2e5bd22d37342c7e | <ide><path>docs/tutorials/essentials/part-5-async-logic.md
<ide> export const addNewPost = createAsyncThunk(
<ide> // The payload creator receives the partial `{title, content, user}` object
<ide> async initialPost => {
<ide> // We send the initial data to the fake API server
<del> const response = await cli... | 1 |
Ruby | Ruby | fix unreplaced class var | 68ff2ebbea15936b618cd0476f4acd24728a6348 | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
<ide> def verify_active_connections!
<ide> end
<ide>
<ide> active_connections.each_value do |connection|
<del> connection.verify!(@@connection_cache_timeout)
<add> connection.verify!(@@v... | 1 |
Text | Text | change the contact person for clover | 3053603998984f09ef01c5c7d42a9810413d4237 | <ide><path>INTHEWILD.md
<ide> Currently, **officially** using Airflow:
<ide> 1. [Cleartax](https://cleartax.in/) [[@anks](https://github.com/anks) & [@codebuff](https://github.com/codebuff)]
<ide> 1. [Clicksign](https://clicksign.com/) [[@mbbernstein](https://github.com/mbbernstein) & [@jorgeac12](https://github.com/jo... | 1 |
Ruby | Ruby | remove exact match from `brew cask search` | 14b3b82fcaa5c3e44c5e89de6b5ca802218f4a0e | <ide><path>Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb
<ide> class AbstractCommand
<ide> option "--debug", :debug, false
<ide> option "--verbose", :verbose, false
<ide> option "--outdated", :outdated_only, false
<del> option "--require-sha", :require_s... | 3 |
Text | Text | update "man" of docker-run | 22f0b27f59aacd1f9028a8d2ea37e1ed6372675e | <ide><path>man/docker-run.1.md
<ide> to the quota you specify.
<ide>
<ide> At any time you can run **docker ps** in
<ide> the other shell to view a list of the running containers. You can reattach to a
<del>detached container with **docker attach**. If you choose to run a container in
<del>the detached mode, then y... | 1 |
Java | Java | remove redundant type parameter in emptyaction | 5cb9f418250009498b536de46e87c247ca6b5e68 | <ide><path>src/main/java/rx/functions/Actions.java
<ide> private Actions() {
<ide> }
<ide>
<ide> @SuppressWarnings("unchecked")
<del> public static final <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> EmptyAction<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> empty() {
<add> public static final <T0, T1, T2, T3, T4, T... | 1 |
Python | Python | add progress for retry connections | c76b1c2f078c9e877b346ed13973cf45eede4a1b | <ide><path>celery/worker/consumer/consumer.py
<ide> """
<ide>
<ide> CONNECTION_RETRY_STEP = """\
<del>Trying again {when}...\
<add>Trying again {when}... ({retries}/{max_retries})\
<ide> """
<ide>
<ide> CONNECTION_ERROR = """\
<ide> def ensure_connected(self, conn):
<ide> def _error_handler(exc, interval, nex... | 2 |
Python | Python | remove redunant code from runpython operation | 80bbe2265d1afd43f8519427ad8ce0b147aceb43 | <ide><path>django/db/migrations/operations/special.py
<ide> def database_forwards(self, app_label, schema_editor, from_state, to_state):
<ide> # object, representing the versioned models as an app registry.
<ide> # We could try to override the global cache, but then people will still
<ide> # use... | 1 |
Ruby | Ruby | trim the fat | 42f8e3f611fa12b37793620ca2f7bd5c360631c8 | <ide><path>activerecord/lib/active_record/associations.rb
<ide> def association_join
<ide> first_key = second_key = as_extra = nil
<ide>
<ide> if through_reflection.options[:as] # has_many :through against a polymorphic join
<del> ##... | 1 |
Javascript | Javascript | correct the assertion to make test pass on ie11 | 84c408ce63859e81fb4e900683edcc0cb8188890 | <ide><path>test/ng/compileSpec.js
<ide> describe('$compile', function() {
<ide> element = $compile('<iframe srcdoc="{{html}}"></iframe>')($rootScope);
<ide> $rootScope.html = $sce.trustAsHtml('<div onclick="">hello</div>');
<ide> $rootScope.$digest();
<del> expect(angular.lowercase(elemen... | 1 |
Javascript | Javascript | remove call to `net.socket.resume()` | d9a6d4afe7fd05f7634d2415dfdeba69f77a4ce0 | <ide><path>test/parallel/test-child-process-fork-net2.js
<ide> if (process.argv[2] === 'child') {
<ide> console.error('[m] CLIENT: close event');
<ide> disconnected += 1;
<ide> });
<del> // XXX This resume() should be unnecessary.
<del> // a stream high water mark should be enough to kee... | 1 |
Javascript | Javascript | use generatetransform for animation transforms | 6139da0c9325a4b43e1750a97bbbc4873ecb701d | <ide><path>examples/js/loaders/FBXLoader.js
<ide> initialPosition: [ 0, 0, 0 ],
<ide> initialRotation: [ 0, 0, 0 ],
<ide> initialScale: [ 1, 1, 1 ],
<add> transform: getModelAnimTransform( rawModel ),
<ide>
<ide> };
<ide>
<del> if ( 'Lcl_Translation' in rawModel ) nod... | 1 |
Text | Text | add default value for justify-content | 3b0a75e6484145001950d6a87ed19de0609e1385 | <ide><path>curriculum/challenges/english/01-responsive-web-design/css-flexbox/align-elements-using-the-justify-content-property.english.md
<ide> Sometimes the flex items within a flex container do not fill all the space in th
<ide> <a href="https://www.w3.org/TR/css-flexbox-1/images/flex-direction-terms.svg" target="_b... | 1 |
Text | Text | remove dead link | 4ab62a6bd2b38464e129ad95360d9de75c8133b5 | <ide><path>docs/docs/tutorial.md
<ide> var CommentForm = React.createClass({
<ide>
<ide> React attaches event handlers to components using a camelCase naming convention. We attach an `onSubmit` handler to the form that clears the form fields when the form is submitted with valid input.
<ide>
<del>We always return `fa... | 1 |
Ruby | Ruby | skip outdated check when offline | a8a16928e4e7f77a8f2d73d9dd2fef9d8383fc2a | <ide><path>Library/Homebrew/cmd/doctor.rb
<ide> def check_for_outdated_homebrew
<ide> HOMEBREW_REPOSITORY.cd do
<ide> if File.directory? ".git"
<ide> local = `git rev-parse -q --verify refs/remotes/origin/master`.chomp
<del> remote = /^([a-f0-9]{40})/.match(`git ls-remote origin refs/heads/master`)[0]
... | 1 |
Go | Go | change testgraphdriver signature to fix linting | dac5710b689fc6e0614c6b20a11017ad30e907f8 | <ide><path>integration/plugin/graphdriver/external_test.go
<ide> func testExternalGraphDriver(ext string, ec map[string]*graphEventsCounter) func
<ide>
<ide> ctx := context.Background()
<ide>
<del> testGraphDriver(t, c, ctx, driverName, func(t *testing.T) {
<add> testGraphDriver(ctx, t, c, driverName, func(t *... | 1 |
Text | Text | fix comment about http2.createsecureserver | 4218afce9aabb2a4df9b6156bfb839b030190ba1 | <ide><path>doc/api/http2.md
<ide> const options = {
<ide> cert: fs.readFileSync('server-cert.pem')
<ide> };
<ide>
<del>// Create a plain-text HTTP/2 server
<add>// Create a secure HTTP/2 server
<ide> const server = http2.createSecureServer(options);
<ide>
<ide> server.on('stream', (stream, headers) => { | 1 |
Ruby | Ruby | improve gnu url check | f4c301a82765a740f0d880504f549abdbce64929 | <ide><path>Library/Homebrew/cmd/audit.rb
<ide> def audit_formula_urls f
<ide>
<ide> # Check GNU urls
<ide> urls.each do |p|
<del> if p =~ %r[ftp\.gnu\.org]
<del> problems << " * ftpmirror.gnu.org is preferred for GNU software."
<add> if p =~ %r[^(https?|ftp)://(.+)/gnu/]
<add> problems << " * \"ftp... | 1 |
Ruby | Ruby | remove doubled period | 6e78fdbef06e0fc7135dac5bc71cdcb4b81911c6 | <ide><path>railties/lib/rails/plugin.rb
<ide> def load_tasks
<ide> extra_tasks = Dir["#{root}/{tasks,rails/tasks}/**/*.rake"]
<ide>
<ide> unless extra_tasks.empty?
<del> ActiveSupport::Deprecation.warn "Rake tasks in #{extra_tasks.to_sentence} are deprecated. Use lib/tasks instead."
<add> Act... | 1 |
Javascript | Javascript | increase timeout for configtestcases | 378f31b4f96b9db85202167265a71d90eb85439c | <ide><path>test/ConfigTestCases.test.js
<ide> describe("ConfigTestCases", () => {
<ide> const casesPath = path.join(__dirname, "configCases");
<ide> let categories = fs.readdirSync(casesPath);
<ide>
<del> jest.setTimeout(10000);
<add> jest.setTimeout(20000);
<ide>
<ide> categories = categories.map(cat => {
<ide> ... | 1 |
Ruby | Ruby | parallelize activesupport test suite | 5ff5e5f63863949f2c59ae5ab02b6499031903b2 | <ide><path>activesupport/test/abstract_unit.rb
<ide> I18n.enforce_available_locales = false
<ide>
<ide> class ActiveSupport::TestCase
<add> parallelize
<add>
<ide> include ActiveSupport::Testing::MethodCallAssertions
<ide>
<ide> private | 1 |
Mixed | Ruby | adjust docs and more internal code for python 3 | 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c | <ide><path>Library/Homebrew/compat/dependency_collector.rb
<ide> def parse_symbol_spec(spec, tags)
<ide> output_deprecation(spec, "open-mpi")
<ide> Dependency.new("open-mpi", tags)
<ide> when :python, :python2
<add> output_deprecation(spec, "python@2")
<add> Dependency.new("python@2"... | 11 |
Javascript | Javascript | add @nolint to fb bundle headers | 8d7535e540c036a40754acb53d51f1fdcc8dc6d8 | <ide><path>scripts/rollup/wrappers.js
<ide> ${source}`;
<ide> ${license}
<ide> *
<ide> * @noflow
<add> * @nolint
<ide> * @preventMunge
<ide> * @preserve-invariant-messages
<ide> */
<ide> ${source}
<ide> ${license}
<ide> *
<ide> * @noflow
<add> * @nolint
<ide> * @preventMunge
<ide> * @preserve-invariant-message... | 1 |
Ruby | Ruby | show real path to x11 in --config output | f74e616724c51001d832bb19f7acdc7f5349d8f6 | <ide><path>Library/Homebrew/cmd/--config.rb
<ide> def sha
<ide> if sha.empty? then "(none)" else sha end
<ide> end
<ide>
<add> def describe_x11
<add> return "N/A" unless x11_installed?
<add> return case x11_path = Pathname.new("/usr/x11").realpath.to_s
<add> when "/usr/x11" then "/usr/x11"
<add> els... | 1 |
Text | Text | add 1password for teams | 5b1372e7587e5b1ea34301111d05685d773de728 | <ide><path>README.md
<ide> Our bottles (binary packages) are hosted by Bintray.
<ide>
<ide> [](https://bintray.com/homebrew)
<ide>
<add>Secure password storage and syncing provided by [1Password for Teams](https://1password.com/teams/... | 1 |
Python | Python | drop references to `is_single_tower` | b860839fe9bc6304d8c5412e2ae1128c02bcf4a2 | <ide><path>official/utils/misc/distribution_utils_test.py
<ide> class GetDistributionStrategyTest(tf.test.TestCase):
<ide> """Tests for get_distribution_strategy."""
<ide> def test_one_device_strategy_cpu(self):
<ide> ds = distribution_utils.get_distribution_strategy(0)
<del> self.assertTrue(ds.is_single_tow... | 1 |
Ruby | Ruby | handle the case `du` returns empty string | fd7f3b949659cedef62ac58258c652bea58ef1a7 | <ide><path>Library/Homebrew/extend/pathname.rb
<ide> def abv
<ide> out = ""
<ide> n = Utils.popen_read("find", expand_path.to_s, "-type", "f", "!", "-name", ".DS_Store").split("\n").size
<ide> out << "#{n} files, " if n > 1
<del> out << Utils.popen_read("/usr/bin/du", "-hs", expand_path.to_s).split("\t")... | 1 |
Javascript | Javascript | add long stacktrace debugging facility | 1f76a2eddc3561ff2c434d491e0d2b893c374cfd | <ide><path>lib/fs.js
<ide> var O_WRONLY = constants.O_WRONLY || 0;
<ide>
<ide> var isWindows = process.platform === 'win32';
<ide>
<del>function rethrow(err) {
<del> if (err) throw err;
<add>var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
<add>
<add>function rethrow() {
<add> // Only enable... | 3 |
Javascript | Javascript | improve work-around for importscripts bug | 097e273ca444804c0c3efd66d05096e14521eee8 | <ide><path>src/display/api.js
<ide> var PDFWorker = (function PDFWorkerClosure() {
<ide> // https://bugzilla.mozilla.org/show_bug.cgi?id=683280
<ide> var worker = new Worker(workerSrc);
<ide> var messageHandler = new MessageHandler('main', 'worker', worker);
<del>//#if !PRODUCTION
<del> ... | 2 |
Text | Text | fix code url & minor issues | 38eab96ecbb16c2ecf8c1bbb4d61459eb2502a7e | <ide><path>guide/english/algorithms/search-algorithms/jump-search/index.md
<ide> title: Jump Search
<ide> ---
<ide>
<ide> ## Jump Search
<add>
<ide> A jump search locates an item in a sorted array by jumping k items in the array and then verifies if the item wanted is between the previous jump and current jump.
<ide> ... | 1 |
Text | Text | update example path | 2e8bb9e41fccbbf00d3eae080c76e9631333af96 | <ide><path>docs/build-instructions/os-x.md
<ide> ```
<ide>
<ide> ### `script/build` Options
<del> * `--install-dir` - The full path to the final built application (must include `.app` in the path), e.g. `script/build --install-dir full/path/to/Atom.app`
<add> * `--install-dir` - The full path to the final built ap... | 1 |
Python | Python | add kubeletversion assignment to _to_node() | 8580a95ead328a77db60b88349a49ba95e69f29c | <ide><path>libcloud/container/drivers/kubernetes.py
<ide> def _to_node(self, data):
<ide> )
<ide> extra = {"memory": memory, "cpu": cpu}
<ide> extra["os"] = data["status"]["nodeInfo"]["operatingSystem"]
<add> extra["kubeletVersion"] = data["status"]["nodeInfo"]["kubeletVersion"]
<ide> ... | 1 |
Javascript | Javascript | add async chunk to test case | 295f751e93e53a18216937e5d660e3b44f55c711 | <ide><path>test/configCases/output/inner-dirs-entries/inner-dir/b.js
<ide> import dummy from "dummy_module";
<ide>
<del>it("should load", done => {
<add>it("should load", () => {
<ide> expect(dummy()).toBe("this is just a dummy function");
<del> done();
<add> return import("./some-module").then(importedModule => {
<a... | 2 |
Python | Python | convert cudnn weights in nested model. | aac81c29a762fdaef6718bbc4883f208283aac9c | <ide><path>keras/engine/saving.py
<ide> def load_attributes_from_hdf5_group(group, name):
<ide> chunk_id = 0
<ide> while ('%s%d' % (name, chunk_id)) in group.attrs:
<ide> data.extend([n.decode('utf8')
<del> for n in group.attrs['%s%d' % (name, chunk_id)]])
<add> ... | 4 |
Javascript | Javascript | support optional headers with wrk | f8e75512951b5060409b0c80e246ffc81ee9e72e | <ide><path>benchmark/_http-benchmarkers.js
<ide> class WrkBenchmarker {
<ide> '-t', 8,
<ide> `http://127.0.0.1:${options.port}${options.path}`,
<ide> ];
<add> for (const field in options.headers) {
<add> args.push('-H', `${field}: ${options.headers[field]}`);
<add> }
<ide> const child = c... | 1 |
Ruby | Ruby | use #remove_possible_method instead here | 9be7911e873e1ba0d0b0bac197b426693b4f3885 | <ide><path>actionpack/lib/action_dispatch/routing/route_set.rb
<ide> require 'active_support/core_ext/object/blank'
<ide> require 'active_support/core_ext/object/to_query'
<ide> require 'active_support/core_ext/hash/slice'
<add>require 'active_support/core_ext/module/remove_method'
<ide>
<ide> module ActionDispatch
<i... | 1 |
Ruby | Ruby | remove new method and reset without todo | 7a95219d2b60253103f04424e743501e35fe18cb | <ide><path>Library/Homebrew/formula_cellar_checks.rb
<ide> def check_cpuid_instruction(formula)
<ide> dot_brew_formula = formula.prefix/".brew/#{formula.name}.rb"
<ide> return unless dot_brew_formula.exist?
<ide>
<del> require "utils/ast"
<del> return unless Utils::AST::FormulaAST.new(dot_brew_formula.re... | 2 |
Javascript | Javascript | log it all | 027b433953a6e5234b7236758a3bc75575dc8092 | <ide><path>spec/integration/helpers/start-atom.js
<ide> module.exports = function(args, env, fn) {
<ide> errorCode = code
<ide> }
<ide> })
<del> chromedriver.stderr.on('data', log => chromedriverLogs.push(log.toString()))
<add> chromedriver.stdout.on('data', log => console.log(log.toSt... | 1 |
PHP | PHP | add check for simple category elements | 3a8c49e31999f69dc184cd020f4f7879d71c495b | <ide><path>lib/Cake/Test/Case/View/Helper/RssHelperTest.php
<ide> public function testItem() {
<ide> '/item'
<ide> );
<ide> $this->assertTags($result, $expected);
<add>
<add> $item = array(
<add> 'title' => 'My title',
<add> 'description' => 'My description',
<add> 'link' => 'http://www.google.com/',
<add... | 2 |
Mixed | Python | add fp16 support to official resnet. | fbb27cf31f09c3b4b10c1e237fd283f06db301d2 | <ide><path>official/resnet/README.md
<ide> You can download 190 MB pre-trained versions of ResNet-50 achieving 76.3% and 75
<ide>
<ide> Other versions and formats:
<ide>
<del>* [ResNet-v2-ImageNet Checkpoint](http://download.tensorflow.org/models/official/resnetv2_imagenet_checkpoint.tar.gz)
<del>* [ResNet-v2-ImageNe... | 9 |
PHP | PHP | add support for amazon elasticache | c7dacb05e70fe14472663535e5734872a795daa4 | <ide><path>lib/Cake/Cache/Engine/MemcachedEngine.php
<ide> protected function _setOptions() {
<ide> $this->_Memcached->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_IGBINARY);
<ide> }
<ide>
<add> // Check for Amazon ElastiCache instance
<add> if (defined('Memcached::OPT_CLIENT_MODE') && defined('Me... | 1 |
Javascript | Javascript | fix typeof comparison | f34e88a18db506bf425ace5dfcc3aa32d449fe6f | <ide><path>test/parallel/test-assert-calltracker-report.js
<ide> callsfoo();
<ide>
<ide> // Ensures that foo was removed from the callChecks array after being called the
<ide> // expected number of times.
<del>if (typeof tracker.report()[0] === undefined) {
<add>if (typeof tracker.report()[0] === 'undefined') {
<ide> ... | 1 |
Go | Go | adopt text/template in node inspect | 5dbd6afb5144a937df73bfe42364e583e789d80d | <ide><path>cli/command/formatter/node.go
<ide> package formatter
<ide>
<ide> import (
<add> "fmt"
<add> "strings"
<add>
<ide> "github.com/docker/docker/api/types"
<ide> "github.com/docker/docker/api/types/swarm"
<ide> "github.com/docker/docker/cli/command"
<add> "github.com/docker/docker/cli/command/inspect"
<add> ... | 2 |
Mixed | Javascript | use code markup/markdown in headers | 57f75376cc5b55b434b0c4c294307494c667dee2 | <ide><path>doc/api/errors.md
<ide> Throwing an error inside the callback **can crash the Node.js process** in most
<ide> cases. If [domains][] are enabled, or a handler has been registered with
<ide> `process.on('uncaughtException')`, such errors can be intercepted.
<ide>
<del>## Class: Error
<add>## Class: `Error`
<i... | 2 |
Text | Text | fix firefox bug | fff3d5dfb44b0fd326c65266d32a4ae7b1dc375d | <ide><path>docs/QuickStart-GettingStarted.md
<ide> function display(type, value) {
<ide> var container = document.getElementsByTagName('block')[0].parentNode;
<ide> container.className = 'display-' + type + '-' + value + ' ' +
<ide> container.className.replace(RegExp('display-' + type + '-[a-z]+ ?'), '');
<del>... | 1 |
Python | Python | replace `assert` with `valueerror` | 04cddaf402591e9f5bdb5f116a111d829a0ce4f4 | <ide><path>src/transformers/models/bert_generation/modeling_bert_generation.py
<ide> def load_tf_weights_in_bert_generation(
<ide> else:
<ide> model_pointer = model_pointer.weight
<ide>
<del> try:
<del> assert (
<del> model_pointer.shape == array... | 1 |
PHP | PHP | fix code to not be a breaking chage | 30c4e946033db1df58b2f11d4d8f6885a356c3b8 | <ide><path>src/Illuminate/Database/Query/Builder.php
<ide> protected function restoreFieldsForCount()
<ide> */
<ide> public function exists()
<ide> {
<del> return $this->limit(1)->count() > 0;
<add> $limit = $this->limit;
<add>
<add> $result = $this->limit(1)->count() > 0;
<add>
<add> $this->limit($limit);
<add... | 1 |
Javascript | Javascript | pass systrace and refresh as globals | 306edff62c5af8997a9760c2b7b7f600ced5510e | <ide><path>Libraries/Core/setUpReactRefresh.js
<ide> if (__DEV__) {
<ide> },
<ide> };
<ide>
<del> (require: any).Refresh = Refresh;
<add> // The metro require polyfill can not have dependencies (applies for all polyfills).
<add> // Expose `Refresh` by assigning it to global to make it available in the polyfil... | 2 |
Ruby | Ruby | fix odebug calls | a6643b4adf13f7bb5b7ba7f771241a471189d946 | <ide><path>Library/Homebrew/cask/audit.rb
<ide> def run!
<ide> check_bitbucket_repository
<ide> self
<ide> rescue => e
<del> odebug "#{e.message}\n#{e.backtrace.join("\n")}"
<add> odebug e, e.backtrace
<ide> add_error "exception while auditing #{cask}: #{e.message}"
<ide> self
<ide... | 2 |
Javascript | Javascript | use default value for undefined props | 58b3ae3136e959350ece18a753392ab23ab177b6 | <ide><path>src/core/ReactCompositeComponent.js
<ide> var ReactCompositeComponentMixin = {
<ide> var propName;
<ide> var defaultProps = this._defaultProps;
<ide> for (propName in defaultProps) {
<del> if (!(propName in props)) {
<add> if (typeof props[propName] === 'undefined') {
<ide> prop... | 2 |
Ruby | Ruby | remove ancient todos [ci skip] | 85261a5e96ca4b7a03899faf8e04a3e0cb5567e2 | <ide><path>actionpack/test/controller/output_escaping_test.rb
<ide> class OutputEscapingTest < ActiveSupport::TestCase
<ide> end
<ide>
<ide> test "escapeHTML shouldn't touch explicitly safe strings" do
<del> # TODO this seems easier to compose and reason about, but
<del> # this should be verified
<ide> a... | 3 |
Python | Python | patch albert with heads in tensorflow | 1abd53b1aa2f15953bbbbbfefda885d1d9c9d94b | <ide><path>src/transformers/modeling_tf_albert.py
<ide> logger = logging.getLogger(__name__)
<ide>
<ide> TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_MAP = {
<del> "albert-base-v1": "https://s3.amazonaws.com/models.huggingface.co/bert/albert-base-v1-tf_model.h5",
<del> "albert-large-v1": "https://s3.amazonaws.com/models.h... | 1 |
PHP | PHP | fix condition for skipping 32 bit systems | 2b931983c225a8305f046f526b308b879673f3dd | <ide><path>tests/TestCase/Database/TypeTest.php
<ide> public function testIntegerToStatement() {
<ide> */
<ide> public function testBigintegerToPHP() {
<ide> $this->skipIf(
<del> isset($_SERVER['PROCESSOR_ARCHITECTURE']) && $_SERVER['PROCESSOR_ARCHITECTURE'] === 'x86',
<add> PHP_INT_SIZE === 4,
<ide> 'This t... | 1 |
Javascript | Javascript | set _csrf to be httponly | 3361419e87947327f2de886eb1d0cd49a1f42510 | <ide><path>api-server/src/server/middlewares/csurf.js
<ide> export const csrfOptions = {
<ide>
<ide> export default function getCsurf() {
<ide> const protection = csurf({
<del> cookie: csrfOptions
<add> cookie: { ...csrfOptions, httpOnly: true }
<ide> });
<ide> return function csrf(req, res, next) {
<ide> ... | 2 |
Python | Python | add t5 to pipeline(task='summarization') | 9c683ef01e19c4dc1216dcd1ae3c8e7c44d7b2b9 | <ide><path>src/transformers/configuration_utils.py
<ide> def to_json_file(self, json_file_path):
<ide> """
<ide> with open(json_file_path, "w", encoding="utf-8") as writer:
<ide> writer.write(self.to_json_string())
<add>
<add> def update(self, config_dict: Dict):
<add> """
<add> ... | 4 |
Mixed | Go | remove multiple interface in an endpoint | a5bd12b9631607e5701665c43df12ff94aa0eadf | <ide><path>libnetwork/cmd/ovrouter/ovrouter.go
<ide> type endpoint struct {
<ide> addr net.IPNet
<ide> mac net.HardwareAddr
<ide> name string
<del> id int
<ide> }
<ide>
<ide> func (r *router) RegisterDriver(name string, driver driverapi.Driver, c driverapi.Capability) error {
<ide> r.d = driver
<ide> return ni... | 20 |
Javascript | Javascript | fix weird test issue | 56b18081e079453454d537820e8033b92ab04bb2 | <ide><path>src/test/moment/locale.js
<ide> test('return locale name', function (assert) {
<ide> var registered = moment.locale('return-this', {});
<ide>
<ide> assert.equal(registered, 'return-this', 'returns the locale configured');
<del> moment.locale('return-this', null);
<add> moment.defineLocale('ret... | 2 |
Text | Text | add content into activity section | 77d7a725be94c6ced155c2a3248680f22cda0cee | <ide><path>guide/english/android-development/core-components/index.md
<ide> An _activity_ is a component that has a user interface and represents a single s
<ide>
<ide> An activity facilitates the following key interactions between system and app:
<ide> - Keeping track of what the user currently cares about (what is o... | 1 |
Python | Python | enhance rewrite state_dict missing _metadata | bec02ff209d20d4bca974dab99a8c4e11f5fa737 | <ide><path>src/transformers/modeling_utils.py
<ide> def save_pretrained(
<ide> # Handle the case where some state_dict keys shouldn't be saved
<ide> if self._keys_to_ignore_on_save is not None:
<ide> for ignore_key in self._keys_to_ignore_on_save:
<del> del state_dict[ignore_k... | 1 |
Javascript | Javascript | improve format performance | 9752fce34d50400f8f4b5cbafbce2161b6e07a45 | <ide><path>lib/util.js
<ide> function format(...args) {
<ide> return formatWithOptions(emptyOptions, ...args);
<ide> }
<ide>
<del>function formatValue(val, inspectOptions) {
<del> const inspectTypes = ['object', 'symbol', 'function', 'number'];
<del>
<del> if (inspectTypes.includes(typeof val)) {
<del> return i... | 1 |
Javascript | Javascript | fix worker resolution on using minified version | 010d38a8c0f6fad7f0b5e6955e5371a8121be87c | <ide><path>src/display/api.js
<ide> var PDFWorker = (function PDFWorkerClosure() {
<ide> if (typeof PDFJSDev !== 'undefined' &&
<ide> PDFJSDev.test('PRODUCTION && !(MOZCENTRAL || FIREFOX)') &&
<ide> pdfjsFilePath) {
<del> return pdfjsFilePath.replace(/\.js$/i, '.worker.js');
<add> return p... | 1 |
Go | Go | move container to its own package | 6bb0d1816acd8d4f7a542a6aac047da2b874f476 | <ide><path>builder/builder.go
<ide> import (
<ide> "os"
<ide>
<ide> // TODO: remove dependency on daemon
<add> "github.com/docker/docker/container"
<ide> "github.com/docker/docker/daemon"
<ide> "github.com/docker/docker/image"
<ide> "github.com/docker/docker/runconfig"
<ide> type Docker interface {
<ide> // Pull... | 60 |
Java | Java | add decorators for clienthttprequest & response | 71b021c7cca87a6ca1d71532961dd082cf50c66a | <ide><path>spring-web/src/main/java/org/springframework/http/client/reactive/ClientHttpRequestDecorator.java
<add>/*
<add> * Copyright 2002-2017 the original author or authors.
<add> *
<add> * Licensed under the Apache License, Version 2.0 (the "License");
<add> * you may not use this file except in compliance with the... | 3 |
Ruby | Ruby | remove to_s method | 4da2f24b0ee819475daae14a839d953777767e8c | <ide><path>Library/Homebrew/brew.rb
<ide> end
<ide>
<ide> def require?(path)
<add> path ||= ""
<ide> require path
<ide> rescue LoadError => e
<ide> # we should raise on syntax errors but not if the file doesn't exist.
<ide><path>Library/Homebrew/cask/lib/hbc/cli.rb
<ide> def self.run_command(command, *rest)
<ide>... | 2 |
Ruby | Ruby | optimize parts of hashwithindifferentaccess | 94617d7da1e76daeae3a05c61b42321163f93d62 | <ide><path>activesupport/lib/active_support/hash_with_indifferent_access.rb
<ide> def extractable_options?
<ide> true
<ide> end
<ide>
<add> def with_indifferent_access
<add> self
<add> end
<add>
<ide> def initialize(constructor = {})
<ide> if constructor.is_a?(Hash)
<ide> super()... | 2 |
PHP | PHP | remove repeated conditions | a45d462688c3a3a44f449a79729ad74de7e6418f | <ide><path>lib/Cake/Database/Schema/MysqlSchema.php
<ide> public function convertIndexDescription(Table $table, $row) {
<ide> if (!empty($row['Sub_part'])) {
<ide> $length[$row['Column_name']] = $row['Sub_part'];
<ide> }
<del> if ($type == 'index' || $type == 'fulltext') {
<add> $isIndex = (
<add> $type == '... | 1 |
Ruby | Ruby | change time#sec_fraction to use subsec | 88d844b278163f19e910fc1acadf1dbb4afac527 | <ide><path>activesupport/lib/active_support/core_ext/time/calculations.rb
<ide> def seconds_until_end_of_day
<ide>
<ide> # Returns the fraction of a second as a +Rational+
<ide> #
<del> # Time.new(2012, 8, 29, 0, 0, 0.5).sec_fraction # => (1/2)
<add> # Time.new(2012, 8, 29, 0, 0, 0.5).sec_fraction # => (1/2... | 2 |
Ruby | Ruby | use start_with? instead of regexp match | de208141628daf6cb93839572721a8810079df58 | <ide><path>Library/Homebrew/keg_fix_install_names.rb
<ide> def fix_install_names options={}
<ide>
<ide> each_install_name_for(file) do |bad_name|
<ide> # Don't fix absolute paths unless they are rooted in the build directory
<del> next if bad_name.start_with? '/' and not %r[^#{HOMEBREW_TEMP}... | 1 |
PHP | PHP | fix cookies sending by responseemitter | 4efbfcda4c16f939460bc2bcf9d19e033f810454 | <ide><path>src/Http/ResponseEmitter.php
<ide> protected function emitStatusLine(ResponseInterface $response)
<ide> */
<ide> protected function emitHeaders(ResponseInterface $response)
<ide> {
<add> $cookies = [];
<add> if (method_exists($response, 'cookie')) {
<add> $cookies = $res... | 1 |
Python | Python | add top script to generate binaries from scratch | d23e5e4cde838c1aa46b0e085955cdb959e6755a | <ide><path>tools/win32build/doall.py
<add>import subprocess
<add>import os
<add>
<add>PYVER = "2.5"
<add>
<add># Bootstrap
<add>subprocess.check_call(['python', 'prepare_bootstrap.py'])
<add>
<add># Build binaries
<add>subprocess.check_call(['python', 'build.py', '-p', PYVER], cwd = 'bootstrap-%s' % PYVER)
<add>
<add>#... | 1 |
PHP | PHP | use implicit null instead of explicit | c4da7b11df210e79c3156fff648768e5bac79825 | <ide><path>src/Illuminate/Cookie/CookieJar.php
<ide> class CookieJar implements JarContract
<ide> *
<ide> * @var string
<ide> */
<del> protected $domain = null;
<add> protected $domain;
<ide>
<ide> /**
<ide> * The default secure setting (defaults to false).
<ide><path>src/Illuminate/Found... | 10 |
Javascript | Javascript | print more lines in the error diff | 81496567e76006a7d07a8552215fc6333c183480 | <ide><path>lib/internal/assert/assertion_error.js
<ide> function createErrDiff(actual, expected, operator) {
<ide> let a = actualLines[actualLines.length - 1];
<ide> let b = expectedLines[expectedLines.length - 1];
<ide> while (a === b) {
<del> if (i++ < 2) {
<add> if (i++ < 3) {
<ide> end = `\n ${a}... | 4 |
Javascript | Javascript | fix url validator example | 9272a1a47279bfe5946dc3f23730d5e3b6259552 | <ide><path>src/validators.js
<ide> extend(angularValidator, {
<ide> * @example
<ide> <doc:example>
<ide> <doc:source>
<del> Enter valid phone number:
<add> Enter valid URL:
<ide> <input name="text" value="http://example.com/abc.html" size="40" ng:validate="url" >
<ide> </doc:sou... | 1 |
Text | Text | update faq entry about intermediate output display | 6dfa8b1d60f53f3d39e8286a5e3d6ba21dcbbb02 | <ide><path>docs/templates/getting-started/faq.md
<ide> - [How can I run Keras on GPU?](#how-can-i-run-keras-on-gpu)
<ide> - [How can I save a Keras model?](#how-can-i-save-a-keras-model)
<ide> - [Why is the training loss much higher than the testing loss?](#why-is-the-training-loss-much-higher-than-the-testing-loss)
<d... | 1 |
Ruby | Ruby | add test case for clear mappings | fccb7523008daca92eaec0100742b0a023ce5cbb | <ide><path>activerecord/test/cases/connection_adapters/type/type_map_test.rb
<ide> def test_lookup_non_strings
<ide> assert_equal mapping.lookup(3), 'string'
<ide> assert_kind_of Type::Value, mapping.lookup(4)
<ide> end
<add>
<add> def test_clear_mappings
<add> time = Time.ne... | 1 |
Python | Python | add test for build error special values | e50767cfca081681f527c54d3f6652d11e95e758 | <ide><path>tests/test_basic.py
<ide> def handler_raises_build_error(error, endpoint, values):
<ide> pytest.raises(BuildError, flask.url_for, 'not.existing')
<ide>
<ide>
<add>def test_url_for_passes_special_values_to_build_error_handler():
<add> app = flask.Flask(__name__)
<add>
<add> @app.url_build_erro... | 1 |
Python | Python | fix linting errors | 3af989a361f58c4cb0e3d2d4035ef6b246de335d | <ide><path>libcloud/common/aws.py
<ide> def add_default_params(self, params):
<ide> def pre_connect_hook(self, params, headers):
<ide> now = datetime.utcnow()
<ide> headers['X-AMZ-Date'] = now.strftime('%Y%m%dT%H%M%SZ')
<del> headers['Authorization'] = self._get_authorization_v4_header(params... | 2 |
Text | Text | add eljefedelrodeodeljefe to collaborators | be5d699055e23a11f20c625bc1f8d96cd387bb7a | <ide><path>README.md
<ide> information about the governance of the Node.js project, see
<ide> * [calvinmetcalf](https://github.com/calvinmetcalf) - **Calvin Metcalf** <calvin.metcalf@gmail.com>
<ide> * [claudiorodriguez](https://github.com/claudiorodriguez) - **Claudio Rodriguez** <cjrodr@yahoo.com>
<ide> *... | 1 |
Text | Text | add a link to front-end integrations | 51762aece5a08f8961989c367a87be2ff2a52174 | <ide><path>docs/index.md
<ide>
<ide> You can get the latest version of Chart.js from [npm](https://npmjs.com/package/chart.js), the [GitHub releases](https://github.com/chartjs/Chart.js/releases/latest), or use a [Chart.js CDN](https://www.jsdelivr.com/package/npm/chart.js). Detailed installation instructions can be f... | 1 |
Javascript | Javascript | add moveacross test for pointer events | 93b51b5f868e3b18c448422eccbd1bab4ca4889e | <ide><path>packages/rn-tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestEventRecorder.js
<add>/**
<add> * Copyright (c) Meta Platforms, Inc. and affiliates.
<add> *
<add> * This source code is licensed under the MIT license found in the
<add> * LICENSE file in the root directory of this source tree.
<ad... | 3 |
Python | Python | prevent crash in poly1d.__eq__ | 18b7cd9df7a4d960550b18faa14d5473e7d5c3d9 | <ide><path>numpy/lib/polynomial.py
<ide> def __rdiv__(self, other):
<ide> __rtruediv__ = __rdiv__
<ide>
<ide> def __eq__(self, other):
<add> if not isinstance(other, poly1d):
<add> return NotImplemented
<ide> if self.coeffs.shape != other.coeffs.shape:
<ide> return False
<... | 2 |
PHP | PHP | remove redundant case | 8276ecde5ea5439bc5f5ef2c295da921b4001e11 | <ide><path>src/ORM/Association/BelongsToMany.php
<ide> protected function _diffLinks(
<ide> foreach ($unmatchedEntityKeys as $i => $unmatchedKeys) {
<ide> $matched = false;
<ide> foreach ($keys as $key) {
<del> if (!array_key_exists($key, $unmatchedKeys) ||... | 2 |
Javascript | Javascript | replace operator = with === | 7811eadac7e0be7a4a1c8e08f464de639ba44503 | <ide><path>src/ng/filter/orderBy.js
<ide> * Can be one of:
<ide> *
<ide> * - `function`: Getter function. The result of this function will be sorted using the
<del> * `<`, `=`, `>` operator.
<add> * `<`, `===`, `>` operator.
<ide> * - `string`: An Angular expression. The result of this expression... | 1 |
Ruby | Ruby | allow custom url in extract_plist strategy | 916c9806768b14a6229c9c9c6bee06f90fbcaab2 | <ide><path>Library/Homebrew/livecheck/strategy/extract_plist.rb
<ide> def self.versions_from_items(items, regex = nil, &block)
<ide> sig {
<ide> params(
<ide> cask: Cask::Cask,
<add> url: T.nilable(String),
<ide> regex: T.nilable(Regexp),
<ide> _... | 2 |
Javascript | Javascript | remove unused parameter | dc53b1e4fd91e79f7d18c223b4af49c69c81d182 | <ide><path>lib/FlagDependencyExportsPlugin.js
<ide> class FlagDependencyExportsPlugin {
<ide> depBlock.blocks.forEach(processDependenciesBlock);
<ide> }
<ide>
<del> function processDependency(dep, usedExports) {
<add> function processDependency(dep) {
<ide> const exportDesc = dep.getExports && dep.... | 1 |
PHP | PHP | add html as a new valid extension for views | 998d4b88f50e9ab655834a31f3af36e9f7bd301a | <ide><path>src/Illuminate/View/Factory.php
<ide> class Factory implements FactoryContract
<ide> 'blade.php' => 'blade',
<ide> 'php' => 'php',
<ide> 'css' => 'file',
<add> 'html' => 'file',
<ide> ];
<ide>
<ide> /**
<ide><path>src/Illuminate/View/FileViewFinder.php
<ide> class File... | 3 |
Python | Python | unbundle merge layer | bc92fb32c0d60b7dca189ef5bd54918438726204 | <ide><path>keras/engine/topology.py
<ide>
<ide> import numpy as np
<ide>
<del>import types as python_types
<ide> import warnings
<ide> import copy
<ide> import os
<ide> from .. import backend as K
<ide> from .. import initializers
<ide> from ..utils.io_utils import ask_to_proceed_with_overwrite
<del>from ..utils.gene... | 2 |
Javascript | Javascript | allow nginclude on css class | 428f2b563663315df4f235ca19cef4bdcf82e2ab | <ide><path>src/ng/directive/ngInclude.js
<ide> /**
<ide> * @ngdoc directive
<ide> * @name angular.module.ng.$compileProvider.directive.ng-include
<del> * @restrict EA
<add> * @restrict ECA
<ide> *
<ide> * @description
<ide> * Fetches, compiles and includes an external HTML fragment.
<ide> var ngIncludeDirective = ... | 1 |
Java | Java | change mediatypefactory to return optional | fd1db57e058c240d6e953940b9147d233c9d85fe | <ide><path>spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java
<ide> public int getEffectiveMinorVersion() {
<ide> @Override
<ide> public String getMimeType(String filePath) {
<ide> String extension = StringUtils.getFilenameExtension(filePath);
<del> MediaType result;
<ide> if (this.mi... | 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.