hash stringlengths 40 40 | diff stringlengths 131 26.7k | message stringlengths 7 694 | project stringlengths 5 67 | split stringclasses 1 value | diff_languages stringlengths 2 24 |
|---|---|---|---|---|---|
ec705c51a171574820fb13d512de922f69735c97 | diff --git a/src/main/java/com/feedzai/commons/sql/abstraction/entry/EntityEntry.java b/src/main/java/com/feedzai/commons/sql/abstraction/entry/EntityEntry.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/feedzai/commons/sql/abstraction/entry/EntityEntry.java
+++ b/src/main/java/com/feedzai/commons/sql/abstraction/entry/EntityEntry.java
@@ -57,6 +57,7 @@ public class EntityEntry implements Serializable {
*
* @param k The key to check.
* @return {@code true} if the internal map contains the key, {@code false} otherwise.
+ * @since 2.0.1
*/
public boolean containsKey(final String k) {
return this.map.containsKey(k); | Forgot to add the @since tag to the new method. | feedzai_pdb | train | java |
844aea00c7207e6c4e4a517639ff43578c003ff2 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -39,8 +39,7 @@ setuptools.setup(
'turbolift',
'turbolift.authentication',
'turbolift.clouderator',
- 'turbolift.methods',
- 'turbolift.utils'
+ 'turbolift.methods'
],
url=turbolift.__url__,
install_requires=required, | fixed setup\n\nissue Related issue: #<I> | cloudnull_turbolift | train | py |
ef4c67ee2f50a1182bdbe5c4fcdf8cf489390af4 | diff --git a/pyocd/coresight/dap.py b/pyocd/coresight/dap.py
index <HASH>..<HASH> 100644
--- a/pyocd/coresight/dap.py
+++ b/pyocd/coresight/dap.py
@@ -288,8 +288,8 @@ class DebugPort(object):
def find_aps(self):
"""! @brief Find valid APs.
- Scans for valid APs starting at APSEL=0. The default behaviour is to stop the first time a
- 0 is returned when reading the AP's IDR. If the `probe_all_aps` user option is set to True,
+ Scans for valid APs starting at APSEL=0. The default behaviour is to stop after reading
+ 0 for the AP's IDR twice in succession. If the `probe_all_aps` user option is set to True,
then the scan will instead probe every APSEL from 0-255.
Note that a few MCUs will lock up when accessing invalid APs. Those MCUs will have to
@@ -300,13 +300,17 @@ class DebugPort(object):
return
apList = []
ap_num = 0
+ invalid_count = 0
while ap_num < MAX_APSEL:
try:
isValid = AccessPort.probe(self, ap_num)
if isValid:
+ invalid_count = 0
apList.append(ap_num)
elif not self.target.session.options.get('probe_all_aps'):
- break
+ invalid_count += 1
+ if invalid_count == 2:
+ break
except exceptions.Error as e:
LOG.error("Exception while probing AP#%d: %s", ap_num, e)
break | Only stop probing APs after detecting two invalid APs in sequence. | mbedmicro_pyOCD | train | py |
bb149c393fa51cfdecddd1706bff20bd4d27c2b8 | diff --git a/src/Session.php b/src/Session.php
index <HASH>..<HASH> 100644
--- a/src/Session.php
+++ b/src/Session.php
@@ -18,6 +18,8 @@ namespace Dframe;
class Session implements \Psr\SimpleCache\CacheInterface
{
protected $name;
+ protected $ipAddress;
+ protected $userAgent;
/**
* Session constructor.
@@ -26,7 +28,7 @@ class Session implements \Psr\SimpleCache\CacheInterface
*/
public function __construct($app = [])
{
- $options = $this->app->config['session'] ?? '';
+ $options = $this->app->config['session'] ?? [];
$this->name = APP_NAME ?? '_sessionName';
if (!isset($_SESSION)) {
@@ -102,14 +104,14 @@ class Session implements \Psr\SimpleCache\CacheInterface
}
/**
- * @param $key
- * @param bool $in
+ * @param $key
+ * @param array $in
*
* @return bool
*/
- public function keyExists($key, $in = false)
+ public function keyExists($key, $in = [])
{
- if (isset($in)) {
+ if (empty($in)) {
$in = $_SESSION;
} | Resolved #<I>, undefined properties getFingerprint method Dframe\Session class seems to be problematic | dframe_dframe | train | php |
ff5f0c9eb83bc2518db4b343e459165df3f0a700 | diff --git a/elasticsearch_dsl/document.py b/elasticsearch_dsl/document.py
index <HASH>..<HASH> 100644
--- a/elasticsearch_dsl/document.py
+++ b/elasticsearch_dsl/document.py
@@ -124,10 +124,10 @@ class DocType(ObjectBase):
cls._doc_type.init(index, using)
@classmethod
- def search(cls):
+ def search(cls, using=None, index=None):
return Search(
- using=cls._doc_type.using,
- index=cls._doc_type.index,
+ using=using or cls._doc_type.using,
+ index=index or cls._doc_type.index,
doc_type={cls._doc_type.name: cls.from_es},
) | Custom alias and index in DocType.search(). | elastic_elasticsearch-dsl-py | train | py |
7ee635745d92c158a122ba52540011930a22727d | diff --git a/DependencyInjection/KnpGaufretteExtension.php b/DependencyInjection/KnpGaufretteExtension.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/KnpGaufretteExtension.php
+++ b/DependencyInjection/KnpGaufretteExtension.php
@@ -45,6 +45,7 @@ class KnpGaufretteExtension extends Extension
}
$container->getDefinition('knp_gaufrette.filesystem_map')
+ ->setPublic(true)
->replaceArgument(0, $map);
if (isset($config['stream_wrapper'])) { | Make knp_gaufrette.filesystem_map public as well | KnpLabs_KnpGaufretteBundle | train | php |
94f8a459f4549ed81afdd908ca243d5ae989e175 | diff --git a/pygount/analysis.py b/pygount/analysis.py
index <HASH>..<HASH> 100644
--- a/pygount/analysis.py
+++ b/pygount/analysis.py
@@ -508,7 +508,7 @@ def source_analysis(
print('....')
assert lexer is not None
language = lexer.name
- if language == 'XML':
+ if ('xml' in language.lower()) or (language == 'Genshi'):
dialect = pygount.xmldialect.xml_dialect(source_path)
if dialect is not None:
language = dialect | Improved detection of XML dialects. | roskakori_pygount | train | py |
b852f8e333e48dbee5f4585640a021e15241b640 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
from setuptools import setup, find_packages
setup(name="tweepy",
- version="1.11",
+ version="1.12",
description="Twitter library for python",
license="MIT",
author="Joshua Roesslein",
diff --git a/tweepy/__init__.py b/tweepy/__init__.py
index <HASH>..<HASH> 100644
--- a/tweepy/__init__.py
+++ b/tweepy/__init__.py
@@ -5,7 +5,7 @@
"""
Tweepy Twitter API library
"""
-__version__ = '1.11'
+__version__ = '1.12'
__author__ = 'Joshua Roesslein'
__license__ = 'MIT' | Release <I>
[ci skip] | tweepy_tweepy | train | py,py |
d932f45ab749e19e67f34ab37e11e001d7f58179 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -190,6 +190,8 @@ prot._handleClose = function(evt) {
// emit the close and end events
this.emit('close');
this.emit('end');
+
+ return false;
};
prot._handleMessage = function(evt) { | Ensure the _handleClose function returns false which is passed back from _write calls | rtc-io_rtc-dcstream | train | js |
8d81fafbd1f2890a154a759d08391eeb76dc76d4 | diff --git a/db/migrate/20141012174250_create_authie_sessions.rb b/db/migrate/20141012174250_create_authie_sessions.rb
index <HASH>..<HASH> 100644
--- a/db/migrate/20141012174250_create_authie_sessions.rb
+++ b/db/migrate/20141012174250_create_authie_sessions.rb
@@ -11,7 +11,7 @@ class CreateAuthieSessions < ActiveRecord::Migration
t.datetime :last_activity_at
t.string :last_activity_ip, :last_activity_path
t.string :user_agent
- t.timestamps
+ t.timestamps :null => true
end
end
end | specify :null => true on timestamps to keep compatability with Rails 5 | adamcooke_authie | train | rb |
fc4357a8b09ec625c7d9b26c8903084a2215d1e0 | diff --git a/libcontainer/rootfs_linux.go b/libcontainer/rootfs_linux.go
index <HASH>..<HASH> 100644
--- a/libcontainer/rootfs_linux.go
+++ b/libcontainer/rootfs_linux.go
@@ -810,18 +810,10 @@ func msMoveRoot(rootfs string) error {
return err
}
- absRootfs, err := filepath.Abs(rootfs)
- if err != nil {
- return err
- }
-
for _, info := range mountinfos {
- p, err := filepath.Abs(info.Mountpoint)
- if err != nil {
- return err
- }
+ p := info.Mountpoint
// Umount every syfs and proc file systems, except those under the container rootfs
- if (info.Fstype != "proc" && info.Fstype != "sysfs") || filepath.HasPrefix(p, absRootfs) {
+ if (info.Fstype != "proc" && info.Fstype != "sysfs") || filepath.HasPrefix(p, rootfs) {
continue
}
// Be sure umount events are not propagated to the host. | libct/msMoveRoot: rm redundant filepath.Abs() calls
1. rootfs is already validated to be kosher by (*ConfigValidator).rootfs()
2. mount points from /proc/self/mountinfo are absolute and clean, too | opencontainers_runc | train | go |
c5dcb642dbb8265cc1fa87e89220cbf17f3e367a | diff --git a/theanets/feedforward.py b/theanets/feedforward.py
index <HASH>..<HASH> 100644
--- a/theanets/feedforward.py
+++ b/theanets/feedforward.py
@@ -117,7 +117,7 @@ class Network(object):
assert np.allclose(encode - decode[::-1], 0), error
sizes = layers[:k+1]
- _, parameter_count = self._create_forward_map(sizes, activation, **kwargs)
+ parameter_count = self._create_forward_map(sizes, activation, **kwargs)
# set up the "decoding" computations from layer activations to output.
w = len(self.weights) | Fix a bug in creating forward map! | lmjohns3_theanets | train | py |
38c930f0c00c0977c15fb3deab7f645f45ce798e | diff --git a/lib/run/index.js b/lib/run/index.js
index <HASH>..<HASH> 100644
--- a/lib/run/index.js
+++ b/lib/run/index.js
@@ -193,8 +193,7 @@ module.exports = function (options, callback) {
timings: Boolean(options.verbose),
extendedRootCA: options.sslExtraCaCerts
},
- certificates: (options.sslClientCertList || options.sslClientCert) &&
- new sdk.CertificateList({}, sslClientCertList)
+ certificates: sslClientCertList.length && new sdk.CertificateList({}, sslClientCertList)
}, function (err, run) {
if (err) { return callback(err); } | Update check for clientCertList while creating run | postmanlabs_newman | train | js |
8e22da9db28a0f3b8f06ea75913742d7e97d7ad6 | diff --git a/src/Generator/Generator.php b/src/Generator/Generator.php
index <HASH>..<HASH> 100644
--- a/src/Generator/Generator.php
+++ b/src/Generator/Generator.php
@@ -176,7 +176,11 @@ class Generator implements \JsonSerializable
*/
public function generatePackage()
{
- return $this->parse()->doGenerate();
+ return $this
+ ->doSanityChecks()
+ ->parse()
+ ->initDirectory()
+ ->doGenerate();
}
/**
* Only parses what has to be parsed, called before actually generating the package
@@ -184,7 +188,7 @@ class Generator implements \JsonSerializable
*/
public function parse()
{
- return $this->doSanityChecks()->initDirectory()->doParse();
+ return $this->doParse();
}
/**
* Gets the struct by its name | issue #<I> - review methods chaining | WsdlToPhp_PackageGenerator | train | php |
3fb07c0e3793a28e31c0bc75af7de7b7e86c998f | diff --git a/panasonic_viera/__main__.py b/panasonic_viera/__main__.py
index <HASH>..<HASH> 100644
--- a/panasonic_viera/__main__.py
+++ b/panasonic_viera/__main__.py
@@ -201,6 +201,8 @@ def main():
runner.command('volume_up', remote_control.volume_up)
runner.command('volume_down', remote_control.volume_down)
runner.command('mute_volume', remote_control.mute_volume)
+ runner.command('turn_off', remote_control.turn_off)
+ runner.command('turn_on', remote_control.turn_on)
runner.command('send_key', remote_control.send_key)
return Console(runner).run() | add turn off/on to cli | florianholzapfel_panasonic-viera | train | py |
6aed03aa20addbd782c7ffd692907be191ca888c | diff --git a/lib/twitter/exceptable.rb b/lib/twitter/exceptable.rb
index <HASH>..<HASH> 100644
--- a/lib/twitter/exceptable.rb
+++ b/lib/twitter/exceptable.rb
@@ -1,6 +1,8 @@
module Twitter
module Exceptable
+ private
+
# Return a hash that includes everything but the given keys.
#
# @param klass [Class] | Change Twitter::Exceptable method visibility to private | sferik_twitter | train | rb |
9b33c2256b1c92f5e422fee03e8c823be7511e90 | diff --git a/tests/unit/views/searchTest.php b/tests/unit/views/searchTest.php
index <HASH>..<HASH> 100644
--- a/tests/unit/views/searchTest.php
+++ b/tests/unit/views/searchTest.php
@@ -280,4 +280,16 @@ class Unit_Views_searchTest extends OxidTestCase
$this->assertEquals( 3, $oSearch->getArticleCount() );
}
+
+ /**
+ * Test get title.
+ */
+ public function testGetTitle()
+ {
+ $oView = $this->getMock( "search", array('getArticleCount', 'getSearchParamForHtml' ) );
+ $oView->expects($this->any())->method('getArticleCount')->will($this->returnValue( 6 ));
+ $oView->expects($this->any())->method('getSearchParamForHtml')->will($this->returnValue( 'searchStr' ));
+
+ $this->assertEquals( '6 '. oxRegistry::getLang()->translateString( 'HITS_FOR', oxRegistry::getLang()->getBaseLanguage(), false ) . ' searchStr', $oView->getTitle());
+ }
} | <I>: duplicated title / description tags in product detail page concerned by Google webmaster tools: added page name getter | OXID-eSales_oxideshop_ce | train | php |
0ae1cf41953ad4dc893f684206d620d1cd412ba3 | diff --git a/src/OutputController.js b/src/OutputController.js
index <HASH>..<HASH> 100644
--- a/src/OutputController.js
+++ b/src/OutputController.js
@@ -31,7 +31,8 @@ class OutputController {
label: 'Working…',
stdout: stderr
} );
- this.pending = [];
+ this.pendingLogs = [];
+ this.pendingWarnings = [];
}
/* istanbul ignore next */
@@ -45,21 +46,25 @@ class OutputController {
}
addLog( ...args ) {
- this.pending.push( args );
+ this.pendingLogs.push( args );
}
- addWarning( log ) {
- if ( isExternalDepWarning( log ) ) {
+ addWarning( warningMessage ) {
+ if ( isExternalDepWarning( warningMessage ) ) {
return;
}
- const warning = createWarning( log );
+ const warning = createWarning( warningMessage );
- this.pending.push( [ warning ] );
+ this.pendingWarnings.push( [ warning ] );
}
display() {
- this.pending.forEach( ( log ) => {
+ this.pendingWarnings.forEach( ( warning ) => {
+ this.console.warn( ...warning );
+ } );
+
+ this.pendingLogs.forEach( ( log ) => {
this.console.log( ...log );
} );
} | fix(outputcontroller): log warnings into `stderr` | Comandeer_rollup-lib-bundler | train | js |
c780a10650f0d8f7aacab529091739e99b29eacd | diff --git a/file_encryptor/test_convergence.py b/file_encryptor/test_convergence.py
index <HASH>..<HASH> 100644
--- a/file_encryptor/test_convergence.py
+++ b/file_encryptor/test_convergence.py
@@ -1,10 +1,10 @@
-import unittest2
+import unittest
import tempfile
import os
import convergence
-class TestConvergence(unittest2.TestCase):
+class TestConvergence(unittest.TestCase):
def setUp(self):
self.directory = tempfile.mkdtemp()
diff --git a/file_encryptor/test_key_generators.py b/file_encryptor/test_key_generators.py
index <HASH>..<HASH> 100644
--- a/file_encryptor/test_key_generators.py
+++ b/file_encryptor/test_key_generators.py
@@ -1,10 +1,10 @@
-import unittest2
+import unittest
import tempfile
import os
import key_generators
-class TestKeyGenerators(unittest2.TestCase):
+class TestKeyGenerators(unittest.TestCase):
def setUp(self):
self.directory = tempfile.mkdtemp() | Switch back to built-in unittest | StorjOld_file-encryptor | train | py,py |
fcca95dfa88b35f20e5aebf006135751e7f333a8 | diff --git a/examples/set/main.go b/examples/set/main.go
index <HASH>..<HASH> 100644
--- a/examples/set/main.go
+++ b/examples/set/main.go
@@ -59,7 +59,7 @@ func update(screen *ebiten.Image) error {
}
screen.DrawImage(offscreen, nil)
- ebitenutil.DebugPrint(screen, fmt.Sprintf("TPS: %0.2f", ebiten.CurrentTPS()))
+ ebitenutil.DebugPrint(screen, fmt.Sprintf("TPS: %0.2f\nFPS: %0.2f", ebiten.CurrentTPS(), ebiten.CurrentFPS()))
return nil
} | examples/set: Add FPS to see the performance | hajimehoshi_ebiten | train | go |
f7e4797834a224051ebcbdb6c0d1e6303bef327a | diff --git a/tests/compute/requests/brightbox/helper.rb b/tests/compute/requests/brightbox/helper.rb
index <HASH>..<HASH> 100644
--- a/tests/compute/requests/brightbox/helper.rb
+++ b/tests/compute/requests/brightbox/helper.rb
@@ -402,7 +402,8 @@ class Brightbox
"email_verified" => Fog::Boolean,
"accounts" => [Brightbox::Compute::Formats::Nested::ACCOUNT],
"default_account" => Fog::Brightbox::Nullable::Account,
- "ssh_key" => Fog::Nullable::String
+ "ssh_key" => Fog::Nullable::String,
+ "messaging_pref" => Fog::Boolean
}
ZONE = { | [compute|brightbox] New preference exposed in API added to format test | fog_fog | train | rb |
acfb8049fa0f2d0bfdba2c0664efa3bd124110f3 | diff --git a/lib/dimples/site.rb b/lib/dimples/site.rb
index <HASH>..<HASH> 100644
--- a/lib/dimples/site.rb
+++ b/lib/dimples/site.rb
@@ -44,6 +44,8 @@ module Dimples
else
false
end
+
+ scan_files
end
def scan_files
@@ -84,8 +86,6 @@ module Dimples
end
def generate
- scan_files
-
begin
FileUtils.remove_dir(@output_paths[:site]) if Dir.exist?(@output_paths[:site])
Dir.mkdir(@output_paths[:site]) | Moved the scan_files call into initialize. | waferbaby_dimples | train | rb |
9129db1a1a9a4a57e329b69ecf80278f3801cd5f | diff --git a/acceptance/setup/git/pre-suite/020_install.rb b/acceptance/setup/git/pre-suite/020_install.rb
index <HASH>..<HASH> 100644
--- a/acceptance/setup/git/pre-suite/020_install.rb
+++ b/acceptance/setup/git/pre-suite/020_install.rb
@@ -8,6 +8,8 @@ test_name "Install Bolt via git" do
sha = ''
version = ''
step "Clone repo" do
+ # Cleanup previous runs
+ on(bolt, "rm -rf bolt")
on(bolt, "git clone #{git_server}/#{git_fork} bolt")
if git_sha.empty?
on(bolt, "cd bolt && git checkout #{git_branch}") | (maint) Make it easy to repeat setup with git-based testing
With git-based testing, it makes sense to provision nodes and rerun
tests on them. To enable installing a new version of Bolt code on the
same nodes and continue testing, delete the old Bolt repo before setup
to avoid git failing. | puppetlabs_bolt | train | rb |
4948dd79b1d6e167fc99dbfcdc454e4cb49f4975 | diff --git a/packages/bonde-styleguide/src/layout/Flexbox2/Flexbox2.js b/packages/bonde-styleguide/src/layout/Flexbox2/Flexbox2.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-styleguide/src/layout/Flexbox2/Flexbox2.js
+++ b/packages/bonde-styleguide/src/layout/Flexbox2/Flexbox2.js
@@ -14,6 +14,7 @@ const Flexbox = styled.div`
flex-direction: row;
`}
${props => props.vertical && `
+ width: 100%;
height: 100%;
flex-direction: column;
`}
diff --git a/packages/bonde-styleguide/src/layout/Page/Page.js b/packages/bonde-styleguide/src/layout/Page/Page.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-styleguide/src/layout/Page/Page.js
+++ b/packages/bonde-styleguide/src/layout/Page/Page.js
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
import styled from 'styled-components'
const PageContainer = styled.div`{
+ width: 100%;
position: relative;
padding-top: ${props => props.top ? `calc(${props.top}px + 32px)` : '32px'};
padding-left: 155px;
@@ -12,6 +13,7 @@ const PageContainer = styled.div`{
}`
const PageContent = styled.div`{
+ width: 100%;
position: relative;
display: flex;
}` | fix(styleguide): set width full to flexbox layouts | nossas_bonde-client | train | js,js |
cf3c9198aad5e2ea02e778aa9b04d27c216d1a35 | diff --git a/src/transformers/training_args.py b/src/transformers/training_args.py
index <HASH>..<HASH> 100644
--- a/src/transformers/training_args.py
+++ b/src/transformers/training_args.py
@@ -434,7 +434,7 @@ class TrainingArguments:
"help": "When doing a multinode distributed training, whether to log once per node or just once on the main node."
},
)
- logging_dir: Optional[str] = field(default_factory=default_logdir, metadata={"help": "Tensorboard log dir."})
+ logging_dir: Optional[str] = field(default=None, metadata={"help": "Tensorboard log dir."})
logging_strategy: IntervalStrategy = field(
default="steps",
metadata={"help": "The logging strategy to use."}, | Fix default to logging_dir lost in merge conflict | huggingface_pytorch-pretrained-BERT | train | py |
16c3a2a3e2ff4f5db07179510fee8c1a27e45784 | diff --git a/driver-legacy/src/test/functional/com/mongodb/DBTest.java b/driver-legacy/src/test/functional/com/mongodb/DBTest.java
index <HASH>..<HASH> 100644
--- a/driver-legacy/src/test/functional/com/mongodb/DBTest.java
+++ b/driver-legacy/src/test/functional/com/mongodb/DBTest.java
@@ -54,6 +54,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeThat;
import static org.junit.Assume.assumeTrue;
@@ -140,16 +141,7 @@ public class DBTest extends DatabaseTestCase {
.append("size", 242880));
assertTrue(database.getCollection(collectionName).isCapped());
}
-
- @Test(expected = MongoCommandException.class)
- public void shouldErrorIfCreatingACollectionThatAlreadyExists() {
- // given
- database.createCollection(collectionName, new BasicDBObject());
-
- // when
- database.createCollection(collectionName, new BasicDBObject());
- }
-
+
@Test
public void shouldCreateCappedCollectionWithMaxNumberOfDocuments() {
collection.drop(); | Remove unnecessary DB.createCollection test, which also now fails when executing against a sharded cluster | mongodb_mongo-java-driver | train | java |
ff794a3a968874dbf87f40f5ddf1dad5e356f9ce | diff --git a/src/components/material.js b/src/components/material.js
index <HASH>..<HASH> 100644
--- a/src/components/material.js
+++ b/src/components/material.js
@@ -196,7 +196,9 @@ module.exports.Component = registerComponent('material', {
texturePromises[src] = loadImageTexture(material, src, data.repeat);
texturePromises[src].then(function (texture) {
self.el.emit('material-texture-loaded');
- }); }
+ });
+ }
+
function loadVideo (src) {
texturePromises[src] = loadVideoTexture(material, src, data.width, data.height);
texturePromises[src].then(function (videoEl) {
@@ -205,7 +207,7 @@ module.exports.Component = registerComponent('material', {
});
videoEl.addEventListener('ended', function (e) {
// works only for non-loop videos
- self.el.emit('video-ended');
+ self.el.emit('material-video-ended');
});
});
} | renamed video-ended to material-video-ended | aframevr_aframe | train | js |
59ba63f2afa8f27137ffe4c66e26753f4164f6ba | diff --git a/lib/marginalia/railtie.rb b/lib/marginalia/railtie.rb
index <HASH>..<HASH> 100644
--- a/lib/marginalia/railtie.rb
+++ b/lib/marginalia/railtie.rb
@@ -48,6 +48,12 @@ module Marginalia
end
end
+ if defined? ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
+ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.module_eval do
+ include Marginalia::ActiveRecordInstrumentation
+ end
+ end
+
if defined? ActiveRecord::ConnectionAdapters::SQLiteAdapter
ActiveRecord::ConnectionAdapters::SQLiteAdapter.module_eval do
include Marginalia::ActiveRecordInstrumentation | added support for PostgreSQL | basecamp_marginalia | train | rb |
2ab3f1e1d5f6a7795ec0dbd50dfaa0298d1113c6 | diff --git a/pkg/client/transport/cache.go b/pkg/client/transport/cache.go
index <HASH>..<HASH> 100644
--- a/pkg/client/transport/cache.go
+++ b/pkg/client/transport/cache.go
@@ -34,6 +34,8 @@ type tlsTransportCache struct {
transports map[string]*http.Transport
}
+const idleConnsPerHost = 25
+
var tlsCache = &tlsTransportCache{transports: make(map[string]*http.Transport)}
func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) {
@@ -66,6 +68,7 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) {
Proxy: http.ProxyFromEnvironment,
TLSHandshakeTimeout: 10 * time.Second,
TLSClientConfig: tlsConfig,
+ MaxIdleConnsPerHost: idleConnsPerHost,
Dial: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second, | Increase MaxIdlConnsPerHost to <I> | kubernetes_kubernetes | train | go |
5be658bbb6bc090589212d9c1b2948499258f1a5 | diff --git a/agent/api/task/task.go b/agent/api/task/task.go
index <HASH>..<HASH> 100644
--- a/agent/api/task/task.go
+++ b/agent/api/task/task.go
@@ -53,7 +53,7 @@ import (
const (
// NetworkPauseContainerName is the internal name for the pause container
- NetworkPauseContainerName = "~internal~ecs~pause~network"
+ NetworkPauseContainerName = "~internal~ecs~pause"
// NamespacePauseContainerName is the internal name for the IPC resource namespace and/or
// PID namespace sharing pause container
diff --git a/agent/api/task/task_test.go b/agent/api/task/task_test.go
index <HASH>..<HASH> 100644
--- a/agent/api/task/task_test.go
+++ b/agent/api/task/task_test.go
@@ -786,7 +786,7 @@ func TestNamespaceProvisionDependencyAndHostConfig(t *testing.T) {
namespacePause, ok := task.ContainerByName(NamespacePauseContainerName)
if !ok {
- t.Fatal()
+ t.Fatal("Namespace Pause Container not found")
}
docMaps := dockerMap(task) | Reverting namechange of network pause container for inplace update compatibility | aws_amazon-ecs-agent | train | go,go |
ea9c8a30558f7a3587f6803f3987fc83a8d8f77b | diff --git a/OpenSSL/test/util.py b/OpenSSL/test/util.py
index <HASH>..<HASH> 100644
--- a/OpenSSL/test/util.py
+++ b/OpenSSL/test/util.py
@@ -15,16 +15,14 @@ import sys
from OpenSSL.crypto import Error, _exception_from_error_queue
-
-try:
- bytes = bytes
-except NameError:
+if sys.version_info < (3, 0):
def b(s):
return s
bytes = str
else:
def b(s):
return s.encode("ascii")
+ bytes = bytes
class TestCase(TestCase): | Make this bytes thing actually work :/
The wrong `b` was defined for Python <I> and Python <I>. Shocking this did not cause problems earlier. | pyca_pyopenssl | train | py |
68b2a79b68ed5d3e7bddf1ce19c590890dafac38 | diff --git a/src/Layers/ClusteredFeatureLayer/ClusteredFeatureLayer.js b/src/Layers/ClusteredFeatureLayer/ClusteredFeatureLayer.js
index <HASH>..<HASH> 100644
--- a/src/Layers/ClusteredFeatureLayer/ClusteredFeatureLayer.js
+++ b/src/Layers/ClusteredFeatureLayer/ClusteredFeatureLayer.js
@@ -214,10 +214,10 @@ L.esri.Layers.ClusteredFeatureLayer = L.esri.Layers.FeatureManager.extend({
L.esri.ClusteredFeatureLayer = L.esri.Layers.ClusteredFeatureLayer;
-L.esri.Layers.clusteredFeatureLayer = function(key, options){
- return new L.esri.Layers.ClusteredFeatureLayer(key, options);
+L.esri.Layers.clusteredFeatureLayer = function(url, options){
+ return new L.esri.Layers.ClusteredFeatureLayer(url, options);
};
-L.esri.clusteredFeatureLayer = function(key, options){
- return new L.esri.Layers.ClusteredFeatureLayer(key, options);
-};
\ No newline at end of file
+L.esri.clusteredFeatureLayer = function(url, options){
+ return new L.esri.Layers.ClusteredFeatureLayer(url, options);
+}; | Change param name `key` to `url` | Esri_esri-leaflet | train | js |
8311fc5c1d3596383c32aa4a63cb460d948ed26c | diff --git a/src/Generators/Base.php b/src/Generators/Base.php
index <HASH>..<HASH> 100644
--- a/src/Generators/Base.php
+++ b/src/Generators/Base.php
@@ -73,7 +73,7 @@ abstract class Base
* @param object|null $object The model instance.
* @param \Faker\Generator|null $faker The faker instance.
*
- * @return \League\FactoryMuffin\Generator
+ * @return \League\FactoryMuffin\Generators\Base
*/
public static function detect($kind, $object = null, $faker = null)
{ | Corrected the detect function's return type | thephpleague_factory-muffin | train | php |
c17c7372649b243524aad652648cae6af7dc08d6 | diff --git a/roaring/roaring.go b/roaring/roaring.go
index <HASH>..<HASH> 100644
--- a/roaring/roaring.go
+++ b/roaring/roaring.go
@@ -1659,10 +1659,10 @@ func intersectArrayRun(a, b *container) *container {
j++
} else {
output.array = append(output.array, va)
- output.n++
i++
}
}
+ output.n = len(output.array)
return output
}
@@ -1704,7 +1704,7 @@ func intersectRunRun(a, b *container) *container {
return output
}
-// intersectBitmapRun returns an array container of the run container's
+// intersectBitmapRun returns an array container if the run container's
// cardinality is < 4096. Otherwise it returns a bitmap container.
func intersectBitmapRun(a, b *container) *container {
var output *container | be smarter about setting output.n | pilosa_pilosa | train | go |
ad7d3c6e4dab79be5b04d734d7e2501ad70e6f7b | diff --git a/Neos.Cache/Classes/Backend/TaggableMultiBackend.php b/Neos.Cache/Classes/Backend/TaggableMultiBackend.php
index <HASH>..<HASH> 100644
--- a/Neos.Cache/Classes/Backend/TaggableMultiBackend.php
+++ b/Neos.Cache/Classes/Backend/TaggableMultiBackend.php
@@ -30,7 +30,7 @@ class TaggableMultiBackend extends MultiBackend implements TaggableBackendInterf
protected function buildSubBackend(string $backendClassName, array $backendOptions): ?BackendInterface
{
$backend = null;
- if (!is_a($backendClassName, TaggableBackendInterface::class)) {
+ if (!is_sublcass_of($backendClassName, TaggableBackendInterface::class)) {
return $backend;
} | BUGIFX: Correctly check for TaggableBackendInterface
The `is_a` only checks for parents but not for implemented interfaces. `is_sublcass_of` should be used instead to check if the `$backendClassName` implements the interface | neos_flow-development-collection | train | php |
3b145d9006b291801822f96f9fc9ac6a4db1b070 | diff --git a/java/src/playn/java/JavaGLContext.java b/java/src/playn/java/JavaGLContext.java
index <HASH>..<HASH> 100644
--- a/java/src/playn/java/JavaGLContext.java
+++ b/java/src/playn/java/JavaGLContext.java
@@ -34,8 +34,6 @@ import playn.core.gl.GL20Context;
class JavaGLContext extends GL20Context {
private final static boolean CHECK_ERRORS = Boolean.getBoolean("playn.glerrors");
- private final static boolean ENABLE_QUAD_SHADER = Boolean.parseBoolean(
- System.getProperty("playn.quadshader", "true"));
private ByteBuffer imgBuf = createImageBuffer(1024);
@@ -89,11 +87,6 @@ class JavaGLContext extends GL20Context {
super.viewWasResized();
}
- @Override
- protected boolean shouldTryQuadShader() {
- return ENABLE_QUAD_SHADER && super.shouldTryQuadShader();
- }
-
void updateTexture(int tex, BufferedImage image) {
// Convert the image into a format for quick uploading
image = convertImage(image); | Remove the hook to disable QuadShader.
It was there to avoid the bug fixed in
ca9ddaf<I>ee<I>b<I>acdcb<I>d<I>f4da6a3. | playn_playn | train | java |
223062a0fbd26d8a3ae8dd6a6ec16379fb97c08b | diff --git a/upload/install/controller/upgrade/upgrade_8.php b/upload/install/controller/upgrade/upgrade_8.php
index <HASH>..<HASH> 100644
--- a/upload/install/controller/upgrade/upgrade_8.php
+++ b/upload/install/controller/upgrade/upgrade_8.php
@@ -210,7 +210,7 @@ class Upgrade8 extends \Opencart\System\Engine\Controller {
$this->db->query("TRUNCATE TABLE `" . DB_PREFIX . "cart`");
$this->db->query("ALTER TABLE `" . DB_PREFIX . "cart` DROP COLUMN `recurring_id`");
- $this->db->query("ALTER TABLE `" . DB_PREFIX . "cart` ADD COLUMN `subscription_plan_id`");
+ $this->db->query("ALTER TABLE `" . DB_PREFIX . "cart` ADD COLUMN `subscription_plan_id` int(11) NOT NULL");
}
// Drop Fields | Modified ADD COLUMN query | opencart_opencart | train | php |
1b7792310ab4c51fb8d93bcc4121fb2ffe656bec | diff --git a/chess/syzygy.py b/chess/syzygy.py
index <HASH>..<HASH> 100644
--- a/chess/syzygy.py
+++ b/chess/syzygy.py
@@ -648,7 +648,8 @@ class Table(object):
if wdl:
d.min_len = self.read_ubyte(data_ptr + 1)
else:
- d.min_len = 0
+ # http://www.talkchess.com/forum/viewtopic.php?p=698093#698093
+ d.min_len = 1 if self.variant.captures_compulsory else 0
self._next = data_ptr + 2
self.size[size_idx + 0] = 0
self.size[size_idx + 1] = 0 | Set suicide DTZ table min_len to 1 | niklasf_python-chess | train | py |
20e4fddc589c9643afd28eeb64f1693c5e8cbd32 | diff --git a/neteria/server.py b/neteria/server.py
index <HASH>..<HASH> 100644
--- a/neteria/server.py
+++ b/neteria/server.py
@@ -40,6 +40,7 @@ You can run an example by running the following from the command line:
`python -m neteria.server`"""
import logging
+import threading
import uuid
from datetime import datetime
@@ -486,7 +487,11 @@ class NeteriaServer(object):
self.compression,
self.encryption, client_key)
# Execute the event
- self.middleware.event_execute(cuuid, euuid, event_data)
+ thread = threading.Thread(target=self.middleware.event_execute,
+ args=(cuuid, euuid, event_data)
+ )
+ thread.start()
+
else:
logger.debug("<%s> <euuid:%s> Event ILLEGAL. Sending judgement "
"to client." % (cuuid, euuid)) | Fixed an issue where the listener thread could crash silently if the
middleware event_exectue failed. | ShadowBlip_Neteria | train | py |
26342c8386cfc42bf554f0d40337f4fe032f4307 | diff --git a/lib/conceptql/annotate_grapher.rb b/lib/conceptql/annotate_grapher.rb
index <HASH>..<HASH> 100644
--- a/lib/conceptql/annotate_grapher.rb
+++ b/lib/conceptql/annotate_grapher.rb
@@ -6,6 +6,9 @@ module ConceptQL
def graph_it(statement, file_path, opts={})
raise "statement not annotated" unless statement.last[:annotation]
@counter = 0
+
+ output_type = opts.delete(:output_type) || File.extname(file_path).sub('.', '')
+
opts = opts.merge( type: :digraph )
g = GraphViz.new(:G, opts)
root = traverse(g, statement)
@@ -17,7 +20,7 @@ module ConceptQL
blank[:fixedsize] = true
link_to(g, statement, root, blank)
- g.output(File.extname(file_path).sub('.', '') => file_path)
+ g.output(output_type => file_path)
end
private | AnnotateGrapher: allow output_type as option | outcomesinsights_conceptql | train | rb |
fe588210918d6f43a462d3768516306036ee025a | diff --git a/pyum/__init__.py b/pyum/__init__.py
index <HASH>..<HASH> 100644
--- a/pyum/__init__.py
+++ b/pyum/__init__.py
@@ -1,3 +1,3 @@
__author__ = 'drews'
-from .repo import RepoFile, Repo
+from pyum.repo import RepoFile, Repo | Fixed travis being unable to find module. | drewsonne_pyum | train | py |
b0a41ef84a2fc207ac7ec64d781ba98dcfeceac0 | diff --git a/web/src/main/webapp/resources/js/geneQueryTagEditorModule.js b/web/src/main/webapp/resources/js/geneQueryTagEditorModule.js
index <HASH>..<HASH> 100644
--- a/web/src/main/webapp/resources/js/geneQueryTagEditorModule.js
+++ b/web/src/main/webapp/resources/js/geneQueryTagEditorModule.js
@@ -80,7 +80,7 @@ var geneQueryTagEditorModule = (function($) {
source_des = item.source;
}
- return $( "<li style='width: 300px;'></li>" )
+ return $( "<li style='width: 280px;'></li>" )
.attr( "data-value", item.value )
.attr( "data-source", item.source )
.append( "<a>" + "<div style='float:left; text-align: left'>" + item.label + "</div><div style='float: right; text-align: right'><small>" + source_des + "</small></div></a>" ) | Make width of autocomplete pop-up less than gene query text area | ebi-gene-expression-group_atlas | train | js |
8c37bac4dcadcb92cc7a920f7a36cb4fb8ca4928 | diff --git a/blueprints/ember-bulma-css/index.js b/blueprints/ember-bulma-css/index.js
index <HASH>..<HASH> 100644
--- a/blueprints/ember-bulma-css/index.js
+++ b/blueprints/ember-bulma-css/index.js
@@ -8,16 +8,13 @@ module.exports = {
normalizeEntityName: function () { },
afterInstall: function () {
- const importStatement = `
- @import "ember-bulma-css/base/_all";
- @import "ember-bulma-css/components/_all";
- @import "ember-bulma-css/elements/_all";
- @import "ember-bulma-css/grid/_all";
- @import "ember-bulma-css/utilities/_all";
- `;
-
const stylePath = path.join('app', 'styles');
const file = path.join(stylePath, `app.scss`);
+ const folders = [ 'base', 'components', 'elements', 'grid', 'utilities' ];
+
+ const importStatement = folders.map(function(folder) {
+ return `@import "ember-bulma-css/${folder}/_all";`;
+ }).join('\n');
if (!fs.existsSync(stylePath)) {
fs.mkdirSync(stylePath); | better sass imports | GerritSommer_ember-bulma-css | train | js |
d36d04a7fb9f323b0658511fe44f614e1d50e002 | diff --git a/tilequeue/wof.py b/tilequeue/wof.py
index <HASH>..<HASH> 100644
--- a/tilequeue/wof.py
+++ b/tilequeue/wof.py
@@ -1058,7 +1058,7 @@ class WofProcessor(object):
'Found %d expired tiles' % len(expired_coord_ints))
else:
self.logger.info('No diffs found, not generating expired coords')
- expired_coord_ints = ()
+ expired_coord_ints = set()
# ensure we're done fetching the tiles of interest by this point
toi_thread.join() | Fixed type error - expired coord ints should be a set, not a tuple. | tilezen_tilequeue | train | py |
d094b702706788c165918e8b9326fc91e391a011 | diff --git a/Eloquent/Model.php b/Eloquent/Model.php
index <HASH>..<HASH> 100644
--- a/Eloquent/Model.php
+++ b/Eloquent/Model.php
@@ -681,7 +681,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
// If the model has an incrementing key, we can use the "insertGetId" method on
// the query builder, which will give us back the final inserted ID for this
// table from the database. Not all tables have to be incrementing though.
- $attributes = $this->attributes;
+ $attributes = $this->getAttributes();
if ($this->getIncrementing()) {
$this->insertAndSetId($query, $attributes); | Use the getAttributes method on insert (#<I>)
Update the performInsert method to use getAttributes instead of accessing the property directly. | illuminate_database | train | php |
06c3cbc831352371cc628608b7b80f9e7b193198 | diff --git a/lib/gir_ffi/object_base.rb b/lib/gir_ffi/object_base.rb
index <HASH>..<HASH> 100644
--- a/lib/gir_ffi/object_base.rb
+++ b/lib/gir_ffi/object_base.rb
@@ -36,6 +36,10 @@ module GirFFI
ptr.to_object
end
+ def self.copy_from(val)
+ val.ref
+ end
+
#
# Find property info for the named property.
#
diff --git a/test/gir_ffi/sized_array_test.rb b/test/gir_ffi/sized_array_test.rb
index <HASH>..<HASH> 100644
--- a/test/gir_ffi/sized_array_test.rb
+++ b/test/gir_ffi/sized_array_test.rb
@@ -104,6 +104,18 @@ describe GirFFI::SizedArray do
struct_copy.to_ptr.wont_equal struct.to_ptr
struct_copy.to_ptr.wont_be :autorelease?
end
+
+ it 'increases the ref count of object pointer elements' do
+ obj = GIMarshallingTests::Object.new 42
+ arr = GirFFI::SizedArray.copy_from([:pointer, GIMarshallingTests::Object],
+ 1,
+ [obj])
+ arr.must_be_instance_of GirFFI::SizedArray
+ arr.to_ptr.wont_be :autorelease?
+
+ arr.first.must_equal obj
+ obj.ref_count.must_equal 2
+ end
end
describe 'from a GirFFI::SizedArray' do | Handle copy_from for sized array of objects | mvz_gir_ffi | train | rb,rb |
2086035cd4c4f8f9d3126a01a52e52413f703a0a | diff --git a/table.go b/table.go
index <HASH>..<HASH> 100644
--- a/table.go
+++ b/table.go
@@ -706,6 +706,11 @@ func (t *Table) printRowMergeCells(writer io.Writer, columns [][]string, rowIdx
// Pad Each Height
pads := []int{}
+ // Checking for ANSI escape sequences for columns
+ is_esc_seq := false
+ if len(t.columnsParams) > 0 {
+ is_esc_seq = true
+ }
for i, line := range columns {
length := len(line)
pad := max - length
@@ -727,6 +732,11 @@ func (t *Table) printRowMergeCells(writer io.Writer, columns [][]string, rowIdx
str := columns[y][x]
+ // Embedding escape sequence with column value
+ if is_esc_seq {
+ str = format(str, t.columnsParams[y])
+ }
+
if t.autoMergeCells {
//Store the full line to merge mutli-lines cells
fullLine := strings.Join(columns[y], " ") | Allow for Color formating on Merged Cells | olekukonko_tablewriter | train | go |
af3863fc97a34246c6c1b7e3fdff0d71901cac3a | diff --git a/salt/modules/postgres.py b/salt/modules/postgres.py
index <HASH>..<HASH> 100644
--- a/salt/modules/postgres.py
+++ b/salt/modules/postgres.py
@@ -173,7 +173,7 @@ def db_create(name,
return False
# Base query to create a database
- query = 'CREATE DATABASE {0}'.format(name)
+ query = 'CREATE DATABASE "{0}"'.format(name)
# "With"-options to create a database
with_args = {
@@ -311,7 +311,7 @@ def user_create(username,
log.info("User '{0}' already exists".format(username,))
return False
- sub_cmd = "CREATE USER {0} WITH".format(username, )
+ sub_cmd = 'CREATE USER "{0}" WITH'.format(username, )
if password:
escaped_password = password.replace("'", "''")
sub_cmd = "{0} PASSWORD '{1}'".format(sub_cmd, escaped_password) | Add quoting for postgres users and databases
Otherwise, creating users and databases within postgres fails
when they contain a dash (-). | saltstack_salt | train | py |
fb41add13408b6df66102c6bf6df87ec4e36c2b1 | diff --git a/jsio/env/__init__.js b/jsio/env/__init__.js
index <HASH>..<HASH> 100644
--- a/jsio/env/__init__.js
+++ b/jsio/env/__init__.js
@@ -1,4 +1,4 @@
-require('jsio', ['getEnvironment', 'log', 'bind', 'test']);
+require('jsio', ['getEnvironment', 'log', 'bind']);
function getObj(objectName, transportName, envName) {
envName = envName || getEnvironment(); | don't need to require 'test' | gameclosure_js.io | train | js |
68091db33e89b4e702a9199ab6cd3c47c320fd55 | diff --git a/web/src/main/webapp/resources/js/jquery.arrayExpress-autocomplete-1.1.0.130305.js b/web/src/main/webapp/resources/js/jquery.arrayExpress-autocomplete-1.1.0.130305.js
index <HASH>..<HASH> 100644
--- a/web/src/main/webapp/resources/js/jquery.arrayExpress-autocomplete-1.1.0.130305.js
+++ b/web/src/main/webapp/resources/js/jquery.arrayExpress-autocomplete-1.1.0.130305.js
@@ -132,6 +132,9 @@ $.Autocompleter = function(input, options) {
config.isTreeControlHit = true;
input.click();
}
+ else {
+ hideResultsNow();
+ }
}
break; | hideResults when pressing right key when no selection is made | ebi-gene-expression-group_atlas | train | js |
78bc6a89159313e652b5e230b553a2ed8620f672 | diff --git a/fakeyagnats/fake_yagnats.go b/fakeyagnats/fake_yagnats.go
index <HASH>..<HASH> 100644
--- a/fakeyagnats/fake_yagnats.go
+++ b/fakeyagnats/fake_yagnats.go
@@ -70,14 +70,16 @@ func (f *FakeYagnats) Publish(subject string, payload []byte) error {
}
func (f *FakeYagnats) PublishWithReplyTo(subject, reply string, payload []byte) error {
- message := yagnats.Message{
+ message := &yagnats.Message{
Subject: subject,
ReplyTo: reply,
Payload: payload,
}
- f.PublishedMessages[subject] = append(f.PublishedMessages[subject], message)
-
+ f.PublishedMessages[subject] = append(f.PublishedMessages[subject], *message)
+ if len(f.Subscriptions[subject]) > 0 {
+ f.Subscriptions[subject][0].Callback(message)
+ }
return f.PublishError
}
@@ -95,7 +97,6 @@ func (f *FakeYagnats) SubscribeWithQueue(subject, queue string, callback yagnats
}
f.Subscriptions[subject] = append(f.Subscriptions[subject], subscription)
-
return subscription.ID, f.SubscribeError
} | actually call the callback in the fake | cloudfoundry_yagnats | train | go |
1fde9c5e8a10e0d29e469c68d700063ca5257d0f | diff --git a/aiosasl/__init__.py b/aiosasl/__init__.py
index <HASH>..<HASH> 100644
--- a/aiosasl/__init__.py
+++ b/aiosasl/__init__.py
@@ -519,7 +519,7 @@ class SASLMechanism(metaclass=abc.ABCMeta):
@abc.abstractclassmethod
def any_supported(
cls,
- mechanisms: typing.Collection[str],
+ mechanisms: typing.Iterable[str],
) -> typing.Any:
"""
Determine whether this class can perform any SASL mechanism in the set
@@ -581,7 +581,7 @@ class PLAIN(SASLMechanism):
@classmethod
def any_supported(
cls,
- mechanisms: typing.Collection[str],
+ mechanisms: typing.Iterable[str],
) -> typing.Any:
if "PLAIN" in mechanisms:
return "PLAIN"
@@ -653,7 +653,7 @@ class SCRAMBase:
@classmethod
def any_supported(
cls,
- mechanisms: typing.Collection[str],
+ mechanisms: typing.Iterable[str],
) -> typing.Optional[typing.Tuple[str, SCRAMHashInfo]]:
supported = []
for mechanism in mechanisms:
@@ -1004,7 +1004,7 @@ class ANONYMOUS(SASLMechanism):
@classmethod
def any_supported(
self,
- mechanisms: typing.Collection[str],
+ mechanisms: typing.Iterable[str],
) -> typing.Optional[str]:
if "ANONYMOUS" in mechanisms:
return "ANONYMOUS" | Python <I> compat (still in Debian oldstable) | horazont_aiosasl | train | py |
0d837db894a3c3f16988b4cceb4bafbdc63b60c7 | diff --git a/pytest_wdb/test_wdb.py b/pytest_wdb/test_wdb.py
index <HASH>..<HASH> 100644
--- a/pytest_wdb/test_wdb.py
+++ b/pytest_wdb/test_wdb.py
@@ -26,6 +26,10 @@ class FakeWdbServer(Process):
def run(self):
listener = Listener(('localhost', 18273))
+ try:
+ listener._listener._socket.settimeout(1)
+ except Exception:
+ pass
connection = listener.accept()
# uuid
connection.recv_bytes().decode('utf-8') | Add a hacky timeout around Listener accept for pytest_wdb test | Kozea_wdb | train | py |
e80af1db87ce2b872b995361bda85711d83f8b8b | diff --git a/lib/locale_setter/rails.rb b/lib/locale_setter/rails.rb
index <HASH>..<HASH> 100644
--- a/lib/locale_setter/rails.rb
+++ b/lib/locale_setter/rails.rb
@@ -2,7 +2,7 @@ module LocaleSetter
module Rails
attr_accessor :i18n
- def default_url_options(options)
+ def default_url_options(options = {})
if i18n.locale == i18n.default_locale
options
else
diff --git a/spec/locale_setter_spec.rb b/spec/locale_setter_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/locale_setter_spec.rb
+++ b/spec/locale_setter_spec.rb
@@ -29,6 +29,10 @@ describe LocaleSetter do
controller.default_url_options({})[:locale].should be
end
+ it "does not require a parameter" do
+ expect{ controller.default_url_options }.to_not raise_error
+ end
+
it "builds on passed in options" do
result = controller.default_url_options({:test => true})
result[:test].should be | Missed the default param to match Rails' usage | jcasimir_locale_setter | train | rb,rb |
5dde4b089e20e2c816517e79abcdfb1cecd3cfa0 | diff --git a/src/bootstrap-markdown-editor.js b/src/bootstrap-markdown-editor.js
index <HASH>..<HASH> 100755
--- a/src/bootstrap-markdown-editor.js
+++ b/src/bootstrap-markdown-editor.js
@@ -201,6 +201,10 @@
content: function () {
var editor = ace.edit(this.find('.md-editor')[0]);
return editor.getSession().getValue();
+ },
+ setContent: function(str) {
+ var editor = ace.edit(this.find('.md-editor')[0]);
+ editor.setValue(str);
}
}; | Adds setter-method for content | inacho_bootstrap-markdown-editor | train | js |
7aadebeeb145463dc47c7808ca64089c3c591b7b | diff --git a/pyrax/object_storage.py b/pyrax/object_storage.py
index <HASH>..<HASH> 100644
--- a/pyrax/object_storage.py
+++ b/pyrax/object_storage.py
@@ -342,7 +342,7 @@ class Container(BaseResource):
else:
return self.object_manager.list(marker=marker, limit=limit,
prefix=prefix, delimiter=delimiter, end_marker=end_marker,
- full_listing=full_listing, return_raw=return_raw)
+ return_raw=return_raw)
def list_all(self, prefix=None):
@@ -3065,6 +3065,8 @@ class StorageClient(BaseClient):
if verbose:
log.info("%s NOT UPLOADED because remote object is "
"newer", fullname_with_prefix)
+ log.info(" Local: %s Remote: %s" % (
+ local_mod_str, obj_time_str))
continue
container.upload_file(pth, obj_name=fullname_with_prefix,
etag=local_etag, return_none=True) | Fixed another parameter list mismatch.
Also added more descriptive logging to sync_folder_to_container() when a
file isn't copied due to timestamp differences. | pycontribs_pyrax | train | py |
16a25d4ac4e5ae483a74a58f8b6e625e0af79b58 | diff --git a/rds/instances.go b/rds/instances.go
index <HASH>..<HASH> 100644
--- a/rds/instances.go
+++ b/rds/instances.go
@@ -27,10 +27,16 @@ type DescribeDBInstanceIPsArgs struct {
DBInstanceId string
}
+type DBInstanceIPList struct {
+ DBInstanceIPArrayName string
+ DBInstanceIPArrayAttribute string
+ SecurityIPList string
+}
+
type DescribeDBInstanceIPsResponse struct {
common.Response
Items struct {
- DBInstanceIPArray []DBInstanceIPArray
+ DBInstanceIPArray []DBInstanceIPList
}
} | change describeSecurityIpList response struct | denverdino_aliyungo | train | go |
2be827e4573f341bc3b21ade2d6d13c359c271fa | diff --git a/manticore/native/cpu/x86.py b/manticore/native/cpu/x86.py
index <HASH>..<HASH> 100644
--- a/manticore/native/cpu/x86.py
+++ b/manticore/native/cpu/x86.py
@@ -1479,6 +1479,7 @@ class X86Cpu(Cpu):
:param dest: destination operand.
"""
size = dest.size
+ half_size = size // 2
cmp_reg_name_l = {64: "EAX", 128: "RAX"}[size]
cmp_reg_name_h = {64: "EDX", 128: "RDX"}[size]
src_reg_name_l = {64: "EBX", 128: "RBX"}[size]
@@ -1499,12 +1500,12 @@ class X86Cpu(Cpu):
dest.write(Operators.ITEBV(size, cpu.ZF, Operators.CONCAT(size, srch, srcl), arg_dest))
cpu.write_register(
cmp_reg_name_l,
- Operators.ITEBV(size // 2, cpu.ZF, cmpl, Operators.EXTRACT(arg_dest, 0, size // 2)),
+ Operators.ITEBV(half_size, cpu.ZF, cmpl, Operators.EXTRACT(arg_dest, 0, half_size)),
)
cpu.write_register(
cmp_reg_name_h,
Operators.ITEBV(
- size // 2, cpu.ZF, cmph, Operators.EXTRACT(arg_dest, size // 2, size // 2)
+ half_size, cpu.ZF, cmph, Operators.EXTRACT(arg_dest, half_size, half_size)
),
) | Optimize repeated division in CMPXCHG8B (#<I>) | trailofbits_manticore | train | py |
87bdb1cadf1a69cf40f2d01828937216fe2bb5b7 | diff --git a/sources/proxy/server.go b/sources/proxy/server.go
index <HASH>..<HASH> 100644
--- a/sources/proxy/server.go
+++ b/sources/proxy/server.go
@@ -17,6 +17,7 @@ import (
"github.com/segmentio/fasthash/fnv1a"
"github.com/sirupsen/logrus"
"google.golang.org/grpc"
+ "google.golang.org/protobuf/types/known/emptypb"
"github.com/stripe/veneur/v14/forwardrpc"
"github.com/stripe/veneur/v14/samplers/metricpb"
@@ -186,11 +187,16 @@ func (s *Server) SendMetricsV2(
if err == io.EOF {
break
} else if err != nil {
- return err
+ s.logger.WithError(err).Error("error recieving metrics")
+ break
}
metrics = append(metrics, metric)
}
- _, err := s.SendMetrics(context.Background(), &forwardrpc.MetricList{
+ err := server.SendAndClose(&emptypb.Empty{})
+ if err != nil {
+ s.logger.WithError(err).Error("error closing stream")
+ }
+ _, err = s.SendMetrics(context.Background(), &forwardrpc.MetricList{
Metrics: metrics,
})
return err | Call SendAndClose in the proxy source. (#<I>) | stripe_veneur | train | go |
4b0f2f6539b38cda0612dfb540ef9bad76b879bb | diff --git a/views/js/qtiCreator/helper/dummyElement.js b/views/js/qtiCreator/helper/dummyElement.js
index <HASH>..<HASH> 100644
--- a/views/js/qtiCreator/helper/dummyElement.js
+++ b/views/js/qtiCreator/helper/dummyElement.js
@@ -36,7 +36,7 @@ define([
}
},
include: {
- icon: 'media',
+ icon: 'shared-file',
css: {
width : '100%',
height : 100 | changed the icon of the include dummy element | oat-sa_extension-tao-itemqti | train | js |
eebd3ef8fd13c533890159437218bd5b79427427 | diff --git a/core.js b/core.js
index <HASH>..<HASH> 100644
--- a/core.js
+++ b/core.js
@@ -1199,6 +1199,18 @@ const _makeWindow = (options = {}, parent = null, top = null) => {
}
return RequestCamera.apply(this, arguments);
})(nativeMlProxy.RequestCamera);
+ nativeMlProxy.RequestHand = (RequestHand => function(cb) {
+ if (typeof cb === 'function') {
+ cb = (cb => function(datas) {
+ for (let i = 0; i < datas.length; i++) {
+ const data = datas[i];
+ data.center = utils._normalizeBuffer(data.center, window);
+ }
+ return cb.apply(this, arguments);
+ })(cb);
+ }
+ return RequestHand.apply(this, arguments);
+ })(nativeMlProxy.RequestHand);
nativeMlProxy.RequestMesh = (RequestMesh => function(cb) {
if (typeof cb === 'function') {
cb = (cb => function(datas) { | Add missing RequestHand intercept to core.js | exokitxr_exokit | train | js |
e83297fd1d7850a4b98824164430e50a37d236c8 | diff --git a/cmsplugin_cascade/plugin_base.py b/cmsplugin_cascade/plugin_base.py
index <HASH>..<HASH> 100644
--- a/cmsplugin_cascade/plugin_base.py
+++ b/cmsplugin_cascade/plugin_base.py
@@ -37,15 +37,20 @@ def create_proxy_model(name, model_mixins, base_model, attrs=None, module=None):
"""
Create a Django Proxy Model on the fly, to be used by any Cascade Plugin.
"""
+ from django.apps import apps
+
class Meta:
proxy = True
app_label = 'cmsplugin_cascade'
name = str(name + 'Model')
- bases = model_mixins + (base_model,)
- attrs = dict(attrs or {}, Meta=Meta, __module__=module)
- Model = type(name, bases, attrs)
- fake_proxy_models[name] = bases
+ try:
+ Model = apps.get_registered_model(Meta.app_label, name)
+ except LookupError:
+ bases = model_mixins + (base_model,)
+ attrs = dict(attrs or {}, Meta=Meta, __module__=module)
+ Model = type(name, bases, attrs)
+ fake_proxy_models[name] = bases
return Model | Prevent double registration of proxy models
to be cherry-picked into master | jrief_djangocms-cascade | train | py |
7a5af7f4167b5fd59d14efccec8f9ad51509dbf5 | diff --git a/bin/build.js b/bin/build.js
index <HASH>..<HASH> 100644
--- a/bin/build.js
+++ b/bin/build.js
@@ -28,7 +28,7 @@ var optimizeConfig = {
nodeRequire: require,
findNestedDependencies: false,
optimizeAllPluginResources: true,
- preserveLicenseComments: false,
+ preserveLicenseComments: true,
//If using UglifyJS for script optimization, these config options can be
//used to pass configuration values to UglifyJS.
//See https://github.com/mishoo/UglifyJS for the possible values. | set preserveLicenseComments to true by default in rappidjs build command | rappid_rAppid.js | train | js |
4f3b376c50dd0634c587116ca63b11eea2d12caf | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -28,9 +28,9 @@ setup(
# --- Python ---
packages=find_packages('src'),
package_dir={'': 'src'},
- python_requires='>=3.5, <4',
+ python_requires='>=3.6, <4',
install_requires=[
- 'asttokens >= 1.1.10',
+ 'asttokens >= 2',
],
entry_points={
'flake8.extension': [
@@ -44,7 +44,6 @@ setup(
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8', | Remove py<I> from setup.py, require asttokens>=2 | jamescooke_flake8-aaa | train | py |
8fd4d7ea6b3d7a546101815c038d42540cf7833c | diff --git a/routing/router.go b/routing/router.go
index <HASH>..<HASH> 100644
--- a/routing/router.go
+++ b/routing/router.go
@@ -593,7 +593,7 @@ func (r *ChannelRouter) processNetworkAnnouncement(msg lnwire.Message) bool {
FeeProportionalMillionths: btcutil.Amount(msg.FeeProportionalMillionths),
// TODO(roasbeef): this is a hack, needs to be removed
// after commitment fees are dynamic.
- Capacity: btcutil.Amount(utxo.Value) - 5000,
+ Capacity: btcutil.Amount(utxo.Value) - btcutil.Amount(5000),
}
err = r.cfg.Graph.UpdateEdgeInfo(chanUpdate) | routing: fix bug in channel capacity display by ensuring properly typed arithmetic
This commit fixes a slight bug in the storage of the capacity of a
channel. Previously, we were subtracting a the hard coded fee amount
without first casting the integer to a btcutil.Amount which results in
a display/rounding error when the amount is converted to BTC. | lightningnetwork_lnd | train | go |
a6d7d757934607238e855e7f488b2e1b359eb1d4 | diff --git a/app/controllers/spree/user_passwords_controller.rb b/app/controllers/spree/user_passwords_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/spree/user_passwords_controller.rb
+++ b/app/controllers/spree/user_passwords_controller.rb
@@ -4,12 +4,6 @@ class Spree::UserPasswordsController < Devise::PasswordsController
ssl_required
- after_filter :associate_user
-
- def new
- super
- end
-
# Temporary Override until next Devise release (i.e after v1.3.4)
# line:
# respond_with resource, :location => new_session_path(resource_name)
@@ -29,12 +23,4 @@ class Spree::UserPasswordsController < Devise::PasswordsController
end
end
- def edit
- super
- end
-
- def update
- super
- end
-
end | Remove associate_user call from UserPasswordsController + cleanup | spree_spree_auth_devise | train | rb |
00fc88f87b0b14de6c2fa2b6450f614c1adfb9b7 | diff --git a/src/Chromecast/Channels/Socket.php b/src/Chromecast/Channels/Socket.php
index <HASH>..<HASH> 100644
--- a/src/Chromecast/Channels/Socket.php
+++ b/src/Chromecast/Channels/Socket.php
@@ -246,14 +246,14 @@ class Socket
public function ping()
{
- $this->message->setDestinationId($this->receiverId);
+ $this->message->setDestinationId($this->destinationId);
$this->message->setNamespace($this->ns_heartbeat);
$this->writeMessage(['type'=>'PING']);
}
public function pong()
{
- $this->message->setDestinationId($this->receiverId);
+ $this->message->setDestinationId($this->destinationId);
$this->message->setNamespace($this->ns_heartbeat);
$this->writeMessage(['type'=>'PONG']);
} | cleaning up Chromecast Channel Socket and more daemon work | jalder_UPnP | train | php |
4386aa1ab08f164dcb4c4faa8024d1007b1d6ab0 | diff --git a/lib/generators/rolify/templates/initializer.rb b/lib/generators/rolify/templates/initializer.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/rolify/templates/initializer.rb
+++ b/lib/generators/rolify/templates/initializer.rb
@@ -4,4 +4,7 @@ Rolify.configure<%= "(\"#{class_name.camelize.to_s}\")" if class_name != "Role"
# Dynamic shortcuts for User class (user.is_admin? like methods). Default is: false
# config.use_dynamic_shortcuts
-end
\ No newline at end of file
+
+ # Configuration to remove roles from database once the last resource is removed. Default is: true
+ # config.remove_role_if_empty = false
+end | Update initializer.rb to include the remove_role_if_empty option and description
The default action is to remove roles if the last resource is removed. Important to disable this if the roles are associated with permissions (Pundit etc.) and cascades are enabled.
I'd suggest changing the default action, but in absence of that, a small change to the initializer to include the option and description to change it. | RolifyCommunity_rolify | train | rb |
f44ecc1e11c248e926df3c877e5fb703b0bb37ac | diff --git a/widgets/FineUploaderBase.php b/widgets/FineUploaderBase.php
index <HASH>..<HASH> 100644
--- a/widgets/FineUploaderBase.php
+++ b/widgets/FineUploaderBase.php
@@ -210,8 +210,16 @@ abstract class FineUploaderBase extends \Widget
$varInput = $objUploader->uploadTo($this->strTemporaryPath);
if ($objUploader->hasError()) {
- foreach ($_SESSION['TL_ERROR'] as $strError) {
- $this->addError($strError);
+ if (version_compare(VERSION, '4.2', '>=')) {
+ $session = \System::getContainer()->get('session');
+
+ foreach ($session->getFlashBag()->peek('contao.'.TL_MODE.'.error') as $strError) {
+ $this->addError($strError);
+ }
+ } else {
+ foreach ((array) $_SESSION['TL_ERROR'] as $strError) {
+ $this->addError($strError);
+ }
}
} | Read upload errors from flashbag in Contao <I>+ | terminal42_contao-fineuploader | train | php |
5b80f0b9c3f26ec025e671a3db8ff80071c2905d | diff --git a/oz/bandit/actions.py b/oz/bandit/actions.py
index <HASH>..<HASH> 100644
--- a/oz/bandit/actions.py
+++ b/oz/bandit/actions.py
@@ -40,6 +40,7 @@ def get_experiment_results():
redis = oz.redis.create_connection()
for experiment in oz.bandit.get_experiments(redis):
+ experiment.compute_default_choice()
csq, confident = experiment.confidence()
print("%s:" % experiment.name) | Make sure to compute the default choice before showing the experiment results | dailymuse_oz | train | py |
7b1b255d251c975e16f93bfa2727e847bd5a2da2 | diff --git a/rollbar/contrib/django/middleware.py b/rollbar/contrib/django/middleware.py
index <HASH>..<HASH> 100644
--- a/rollbar/contrib/django/middleware.py
+++ b/rollbar/contrib/django/middleware.py
@@ -18,14 +18,13 @@ import sys
import rollbar
-import django
from django.core.exceptions import MiddlewareNotUsed
from django.conf import settings
from django.http import Http404
-if django.VERSION >= (1, 10):
+try:
from django.urls import resolve
-else:
+except ImportError:
from django.core.urlresolvers import resolve
try: | Use try/except on ImportError | rollbar_pyrollbar | train | py |
c724535311841061c0f6a04dc68a4b89b2923618 | diff --git a/ob1k-cache/src/main/java/com/outbrain/ob1k/cache/memcache/folsom/MemcachedClientBuilder.java b/ob1k-cache/src/main/java/com/outbrain/ob1k/cache/memcache/folsom/MemcachedClientBuilder.java
index <HASH>..<HASH> 100644
--- a/ob1k-cache/src/main/java/com/outbrain/ob1k/cache/memcache/folsom/MemcachedClientBuilder.java
+++ b/ob1k-cache/src/main/java/com/outbrain/ob1k/cache/memcache/folsom/MemcachedClientBuilder.java
@@ -53,7 +53,9 @@ public class MemcachedClientBuilder<T> {
* @return The builder
*/
public static <T> MemcachedClientBuilder<T> newMessagePackClient(final MessagePack messagePack, final Class<T> valueType) {
- messagePack.register(valueType);
+ if (!valueType.isPrimitive()) {
+ messagePack.register(valueType);
+ }
return newClient(new MessagePackTranscoder<>(messagePack, valueType));
} | Avoid registering primitives (failing messagepack) | outbrain_ob1k | train | java |
5acfcc61ba3071e1084a0d8a0e1dc5b35da05f32 | diff --git a/dht.go b/dht.go
index <HASH>..<HASH> 100644
--- a/dht.go
+++ b/dht.go
@@ -19,7 +19,8 @@ import (
)
func defaultQueryResendDelay() time.Duration {
- return jitterDuration(5*time.Second, time.Second)
+ // This should be the highest reasonable UDP latency an end-user might have.
+ return 2 * time.Second
}
// Uniquely identifies a transaction to us.
@@ -30,8 +31,8 @@ type transactionKey struct {
type StartingNodesGetter func() ([]Addr, error)
-// ServerConfig allows to set up a configuration of the `Server` instance
-// to be created with NewServer
+// ServerConfig allows setting up a configuration of the `Server` instance to be created with
+// NewServer.
type ServerConfig struct {
// Set NodeId Manually. Caller must ensure that if NodeId does not conform
// to DHT Security Extensions, that NoSecurity is also set.
diff --git a/transaction.go b/transaction.go
index <HASH>..<HASH> 100644
--- a/transaction.go
+++ b/transaction.go
@@ -21,7 +21,7 @@ func (t *Transaction) handleResponse(m krpc.Msg) {
t.onResponse(m)
}
-const defaultMaxQuerySends = 3
+const defaultMaxQuerySends = 1
func transactionSender(
ctx context.Context, | Reduce default retries and timeouts
BEP 5 does say "there is no retries". Also when using DHT synchronously with the CLI, delays are very noticeable. This should be configurable at some point for some users' systems. | anacrolix_dht | train | go,go |
a74553c74edc5d6c35c6fe91579d5f45b864340a | diff --git a/dark/diamond/alignments.py b/dark/diamond/alignments.py
index <HASH>..<HASH> 100644
--- a/dark/diamond/alignments.py
+++ b/dark/diamond/alignments.py
@@ -6,7 +6,7 @@ from dark.alignments import (
ReadsAlignments, ReadAlignments, ReadsAlignmentsParams)
from dark.diamond.conversion import JSONRecordsReader
from dark.fasta import FastaReads
-from dark.reads import AARead
+from dark.reads import AAReadWithX
from dark.score import HigherIsBetterScore
from dark.utils import numericallySortFilenames
@@ -124,7 +124,8 @@ class DiamondReadsAlignments(ReadsAlignments):
"""
if self._subjectTitleToSubject is None:
titles = {}
- for read in FastaReads(self._databaseFilename, readClass=AARead):
+ for read in FastaReads(self._databaseFilename,
+ readClass=AAReadWithX):
titles[read.id] = read
self._subjectTitleToSubject = titles
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -50,7 +50,7 @@ scripts = [
]
setup(name='dark-matter',
- version='1.0.52',
+ version='1.0.53',
packages=['dark', 'dark.blast', 'dark.diamond'],
include_package_data=True,
url='https://github.com/acorg/dark-matter', | Fixing dark/diamond/alignments.py, AAReadWithX | acorg_dark-matter | train | py,py |
405fc5b8a4feaacc23669516d5e745c2c8a5d329 | diff --git a/intranet/apps/users/models.py b/intranet/apps/users/models.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/users/models.py
+++ b/intranet/apps/users/models.py
@@ -895,7 +895,7 @@ class User(AbstractBaseUser, PermissionsMixin):
def recommended_activities(self):
key = "{}:recommended_activities".format(self.username)
cached = cache.get(key)
- if cached:
+ if cached is not None:
return cached
acts = set()
for signup in ( | perf(users): do not needlessly reevaluate User.recommended_activities
The current logic reevaluates it if the cached list is empty. | tjcsl_ion | train | py |
5de2b64539235827a78142668f7e6d7f696d2e6b | diff --git a/lib/sequence.php b/lib/sequence.php
index <HASH>..<HASH> 100644
--- a/lib/sequence.php
+++ b/lib/sequence.php
@@ -204,6 +204,7 @@ class PharenLazyList implements IPharenSeq{
public $rest = Null;
public $length = Null;
public $lambda;
+ public $lambda_result = Null;
public function __construct($lambda){
$this->lambda = $lambda;
@@ -224,9 +225,9 @@ class PharenLazyList implements IPharenSeq{
public function set_first_and_rest(){
list($lambda, $scope_id) = $this->lambda;
- $result = $lambda($scope_id);
- $this->first = $result->first;
- $this->rest = $result->rest;
+ $this->lambda_result = $lambda($scope_id);
+ $this->first = $this->lambda_result->first();
+ $this->rest = $this->lambda_result->rest();
}
public function rest(){ | Make LazyList's set_first_and_rest call first() and rest() instead of using the attributes. | Scriptor_pharen | train | php |
d6cbff636b8de6760220e32213e49587ba87aabd | diff --git a/envoy/tests/common.py b/envoy/tests/common.py
index <HASH>..<HASH> 100644
--- a/envoy/tests/common.py
+++ b/envoy/tests/common.py
@@ -306,10 +306,12 @@ PROMETHEUS_METRICS = [
"workers.watchdog_miss.count",
]
-FLAKY_METRICS = [
- 'listener.downstream_cx_active',
+FLAKY_METRICS = {
+ "listener.downstream_cx_active",
+ "listener.downstream_cx_destroy.count",
"cluster.internal.upstream_rq.count",
"cluster.internal.upstream_rq_completed.count",
"cluster.internal.upstream_rq_xx.count",
- 'envoy.cluster.http2.keepalive_timeout.count',
-]
+ "cluster.http2.keepalive_timeout.count",
+ "cluster.upstream_rq_xx.count",
+} | add additional flaky metrics (#<I>) | DataDog_integrations-core | train | py |
4549098b930739e849124071e9e4f131ad5b6770 | diff --git a/lastfmapi/class/apibase.php b/lastfmapi/class/apibase.php
index <HASH>..<HASH> 100644
--- a/lastfmapi/class/apibase.php
+++ b/lastfmapi/class/apibase.php
@@ -38,22 +38,21 @@ class lastfmApiBase {
}
}
- $xml = new SimpleXMLElement($xmlstr);
-
- if ( $xml['status'] == 'ok' ) {
+ try {
+ libxml_use_internal_errors(true);
+ $xml = new SimpleXMLElement($xmlstr);
+ }
+ catch (Exception $e) {
+ // Crap! We got errors!!!
+ $errors = libxml_get_errors();
+ $error = $errors[0];
+ $this->handleError(95, 'SimpleXMLElement error: '.$e->getMessage().': '.$error->message);
+ }
+
+ if ( !isset($e) ) {
// All is well :)
return $xml;
}
- elseif ( $xml['status'] == 'failed' ) {
- // Woops - error has been returned
- $this->handleError($xml->error);
- return FALSE;
- }
- else {
- // I put this in just in case but this really shouldn't happen. Pays to be safe
- $this->handleError();
- return FALSE;
- }
}
function apiGetCall($vars) { | Fixed badly formed XML errors appearing. Will return error <I> when it happens. It is up to the application to decide how to handle the error | matt-oakes_PHP-Last.fm-API | train | php |
a9851f0877da53dd37c40b5d472df90b363491d6 | diff --git a/devices.js b/devices.js
index <HASH>..<HASH> 100755
--- a/devices.js
+++ b/devices.js
@@ -9254,6 +9254,14 @@ const devices = [
// Müller Licht
{
+ zigbeeModel: ['ZBT-DIMLight-A4700001'],
+ model: '404023',
+ vendor: 'Müller Licht',
+ description: 'LED bulb E27 470 lumen, dimmable, clear',
+ extend: generic.light_onoff_brightness,
+ toZigbee: generic.light_onoff_brightness.toZigbee.concat([tz.tint_scene]),
+ },
+ {
zigbeeModel: ['ZBT-ExtendedColor'],
model: '404000/404005/404012',
vendor: 'Müller Licht', | Update devices.js (#<I>) | Koenkk_zigbee-shepherd-converters | train | js |
3dca9da130c927fed47c077f886130fe5495cbe0 | diff --git a/drivers/python/rethinkdb/__init__.py b/drivers/python/rethinkdb/__init__.py
index <HASH>..<HASH> 100644
--- a/drivers/python/rethinkdb/__init__.py
+++ b/drivers/python/rethinkdb/__init__.py
@@ -1,15 +1,20 @@
# Copyright 2010-2014 RethinkDB, all rights reserved.
-# Define this before importing so nothing can overwrite 'object'
-class r(object):
- pass
-
from .net import *
from .query import *
from .errors import *
from .ast import *
from . import docs
+try:
+ import __builtin__ as builtins # Python 2
+except ImportError:
+ import builtins # Python 3
+
+# The builtins here defends against re-importing something obscuring `object`.
+class r(builtins.object):
+ pass
+
for module in (net, query, ast, errors):
for functionName in module.__all__:
setattr(r, functionName, staticmethod(getattr(module, functionName))) | fix pypy compatibility in a different way that won't break tests | rethinkdb_rethinkdb | train | py |
52feccbfdf9c65d01238edffe83efa75eb6e248a | diff --git a/packages/sankey/src/SankeyLinksItem.js b/packages/sankey/src/SankeyLinksItem.js
index <HASH>..<HASH> 100644
--- a/packages/sankey/src/SankeyLinksItem.js
+++ b/packages/sankey/src/SankeyLinksItem.js
@@ -80,7 +80,7 @@ const SankeyLinksItem = ({
/>
)}
<path
- fill={enableGradient ? `url(#${linkId})` : color}
+ fill={enableGradient ? `url(#${encodeURI(linkId)})` : color}
d={path}
fillOpacity={opacity}
onMouseEnter={handleMouseEnter} | fix(sankey): fix issue with gradient links and spaces in IDs (#<I>) | plouc_nivo | train | js |
f2c1195f5df96b81e76a2931f29be96b68adfd0a | diff --git a/detox/android/detox/src/main/java/com/wix/detox/espresso/ReactBridgeIdlingResource.java b/detox/android/detox/src/main/java/com/wix/detox/espresso/ReactBridgeIdlingResource.java
index <HASH>..<HASH> 100644
--- a/detox/android/detox/src/main/java/com/wix/detox/espresso/ReactBridgeIdlingResource.java
+++ b/detox/android/detox/src/main/java/com/wix/detox/espresso/ReactBridgeIdlingResource.java
@@ -18,7 +18,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
public class ReactBridgeIdlingResource implements IdlingResource {
private static final String LOG_TAG = "Detox";
- private AtomicBoolean idleNow = new AtomicBoolean(false);
+ private AtomicBoolean idleNow = new AtomicBoolean(true);
private ResourceCallback callback = null;
@Override | RN bridge starts in idle state. | wix_Detox | train | java |
3f6220dedb6d824e14e0c703485bbf76c32af3db | diff --git a/poetry/console/commands/build.py b/poetry/console/commands/build.py
index <HASH>..<HASH> 100644
--- a/poetry/console/commands/build.py
+++ b/poetry/console/commands/build.py
@@ -33,4 +33,4 @@ class BuildCommand(EnvCommand):
)
builder = Builder(self.poetry)
- builder.build(fmt)
+ builder.build(fmt, executable=self.env.python) | build: ensure build uses project environment
Resolves: #<I> | sdispater_poetry | train | py |
fa7c9ee707bc34171747b86ab248e7913eb298c4 | diff --git a/src/dataviews/histogram-dataview-model.js b/src/dataviews/histogram-dataview-model.js
index <HASH>..<HASH> 100644
--- a/src/dataviews/histogram-dataview-model.js
+++ b/src/dataviews/histogram-dataview-model.js
@@ -61,7 +61,7 @@ module.exports = DataviewModelBase.extend({
}, this);
this.listenTo(this.layer, 'change:meta', this._onChangeLayerMeta);
this.on('change:column', this._reloadMap, this);
- this.on('change:bins change:start change:end', this._refreshAndResetFilter, this);
+ this.on('change:bins change:start change:end', this._fetchAndResetFilter, this);
},
enableFilter: function () {
@@ -137,8 +137,8 @@ module.exports = DataviewModelBase.extend({
}, this);
},
- _refreshAndResetFilter: function () {
- this.refresh();
+ _fetchAndResetFilter: function () {
+ this.fetch();
this.disableFilter();
this.filter.unsetRange();
} | Use fetch instead of refresh method
Does the same anyway | CartoDB_carto.js | train | js |
c6ee4b87ff8902d4726cc9975655b49e57b672c1 | diff --git a/rgbxy/__init__.py b/rgbxy/__init__.py
index <HASH>..<HASH> 100644
--- a/rgbxy/__init__.py
+++ b/rgbxy/__init__.py
@@ -147,10 +147,14 @@ class ColorHelper:
dy = one.y - two.y
return math.sqrt(dx * dx + dy * dy)
- def get_xy_point_from_rgb(self, red, green, blue):
+ def get_xy_point_from_rgb(self, red_i, green_i, blue_i):
"""Returns an XYPoint object containing the closest available CIE 1931 x, y coordinates
based on the RGB input values."""
+ red = red_i / 255.0
+ green = green_i / 255.0
+ blue = blue_i / 255.0
+
r = ((red + 0.055) / (1.0 + 0.055))**2.4 if (red > 0.04045) else (red / 12.92)
g = ((green + 0.055) / (1.0 + 0.055))**2.4 if (green > 0.04045) else (green / 12.92)
b = ((blue + 0.055) / (1.0 + 0.055))**2.4 if (blue > 0.04045) else (blue / 12.92) | RGB to xy first divide by <I>.
In the conversion from RGB to xy you schould first devide the integer by <I>.
This is stated in the philips hue conversion method <URL> becomes (<I>, <I>, <I>)" | benknight_hue-python-rgb-converter | train | py |
8b607db0a23f0a227491248db1406d0f8d183492 | diff --git a/main.php b/main.php
index <HASH>..<HASH> 100644
--- a/main.php
+++ b/main.php
@@ -96,7 +96,7 @@ if (isset($_GET['debug_profile'])) {
}
// Connect to database
-require_once("model/DB.php");
+require_once('model/DB.php');
// Redirect to the installer if no database is selected
if(!isset($databaseConfig) || !isset($databaseConfig['database']) || !$databaseConfig['database']) {
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index <HASH>..<HASH> 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -37,7 +37,9 @@ if(isset($_SERVER['argv'][2])) {
$_GET['flush'] = 1;
// Connect to database
-require_once($frameworkPath . "/core/Core.php");
+require_once $frameworkPath . '/core/Core.php';
+require_once $frameworkPath . '/tests/FakeController.php';
+
global $databaseConfig;
DB::connect($databaseConfig); | BUGFIX Fixing bootstrap.php to work with FakeController properly for
running tests using phpunit.xml file. | silverstripe_silverstripe-framework | train | php,php |
c73eada55a49fc855c7930b780520dbf13c53fb3 | diff --git a/src/models/color.js b/src/models/color.js
index <HASH>..<HASH> 100644
--- a/src/models/color.js
+++ b/src/models/color.js
@@ -151,7 +151,7 @@ const ColorModel = Hook.extend({
marker.setDataSourceForAllSubhooks(this.data);
entities.set(newFilter, false, false);
} else {
- if (model.isDiscrete() && model.use !== "constant") model.set({ which: this.which, data: this.data }, false, false);
+ if (model.isDiscrete()) model.set({ which: this.which, data: this.data }, false, false);
}
}, | Improvement following <I>affe: color model should not transfer constant which ("_default") to the dim of an entity | vizabi_vizabi | train | js |
692ef1010b4a17afcc46071410c0c66d183ddc63 | diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php
index <HASH>..<HASH> 100644
--- a/mod/quiz/locallib.php
+++ b/mod/quiz/locallib.php
@@ -1550,7 +1550,8 @@ function quiz_send_notification_messages($course, $quiz, $attempt, $context, $cm
}
// Check for notifications required.
- $notifyfields = 'u.id, u.username, u.idnumber, u.email, u.emailstop, u.lang, u.timezone, u.mailformat, u.maildisplay, ';
+ $notifyfields = 'u.id, u.username, u.idnumber, u.email, u.emailstop, u.lang,
+ u.timezone, u.mailformat, u.maildisplay, u.auth, u.suspended, u.deleted, ';
$notifyfields .= get_all_user_name_fields(true, 'u');
$groups = groups_get_all_groups($course->id, $submitter->id, $cm->groupingid);
if (is_array($groups) && count($groups) > 0) { | MDL-<I> quiz: doesn't include all user fields required by messaging | moodle_moodle | train | php |
0784c8af652299331f35a8a5fa9401c5aad9dbed | diff --git a/openxc/src/main/java/com/openxc/VehicleService.java b/openxc/src/main/java/com/openxc/VehicleService.java
index <HASH>..<HASH> 100644
--- a/openxc/src/main/java/com/openxc/VehicleService.java
+++ b/openxc/src/main/java/com/openxc/VehicleService.java
@@ -221,7 +221,7 @@ public class VehicleService extends Service {
try {
RawNumericalMeasurement rawMeasurement =
mRemoteService.getNumericalMeasurement(
- measurementType.toString());
+ MEASUREMENT_CLASS_TO_ID.get(measurementType));
return getNumericalMeasurementFromRaw(measurementType,
rawMeasurement);
} catch(RemoteException e) {
@@ -253,7 +253,8 @@ public class VehicleService extends Service {
measurementType);
mListeners.remove(measurementType, listener);
try {
- mRemoteService.removeListener(measurementType.toString(),
+ mRemoteService.removeListener(
+ MEASUREMENT_CLASS_TO_ID.get(measurementType),
mRemoteListener);
} catch(RemoteException e) {
throw new RemoteVehicleServiceException( | Fix regression in getting data synchronously. | openxc_openxc-android | train | java |
81f2743f1f590379a7df7693d70c7326df0639e5 | diff --git a/pyvips/__init__.py b/pyvips/__init__.py
index <HASH>..<HASH> 100644
--- a/pyvips/__init__.py
+++ b/pyvips/__init__.py
@@ -187,7 +187,7 @@ from .vimage import *
from .vregion import *
__all__ = [
- 'Error', 'Image', 'Region', 'Operation', 'GValue', 'Interpolate', 'GObject',
+ 'Error', 'Image', 'Region', 'Introspect', 'Operation', 'GValue', 'Interpolate', 'GObject',
'VipsObject', 'type_find', 'type_name', 'version', '__version__',
'at_least_libvips', 'API_mode',
'get_suffixes',
diff --git a/pyvips/voperation.py b/pyvips/voperation.py
index <HASH>..<HASH> 100644
--- a/pyvips/voperation.py
+++ b/pyvips/voperation.py
@@ -531,7 +531,7 @@ def cache_set_trace(trace):
__all__ = [
- 'Operation',
+ 'Introspect', 'Operation',
'cache_set_max', 'cache_set_max_mem', 'cache_set_max_files',
'cache_set_trace'
] | Move Introspect class to the public API | libvips_pyvips | train | py,py |
414dc226cf481754c2a0fe63402f8809af0c006a | diff --git a/lib/peek/controller_helpers.rb b/lib/peek/controller_helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/peek/controller_helpers.rb
+++ b/lib/peek/controller_helpers.rb
@@ -3,14 +3,14 @@ module Peek
extend ActiveSupport::Concern
included do
- prepend_before_filter :set_peek_request_id, :if => :peek_enabled?
+ prepend_before_action :set_peek_request_id, :if => :peek_enabled?
helper_method :peek_enabled?
end
protected
def set_peek_request_id
- Peek.request_id = env['action_dispatch.request_id']
+ Peek.request_id = request.env['action_dispatch.request_id']
end
def peek_enabled? | Remove deprecation warnings
Use method prepend_before_action instead prepend_before_filter and
request.env instead env | peek_peek | train | rb |
750944b9718f7971ce20fc893608d97fa0c34a31 | diff --git a/nipap-cli/setup.py b/nipap-cli/setup.py
index <HASH>..<HASH> 100755
--- a/nipap-cli/setup.py
+++ b/nipap-cli/setup.py
@@ -53,7 +53,7 @@ setup(
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
- 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 3 :: Only',
'Topic :: Internet'
]
) | cli: Updated setup.py for Python 3
Changed the language definition in setup.py to Python 3 only. | SpriteLink_NIPAP | train | py |
3e208f37ca6057be12369f62f04235cc546c81bd | diff --git a/devices/saswell.js b/devices/saswell.js
index <HASH>..<HASH> 100644
--- a/devices/saswell.js
+++ b/devices/saswell.js
@@ -15,6 +15,7 @@ module.exports = [
{modelID: 'TS0601', manufacturerName: '_TZE200_c88teujp'},
{modelID: 'TS0601', manufacturerName: '_TZE200_yw7cahqs'},
{modelId: 'TS0601', manufacturerName: '_TZE200_azqp6ssj'},
+ {modelID: 'TS0601', manufacturerName: '_TYST11_zuhszj9s'},
],
model: 'SEA801-Zigbee/SEA802-Zigbee',
vendor: 'Saswell', | Add new model ID for Saswell TRVs (#<I>) | Koenkk_zigbee-shepherd-converters | train | js |
98b64c2806baa21784aa02375c53c8a040fb4e41 | diff --git a/app/models/glue/pulp/repo.rb b/app/models/glue/pulp/repo.rb
index <HASH>..<HASH> 100644
--- a/app/models/glue/pulp/repo.rb
+++ b/app/models/glue/pulp/repo.rb
@@ -128,10 +128,11 @@ module Glue::Pulp::Repo
def destroy_repo
Pulp::Repository.destroy(self.pulp_id)
+ true
end
def del_content
- return if self.content.nil?
+ return true if self.content.nil?
content_group_id = Glue::Pulp::Repos.content_groupid(self.content)
content_repo_ids = Pulp::Repository.all([content_group_id]).map{|r| r['id']} | repos - orchestration fix, 'del_content' was not returning true when there was nothing to delete | Katello_katello | train | rb |
b069b701f67b5de2f22f70d117ab460f09573d84 | diff --git a/perceval/backends/mbox.py b/perceval/backends/mbox.py
index <HASH>..<HASH> 100644
--- a/perceval/backends/mbox.py
+++ b/perceval/backends/mbox.py
@@ -45,7 +45,9 @@ logger = logging.getLogger(__name__)
def get_update_time(item):
"""Extracts the update time from a message item"""
- return item['Date']
+
+ date = item['Date'] if 'Date' in item else item['date']
+ return date
class MBox(Backend): | [mbox] Add 'date' header as updating time
In the case of 'Date' header does not exist, 'date' is used
in the metadata decorator to add it to the update_time field. | chaoss_grimoirelab-perceval | train | py |
db5e947664aca0e9b84db437f1009bd28a03b86b | diff --git a/tests/data/tags-tests.js b/tests/data/tags-tests.js
index <HASH>..<HASH> 100644
--- a/tests/data/tags-tests.js
+++ b/tests/data/tags-tests.js
@@ -176,6 +176,26 @@ test('insertTag controls the tag location', function (assert) {
});
});
+test('insertTag can be controlled through the options', function (assert) {
+ var options = new Options({
+ insertTag: function (data, tag) {
+ data.push(tag);
+ }
+ });
+ var data = new SelectTags($('#qunit-fixture .single'), options);
+
+ data.query({
+ term: 'o'
+ }, function (data) {
+ assert.equal(data.results.length, 2);
+
+ var item = data.results[1];
+
+ assert.equal(item.id, 'o');
+ assert.equal(item.text, 'o');
+ });
+});
+
test('createTag controls the tag object', function (assert) {
var data = new SelectTags($('#qunit-fixture .single'), options);
@@ -238,4 +258,4 @@ test('the createTag options customizes the function', function (assert) {
assert.equal(item.text, 'test');
assert.equal(item.tag, true);
});
-});
+});
\ No newline at end of file | Added test for new insertTag option
This adds a basic test that ensures that the `insertTag` option works as
expected. | select2_select2 | train | js |
bdc3efbc5b50481a30f3a228c93f41208894d74c | diff --git a/src/view/bind.js b/src/view/bind.js
index <HASH>..<HASH> 100644
--- a/src/view/bind.js
+++ b/src/view/bind.js
@@ -73,7 +73,7 @@ function generate(bind, el, param, value) {
function form(bind, el, param, value) {
var node = element('input');
- for (var key in param) if (key !== 'signal') {
+ for (var key in param) if (key !== 'signal' && key !== 'element') {
node.setAttribute(key, param[key]);
}
node.setAttribute('name', param.signal); | Bind to form element should exclude element property. | vega_vega-view | train | js |
3db504e8998b1fdc0461b7e2977f49fa86464ffe | diff --git a/Doctrine/EventListener/Chain.php b/Doctrine/EventListener/Chain.php
index <HASH>..<HASH> 100644
--- a/Doctrine/EventListener/Chain.php
+++ b/Doctrine/EventListener/Chain.php
@@ -154,6 +154,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onSaveCascade($record);
}
}
+
public function onPreSaveCascade(Doctrine_Record $record) {
foreach($this->listeners as $listener) {
$listener->onPreSaveCascade($record);
@@ -165,6 +166,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
$listener->onDeleteCascade($record);
}
}
+
public function onPreDeleteCascade(Doctrine_Record $record) {
foreach($this->listeners as $listener) {
$listener->onPreDeleteCascade($record); | fixes #<I> (and second test of post-commit script...) | doctrine_annotations | train | php |
4d0c91cf49cb3d91c23c11eb45c8e1d6b96e9e75 | diff --git a/server/spec/spec_helper.rb b/server/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/server/spec/spec_helper.rb
+++ b/server/spec/spec_helper.rb
@@ -1,5 +1,6 @@
ENV['RACK_ENV'] = 'test'
-
+ENV['VAULT_KEY'] = SecureRandom.base64(64)
+ENV['VAULT_IV'] = SecureRandom.base64(64)
require 'dotenv'
Dotenv.load | add vault envs to spec_helper | kontena_kontena | train | rb |
43f1c9fac7845f99fddb0ef20bd549ae3d365389 | diff --git a/website/client/docusaurus.config.js b/website/client/docusaurus.config.js
index <HASH>..<HASH> 100644
--- a/website/client/docusaurus.config.js
+++ b/website/client/docusaurus.config.js
@@ -1,5 +1,5 @@
module.exports = {
- title: 'Effector',
+ title: 'effector',
tagline: 'The state manager',
url: process.env.SITE_URL || 'https://effector.dev',
baseUrl: '/',
@@ -18,9 +18,9 @@ module.exports = {
indexName: 'effector',
},
navbar: {
- title: 'Effector',
+ title: 'effector',
logo: {
- alt: 'Effector Logo',
+ alt: 'effector Logo',
src: 'img/comet.png',
},
items: [
@@ -84,6 +84,10 @@ module.exports = {
label: 'Telegram',
href: 'https://t.me/effector_en',
},
+ {
+ label: 'Youtube',
+ href: 'https://www.youtube.com/channel/UCm8PRc_yjz3jXHH0JylVw1Q',
+ }
],
},
{
@@ -97,7 +101,7 @@ module.exports = {
},
],
logo: {
- alt: 'Effector - the state manager',
+ alt: 'effector - the state manager',
src: 'img/comet.png',
href: 'https://github.com/effector/effector',
}, | docs: effector name should be lowercased | zerobias_effector | train | js |
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.