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 |
|---|---|---|---|---|---|
a4fdd408d89db5b7ca99bcabe4894df425f47fa4 | diff --git a/lib/http_objects/version.rb b/lib/http_objects/version.rb
index <HASH>..<HASH> 100644
--- a/lib/http_objects/version.rb
+++ b/lib/http_objects/version.rb
@@ -1,3 +1,3 @@
module HttpObjects
- VERSION = "0.0.4pre"
+ VERSION = "0.0.4"
end | Releasing version <I> | rogerleite_http_objects | train | rb |
028a93c29d0a85b51249f7abea1fc72c5bcd935d | diff --git a/src/LogicalPermissions.php b/src/LogicalPermissions.php
index <HASH>..<HASH> 100644
--- a/src/LogicalPermissions.php
+++ b/src/LogicalPermissions.php
@@ -289,9 +289,6 @@ class LogicalPermissions implements LogicalPermissionsInterface {
}
protected function processNOT($permissions, $type = NULL, $context) {
- if(!is_array($permissions) && !is_string($permissions)) {
- throw new InvalidValueForLogicGateException("The value of a NOT gate must either be an array or a string. Current value: " . print_r($permissions, TRUE));
- }
if(is_array($permissions)) {
if(count($permissions) != 1) {
throw new InvalidValueForLogicGateException('A NOT permission must have exactly one child in the value array. Current value: ' . print_r($permissions, TRUE));
@@ -302,6 +299,9 @@ class LogicalPermissions implements LogicalPermissionsInterface {
throw new InvalidValueForLogicGateException('A NOT permission cannot have an empty string as its value.');
}
}
+ else {
+ throw new InvalidValueForLogicGateException("The value of a NOT gate must either be an array or a string. Current value: " . print_r($permissions, TRUE));
+ }
$access = !$this->dispatch($permissions, $type, $context);
return $access; | kristofer: Minor restructure in processNOT | ordermind_logical-permissions-php | train | php |
15e9e21d413bdac37b9f2d192cc0b9d4791e127e | diff --git a/ibis/backends/dask/execution/util.py b/ibis/backends/dask/execution/util.py
index <HASH>..<HASH> 100644
--- a/ibis/backends/dask/execution/util.py
+++ b/ibis/backends/dask/execution/util.py
@@ -106,8 +106,12 @@ def compute_sort_key(
**kwargs,
):
"""
- Note - we use this function instead of the pandas.execution.util so that
- we use the dask `execute` method
+ Note - we use this function instead of the pandas.execution.util so that we
+ use the dask `execute` method
+
+ This function borrows the logic in the pandas backend. ``by`` can be a
+ string or an expression. If ``by.get_name()`` raises an exception, we must
+ ``execute`` the expression and sort by the new derived column.
"""
by = key.to_expr()
name = ibis.util.guid() | DOC: Update docstring in dask backend (#<I>) | ibis-project_ibis | train | py |
94ffc92f440b666232c75d65d70f2c03d3860dcf | diff --git a/src/HeaderBag.php b/src/HeaderBag.php
index <HASH>..<HASH> 100644
--- a/src/HeaderBag.php
+++ b/src/HeaderBag.php
@@ -23,7 +23,10 @@ class HeaderBag
foreach ($lines as $line)
{
- list($name, $value) = explode(': ', $line, 2);
+ preg_match('/^([^:]++)(?|(?:[:][ ]?+)(.*+)|())/', $line, $matches);
+ array_shift($matches);
+
+ list($name, $value) = $matches;
$bag->add($name, $value);
}
@@ -103,6 +106,6 @@ class Header
public function __toString()
{
- return $this->name . ($this->value === '' ? '' : ': ' . $this->value);
+ return $this->name . ':' .(empty($this->value) ? '' : ' ' . $this->value);
}
} | header value is optional; space is optional; colon is not optional to set header | aidantwoods_SecureHeaders | train | php |
81634a2d0e9bead77c74ff45000eeef1d673538c | diff --git a/v1/worker.go b/v1/worker.go
index <HASH>..<HASH> 100644
--- a/v1/worker.go
+++ b/v1/worker.go
@@ -1,7 +1,6 @@
package machinery
import (
- "errors"
"fmt"
"log"
"reflect"
@@ -89,7 +88,7 @@ func (worker *Worker) Process(signature *signatures.TaskSignature) error {
// Call the task passing in the correct arguments
results := reflectedTask.Call(relfectedArgs)
if !results[1].IsNil() {
- return worker.finalizeError(signature, errors.New(results[1].String()))
+ return worker.finalizeError(signature, results[1].Interface().(error))
}
return worker.finalizeSuccess(signature, results[0]) | Fixed a problem with converting reflection values to an error. | RichardKnop_machinery | train | go |
cf70c6f6ebdad9e1596b34de86f77d8d71d92d6e | diff --git a/lib/dbus/bus.rb b/lib/dbus/bus.rb
index <HASH>..<HASH> 100644
--- a/lib/dbus/bus.rb
+++ b/lib/dbus/bus.rb
@@ -435,6 +435,7 @@ module DBus
# Get one message from the bus and remove it from the buffer.
# Return the message.
def pop_message
+ return nil if @buffer.empty?
ret = nil
begin
ret, size = Message.new.unmarshall_buffer(@buffer) | Don't process an empty buffer
pop_message might be called on an empty buffer, resulting in 'popping'
garbage from the buffer. | mvidner_ruby-dbus | train | rb |
a269067e320008af07650638bc7633a3f3c8168c | diff --git a/parsl/__init__.py b/parsl/__init__.py
index <HASH>..<HASH> 100644
--- a/parsl/__init__.py
+++ b/parsl/__init__.py
@@ -29,7 +29,9 @@ doesn't log anything. However the following helper functions are provided for lo
from parsl.version import VERSION
from parsl.app.app import App
-from parsl.app.executors import ThreadPoolExecutor, ProcessPoolExecutor
+#from parsl.app.executors import ThreadPoolExecutor, ProcessPoolExecutor
+from parsl.executors.threads import ThreadPoolExecutor
+from parsl.executors.ipp import IPyParallelExecutor
import logging
#import parsl.app.errors
@@ -41,7 +43,7 @@ APP_FACTORY_FACTORY = AppFactoryFactory('central')
__author__ = 'Yadu Nand Babuji'
__version__ = VERSION
-__all__ = ['App', 'DataFlowKernel', 'ThreadPoolExecutor', 'ProcessPoolExecutor']
+__all__ = ['App', 'DataFlowKernel', 'ThreadPoolExecutor', 'IPyParallelExecutor']
def set_stream_logger(name='parsl', level=logging.DEBUG, format_string=None):
''' | Updating the __init__ to expose the right executors | Parsl_parsl | train | py |
c2614a9d6b378ac0580637fc27e60788177e9587 | diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -134,7 +134,7 @@ function Weight(i, t, m, n, s) {
}
/**
- *
+ * @private
* @param m Number of points
* @param n Polynomial grade
* @param s Derivative | chore: add private in fullWeights docs | mljs_savitzky-golay-generalized | train | js |
68be0a82e920bc094537afbf96a71132e9d2855a | diff --git a/src/main/java/org/redisson/RedissonMapCache.java b/src/main/java/org/redisson/RedissonMapCache.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/redisson/RedissonMapCache.java
+++ b/src/main/java/org/redisson/RedissonMapCache.java
@@ -703,7 +703,7 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
@Override
public Future<Boolean> deleteAsync() {
- return commandExecutor.writeAsync(getName(), RedisCommands.DEL_OBJECTS, getName(), getTimeoutSetName());
+ return commandExecutor.writeAsync(getName(), RedisCommands.DEL_OBJECTS, getName(), getTimeoutSetName(), getIdleSetName());
}
@Override | Fixed - RMap doesn't delete redisson__idle__set__ #<I> | redisson_redisson | train | java |
443aa856b952cc56f74f6757b5e02f006f1eee04 | diff --git a/lib/waterline/query/finders/operations.js b/lib/waterline/query/finders/operations.js
index <HASH>..<HASH> 100644
--- a/lib/waterline/query/finders/operations.js
+++ b/lib/waterline/query/finders/operations.js
@@ -663,7 +663,7 @@ Operations.prototype._runChildOperations = function _runChildOperations(intermed
}
delete userCriteria.sort;
- criteria = _.merge(criteria, userCriteria);
+ criteria = _.extend(criteria, userCriteria);
}
criteria = normalize.criteria({ where: criteria }); | use extend instead of a deep merge to override populate where criteria | balderdashy_waterline | train | js |
42e7af0e36a2bb0c1877c6648ccd61dae7b69a29 | diff --git a/tests/Bitpay/Math/BcEngineTest.php b/tests/Bitpay/Math/BcEngineTest.php
index <HASH>..<HASH> 100644
--- a/tests/Bitpay/Math/BcEngineTest.php
+++ b/tests/Bitpay/Math/BcEngineTest.php
@@ -17,11 +17,7 @@ class BcEngineTest extends \PHPUnit_Framework_TestCase
if (!extension_loaded('bcmath'))
{
$this->markTestSkipped('The Bcmath extension is NOT loaded! You must enable it to run this test');
- } elseif (!extension_loaded('gmp'))
- {
- $this->markTestSkipped('The GMPmath extension is NOT loaded! You must enable it to run this test');
}
-
}
public function testConstruct() | removed check for gmp; gmp is no longer referenced here. | bitpay_php-bitpay-client | train | php |
9b9fc9a6729942bb40e5cec2f83dddb7070a2f3e | diff --git a/lib/arjdbc/oracle/column.rb b/lib/arjdbc/oracle/column.rb
index <HASH>..<HASH> 100644
--- a/lib/arjdbc/oracle/column.rb
+++ b/lib/arjdbc/oracle/column.rb
@@ -17,7 +17,7 @@ module ArJdbc
def primary=(value)
super
@type = :integer if value && @sql_type =~ /^NUMBER$/i
- end
+ end if ::ActiveRecord::VERSION::STRING < '4.2'
def type_cast(value)
return nil if value.nil? | [oracle] do not override primary= within column methods on AR <I> | jruby_activerecord-jdbc-adapter | train | rb |
aa9fc035414d695e52343a707b49081b5f67d52e | diff --git a/src/Deployer/Tool.php b/src/Deployer/Tool.php
index <HASH>..<HASH> 100644
--- a/src/Deployer/Tool.php
+++ b/src/Deployer/Tool.php
@@ -55,10 +55,10 @@ class Tool
*/
private $ignore = array();
- public function __construct()
+ public function __construct(array $argv = null)
{
$this->app = new Application('Deployer', '0.3.0');
- $this->input = new ArgvInput();
+ $this->input = new ArgvInput($argv);
$this->output = new ConsoleOutput();
$this->local = new Local();
}
diff --git a/src/deployer.php b/src/deployer.php
index <HASH>..<HASH> 100644
--- a/src/deployer.php
+++ b/src/deployer.php
@@ -9,11 +9,12 @@
* Start deployer script.
*
* @param bool $includeFunction Include or not helpful functions.
+ * @param array|null $argv
* @return \Deployer\Tool
*/
-function deployer($includeFunction = true)
+function deployer($includeFunction = true, array $argv = null)
{
- $tool = new Deployer\Tool();
+ $tool = new Deployer\Tool($argv);
if ($includeFunction) {
Deployer\Tool\Context::push($tool); | Posibility to pass argv in Deployer\Tool for working with input parameters | deployphp_deployer | train | php,php |
b8bd9d7508f7ce35418b18c8653aa03445f233f9 | diff --git a/app/drivers/openmz.py b/app/drivers/openmz.py
index <HASH>..<HASH> 100644
--- a/app/drivers/openmz.py
+++ b/app/drivers/openmz.py
@@ -37,8 +37,15 @@ class TSVQuantDriver(BaseDriver):
consensus_quants = readers.quant_generator(self.quantfn)
return lookups.create_quant_lookup(spectra, consensus_quants)
- def generate_psms(self, quantdb):
- self.psms = preparation.generate_psms_quanted(quantdb, self.tsvfn)
+ def generate_tsv_content(self, quantdb):
+ """Creates iterator to write to new tsv. Contains input tsv
+ lines plus quant data for these."""
+ quantheader = preparation.get_quant_header(quantdb)
+ self.header = preparation.create_tsv_header_quant(self.tsvfn,
+ quantheader)
+ self.psms = preparation.generate_psms_quanted(quantdb,
+ self.tsvfn,
+ quantheader)
def write(self):
outfn = self.create_outfilepath(self.tsvm, 'quants') | Created content generator calling code for tsv mzid with quant | glormph_msstitch | train | py |
cbd0fd8f0f7a501ce24b664e5b84e17473ed3d82 | diff --git a/library/CM/File.php b/library/CM/File.php
index <HASH>..<HASH> 100644
--- a/library/CM/File.php
+++ b/library/CM/File.php
@@ -45,7 +45,7 @@ class CM_File extends CM_Class_Abstract {
* @throws CM_Exception
*/
public function getSize() {
- $size = filesize($this->getPath());
+ $size = @filesize($this->getPath());
if (false === $size) {
throw new CM_Exception('Cannot detect filesize of `' . $this->getPath() . '`');
}
diff --git a/tests/library/CM/FileTest.php b/tests/library/CM/FileTest.php
index <HASH>..<HASH> 100644
--- a/tests/library/CM/FileTest.php
+++ b/tests/library/CM/FileTest.php
@@ -37,6 +37,21 @@ class CM_FileTest extends CMTest_TestCase {
}
}
+ public function testGetSize() {
+ $file = CM_File::createTmp(null, 'hello');
+ $this->assertSame(5, $file->getSize());
+ }
+
+ /**
+ * @expectedException CM_Exception
+ * @expectedExceptionMessage Cannot detect filesize
+ */
+ public function testGetSizeInvalid() {
+ $file = CM_File::createTmp(null, 'hello');
+ $file->delete();
+ $file->getSize();
+ }
+
public function testDelete() {
$file = new CM_File($this->_testFilePath); | Add test for CM_File::getSize | cargomedia_cm | train | php,php |
226024e16686640acaa73d70a32a0ccc8275f561 | diff --git a/src/test/java/com/hp/autonomy/hod/client/api/textindex/query/search/QueryTextIndexITCase.java b/src/test/java/com/hp/autonomy/hod/client/api/textindex/query/search/QueryTextIndexITCase.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/hp/autonomy/hod/client/api/textindex/query/search/QueryTextIndexITCase.java
+++ b/src/test/java/com/hp/autonomy/hod/client/api/textindex/query/search/QueryTextIndexITCase.java
@@ -75,7 +75,7 @@ public class QueryTextIndexITCase extends AbstractHodClientIntegrationTest {
final Map<String, Object> params = new QueryRequestBuilder()
.setMaxPageResults(10)
.setAbsoluteMaxResults(10)
- .addIndexes("wiki_ita", "wiki_eng")
+ .addIndexes("wiki_ger", "wiki_eng")
.setSort(Sort.date)
.build();
@@ -93,7 +93,7 @@ public class QueryTextIndexITCase extends AbstractHodClientIntegrationTest {
final Map<String, Object> params = new QueryRequestBuilder()
.setMaxPageResults(10)
.setAbsoluteMaxResults(10)
- .addIndexes("wiki_ita", "wiki_eng")
+ .addIndexes("wiki_ger", "wiki_eng")
.setSort(Sort.date)
.build(); | Use wiki_ger because wiki_ita seems incapable of staying up for more than <I> minutes. | microfocus-idol_java-hod-client | train | java |
f2ab08ae0c575ccd6d4e5637adea47531bcceed1 | diff --git a/src/util/methodDataByVersion.js b/src/util/methodDataByVersion.js
index <HASH>..<HASH> 100644
--- a/src/util/methodDataByVersion.js
+++ b/src/util/methodDataByVersion.js
@@ -509,8 +509,10 @@ module.exports = {
'dropWhile',
'fill',
'filter',
+ 'flatMap',
'flatten',
'flattenDeep',
+ 'flattenDepth',
'flip',
'flow',
'flowRight',
@@ -523,6 +525,7 @@ module.exports = {
'intersectionBy',
'intersectionWith',
'invert',
+ 'invertBy',
'invokeMap',
'iteratee',
'keyBy',
@@ -560,6 +563,7 @@ module.exports = {
'pull',
'pullAll',
'pullAllBy',
+ 'pullAllWith',
'pullAt',
'push',
'range',
@@ -603,6 +607,8 @@ module.exports = {
'unshift',
'unzip',
'unzipWith',
+ 'update',
+ 'updateWith',
'values',
'valuesIn',
'without',
@@ -612,6 +618,7 @@ module.exports = {
'xorWith',
'zip',
'zipObject',
+ 'zipObjectDeep',
'zipWith'
],
iteratee: { | Sync chainable in v4 with lodash master. Fixes #<I> | wix_eslint-plugin-lodash | train | js |
35b3d5001206c3f81d8e9710dbbf0adecfae7757 | diff --git a/lib/plugin.js b/lib/plugin.js
index <HASH>..<HASH> 100644
--- a/lib/plugin.js
+++ b/lib/plugin.js
@@ -33,7 +33,7 @@ var Plugin = function(book, name) {
// Type of plugins resources
Plugin.RESOURCES = ["js", "css"];
Plugin.HOOKS = [
- "init", "finish"
+ "init", "finish", "finish:before"
]
// Load from a name | Add "finish:before" to the list of valid hooks | GitbookIO_gitbook | train | js |
5253485523da41d6750a8b3ed7e4e4b0cbc70cf3 | diff --git a/lib/crawler.js b/lib/crawler.js
index <HASH>..<HASH> 100644
--- a/lib/crawler.js
+++ b/lib/crawler.js
@@ -150,7 +150,7 @@ class Crawler {
requestBox[0] = request.open(self);
debug(`getRequestWork(${requestBox.loopName}:${request.toUniqueString()}): exit (success)`);
if (request.attemptCount) {
- return Q.delay(requestBox[0], self.options.retryDelay || 30000);
+ return Q.delay(requestBox[0], self.options.requeueDelay || 30000);
}
return requestBox[0];
})
diff --git a/lib/crawlerFactory.js b/lib/crawlerFactory.js
index <HASH>..<HASH> 100644
--- a/lib/crawlerFactory.js
+++ b/lib/crawlerFactory.js
@@ -60,7 +60,7 @@ class CrawlerFactory {
pollingDelay: 5000,
processingTtl: 60 * 1000,
promiseTrace: false,
- retryDelay: 30000,
+ requeueDelay: 30000,
orgList: CrawlerFactory.loadOrgs()
},
fetcher: { | Change var name from retryDelay to requeueDelay | Microsoft_ghcrawler | train | js,js |
0ce09ec54ec3cb03a44872edd546703d0e0b10f5 | diff --git a/common/network-common/src/main/java/org/apache/spark/network/util/TransportConf.java b/common/network-common/src/main/java/org/apache/spark/network/util/TransportConf.java
index <HASH>..<HASH> 100644
--- a/common/network-common/src/main/java/org/apache/spark/network/util/TransportConf.java
+++ b/common/network-common/src/main/java/org/apache/spark/network/util/TransportConf.java
@@ -209,7 +209,7 @@ public class TransportConf {
* (128 bits by default), which is not generally the case with user passwords.
*/
public int keyFactoryIterations() {
- return conf.getInt("spark.networy.crypto.keyFactoryIterations", 1024);
+ return conf.getInt("spark.network.crypto.keyFactoryIterations", 1024);
}
/** | [SPARK-<I>][CORE] Fix typo in spark.network.crypto.keyFactoryIterations
Closes #<I> from squito/SPARK-<I>. | apache_spark | train | java |
c7a4845ce4fd937fb86334c76d7f175f305740ff | diff --git a/src/gnupg.py b/src/gnupg.py
index <HASH>..<HASH> 100644
--- a/src/gnupg.py
+++ b/src/gnupg.py
@@ -89,6 +89,7 @@ import codecs
## For AOS, the locale module will need to point to a wrapper around the
## java.util.Locale class.
## See https://code.patternsinthevoid.net/?p=android-locale-hack.git
+import encodings
import locale
import logging
import os
@@ -189,7 +190,8 @@ class GPGBase(object):
if encoding is None: # This happens on Jython!
encoding = sys.stdin.encoding
self.encoding = encoding.lower().replace('-', '_')
-
+ self.filesystemencoding = encodings.normalize_encoding(
+ sys.getfilesystemencoding().lower())
try:
assert self.binary, "Could not find binary %s" % binary | Also get set GPG.filesystemencoding in case we have to save a file. | isislovecruft_python-gnupg | train | py |
0c894fc32c76ee32a7a3d4ec279f4d16b55b6029 | diff --git a/src/reconciler/hostconfig.js b/src/reconciler/hostconfig.js
index <HASH>..<HASH> 100644
--- a/src/reconciler/hostconfig.js
+++ b/src/reconciler/hostconfig.js
@@ -8,7 +8,6 @@
* -------------------------------------------
*/
-import idx from 'idx/lib/idx'
import invariant from 'fbjs/lib/invariant'
import performanceNow from 'performance-now'
import { createElement } from '../utils/element'
@@ -159,7 +158,7 @@ export default {
insertInContainerBefore: insertBefore,
commitUpdate(instance, updatePayload, type, oldProps, newProps) {
- let applyProps = idx(instance, _ => _.applyProps)
+ let applyProps = instance && instance.applyProps
if (typeof applyProps !== 'function') {
applyProps = applyDefaultProps
} | Get rid of idx in hostconfig | inlet_react-pixi | train | js |
56bef5c97f70fdf294d4e232c933e11bc10934c0 | diff --git a/src/Models/Menu.php b/src/Models/Menu.php
index <HASH>..<HASH> 100644
--- a/src/Models/Menu.php
+++ b/src/Models/Menu.php
@@ -105,7 +105,7 @@ class Menu extends Model
\Cache::forget('voyager_menu_'.$this->name);
}
- private static function processItems($items)
+ protected static function processItems($items)
{
// Eagerload Translations
if (config('voyager.multilingual.enabled')) { | Menu model display method override bugfix (#<I>) | the-control-group_voyager | train | php |
70f9028921a6f13b7b6cdacfbd0c43046fe90281 | diff --git a/src/js/lightgallery.js b/src/js/lightgallery.js
index <HASH>..<HASH> 100644
--- a/src/js/lightgallery.js
+++ b/src/js/lightgallery.js
@@ -727,7 +727,8 @@ Plugin.prototype.loadContent = function(index, rec, delay) {
elements: [_img[0]]
});
} catch (e) {
- console.warn('Make sure you have included Picturefill library in your document');
+ console.warn('If you want srcset to be supported for older browsers, ' +
+ 'please include picturefil javascript library in your document.');
}
}
} | Update warning if Picturefill library is not included | sachinchoolur_lightgallery.js | train | js |
b6b1249013074960b42757dd7009084b7bfd4343 | diff --git a/python/dllib/src/test/bigdl/transform/test_image.py b/python/dllib/src/test/bigdl/transform/test_image.py
index <HASH>..<HASH> 100644
--- a/python/dllib/src/test/bigdl/transform/test_image.py
+++ b/python/dllib/src/test/bigdl/transform/test_image.py
@@ -18,6 +18,7 @@ import pytest
import os
from bigdl.util.common import *
from bigdl.transform.vision.image import *
+import tempfile
class TestLayer():
@@ -198,6 +199,12 @@ class TestLayer():
image_frame = ImageFrame.read(self.image_path, self.sc)
image_frame.get_predict()
+ def test_read_write_parquet(self):
+ temp = tempfile.mkdtemp() + "testParquet/"
+ resource_path = os.path.join(os.path.split(__file__)[0], "../resources/pascal")
+ ImageFrame.write_parquet(resource_path, temp, self.sc, 1)
+ read_image_frame = ImageFrame.read_parquet(temp, self.sc)
+
if __name__ == "__main__":
pytest.main([__file__]) | [Enhancement] ImageFrame adding more APIs (#<I>)
* add api for evaluation
* rename method
* fix
* wrapper parquet
* fix api
* fix read issue | intel-analytics_BigDL | train | py |
09a051541b751ea3cda8cc4be4a545a67f5bb7b4 | diff --git a/logging-api/src/main/java/com/cisco/oss/foundation/logging/transactions/TransactionLogger.java b/logging-api/src/main/java/com/cisco/oss/foundation/logging/transactions/TransactionLogger.java
index <HASH>..<HASH> 100644
--- a/logging-api/src/main/java/com/cisco/oss/foundation/logging/transactions/TransactionLogger.java
+++ b/logging-api/src/main/java/com/cisco/oss/foundation/logging/transactions/TransactionLogger.java
@@ -193,6 +193,20 @@ public abstract class TransactionLogger {
}
+ /**
+ * Add property to 'properties' map on transaction
+ * @param key - of property
+ * @param value - of property
+ * @param transactionLogger
+ */
+ public static void addAsyncProperty(String key, String value, TransactionLogger transactionLogger) {
+
+ FlowContextFactory.deserializeNativeFlowContext(transactionLogger.getFlowContextAsync(transactionLogger));
+ transactionLogger.properties.put(key, value);
+
+ }
+
+
public static void setSeparator(String separatorChar) {
separator = separatorChar; | Support AddProperty for async | foundation-runtime_logging | train | java |
244486221a413e39f7f7390051165b001da271a0 | diff --git a/Eloquent/Relations/Relation.php b/Eloquent/Relations/Relation.php
index <HASH>..<HASH> 100755
--- a/Eloquent/Relations/Relation.php
+++ b/Eloquent/Relations/Relation.php
@@ -266,7 +266,7 @@ abstract class Relation {
*/
public function wrap($value)
{
- return $this->parent->getQuery()->getGrammar()->wrap($value);
+ return $this->parent->newQueryWithoutScopes()->getQuery()->getGrammar()->wrap($value);
}
/** | Fixing relation queries to ignore the parent scope in order to avoid infinte loop on whereHas in global scope | illuminate_database | train | php |
0a56b3d992651e758e46ba9fe1c76b6ca0591cbd | diff --git a/domt.js b/domt.js
index <HASH>..<HASH> 100644
--- a/domt.js
+++ b/domt.js
@@ -269,7 +269,7 @@ Domt.prototype.empty = function() {
Domt.prototype.merge = function(obj, opts) {
if (this._nodes) this.init();
opts = opts || {};
- var filters = addToFilters(this.filters, opts);
+ var filters = addToFilters(this.filters.slice(), opts);
var nodes = opts.node ? [opts.node] : this.nodes;
var that = this;
each(nodes, function(node) { | Do not pollute global filters with merge() | kapouer_domt | train | js |
f3e435cb3fb11409e9833b09aa75cb8742db6ea9 | diff --git a/hordak/__init__.py b/hordak/__init__.py
index <HASH>..<HASH> 100644
--- a/hordak/__init__.py
+++ b/hordak/__init__.py
@@ -1,18 +0,0 @@
-from decimal import ROUND_HALF_EVEN
-
-import moneyed
-from moneyed.localization import _sign, _format
-
-_sign("en_GB", moneyed.GBP, prefix="£")
-
-_format(
- "en_GB",
- group_size=3,
- group_separator=",",
- decimal_point=".",
- positive_sign="",
- trailing_positive_sign="",
- negative_sign="-",
- trailing_negative_sign="",
- rounding_method=ROUND_HALF_EVEN,
-) | remove moneyed definition, that is already defined there | adamcharnock_django-hordak | train | py |
74c3acef3fb77bf0eeaff176dc05bc96f4d7301a | diff --git a/src/url-toolkit.js b/src/url-toolkit.js
index <HASH>..<HASH> 100644
--- a/src/url-toolkit.js
+++ b/src/url-toolkit.js
@@ -3,7 +3,7 @@
(function (root) {
var URL_REGEX =
/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/;
- var FIRST_SEGMENT_REGEX = /^([^\/?#]*)([^]*)$/;
+ var FIRST_SEGMENT_REGEX = /^(?=([^\/?#]*))\1([^]*)$/;
var SLASH_DOT_REGEX = /(?:\/|^)\.(?=\/)/g;
var SLASH_DOT_DOT_REGEX = /(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g; | make FIRST_SEGMENT_REGEX safe | tjenkinson_url-toolkit | train | js |
2bc2206d9e9b01ca125d9d67d2a2eb11be04a0ac | diff --git a/shinken/external_command.py b/shinken/external_command.py
index <HASH>..<HASH> 100644
--- a/shinken/external_command.py
+++ b/shinken/external_command.py
@@ -409,7 +409,7 @@ class ExternalCommandManager:
# Ok we remove the [ ]
ts = ts[1:-1]
try: # is an int or not?
- self.current_timestamp = int(ts)
+ self.current_timestamp = to_int(ts)
except ValueError:
logger.debug("Malformed command '%s'" % command)
return None | Fix : replace int by to_int for timestamp is external_commands. Thanks @matthieucan | Alignak-monitoring_alignak | train | py |
964ff8256e5a52be084921402330984910ad4fa0 | diff --git a/openxc/version.py b/openxc/version.py
index <HASH>..<HASH> 100644
--- a/openxc/version.py
+++ b/openxc/version.py
@@ -6,7 +6,7 @@ problems with ``__init__.py`` (which is loaded by setup.py during installation,
which in turn needs access to this version information.)
"""
-VERSION = (0, 9, 3)
+VERSION = (0, 9, 4)
__version__ = '.'.join(map(str, VERSION)) | Bump to <I> in package version for development. | openxc_openxc-python | train | py |
121d0aeb0cff686cdf767f0308b50221e34d1a80 | diff --git a/plugins/recorder/src/main/java/com/qspin/qtaste/recorder/Spy.java b/plugins/recorder/src/main/java/com/qspin/qtaste/recorder/Spy.java
index <HASH>..<HASH> 100644
--- a/plugins/recorder/src/main/java/com/qspin/qtaste/recorder/Spy.java
+++ b/plugins/recorder/src/main/java/com/qspin/qtaste/recorder/Spy.java
@@ -324,7 +324,7 @@ public class Spy implements DocumentListener, PropertyChangeListener,
builder.append("<change>");
if (pEvent.getType() != EventType.REMOVE)
{
- builder.append(pEvent.getDocument().getText(pEvent.getOffset(), pEvent.getLength()));
+ builder.append(pEvent.getDocument().getText(0, pEvent.getDocument().getLength()));
}
builder.append("</change>" + LINE_BREAK);
builder.append("</data>" + LINE_BREAK); | [RECORDER] On document change, the xml event will contain the full text component value and not only the concerned characters | qspin_qtaste | train | java |
a032bd9a292b9fa4b931c35a9fc72f41261718f0 | diff --git a/src/discoursegraphs/readwrite/conano.py b/src/discoursegraphs/readwrite/conano.py
index <HASH>..<HASH> 100755
--- a/src/discoursegraphs/readwrite/conano.py
+++ b/src/discoursegraphs/readwrite/conano.py
@@ -65,13 +65,10 @@ class ConanoDocumentGraph(DiscourseDocumentGraph):
text it spans (this is only useful for debugging).
"""
# super calls __init__() of base class DiscourseDocumentGraph
- super(ConanoDocumentGraph, self).__init__()
+ super(ConanoDocumentGraph, self).__init__(namespace=namespace)
self.name = name if name else os.path.basename(conano_filepath)
self.ns = namespace
- self.root = self.ns+':root_node'
- self.add_node(self.root, layers={self.ns})
-
self.tokenize = tokenize
if self.tokenize:
self.tokens = [] | conano: workaround for #<I>. the root node is now part of the 'conano' layer | arne-cl_discoursegraphs | train | py |
4b07693a05f3a528363393fbb73e98c2e84ad01b | diff --git a/creamas/examples/grid/main.py b/creamas/examples/grid/main.py
index <HASH>..<HASH> 100644
--- a/creamas/examples/grid/main.py
+++ b/creamas/examples/grid/main.py
@@ -45,7 +45,7 @@ SPAWN_CMD = "python {cmd} -p {port} -s {n_slaves} -o {origin} -gs {grid_size}"
logger = logging.getLogger(__name__)
-LOG_LEVEL = logging.INFO
+LOG_LEVEL = logging.DEBUG
MGR_FILE = 'mgr_addrs.txt' | examples/grid up to date. | assamite_creamas | train | py |
d17f3cf68f04d906c4362b4f571ca1b1b088d53a | diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -43,7 +43,7 @@ module.exports = function(grunt) {
release: {
options: {
- npmtag: true
+ npmtag: false
}
} | make stable channel the default install on npm | karma-runner_grunt-karma | train | js |
2512dc238e6eb267bf288f92d1e2da6bc04a99a6 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,7 @@ setup(
description="Redis-based components for Scrapy.",
long_description=read_rst('README.rst') + '\n\n' + read_rst('HISTORY.rst'),
author="Rolando Espinoza",
- author_email='rolando at rmax.io',
+ author_email='rolando@rmax.io',
url='https://github.com/rolando/scrapy-redis',
packages=list(find_packages('src')),
package_dir={'': 'src'}, | Fix email to match PyPI registered email.
Otherwise release is not published. | rmax_scrapy-redis | train | py |
15f9122b55d70cead0258bb7f16e607d18a9f09d | diff --git a/richtextfx/src/main/java/org/fxmisc/richtext/SelectionPath.java b/richtextfx/src/main/java/org/fxmisc/richtext/SelectionPath.java
index <HASH>..<HASH> 100644
--- a/richtextfx/src/main/java/org/fxmisc/richtext/SelectionPath.java
+++ b/richtextfx/src/main/java/org/fxmisc/richtext/SelectionPath.java
@@ -37,6 +37,9 @@ public class SelectionPath extends Path {
SelectionPath(Val<IndexRange> range) {
setManaged(false);
this.range = range;
+ highlightFill.addListener( (ob,ov,nv) -> setFill( nv ) );
+ setFill( getHighlightFill() );
+ setStrokeWidth( 0.0 );
}
@Override | Added missing CSS highlight linkup in SelectionPath | FXMisc_RichTextFX | train | java |
d9142e94e080eb61835ccc72d971f37754cc279f | diff --git a/src/skyTracker.js b/src/skyTracker.js
index <HASH>..<HASH> 100644
--- a/src/skyTracker.js
+++ b/src/skyTracker.js
@@ -73,7 +73,7 @@ function createSkyEntity(id, json) {
let m = message.substr(idx2 + 1, message.length)
return {
date: date,
- message: m.trim()
+ status: m.trim()
}
})
diff --git a/test/skyTest.js b/test/skyTest.js
index <HASH>..<HASH> 100644
--- a/test/skyTest.js
+++ b/test/skyTest.js
@@ -54,7 +54,7 @@ describe('Sky 56', function() {
assert.equal(info.id, id)
assert.equal(info.messages.length, 6)
- assert.equal(info.messages[0].message, 'Parcel departure in Shenzhen Sorting Centre')
+ assert.equal(info.messages[0].status, 'Parcel departure in Shenzhen Sorting Centre')
assert.equal(info.status.length, 5)
assert.equal(info.status[0].status, 'Pre-registrado') | Changed skyinfo entity to be consistent with others sky entities | hdnpt_geartrack | train | js,js |
9b9c1a8ac2f3378bbc9e08601b9a09a2c4e203ab | diff --git a/shell/impl/src/main/java/org/jboss/forge/addon/shell/aesh/CommandAdapter.java b/shell/impl/src/main/java/org/jboss/forge/addon/shell/aesh/CommandAdapter.java
index <HASH>..<HASH> 100644
--- a/shell/impl/src/main/java/org/jboss/forge/addon/shell/aesh/CommandAdapter.java
+++ b/shell/impl/src/main/java/org/jboss/forge/addon/shell/aesh/CommandAdapter.java
@@ -103,13 +103,17 @@ class CommandAdapter implements Command<CommandInvocation>
commandResult = Results.fail(e.getMessage(), e);
}
failure = displayResult(commandResult);
- UISelection<?> selection = interaction.getContext().getSelection();
- if (selection != null && !selection.isEmpty())
+ // If Exit was not called
+ if (!Boolean.TRUE.equals(attributeMap.get("org.jboss.forge.exit")))
{
- Object result = selection.get();
- if (result instanceof Resource<?>)
+ UISelection<?> selection = interaction.getContext().getSelection();
+ if (selection != null && !selection.isEmpty())
{
- shell.setCurrentResource((Resource<?>) result);
+ Object result = selection.get();
+ if (result instanceof Resource<?>)
+ {
+ shell.setCurrentResource((Resource<?>) result);
+ }
}
}
} | Avoiding IllegalStateException when forge exits | forge_core | train | java |
2f5e5c3979145f32ba28e4eaa9f127f0431ceed7 | diff --git a/views/js/runner/provider/qti.js b/views/js/runner/provider/qti.js
index <HASH>..<HASH> 100644
--- a/views/js/runner/provider/qti.js
+++ b/views/js/runner/provider/qti.js
@@ -329,9 +329,13 @@ define([
})
.on('move', function(direction, scope, position){
+ // get the item results/state before disabling the tools
+ // otherwise the state could be partially lost for tools that clean up when disabling
+ var itemResults = getItemResults();
+
this.trigger('disablenav disabletools');
- computeNext('move', _.merge(getItemResults(), {
+ computeNext('move', _.merge(itemResults, {
direction : direction,
scope : scope || 'item',
ref : position | Get the item results/state before cleaning up by the tools | oat-sa_extension-tao-testqti | train | js |
3fadf84d0be468e2026827ade559e74fb8b3cd31 | diff --git a/examples/pil_app.py b/examples/pil_app.py
index <HASH>..<HASH> 100644
--- a/examples/pil_app.py
+++ b/examples/pil_app.py
@@ -83,7 +83,7 @@ class MyApp(App):
self.fileselectionDialog.set_on_cancel_dialog_listener(
self, 'on_dialog_cancel')
# here is shown the dialog as root widget
- self.set_root_widget(self.fileselectionDialog)
+ self.fileselectionDialog.show(self)
def on_image_file_selected(self, file_list):
if len(file_list) < 1: | Fixed bug in pil_app.py. | dddomodossola_remi | train | py |
069e4440925d4b1cb0001abc34c716761cdd8ddb | diff --git a/mistletoe/core_tokens.py b/mistletoe/core_tokens.py
index <HASH>..<HASH> 100644
--- a/mistletoe/core_tokens.py
+++ b/mistletoe/core_tokens.py
@@ -199,7 +199,7 @@ def match_link_dest(string, offset):
else:
escaped = False
count = 1
- for i, c in enumerate(string[offset+1:], start=offset+1):
+ for i, c in enumerate(string[offset:], start=offset):
if c == '\\':
escaped = True
elif c in whitespace: | fixed: match_link_dest skips char when not in angles | miyuchina_mistletoe | train | py |
e3b1f32a42ff71de03bfd4b0e4ef2332441158ea | diff --git a/test/src/test/java/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest.java b/test/src/test/java/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest.java
index <HASH>..<HASH> 100644
--- a/test/src/test/java/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest.java
+++ b/test/src/test/java/jenkins/model/JenkinsBuildsAndWorkspacesDirectoriesTest.java
@@ -11,6 +11,7 @@ import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
+import org.junit.Ignore;
import org.junit.Test;
import org.jvnet.hudson.test.ExtractResourceSCM;
import org.jvnet.hudson.test.Issue;
@@ -204,6 +205,7 @@ public class JenkinsBuildsAndWorkspacesDirectoriesTest {
);
}
+ @Ignore("TODO calling restart seems to break Surefire")
@Issue("JENKINS-50164")
@LocalData
@Test
@@ -359,4 +361,4 @@ public class JenkinsBuildsAndWorkspacesDirectoriesTest {
link = f;
}
}
-}
\ No newline at end of file
+} | JenkinsBuildsAndWorkspacesDirectoriesTest also has a restart issue, it seems. | jenkinsci_jenkins | train | java |
84de0b786f7f78fa4bf577e0bde720a0ab6ac103 | diff --git a/lib/arjdbc/jdbc/adapter_require.rb b/lib/arjdbc/jdbc/adapter_require.rb
index <HASH>..<HASH> 100644
--- a/lib/arjdbc/jdbc/adapter_require.rb
+++ b/lib/arjdbc/jdbc/adapter_require.rb
@@ -2,7 +2,9 @@
module ActiveRecord
- if defined? ConnectionAdapters::ConnectionSpecification::Resolver # 4.0
+ if defined? ConnectionAdapters::ConnectionHandler # 6.1
+ ConnectionAdapters::ConnectionHandler
+ elsif defined? ConnectionAdapters::ConnectionSpecification::Resolver # 4.0, # 5.x, # 6.0
ConnectionAdapters::ConnectionSpecification::Resolver
elsif defined? Base::ConnectionSpecification::Resolver # 3.2
Base::ConnectionSpecification::Resolver | allow loading jdbc adapters for <I> | jruby_activerecord-jdbc-adapter | train | rb |
97b27c9d9d4f843b25c3c6cac61d040ef709d4ae | diff --git a/app/Http/RequestHandlers/SearchGeneralPage.php b/app/Http/RequestHandlers/SearchGeneralPage.php
index <HASH>..<HASH> 100644
--- a/app/Http/RequestHandlers/SearchGeneralPage.php
+++ b/app/Http/RequestHandlers/SearchGeneralPage.php
@@ -86,8 +86,9 @@ class SearchGeneralPage implements RequestHandlerInterface
$search_sources = (bool) ($params['search_sources'] ?? false);
$search_notes = (bool) ($params['search_notes'] ?? false);
- // Default to individuals only
+ // Default to families and individuals only
if (!$search_individuals && !$search_families && !$search_repositories && !$search_sources && !$search_notes) {
+ $search_families = true;
$search_individuals = true;
} | General search - include families by default | fisharebest_webtrees | train | php |
cbacaaa94a9771f8784dca367722ab1e02c0c5ba | diff --git a/lib/vcr/library_hooks/excon.rb b/lib/vcr/library_hooks/excon.rb
index <HASH>..<HASH> 100644
--- a/lib/vcr/library_hooks/excon.rb
+++ b/lib/vcr/library_hooks/excon.rb
@@ -2,7 +2,7 @@ require 'vcr/util/version_checker'
require 'vcr/request_handler'
require 'excon'
-VCR::VersionChecker.new('Excon', Excon::VERSION, '0.9.6', '0.11').check_version!
+VCR::VersionChecker.new('Excon', Excon::VERSION, '0.9.6', '0.13').check_version!
module VCR
class LibraryHooks | Excon <I> is out and VCR works fine with it. | vcr_vcr | train | rb |
3db6a3db2c49a26f23c76d4fae5fda2c2cffb5a4 | diff --git a/src/org/zaproxy/zap/HeadlessBootstrap.java b/src/org/zaproxy/zap/HeadlessBootstrap.java
index <HASH>..<HASH> 100644
--- a/src/org/zaproxy/zap/HeadlessBootstrap.java
+++ b/src/org/zaproxy/zap/HeadlessBootstrap.java
@@ -43,7 +43,9 @@ abstract class HeadlessBootstrap extends ZapBootstrap {
public HeadlessBootstrap(CommandLine args) {
super(args);
- System.setProperty("java.awt.headless", "true");
+ // XXX Do not force headless to allow to run JxBrowser in daemon mode,
+ // at least until it can be run without a window/dialogue.
+ // System.setProperty("java.awt.headless", "true");
}
/** | Do not set/force headless AWT
Change HeadlessBootstrap to not set/force headless AWT, to allow to run
JxBrowser when ZAP is run in daemon mode. | zaproxy_zaproxy | train | java |
34a313aa35a2e1fb7a0740c85dc7b2d5d2ccab66 | diff --git a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb
@@ -300,7 +300,7 @@ module DateAndTime
end
# Returns a Range representing the whole week of the current date/time.
- # Week starts on start_day, default is <tt>Date.week_start</tt> or <tt>config.week_start</tt> when set.
+ # Week starts on start_day, default is <tt>Date.beginning_of_week</tt> or <tt>config.beginning_of_week</tt> when set.
def all_week(start_day = Date.beginning_of_week)
beginning_of_week(start_day)..end_of_week(start_day)
end | fix typo in `DateAndTime::Calculations#all_week` doc [ci skip]
`Date.week_start` does not exist. `Date.beginning_of_week` seems to be correct.
Ref: #<I> | rails_rails | train | rb |
6d796c2f85721113650492993791eff505f2bfee | diff --git a/tests/unit/test_cube_slice.py b/tests/unit/test_cube_slice.py
index <HASH>..<HASH> 100644
--- a/tests/unit/test_cube_slice.py
+++ b/tests/unit/test_cube_slice.py
@@ -25,6 +25,11 @@ class DescribeCubeSlice(object):
assert updated_axis == expected_value
+ def it_raises_not_implemented_for_wrong_pairwise_indices_direction(self, cube_):
+ slice_ = CubeSlice(cube_, None)
+ with pytest.raises(NotImplementedError):
+ slice_.wishart_pairwise_indices(axis=1)
+
def it_can_calculate_std_res(self, std_res_fixture, cube_, dim_types_prop_):
dim_types, expected_value = std_res_fixture
dim_types_prop_.return_value = dim_types | Coverage back to <I>% | Crunch-io_crunch-cube | train | py |
20a7739a910517cd8268d0814ade271654e6970f | diff --git a/js/timex.js b/js/timex.js
index <HASH>..<HASH> 100644
--- a/js/timex.js
+++ b/js/timex.js
@@ -1122,7 +1122,7 @@ module.exports = class timex extends Exchange {
this.safeFloat (ohlcv, 'high'),
this.safeFloat (ohlcv, 'low'),
this.safeFloat (ohlcv, 'close'),
- this.safeFloat (ohlcv, 'volumeQuote'),
+ this.safeFloat (ohlcv, 'volume'),
];
} | Timex parseOHLCV fix
It was changed due to my mistake or they make some changes in API responce. | ccxt_ccxt | train | js |
0671f78d91030d450462eb9b1035e2c55bfa3652 | diff --git a/src/Illuminate/Database/Eloquent/Model.php b/src/Illuminate/Database/Eloquent/Model.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Database/Eloquent/Model.php
+++ b/src/Illuminate/Database/Eloquent/Model.php
@@ -93,12 +93,14 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa
/**
* The attributes that should be visible in arrays.
*
- * @var arrays
+ * @var array
*/
protected $visible = array();
/**
* The accessors to append to the model's array form.
+ *
+ * @var array
*/
protected $appends = array(); | Fixing DocBlock for Model.php
Fixing a small typo and adding `@var array` to DocBlock for new appends functionality. | laravel_framework | train | php |
acf5542c1f50ea2510fb876fe34a5c74f5fcedc1 | diff --git a/tests/unit/models/resource-test.js b/tests/unit/models/resource-test.js
index <HASH>..<HASH> 100644
--- a/tests/unit/models/resource-test.js
+++ b/tests/unit/models/resource-test.js
@@ -199,7 +199,7 @@ test('#removeRelationship', function(assert) {
assert.equal(JSON.stringify(commenter.get('relationships')), commenterRelations, 'removed a comment from commenter');
});
-test('#initEvents', function(assert) {
+QUnit.skip('#initEvents', function(assert) {
const proto = Resource.PrototypeMixin.mixins[1].properties;
window.sinon.stub(proto, 'initEvents', function () { return; });
let post = Post.create({ attributes: { id: '1', title: 'Wyatt Earp', excerpt: 'Was a gambler.'} }); | Skip Resource#initEvents seems to only pass intermittently | pixelhandler_ember-jsonapi-resources | train | js |
5d1c3050f531c7a0bd9b84ecef71a81901c58930 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -21,8 +21,6 @@ setup(
packages=find_packages(),
zip_safe=False,
include_package_data=True,
- use_2to3=True,
- convert_2to3_doctests=['README.rst'],
classifiers=[
'Environment :: Web Environment',
'Framework :: Django', | Remove 2to3 related from setup.py | ulule_django-linguist | train | py |
cd8f17ecf5b6e7aef14a54a9bec51fa8cd167f69 | diff --git a/src/components/Stats/Stats.js b/src/components/Stats/Stats.js
index <HASH>..<HASH> 100644
--- a/src/components/Stats/Stats.js
+++ b/src/components/Stats/Stats.js
@@ -6,13 +6,6 @@ import autoHideContainerHOC from '../../decorators/autoHideContainer.js';
import headerFooterHOC from '../../decorators/headerFooter.js';
export class RawStats extends Component {
- shouldComponentUpdate(nextProps) {
- return (
- this.props.nbHits !== nextProps.nbHits ||
- this.props.processingTimeMS !== nextProps.processingTimeMS
- );
- }
-
render() {
const data = {
hasManyResults: this.props.nbHits > 1, | fix(Stats): let the widget render on all values (#<I>)
This removes the implementation of shouldComponentUpdate. This can be seen as a regression but given that it's a pretty simple widget, the impact shouldn't be noticeable.
Fix #<I> | algolia_instantsearch.js | train | js |
9061d3d695da4668adbb6337ae15f66b9c61ae32 | diff --git a/websocket/server.go b/websocket/server.go
index <HASH>..<HASH> 100644
--- a/websocket/server.go
+++ b/websocket/server.go
@@ -308,25 +308,22 @@ func (s *Server) leave(roomName string, connID string) (left bool) {
// GetTotalConnections returns the number of total connections
func (s *Server) GetTotalConnections() int {
s.mu.RLock()
- defer s.mu.RUnlock()
- return len(s.connections)
+ l:= len(s.connections)
+ s.mu.RUnlock()
+ return l
}
// GetConnections returns all connections
func (s *Server) GetConnections() []Connection {
- s.mu.Lock()
- var conns []Connection
- for _, conn := range s.connections {
- conns = append(conns, conn.value)
- }
- s.mu.Unlock()
+ s.mu.RLock()
+ conns:= make([]Connection, len(s.connections))
+ copy(conns, s.connections)
+ s.mu.RUnlock()
return conns
}
// GetConnection returns single connection
func (s *Server) GetConnection(key string) Connection {
- s.mu.Lock()
- defer s.mu.Unlock()
return s.connections.get(key)
} | Some changes for the benefit of performance for <URL> | kataras_iris | train | go |
e0f1fd541b27991c45c50fffe42cb0b184ab9b57 | diff --git a/misc/cron/archive.php b/misc/cron/archive.php
index <HASH>..<HASH> 100644
--- a/misc/cron/archive.php
+++ b/misc/cron/archive.php
@@ -41,6 +41,8 @@ try 'php archive.php --url=http://your.piwik/path'
\n\n";
}
+require_once PIWIK_INCLUDE_PATH . '/core/Common.php';
+
if (Piwik\Common::isPhpCliMode()) {
require_once PIWIK_INCLUDE_PATH . "/core/bootstrap.php"; | Refs #<I>, fix regression in cron/archive.php script, make sure the Common class is available before requiring bootstrap.php. | matomo-org_matomo | train | php |
c22229575b11520247a36cf422b8c848ccef834f | diff --git a/src/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js b/src/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js
index <HASH>..<HASH> 100644
--- a/src/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js
+++ b/src/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js
@@ -16,7 +16,6 @@
}
});
});
-
this.initHeader();
this.initBody();
this.initToolbar();
@@ -26,9 +25,11 @@
this.options.locale = localeId;
this.initLocale();
this.initPagination();
+ this.initBody();
+ this.initToolbar();
};
$.fn.bootstrapTable.methods.push('changeTitle');
$.fn.bootstrapTable.methods.push('changeLocale');
-}(jQuery);
\ No newline at end of file
+}(jQuery); | Fix for issue <I>
Fix for when you only change the locale and do not change the header, the placeholder text in the search box would not refresh.
<URL> | wenzhixin_bootstrap-table | train | js |
bbf26713a2643f5e0193cb72d996d4356d05a2da | diff --git a/templates/account.php b/templates/account.php
index <HASH>..<HASH> 100755
--- a/templates/account.php
+++ b/templates/account.php
@@ -68,6 +68,7 @@
<div class="fs-header-actions">
<ul>
+ <?php if ( ! $is_paying ) : ?>
<li>
<form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
<input type="hidden" name="fs_action" value="delete_account">
@@ -82,6 +83,7 @@
class="dashicons dashicons-no"></i> <?php _efs( 'delete-account', $slug ) ?></a>
</form>
</li>
+ <?php endif ?>
<?php if ( $is_paying ) : ?>
<li>
• | [account] Don’t show the delete account option when the user has a valid license, otherwise, if the user deletes the account without deactivating the license first it can generate a ghost license. | Freemius_wordpress-sdk | train | php |
8b53cd527e1b3f0b99d5b030b7c7c0ec0b2eec0b | diff --git a/closure/goog/disposable/idisposable.js b/closure/goog/disposable/idisposable.js
index <HASH>..<HASH> 100644
--- a/closure/goog/disposable/idisposable.js
+++ b/closure/goog/disposable/idisposable.js
@@ -36,10 +36,10 @@ goog.disposable.IDisposable = function() {};
* Disposes of the object and its resources.
* @return {void} Nothing.
*/
-goog.disposable.IDisposable.prototype.dispose;
+goog.disposable.IDisposable.prototype.dispose = goog.abstractMethod;
/**
* @return {boolean} Whether the object has been disposed of.
*/
-goog.disposable.IDisposable.prototype.isDisposed;
+goog.disposable.IDisposable.prototype.isDisposed = goog.abstractMethod; | Add goog.abstractMethod to goog.disposable.IDisposable methods. This will make it easier to mock in unit tests.
-------------
Created by MOE: <URL> | google_closure-library | train | js |
3141d1a7b724e9432201c848a399be18f627bc8e | diff --git a/source/times.js b/source/times.js
index <HASH>..<HASH> 100644
--- a/source/times.js
+++ b/source/times.js
@@ -33,7 +33,7 @@ var times = _curry2(function times(fn, n) {
list = [];
for (var x = 0; x < len; x += 1) {
- list[x] = fn(x);
+ list.push(fn(x));
}
return list; | chore(times): using `push` method instead of direct assignment | ramda_ramda | train | js |
602063961bc3724783d64c2842a4713e04eabad8 | diff --git a/lib/feed2email/cli.rb b/lib/feed2email/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/feed2email/cli.rb
+++ b/lib/feed2email/cli.rb
@@ -150,7 +150,7 @@ module Feed2Email
abort 'Invalid index' unless feed && feed[:uri]
- feed[:uri]
+ handle_permanent_redirection(feed[:uri])
end
end
end | Handle permanent redirection for discovered feed | agorf_feed2email | train | rb |
2d9d880f4c74164b3801346900e03a5c7de09618 | diff --git a/pymodeler/model.py b/pymodeler/model.py
index <HASH>..<HASH> 100644
--- a/pymodeler/model.py
+++ b/pymodeler/model.py
@@ -145,10 +145,12 @@ class Model(object):
if name in self._params or name in self._mapping:
try:
return self.getp(name).value
- except AttributeError as msg:
+ except AttributeError as err:
+ msg = str(err)
msg += " for %s" % name
raise AttributeError(msg)
- except TypeError as msg:
+ except TypeError as err:
+ msg = str(err)
msg += " for %s" % name
raise TypeError(msg)
@@ -264,13 +266,10 @@ class Model(object):
for name, value in kwargs.items():
# Raise AttributeError if param not found
try:
- self.__getattr__(name)
- except AttributeError:
- try:
- self.getp(name)
- except KeyError:
- print ("Warning: %s does not have attribute %s" %
- (type(self), name))
+ self.getp(name)
+ except KeyError:
+ print ("Warning: %s does not have attribute %s" %
+ (type(self), name))
# Set attributes
try:
self.setp(name, clear_derived=False, **value) | Improve error handling and avoid calling loaders during construction | kadrlica_pymodeler | train | py |
a690ea790fedc042c3f09f485c15563911e93fb3 | diff --git a/treetime/gtr.py b/treetime/gtr.py
index <HASH>..<HASH> 100644
--- a/treetime/gtr.py
+++ b/treetime/gtr.py
@@ -106,13 +106,15 @@ class GTR(object):
def assign_rates(self, mu=1.0, pi=None, W=None):
n = len(self.alphabet)
self.mu = mu
+
if pi is not None and len(pi)==n:
Pi = np.array(pi)
else:
if pi is not None and len(pi)!=n:
self.logger("length of equilibrium frequency vector does not match alphabet length", 4, warn=True)
self.logger("Ignoring input equilibrium frequencies", 4, warn=True)
- Pi = np.ones(size=(n))
+ Pi = np.ones(shape=(n,))
+
self.Pi = Pi/np.sum(Pi)
if W is None or W.shape!=(n,n): | Minor bugfix in unifiorm Pi instantiation by standard GTR model | neherlab_treetime | train | py |
74c38f0eef1d83c3ffde93d13974dd740d92a619 | diff --git a/generators/server/index.js b/generators/server/index.js
index <HASH>..<HASH> 100644
--- a/generators/server/index.js
+++ b/generators/server/index.js
@@ -29,6 +29,7 @@ const statistics = require('../statistics');
const { getBase64Secret, getRandomHex } = require('../utils');
const { defaultConfig } = require('../generator-defaults');
const { GRADLE } = require('../../jdl/jhipster/build-tool-types');
+const { ELASTICSEARCH } = require('../../jdl/jhipster/search-engine-types');
let useBlueprints;
@@ -415,6 +416,9 @@ module.exports = class JHipsterServerGenerator extends BaseBlueprintGenerator {
scriptsStorage.set('docker:db:up', `echo "Docker for db ${databaseType} not configured for application ${this.baseName}"`);
}
}
+ if (this.jhipsterConfig.searchEngine === ELASTICSEARCH) {
+ dockerAwaitScripts.push('echo "Waiting for Elasticsearch to start" && wait-on tcp:9200 && echo "Elasticsearch started"');
+ }
const dockerOthersUp = [];
const dockerOthersDown = []; | Add a wait for Elasticsearch (hoping this is what makes the integration test fail) | jhipster_generator-jhipster | train | js |
7084c7851f08d2ef4bc9f3cec86d7c62c0a0f16d | diff --git a/lib/train.js b/lib/train.js
index <HASH>..<HASH> 100644
--- a/lib/train.js
+++ b/lib/train.js
@@ -145,6 +145,11 @@ exports.Train = ( function () {
tproto.iterate = function ( fn, scope, cback ) {
var me = this,
+ /*
+ * Note : size is fixed to the current queue size,
+ * then it is possible to add/push elements to the left/tail,
+ * without affecting/using these elements.
+ */
size = me.size(),
cnt = 0,
scope = scope || me, | Added a comment for Train#iterate() in the code.
On branch master
Changes to be committed:
modified: lib/train.js | rootslab_train | train | js |
9ef7f7038d87f25211edc2f5366e699c38c0c435 | diff --git a/src/Symfony/Component/HttpFoundation/StreamedResponse.php b/src/Symfony/Component/HttpFoundation/StreamedResponse.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/HttpFoundation/StreamedResponse.php
+++ b/src/Symfony/Component/HttpFoundation/StreamedResponse.php
@@ -123,6 +123,8 @@ class StreamedResponse extends Response
if (null !== $content) {
throw new \LogicException('The content cannot be set on a StreamedResponse instance.');
}
+
+ $this->streamed = true;
}
/**
@@ -134,16 +136,4 @@ class StreamedResponse extends Response
{
return false;
}
-
- /**
- * {@inheritdoc}
- *
- * @return $this
- */
- public function setNotModified()
- {
- $this->setCallback(function () {});
-
- return parent::setNotModified();
- }
} | [HttpFoundation] don't override StreamedResponse::setNotModified() | symfony_symfony | train | php |
945e1bba8d296a58125611c537dfe72e19c9ab77 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -350,7 +350,10 @@ def getExtensionModules(nupicCoreReleaseDir, platform, bitness):
commonLibraries = [
"dl",
- "python" + pythonVersion]
+ "python" + pythonVersion,
+ "kj",
+ "capnp",
+ "capnpc"]
if platform == "linux":
commonLibraries.extend(["pthread"]) | Include additional libs in common libs | numenta_nupic | train | py |
475afc4118cc7aa3ad73375bdb9fb2e4f26ef9fa | diff --git a/src/Codesleeve/AssetPipeline/AssetPipeline.php b/src/Codesleeve/AssetPipeline/AssetPipeline.php
index <HASH>..<HASH> 100644
--- a/src/Codesleeve/AssetPipeline/AssetPipeline.php
+++ b/src/Codesleeve/AssetPipeline/AssetPipeline.php
@@ -30,7 +30,8 @@ class AssetPipeline
$webPaths[] = $this->parser->absolutePathToWebPath($absolutePath);
}
- $composer = $this->getConfig()['javascript_include_tag'];
+ $config = $this->getConfig();
+ $composer = $config['javascript_include_tag'];
return $composer->process($webPaths, $absolutePaths, $attributes);
}
@@ -52,7 +53,8 @@ class AssetPipeline
$webPaths[] = $this->parser->absolutePathToWebPath($absolutePath);
}
- $composer = $this->getConfig()['stylesheet_link_tag'];
+ $config = $this->getConfig();
+ $composer = $config['stylesheet_link_tag'];
return $composer->process($webPaths, $absolutePaths, $attributes);
} | fixing another error in php <I> | CodeSleeve_asset-pipeline | train | php |
7217e1de48d33e5ad74e452dd6f48b5d484e4cc5 | diff --git a/src/html5lib/html5parser.py b/src/html5lib/html5parser.py
index <HASH>..<HASH> 100644
--- a/src/html5lib/html5parser.py
+++ b/src/html5lib/html5parser.py
@@ -1032,7 +1032,12 @@ class InBodyPhase(Phase):
node = self.tree.openElements.pop()
def endTagForm(self, name):
- self.endTagBlock(name)
+ if self.tree.elementInScope(name):
+ self.tree.generateImpliedEndTags()
+ if self.tree.openElements[-1].name != name:
+ self.parser.parseError((u"End tag (form) seen too early. Ignored."))
+ else:
+ self.tree.openElements.pop()
self.tree.formPointer = None
def endTagListItem(self, name): | implement </form> handling; spec change was a while ago
--HG--
extra : convert_revision : svn%3Aacbfec<I>-<I>-<I>-a<I>-<I>a<I>e<I>e0/trunk%<I> | html5lib_html5lib-python | train | py |
bbe3bd8c5618556cd64cd7d19f9fe8b92e366d12 | diff --git a/lib/subsequence-provider.js b/lib/subsequence-provider.js
index <HASH>..<HASH> 100644
--- a/lib/subsequence-provider.js
+++ b/lib/subsequence-provider.js
@@ -41,6 +41,8 @@ export default class SubsequenceProvider {
this.subscriptions.add(this.atomWorkspace.observeTextEditors((e) => {
this.watchBuffer(e)
}))
+
+ this.configSuggestionsBuffer = new TextBuffer()
}
defaults() {
@@ -81,14 +83,15 @@ export default class SubsequenceProvider {
const suggestionText = suggestions
.map(sug => sug.displayText || sug.snippet || sug.text)
.join('\n')
- const buffer = new TextBuffer(suggestionText)
+
+ this.configSuggestionsBuffer.setText(suggestionText)
const assocSuggestion = word => {
word.configSuggestion = suggestions[word.positions[0].row]
return word
}
- return buffer.findWordsWithSubsequence(
+ return this.configSuggestionsBuffer.findWordsWithSubsequence(
prefix,
'(){}[] :;,$@%',
this.maxResultsPerBuffer | re-use the same text buffer for config suggestions | atom_autocomplete-plus | train | js |
518376a9c928d07ad0d7668f81faa6732c73a489 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -37,6 +37,7 @@ module.exports = function (options) {
if (res.sourcemap) {
makePathsRelative(file, res.sourcemap);
applySourceMap(file, res.sourcemap);
+ file.sourceMap.file = file.relative;
}
return cb(null, file);
} | Fix source mapping when base is used with gulp.src #<I> | stevelacy_gulp-stylus | train | js |
d8c0a25140e6dcda34ef6cc1496d4d50a1efe62b | diff --git a/src/main/java/com/constantcontact/util/Config.java b/src/main/java/com/constantcontact/util/Config.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/constantcontact/util/Config.java
+++ b/src/main/java/com/constantcontact/util/Config.java
@@ -236,7 +236,7 @@ public final class Config {
Properties prop = new Properties();
InputStream in;
- String baseUrlConfiguration = "https://api.constantcontact.com";
+ String baseUrl = "https://api.constantcontact.com";
in = Config.class.getClassLoader().getResourceAsStream("com/constantcontact/util/dest.properties");
if (in != null)
@@ -251,12 +251,14 @@ public final class Config {
ex.printStackTrace();
}
- baseUrlConfiguration = prop.getProperty("constantcontact.api.dest.baseurl");
+ String baseUrlConfiguration = prop.getProperty("constantcontact.api.dest.baseurl");
if (baseUrlConfiguration != null)
{
- BASE_URL_HOST = baseUrlConfiguration;
+ baseUrl = baseUrlConfiguration;
}
}
+
+ BASE_URL_HOST = baseUrl;
}
/** | Add support for different base url paths | constantcontact_java-sdk | train | java |
55953ba394cfe3abe86814e4fa9c9126ba209bbf | diff --git a/scapy/contrib/automotive/scanner/enumerator.py b/scapy/contrib/automotive/scanner/enumerator.py
index <HASH>..<HASH> 100644
--- a/scapy/contrib/automotive/scanner/enumerator.py
+++ b/scapy/contrib/automotive/scanner/enumerator.py
@@ -53,7 +53,7 @@ class ServiceEnumerator(AutomotiveTestCase):
_supported_kwargs = copy.copy(AutomotiveTestCase._supported_kwargs)
_supported_kwargs.update({
- 'timeout': ((int, float), lambda x: x >= 0),
+ 'timeout': ((int, float), lambda x: x > 0),
'count': (int, lambda x: x >= 0),
'execution_time': (int, None),
'state_allow_list': ((list, EcuState), None), | Fix minor bug in Automotive_Scanner kwargs validation | secdev_scapy | train | py |
1e69669318b15aa2d159c404389d24066d3f939d | diff --git a/src-gwt/org/opencms/ade/containerpage/client/ui/CmsContainerPageContainer.java b/src-gwt/org/opencms/ade/containerpage/client/ui/CmsContainerPageContainer.java
index <HASH>..<HASH> 100644
--- a/src-gwt/org/opencms/ade/containerpage/client/ui/CmsContainerPageContainer.java
+++ b/src-gwt/org/opencms/ade/containerpage/client/ui/CmsContainerPageContainer.java
@@ -322,7 +322,9 @@ public class CmsContainerPageContainer extends ComplexPanel implements I_CmsDrop
*/
public void refreshHighlighting() {
- m_highlighting.setPosition(CmsPositionBean.getInnerDimensions(getElement()));
+ if (m_highlighting != null) {
+ m_highlighting.setPosition(CmsPositionBean.getInnerDimensions(getElement()));
+ }
}
/** | Fixing null pointer issue. | alkacon_opencms-core | train | java |
7c4f4a24cf31263543997db8b2de3fcd9eb084a1 | diff --git a/docs/src/modules/components/Demo.js b/docs/src/modules/components/Demo.js
index <HASH>..<HASH> 100644
--- a/docs/src/modules/components/Demo.js
+++ b/docs/src/modules/components/Demo.js
@@ -179,10 +179,6 @@ export default function Demo(props) {
}
const [codeOpen, setCodeOpen] = React.useState(demoOptions.defaultCodeOpen || false);
- const shownOnce = React.useRef(false);
- if (codeOpen) {
- shownOnce.current = true;
- }
React.useEffect(() => {
const navigatedDemoName = getDemoName(window.location.hash); | [docs] Remove unused code (#<I>) | mui-org_material-ui | train | js |
dca88c820c97203781c3848ef183dbe761b3c4d8 | diff --git a/web/file.py b/web/file.py
index <HASH>..<HASH> 100644
--- a/web/file.py
+++ b/web/file.py
@@ -9,12 +9,13 @@ class FileHandler(web.HTTPHandler):
filename = None
dir_index = False
+ def index(self):
+ #Magic for stringing together everything in the directory with a newline and adding a / at the end for directories
+ return ''.join(filename + '/\n' if os.path.isdir(os.path.join(self.filename, filename)) else filename + '\n' for filename in os.listdir(self.filename))
+
def get_body(self):
return False
- def index(self):
- return ''.join(file + '\n' for file in os.listdir(self.filename))
-
def do_get(self):
try:
if os.path.isdir(self.filename): | Change file default index to add trailing slashes for directories | fkmclane_python-fooster-web | train | py |
d16a409943d0e59aff059755fe9780c2affe8c54 | diff --git a/pkg/dns/etcd_dns.go b/pkg/dns/etcd_dns.go
index <HASH>..<HASH> 100644
--- a/pkg/dns/etcd_dns.go
+++ b/pkg/dns/etcd_dns.go
@@ -56,7 +56,12 @@ func (c *coreDNS) List() ([]SrvRecord, error) {
if err != nil {
return nil, err
}
- srvRecords = append(srvRecords, records...)
+ for _, record := range records {
+ if record.Key == "" {
+ continue
+ }
+ srvRecords = append(srvRecords, record)
+ }
}
return srvRecords, nil
}
@@ -130,7 +135,7 @@ func (c *coreDNS) list(key string) ([]SrvRecord, error) {
// /skydns/net/miniocloud/10.0.0.1 that may exist as
// dns entry for the server (rather than the bucket
// itself).
- if srvRecord.Key == "" || srvRecord.Key == etcdPathSeparator {
+ if srvRecord.Key == "" {
continue
} | Ignore srvRecords from domain level entries (#<I>)
Fixes #<I> | minio_minio | train | go |
5624e9000dc74f2b56ccf79c90838b1d14bcdf39 | diff --git a/Publisher.js b/Publisher.js
index <HASH>..<HASH> 100644
--- a/Publisher.js
+++ b/Publisher.js
@@ -18,7 +18,7 @@ module.exports = Class(function() {
this._publish = function(signal) {
var args = slice(arguments, 1),
subscribers = this._subscribers[signal]
- if (!signal) { return this }
+ if (!signal || !subscribers) { return this }
for (var i=0; i<subscribers.length; i++) {
subscribers[i].apply(this, args)
} | Don't throw if there are no subscribers | marcuswestin_std.js | train | js |
9f9f260a6af83bc0645f0ad917e84269efdf0b97 | diff --git a/armstrong/hatband/static/generickey.js b/armstrong/hatband/static/generickey.js
index <HASH>..<HASH> 100644
--- a/armstrong/hatband/static/generickey.js
+++ b/armstrong/hatband/static/generickey.js
@@ -69,6 +69,10 @@ armstrong.widgets.generickey = function($, options) {
}
},
valueMatches : function(facet, searchTerm, callback) {
+ if (!facets.raw[facet]) {
+ return; // nothing to query if there is no facet
+ }
+
var model = facet,
app_label = facets.raw[facet].app_label;
url = options.baseLookupURL + app_label + "/" + model + "/"; | JavaScript for VisualSearch won't trigger an AJAX call for invalid Facets. | armstrong_armstrong.hatband | train | js |
677dde144e7d7f2ac64c23006744fc922319d9c2 | diff --git a/chainlet/driver.py b/chainlet/driver.py
index <HASH>..<HASH> 100644
--- a/chainlet/driver.py
+++ b/chainlet/driver.py
@@ -91,7 +91,7 @@ class ThreadedChainDriver(ChainDriver):
def run(self):
with self._run_lock:
runner_threads = [
- threading.Thread(target=self._parent_chain_driver, args=parent) for parent in self._parents
+ threading.Thread(target=self._parent_chain_driver, args=(parent,)) for parent in self._parents
]
for runner_thread in runner_threads:
runner_thread.daemon = self.daemon | fixed bug that prevented threaded driver from starting | maxfischer2781_chainlet | train | py |
12b73116a07cc64741314009be44370865728a0c | diff --git a/src/apiUtility.js b/src/apiUtility.js
index <HASH>..<HASH> 100644
--- a/src/apiUtility.js
+++ b/src/apiUtility.js
@@ -1,7 +1,7 @@
var _ = require('./utility');
function buildPayload(accessToken, data, jsonBackup) {
- if (_.isType(data.context, 'object')) {
+ if (!_.isType(data.context, 'string')) {
var contextResult = _.stringify(data.context, jsonBackup);
if (contextResult.error) {
data.context = 'Error: could not serialize \'context\''; | Make sure context becomes a string if it exists and is not already one | rollbar_rollbar.js | train | js |
9226784c842800a24427207f23fd530d1673e9c9 | diff --git a/libraries/lithium/storage/cache/adapter/Memory.php b/libraries/lithium/storage/cache/adapter/Memory.php
index <HASH>..<HASH> 100644
--- a/libraries/lithium/storage/cache/adapter/Memory.php
+++ b/libraries/lithium/storage/cache/adapter/Memory.php
@@ -63,8 +63,8 @@ class Memory extends \lithium\core\Object {
$results = array();
foreach($key as $k => &$v) {
- if (isset($cache[$k])) {
- $results[$k] = $cache[$k];
+ if (isset($cache[$v])) {
+ $results[$v] = $cache[$v];
}
}
return $results; | Fixing error with Memory cache adapter. | UnionOfRAD_framework | train | php |
fc2db623fff9dd2e93afc8e431dc478e3a52bd44 | diff --git a/salt/overstate.py b/salt/overstate.py
index <HASH>..<HASH> 100644
--- a/salt/overstate.py
+++ b/salt/overstate.py
@@ -168,7 +168,7 @@ class OverState(object):
failure = {tag_name: {
'ret': {
'result': False,
- 'comment': 'Requisite {0} was not found'.format(req),
+ 'comment': 'Requisite {0} not found'.format(req),
'name': 'Requisite Failure',
'changes': {},
'__run_num__': 0,
@@ -195,12 +195,18 @@ class OverState(object):
else:
ret = {}
tgt = self._stage_list(stage['match'])
- for minion in self.local.cmd_iter(
- tgt,
- fun,
- arg,
- expr_form='list',
- raw=True):
+ cmd_kwargs = {
+ 'tgt': tgt,
+ 'fun': fun,
+ 'arg': arg,
+ 'expr_form': 'list',
+ 'raw': True}
+ if 'batch' in stage:
+ local_cmd = self.local.cmd_batch
+ cmd_kwargs['batch'] = stage['batch']
+ else:
+ local_cmd = self.local.cmd_iter
+ for minion in local_cmd(**cmd_kwargs):
ret.update({minion['id']:
{
'ret': minion['return'], | first addition towards batch support in the overstate | saltstack_salt | train | py |
20a60c4f9c4fc150f90420e0e3f76a46c5f6d18e | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -58,6 +58,7 @@ L.Control.SideBySide = L.Control.extend({
range.min = 0
range.max = 1
range.step = 'any'
+ range.value = 0.5
this._addEvents()
this._updateLayers()
this._updateClip() | fix: Make slider start in middle on Firefox | digidem_leaflet-side-by-side | train | js |
156a866d10a08f2863e1ce82c4739dcc4cec02c6 | diff --git a/packages/sdk/setup.py b/packages/sdk/setup.py
index <HASH>..<HASH> 100644
--- a/packages/sdk/setup.py
+++ b/packages/sdk/setup.py
@@ -38,6 +38,6 @@ setup(
author='SingularityNET Foundation',
author_email='info@singularitynet.io',
description='SingularityNET Python SDK',
- python_requires='>=3.6',
+ python_requires='>=3.7',
install_requires=dependencies
)
diff --git a/packages/sdk/snet/sdk/version.py b/packages/sdk/snet/sdk/version.py
index <HASH>..<HASH> 100644
--- a/packages/sdk/snet/sdk/version.py
+++ b/packages/sdk/snet/sdk/version.py
@@ -1 +1 @@
-__version__ = "0.1.5"
+__version__ = "0.1.6" | Bumping SDK version, updating Python version requirement due to a bug in CPython <I> implementation of namespace packages | singnet_snet-cli | train | py,py |
4e51bafa7a405421acb0145e5223f770b36505c6 | diff --git a/lib/cucumber/cli/configuration.rb b/lib/cucumber/cli/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/cucumber/cli/configuration.rb
+++ b/lib/cucumber/cli/configuration.rb
@@ -110,7 +110,7 @@ module Cucumber
end
def to_hash
- Hash(@options).merge(out_stream: @out_stream, error_stream: @error_stream)
+ Hash.try_convert(@options).merge(out_stream: @out_stream, error_stream: @error_stream)
end
private
diff --git a/lib/cucumber/cli/options.rb b/lib/cucumber/cli/options.rb
index <HASH>..<HASH> 100644
--- a/lib/cucumber/cli/options.rb
+++ b/lib/cucumber/cli/options.rb
@@ -290,7 +290,7 @@ TEXT
end
def to_hash
- Hash(@options)
+ Hash.try_convert(@options)
end
protected
diff --git a/lib/cucumber/configuration.rb b/lib/cucumber/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/cucumber/configuration.rb
+++ b/lib/cucumber/configuration.rb
@@ -12,7 +12,7 @@ module Cucumber
end
def initialize(user_options = {})
- @options = default_options.merge(Hash(user_options))
+ @options = default_options.merge(Hash.try_convert(user_options))
end
# TODO: Actually Deprecate??? | Does Hash#try_convert work in all supported Ruby versions? | cucumber_cucumber-ruby | train | rb,rb,rb |
632e5985ff084ca18fde55bfe5272897816c37ef | diff --git a/src/calmjs/toolchain.py b/src/calmjs/toolchain.py
index <HASH>..<HASH> 100644
--- a/src/calmjs/toolchain.py
+++ b/src/calmjs/toolchain.py
@@ -270,12 +270,36 @@ class Spec(dict):
"""
Call all advices at the provided name.
+ This has an analogue in the join point in aspected oriented
+ programming, but the analogy is a weak one as we don't have the
+ proper metaobject protocol to support this. Implementation that
+ make use of this system should make it clear that they will call
+ this method with name associated with its group before and after
+ its execution, or that the method at hand that want this invoked
+ be called by this other conductor method.
+
+ For the Toolchain standard steps (prepare, compile, assemble,
+ link and finalize), this handle method will only be called by
+ invoking the toolchain as a callable. Calling those methods
+ piecemeal will not trigger the invocation, even though it
+ probably should. Modules, classes and methods that desire to
+ call their own handler should instead follow the convention
+ where the handle be called before and after with the appropriate
+ names. For instance:
+
+ def test(self, spec):
+ spec.handle(BEFORE_TEST)
+ # do the things
+ spec.handle(AFTER_TEST)
+
+ This arrangement will need to be revisited when a proper system
+ is written at the metaclass level.
+
Arguments:
name
The name of the advices group. All the callables
- registered to this group will be invoked, last-in-first-out
- style.
+ registered to this group will be invoked, last-in-first-out.
"""
if name in self._called: | Some usage documentation on usage of advice
- Downstream integrators that make use of these methods should adhere to
the rules listed, which (hopefully) enable forward compatiblity should
calmjs migrates to a proper metaclass model that enables management of
the advice system. | calmjs_calmjs | train | py |
1324c2c9755e4724838724abc11fee406dda8601 | diff --git a/lib/core/src/client/preview/start.js b/lib/core/src/client/preview/start.js
index <HASH>..<HASH> 100644
--- a/lib/core/src/client/preview/start.js
+++ b/lib/core/src/client/preview/start.js
@@ -336,9 +336,6 @@ export default function start(render, { decorateStory } = {}) {
let previousExports = new Set();
const loadStories = (loadable, framework) => () => {
- // Make sure we don't try to define a kind more than once within the same load
- const loadedKinds = new Set();
-
let reqs = null;
if (Array.isArray(loadable)) {
reqs = loadable;
@@ -392,14 +389,6 @@ export default function start(render, { decorateStory } = {}) {
const { default: meta, ...exports } = fileExports;
const { title: kindName, parameters: params, decorators: decos, component } = meta;
-
- if (loadedKinds.has(kindName)) {
- throw new Error(
- `Duplicate title '${kindName}' used in multiple files; use unique titles or combine '${kindName}' stories into a single file.`
- );
- }
- loadedKinds.add(kindName);
-
// We pass true here to avoid the warning about HMR. It's cool clientApi, we got this
const kind = clientApi.storiesOf(kindName, true); | duplicates used to work and actually work quite easily | storybooks_storybook | train | js |
5ecaf2793dfded24adbcc50362854fe5b79089ce | diff --git a/src/diamond/collector.py b/src/diamond/collector.py
index <HASH>..<HASH> 100644
--- a/src/diamond/collector.py
+++ b/src/diamond/collector.py
@@ -366,9 +366,9 @@ class Collector(object):
raise NotImplementedError()
def publish(self, name, value, raw_value=None, precision=0,
- metric_type='GAUGE', instance=None):
+ metric_type='GAUGE', instance=None, timestamp=None):
"""
- Publish a metric with the given name
+ Publish a metric with the given name at the given time
"""
# Check whitelist/blacklist
if self.config['metrics_whitelist']:
@@ -387,7 +387,7 @@ class Collector(object):
# Create Metric
try:
- metric = Metric(path, value, raw_value=raw_value, timestamp=None,
+ metric = Metric(path, value, raw_value=raw_value, timestamp=timestamp,
precision=precision, host=self.get_hostname(),
metric_type=metric_type, ttl=ttl)
except DiamondException: | Adding publishing a metric with a certain timestamp to collectors. | python-diamond_Diamond | train | py |
6393a1a09d14ca685c17ef0a178a48c7316896c2 | diff --git a/src/controller.js b/src/controller.js
index <HASH>..<HASH> 100644
--- a/src/controller.js
+++ b/src/controller.js
@@ -9,7 +9,7 @@ var util = require("substance-util");
// Application Controller abstraction suggesting strict MVC
var Controller = function(options) {
- // this.state = null;
+ this.state = {};
this.context = null;
};
@@ -30,6 +30,15 @@ Controller.Prototype = function() {
this.state = state;
this.trigger('state-changed', this.context, oldContext, state);
};
+
+ // Inrementally updates the controller state
+ // -----------------
+ //
+
+ this.modifyState = function(state) {
+ _.extend(this.state, state);
+ this.trigger('state-changed', this.state.context)
+ };
}; | Implemented modifyState method. | substance_application | train | js |
bae4b6d8da34714c44e95174c8426a0d48299459 | diff --git a/vendor/capistrano-honeybadger/lib/honeybadger/capistrano/legacy.rb b/vendor/capistrano-honeybadger/lib/honeybadger/capistrano/legacy.rb
index <HASH>..<HASH> 100644
--- a/vendor/capistrano-honeybadger/lib/honeybadger/capistrano/legacy.rb
+++ b/vendor/capistrano-honeybadger/lib/honeybadger/capistrano/legacy.rb
@@ -15,7 +15,7 @@ module Honeybadger
task :deploy, :except => { :no_release => true } do
rails_env = fetch(:rails_env, 'production')
honeybadger_env = fetch(:honeybadger_env, fetch(:rails_env, 'production'))
- local_user = ENV['USER'] || ENV['USERNAME']
+ local_user = fetch(:honeybadger_user, ENV['USER'] || ENV['USERNAME'])
executable = fetch(:honeybadger, "#{fetch(:bundle_cmd, 'bundle')} exec honeybadger")
async_notify = fetch(:honeybadger_async_notify, false)
directory = fetch(:honeybadger_deploy_dir, configuration.current_release) | Add support for honeybadger_user with Capistrano 2
The honeybadger_user option is mentioned in the documentation, but the
legacy support for Capistrano v2 did not use it. This commit updates the
v2 deploy task to fetch honeybadger_user the same way the v3 task uses
it. | honeybadger-io_honeybadger-ruby | train | rb |
f08e7262dc39a7b3e23e4f42fdd343490dc67d1b | diff --git a/test/types/function-type.spec.js b/test/types/function-type.spec.js
index <HASH>..<HASH> 100644
--- a/test/types/function-type.spec.js
+++ b/test/types/function-type.spec.js
@@ -228,7 +228,7 @@ describe('function type', function() {
} catch (e) {}
if (arrowFunctionWith1SpaceIndentAndLeadingNewline) {
- it('should reindent an implicit return multiline arrow function', function() {
+ it('should reindent an implicit return multiline arrow function with 1 space indent', function() {
expect(
arrowFunctionWith1SpaceIndentAndLeadingNewline,
'to inspect as',
@@ -247,7 +247,7 @@ describe('function type', function() {
} catch (e) {}
if (arrowFunctionWith2SpaceIndentAndLeadingNewline) {
- it('should reindent an implicit return multiline arrow function', function() {
+ it('should reindent an implicit return multiline arrow function with 2 space indent', function() {
expect(
arrowFunctionWith2SpaceIndentAndLeadingNewline,
'to inspect as',
@@ -285,7 +285,7 @@ describe('function type', function() {
} catch (e) {}
if (arrowFunctionWith4SpaceIndentAndLeadingNewline) {
- it('should reindent an implicit return multiline arrow function with 4 space indent', function() {
+ it('should reindent an implicit return multiline arrow function with long leading indent', function() {
expect(
arrowFunctionWith4SpaceIndentAndLeadingNewline,
'to inspect as', | Fix more duplicate titles introduced on master in the mean time :face-with-rolling-eyes: | unexpectedjs_unexpected | train | js |
48e46f9f348aebff3fde17794164f81fb50b0d23 | diff --git a/go/pfacct/radius.go b/go/pfacct/radius.go
index <HASH>..<HASH> 100644
--- a/go/pfacct/radius.go
+++ b/go/pfacct/radius.go
@@ -6,8 +6,8 @@ import (
"net"
"sync"
- "layeh.com/radius"
- "layeh.com/radius/rfc2866"
+ "github.com/inverse-inc/go-radius"
+ "github.com/inverse-inc/go-radius/rfc2866"
)
type PfRadius struct {
diff --git a/go/pfacct/radius_test.go b/go/pfacct/radius_test.go
index <HASH>..<HASH> 100644
--- a/go/pfacct/radius_test.go
+++ b/go/pfacct/radius_test.go
@@ -3,8 +3,8 @@ package main
import (
"context"
"fmt"
- "layeh.com/radius"
- "layeh.com/radius/rfc2866"
+ "github.com/inverse-inc/go-radius"
+ "github.com/inverse-inc/go-radius/rfc2866"
"net"
"testing"
"time" | Use the inverse-inc/go-radius library | inverse-inc_packetfence | train | go,go |
e4dbbc71eecb71a80ee395c22f70dcaf71f749d2 | diff --git a/test/nearleyc.test.js b/test/nearleyc.test.js
index <HASH>..<HASH> 100644
--- a/test/nearleyc.test.js
+++ b/test/nearleyc.test.js
@@ -65,7 +65,7 @@ describe("bin/nearleyc", function() {
expect(stderr).toBe("");
expect(stdout).toBe("");
sh(`tsc ${outPath}.ts`);
- const grammar = nearley.Grammar.fromCompiled(require(`./${outPath}.js`));
+ const grammar = nearley.Grammar.fromCompiled(require(`./${outPath}.js`).default);
expect(parse(grammar, "<123>")).toEqual([ [ '<', '123', '>' ] ]);
}); | Update Tests to handle default export from TypeScript | kach_nearley | train | js |
2616c4c0e21689c727ff3472b502d35a425ef9a5 | diff --git a/Auth/OpenID/Server.php b/Auth/OpenID/Server.php
index <HASH>..<HASH> 100644
--- a/Auth/OpenID/Server.php
+++ b/Auth/OpenID/Server.php
@@ -188,7 +188,8 @@ class Auth_OpenID_ServerError {
return null;
}
- return $this->toMessage()->toURL($this->getReturnTo());
+ $msg = $this->toMessage();
+ return $msg->toURL($this->getReturnTo());
}
/**
@@ -206,7 +207,8 @@ class Auth_OpenID_ServerError {
function toFormMarkup()
{
- return $this->toMessage()->toFormMarkup($this->getReturnTo());
+ $msg = $this->toMessage();
+ return $msg->toFormMarkup($this->getReturnTo());
}
function toMessage() | [project @ Fix PHP4-unfriendly syntax] | openid_php-openid | train | php |
c1103edb7edd93e143a189267c2c533b272e4622 | diff --git a/polyglot/downloader.py b/polyglot/downloader.py
index <HASH>..<HASH> 100644
--- a/polyglot/downloader.py
+++ b/polyglot/downloader.py
@@ -86,8 +86,10 @@ import logging
from os import path
from json import loads
+
from polyglot import data_path
from polyglot.detect.langids import isoLangs
+from polyglot.utils import pretty_list
from icu import Locale
import stat
@@ -957,6 +959,11 @@ class Downloader(object):
return [x.name.split()[0] for x in self.collections()
if Downloader.LANG_PREFIX in x.id]
+ def supported_languages_table(self, task, cols=3):
+ languages = self.supported_languages(task)
+ return pretty_list(languages)
+
+
def supported_tasks(self, lang=None):
"""Languages that are covered by a specific task. | add supported languages pretty list support to dowloader | aboSamoor_polyglot | train | py |
1bdb83b34521f335017ce551d8298fcfe2331ef8 | diff --git a/modules/huddledmassesBidAdapter.js b/modules/huddledmassesBidAdapter.js
index <HASH>..<HASH> 100644
--- a/modules/huddledmassesBidAdapter.js
+++ b/modules/huddledmassesBidAdapter.js
@@ -81,15 +81,22 @@ function HuddledMassesAdapter() {
}
var secure = 0;
- if (window.location.protocol !== 'http:') {
+ var win;
+ try {
+ win = window.top;
+ } catch (e) {
+ win = window;
+ }
+
+ if (win.location.protocol !== 'http:') {
secure = 1;
}
- var host = window.location.host;
- var page = window.location.pathname;
+ var host = win.location.host;
+ var page = win.location.pathname;
var language = navigator.language;
- var deviceWidth = window.screen.width;
- var deviceHeight = window.screen.height;
+ var deviceWidth = win.screen.width;
+ var deviceHeight = win.screen.height;
var queryString = [
'banner_id', bid.params.placement_id, | Huddled mass iframe fix <I> (#<I>)
* iFrame interaction problem is solved.(Huddledmasses adapter)
* Removed unnecessary spaces | prebid_Prebid.js | train | js |
2a4bf3ee6d9c4ab35ea9516df163c1ea8fff2d56 | diff --git a/tasks/docs.rb b/tasks/docs.rb
index <HASH>..<HASH> 100755
--- a/tasks/docs.rb
+++ b/tasks/docs.rb
@@ -38,7 +38,7 @@ namespace :docs_site do
text << " #{p["name"].ljust(padding_size)}"
text << friendly_types_list(p["is"])
text << " # default value: 'name' unless specified" if p["name_property"]
- text << " # default value: #{pretty_default}" unless pretty_default.nil? || (pretty_default.is_a?(String) && pretty_default.length > 40) # 40 chars is too long for these example blocks
+ text << " # default value: #{pretty_default}" unless pretty_default.nil? || (pretty_default.is_a?(String) && pretty_default.length > 45) # 45 chars is too long for these example blocks
text << "\n"
end
text << " #{"action".ljust(padding_size)}Symbol # defaults to :#{default_action.first} if not specified\n" | Bump the ignored default length to <I> | chef_chef | train | rb |
4e67368773d4343ea953518f26af92110e4ccd2d | diff --git a/lib/plum/client.rb b/lib/plum/client.rb
index <HASH>..<HASH> 100644
--- a/lib/plum/client.rb
+++ b/lib/plum/client.rb
@@ -54,16 +54,9 @@ module Plum
self
end
- # Resume communication with the server, until the specified (or all running) requests are complete.
- # @param response [Response] if specified, waits only for the response
- # @return [Response] if parameter response is specified
- def resume(response = nil)
- if response
- @session.succ until response.failed? || response.finished?
- response
- else
- @session.succ until @session.empty?
- end
+ # Resume communication with the server until all running requests are complete.
+ def resume
+ @session.succ until @session.empty?
end
# Closes the connection immediately.
diff --git a/test/plum/client/test_client.rb b/test/plum/client/test_client.rb
index <HASH>..<HASH> 100644
--- a/test/plum/client/test_client.rb
+++ b/test/plum/client/test_client.rb
@@ -37,7 +37,7 @@ class ClientTest < Minitest::Test
client = Client.start("127.0.0.1", LISTEN_PORT, https: true, verify_mode: OpenSSL::SSL::VERIFY_NONE)
res = client.get("/error_in_data")
assert_raises(LocalConnectionError) {
- client.resume(res)
+ client.resume
}
client.close
ensure | client: Client#resume always waits all requests | rhenium_plum | train | rb,rb |
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.