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 |
|---|---|---|---|---|---|
Text | Text | update mapbox link in learning resources | fe3a1accae8718f5fa6a40651773f8a8ec6837f7 | <ide><path>docs/introduction/LearningResources.md
<ide> _Patterns and practices for structuring larger Redux applications_
<ide> An excellent slideshow with a wide variety of tips and suggestions, including keeping action creators simple and data manipulation in reducers, abstracting away API calls, avoiding spreadin... | 1 |
Text | Text | update instructions on testing | fe4ca9143c984997fd6e9c1ef253c4346f5064e6 | <ide><path>docs/how-to-work-on-coding-challenges.md
<ide> function myFunc() {
<ide>
<ide> ## Testing Challenges
<ide>
<del>Before you [create a pull request](how-to-open-a-pull-request.md) for your changes, you need to validate that the changes you have made do not inadvertently cause problems with the challenge. To ... | 1 |
Java | Java | fix typo in javadoc in abstracthandlermapping | c2f91765b401c2976fd802358e6453d0fad0d2fd | <ide><path>spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java
<ide> public void setInterceptors(Object... interceptors) {
<ide> * determines the {@code CorsConfiguration} to use which is then further
<ide> * {@link CorsConfiguration#combine(CorsConfiguration) combined} w... | 1 |
Javascript | Javascript | favor strict equality check | 7652ae98296ed46220b5505f491afcb464d096bd | <ide><path>test/pummel/test-tls-connect-memleak.js
<ide> tls.createServer({
<ide>
<ide> const options = { rejectUnauthorized: false };
<ide> tls.connect(common.PORT, '127.0.0.1', options, function() {
<del> assert(junk.length != 0); // keep reference alive
<add> assert.notStrictEqual(junk.length, 0); // ke... | 1 |
PHP | PHP | fix cs errors | 801a812195673ec86316f18b13feb33b1a1bb273 | <ide><path>src/TestSuite/ConsoleIntegrationTestTrait.php
<ide> public function assertOutputContains(string $expected, string $message = ''): vo
<ide> {
<ide> $this->assertThat($expected, new ContentsContain($this->_out->messages(), 'output'), $message);
<ide> }
<add>
<ide> /**
<ide> * Asserts `... | 11 |
Go | Go | move "info" to daemon/info.go | 94715e8e643f0bc9aa57841b346f5196f75f0dc0 | <ide><path>daemon/daemon.go
<ide> func (daemon *Daemon) Install(eng *engine.Engine) error {
<ide> "create": daemon.ContainerCreate,
<ide> "delete": daemon.ContainerDestroy,
<ide> "export": daemon.ContainerExport,
<add> "info": daemon.CmdInfo,
<ide> "kill": ... | 4 |
PHP | PHP | update exception message | ed797c283fac7689836d6d32af5b759c8815051c | <ide><path>src/ORM/Table.php
<ide> protected function _processSave(EntityInterface $entity, ArrayObject $options)
<ide>
<ide> if ($result !== false && !($result instanceof EntityInterface)) {
<ide> throw new RuntimeException(sprintf(
<del> 'beforeSave callback must return... | 2 |
Javascript | Javascript | fix deprecation messages in test | 9b2b1b4bf7d44c24144de067ae69c9e298dee718 | <ide><path>test/ConfigTestCases.test.js
<ide> describe("ConfigTestCases", () => {
<ide> const testDirectory = path.join(casesPath, cat, testName);
<ide> const filterPath = path.join(testDirectory, "test.filter.js");
<ide> if (fs.existsSync(filterPath) && !require(filterPath)()) {
<del> describe.skip... | 1 |
Python | Python | add xlm-roberta to auto tokenization | 64a971a9156788ed6d95f850453578ecb74069c5 | <ide><path>transformers/tokenization_auto.py
<ide> from .tokenization_camembert import CamembertTokenizer
<ide> from .tokenization_albert import AlbertTokenizer
<ide> from .tokenization_t5 import T5Tokenizer
<add>from .tokenization_xlm_roberta import XLMRobertaTokenizer
<ide>
<ide> logger = logging.getLogger(__name__)... | 1 |
PHP | PHP | fix typo in pagination | dbc13686fcdcab624dcef057c455ab37e1258990 | <ide><path>src/Illuminate/Pagination/AbstractPaginator.php
<ide> abstract class AbstractPaginator implements Htmlable
<ide> protected $pageName = 'page';
<ide>
<ide> /**
<del> * The current page resolver callback.
<add> * The current path resolver callback.
<ide> *
<ide> * @var \Closure
<ide>... | 1 |
Javascript | Javascript | fix uncaught exceptions when testing | 266d653bf2ec7164e6e420bc2a40e87ad5ee0dbf | <ide><path>test-challenges.js
<ide> function createTest({ title, tests = [], solutions = [] }) {
<ide> /* eslint-enable no-unused-vars */
<ide> solutions.forEach(solution => {
<ide> tests.forEach(test => {
<del> eval(solution + ';;' + test);
<add> try {
<add> ... | 1 |
Go | Go | fix bitsequence set() | 84a0a0a98f52a67bd8dd301fdcdd7f9bb8f2138d | <ide><path>libnetwork/bitseq/sequence.go
<ide> func (h *Handle) set(ordinal uint32, any bool, release bool) (uint32, error) {
<ide> return ret, err
<ide> }
<ide>
<del> // Create a private copy of h and work on it, also copy the current db index
<add> // Create a private copy of h and work on it
<ide> nh := h.... | 1 |
Text | Text | add example to `recipes` section | e70c59517bba73874c06cc426fd927e618f03219 | <ide><path>readme.md
<ide> For the production deployment, you can use the [path alias](https://zeit.co/docs
<ide> - [Setting up 301 redirects](https://www.raygesualdo.com/posts/301-redirects-with-nextjs/)
<ide> - [Dealing with SSR and server only modules](https://arunoda.me/blog/ssr-and-server-only-modules)
<ide> - [Bu... | 1 |
Ruby | Ruby | fix exception translation | 1543863548bcd7515fac7b7b1931b6e23fedf80f | <ide><path>activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
<ide> def close
<ide>
<ide> protected
<ide>
<del> def translate_exception(e, sql)
<add> def translate_exception_class(e, sql)
<ide> message = "#{e.class.name}: #{e.message}: #{sql}"
<ide> @logger.error me... | 2 |
PHP | PHP | fix bug in validate_mimes method | 9f78c8be9033ce5461da5de2d8d86dff8c65f4ea | <ide><path>laravel/validation/validator.php
<ide> protected function validate_active_url($attribute, $value)
<ide> */
<ide> protected function validate_image($attribute, $value)
<ide> {
<del> return $this->validate_mimes($attribute, array('jpg', 'png', 'gif', 'bmp'));
<add> return $this->validate_mimes($attribute... | 1 |
PHP | PHP | remove redundant condition | 9a805d3dac8208b7450b22717a0bfc6e16e030d0 | <ide><path>src/Illuminate/Routing/CompiledRouteCollection.php
<ide> public function match(Request $request)
<ide> try {
<ide> $dynamicRoute = $this->routes->match($request);
<ide>
<del> if (! $dynamicRoute->isFallback || ! $route->isFallback) {
<add> if (! $dyn... | 1 |
Javascript | Javascript | allow suspend compilation | df27a5e2bdce70280c0ae540bead993b7ef7e2b5 | <ide><path>lib/MultiWatching.js
<ide> class MultiWatching {
<ide> }
<ide> }
<ide>
<add> suspend() {
<add> for (const watching of this.watchings) {
<add> watching.suspend();
<add> }
<add> }
<add>
<add> resume() {
<add> for (const watching of this.watchings) {
<add> watching.resume();
<add> }
<add> }
<add>
<i... | 2 |
PHP | PHP | remove unused var | a86665aee4bed73272b0b0365b73060db6dee984 | <ide><path>src/Illuminate/Database/Concerns/ManagesTransactions.php
<ide> public function transaction(Closure $callback, $attempts = 1)
<ide> // catch any exception we can rollback this transaction so that none of this
<ide> // gets actually persisted to a database or stored in a permanent fashi... | 1 |
Ruby | Ruby | fix the tests after e594000 | 61a51a5ea356bbe6e6d0bc41e9334d384b4f2c73 | <ide><path>railties/test/generators/app_generator_test.rb
<ide> def test_web_console_with_dev_option
<ide>
<ide> assert_file "Gemfile" do |content|
<ide> assert_match(/gem 'web-console',\s+github: 'rails\/web-console'/, content)
<del> assert_no_match(/gem 'web-console'/, content)
<add> assert_no_ma... | 1 |
PHP | PHP | add missing @throws in phpdocs | 3630964f96b8daf9f1bfa730564b4a10c9a5f7f4 | <ide><path>src/Controller/Controller.php
<ide> public function paginate($object = null, array $settings = [])
<ide> *
<ide> * @param string $action The action to check.
<ide> * @return bool Whether or not the method is accessible from a URL.
<add> * @throws ReflectionException
<ide> */
<ide> ... | 23 |
Java | Java | log getconstants for java modules | 50de41d5d68bc2c28c4cc777ff9f3d041f960df3 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarkerConstants.java
<ide> public class ReactMarkerConstants {
<ide> "CREATE_I18N_ASSETS_MODULE_START";
<ide> public static final String CREATE_I18N_ASSETS_MODULE_END =
<ide> "CREATE_I18N_ASSETS_MODULE_END";
<add> public static final String... | 2 |
Go | Go | use pointers for the object methods | f35f084059e5c34940f74f55ad32ecfcd78ce61c | <ide><path>builder_client.go
<ide> type builderClient struct {
<ide> needCommit bool
<ide> }
<ide>
<del>func (b builderClient) clearTmp(containers, images map[string]struct{}) {
<add>func (b *builderClient) clearTmp(containers, images map[string]struct{}) {
<ide> for c := range containers {
<ide> if _, _, err := b... | 1 |
Java | Java | fix race condition in partgenerator | 4c0ece944aad373adea3a85874552ae982c989d7 | <ide><path>spring-web/src/main/java/org/springframework/http/codec/multipart/PartGenerator.java
<ide> public void body(DataBuffer dataBuffer) {
<ide>
<ide> @Override
<ide> public void partComplete(boolean finalPart) {
<del> this.completed = true;
<del> this.finalPart = finalPart;
<add> State state = PartGene... | 1 |
PHP | PHP | use typehints instead of explicit type checks | 47220c90173834377eb382a5a885aef7f15c6c44 | <ide><path>src/View/Helper/FormHelper.php
<ide> public function widget(string $name, array $data = []): string
<ide> $secure = $data['secure'];
<ide> unset($data['secure']);
<ide> }
<del> /** @var \Cake\View\Widget\WidgetInterface $widget */
<ide> $widget = $this->_locator... | 3 |
Python | Python | fix example in wav2vec2 documentation | 4ed763779e808591206b3ffb435a7ecf4063886f | <ide><path>src/transformers/models/wav2vec2/modeling_wav2vec2.py
<ide> def forward(
<ide>
<ide> Example::
<ide>
<del> >>> from transformers import Wav2Vec2Tokenizer, Wav2Vec2Model
<add> >>> import torch
<add> >>> from transformers import Wav2Vec2Tokenizer, Wav2Vec2ForCTC
<ide>... | 1 |
Ruby | Ruby | add a test | b06fceda57ea8306e130ba11ccb2bd71f6907c23 | <ide><path>Library/Homebrew/cmd/search.rb
<ide> def search
<ide> result = Formulary.factory(query).name
<ide> results = Array(result)
<ide> rescue FormulaUnavailableError
<del> results = search_taps(query)
<add> results = search_taps(query.split('/')[-1])
<ide> end
<ide>
<ide>... | 2 |
Ruby | Ruby | remove call to source index | fe5a6ec45fed40f784ee3daede9d0a5e61fdf1f1 | <ide><path>load_paths.rb
<ide> # bust gem prelude
<ide> if defined? Gem
<del> Gem.source_index
<ide> gem 'bundler'
<ide> else
<ide> require 'rubygems'
<ide> end
<ide> require 'bundler'
<del>Bundler.setup
<ide>\ No newline at end of file
<add>Bundler.setup | 1 |
Javascript | Javascript | add spacings to instancedbuffergeometry | 41789c1aef9c89a01af1a74b41346de103b03a93 | <ide><path>test/unit/core/InstancedBufferGeometry.js
<ide> module( "InstancedBufferGeometry" );
<ide> function createClonableMock() {
<ide> return {
<ide> callCount: 0,
<add>
<ide> clone: function() {
<ide> this.callCount++;
<add>
<ide> return this;
<ide> }
<ide> }
<ide> test( "copy", function() {
<ide>
... | 1 |
Javascript | Javascript | add test for rebind | a0e3e84972f3ca30e0ed4acfb62433b174119a69 | <ide><path>test/core/rebind-test.js
<add>require("../env");
<add>require("../../d3");
<add>
<add>var vows = require("vows"),
<add> assert = require("assert");
<add>
<add>var suite = vows.describe("d3.rebind");
<add>
<add>suite.addBatch({
<add> "rebind": {
<add> topic: function() {
<add> return d3.rebind;
<a... | 1 |
Python | Python | fix weight saving in batchnormalization | 4e1ec93c2f0fcf432e74e3bcbf8eba89ac843cec | <ide><path>keras/layers/normalization.py
<ide> from ..layers.core import Layer
<del>from ..utils.theano_utils import shared_zeros, shared_ones, ndim_tensor
<add>from ..utils.theano_utils import shared_zeros, shared_ones, ndim_tensor, floatX
<ide> from .. import initializations
<ide>
<ide> import theano.tensor as T
<id... | 2 |
Text | Text | fix typo in linkinglibraries.md | d3119a8fb1243dc127df8890f22b8aa9c0d46ed0 | <ide><path>docs/LinkingLibraries.md
<ide> on Xcode);
<ide>
<ide> Click on your main project file (the one that represents the `.xcodeproj`)
<ide> select `Build Phases` and drag the static library from the `Products` folder
<del>insed the Library you are importing to `Link Binary With Libraries`
<add>inside the Library... | 1 |
Python | Python | clarify svd documentation | 40747ae50620631941e43dbbd5baaccab669922f | <ide><path>numpy/linalg/linalg.py
<ide> def svd(a, full_matrices=True, compute_uv=True, hermitian=False):
<ide> """
<ide> Singular Value Decomposition.
<ide>
<del> When `a` is a 2D array, it is factorized as ``u @ np.diag(s) @ vh
<del> = (u * s) @ vh``, where `u` and `vh` are 2D unitary arrays and `s` is... | 1 |
Javascript | Javascript | add jsdoc typings for events | 5ce015ec72be98f064041d1bf5c3527a89c276cc | <ide><path>lib/events.js
<ide> const kMaxEventTargetListeners = Symbol('events.maxEventTargetListeners');
<ide> const kMaxEventTargetListenersWarned =
<ide> Symbol('events.maxEventTargetListenersWarned');
<ide>
<add>/**
<add> * Creates a new `EventEmitter` instance.
<add> * @param {{ captureRejections?: boolean; }} ... | 1 |
Ruby | Ruby | pull template check up to match existing behavior | ec8e0bc89ab71ed41b4e8d5234b5e09ba93480e9 | <ide><path>actionview/lib/action_view/digestor.rb
<ide> def compute_and_store_digest(cache_key, name, finder, options) # called under @@
<ide> end
<ide> end
<ide>
<del> EMPTY = Class.new {
<del> def name; 'missing'; end
<del> def digest; ''; end
<del> }.new
<del>
<ide> def self.tree(nam... | 2 |
PHP | PHP | add missing stub file | 1a364bc8eb7121d595697435b2f5046d3e3856ec | <ide><path>tests/test_app/TestApp/Routing/Filter/AppendFilter.php
<add><?php
<add>namespace TestApp\Routing\Filter;
<add>
<add>use Cake\Event\Event;
<add>use Cake\Network\Response;
<add>use Cake\Routing\DispatcherFilter;
<add>
<add>class AppendFilter extends DispatcherFilter
<add>{
<add> public function afterDispatc... | 1 |
Python | Python | show images from google query | 152261765a93c2a12eb4af0abdd297652766d47d | <ide><path>web_programming/download_images_from_google_query.py
<add>import json
<add>import os
<add>import re
<add>import sys
<add>import urllib.request
<add>
<add>import requests
<add>from bs4 import BeautifulSoup
<add>
<add>headers = {
<add> "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537... | 1 |
Python | Python | remove unused variable | 5e32ad607e852ee2358352734c63fa6d7995a186 | <ide><path>numpy/core/numerictypes.py
<ide> def sctype2char(sctype):
<ide> for key in _sctype2char_dict.keys():
<ide> cast[key] = lambda x, k=key : array(x, copy=False).astype(k)
<ide>
<del>
<del>_unicodesize = array('u','U1').itemsize
<del>
<ide> # Create the typestring lookup dictionary
<ide> _typestr = _typedic... | 1 |
Python | Python | remove redundant setting of no_args_is_help | d23be563eb8ee4e72b9389e675a7e4dcb7140941 | <ide><path>spacy/cli/project.py
<ide> def project_update_dvc_cli(
<ide> msg.info(f"No changes found in {CONFIG_FILE}, no update needed")
<ide>
<ide>
<del>app.add_typer(project_cli, name="project", no_args_is_help=True)
<add>app.add_typer(project_cli, name="project")
<ide>
<ide>
<ide> ################# | 1 |
Python | Python | fix memory leak in tensorflow backend | 80b72fa7b3ac69f821ea63a1e2a92412da188117 | <ide><path>keras/backend/tensorflow_backend.py
<ide> def clear_session():
<ide> reset_uids()
<ide> _SESSION = None
<ide> phase = tf.placeholder(dtype='bool', name='keras_learning_phase')
<add> _GRAPH_LEARNING_PHASES = {}
<ide> _GRAPH_LEARNING_PHASES[tf.get_default_graph()] = phase
<ide>
<ide> | 1 |
PHP | PHP | fix wherenull short-cut | 02920076c104b0318a6135e5e7fe230f81fc0ad9 | <ide><path>src/Illuminate/Database/Query/Builder.php
<ide> public function where($column, $operator = null, $value = null, $boolean = 'and'
<ide> // that method for convenience so the developer doesn't have to check.
<ide> if (is_null($value))
<ide> {
<del> return $this->whereNull($column, $boolean);
<add> re... | 1 |
Text | Text | fix specifier example in `esm.md` | 923f355855ac13545c5c61526c751eaae2975c1b | <ide><path>doc/api/esm.md
<ide> This section was moved to [Modules: Packages](packages.md).
<ide> ### Terminology
<ide>
<ide> The _specifier_ of an `import` statement is the string after the `from` keyword,
<del>e.g. `'path'` in `import { sep } from 'node:path'`. Specifiers are also used in
<del>`export from` statemen... | 1 |
Javascript | Javascript | add deprecation fixture | fce7c958ed42664923161c48bab36700631cefd2 | <ide><path>test/fixtures/deprecated.js
<add>require('util').p('This is deprecated'); | 1 |
Python | Python | add ukrainian unicode | 402d133c906aad322e2aad2b9bcda209d4283b7e | <ide><path>spacy/lang/char_classes.py
<ide> _tatar_upper = r"ӘӨҮҖҢҺ"
<ide> _greek_lower = r"α-ωάέίόώήύ"
<ide> _greek_upper = r"Α-ΩΆΈΊΌΏΉΎ"
<add>_ukrainian_lower = r"а-щюяіїєґ"
<add>_ukrainian_upper = r"А-ЩЮЯІЇЄҐ"
<ide>
<del>_upper = _latin_upper + _russian_upper + _tatar_upper + _greek_upper
<del>_lower = _latin_lower... | 1 |
Python | Python | authorize args when instantiating an automodel | ae6ce28f31974b64deb1c4d053704533ba8fed4b | <ide><path>src/transformers/models/auto/auto_factory.py
<ide> class _BaseAutoModelClass:
<ide> # Base class for auto models.
<ide> _model_mapping = None
<ide>
<del> def __init__(self):
<add> def __init__(self, *args, **kwargs):
<ide> raise EnvironmentError(
<ide> f"{self.__class__.__n... | 1 |
Ruby | Ruby | remove dead code | 3e35aacbbb4f0bc9d8408aa401d5be530aa218a4 | <ide><path>Library/Homebrew/formula_installer.rb
<ide> def install
<ide> opoo e.message
<ide> end
<ide>
<del> stdlibs = Keg.new(f.prefix).detect_cxx_stdlibs :skip_executables => true
<ide> tab = Tab.for_keg f.prefix
<ide> tab.poured_from_bottle = true
<ide> tab.write | 1 |
PHP | PHP | correct variable to unify it across the core | 75473706191acfb6134bf72ed3f598cf96fe0d86 | <ide><path>src/Controller/Component/Auth/CrudAuthorize.php
<ide> class CrudAuthorize extends BaseAuthorize {
<ide> * Sets up additional actionMap values that match the configured `Routing.prefixes`.
<ide> *
<ide> * @param ComponentRegistry $registry The component registry from the controller.
<del> * @param array $c... | 1 |
Python | Python | update minor version number to 9 | 4d5ac6936c980f8a283c44a622e414706215d269 | <ide><path>setup.py
<ide> AUTHOR_EMAIL = "oliphant@enthought.com"
<ide> PLATFORMS = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"]
<ide> MAJOR = 1
<del>MINOR = 8
<add>MINOR = 9
<ide> MICRO = 0
<ide> ISRELEASED = False
<ide> VERSION ... | 1 |
Javascript | Javascript | extend timeouts for armv6 | f9b226c1c1e5bfbf355f9fabe03e50333676cc05 | <ide><path>test/common.js
<ide> exports.platformTimeout = function(ms) {
<ide> return ms;
<ide>
<ide> if (process.config.variables.arm_version === '6')
<del> return 6 * ms; // ARMv6
<add> return 7 * ms; // ARMv6
<ide>
<ide> return 2 * ms; // ARMv7 and up.
<ide> };
<ide><path>test/parallel/test-child-... | 4 |
Java | Java | fix typos in javadoc | 2522fe029208b857e7b50c6621c12bfad1fd3dd0 | <ide><path>spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DatabaseClient.java
<ide> public interface DatabaseClient extends ConnectionAccessor {
<ide>
<ide> /**
<ide> * Specify a {@link Supplier SQL supplier} that provides SQL to run.
<del> * Contract for specifying a SQL call along with options leading... | 2 |
Javascript | Javascript | throw invalid argument errors | 1f209129c7e6c3ec6628809821fc9a36deae7ec8 | <ide><path>lib/_stream_writable.js
<ide> Writable.prototype.write = function(chunk, encoding, cb) {
<ide> cb = nop;
<ide> }
<ide>
<del> let err;
<del> if (state.ending) {
<del> err = new ERR_STREAM_WRITE_AFTER_END();
<del> } else if (state.destroyed) {
<del> err = new ERR_STREAM_DESTROYED('write');
<d... | 10 |
Python | Python | fix shapes in model docstrings | 426b96230a71f3c6e4decabae131c6e4f8bf4f5c | <ide><path>src/transformers/models/bart/modeling_bart.py
<ide> def forward(
<ide> ):
<ide> """
<ide> Args:
<del> hidden_states (`torch.FloatTensor`): input to the layer of shape *(seq_len, batch, embed_dim)*
<add> hidden_states (`torch.FloatTensor`): input to the layer of shape... | 3 |
Javascript | Javascript | add support for additional euler rotation orders | 0825c1f612f9b77c6e6926ebb07aa839d92b9043 | <ide><path>src/core/Matrix4.js
<ide> THREE.Matrix4.prototype = {
<ide>
<ide> },
<ide>
<del> setRotationFromEuler: function( v ) {
<add> setRotationFromEuler: function( v, order ) {
<ide>
<ide> var x = v.x, y = v.y, z = v.z,
<ide> a = Math.cos( x ), b = Math.sin( x ),
<ide> c = Math.cos( y ), d = Math.sin( y )... | 2 |
Text | Text | update the document error | edf0da968ca8d653a6e4c9333e55530305cb3625 | <ide><path>experimental/vlan-networks.md
<ide>
<ide> The Macvlan and Ipvlan drivers are currently in experimental mode in order to incubate Docker users use cases and vet the implementation to ensure a hardened, production ready driver in a future release. Libnetwork now gives users total control over both IPv4 and IP... | 1 |
Text | Text | fix mistakes in the custom server doc | a3925b5865f6959ed1334e2a707279437fcb3b89 | <ide><path>docs/advanced-features/custom-server.md
<ide> description: Start a Next.js app programmatically using a custom server.
<ide>
<ide> Typically you start your next server with `next start`. It's possible, however, to start a server 100% programmatically in order to use custom route patterns.
<ide>
<del>> Befo... | 1 |
PHP | PHP | set default value for property | c93c821b5777c0008d8616ef54ce973e978e4948 | <ide><path>src/Http/Runner.php
<ide> class Runner implements RequestHandlerInterface
<ide> *
<ide> * @var int
<ide> */
<del> protected $index;
<add> protected $index = 0;
<ide>
<ide> /**
<ide> * The middleware queue being run. | 1 |
Ruby | Ruby | add comment for image-spec pin | ecc705803f0d78b5a702a313d247c59135016347 | <ide><path>Library/Homebrew/github_packages.rb
<ide> def load_schemas!
<ide> end
<ide>
<ide> def schema_uri(basename, uris)
<add> # The current `main` version has an invalid JSON schema.
<add> # Going forward, this should probably be pinned to tags.
<add> # We currently use features newer than the last on... | 1 |
Go | Go | remove unused functions parameters | 723f587b56b940ac5ea79e567b47da91270955b1 | <ide><path>graph/graph.go
<ide> func (graph *Graph) Register(img *image.Image, layerData io.Reader) (err error)
<ide> // (FIXME: make that mandatory for drivers).
<ide> graph.driver.Remove(img.ID)
<ide>
<del> tmp, err := graph.mktemp("")
<add> tmp, err := graph.mktemp()
<ide> defer os.RemoveAll(tmp)
<ide> if err !... | 3 |
Ruby | Ruby | restore connection pools after transactional tests | 054e19d08638e64fa9eacc9be32fb7fde4e7415c | <ide><path>activerecord/lib/active_record/test_fixtures.rb
<ide> def setup_fixtures(config = ActiveRecord::Base)
<ide>
<ide> # Load fixtures once and begin transaction.
<ide> if run_in_transaction?
<add> @legacy_saved_pool_configs = Hash.new { |hash, key| hash[key] = {} }
<add> @saved_pool_co... | 2 |
Javascript | Javascript | fix ember.setpath when used on ember.namespaces | 7049d29b8abab8f72117e6b99739cda97f7d59fb | <ide><path>packages/ember-metal/lib/accessors.js
<ide> Ember.getPath = function(root, path) {
<ide> Ember.setPath = function(root, path, value, tolerant) {
<ide> var keyName;
<ide>
<del> if (IS_GLOBAL.test(root)) {
<add> if (typeof root === 'string' && IS_GLOBAL.test(root)) {
<ide> value = path;
<ide> path... | 2 |
Python | Python | add flax mbart in auto seq2seq lm | fc3551a6d72e4126068aa2adf6fc8cb1cf1941ce | <ide><path>src/transformers/models/auto/modeling_flax_auto.py
<ide> [
<ide> # Model for Seq2Seq Causal LM mapping
<ide> ("bart", "FlaxBartForConditionalGeneration"),
<add> ("mbart", "FlaxMBartForConditionalGeneration"),
<ide> ("t5", "FlaxT5ForConditionalGeneration"),
<ide> ("m... | 1 |
Ruby | Ruby | enable deterministic archive generation | 6337dbfac948e3c5fbfc25477fbe33d5b2b41703 | <ide><path>Library/Homebrew/extend/os/mac/extend/ENV/super.rb
<ide> def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_a
<ide> # The tools in /usr/bin proxy to the active developer directory.
<ide> # This means we can use them for any combination of CLT and Xcode.
<ide> self["HOM... | 1 |
Python | Python | validate the return code of `test_full_reimport` | 1ff314dc000cb0a7a1bb2823d3bc3ac4171f9d16 | <ide><path>numpy/tests/test_reloading.py
<ide> def test_full_reimport():
<ide> with warns(UserWarning):
<ide> import numpy as np
<ide> """)
<del> p = subprocess.run([sys.executable, '-c', code])
<del>
<add> p = subprocess.run([sys.executable, '-c', code], capture_output=True)
<add> ... | 1 |
Python | Python | replace filters with list comprehensions | 9a73697c70e667c4655a01d3f76e5a9e850f1798 | <ide><path>numpy/distutils/command/build_py.py
<ide> def find_package_modules(self, package, package_dir):
<ide>
<ide> def find_modules(self):
<ide> old_py_modules = self.py_modules[:]
<del> new_py_modules = list(filter(is_string, self.py_modules))
<add> new_py_modules = [_m for _m in self.py... | 5 |
PHP | PHP | clarify description of method | d11cf5f86d90f40c5cb1837cb3820148005517a0 | <ide><path>src/Illuminate/Database/Query/Builder.php
<ide> public function getCountForPagination($columns = ['*'])
<ide> }
<ide>
<ide> /**
<del> * Backup some fields for the pagination count.
<add> * Backup then remove some fields for the pagination count.
<ide> *
<ide> * @return void
<ide> ... | 1 |
Javascript | Javascript | remove unused flag | ed00d2c3d8e39c214bb749dc8a520a4a695c19fd | <ide><path>packages/shared/ReactFeatureFlags.js
<ide> export const enableUseRefAccessWarning = false;
<ide>
<ide> export const warnAboutCallbackRefReturningFunction = false;
<ide>
<del>export const enableRecursiveCommitTraversal = false;
<del>
<ide> export const disableSchedulerTimeoutInWorkLoop = false;
<ide>
<ide>... | 9 |
Ruby | Ruby | add test case to test enum in has_many | eed8b23318c03feb403498fcdea40edeee0532dc | <ide><path>activerecord/test/cases/associations/has_many_associations_test.rb
<ide> require "models/image"
<ide> require "models/post"
<ide> require "models/author"
<add>require "models/book"
<ide> require "models/essay"
<ide> require "models/comment"
<ide> require "models/person"
<ide> def test_association_protect_for... | 1 |
Javascript | Javascript | improve the ng-view docs | 7f6c1093f5691bee2fbddca63879d1660620bf2e | <ide><path>src/widgets.js
<ide> var ngNonBindableDirective = ngDirective({ terminal: true });
<ide> * Every time the current route changes, the included view changes with it according to the
<ide> * configuration of the `$route` service.
<ide> *
<del> *
<add> * @scope
<ide> * @example
<ide> <doc:example module=... | 1 |
Python | Python | remove checks for presence of decimal module | 4d686a1e44462c34b60de9049dd499aed60de643 | <ide><path>numpy/core/tests/test_multiarray.py
<ide> def test_broadcast2(self):
<ide> A = np.choose(self.ind, (self.x, self.y2))
<ide> assert_equal(A, [[2, 2, 3], [2, 2, 3]])
<ide>
<del>def can_use_decimal():
<del> try:
<del> from decimal import Decimal
<del> return True
<del> excep... | 1 |
Text | Text | fix typo in repl docs | 287f21e31dafce2cf10fc7e349dbd26ebb392a08 | <ide><path>doc/api/repl.md
<ide> within the action function for commands registered using the
<ide> added: v9.0.0
<ide> -->
<ide>
<del>The `replServer.clearBufferedComand()` method clears any command that has been
<add>The `replServer.clearBufferedCommand()` method clears any command that has been
<ide> buffered but n... | 1 |
PHP | PHP | fix syntax error | 1302781959ae78229c4f402c21fbd6bd327c8121 | <ide><path>src/Illuminate/Foundation/EventCache.php
<ide> class EventCache {
<ide> *
<ide> * @var string
<ide> */
<del> protected $stub = "$events->listen('{{event}}', '{{handler}}');";
<add> protected $stub = '$events->listen(\'{{event}}\', \'{{handler}}\');';
<ide>
<ide> /**
<ide> * Create a new event cache... | 1 |
Python | Python | update code style for project euler problem 28 | 05616ca38eec9fba5a21544aa03dba96e6f6efc6 | <ide><path>project_euler/problem_28/sol1.py
<ide> """
<add>Problem 28
<add>Url: https://projecteuler.net/problem=28
<add>Statement:
<ide> Starting with the number 1 and moving to the right in a clockwise direction a 5
<ide> by 5 spiral is formed as follows:
<ide>
<ide> from math import ceil
<ide>
<ide>
<del>def diag... | 1 |
Javascript | Javascript | move the rasterization logic into one single class | 03506f25c0ca8fc81e36bfe584e9359e566b82db | <ide><path>test/driver.js
<ide> const {
<ide> GlobalWorkerOptions,
<ide> PixelsPerInch,
<ide> renderTextLayer,
<add> shadow,
<ide> XfaLayer,
<ide> } = pdfjsLib;
<ide> const { SimpleLinkService } = pdfjsViewer;
<ide> const RENDER_TASK_ON_CONTINUE_DELAY = 5; // ms
<ide> const SVG_NS = "http://www.w3.org/2000/svg... | 1 |
Javascript | Javascript | improve unit test coverage for primitives | 550a38f1bafd78d0caaa8d67c4b8b404c9b02e26 | <ide><path>test/unit/primitives_spec.js
<ide> import {
<ide> Cmd,
<ide> Dict,
<add> EOF,
<ide> isCmd,
<ide> isDict,
<add> isEOF,
<ide> isName,
<ide> isRef,
<ide> isRefsEqual,
<add> isStream,
<ide> Name,
<ide> Ref,
<ide> RefSet,
<ide> } from "../../src/core/primitives.js";
<add>import { StringStre... | 1 |
Javascript | Javascript | outgoingmessage change writable after end | 649d77bbf4e01e3dd3799ff8ca8d190641c9f4da | <ide><path>lib/_http_outgoing.js
<ide> OutgoingMessage.prototype.end = function end(chunk, encoding, callback) {
<ide> this.connection.uncork();
<ide>
<ide> this.finished = true;
<add> this.writable = false;
<ide>
<ide> // There is the first message on the outgoing queue, and we've sent
<ide> // everything... | 3 |
PHP | PHP | fix doc block | 66dc497a5e9511b1de6539c4bbf9c1e83fe572f7 | <ide><path>src/Http/Client/Adapter/Curl.php
<ide> public function buildOptions(Request $request, array $options)
<ide> *
<ide> * @param resource $handle Curl handle
<ide> * @param string $responseData string The response data from curl_exec
<del> * @return \Cake\Http\Client\Response[]
<add> * @re... | 1 |
Python | Python | fix double paste | 982a5504d5879b3cfdb051f452f4573e35623fc3 | <ide><path>research/audioset/mel_features.py
<ide> def spectrogram_to_mel_matrix(num_mel_bins=20,
<ide> ValueError: if frequency edges are incorrectly ordered.
<ide> """
<ide> nyquist_hertz = audio_sample_rate / 2.
<del> if upper_edge_hertz > nyquist_hertz:
<del> raise ValueError("upper_edge_hertz %.1f is g... | 1 |
Javascript | Javascript | improve swipeablelistview performance | c779e233b693233d614be4b24bd896cb10f1833c | <ide><path>Libraries/Experimental/SwipeableRow/SwipeableListView.js
<ide> const SwipeableListView = React.createClass({
<ide> _listViewRef: (null: ?string),
<ide>
<ide> propTypes: {
<del> dataSource: PropTypes.object.isRequired, // SwipeableListViewDataSource
<add> dataSource: PropTypes.instanceOf(SwipeableL... | 3 |
PHP | PHP | use collection count() function | 107fb475f35f0691fe08facb697eda47f6cc7f3b | <ide><path>src/Illuminate/Pagination/Paginator.php
<ide> protected function setItems($items)
<ide> {
<ide> $this->items = $items instanceof Collection ? $items : Collection::make($items);
<ide>
<del> $this->hasMore = count($this->items) > ($this->perPage);
<add> $this->hasMore = $this->items-... | 1 |
Javascript | Javascript | move require.resolve into the module scope | e9e8e8b423c9c59f1a54db35d282ff20c825a949 | <ide><path>packages/next/build/swc/options.js
<ide> const nextDistPath =
<ide> /(next[\\/]dist[\\/]shared[\\/]lib)|(next[\\/]dist[\\/]client)|(next[\\/]dist[\\/]pages)/
<ide>
<add>const regeneratorRuntimePath = require.resolve('regenerator-runtime')
<add>
<ide> function getBaseSWCOptions({
<ide> filename,
<ide> ... | 1 |
Javascript | Javascript | fix reinjection check | 1f703e120403d41d4f274ad9d30a9512788e5edc | <ide><path>lib/internal/http2/core.js
<ide> function connect(authority, options, listener) {
<ide> debug('Http2Session connect', options.createConnection);
<ide> // Socket already has some buffered data - emulate receiving it
<ide> // https://github.com/nodejs/node/issues/35475
<del> if (typeof options.createCon... | 1 |
Ruby | Ruby | remove unintentional api changes. [] | d5921cdb7a00b393d0ba5f2f795da60a33b11cf1 | <ide><path>activerecord/lib/active_record/associations/association_collection.rb
<ide> def load_target
<ide> end
<ide>
<ide> def method_missing(method, *args)
<del> case method.to_s
<del> when 'find_or_create'
<del> return find(:first, :conditions => args.first) || create(a... | 3 |
Python | Python | fix create_tokenizer when nlp is none | 1f6c37c6f5bb733bea076ebd21d59e9ad62af2eb | <ide><path>spacy/language.py
<ide> def create_tokenizer(cls, nlp=None):
<ide> else:
<ide> infix_finditer = None
<ide> vocab = nlp.vocab if nlp is not None else cls.create_vocab(nlp)
<del> return Tokenizer(nlp.vocab, rules=rules,
<add> return Tokenizer(vocab, rules=rules,
<ide> ... | 1 |
Ruby | Ruby | push string handling to the builder object | 3095f5ba38a7c230d5732af0128d9ddd7142ff7f | <ide><path>actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
<ide> def polymorphic_url(record_or_hash_or_array, options = {})
<ide> method, args = builder.handle_model record, prefix, suffix
<ide>
<ide> when String, Symbol
<del> method, args = handle_string record_or_hash_or_array... | 1 |
Python | Python | add tests for the `np.core.function_base` stubs | 9677fad41873ee3b2bb6f2130c9cbd197903d0b1 | <ide><path>numpy/tests/typing/fail/linspace.py
<add>import numpy as np
<add>
<add>np.linspace(None, 'bob') # E: No overload variant
<add>np.linspace(0, 2, num=10.0) # E: No overload variant
<add>np.linspace(0, 2, endpoint='True') # E: No overload variant
<add>np.linspace(0, 2, retstep=b'False') # E: No overload var... | 3 |
Go | Go | remove log warning on task update | 39c93cfb47783f2531ba44f062fd9a8b351d2224 | <ide><path>daemon/cluster/executor/container/controller.go
<ide> func (r *controller) ContainerStatus(ctx context.Context) (*api.ContainerStatus,
<ide>
<ide> // Update tasks a recent task update and applies it to the container.
<ide> func (r *controller) Update(ctx context.Context, t *api.Task) error {
<del> log.G(ctx... | 1 |
Ruby | Ruby | remove sqlite version support caveats [ci skip] | b608ee88e9c0d8058ee4964dcb6a603b85505d25 | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
<ide> def truncate_tables(*table_names) # :nodoc:
<ide> # In order to get around this problem, #transaction will emulate the effect
<ide> # of nested transactions, by using savepoints:
<ide> # https://dev.mys... | 4 |
Javascript | Javascript | destroy instance before application | bff547d15646b3fba3a5700b5ca16f0adfc39f2c | <ide><path>blueprints/instance-initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js
<ide> module('<%= friendlyTestName %>', function(hooks) {
<ide> this.instance = this.application.buildInstance();
<ide> });
<ide> hooks.afterEach(function() {
<del> <% if (destroyAppExists) { %... | 3 |
Python | Python | fix typos of model name | 2472278cabc5a276b3ddfda86d8287c7c3607a7b | <ide><path>official/keras_application_models/dataset.py
<ide> from __future__ import print_function
<ide>
<ide> import tensorflow as tf
<del>
<ide> from official.utils.misc import model_helpers # pylint: disable=g-bad-import-order
<ide>
<ide> # Default values for dataset.
<ide> def _get_default_image_size(model):
<i... | 1 |
Javascript | Javascript | set current url, if not defined or empty string | 3171f215910255938c179d8243480fbaeebc77cf | <ide><path>src/service/httpBackend.js
<ide> function createHttpBackend($browser, XHR, $browserDefer, callbacks, body, locati
<ide> // TODO(vojta): fix the signature
<ide> return function(method, url, post, callback, headers, timeout) {
<ide> $browser.$$incOutstandingRequestCount();
<add> url = url || $browse... | 2 |
Text | Text | fix typo in "readonly" flag in documentation | ac12696ff48aeb115e3d9ce3b13cfa54342b5aee | <ide><path>docs/reference/commandline/dockerd.md
<ide> The following standard Docker features are currently incompatible when
<ide> running a Docker daemon with user namespaces enabled:
<ide>
<ide> - sharing PID or NET namespaces with the host (`--pid=host` or `--net=host`)
<del> - A `--readonly` container filesystem... | 1 |
PHP | PHP | add a method to get all subdirectories of a folder | a74d0567e4b3836ac9a4b7aecafb9bb5fefd1647 | <ide><path>src/Filesystem/Folder.php
<ide> public function chmod($path, $mode = false, $recursive = true, array $exceptions
<ide> return false;
<ide> }
<ide>
<add> /**
<add> * Returns an array of subdirectories for the provided or current path.
<add> *
<add> * @param string|null $path The di... | 2 |
Python | Python | modify centernet to output extracted features | d5ae12e1d4363f1b388390285ed40d3ac953d54a | <ide><path>research/object_detection/meta_architectures/center_net_meta_arch.py
<ide> def predict(self, preprocessed_inputs, _):
<ide> prediction_dict: a dictionary holding predicted tensors with
<ide> 'preprocessed_inputs' - The input image after being resized and
<ide> preprocessed by the feat... | 2 |
Ruby | Ruby | hide the deprecated methods from the docs | 72c51356c5e59c73710ee5f3feba57b52a38af81 | <ide><path>actionpack/lib/action_controller/assertions.rb
<ide> def assert_redirected_to(options = {}, message=nil)
<ide> end
<ide> end
<ide>
<del> # Asserts that the request was rendered with the appropriate template file
<del> def assert_template(expected=nil, message=nil)
<add> # Assert... | 2 |
Ruby | Ruby | add missing test cases for `attribute_method?` | 1c4fa54eec0b49f19ba0107a2028c354d60a9033 | <ide><path>activerecord/test/cases/attribute_methods_test.rb
<ide> def some_method_that_is_not_on_super
<ide> end
<ide> end
<ide>
<add> def test_attribute_method?
<add> assert @target.attribute_method?(:title)
<add> assert @target.attribute_method?(:title=)
<add> assert_not @target.attribute_method?(:w... | 1 |
Python | Python | fix resize_token_embeddings for transformer-xl | e80d6c689bd62f805a5c8d77ec0cc3b09f240d14 | <ide><path>src/transformers/modeling_transfo_xl.py
<ide>
<ide>
<ide> import logging
<add>from typing import Optional
<ide>
<ide> import torch
<ide> import torch.nn as nn
<ide> def _init_weights(self, m):
<ide> if hasattr(m, "r_bias"):
<ide> self._init_bias(m.r_bias)
<ide>
<add> def re... | 2 |
Javascript | Javascript | update nativearray documentation | 1fc88025c5427f120d7f46d2ebeced70a0484681 | <ide><path>packages/ember-runtime/lib/system/native_array.js
<ide> import copy from 'ember-runtime/copy';
<ide> Array support Ember.MutableArray and all of its dependent APIs. Unless you
<ide> have `Ember.EXTEND_PROTOTYPES` or `Ember.EXTEND_PROTOTYPES.Array` set to
<ide> false, this will be applied automatically.... | 1 |
Javascript | Javascript | change common.port to arbitrary port | 4f5685d233d45be2c25f89e8cb2e3d0b30989b3e | <ide><path>test/sequential/test-child-process-fork-getconnections.js
<ide> // USE OR OTHER DEALINGS IN THE SOFTWARE.
<ide>
<ide> 'use strict';
<del>const common = require('../common');
<add>require('../common');
<ide> const assert = require('assert');
<ide> const fork = require('child_process').fork;
<ide> const net =... | 1 |
PHP | PHP | fix return value | 7ce43078c2a46f7fcfc7f6f5b90fd3ff7a32f391 | <ide><path>src/Illuminate/View/Compilers/ComponentTagCompiler.php
<ide> protected function partitionDataAndAttributes($class, array $attributes)
<ide>
<ide> return collect($attributes)->partition(function ($value, $key) use ($parameterNames) {
<ide> return in_array(Str::camel($key), $parameterNames... | 1 |
Ruby | Ruby | add action cable test case and test helper | c11ca0996227ef6f3b6154e4742a9e03949557df | <ide><path>actioncable/lib/action_cable.rb
<ide> module ActionCable
<ide> autoload :Channel
<ide> autoload :RemoteConnections
<ide> autoload :SubscriptionAdapter
<add> autoload :TestHelper
<add> autoload :TestCase
<ide> end
<ide><path>actioncable/lib/action_cable/test_case.rb
<add># frozen_string_literal: true
... | 5 |
Python | Python | fix redundant callbacks issue | 0856266613bec67dc17b220136c3ccc079d68131 | <ide><path>keras/callbacks.py
<ide>
<ide> class CallbackList(object):
<ide>
<del> def __init__(self, callbacks, queue_length=10):
<del> self.callbacks = callbacks
<add> def __init__(self, callbacks=[], queue_length=10):
<add> self.callbacks = [c for c in callbacks]
<ide> self.queue_length ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.