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 |
|---|---|---|---|---|---|
Python | Python | handle case without cache in beam search | eb5bdcdfa51f743887ee1d9c7f230444d7a8b23c | <ide><path>src/transformers/generation_tf_utils.py
<ide> def gather_fn(tensor):
<ide>
<ide> # 3. init tensors to use for "xla-compileable" generate function
<ide> batch_size, num_beams, cur_len = input_ids.shape
<add> input_ids_length = cur_len
<ide>
<ide> # per batch, beam-item holding... | 1 |
Go | Go | use only unavailable image when load from tarball | a34dd216119bd343eb4a1f68ad209816d7a3f4c9 | <ide><path>archive/archive.go
<ide> func TarWithOptions(srcPath string, options *TarOptions) (io.ReadCloser, error)
<ide> // identity (uncompressed), gzip, bzip2, xz.
<ide> // FIXME: specify behavior when target path exists vs. doesn't exist.
<ide> func Untar(archive io.Reader, dest string, options *TarOptions) error ... | 3 |
PHP | PHP | remove old missingmethod action | bf5d221037d9857a74020f2623839e282035a420 | <ide><path>src/Illuminate/Routing/Controller.php
<ide> public function callAction($method, $parameters)
<ide> return call_user_func_array([$this, $method], $parameters);
<ide> }
<ide>
<del> /**
<del> * Handle calls to missing methods on the controller.
<del> *
<del> * @param array $parame... | 1 |
Javascript | Javascript | add check on overwriting canvas height/width | 6b824d933451243a4fc57d973da6a8ebe6175b8f | <ide><path>src/core/core.helpers.js
<ide> module.exports = function(Chart) {
<ide> // If no style has been set on the canvas, the render size is used as display size,
<ide> // making the chart visually bigger, so let's enforce it to the "correct" values.
<ide> // See https://github.com/chartjs/Chart.js/issues/357... | 2 |
Ruby | Ruby | add option to support previous encryption schemes | ae38e58ef6f085ce9086dd435284d848bb514d9d | <ide><path>activerecord/lib/active_record/encryption/config.rb
<ide> module Encryption
<ide> class Config
<ide> attr_accessor :master_key, :deterministic_key, :store_key_references, :key_derivation_salt,
<ide> :support_unencrypted_data, :encrypt_fixtures, :validate_column_size, :add_to_fil... | 2 |
Java | Java | fix cxxbridge usage of settablefuture | 12bec39da12d1acde94e620b67bcc29ee5982c6f | <ide><path>ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadImpl.java
<ide> package com.facebook.react.bridge.queue;
<ide>
<ide> import java.util.concurrent.Callable;
<add>import java.util.concurrent.ExecutionException;
<ide> import java.util.concurrent.Future;
<ide> import java.util.concur... | 1 |
Javascript | Javascript | use remote tags and increment patch version | fe0e434a87be433bce69b46031b3ef2c379ce353 | <ide><path>lib/grunt/utils.js
<ide> var shell = require('shelljs');
<ide> var grunt = require('grunt');
<ide> var spawn = require('child_process').spawn;
<ide> var semver = require('semver');
<del>var versionInfo = require('../versions/version-info');
<ide>
<ide> var _ = require('lodash');
<ide>
<ide><path>lib/versio... | 2 |
Javascript | Javascript | increase the platform timeout for aix | 75e073f2b2a0f5a5e002b485afd7288c9adecac6 | <ide><path>test/common.js
<ide> exports.platformTimeout = function(ms) {
<ide> if (process.config.target_defaults.default_configuration === 'Debug')
<ide> ms = 2 * ms;
<ide>
<add> if (exports.isAix)
<add> return 2 * ms; // default localhost speed is slower on AIX
<add>
<ide> if (process.arch !== 'arm')
<id... | 1 |
Text | Text | fix typo in doc/guides/collaborator-guide.md | c347f23175758fd0f0958c4ae335fc430dfecd35 | <ide><path>doc/guides/collaborator-guide.md
<ide> describing a security issue, take the following steps:
<ide> pull request to the issue. Add screenshots of discussion from the pull request
<ide> to the issue.
<ide> * Open a ticket with GitHub asking that the pull requests be deleted through
<del> [GitHub suppport... | 1 |
Ruby | Ruby | add check for versioned gcc linkage | fec5b4080a87cb99e1aff19d36afcbbec4f725cf | <ide><path>Library/Homebrew/extend/os/linux/diagnostic.rb
<ide> def check_linuxbrew_bottle_domain
<ide> e.g. by using homebrew instead).
<ide> EOS
<ide> end
<add>
<add> def check_gcc_dependent_linkage
<add> gcc_dependents = Formula.installed.select do |formula|
<add> next fa... | 1 |
Ruby | Ruby | fix digest etag test | a7060a6e21cb6a6f501fef2a585df9ccda886863 | <ide><path>railties/test/application/middleware_test.rb
<ide> def index
<ide> end
<ide> end
<ide>
<del> etag = "5af83e3196bf99f440f31f2e1a6c9afe".inspect
<add> etag = "W/" + ("5af83e3196bf99f440f31f2e1a6c9afe".inspect)
<ide>
<ide> get "/"
<ide> assert_equal 200, last_response.statu... | 1 |
Text | Text | add example of malloc | e6a6bb0c82833a16a646404981702308ee8d106a | <ide><path>guide/english/c/malloc/index.md
<ide> free( arrayPtr );
<ide> ```
<ide> This statement will deallocate the memory previously allocated. C does not come with a `garbage collector` like some other languages, such as Java. As a result, memory not properly freed will continue to be allocated after the program is... | 1 |
Python | Python | add ndmin keyword to loadtxt. closes | a311969ea2f47b486da14da99a26e72c12a0c20f | <ide><path>numpy/lib/npyio.py
<ide> def _getconv(dtype):
<ide>
<ide>
<ide> def loadtxt(fname, dtype=float, comments='#', delimiter=None,
<del> converters=None, skiprows=0, usecols=None, unpack=False):
<add> converters=None, skiprows=0, usecols=None, unpack=False,
<add> ndmin=0):
<ide>... | 2 |
Text | Text | correct typos in readme | 226b8ef063e210794d177cdf8e1cbf2a302c6d08 | <ide><path>docs/README.md
<ide> limitations under the License.
<ide>
<ide> # Generating the documentation
<ide>
<del>To generate the documentation, you first have to build it. Several packages are necessary to build the doc,
<add>To generate the documentation, you first have to build it. Several packages are necessar... | 1 |
Javascript | Javascript | apply custom header to generated files | 1ae579eb0d1bb688db2902072fafa37863bf59a4 | <ide><path>tasks/transpile.js
<ide> module.exports = function (grunt) {
<ide> }
<ide>
<ide> function transpile(opts) {
<del> // base, entry, skip, headerFile, skipLines, target
<add> // base, entry, skipMoment, headerFile, skipLines, target
<ide> var umdName = opts.headerFile != null && o... | 4 |
Text | Text | use variable instead of hardcoding version in repo | 196bd38fdbd05701294eb924755fd551b977d87c | <ide><path>docs/installation/centos.md
<ide> package manager.
<ide>
<ide> 3. Add the yum repo.
<ide>
<del> $ sudo tee /etc/yum.repos.d/docker.repo <<-EOF
<add> $ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
<ide> [dockerrepo]
<ide> name=Docker Repository
<del> baseurl=https://yu... | 2 |
Python | Python | fix mappings of get_data_disks | 4e9ec02fd276883238a762e12453fa1d62c2325d | <ide><path>libcloud/compute/drivers/ecs.py
<ide> def _get_data_disks(self, ex_data_disks):
<ide> mappings = {'size': 'Size',
<ide> 'category': 'Category',
<ide> 'snapshot_id': 'SnapshotId',
<del> 'disk_name': 'DiskName',
<add> 'name':... | 1 |
Python | Python | add test for minibatch util | 85b0597ed5f8e23de337f56966e4b342827a99c3 | <ide><path>spacy/tests/test_util.py
<add>import pytest
<add>from spacy.gold import Example
<add>
<add>from .util import get_doc
<add>
<add>from spacy.util import minibatch_by_words
<add>
<add>
<add>@pytest.mark.parametrize(
<add> "doc_sizes, expected_batches",
<add> [
<add> ([400, 400, 199], [3]),
<add> ... | 2 |
Python | Python | add unit test for log retrieval url | 061caff2862d9df078336dc94efa5a6915935b7e | <ide><path>airflow/utils/log/file_task_handler.py
<ide> def _read(self, ti: TaskInstance, try_number: int, metadata: dict[str, Any] | No
<ide> else:
<ide> import httpx
<ide>
<del> url = urljoin(
<del> f"http://{ti.hostname}:{conf.get('logging', 'WORKER_LOG_SERVER_PORT')}/l... | 2 |
Text | Text | sanitize css comments on typography lesson | a329eec0a8f12aa975413f29b105981b9862caf3 | <ide><path>curriculum/challenges/english/01-responsive-web-design/responsive-web-design-principles/make-typography-responsive.md
<ide> Set the `width` of the `h2` tag to 80% of the viewport's width and the `width` o
<ide> Your `h2` tag should have a `width` of 80vw.
<ide>
<ide> ```js
<del>assert(code.match(/h2\s*?{\s*... | 1 |
Python | Python | update fabfile from develop | 04af13e29a1fbad38fb453fb39b6b10ac0804cd5 | <ide><path>fabfile.py
<ide> def env(lang='python2.7'):
<ide> if path.exists(VENV_DIR):
<ide> local('rm -rf {env}'.format(env=VENV_DIR))
<add> local('pip install virtualenv')
<ide> local('python -m virtualenv -p {lang} {env}'.format(lang=lang, env=VENV_DIR))
<ide>
<ide>
<ide> def make():
<ide> ... | 1 |
PHP | PHP | implement createfile on consoleio | c86ebc5bc7d12e01a34942434acdaa99b75f8602 | <ide><path>src/Console/ConsoleIo.php
<ide> */
<ide> namespace Cake\Console;
<ide>
<add>use Cake\Console\Exception\StopException;
<ide> use Cake\Log\Engine\ConsoleLog;
<ide> use Cake\Log\Log;
<add>use RuntimeException;
<add>use SplFileObject;
<ide>
<ide> /**
<ide> * A wrapper around the various IO operations shell t... | 2 |
Text | Text | update layout property part | 1ab90c142c22e6e444488e4af5b308bcd33dd1e8 | <ide><path>docs/api-reference/next/image.md
<ide> When `responsive`, the image will scale the dimensions down for smaller
<ide> viewports and scale up for larger viewports.
<ide>
<ide> When `fill`, the image will stretch both width and height to the dimensions of
<del>the parent element, usually paired with
<del>[obje... | 1 |
Java | Java | update webclient javadoc | 6e05a5881e404b8a1ab7eac049d82d0faeb7eb10 | <ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java
<ide> import org.springframework.web.reactive.function.BodyInserter;
<ide> import org.springframework.web.util.UriBuilder;
<ide> import org.springframework.web.util.UriBuilderFactory;
<add>import org.springframework.... | 1 |
Ruby | Ruby | fix isolated test failure | 8efcf9bf82d3c2f03e6cc88774f2e02ce9ec1b2e | <ide><path>activerecord/test/cases/associations/has_one_through_disable_joins_associations_test.rb
<ide>
<ide> require "cases/helper"
<ide> require "models/member"
<add>require "models/member_detail"
<ide> require "models/organization"
<ide>
<ide> class HasOneThroughDisableJoinsAssociationsTest < ActiveRecord::TestCa... | 1 |
Mixed | Ruby | pass options accessor to cache#fetch block | b84b04b33fff38baf3602cba4aa2924876f8b307 | <ide><path>activesupport/CHANGELOG.md
<add>* `ActiveSupport::Cache:Store#fetch` now passes an options accessor to the block.
<add>
<add> It makes possible to override cache options:
<add>
<add> Rails.cache.fetch("3rd-party-token") do |name, options|
<add> token = fetch_token_from_remote
<add> ... | 3 |
Python | Python | enable pytorch 1.13 | 9643ecf8ca15b088784512e3329b9a7d6a02931d | <ide><path>.circleci/create_circleci_config.py
<ide> COMMON_ENV_VARIABLES = {"OMP_NUM_THREADS": 1, "TRANSFORMERS_IS_CI": True, "PYTEST_TIMEOUT": 120}
<ide> COMMON_PYTEST_OPTIONS = {"max-worker-restart": 0, "dist": "loadfile", "s": None}
<ide> DEFAULT_DOCKER_IMAGE = [{"image": "cimg/python:3.7.12"}]
<del>TORCH_SCATTER_I... | 6 |
Text | Text | add example commands for creating reproductions | 1dd34620fd29d957fba42284662dedf98a110dcc | <ide><path>examples/reproduction-template/README.md
<ide> These are the steps you should follow when creating a bug report:
<ide> - If you think the issue is not in Next.js, the best place to ask for help is our [Discord community](https://nextjs.org/discord) or [GitHub discussions](https://github.com/vercel/next.js/di... | 1 |
Javascript | Javascript | remove private polling mechanism | 9b35dfb658411ff12ded73be44e52072e43e0c1c | <ide><path>src/ng/browser.js
<ide> function Browser(window, document, $log, $sniffer) {
<ide> * @param {function()} callback Function that will be called when no outstanding request
<ide> */
<ide> self.notifyWhenNoOutstandingRequests = function(callback) {
<del> // force browser to execute all pollFns - this... | 4 |
Text | Text | fix documentation errors | 383a1696c098c907fd4507056b7eef15cadf4902 | <ide><path>doc/api/http2.md
<ide> req.end('Jane');
<ide>
<ide> ## Compatibility API
<ide>
<del>The Compatibility API has the goal of providing a similar developer experience of
<del>HTTP/1 when using HTTP/2, making it possible to develop applications
<del>that supports both [HTTP/1](HTTP/1) and HTTP/2. This API targe... | 1 |
Go | Go | improve timestamp formatting | 04c94a013ccba1690933156830efdc314de67ef8 | <ide><path>api/client/task/print.go
<ide> import (
<ide> )
<ide>
<ide> const (
<del> psTaskItemFmt = "%s\t%s\t%s\t%s\t%s %s\t%s\t%s\n"
<add> psTaskItemFmt = "%s\t%s\t%s\t%s\t%s %s ago\t%s\t%s\n"
<ide> )
<ide>
<ide> type tasksBySlot []swarm.Task
<ide> func Print(dockerCli *client.DockerCli, ctx context.Context, tasks ... | 1 |
Go | Go | pull only latest when no tag specified | b8e338144e90a6bb76110ab04cc216966640a3f4 | <ide><path>api/client/commands.go
<ide> func (cli *DockerCli) CmdRun(args ...string) error {
<ide>
<ide> v := url.Values{}
<ide> repos, tag := utils.ParseRepositoryTag(config.Image)
<add> // pull only the image tagged 'latest' if no tag was specified
<add> if tag == "" {
<add> tag = "latest"
<add> }
<ide> v... | 1 |
Go | Go | fix uneccessary calls to `volume.unmount()` | 9a2d0bc3adc0c21c82cd1974be45ea0449f9f224 | <ide><path>container/container.go
<ide> func (container *Container) AddMountPointWithVolume(destination string, vol volu
<ide> }
<ide> }
<ide>
<add>// UnmountVolumes unmounts all volumes
<add>func (container *Container) UnmountVolumes(volumeEventLog func(name, action string, attributes map[string]string)) error {
<ad... | 7 |
Python | Python | address another comment | a3efa3fed2ffa33a64259d0a8547851b72a5b20f | <ide><path>official/mnist/mnist.py
<ide> def __init__(self, data_format):
<ide> 64, 5, padding='same', data_format=data_format, activation=tf.nn.relu)
<ide> self.fc1 = tf.layers.Dense(1024, activation=tf.nn.relu)
<ide> self.fc2 = tf.layers.Dense(10)
<del> self.dropout = tf.layers.Dropout(0.5)
<add> ... | 1 |
Javascript | Javascript | fix svgloader strokes not rendering in firefox | 898c14affc264d90801239c3b27a88bf8fd6f691 | <ide><path>examples/jsm/loaders/SVGLoader.js
<ide> SVGLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
<ide>
<ide> function clamp( v ) {
<ide>
<del> return Math.max( 0, Math.min( 1, v ) );
<add> return Math.max( 0, Math.min( 1, parseFloat( v ) ) );
<ide>
<ide> }
<ide>
<ide> func... | 1 |
Javascript | Javascript | add point at beginning of initializecore | d279b7c74dbd570da5a269e59542c72f3f689805 | <ide><path>Libraries/Utilities/PerformanceLogger.js
<ide> const PerformanceLogger = {
<ide> infoLog(extras);
<ide> },
<ide>
<del> markPoint(key: string) {
<add> markPoint(key: string, timestamp?: number) {
<ide> if (points[key]) {
<ide> if (__DEV__) {
<ide> infoLog(
<ide> const PerformanceLog... | 1 |
Text | Text | update the docs | b21d1476085851aa1be870d11d6217c9e87fdfbc | <ide><path>docs/02-Line-Chart.md
<ide> var data = {
<ide> label: "My First dataset",
<ide>
<ide> // Boolean - if true fill the area under the line
<del> fill: false,
<add> fill: false,
<add>
<add> // Tension - bezier curve tension of the line. Set to 0 to draw straight lines connecting points
<add> // Us... | 1 |
PHP | PHP | fix a styling issue | eb5de12c443b10c8eb4936a5d09977adc43a2a54 | <ide><path>src/Illuminate/Database/Schema/Builder.php
<ide> public function registerCustomDBALType($class, $name, $type)
<ide> if (! $this->connection->isDoctrineAvailable()) {
<ide> return;
<ide> }
<add>
<ide> if (! Type::hasType($name)) {
<ide> Type::addType($na... | 1 |
Python | Python | add line break as soon tests are done | 5b90902b8bf260518d73aa2afbccb10dcf82e78a | <ide><path>tools/test.py
<ide> def Starting(self):
<ide> pass
<ide>
<ide> def Done(self):
<del> self.PrintProgress('Done')
<add> self.PrintProgress('Done\n')
<ide>
<ide> def AboutToRun(self, case):
<ide> self.PrintProgress(case.GetLabel()) | 1 |
Python | Python | add xcom push for ecsoperator | 8d42d9ed69b03b372c6bc01309ef22e01b8db55f | <ide><path>airflow/providers/amazon/aws/operators/ecs.py
<ide> # under the License.
<ide> import re
<ide> import sys
<add>from collections import deque
<ide> from datetime import datetime
<del>from typing import Dict, Optional
<add>from typing import Dict, Generator, Optional
<ide>
<ide> from botocore.waiter import Wa... | 2 |
Javascript | Javascript | add line-height to unitless css props, test cases | 27ee9c6eb07fd2f65afb69645d6496811e588346 | <ide><path>src/dom/CSSProperty.js
<ide> var isUnitlessNumber = {
<ide> fillOpacity: true,
<ide> fontWeight: true,
<add> lineHeight: true,
<ide> opacity: true,
<ide> orphans: true,
<ide> zIndex: true,
<ide><path>src/dom/__tests__/CSSPropertyOperations-test.js
<ide> describe('CSSPropertyOperations', function()... | 2 |
Ruby | Ruby | build sql ast nodes rather than generate strings | 820582883a301ad813534492f8f3223a582824f1 | <ide><path>activerecord/lib/active_record/associations/through_association_scope.rb
<ide> def construct_create_scope
<ide>
<ide> # Build SQL conditions from attributes, qualified by table name.
<ide> def construct_conditions
<del> table_name = @reflection.through_reflection.quoted_table_name
<add> ... | 1 |
PHP | PHP | add host name matching to routecollection/route | 017a1f9aca17cd7d231dc8a7581ce35360c0a3aa | <ide><path>src/Routing/Route/Route.php
<ide> public function parse($url, $method = '')
<ide> */
<ide> public function hostMatches($host)
<ide> {
<del> // Will be implemented later
<del> return true;
<add> if (!isset($this->options['_host'])) {
<add> return true;
<add> ... | 2 |
Javascript | Javascript | add renderer.gammaoutput to program code | 7ffac6f5df245129f6841a5dfee01c015176c253 | <ide><path>src/renderers/webgl/WebGLPrograms.js
<ide> function WebGLPrograms( renderer, capabilities ) {
<ide>
<ide> }
<ide>
<add> array.push( renderer.gammaOutput );
<add>
<ide> return array.join();
<ide>
<ide> }; | 1 |
Python | Python | fix spelling error in npy_tempita kwarg | a0b3874811e53d17b45ae1911888ddccd8d85c22 | <ide><path>tools/npy_tempita/__init__.py
<ide> class Template(object):
<ide>
<ide> def __init__(self, content, name=None, namespace=None, stacklevel=None,
<ide> get_template=None, default_inherit=None, line_offset=0,
<del> delimeters=None):
<add> delimiters=None):
<... | 1 |
Javascript | Javascript | make transitionevent on state manager configurable | ee1d2d55bb66cc8bb82c8ca1e535995c37221a53 | <ide><path>packages/ember-states/lib/router.js
<ide> require('ember-states/routable');
<ide> */
<ide> Ember.Router = Ember.StateManager.extend(
<ide> /** @scope Ember.Router.prototype */ {
<add>
<ide> initialState: 'root',
<ide>
<add> /**
<add> On router, transitionEvent should be called connectOutlets
<add>
<ad... | 4 |
Javascript | Javascript | fix bug with double updates in a single batch | c1e3f7ec14971dbf678a731408d38959545793eb | <ide><path>src/renderers/shared/reconciler/ReactCompositeComponent.js
<ide> var ReactCompositeComponentMixin = {
<ide> this._nativeContainerInfo = null;
<ide>
<ide> // See ReactUpdateQueue
<add> this._updateBatchNumber = null;
<ide> this._pendingElement = null;
<ide> this._pendingStateQueue = null;
... | 4 |
Python | Python | fix evaluation bug | 64b2a828c0b16368810d15c6fff1640e33a34125 | <ide><path>examples/run_squad.py
<ide> def main():
<ide> output_args_file = os.path.join(args.output_dir, 'training_args.bin')
<ide> torch.save(args, output_args_file)
<ide> else:
<del> model = BertForQuestionAnswering.from_pretrained(args.bert_model)
<add> # Load a trained model and v... | 1 |
Python | Python | clean the code.. | b5d68b1cc360725e140f18fed4f927890d9ef3c8 | <ide><path>glances/glances.py
<ide> def __update__(self):
<ide> # NET
<ide> if psutil_network_io_tag:
<ide> self.network = []
<del> try:
<del> self.network_old
<del> except Exception:
<del> self.network_old = psutil.network_io_counters(True... | 1 |
Javascript | Javascript | fix unbound keyword | 508d9de45bd6d729c8cb0954f97fd7ed83531276 | <ide><path>packages/ember-htmlbars/lib/hooks/subexpr.js
<ide> import create from "ember-metal/platform/create";
<ide> import { subscribe, addDependency, read, labelsFor, labelFor } from "ember-metal/streams/utils";
<ide>
<ide> export default function subexpr(env, scope, helperName, params, hash) {
<add> // TODO: Keyw... | 3 |
Javascript | Javascript | add locale switcher to i18n-routing example | 9cbc4aacd50d0e79be7b8178eec9219457514da9 | <ide><path>examples/i18n-routing/components/locale-switcher.js
<add>import Link from 'next/link'
<add>import { useRouter } from 'next/router'
<add>
<add>export default function LocaleSwitcher() {
<add> const router = useRouter()
<add> const { locales, locale: activeLocale } = router
<add> const otherLocales = locale... | 5 |
Python | Python | fix dilated convolution for cntk backend. | d88f2006af35179b986479ac6ad5a20dac8ac9d1 | <ide><path>keras/backend/cntk_backend.py
<ide> def conv2d(x, kernel, strides=(1, 1), padding='valid',
<ide> x = _preprocess_conv2d_input(x, data_format)
<ide> kernel = _preprocess_conv2d_kernel(kernel, data_format)
<ide> padding = _preprocess_border_mode(padding)
<del> if dilation_rate == (1, 1):
<del> ... | 2 |
Python | Python | unify coding style | a85263fb3edee30623f7c9c1ffb6505b4f983d14 | <ide><path>examples/variational_autoencoder_deconv.py
<ide> def sampling(args):
<ide> padding='same',
<ide> strides=1,
<ide> activation='relu')
<del>decoder_deconv_2 = Conv2DTranspose(filters, num_conv,
<add>decoder... | 1 |
Go | Go | ignore cleanup with /dev/mapper does not exist | 5dd12ba20a962c0f67e5eefb7b0e00e5caccb1e1 | <ide><path>runtime_test.go
<ide> func cleanupDevMapper() error {
<ide> // Remove any leftover devmapper devices from previous unit run tests
<ide> infos, err := ioutil.ReadDir("/dev/mapper")
<ide> if err != nil {
<add> // If the mapper file does not exist there is nothing to clean up
<add> if os.IsNotExist(err) {
... | 1 |
Text | Text | fix wrong parameters | c5bfb97aa0704da69e002aa5288e39258853d11e | <ide><path>docs/recipes/ReducingBoilerplate.md
<ide> const ADD_TODO = 'ADD_TODO'
<ide> const EDIT_TODO = 'EDIT_TODO'
<ide> const REMOVE_TODO = 'REMOVE_TODO'
<ide>
<del>export const addTodo = makeActionCreator(ADD_TODO, 'todo')
<del>export const editTodo = makeActionCreator(EDIT_TODO, 'id', 'todo')
<add>export const ad... | 1 |
Text | Text | add the text of use of inheritance | 9d8e538ac09e5a7310ae0a1e1b713efe8300382d | <ide><path>guide/english/java/inheritance/index.md
<ide> Java inheritance refers to the ability of a Java Class to `inherit` the properti
<ide> * The Class that extends or inherits is called a **subclass**
<ide> * The Class that is being extended or inherited is called a **superclass**
<ide>
<add>## Why use inheri... | 1 |
Javascript | Javascript | test only public api and use better test data | 2fdbca0d8cc5575ca45a13820b5729109424ee32 | <add><path>test/Connector.spec.js
<del><path>test/components/Connector.spec.js
<ide> // import expect from 'expect';
<del>// import { Connector } from '../../src';
<add>// import { Connector } from '../src';
<ide>
<ide> describe('Components', () => {
<ide> describe('Connector', () => {
<add><path>test/Provider.spec.... | 16 |
Python | Python | fix backup tests | 6ef330e9672688aa3a58821c011be84eaa3d0259 | <ide><path>libcloud/test/backup/test_dimensiondata_v2_3.py
<ide> from libcloud.backup.drivers.dimensiondata import DEFAULT_BACKUP_PLAN
<ide>
<ide> from libcloud.test import MockHttp, unittest
<del>from libcloud.test.backup import TestCaseMixin
<ide> from libcloud.test.file_fixtures import BackupFileFixtures
<ide>
<id... | 2 |
Ruby | Ruby | fix kwarg to not have circular dependency | f6628adc11e2e57db75030fca9bae035be5cd95b | <ide><path>activerecord/lib/active_record/migration.rb
<ide> def initialize(env = "production")
<ide> end
<ide>
<ide> class EnvironmentMismatchError < ActiveRecordError
<del> def initialize(current: current, stored: stored)
<add> def initialize(current: , stored: )
<ide> msg = "You are attempting to m... | 1 |
Python | Python | remove unused util function | 1f9f867c70fc76ae1c0b307e38997c17e084c051 | <ide><path>spacy/util.py
<ide> def ensure_path(path):
<ide> return path
<ide>
<ide>
<del>def or_(val1, val2):
<del> if val1 is not None:
<del> return val1
<del> elif callable(val2):
<del> return val2()
<del> else:
<del> return val2
<del>
<del>
<ide> def read_regex(path):
<ide> ... | 1 |
PHP | PHP | add start helper method | f5e95c357c93f6cc60ce9f2aa3bfc7e218e6a6f3 | <ide><path>src/Illuminate/Console/Application.php
<ide> class Application extends \Symfony\Component\Console\Application {
<ide> */
<ide> protected $laravel;
<ide>
<add> /**
<add> * Create and boot a new Console application.
<add> *
<add> * @param \Illuminate\Foundation\Application $app
<add> * @return \Illum... | 1 |
Python | Python | add colors to airflow config command | d711dca697868e6c3fc65bd38bf75e68c7bfd88b | <ide><path>airflow/cli/cli_parser.py
<ide> from airflow.configuration import conf
<ide> from airflow.exceptions import AirflowException
<ide> from airflow.executors.executor_loader import ExecutorLoader
<add>from airflow.utils.cli import ColorMode
<ide> from airflow.utils.helpers import partition
<ide> from airflow.uti... | 3 |
Javascript | Javascript | use all imports in a concatenated module | abff6b780579babd623824722a17f66246015a13 | <ide><path>lib/optimize/ConcatenatedModule.js
<ide> const HarmonyExportImportedSpecifierDependency = require("../dependencies/Harmon
<ide> const HarmonyCompatibilityDependency = require("../dependencies/HarmonyCompatibilityDependency");
<ide> const HarmonyModulesHelpers = require("../dependencies/HarmonyModulesHelpers"... | 1 |
Javascript | Javascript | fix camerarollexample crash | 2554f263874de792496fd566516bc36c3cc8c0c8 | <ide><path>Examples/UIExplorer/js/CameraRollExample.js
<ide> const {
<ide> TouchableOpacity
<ide> } = ReactNative;
<ide>
<add>const invariant = require('invariant');
<add>
<ide> const CameraRollView = require('./CameraRollView');
<ide>
<ide> const AssetScaledImageExampleView = require('./AssetScaledImageExample');
... | 1 |
Ruby | Ruby | add xit to github_prerelease_allowlist | aad02c4524199f6e558609dc4b62860783da8d25 | <ide><path>Library/Homebrew/utils/shared_audits.rb
<ide> def github_release_data(user, repo, tag)
<ide> "telegram-cli" => "1.3.1",
<ide> "toggl-track" => :all,
<ide> "volta" => "0.8.6",
<add> "xit" => :all,
<ide> }.freeze
<ide>
<ide> def github_release(user, repo, ta... | 1 |
Javascript | Javascript | remove old css prefixes | 39fc61d2c4aa2c7db9a0ede6aee1fd4264838bde | <ide><path>examples/js/renderers/CSS2DRenderer.js
<ide> THREE.CSS2DRenderer = function () {
<ide> vector.applyMatrix4( viewProjectionMatrix );
<ide>
<ide> var element = object.element;
<del> var style = 'translate(-50%,-50%) translate(' + ( vector.x * _widthHalf + _widthHalf ) + 'px,' + ( - vector.y * _heightH... | 4 |
Text | Text | update changelog for 2.16.0-beta.2 | a9a36f4f8931488de40c64f4f190c0c3ce5be035 | <ide><path>CHANGELOG.md
<ide> # Ember Changelog
<ide>
<add>### 2.16.0-beta.2 (October, 2, 2017)
<add>
<add>- [#15577](https://github.com/emberjs/ember.js/pull/15577) [BUGFIX] Include missing sourcemaps in vendorTree.
<add>- [#15552](https://github.com/emberjs/ember.js/pull/15552) [FEATURE] Update blueprints and tests ... | 1 |
Go | Go | improve error messages for loading tls keys | 2ea6c2c264f0f43beb877a83aea3e6e6ad38ae5d | <ide><path>api/server/server.go
<ide> func lookupGidByName(nameOrGid string) (int, error) {
<ide> func setupTls(cert, key, ca string, l net.Listener) (net.Listener, error) {
<ide> tlsCert, err := tls.LoadX509KeyPair(cert, key)
<ide> if err != nil {
<del> return nil, fmt.Errorf("Couldn't load X509 key pair (%s, %s): ... | 1 |
Javascript | Javascript | remove outdated element tests | f388ed3136a3b62f46e9f0e4c5ef96f175cc1670 | <ide><path>test/specs/element.arc.tests.js
<ide> // Test the rectangle element
<ide>
<ide> describe('Arc element tests', function() {
<del> it ('Should be constructed', function() {
<del> var arc = new Chart.elements.Arc({
<del> _datasetIndex: 2,
<del> _index: 1
<del> });
<del>
<del> expect(arc).not.toBe(undefi... | 3 |
PHP | PHP | add ssl support back to mysql driver | ade1d087ee13d1d963c2e1f562d4804294d54308 | <ide><path>Cake/Database/Driver/Mysql.php
<ide> public function connect() {
<ide> }
<ide>
<ide> $config['init'][] = sprintf("SET time_zone = '%s'", $config['timezone']);
<add>
<ide> $config['flags'] += [
<ide> PDO::ATTR_PERSISTENT => $config['persistent'],
<ide> PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
... | 1 |
Javascript | Javascript | fix bufferattribute accessors | 9757d97f67c70d6c85c828d0973aa85bab7a2b3c | <ide><path>src/core/BufferAttribute.js
<ide> function BufferAttribute( array, itemSize, normalized ) {
<ide>
<ide> }
<ide>
<add>Object.defineProperty( BufferAttribute.prototype, "needsUpdate", {
<add>
<add> set: function(value) { if ( value === true ) this.version ++; }
<add>
<add>});
<add>
<ide> Object.assign( Buffe... | 1 |
Ruby | Ruby | fix rdoc markup in `connectionpool`. [ci skip] | 809fd2b2737424762663dbebdc54e6ee5493df90 | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
<ide> def initialize(spec)
<ide> # of the cache is to speed-up +connection+ method, it is not the authoritative
<ide> # registry of which thread owns which connection, that is tracked by
<ide> # +connection... | 1 |
Python | Python | fix typo in error message | e37bc579fce3f193fe1f097262db65dce7a684d4 | <ide><path>utils/check_repo.py
<ide> def check_docstrings_are_in_md():
<ide> raise ValueError(
<ide> "The following files have docstrings written in rst:\n"
<ide> + "\n".join([f"- {f}" for f in files_with_rst])
<del> + "To fix this run `doc_builder convert path_to_py_file` aft... | 1 |
Javascript | Javascript | use example or module description | e48e63709c29a033b70b9c6279ff05a86dd71ba6 | <ide><path>packages/rn-tester/js/components/ExamplePage.js
<del>/**
<del> * Copyright (c) Facebook, Inc. and its affiliates.
<del> *
<del> * This source code is licensed under the MIT license found in the
<del> * LICENSE file in the root directory of this source tree.
<del> *
<del> * @format
<del> * @flow
<del> */
<del... | 7 |
Ruby | Ruby | remove redundant conditional | cb0a90262d8914b749fadcede523ef2e0604cbd4 | <ide><path>Library/Homebrew/download_strategy.rb
<ide> def _curl_args
<ide> "because we need it installed to download securely."
<ide> @insecure_warning_shown = true
<ide> end
<del> args += ["--insecure"] if meta[:insecure]
<add> args += ["--insecure"]
<ide> end
<ide>
<ide> ... | 1 |
Ruby | Ruby | fix variable name in guides markdown generator | c0ea4321b963970192f43a372906aa1fa8b85e72 | <ide><path>guides/rails_guides/markdown/renderer.rb
<ide> def lexer_language(code_type)
<ide> when nil
<ide> "plaintext"
<ide> else
<del> ::Rouge::Lexer.find(language) ? code_type : "plaintext"
<add> ::Rouge::Lexer.find(code_type) ? code_type : "plaintext"
<ide> ... | 1 |
PHP | PHP | add basic table creation + test cases | ec426afe8056508343c485a7f8b15efe98562f49 | <ide><path>lib/Cake/Database/Schema/SqliteSchema.php
<ide> public function columnSql(Table $table, $name) {
<ide> if (isset($data['null']) && $data['null'] === false) {
<ide> $out .= ' NOT NULL';
<ide> }
<add> if (in_array($data['type'], ['integer']) && in_array($name, (array)$table->primaryKey())) {
<add> $o... | 2 |
Ruby | Ruby | drop unnecessary parens | 018aeb05ab74629f761741e51436a358db6feb9d | <ide><path>Library/Homebrew/cxxstdlib.rb
<ide> def initialize(type, compiler)
<ide> # libstdc++ is compatible across Apple compilers, but
<ide> # not between Apple and GNU compilers, or between GNU compiler versions
<ide> def compatible_with?(other)
<del> (type.nil? || other.type.nil?) || type == other.type
<a... | 1 |
Text | Text | fix a small typo | 26c4dc954f350dc46cd774db9e441999ed912b09 | <ide><path>docs/Installation.md
<ide> Just extract (or `git clone`) Homebrew wherever you want. Just avoid:
<ide> * `/tmp` subdirectories because Homebrew gets upset.
<ide> * `/sw` and `/opt/local` because build scripts get confused when Homebrew is there instead of Fink or MacPorts, respectively.
<ide>
<del>However d... | 1 |
PHP | PHP | remove unneeded variable | 0f7c230eb3f792d8f8ccd35807f04967854e485a | <ide><path>src/Illuminate/Remote/RemoteManager.php
<ide> protected function makeConnection($name, array $config)
<ide> {
<ide> $this->setOutput($connection = new Connection(
<ide>
<del> $name, $config['host'], $config['username'], $this->getAuth($config), $keyphrase
<add> $name, $config['host'], $config['userna... | 1 |
Ruby | Ruby | add protected reader for version value | 68c7e1e30cbb96eee50472c19f866414188a5d65 | <ide><path>Library/Homebrew/version.rb
<ide> def detected_from_url?
<ide> end
<ide>
<ide> def head?
<del> @version == 'HEAD'
<add> version == "HEAD"
<ide> end
<ide>
<ide> def <=>(other)
<ide> def <=>(other)
<ide> alias_method :eql?, :==
<ide>
<ide> def hash
<del> @version.hash
<add> version.h... | 1 |
Javascript | Javascript | allow parsing of the "glued" commands | ec6c185cf5b5f8ac3af3f9e2f45f3bf40b32e22f | <ide><path>src/evaluator.js
<ide> var PartialEvaluator = (function PartialEvaluatorClosure() {
<ide>
<ide> // Compatibility
<ide> BX: 'beginCompat',
<del> EX: 'endCompat'
<del> };
<del>
<del> function splitCombinedOperations(operations) {
<del> // Two or more operations can be combined together, trying... | 3 |
Java | Java | fix default values for translatex/y props | c6532a94a6b2710146b1b71244e6a283efafc3be | <ide><path>ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java
<ide> public void setScaleY(T view, float scaleY) {
<ide> }
<ide>
<ide> @Deprecated
<del> @ReactProp(name = PROP_TRANSLATE_X, defaultFloat = 1f)
<add> @ReactProp(name = PROP_TRANSLATE_X, defaultFloat = 0f)
<ide> public void... | 1 |
Ruby | Ruby | test actual content of permanent cookie | e1579033100fe5a5738791c6f2fd4309c7ca3d78 | <ide><path>actionpack/test/dispatch/cookies_test.rb
<ide> def test_setting_the_same_value_to_cookie
<ide> def test_setting_the_same_value_to_permanent_cookie
<ide> request.cookies[:user_name] = 'Jamie'
<ide> get :set_permanent_cookie
<del> assert response.cookies, 'user_name' => 'Jamie'
<add> assert_equ... | 1 |
Javascript | Javascript | run babel-node with inspect flag in debug | 9fa10c9f3810b9bd4159ce18cc8aae22a5e2975f | <ide><path>gulpfile.js
<ide> function delRev(dest, manifestName) {
<ide>
<ide> gulp.task('serve', function(cb) {
<ide> let called = false;
<add> let execParams = path.normalize('node_modules/.bin/babel-node');
<add> // When in development we can spawn a node debugger
<add> // https://nodejs.org/en/docs/inspector/... | 1 |
Text | Text | fix import statement in od g3doc | 9bf1fd02f6c44efbf0d4690d513e90fc77559746 | <ide><path>research/object_detection/g3doc/using_your_own_dataset.md
<ide> Instead of writing all tf.Example protos to a single file as shown in
<ide>
<ide> ```python
<ide> import contextlib2
<del>from google3.third_party.tensorflow_models.object_detection.dataset_tools import tf_record_creation_util
<add>from object_... | 1 |
Java | Java | clarify names during testing | 2136f8f73175f193fd5fdd124d140b544a0f3ba3 | <add><path>rxjava-core/src/main/java/rx/observers/SerializedObserverViaQueueAndCounter.java
<del><path>rxjava-core/src/main/java/rx/observers/SerializedObserver.java
<ide>
<ide> import rx.Observer;
<ide>
<del>public class SerializedObserver<T> implements Observer<T> {
<add>public class SerializedObserverViaQueueAndCo... | 3 |
Javascript | Javascript | show one hint at a time | ad83a2e3f4aaabfd2cd5efb086b6225376fa232c | <ide><path>client/src/templates/Challenges/classic/Editor.js
<ide> const propTypes = {
<ide> inAccessibilityMode: PropTypes.bool.isRequired,
<ide> initialEditorContent: PropTypes.string,
<ide> initialExt: PropTypes.string,
<del> output: PropTypes.string,
<add> output: PropTypes.arrayOf(PropTypes.string),
<ide> ... | 1 |
Ruby | Ruby | decrease string allocations in url_options | 83ee043c6834914607849ae9cd3b9eab6b41702c | <ide><path>actionpack/lib/action_controller/metal/url_for.rb
<ide> def url_options
<ide> if original_script_name
<ide> options[:original_script_name] = original_script_name
<ide> else
<del> options[:script_name] = same_origin ? request.script_name.dup : script_name
<add> if s... | 1 |
PHP | PHP | fix mistake in merging changes from master | 0a6e73cbc38458d487b0d42d828312020395cfa7 | <ide><path>tests/TestCase/Shell/Task/AssetsTaskTest.php
<ide> public function testCopyOverwrite()
<ide> $this->assertFileEquals($path . DS . 'root.js', $pluginPath . DS . 'root.js');
<ide>
<ide> $folder = new Folder($path);
<add> $folder->delete();
<ide> }
<ide>
<ide> /** | 1 |
Javascript | Javascript | optimize the logic of isaxioserror | 6fca6a7027caeb4c0c7d0305ab4182bfd8a65536 | <ide><path>lib/helpers/isAxiosError.js
<ide> 'use strict';
<ide>
<add>var utils = require('./../utils');
<add>
<ide> /**
<ide> * Determines whether the payload is an error thrown by Axios
<ide> *
<ide> * @param {*} payload The value to test
<ide> * @returns {boolean} True if the payload is an error thrown by Axios... | 2 |
Text | Text | add missing deprecation code | 71cb829dca84d0bb49d5e67142512d3011aba40b | <ide><path>doc/api/deprecations.md
<ide> settings set when the Node.js binary was compiled. However, the property has
<ide> been mutable by user code making it impossible to rely on. The ability to
<ide> change the value has been deprecated and will be disabled in the future.
<ide>
<del>### DEP0XXX: Main index lookup ... | 1 |
Python | Python | add version string to libcloud | 61bfc62937176b580b8b6ae12a90c5b76b00d50d | <ide><path>libcloud/__init__.py
<ide> """
<ide> libcloud provides a unified interface to the cloud computing resources.
<ide> """
<add>
<add>__version__ = "0.1.1-dev"
<ide>\ No newline at end of file | 1 |
Ruby | Ruby | use short-style lambdas | 783dbcc937b3f8afb79e7e8ff7cb6ff9f591746c | <ide><path>Library/Homebrew/cask/test/cask/artifact/alt_target_test.rb
<ide> let(:cask) { Hbc.load("with-alt-target") }
<ide>
<ide> let(:install_phase) {
<del> lambda { Hbc::Artifact::App.new(cask).install_phase }
<add> -> { Hbc::Artifact::App.new(cask).install_phase }
<ide> }
<ide>
<ide> le... | 5 |
Javascript | Javascript | use setimmediate for recursive deferral | a12c42ca2f8d5ce71c75cab334a53bd71bdaea09 | <ide><path>test/fixtures/catch-stdout-error.js
<ide> function write() {
<ide> } catch (ex) {
<ide> throw new Error('this should never happen');
<ide> }
<del> process.nextTick(function() {
<add> setImmediate(function() {
<ide> write();
<ide> });
<ide> } | 1 |
Java | Java | sanitize request url in resourceurlencodingfilter | 0b9c3de320df81acd06dcfd927faadf72fb66409 | <ide><path>spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilter.java
<ide> public String encodeURL(String url) {
<ide> initIndexLookupPath(resourceUrlProvider);
<ide> if (url.length() >= this.indexLookupPath) {
<ide> String prefix = url.substring(0, this.indexLookupPa... | 4 |
Javascript | Javascript | update the loader so test pages always get jquery | 14b393d0d64e119db7754b1075317a673810929c | <ide><path>test/jquery.js
<ide> ( function() {
<ide> /* global loadTests: false */
<ide>
<del> var src,
<del> path = window.location.pathname.split( "test" )[ 0 ],
<add> var path = window.location.pathname.split( "test" )[ 0 ],
<ide> QUnit = window.QUnit || parent.QUnit,
<del> require = window.require || parent.r... | 1 |
Javascript | Javascript | fix imports to avoid ember-htmlbars | 8877657d5e6be741b5d21069847038bf05414448 | <ide><path>packages/ember-application/tests/system/visit_test.js
<ide> import Application from 'ember-application/system/application';
<ide> import ApplicationInstance from 'ember-application/system/application-instance';
<ide> import Route from 'ember-routing/system/route';
<ide> import Router from 'ember-routing/syst... | 4 |
Javascript | Javascript | add missing space in error message | 9c5ded31897fabc40be073ff4bfab5c7fd8f2389 | <ide><path>lib/internal/modules/cjs/loader.js
<ide> function createRequireFromPath(filename) {
<ide>
<ide> Module.createRequireFromPath = createRequireFromPath;
<ide>
<del>const createRequireError = 'must be a file URL object, file URL string, or' +
<add>const createRequireError = 'must be a file URL object, file URL... | 2 |
Python | Python | fix max length in run_plm script | 367f497dec8905ac37c2947be998f4469fdade6b | <ide><path>examples/language-modeling/run_plm.py
<ide> class DataTrainingArguments:
<ide> overwrite_cache: bool = field(
<ide> default=False, metadata={"help": "Overwrite the cached training and evaluation sets"}
<ide> )
<del> max_seq_length: Optional[int] = field(
<del> default=None,
<add> ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.