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 |
|---|---|---|---|---|---|
Javascript | Javascript | use more template literals | dd1592020b31d810caa276f11738343551d59b82 | <ide><path>tools/license2rtf.js
<ide> function RtfGenerator() {
<ide> if (li)
<ide> level++;
<ide>
<del> var rtf = '\\pard';
<del> rtf += '\\sa150\\sl300\\slmult1';
<add> var rtf = '\\pard\\sa150\\sl300\\slmult1';
<ide> if (level > 0)
<del> rtf += '\\li' + (level * 240);
<add> rtf += `... | 1 |
Python | Python | improve train cli with base model | 90c52128dc5f8131affa7710742e9081cdcaf476 | <ide><path>spacy/cli/train.py
<ide> raw_text=("Path to jsonl file with unlabelled text documents.", "option", "rt", Path),
<ide> base_model=("Name of model to update (optional)", "option", "b", str),
<ide> pipeline=("Comma-separated names of pipeline components", "option", "p", str),
<add> replace_compon... | 1 |
Javascript | Javascript | add sourcemaps | c03600ba3f93426075b575f5120b2c7a2a691f8b | <ide><path>rollup.config.js
<ide> export default {
<ide> dest: 'build/three.modules.js'
<ide> }
<ide> ],
<del> outro: outro
<add> outro: outro,
<add> sourceMap: true
<ide> }; | 1 |
Ruby | Ruby | ensure mktemp cleans up after itself | d89b3272f441ebdc71d0ffb0448dd1c364f1ca52 | <ide><path>Library/Homebrew/extend/fileutils.rb
<ide> def mktemp
<ide> # /tmp volume to the other volume. So we let the user override the tmp
<ide> # prefix if they need to.
<ide> tmp_prefix = ENV['HOMEBREW_TEMP'] || '/tmp'
<del> tmp=Pathname.new `/usr/bin/mktemp -d #{tmp_prefix}/homebrew-#{name}-#{versi... | 1 |
Javascript | Javascript | add "deprecated" to the testswarm module list | 1144e754a6a131bd4affec26fd85299e71bdab06 | <ide><path>Gruntfile.js
<ide> module.exports = function( grunt ) {
<ide> "css",
<ide> "data",
<ide> "deferred",
<add> "deprecated",
<ide> "dimensions",
<ide> "effects",
<ide> "event", | 1 |
Python | Python | add test to show it doesn't work as it used to | d979b922360fb64f35b4bf4d75e5c9ff69694911 | <ide><path>libcloud/test/test_response_classes.py
<ide> import requests
<ide> import requests_mock
<ide>
<del>from libcloud.common.base import XmlResponse, JsonResponse
<add>from libcloud.common.base import XmlResponse, JsonResponse, RawResponse, Connection
<ide> from libcloud.common.types import MalformedResponseErro... | 1 |
Go | Go | use status code from sockrequest (fix ) | 531433e7650c5d33ff6580d7de28a093a504ac6c | <ide><path>integration-cli/docker_api_containers_test.go
<ide> import (
<ide> "bytes"
<ide> "encoding/json"
<ide> "io"
<add> "net/http"
<ide> "os/exec"
<ide> "strings"
<ide> "testing"
<ide> func TestContainerApiStartVolumeBinds(t *testing.T) {
<ide> "Volumes": map[string]struct{}{"/tmp": {}},
<ide> }
<ide>
<d... | 2 |
Javascript | Javascript | add script for running v8 benchmarks | bd094103d791fdd53eccd15bbfd1875655ea4a01 | <ide><path>benchmark/v8_bench.js
<add>// compare with "google-chrome deps/v8/benchmarks/run.html"
<add>var fs = require('fs');
<add>var path = require('path');
<add>var vm = require('vm');
<add>
<add>var dir = path.join(__dirname, '..', 'deps', 'v8', 'benchmarks');
<add>
<add>global.print = console.log;
<add>
<add>glob... | 1 |
Ruby | Ruby | handle github api authentication failures | 6fd0125ad9e2fc4eab2639f57136d8b15cffd744 | <ide><path>Library/Homebrew/utils.rb
<ide> module GitHub extend self
<ide> Error = Class.new(StandardError)
<ide> RateLimitExceededError = Class.new(Error)
<ide> HTTPNotFoundError = Class.new(Error)
<add> AuthenticationFailedError = Class.new(Error)
<ide>
<ide> def open url, headers={}, &block
<ide> # Thi... | 1 |
Text | Text | remove deprecated copy from readme | 97a2dc96f23b25bc7980d2a4514b7065ff4edb9e | <ide><path>README.md
<ide> With Standard Containers we can put an end to that embarrassment, by
<ide> making INDUSTRIAL-GRADE DELIVERY of software a reality.
<ide>
<ide>
<del>
<del>
<del>Standard Container Specification
<del>--------------------------------
<del>
<del>(TODO)
<del>
<del>### Image format
<del>
<del>
<d... | 1 |
Ruby | Ruby | fix usage documentation in videoanalyzer | f70defa1ba8a344ea1f2198086aeda4253bf9842 | <ide><path>activestorage/lib/active_storage/analyzer/video_analyzer.rb
<ide> module ActiveStorage
<ide> #
<ide> # Example:
<ide> #
<del> # ActiveStorage::VideoAnalyzer.new(blob).metadata
<add> # ActiveStorage::Analyzer::VideoAnalyzer.new(blob).metadata
<ide> # # => { width: 640.0, height: 480.0, duratio... | 1 |
Python | Python | fix asset compilation via setup.py | c3763f3be5245af8f2c13d89db648e67bad8c680 | <ide><path>setup.py
<ide> def finalize_options(self) -> None:
<ide>
<ide> def run(self) -> None:
<ide> """Run a command to compile and build assets."""
<del> subprocess.check_call('./airflow/www/compile_assets.sh')
<add> www_dir = AIRFLOW_SOURCES_ROOT / "airflow" / "www"
<add> subproce... | 1 |
PHP | PHP | fix niceformat stattic access for real | c5ff3041be666d1c997d3c7c7d1b3e8a58c8c9a1 | <ide><path>Cake/Test/TestCase/Utility/TimeTest.php
<ide> public function testNice() {
<ide> $this->assertEquals(date('D', $time), $this->Time->nice($time, null, '%a'));
<ide> $this->assertEquals(date('M d, Y', $time), $this->Time->nice($time, null, '%b %d, %Y'));
<ide>
<del> $this->Time->niceFormat = '%Y-%d-%m';
... | 1 |
Java | Java | introduce test for gh-27390 | 5cc09849cedfc21a5922930d17bce7a61fccd238 | <ide><path>spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java
<ide> import static org.assertj.core.api.Assertions.assertThat;
<ide> import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
<ide> import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
<add>... | 1 |
PHP | PHP | remove unused method | 1e4a5f92f31c5deaf2d981a055adb35c004b8fb1 | <ide><path>src/I18n/PackageLocator.php
<ide> public function set(string $name, string $locale, $spec): void
<ide> $this->converted[$name][$locale] = $spec instanceof Package;
<ide> }
<ide>
<del> /**
<del> * Sets a Package object.
<del> *
<del> * @param string $name The package name.
<del> ... | 1 |
Ruby | Ruby | check byte size instead of length | 92b8cda4c9ba87c82d737fd4303f4bbc535395f3 | <ide><path>activesupport/lib/active_support/security_utils.rb
<ide> def fixed_length_secure_compare(a, b)
<ide> # the secret length. This should be considered when using secure_compare
<ide> # to compare weak, short secrets to user input.
<ide> def secure_compare(a, b)
<del> a.length == b.length && fix... | 2 |
Text | Text | add backticks to highlight comment.json file name | 24c41b6849e2652ad2e4d35a3fc1dd5bf0ac2664 | <ide><path>docs/docs/tutorial.md
<ide> var CommentBox = React.createClass({
<ide> `getInitialState()` executes exactly once during the lifecycle of the component and sets up the initial state of the component.
<ide>
<ide> #### Updating state
<del>When the component is first created, we want to GET some JSON from the s... | 1 |
Python | Python | add missing license | c231005fcbb67d275fdf20fea93d0103b18a1d62 | <ide><path>libcloud/dns/drivers/nsone.py
<add># Licensed to the Apache Software Foundation (ASF) under one or more
<add># contributor license agreements. See the NOTICE file distributed with
<add># this work for additional information regarding copyright ownership.
<add># The ASF licenses this file to You under the Ap... | 1 |
PHP | PHP | fix a method naming error | 778350e5d6a59c4670251ca6b6e0419f801368ba | <ide><path>src/Illuminate/Database/Migrations/Migrator.php
<ide> protected function runUp($file, $batch, $pretend)
<ide> return $this->pretendToRun($migration, 'up');
<ide> }
<ide>
<del> $this->migrate($migration, 'up');
<add> $this->runMigration($migration, 'up');
<ide>
<ide> ... | 1 |
Javascript | Javascript | fix symlink resolving for examples in the repo | c97c1e551654ff9dd5de50b9eec9d21a791ffe06 | <ide><path>local-cli/core/default.config.js
<ide>
<ide> const path = require('path');
<ide> const flatten = require('lodash').flatten;
<del>
<ide> const blacklist = require('../../packager/blacklist');
<del>
<ide> const android = require('./android');
<ide> const findAssets = require('./findAssets');
<ide> const ios =... | 1 |
Javascript | Javascript | add azimuthal equidistant projection mode | 1e017e60b67740b8d7602951abb0d096ed37a593 | <ide><path>d3.geo.js
<ide> var d3_radians = Math.PI / 180;
<ide> // TODO clip input coordinates on opposite hemisphere
<ide> d3.geo.azimuthal = function() {
<del> var mode = "orthographic", // or stereographic
<add> var mode = "orthographic", // or stereographic, gnomonic or equidistant
<ide> origin,
<ide> ... | 4 |
Text | Text | update readfilesync in fs.md | 2614d247fb3cb6ceb65350a49a927d68696f2e62 | <ide><path>doc/api/fs.md
<ide> fs.appendFile('message.txt', 'data to append', 'utf8', callback);
<ide>
<ide> Any specified file descriptor has to have been opened for appending.
<ide>
<del>_Note: If a file descriptor is specified as the `file`, it will not be closed
<del>automatically._
<add>*Note*: If a file descrip... | 1 |
Python | Python | fix typo in test | f9ff27790978d0f36cc55f2c601229b31a154aaa | <ide><path>libcloud/test/compute/test_openstack.py
<ide> def test_ex_create_router(self):
<ide> self.assertEqual(router.name, 'router1')
<ide>
<ide> def test_ex_delete_router(self):
<del> router = self.driver.ex_list_routers()[0]
<add> router = self.driver.ex_list_routers()[1]
<ide> s... | 1 |
PHP | PHP | use array_key_exists instead of isset() | a30f861f2c53b888f41fe9242138f0e1e3147466 | <ide><path>lib/Cake/Test/Case/Utility/HashTest.php
<ide> public function testContains() {
<ide> );
<ide> $this->assertTrue(Hash::contains($b, $a));
<ide> $this->assertFalse(Hash::contains($a, $b));
<add>
<add> $a = array(0 => 'test', 'string' => null);
<add> $this->assertTrue(Hash::contains($a, array('string' =... | 2 |
Python | Python | add changelog to pypi sidebar | a5f140bce9800221e8f68b9f5493e4ba4e4bc3b4 | <ide><path>setup.py
<ide> def run_tests(self):
<ide> ]
<ide> },
<ide> project_urls={
<del> "Documentation": "http://docs.celeryproject.org/en/latest/index.html",
<add> "Documentation": "https://docs.celeryproject.org/en/latest/index.html",
<add> "Changelog": "https://docs.celeryproj... | 1 |
Go | Go | use beam.router to simplify the 'stdio' command | 9206b18818db988621f60cbf869eb20acd1a49e9 | <ide><path>pkg/beam/examples/beamsh/beamsh.go
<ide> func GetHandler(name string) Handler {
<ide> defer stderr.Close()
<ide> var tasks sync.WaitGroup
<ide> defer tasks.Wait()
<del> for {
<del> payload, attachment, err := in.Receive()
<del> if err != nil {
<del> return
<del> }
<del> cmd := data... | 1 |
Ruby | Ruby | fix extension for compress | b30ab67ca68155586620f55d1ee562fbf4cffacf | <ide><path>Library/Homebrew/unpack_strategy/compress.rb
<ide> class Compress < Tar
<ide> using Magic
<ide>
<ide> def self.extensions
<del> [".compress"]
<add> [".Z"]
<ide> end
<ide>
<ide> def self.can_extract?(path) | 1 |
Ruby | Ruby | replace tabs with spaces | c83dd0d04b857161b47a43b54ba56c7296ac50c0 | <ide><path>Library/Homebrew/test/os/linux/dependency_collector_spec.rb
<ide>
<ide> context "when xz, zip, and bzip2 are not available" do
<ide> it "creates a resource dependency from a '.xz' URL" do
<del> resource.url("http://example.com/foo.xz")
<del> allow_any_instance_of(Object).to receive(:which).with("x... | 1 |
Ruby | Ruby | add doctor check for cpu arch on linux | 57109a175a5ca268025e6d39d39867ea05c910bc | <ide><path>Library/Homebrew/extend/os/linux/diagnostic.rb
<ide>
<ide> require "tempfile"
<ide> require "utils/shell"
<add>require "hardware"
<ide> require "os/linux/diagnostic"
<ide> require "os/linux/glibc"
<ide> require "os/linux/kernel"
<ide> def supported_configuration_checks
<ide> %w[
<ide> chec... | 2 |
PHP | PHP | add isnotempty() to the stringable class | 07a377af4c8eae4a72eeb8a29f16912e81300cf3 | <ide><path>src/Illuminate/Support/Stringable.php
<ide> public function isEmpty()
<ide> return empty($this->value);
<ide> }
<ide>
<add> /**
<add> * Determine if the given string is not empty.
<add> *
<add> * @return bool
<add> */
<add> public function isNotEmpty()
<add> {
<add> ... | 1 |
Javascript | Javascript | fix color parsing | 923de05ba85f1811abfe77cec6093b78a0622e9f | <ide><path>src/color.js
<ide> module.exports = class Color {
<ide> if (Array.isArray(value)) {
<ide> return null;
<ide> }
<del> value = value.toRGBAString();
<add> value = Object.values(value);
<ide> break;
<ide> default:
<ide> return null; | 1 |
Python | Python | fix failing test case and lint issue | a2b04ff591578ec04e2c34bf05ac5262bca0176e | <ide><path>libcloud/compute/drivers/auroracompute.py
<ide> 'AuroraComputeNodeDriver'
<ide> ]
<ide>
<add>
<ide> class AuroraComputeNodeDriver(CloudStackNodeDriver):
<ide> type = Provider.AURORACOMPUTE
<ide> name = 'PCextreme AuroraCompute'
<ide><path>libcloud/test/compute/test_auroracompute.py
<ide>
<ide> ... | 2 |
Javascript | Javascript | add check if face are not undefinded | 8a774733d986c4b9636ccef8fc1363fb0426a933 | <ide><path>examples/jsm/modifiers/SimplifyModifier.js
<ide> function collapse( vertices, faces, u, v ) { // u and v are pointers to vertices
<ide> // delete triangles on edge uv:
<ide> for ( let i = u.faces.length - 1; i >= 0; i -- ) {
<ide>
<del> if ( u.faces[ i ].hasVertex( v ) ) {
<add> if ( u.faces[ i ] && u.f... | 1 |
Javascript | Javascript | fix examples using __next_data__ | f8f308d6dd6c23476383b2e8d6f80484c194cf6f | <ide><path>examples/with-aphrodite/pages/_document.js
<del>import Document, { Head, Main, NextScript } from 'next/document'
<add>import Document, { Html, Head, Main, NextScript } from 'next/document'
<ide> import { StyleSheetServer } from 'aphrodite'
<ide>
<del>export default class MyDocument extends Document {
<add>c... | 6 |
Java | Java | clarify intent of unit test | 8926255abff6c75b843fb250d7da842f1719cc83 | <ide><path>rxjava-core/src/test/java/rx/operators/OperationTimeoutTest.java
<ide> public Observable<Integer> call() {
<ide> }
<ide>
<ide> @Test
<del> public void testTimeoutSelectorTimeoutFirst() {
<del> PublishSubject<Integer> source = PublishSubject.create();
<add> public void testTimeoutSelecto... | 1 |
Java | Java | rename backpressurestrategy.none to missing | 07d24c2ecc61eea94b6d646e02ddd9799b42de7c | <ide><path>src/main/java/io/reactivex/BackpressureStrategy.java
<ide> public enum BackpressureStrategy {
<ide> * Downstream has to deal with any overflow.
<ide> * <p>Useful when one applies one of the custom-parameter onBackpressureXXX operators.
<ide> */
<del> NONE,
<add> MISSING,
<ide> /**
<i... | 8 |
Ruby | Ruby | fix typo in migration test. closes [h-lame] | 6f0b0125d0f9044074fcb6f9b1528937a2bb4d2e | <ide><path>activerecord/test/cases/migration_test.rb
<ide> def test_rename_column_with_an_index
<ide> table.column :hat_name, :string, :limit => 100
<ide> table.column :hat_size, :integer
<ide> end
<del> Person.connection.add_index :people, :first_name
<add> Person.connection.add_index :... | 1 |
Javascript | Javascript | change throws to errors | 66e3441e0eccc2bea2d608fd02f1c4795f1c02f6 | <ide><path>src/canvas.js
<ide> var CanvasGraphics = (function CanvasGraphicsClosure() {
<ide> var fontObj = this.objs.get(fontRefName).fontObj;
<ide>
<ide> if (!fontObj) {
<del> throw 'Can\'t find font for ' + fontRefName;
<add> error('Can\'t find font for ' + fontRefName);
<ide> }
<ide... | 7 |
Javascript | Javascript | add types to template | e02a0c9ecdde1f06460253b551c5ffc90f6d59f4 | <ide><path>lib/Chunk.js
<ide> class Chunk {
<ide> return this._modules.has(module);
<ide> }
<ide>
<add> /**
<add> * @returns {Module[]} an array of all modules in this chunk
<add> */
<ide> getModules() {
<ide> return this._modules.getFromCache(getArray);
<ide> }
<ide><path>lib/HotUpdateChunk.js
<ide> const Ch... | 3 |
Javascript | Javascript | apply lint fixes | a49769c3c0b2436ffa620513e1dd481050c2a87b | <ide><path>client/src/client-only-routes/ShowCertification.js
<ide> class ShowCertification extends Component {
<ide> <div className='row signatures'>
<ide> <Image
<ide> alt="Quincy Larson's Signature"
<del> src='https://cdn.freecodecamp.org/platform/english/imag... | 1 |
Python | Python | replace tf.to_float, tf.to_int with tf.cast | 7b91ccb1f83aa0ea5a77f86c7273b0dc284c9e0e | <ide><path>official/nlp/transformer/utils/metrics.py
<ide> def padded_cross_entropy_loss(logits, labels, smoothing, vocab_size):
<ide> # Calculate smoothing cross entropy
<ide> with tf.name_scope("smoothing_cross_entropy", values=[logits, labels]):
<ide> confidence = 1.0 - smoothing
<del> low_confide... | 1 |
PHP | PHP | fix unsetproperty() not clearing property cache | 84eba53f35d22d2ac6678edbd2a2161a0a349a9b | <ide><path>src/Datasource/EntityTrait.php
<ide> public function unsetProperty($property)
<ide> foreach ($property as $p) {
<ide> unset($this->_properties[$p]);
<ide> unset($this->_dirty[$p]);
<add> unset($this->_mutated[$p]);
<ide> }
<ide>
<ide> return $this;
... | 2 |
Java | Java | apply property hints to factorybean if necessary | c9faff74917ae78b16cc76c1f56447004208fe9a | <ide><path>spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanDefinitionPropertiesCodeGenerator.java
<ide> import org.springframework.beans.ExtendedBeanInfoFactory;
<ide> import org.springframework.beans.MutablePropertyValues;
<ide> import org.springframework.beans.PropertyValue;
<add>import org.sprin... | 2 |
Text | Text | fix example usage | bddc20a66b2ef660983663b1b389d0e607111804 | <ide><path>guide/english/bash/bash-ls/index.md
<ide> title: Bash ls
<ide> ### Usage
<ide>
<ide> ```bash
<del>cat [options] [file_names]
<add>ls [options] [folder_path]
<ide> ```
<ide> You can list the items in any directory without even entering the directory. Consider you are in a directory with folders- Test1,Test2.... | 1 |
Javascript | Javascript | drop pronouns from err_worker_path message | c788964a75c7ccec63bce9d464e9c96eb6e17080 | <ide><path>lib/internal/errors.js
<ide> E('ERR_WORKER_PATH', (filename) =>
<ide> 'The worker script or module filename must be an absolute path or a ' +
<ide> 'relative path starting with \'./\' or \'../\'.' +
<ide> (filename.startsWith('file://') ?
<del> ' If you want to pass a file:// URL, you must wrap it a... | 2 |
Javascript | Javascript | remove usage of `targetobject` computed property | 7d1a8d5800db55664e16c5955ec14f9930181406 | <ide><path>packages/ember-glimmer/lib/syntax/curly-component.js
<ide> class CurlyComponentManager {
<ide>
<ide> props.renderer = parentView.renderer;
<ide> props[HAS_BLOCK] = hasBlock;
<add> // parentView.controller represents any parent components
<add> // dynamicScope.controller represents the outlet c... | 3 |
Go | Go | variablize file names | ba1f76cbfa2c137abfbc607725460e376e6f44d3 | <ide><path>graph/graph.go
<ide> type Graph struct {
<ide> retained *retainedLayers
<ide> }
<ide>
<add>// file names for ./graph/<ID>/
<add>const (
<add> jsonFileName = "json"
<add> layersizeFileName = "layersize"
<add> digestFileName = "checksum"
<add> tardataFileName = "tar-data.json.gz"
<add>)
<add>
<id... | 3 |
Python | Python | add default connection in airflow initdb | 5c1251f3a9ab40af6f9ff833ed5a9bb8c12ca7fc | <ide><path>airflow/utils.py
<ide> def initdb():
<ide> models.Connection(
<ide> conn_id='vertica_default', conn_type='vertica',
<ide> host='localhost', port=5433))
<add> merge_conn(
<add> models.Connection(
<add> conn_id='webhdfs_default', conn_type='hdfs',
<add> ... | 1 |
Text | Text | convert link to homebrew from http to https | e0022f23144fd1dc6db86a5d8c18af47bc14f0f3 | <ide><path>README.md
<ide> To build jQuery, you need to have the latest Node.js/npm and git 1.7 or later. E
<ide>
<ide> For Windows, you have to download and install [git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/en/download/).
<ide>
<del>OS X users should install [Homebrew](http://brew.sh/). O... | 1 |
Python | Python | use correct version in chart docs | 9c792eabb9ed48a7b468e9a76b3662f20ad846cb | <ide><path>docs/conf.py
<ide> PACKAGE_VERSION = 'devel'
<ide> elif PACKAGE_NAME == 'helm-chart':
<ide> PACKAGE_DIR = os.path.join(ROOT_DIR, 'chart')
<del> PACKAGE_VERSION = 'devel' # TODO do we care? probably
<add> CHART_YAML_FILE = os.path.join(PACKAGE_DIR, 'Chart.yaml')
<add>
<add> with open(CHART_Y... | 1 |
Ruby | Ruby | reinstate previous order of hashes | 704ec8abf0ba613bbf594254f3da0fc04ba200a2 | <ide><path>Library/Homebrew/livecheck/livecheck.rb
<ide> def run_checks(formulae_and_casks_to_check, args)
<ide>
<ide> is_newer_than_upstream = (formula&.stable? || cask) && (current > latest)
<ide>
<del> info = {
<del> version: {
<del> current: current.to_s,
<del> ... | 1 |
Ruby | Ruby | fix rubocop warnings | 71fd2bb4b0b30b03fbb7b19c53d008b1780006bb | <ide><path>Library/Homebrew/dev-cmd/man.rb
<ide> def regenerate_man_pages
<ide> end
<ide>
<ide> def path_glob_commands(glob)
<del> Pathname.glob(glob).
<del> sort_by { |source_file| sort_key_for_path(source_file) }.
<del> map { |source_file|
<del> source_file.read.lines.
<del> grep(/^#... | 1 |
Python | Python | remove special-casing of empty arrays in unique_1d | 2b417df83202df9ea67f1eec76985a3da20cb86c | <ide><path>numpy/lib/arraysetops.py
<ide> def _unique1d(ar, return_index=False, return_inverse=False,
<ide>
<ide> optional_indices = return_index or return_inverse
<ide>
<del> if ar.size == 0:
<del> ret = (ar,)
<del> if return_index:
<del> ret += (np.empty(0, np.intp),)
<del> if... | 1 |
Go | Go | handle dns querries of type mx | 6a4c8d0ac95714186bdca67cd277b9b655ee6b7f | <ide><path>libnetwork/resolver.go
<ide> func createRespMsg(query *dns.Msg) *dns.Msg {
<ide> return resp
<ide> }
<ide>
<add>func (r *resolver) handleMXQuery(name string, query *dns.Msg) (*dns.Msg, error) {
<add> addrv4, _ := r.backend.ResolveName(name, types.IPv4)
<add> addrv6, _ := r.backend.ResolveName(name, types.I... | 1 |
Ruby | Ruby | check input class | 68ebf8866ab14334aa6aab8d0672d804c632035d | <ide><path>Library/Homebrew/extend/os/linux/formula.rb
<ide> def shared_library(name, version = nil)
<ide>
<ide> undef allowed_missing_lib?
<ide> def allowed_missing_lib?(lib)
<add> raise TypeError "Library must be a string; got a #{lib.class} (#{lib})" unless lib.is_a? String
<add>
<ide> # lib: Full path... | 1 |
Python | Python | set bleu_min/max to match acceptable range | c5943a0a34483668be3641e240eba010b75307a6 | <ide><path>official/transformer/v2/transformer_benchmark.py
<ide> def benchmark_8_gpu(self):
<ide> FLAGS.model_dir = self._get_model_dir('benchmark_8_gpu')
<ide> self._run_and_report_benchmark(total_batch_size=FLAGS.batch_size,
<ide> log_steps=FLAGS.log_steps,
<del> ... | 1 |
Text | Text | remove isstatic and change image to my-icon | a8b34a1516ed1eb3aaac6282db6107f6587c3ac5 | <ide><path>docs/Image.md
<ide> When your entire codebase respects this convention, you're able to do interestin
<ide>
<ide> > **NOTE**: PNG images are required when loading with `require('image!my-icon')`
<ide> >
<del>> At this time, only PNG images are supported in iOS. There is an [issue](https://github.com/facebook... | 1 |
Text | Text | update install instructions | 3a3e4daf6076fd7d5057fa6890b4c73c9511003a | <ide><path>website/docs/usage/index.md
<ide> You can configure the build process with the following environment variables:
<ide> | `PYVER` | The Python version to build against. This version needs to be available on your build and runtime machines. Defaults to `3.6`. ... | 1 |
Javascript | Javascript | check status code in afterwrite | 8295c806181654fc6bbc8845c727b7378a196304 | <ide><path>lib/net.js
<ide> function afterWrite(status, handle, req, buffer) {
<ide> if (self.destroyed) {
<ide> return;
<ide> }
<del> // TODO check status.
<add>
<add> if (status) {
<add> self.destroy(errnoException(errno, 'write'));
<add> return;
<add> }
<ide>
<ide> timers.active(this);
<ide> | 1 |
Go | Go | replace latest log by logrus | 10e114fb956db1b1a8bc9308cc6d14cbf30a5bab | <ide><path>daemon/execdriver/lxc/init.go
<ide> import (
<ide> "encoding/json"
<ide> "flag"
<ide> "fmt"
<del> "log"
<ide> "os"
<ide> "os/exec"
<ide> "runtime"
<ide> "strings"
<ide> "syscall"
<ide>
<add> "github.com/Sirupsen/logrus"
<ide> "github.com/docker/docker/pkg/reexec"
<ide> )
<ide>
<ide> func initializ... | 2 |
Ruby | Ruby | use sass-rails 4.0.3 | 61a8fd5e1b23fc0a0630cd1831abdda0bedd1c73 | <ide><path>railties/lib/rails/generators/app_base.rb
<ide> def assets_gemfile_entry
<ide> 'Use SCSS for stylesheets')
<ide> else
<ide> gems << GemfileEntry.version('sass-rails',
<del> '~> 4.0.2',
<add> ... | 1 |
Java | Java | fix typo in test from previous commit | acb3d1cf888125d7663628e766a42adaee8e78df | <ide><path>spring-web/src/test/java/org/springframework/web/util/pattern/PathPatternParserTests.java
<ide> public void compareTests() {
<ide> @Test
<ide> public void separatorTests() {
<ide> PathPatternParser parser = new PathPatternParser();
<del> parser.setPathOptions(PathContainer.Options.HTTP_PATH);
<add> par... | 1 |
Javascript | Javascript | add git revision to build version | 9a0cf68a4d609a571d8840fada2e2e2d85a426bf | <ide><path>shells/browser/shared/build.js
<ide> const build = async (tempPath, manifestPath) => {
<ide> `${webpackPath} --config webpack.config.js --output-path ${binPath}`,
<ide> {
<ide> cwd: __dirname,
<del> env: Object.assign({}, process.env, { NODE_ENV: 'production' }),
<add> env: Object.ass... | 5 |
Javascript | Javascript | add example for overwriting defaults on provider | 6d3329479fae215c5f2fc7df77f9fee893c387bf | <ide><path>src/ngCookies/cookies.js
<ide> angular.module('ngCookies', ['ng']).
<ide> * Note: By default, the address that appears in your `<base>` tag will be used as the path.
<ide> * This is important so that cookies will be visible for all routes when html5mode is enabled.
<ide> *
<add> * @example... | 1 |
Python | Python | fix small bug/typo | 364920e216c16d73c782a61a4cf6652e541fbe18 | <ide><path>examples/distillation/dataset.py
<ide> def divide_chunks(l, n):
<ide> if sub_s[0] != cls_id:
<ide> sub_s = np.insert(sub_s, 0, cls_id)
<ide> if sub_s[-1] != sep_id:
<del> sub_s = np.insert(sub_s, len(sub_s), cls_id)
<add> ... | 1 |
Text | Text | fix path to old run_language_modeling.py script | b1d3e95eb5d3e980b9d97f7b98280bab1153cc1b | <ide><path>examples/language-modeling/README.md
<ide> These scripts leverage the 🤗 Datasets library and the Trainer API. You can ea
<ide> need extra processing on your datasets.
<ide>
<ide> **Note:** The old script `run_language_modeling.py` is still available
<del>[here](https://github.com/huggingface/transformers/b... | 1 |
Text | Text | add postmates to airflow users list | ce362c312ccb1bace7215d156909f42d7e51898a | <ide><path>README.md
<ide> Currently **officially** using Airflow:
<ide> * [Lucid](http://luc.id) [[@jbrownlucid](https://github.com/jbrownlucid) & [@kkourtchikov](https://github.com/kkourtchikov)]
<ide> * [Lyft](https://www.lyft.com/)[[@SaurabhBajaj](https://github.com/SaurabhBajaj)]
<ide> * [Nerdwallet](https://www.n... | 1 |
Go | Go | undo 908db518 for windows daemon | d66ae6741851e587e881b31e4b72bbccc253e958 | <ide><path>pkg/chrootarchive/archive.go
<ide> func untar() {
<ide>
<ide> var options *archive.TarOptions
<ide>
<del> //read the options from the pipe "ExtraFiles"
<del> if err := json.NewDecoder(os.NewFile(3, "options")).Decode(&options); err != nil {
<del> fatal(err)
<add> if runtime.GOOS != "windows" {
<add> //r... | 1 |
Ruby | Ruby | switch regex for delete_suffix in normalize_path | 4fb78a0b87b00f6efab4519bd5f744c100c2c76d | <ide><path>actionpack/lib/action_dispatch/journey/router/utils.rb
<ide> def self.normalize_path(path)
<ide> encoding = path.encoding
<ide> path = +"/#{path}"
<ide> path.squeeze!("/")
<del> path.sub!(%r{/+\Z}, "")
<del> path.gsub!(/(%[a-f0-9]{2})/) { $1.upcase }
<del> ... | 1 |
Javascript | Javascript | improve pointerevents doc | f1a0695c7d1d1199558a53fbd943c0b18188a444 | <ide><path>Libraries/Components/View/View.js
<ide> const View = React.createClass({
<ide> onLayout: PropTypes.func,
<ide>
<ide> /**
<del> * In the absence of `auto` property, `none` is much like `CSS`'s `none`
<del> * value. `box-none` is as if you had applied the `CSS` class:
<add> * Controls whet... | 1 |
Text | Text | fix a markdown error in ctc meeting minutes | 4c86fa30d83aa06780825c579cbb2b732ffe4f49 | <ide><path>doc/ctc-meetings/2016-07-13.md
<ide> ELOOP issue has been resolved. Windows problem being addressed in another PR. Ma
<ide>
<ide> ### http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102)
<ide>
<del>@mscdex: Prevent clash of header names with properties inherited from ... | 1 |
Python | Python | require downloaded model in pkg_resources | 6bec24cdd09c8168d2ce8667e376bb1f0e320c07 | <ide><path>spacy/cli/download.py
<ide> import os
<ide> import subprocess
<ide> import sys
<add>import pkg_resources
<ide> from wasabi import Printer
<ide>
<ide> from .link import link
<ide> def download(model, direct=False, *pip_args):
<ide> "the model via its full package name: "
<ide> ... | 1 |
Javascript | Javascript | add async to observable methods | c2ca5e80e969f4e04a2f6044a3b87cd171cec7a2 | <ide><path>packages/@ember/-internals/runtime/lib/mixins/observable.js
<ide> export default Mixin.create({
<ide> observer should be prepared to handle that.
<ide>
<ide> There are two common invocation patterns for `.addObserver()`:
<del>
<add>
<ide> - Passing two arguments:
<ide> - the name of th... | 1 |
Javascript | Javascript | return non-zero exit code from wrong-react-native | ec762717153bbe434e4b8188898f35e3491c88ed | <ide><path>local-cli/wrong-react-native.js
<ide> console.error([
<ide> 'npm uninstall -g react-native',
<ide> 'npm install -g react-native-cli'
<ide> ].join('\n'));
<add>
<add>process.exit(1); | 1 |
Java | Java | improve importstack#tostring output | 40798bd48f63a8f0d9c6529ca6aaa7203b95cbc3 | <ide><path>org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java
<ide> private void processImport(ConfigurationClass configClass, String[] classesToImp
<ide> // the candidate class is an ImportSelector -> delegate to it to determine imports
<ide> try {
... | 1 |
Text | Text | change csharp nullable-types spanish guide | 129cb6d509142d46d8d07ff42f8a8db294aef3d4 | <ide><path>guide/spanish/csharp/nullable-types/index.md
<ide> ---
<ide> title: Nullable Types
<del>localeTitle: Tipos anulables
<add>localeTitle: Tipos que aceptan valores NULL
<ide> ---
<del>## Tipos anulables
<add>## Tipos que aceptan valores NULL
<ide>
<del>Los tipos anulables son instancias de [System.Nullable \\]... | 1 |
Ruby | Ruby | fix the method signature | 15ff4264b23a6f381c211529ca5da21913e20f6f | <ide><path>activerecord/lib/active_record/statement_cache.rb
<ide> def sql_for(binds, connection)
<ide> end
<ide> end
<ide>
<del> def self.query(connection, visitor, ast)
<add> def self.query(visitor, ast)
<ide> Query.new visitor.accept(ast)
<ide> end
<ide> | 1 |
Ruby | Ruby | add ldflags if disabling weak imports | 53d1000739bc29913ab956cff2748428b66f969d | <ide><path>Library/Homebrew/extend/os/mac/extend/ENV/std.rb
<ide> def setup_build_environment(formula = nil)
<ide> # depend on it already being installed to build itself.
<ide> ld64 if Formula["ld64"].installed?
<ide> end
<add>
<add> # Xcode 8 should be told to fail to link against weak links
<add> ... | 1 |
Ruby | Ruby | remove unnecessary comma | acab767c9d042031320b1ed7a7e2faa653ab1bb9 | <ide><path>activerecord/lib/active_record/counter_cache.rb
<ide> def reset_counters(id, *counters)
<ide> # Post.update_counters [10, 15], :comment_count => 1
<ide> # # Executes the following SQL:
<ide> # # UPDATE posts
<del> # # SET comment_count = COALESCE(comment_count, 0) + 1,
<add> # ... | 1 |
Javascript | Javascript | remove unreachable return | b4e670dc26b50271457a257ccb244b14ff323b64 | <ide><path>benchmark/_cli.js
<ide> function CLI(usage, settings) {
<ide> } else {
<ide> // Bad case, abort
<ide> this.abort(usage);
<del> return;
<ide> }
<ide> }
<ide> }
<ide><path>benchmark/common.js
<ide> Benchmark.prototype._run = function() {
<ide> child.on('close', (code) => {
<ide> ... | 5 |
PHP | PHP | improve query builder implode method | 13cf97954b639572d167393e4531910aa0bf5c97 | <ide><path>src/Illuminate/Database/Query/Builder.php
<ide> protected function getListSelect($column, $key)
<ide> * @param string $glue
<ide> * @return string
<ide> */
<del> public function implode($column, $glue = null)
<add> public function implode($column, $glue = '')
<ide> {
<del> i... | 1 |
Javascript | Javascript | pass changed file into `invalid` plugin hook | 466d20890cc000b8ccc4176dcb28fbe8043447fa | <ide><path>lib/Compiler.js
<ide> Watching.prototype.watch = function(files, dirs, missing) {
<ide> this.compiler.fileTimestamps = fileTimestamps;
<ide> this.compiler.contextTimestamps = contextTimestamps;
<ide> this.invalidate();
<del> }.bind(this), function() {
<del> this.compiler.applyPlugins("invalid");
<add>... | 1 |
Javascript | Javascript | fix extend_prototypes for sproutcore-runtime | 1fa9fa630fc31a7310fd838c2ee51ac940464a9d | <ide><path>packages/sproutcore-handlebars/tests/each_test.js
<ide> var people, view;
<ide> module("the #each helper", {
<ide> setup: function() {
<ide> template = templateFor("{{#each people}}{{name}}{{/each}}");
<del> people = SC.Array.apply([{ name: "Steve Holt" }, { name: "Annabelle" }]);
<add> people = ... | 16 |
Javascript | Javascript | add default configs to buffer benchmark | b62343d83ceaec35b6af2d3cd77f5271497744a0 | <ide><path>benchmark/buffers/buffer-creation.js
<ide> function main(conf) {
<ide> const len = +conf.len;
<ide> const n = +conf.n;
<ide> switch (conf.type) {
<add> case '':
<ide> case 'fast-alloc':
<ide> bench.start();
<ide> for (let i = 0; i < n * 1024; i++) {
<ide><path>benchmark/buffers/buffe... | 6 |
Python | Python | use less chunks to speed up the test | faf718ae5fe1e1294cf9eec61a12d983139d28a7 | <ide><path>integration/storage/base.py
<ide> def test_upload_via_stream_with_content_encoding(self):
<ide> content = gzip.compress(os.urandom(MB // 100))
<ide> container = self.driver.create_container(self._random_container_name())
<ide> self.driver.upload_object_via_stream(
<del> ... | 1 |
Ruby | Ruby | fix typo in macos.sdk_path | ffd6e7f34043c70402bd28a35e998049ff890a07 | <ide><path>Library/Homebrew/macos.rb
<ide> def sdk_path(v = version)
<ide> # Xcode.prefix is pretty smart, so lets look inside to find the sdk
<ide> opts << "#{Xcode.prefix}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX#{v}.sdk"
<ide> # Xcode < 4.3 style
<del> opts << "/Developer/SDKs/MacOS#{v}... | 1 |
Javascript | Javascript | rewrite code to no longer use __guard__ | 498d7c90ebd382ca966b9f1bed32ba8228d225f1 | <ide><path>spec/project-spec.js
<ide> /*
<ide> * decaffeinate suggestions:
<del> * DS103: Rewrite code to no longer use __guard__
<ide> * DS201: Simplify complex destructure assignments
<ide> * DS207: Consider shorter variations of null checks
<ide> * Full docs: https://github.com/decaffeinate/decaffeinate/blob/mas... | 1 |
Ruby | Ruby | remove the mounted? method | 9f63a78d554690efba3819310710634228089d24 | <ide><path>actionpack/lib/action_dispatch/routing/mapper.rb
<ide> def define_generate_prefix(app, name)
<ide> _routes = @set
<ide> app.routes.define_mounted_helper(name)
<ide> app.routes.extend Module.new {
<del> def mounted?; true; end
<add> def optimize_ro... | 2 |
Python | Python | pass x-trino-client-info in trino hook | 0c30564992a9250e294106e809123f0d5b1c2b78 | <ide><path>airflow/providers/trino/hooks/trino.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<add>import json
<ide> import os
<ide> import warnings
<ide> from typing import Any, Callable, Iterable, Optional... | 2 |
Text | Text | add contributor doc | c33d6ca36014ddb09416dcc977fab86240e43209 | <ide><path>.github/contributors/iann0036.md
<add># spaCy contributor agreement
<add>
<add>This spaCy Contributor Agreement (**"SCA"**) is based on the
<add>[Oracle Contributor Agreement](http://www.oracle.com/technetwork/oca-405177.pdf).
<add>The SCA applies to any contribution that you make to any product or project
<... | 1 |
PHP | PHP | fix bug in place-holder replacement | 73340aed77b9d06b065b629bf5834ec2ae92ad9f | <ide><path>src/Illuminate/Routing/Route.php
<ide> protected static function compileParameters($value, array $wheres = array())
<ide> {
<ide> $value = static::compileWhereParameters($value, $wheres);
<ide>
<del> return preg_replace('/\{((.*?)[^?])\}/', static::$wildcard, $value);
<add> return preg_replace('/\{(([\... | 1 |
Text | Text | move tests to /learn | c0b9ad6bf2fd17661064586dd1b1decaeb43b399 | <ide><path>curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/sudoku-solver.md
<ide> When you are done, make sure a working demo of your project is hosted somewhere
<ide> - To run the challenge tests on this page, set `NODE_ENV` to `test` without quotes in the `.env` file
<ide> - To run the t... | 1 |
Text | Text | add wiki link to mvc | ed30c4d0ea820d79601ca17e2c670e6acae16eb7 | <ide><path>README.md
<ide> component in an interconnected way like a well-oiled machine. AngularJS is JavaS
<ide> and done right. (Well it is not really MVC, read on, to understand what this means.)
<ide>
<ide> #### MVC, no, MV* done the right way!
<del>MVC, short for Model-View-Controller, is a design pattern, i.e. h... | 1 |
Text | Text | react conf lanches | 67a8d8951d3ffdc49f7a31403b3f08626565707c | <ide><path>blog/2017-03-13-better-list-views.md
<add>---
<add>title: Better List Views in React Native
<add>author: Spencer Ahrens
<add>authorTitle: Software Engineer at Facebook
<add>authorURL: https://github.com/sahrens
<add>authorImage: https://avatars1.githubusercontent.com/u/1509831
<add>authorTwitter: sahrens2012... | 3 |
Ruby | Ruby | fix output when no packages to upgrade | 5de3686cd2e041dae893f9e84d74c925cb6c85f5 | <ide><path>Library/Homebrew/cmd/upgrade.rb
<ide> def upgrade
<ide> outdated -= pinned
<ide> end
<ide>
<del> oh1 "Upgrading #{outdated.length} outdated package#{outdated.length.plural_s}, with result:"
<del> puts outdated.map{ |f| "#{f.name} #{f.version}" } * ", "
<add> unless outdated.empty?
<add> ... | 1 |
PHP | PHP | move generation of full message to message class | 124ebdc5033c37d207a969dcf0ca4e5f97ab35d9 | <ide><path>src/Mailer/Email.php
<ide> class Email implements JsonSerializable, Serializable
<ide> */
<ide> protected $renderer;
<ide>
<del> /**
<del> * If set, boundary to use for multipart mime messages
<del> *
<del> * @var string|null
<del> */
<del> protected $_boundary;
<del>
<ide> ... | 8 |
Text | Text | use case-sensitive in the example | cb62f16164da70446baa002ef5a0eda95f7a5b93 | <ide><path>doc/api/process.md
<ide> present.
<ide>
<ide> ```js
<ide> const data = process.report.getReport();
<del>console.log(data.header.nodeJsVersion);
<add>console.log(data.header.nodejsVersion);
<ide>
<ide> // Similar to process.report.writeReport()
<ide> const fs = require('fs'); | 1 |
Python | Python | add missing imports | 18c859500b4797677a2adde351f2047b20b161cc | <ide><path>spacy/lang/pl/tokenizer_exceptions.py
<ide> # encoding: utf8
<ide> from __future__ import unicode_literals
<ide>
<del>from ..symbols import ORTH, LEMMA, POS
<add>from ...symbols import ORTH, LEMMA, POS, ADV, ADJ, NOUN
<ide>
<ide>
<ide> _exc = {} | 1 |
Text | Text | add extra material | f59395a0c043bef09311a2d6cd6633ad9301581c | <ide><path>guide/chinese/android-development/index.md
<ide> localeTitle: Android安卓开发
<ide> ---
<ide> # Android安卓开发
<ide>
<add>Android 簡介
<add>如要瞭解應用程式的運作方式,請參閱應用程式基礎知識。
<add>
<add>如果想立即編寫程式碼,請參閱建立您的第一個應用程式。
<add>
<add>Android 提供內容豐富的應用程式架構,可讓您在 Java 語言環境中建置適用於行動裝置的新穎應用程式和遊戲。 您可以參閱左側導覽區所列的文件,進一步瞭解如何使用 Android 的各種 API 建... | 1 |
Python | Python | fix import of utc | 5717e853dbb9b1465cdfd5b7400db7fc844fa04f | <ide><path>rest_framework/compat.py
<ide> def set_many(instance, field, value):
<ide>
<ide> try:
<ide> # A `utc` instance is available in Django 1.11+
<del> from django.timezone import utc
<add> from django.utils.timezone import utc
<ide> except ImportError:
<ide> # A `UTC` class is available in older ve... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.