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
|
---|---|---|---|---|---|
e67bd427b3dfe528c0871546731a8d9a7697fa44
|
diff --git a/SphereControls.js b/SphereControls.js
index <HASH>..<HASH> 100644
--- a/SphereControls.js
+++ b/SphereControls.js
@@ -100,7 +100,8 @@
function onDocumentMouseDown( event ) {
- self.dispatchEvent({type: 'tap', originalEvent: event});
+ event.type = 'tap';
+ self.dispatchEvent(event);
event.preventDefault();
_isUserInteracting = true;
@@ -134,7 +135,9 @@
_isUserInteracting = true;
autoRotate_Stop();
- self.dispatchEvent({type: 'tap', originalEvent: event});
+ event.type = 'tap';
+ self.dispatchEvent(event);
+
event.preventDefault();
event.stopPropagation();
_dragStartPosition.x = event.touches[ 0 ].pageX;
|
in case of 'tap' instead of dispatching a new event, we simply re-type the event and re-dispatch it under new type
|
knee-cola_SphereViewer
|
train
|
js
|
8e415f0e38fd043c903aa318987e80709e79a57c
|
diff --git a/lib/jss/api_object/script.rb b/lib/jss/api_object/script.rb
index <HASH>..<HASH> 100644
--- a/lib/jss/api_object/script.rb
+++ b/lib/jss/api_object/script.rb
@@ -124,9 +124,6 @@ module JSS
### @return [String] the notes field for this script
attr_reader :notes
- ### @return [String] the category of this script, stored in the JSS as the id number from the categories table
- attr_reader :category
-
### @return [Hash] script parameters 4-11. Parameters 1-3 are predefined as target drive, computer name, and username
attr_reader :parameters
|
remove defunct category attrib, superceded by including Categorizable.
Thanks @cybertunnel
|
PixarAnimationStudios_ruby-jss
|
train
|
rb
|
5dcccdaba2fc220f4c1b3f36ac558e5622cae6f5
|
diff --git a/lib/chronic/chronic.rb b/lib/chronic/chronic.rb
index <HASH>..<HASH> 100644
--- a/lib/chronic/chronic.rb
+++ b/lib/chronic/chronic.rb
@@ -231,7 +231,7 @@ module Chronic
text = pre_normalize(text)
tokens = text.split(' ').map { |word| Token.new(word) }
[Repeater, Grabber, Pointer, Scalar, Ordinal, Separator, TimeZone].each do |tok|
- tokens = tok.scan(tokens, options)
+ tok.scan(tokens, options)
end
tokens.select { |token| token.tagged? }
end
|
token scanners return the tokens, no need to capture this
|
mojombo_chronic
|
train
|
rb
|
dc228dc6ab2e721c0f2cc1235c1c18433403ba9f
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ install_requires = [
setup(
name='arcgis-rest-query',
- version='0.11',
+ version='0.2',
description='A tool to download a layer from an ArcGIS web service as GeoJSON',
author='Ken Schwencke',
author_email='[email protected]',
|
arbitrary version bump to <I>
|
Schwanksta_python-arcgis-rest-query
|
train
|
py
|
4974a207ccf27c0ba089ba558128c4668f36deb2
|
diff --git a/packages/react-scripts/scripts/utils/createJestConfig.js b/packages/react-scripts/scripts/utils/createJestConfig.js
index <HASH>..<HASH> 100644
--- a/packages/react-scripts/scripts/utils/createJestConfig.js
+++ b/packages/react-scripts/scripts/utils/createJestConfig.js
@@ -65,6 +65,7 @@ module.exports = (resolve, rootDir, isEjecting) => {
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
+ resetMocks: true,
};
if (rootDir) {
config.rootDir = rootDir;
|
Set resetMocks to true by default in jest config (#<I>)
|
facebook_create-react-app
|
train
|
js
|
b90ddfb716a3bcee0ae069a20d4ac21b30f1157e
|
diff --git a/task.js b/task.js
index <HASH>..<HASH> 100644
--- a/task.js
+++ b/task.js
@@ -9,7 +9,7 @@ var path = require('path');
// Module dependencies
var browserSync = require('browser-sync');
-module.exports = function(gulp, projectConfig, tasks) {
+module.exports = function(gulp, projectConfig) {
/* --------------------
* CONFIGURATION
|
fix(task.js): lint issue
|
cartridge_cartridge-local-server
|
train
|
js
|
1d12f4f2add53d41e6d6aeb498485b4736429f80
|
diff --git a/src/main/java/com/corundumstudio/socketio/transport/WebSocketTransport.java b/src/main/java/com/corundumstudio/socketio/transport/WebSocketTransport.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/corundumstudio/socketio/transport/WebSocketTransport.java
+++ b/src/main/java/com/corundumstudio/socketio/transport/WebSocketTransport.java
@@ -169,6 +169,8 @@ public class WebSocketTransport extends BaseTransport {
authorizeHandler.connect(client);
heartbeatHandler.onHeartbeat(client);
+
+ channel.pipeline().remove(SocketIOChannelInitializer.XHR_POLLING_TRANSPORT);
removeHandler(channel.pipeline());
}
|
removing XHR transport on websocket client success connection
|
mrniko_netty-socketio
|
train
|
java
|
ca44558527ed64151e8a3f0667d1d32c5fc470b9
|
diff --git a/libkbfs/ops.go b/libkbfs/ops.go
index <HASH>..<HASH> 100644
--- a/libkbfs/ops.go
+++ b/libkbfs/ops.go
@@ -1542,6 +1542,8 @@ func RegisterOps(codec kbfscodec.Codec) {
opPointerizer)
}
+// pathSortedOps sorts the ops in increasing order by path length, so
+// e.g. file creates come before file modifies.
type pathSortedOps []op
func (pso pathSortedOps) Len() int {
|
ops: comment on `pathSortedOps`
Suggested by songgao.
Issue; #<I>
|
keybase_client
|
train
|
go
|
21f354969efdb1ecab455d2c23eaa5d98cde2262
|
diff --git a/src/authentication.php b/src/authentication.php
index <HASH>..<HASH> 100644
--- a/src/authentication.php
+++ b/src/authentication.php
@@ -265,6 +265,7 @@ function server($app, $dataToToken = null, $dataFromToken = null) {
}
$auth->post('/token/', function (Http\Request $request) use ($app, $dataToToken) {
+ $app['logger']->info('Found encrypted code_verifer cookie', ['content' => $request->cookies->get("{$cookieName}_code_verifier")])
$storedCodeVerifier = $app['encryption']->decrypt($request->cookies->get("{$cookieName}_code_verifier"));
$f = $request->request;
|
Added code verifier logging for debugging
|
Taproot_authentication
|
train
|
php
|
1f50689ecb7e1155381daf61f3010a110df0ea82
|
diff --git a/pub/js/search_autosuggestion.js b/pub/js/search_autosuggestion.js
index <HASH>..<HASH> 100644
--- a/pub/js/search_autosuggestion.js
+++ b/pub/js/search_autosuggestion.js
@@ -24,9 +24,7 @@ define(function () {
return;
}
- /* TODO: Inject base URL */
-
- callAjax('/lizards-and-pumpkins/catalogsearch/suggest?q=' + value, function (responseText) {
+ callAjax(baseUrl + 'catalogsearch/suggest?q=' + value, function (responseText) {
autosuggestionBox.innerHTML = responseText;
});
}, true);
|
Issue #<I>: Inject base URL into search autosuggestion JavaScript
|
lizards-and-pumpkins_catalog
|
train
|
js
|
71d326a91ef3dd3364a66e8ea4785bbef08ef7e3
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -18,8 +18,7 @@ setup(
url='https://github.com/waderoberts123/HydroErr',
download_url='https://github.com/waderoberts123/Hydrostats/archive/1.21.tar.gz',
keywords=['hydrology', 'error', 'metrics', 'comparison', 'statistics', 'forecast', 'observed'],
- classifiers=["License :: OSI Approved :: MIT License",
- "Programming Language :: Python :: 2.7",
+ classifiers=["Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
],
|
Updates to Mielke-Berry R metric
|
BYU-Hydroinformatics_HydroErr
|
train
|
py
|
6285b1b8457ed5cc22a70ddfada91308771a48ad
|
diff --git a/mode/css/css.js b/mode/css/css.js
index <HASH>..<HASH> 100644
--- a/mode/css/css.js
+++ b/mode/css/css.js
@@ -4,7 +4,7 @@ CodeMirror.defineMode("css", function(config) {
function tokenBase(stream, state) {
var ch = stream.next();
- if (ch == "@") {stream.eatWhile(/\w/); return ret("meta", stream.current());}
+ if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("meta", stream.current());}
else if (ch == "/" && stream.eat("*")) {
state.tokenize = tokenCComment;
return tokenCComment(stream, state);
@@ -20,7 +20,7 @@ CodeMirror.defineMode("css", function(config) {
return state.tokenize(stream, state);
}
else if (ch == "#") {
- stream.eatWhile(/\w/);
+ stream.eatWhile(/[\w\\\-]/);
return ret("atom", "hash");
}
else if (ch == "!") {
@@ -38,7 +38,7 @@ CodeMirror.defineMode("css", function(config) {
return ret(null, ch);
}
else {
- stream.eatWhile(/[\w\\\-_]/);
+ stream.eatWhile(/[\w\\\-]/);
return ret("variable", "variable");
}
}
|
[css mode] Allow dashes in ids
|
codemirror_CodeMirror
|
train
|
js
|
b95fbdb3a59de5e15d6bc3d433bba98d39c088ba
|
diff --git a/test/fixtures/proc_with_closed_stdout.py b/test/fixtures/proc_with_closed_stdout.py
index <HASH>..<HASH> 100755
--- a/test/fixtures/proc_with_closed_stdout.py
+++ b/test/fixtures/proc_with_closed_stdout.py
@@ -4,6 +4,9 @@ import os
import sys
import time
+sys.stdout.write('script really ran')
+sys.stdout.flush()
+
os.close(1)
time.sleep(1) # one second should be enough for parent process to do iteration with readline()
sys.exit(1)
diff --git a/test/test_command_helpers.py b/test/test_command_helpers.py
index <HASH>..<HASH> 100644
--- a/test/test_command_helpers.py
+++ b/test/test_command_helpers.py
@@ -36,4 +36,5 @@ class TestClHelper(object):
try:
ClHelper.run_command(test_script)
except ClException as e:
+ assert 'script really ran' in e.output
assert '\n\n' not in e.output
|
Test that we actually ran the testing script and didn't just get 'command unknow' or something similar...
|
devassistant_devassistant
|
train
|
py,py
|
0148ab3b5db82aca1dfdd4360af008a3eb8363ec
|
diff --git a/lib/core/selenium_runner.js b/lib/core/selenium_runner.js
index <HASH>..<HASH> 100644
--- a/lib/core/selenium_runner.js
+++ b/lib/core/selenium_runner.js
@@ -94,9 +94,9 @@ class SeleniumRunner {
return Promise
.try(() => {
if (log.isEnabledFor(log.TRACE)) {
- log.debug('Executing script in browser: %s', script);
- } else {
- log.debug('Executing script in browser');
+ log.verbose('Executing script in browser: %s', script);
+ } else if (log.isEnabledFor(log.VERBOSE)) {
+ log.verbose('Executing script in browser');
}
return this.driver.executeScript(script, args);
})
@@ -107,9 +107,9 @@ class SeleniumRunner {
return Promise
.try(() => {
if (log.isEnabledFor(log.TRACE)) {
- log.trace('Executing async script in browser: %s', script);
- } else {
- log.debug('Executing async script in browser');
+ log.verbose('Executing async script in browser: %s', script);
+ } else if (log.isEnabledFor(log.VERBOSE)) {
+ log.verbose('Executing async script in browser');
}
return this.driver.executeAsyncScript(script, args);
});
|
Reduce verbosity of logging scripts.
|
sitespeedio_browsertime
|
train
|
js
|
692bed86e431858781d4e9335bbd6a4d39944a51
|
diff --git a/crianza/native.py b/crianza/native.py
index <HASH>..<HASH> 100644
--- a/crianza/native.py
+++ b/crianza/native.py
@@ -3,6 +3,10 @@ Contains extremely experimental support for compiling to native Python.
Beware that actually running your code as native Python bytecode may segfault
the interpreter!
+
+TODO:
+ - Read all jump locations (not entirely possible, actually), convert to
+ bp.Label.
"""
import byteplay as bp
@@ -125,11 +129,13 @@ def nop(lineno):
return [(bp.NOP, None)]
def boolean_and(lineno):
+ # a b -- (b and a)
+ label_out = bp.Label()
return [
- (bp.JUMP_IF_FALSE_OR_POP, lineno+2*3),
- (bp.JUMP_RELATIVE, 3*3),
- (bp.ROT_TWO, None),
+ (bp.POP_JUMP_IF_TRUE, label_out), # a b -- a
(bp.POP_TOP, None),
+ (bp.LOAD_CONST, False),
+ (label_out, None),
]
def boolean_not(lineno):
|
Fixes native boolean_and
|
cslarsen_crianza
|
train
|
py
|
bfd8c425581e21a122d094a64371825f35fcc89f
|
diff --git a/src/Middleware/Minify.php b/src/Middleware/Minify.php
index <HASH>..<HASH> 100644
--- a/src/Middleware/Minify.php
+++ b/src/Middleware/Minify.php
@@ -79,7 +79,20 @@ class Minify
protected function minifyHtml(ResponseInterface $response)
{
$stream = call_user_func($this->streamCreator);
- $stream->write(HtmlMinify::minify((string) $response->getBody()));
+ $cssMinify = new CssMinify();
+
+ $stream->write(HtmlMinify::minify(
+ (string) $response->getBody(),
+ [
+ 'jsCleanComments' => true,
+ 'cssMinifier' => function ($css) use ($cssMinify) {
+ return $cssMinify->run($css);
+ },
+ 'jsMinifier' => function ($js) {
+ return JsMinify::minify($js);
+ }
+ ]
+ ));
return $response->withBody($stream);
}
|
minify inline css/js in html
|
oscarotero_psr7-middlewares
|
train
|
php
|
f2cd05fe3b5ba44f8f3d1114f32126ec9c580262
|
diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java
index <HASH>..<HASH> 100644
--- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java
+++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java
@@ -68,6 +68,21 @@ public class FhirInstanceValidatorR4Test {
myValidConcepts.add(theSystem + "___" + theCode);
}
+ /**
+ * An invalid local reference should not cause a ServiceException.
+ */
+ @Test
+ public void testInvalidLocalReference() {
+ QuestionnaireResponse resource = new QuestionnaireResponse();
+ resource.setStatus(QuestionnaireResponse.QuestionnaireResponseStatus.COMPLETED);
+
+ resource.setSubject(new Reference("#invalid-ref"));
+
+ ValidationResult output = myVal.validateWithResult(resource);
+ List<SingleValidationMessage> nonInfo = logResultsAndReturnNonInformationalOnes(output);
+ assertThat(nonInfo, hasSize(2));
+ }
+
@SuppressWarnings("unchecked")
@Before
public void before() {
|
Add test for invalid local reference (R4)
Currently an invalid local reference causes an InternalErrorException
caused by: FHIRException: Resource resolution services not provided.
The validation should instead return normally and contain an error
message.
|
jamesagnew_hapi-fhir
|
train
|
java
|
bda0b755530bf6a3dcbdd2ab915964b248bc5d5b
|
diff --git a/hyperstream/workflow/factor.py b/hyperstream/workflow/factor.py
index <HASH>..<HASH> 100644
--- a/hyperstream/workflow/factor.py
+++ b/hyperstream/workflow/factor.py
@@ -47,6 +47,13 @@ class Factor(Printable):
"""
if not isinstance(tool, BaseTool):
raise ValueError("Expected tool, got {}".format(type(tool)))
+
+ if isinstance(tool, MultiOutputTool):
+ raise ValueError("Use MultiOutputFactor for MultiOutputTool")
+
+ if isinstance(tool, PlateCreationTool):
+ raise ValueError("Use PlateCreationFactor for PlateCreationTool")
+
self.tool = tool
if source_nodes:
for source in source_nodes:
|
Added a sanity check
|
IRC-SPHERE_HyperStream
|
train
|
py
|
c6a959ad9339adcbfb7aebb1e230ee845d2f029b
|
diff --git a/lib/cf/version.rb b/lib/cf/version.rb
index <HASH>..<HASH> 100644
--- a/lib/cf/version.rb
+++ b/lib/cf/version.rb
@@ -1,3 +1,3 @@
module CF
- VERSION = "0.6.1.rc18".freeze
+ VERSION = "0.6.1.rc19".freeze
end
|
Bump to <I>.rc<I>
|
cloudfoundry-attic_cf
|
train
|
rb
|
6ae76c51e52d6235b3b8fadac142fb0a37bc21e6
|
diff --git a/tile_generator/opsmgr.py b/tile_generator/opsmgr.py
index <HASH>..<HASH> 100644
--- a/tile_generator/opsmgr.py
+++ b/tile_generator/opsmgr.py
@@ -293,6 +293,7 @@ def ssh(command=None, login_to_bosh=True, quiet=False):
bosh2_username = director_creds['credential']['value']['identity']
print_if('Logging into bosh2 as %s...' % bosh2_username)
+ session.sendline('which bosh2 || alias bosh2=bosh') # In Ops Manager 2.0+, there is just bosh (which is v2).
session.sendline('bosh2 login')
session.expect(bosh2_username_prompt, timeout=prompt_wait_timeout)
session.send(bosh2_username)
|
Account for bosh2 -> bosh change in PCF <I>+.
|
cf-platform-eng_tile-generator
|
train
|
py
|
3892ecd7673d5bdedf7f95461dea9cece4f8837e
|
diff --git a/Filter/Type/AjaxRelationFilterType.php b/Filter/Type/AjaxRelationFilterType.php
index <HASH>..<HASH> 100644
--- a/Filter/Type/AjaxRelationFilterType.php
+++ b/Filter/Type/AjaxRelationFilterType.php
@@ -135,11 +135,13 @@ class AjaxRelationFilterType extends FilterType
}
}
+ $property = sprintf('%s.%s', $this->getColumn(), $this->propToCheckAgainstId);
+
switch ($operator) {
case static::CRITERIA_EQUAL:
- return $queryBuilder->expr()->eq(sprintf('%s.%s', $this->getColumn(), $this->propToCheckAgainstId), (int) $value);
+ return $queryBuilder->expr()->eq($property, (int) $value);
case static::CRITERIA_NOT_EQUAL:
- return $queryBuilder->expr()->neq(sprintf('%s.%s', $this->getColumn(), $this->propToCheckAgainstId), (int) $value);
+ return $queryBuilder->expr()->neq($property, (int) $value);
}
return false;
|
refactor: extract duplicated code
|
whatwedo_TableBundle
|
train
|
php
|
9a6f23bcd8fc3c122980d2a900a02768861e1ac0
|
diff --git a/ImagingReso/resonance.py b/ImagingReso/resonance.py
index <HASH>..<HASH> 100644
--- a/ImagingReso/resonance.py
+++ b/ImagingReso/resonance.py
@@ -501,13 +501,14 @@ class Resonance(object):
x_axis_label = 'Energy (eV)'
else:
x_axis_label = u"Wavelength (\u212B)"
+ plt.xlim(0, 20)
if mixed:
_x_axis = self.total_signal['energy_eV']
if x_axis == 'lambda':
_x_axis = _utilities.energy_to_lambda(energy_ev=_x_axis)
_y_axis = self.total_signal[y_axis_tag]
- plt.plot(_x_axis, _y_axis, label="full sample")
+ plt.plot(_x_axis, _y_axis, label="Total")
if all_layers:
for _compound in _stack.keys():
|
Minor change name to 'Total'
|
ornlneutronimaging_ImagingReso
|
train
|
py
|
f2a5457ef031a64f46bda31b186087e3bb9cff9b
|
diff --git a/librosa/__init__.py b/librosa/__init__.py
index <HASH>..<HASH> 100644
--- a/librosa/__init__.py
+++ b/librosa/__init__.py
@@ -6,4 +6,4 @@
from . import core, beat, decompose, display, feature, filters, onset, output, segment
from librosa.core import *
-__version__ = '0.2.0'
+__version__ = '0.2.1-dev'
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='librosa',
- version='0.2.0',
+ version='0.2.1-dev',
description='Python module for audio and music processing',
author='Brian McFee',
author_email='[email protected]',
|
versioning up to <I>-dev
|
librosa_librosa
|
train
|
py,py
|
c3c61d39b97af5fa38e3ce71537e37c4da0d60ab
|
diff --git a/datastream/components/camel-device-io/src/main/java/io/rhiot/component/deviceio/DeviceIOConstants.java b/datastream/components/camel-device-io/src/main/java/io/rhiot/component/deviceio/DeviceIOConstants.java
index <HASH>..<HASH> 100644
--- a/datastream/components/camel-device-io/src/main/java/io/rhiot/component/deviceio/DeviceIOConstants.java
+++ b/datastream/components/camel-device-io/src/main/java/io/rhiot/component/deviceio/DeviceIOConstants.java
@@ -39,6 +39,10 @@ public final class DeviceIOConstants {
public static final String CAMEL_SPLIT_REGEX = "[A-Z_]+(\\|[A-Z_]+)*";
public static final String CAMEL_SPLIT = "\\|";
+ public static final String CAMEL_I2C_DEVICE_ID = "deviceId";
+ public static final String CAMEL_I2C_BUS_ID = "busId";
+ public static final String CAMEL_I2C_DRIVER_LOCATION = "/META-INF/services/io/rhiot/component/deviceio/i2c/";
+
private DeviceIOConstants() {
// Constants class
}
|
starting deviceio i2c
|
rhiot_rhiot
|
train
|
java
|
a60d351b6c865a30e88e147bba6bf54c5ecbe4fa
|
diff --git a/src/main/java/org/graylog2/users/User.java b/src/main/java/org/graylog2/users/User.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/graylog2/users/User.java
+++ b/src/main/java/org/graylog2/users/User.java
@@ -76,8 +76,12 @@ public class User {
public static Set<User> fetchAll(Core server, Map<String, Object> additionalQueryOpts) {
UserCache cache = UserCache.getInstance();
- if (cache.valid()) {
- return cache.get();
+
+ // Only use the cache if we really fetch *all* users.
+ if (additionalQueryOpts == null || additionalQueryOpts.isEmpty()) {
+ if (cache.valid()) {
+ return cache.get();
+ }
}
Set<User> users = Sets.newHashSet();
@@ -100,7 +104,9 @@ public class User {
}
}
- cache.set(users);
+ if (additionalQueryOpts == null || additionalQueryOpts.isEmpty()) {
+ cache.set(users);
+ }
return users;
}
|
don't use user cache with custom query conditions
fixes #SERVER-<I>
|
Graylog2_graylog2-server
|
train
|
java
|
4d09a29f78294c68480ec2cfdc2df38f0a596690
|
diff --git a/Resources/public/js/interactionHole.js b/Resources/public/js/interactionHole.js
index <HASH>..<HASH> 100644
--- a/Resources/public/js/interactionHole.js
+++ b/Resources/public/js/interactionHole.js
@@ -133,6 +133,9 @@ function addFormHoleEdit(add, response, point, size, orthography, del, selector,
container.remove();
$('#prototypes').remove();
+
+ addClassVAlign();
+ verticalAlignCenter();
}
function createHole() {
|
[ExoBundle] Edition : alignement of elements of array with the holes# Please enter the commit message for your changes. Lines starting
|
claroline_Distribution
|
train
|
js
|
9dd002cc8089f17781dec84030abd4dfc00faf40
|
diff --git a/great_expectations/cli/datasource.py b/great_expectations/cli/datasource.py
index <HASH>..<HASH> 100644
--- a/great_expectations/cli/datasource.py
+++ b/great_expectations/cli/datasource.py
@@ -350,11 +350,14 @@ def build_docs(context, site_name=None):
msg = """
The following data documentation HTML sites were generated:
-
+
"""
for site_name, index_page_locator_info in index_page_locator_infos.items():
- msg += site_name + ":\n"
- msg += " <green>file://" + index_page_locator_info + "</green>\n\n"
+ if os.path.isfile(index_page_locator_info):
+ msg += site_name + ":\n"
+ msg += " <green>file://" + index_page_locator_info + "</green>\n\n"
+ else:
+ msg += site_name + "\n"
cli_message(msg)
|
Only refer to file://<index_page_locator_info> if it is a file
|
great-expectations_great_expectations
|
train
|
py
|
9aa226595d5bb97d36070b00f22915772361e468
|
diff --git a/tests/test_srcset.py b/tests/test_srcset.py
index <HASH>..<HASH> 100644
--- a/tests/test_srcset.py
+++ b/tests/test_srcset.py
@@ -70,7 +70,7 @@ def test_variable_output_quality_default():
# Accumulate the values of the `DPR_QUALITIES` dictionary
# as a `dpr_qualities` list.
- dpr_qualities = [q for q in DPR_QUALITIES.values()]
+ dpr_qualities = sorted([q for q in DPR_QUALITIES.values()], reverse=True)
# Zip the `srclist` and `dpr_qualities` into the pairs
# we expect them to occur in.
|
refactor: reverse sort values in test
|
imgix_imgix-python
|
train
|
py
|
09803980e63eba5f348253e93c624b6960050a7f
|
diff --git a/Eloquent/Model.php b/Eloquent/Model.php
index <HASH>..<HASH> 100644
--- a/Eloquent/Model.php
+++ b/Eloquent/Model.php
@@ -950,17 +950,19 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
/**
* Reload the current model instance with fresh attributes from the database.
*
- * @return void
+ * @return $this
*/
public function refresh()
{
if (! $this->exists) {
- return;
+ return $this;
}
$this->load(array_keys($this->relations));
$this->setRawAttributes(static::findOrFail($this->getKey())->attributes);
+
+ return $this;
}
/**
|
Return the instance after refresh (#<I>)
|
illuminate_database
|
train
|
php
|
b02e8469b30fda5a6a65cdae18b8967d64212994
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -13,6 +13,6 @@ function match (route) {
return route.trim()
.replace(/[\?|#].*$/, '')
.replace(/^(?:https?\:)\/\//, '')
- .replace(/^(?:[\w.])+(?:[\:0-9]{4,5})?/, '')
+ .replace(/^(?:[\w+(?:-\w+)+.])+(?:[\:0-9]{4,5})?/, '')
.replace(/\/$/, '')
}
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -33,8 +33,10 @@ test('it should remove protocols', function (t) {
})
test('it should remove hosts', function (t) {
- t.plan(1)
+ t.plan(3)
t.equal(match('bar.com/foo/bar/'), '/foo/bar')
+ t.equal(match('bar-foo.com/foo/bar/'), '/foo/bar')
+ t.equal(match('bar-foo--bar.com/foo/bar/'), '/foo/bar')
})
test('it should remove ips', function (t) {
|
match: remove host with hyphens
|
yoshuawuyts_pathname-match
|
train
|
js,js
|
d751b924e86d5621d18c3424f8657c439992f651
|
diff --git a/standalone-html.js b/standalone-html.js
index <HASH>..<HASH> 100644
--- a/standalone-html.js
+++ b/standalone-html.js
@@ -14,6 +14,7 @@ var imageTypes = {
".jpg": "image/jpeg",
".jpeg": "image/jpeg",
".bmp": "image/bmp",
+ ".svg": "image/svg+xml",
".webp": "image/webp"
}
@@ -162,6 +163,7 @@ module.exports.api = function (inputFilePath, outputPath, escape, callback) {
".jpg": "image/jpeg",
".jpeg": "image/jpeg",
".bmp": "image/bmp",
+ ".svg": "image/svg+xml",
".webp": "image/webp"
}
|
Add SVG support
Add svg to the imageType map to support encoded SVGs
|
kinchanmaemo_standalone-html
|
train
|
js
|
c135551d5bcb50b886bd6e0dc962d367618a5198
|
diff --git a/lib/generator.js b/lib/generator.js
index <HASH>..<HASH> 100644
--- a/lib/generator.js
+++ b/lib/generator.js
@@ -3,6 +3,7 @@ var fs = require('fs');
var Mustache = require('mustache');
var async = require('async');
var os = require('os');
+var path = require('path');
var packing = require('./packing/packing.js');
/**
@@ -19,10 +20,10 @@ exports.trimImages = function (files, options, callback) {
async.eachSeries(files, function (file, next) {
file.originalPath = file.path;
i++;
- file.path = os.tmpDir() + 'image_' +i;
+ file.path = path.join(os.tmpDir(), 'image_' + i);
//have to add 1px transparent border because imagemagick do trimming based on border pixel's color
- exec('convert -define png:exclude-chunks=date ' + file.originalPath + ' -bordercolor transparent -border 1 -trim ' + file.path, next);
+ exec('convert -define png:exclude-chunks=date "' + file.originalPath + '" -bordercolor transparent -border 1 -trim "' + file.path + '"', next);
}, callback);
};
|
Fix file paths issue on trim operation.
|
krzysztof-o_spritesheet.js
|
train
|
js
|
6e9f6f1a9252e787a510ae92fa6bfeef63ffb6a0
|
diff --git a/daemon.go b/daemon.go
index <HASH>..<HASH> 100644
--- a/daemon.go
+++ b/daemon.go
@@ -39,6 +39,6 @@ func (d *Context) Search() (daemon *os.Process, err error) {
}
// Release provides correct pid-file release in daemon.
-func (d *Context) Release() (err error) {
+func (d *Context) Release() error {
return d.release()
}
diff --git a/daemon_unix.go b/daemon_unix.go
index <HASH>..<HASH> 100644
--- a/daemon_unix.go
+++ b/daemon_unix.go
@@ -249,12 +249,10 @@ func (d *Context) child() (err error) {
return
}
-func (d *Context) release() (err error) {
- if !initialized {
- return
- }
- if d.pidFile != nil {
- err = d.pidFile.Remove()
+func (d *Context) release() error {
+ if !initialized || d.pidFile == nil {
+ return nil
}
- return
+
+ return d.pidFile.Remove()
}
|
Return error on pid-file release failure
|
sevlyar_go-daemon
|
train
|
go,go
|
6959f65022ca2b217d6ae0a614ce799a9f5e1101
|
diff --git a/h5p.classes.php b/h5p.classes.php
index <HASH>..<HASH> 100644
--- a/h5p.classes.php
+++ b/h5p.classes.php
@@ -109,6 +109,14 @@ interface H5PFrameworkInterface {
public function loadAddons();
/**
+ * Load config for libraries
+ *
+ * @param array $libraries
+ * @return array
+ */
+ public function getLibraryConfig($libraries = NULL);
+
+ /**
* Get a list of the current installed libraries
*
* @return array
diff --git a/js/h5p.js b/js/h5p.js
index <HASH>..<HASH> 100644
--- a/js/h5p.js
+++ b/js/h5p.js
@@ -2243,6 +2243,17 @@ H5P.createTitle = function (rawTitle, maxLength) {
};
/**
+ * Get config for a library
+ *
+ * @param string machineName
+ * @return Object
+ */
+ H5P.getLibraryConfig = function (machineName) {
+ var hasConfig = H5PIntegration.libraryConfig && H5PIntegration.libraryConfig[machineName];
+ return hasConfig ? H5PIntegration.libraryConfig[machineName] : {};
+ };
+
+ /**
* Get item from the H5P Clipboard.
*
* @private
|
HFP-<I> Add library config as a generic feature
|
h5p_h5p-php-library
|
train
|
php,js
|
3a8808e2f5a21a408c5be17a319d86d9f8ee9733
|
diff --git a/src/lib/modules/blockchain_connector/index.js b/src/lib/modules/blockchain_connector/index.js
index <HASH>..<HASH> 100644
--- a/src/lib/modules/blockchain_connector/index.js
+++ b/src/lib/modules/blockchain_connector/index.js
@@ -454,7 +454,7 @@ class BlockchainConnector {
(req, res) => {
const signer = req.body.address;
const message = req.body.message;
- this.web3.eth.personal.sign(message, signer).then(signature => {
+ this.web3.eth.sign(message, signer).then(signature => {
res.send({signer, signature, message});
}).catch(e => res.send({ error: e.message }));
}
|
fix: allow message signing with wallet address
|
embark-framework_embark
|
train
|
js
|
95dc24803bea318dd2e8b5102c5c264d4b6a2094
|
diff --git a/lib/flame/render.rb b/lib/flame/render.rb
index <HASH>..<HASH> 100644
--- a/lib/flame/render.rb
+++ b/lib/flame/render.rb
@@ -88,7 +88,11 @@ module Flame
## Find possible directories for the controller
def controller_dirs
parts = @controller.class.underscore.split('/').map do |part|
- (part.split('_') - %w[controller controllers ctrl]).join('_')
+ %w[_controller _ctrl]
+ .find { |suffix| part.chomp! suffix }
+ part
+ ## Alternative, but slower by ~50%:
+ # part.sub(/_(controller|ctrl)$/, '')
end
combine_parts(parts).map! { |path| path.join('/') }
end
|
Improve searching for view file by controller name
Don't remove extra (logical) 'controller' parts.
|
AlexWayfer_flame
|
train
|
rb
|
3ec5aab7358ed190b0846d163aa2dab77b9fc1b6
|
diff --git a/activiti-engine/src/main/java/org/activiti/engine/ProcessEngines.java b/activiti-engine/src/main/java/org/activiti/engine/ProcessEngines.java
index <HASH>..<HASH> 100644
--- a/activiti-engine/src/main/java/org/activiti/engine/ProcessEngines.java
+++ b/activiti-engine/src/main/java/org/activiti/engine/ProcessEngines.java
@@ -69,8 +69,10 @@ public abstract class ProcessEngines {
/** is called when a server boots by the activiti-rest webapp. */
public synchronized static void init() {
if (!isInitialized) {
- // Create a new hashMap in case the ProcessEngines.destroy() was called before and map is Unmodifiable
- processEngines = new HashMap<String, ProcessEngine>();
+ if(processEngines == null) {
+ // Create new map to store process-engines if current map is null
+ processEngines = new HashMap<String, ProcessEngine>();
+ }
ClassLoader classLoader = ReflectUtil.getClassLoader();
Enumeration<URL> resources = null;
try {
|
ACT-<I> registered engines before initialization of ProcessEngines are kept
|
camunda_camunda-bpm-platform
|
train
|
java
|
47b03485640e397c2cb9e54d54b74d5f3b2b884f
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -116,6 +116,7 @@ angular.module('SmoothScrollbar', [])
alwaysShowTracks: '=',
continuousScrolling: '=',
overscrollEffect: '=',
+ overscrollDamping: '=',
overscrollEffectColor: '@'
},
link(scope, elem, attrs, ctrl, transclude) {
|
update with smooth-scrollbar@<I>
|
idiotWu_angular-smooth-scrollbar
|
train
|
js
|
ff109773ceea1e046733faa24e8eedb24082246b
|
diff --git a/Eloquent/Model.php b/Eloquent/Model.php
index <HASH>..<HASH> 100644
--- a/Eloquent/Model.php
+++ b/Eloquent/Model.php
@@ -1501,7 +1501,7 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab
/**
* Retrieve the model for a bound value.
*
- * @param mixed $value
+ * @param mixed $value
* @param string|null $field
* @return \Illuminate\Database\Eloquent\Model|null
*/
@@ -1513,8 +1513,8 @@ abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializab
/**
* Retrieve the child model for a bound value.
*
- * @param string $childType
- * @param mixed $value
+ * @param string $childType
+ * @param mixed $value
* @param string|null $field
* @return \Illuminate\Database\Eloquent\Model|null
*/
|
[7.x] Fix docblock spacing (#<I>)
|
illuminate_database
|
train
|
php
|
0de52414cdd4ea55b299317023a0d48e44354959
|
diff --git a/raft/node_test.go b/raft/node_test.go
index <HASH>..<HASH> 100644
--- a/raft/node_test.go
+++ b/raft/node_test.go
@@ -463,7 +463,7 @@ func TestNodeAdvance(t *testing.T) {
n.Advance()
select {
case <-n.Ready():
- case <-time.After(time.Millisecond):
+ case <-time.After(100 * time.Millisecond):
t.Errorf("expect Ready after Advance, but there is no Ready available")
}
}
|
raft: extend wait timeout in TestNodeAdvance
This fixes the failure met in semaphore CI.
|
etcd-io_etcd
|
train
|
go
|
d5105d50e12790144705161eecc4674c98bdd41c
|
diff --git a/lib/Less/Node/Ruleset.php b/lib/Less/Node/Ruleset.php
index <HASH>..<HASH> 100755
--- a/lib/Less/Node/Ruleset.php
+++ b/lib/Less/Node/Ruleset.php
@@ -261,6 +261,14 @@ class Ruleset
}
}
+ // Remove last semicolon
+ if( $env->compress && count($rules) ){
+ $rule =& $rules[ count($rules)-1 ];
+ if( substr($rule, -1 ) === ';' ){
+ $rule = substr($rule,0,-1);
+ }
+ }
+
$rulesets = implode('', $rulesets);
// If this is the root node, we don't render
|
added better compression for rules by removing the last semicolon
|
oyejorge_less.php
|
train
|
php
|
1c5a44d26fe4b5a3004c3044a02510fba575bf5d
|
diff --git a/components/select/select.js b/components/select/select.js
index <HASH>..<HASH> 100644
--- a/components/select/select.js
+++ b/components/select/select.js
@@ -735,13 +735,13 @@ export default class Select extends RingComponentWithShortcuts {
value={filterValue}
className={inputCS}
style={style}
- onInput={::this._filterChangeHandler}
onChange={noop}
onFocus={::this._focusHandler}
onBlur={::this._blurHandler}
shortcuts={this._inputShortcutsEnabled()}
placeholder={this._getInputPlaceholder()}
onKeyDown={::this.props.onKeyDown}
+ onKeyUp={::this._filterChangeHandler}
/>
{iconsNode}
</div>
|
Select: user onKeyUp instead of onInput to avoid IE onInput problem (fake events if placeholder set)
Former-commit-id: <I>b<I>dcc<I>d0c5cb7b8f<I>da0c<I>ef<I>
|
JetBrains_ring-ui
|
train
|
js
|
811562af3dbf4b0e6919819db904f9fab2975bfd
|
diff --git a/st.js b/st.js
index <HASH>..<HASH> 100644
--- a/st.js
+++ b/st.js
@@ -103,6 +103,9 @@ function Mount (opt) {
readdir: AC(c.readdir),
content: AC(c.content)
}
+
+ this._cacheControl = opt.cache === false ? 'public'
+ : 'public, max-age=' + c.content.maxAge / 1000
}
// lru-cache doesn't like when max=0, so we just pretend
@@ -284,7 +287,7 @@ Mount.prototype.serve = function (req, res, next) {
}
// only set headers once we're sure we'll be serving this request
- res.setHeader('cache-control', 'public')
+ res.setHeader('cache-control', this._cacheControl)
res.setHeader('last-modified', stat.mtime.toUTCString())
res.setHeader('etag', etag)
diff --git a/test/basic.js b/test/basic.js
index <HASH>..<HASH> 100644
--- a/test/basic.js
+++ b/test/basic.js
@@ -113,6 +113,10 @@ test('multiball!', function (t) {
if (er)
throw er
t.equal(res.statusCode, 200)
+ var cc = 'public, max-age=600'
+ if (opts.cache === false)
+ cc = 'public'
+ t.equal(res.headers['cache-control'], cc)
if (--n === 0)
t.end()
|
Leverage browser caching by specifying max-age
If cache.content.maxAge is specified, set ‘cache-control’ header to
‘public, max-age=…’
Test added by @isaacs, who also then made the test pass.
|
isaacs_st
|
train
|
js,js
|
6cfe57b141fd0b9ab098cb066ee9390b24f1f1b5
|
diff --git a/EventListener/ShutdownListener.php b/EventListener/ShutdownListener.php
index <HASH>..<HASH> 100755
--- a/EventListener/ShutdownListener.php
+++ b/EventListener/ShutdownListener.php
@@ -25,7 +25,7 @@ class ShutdownListener
/**
* Constructor
*
- * @param Evolution7\BugsnagBundle\Bugsnag\ClientLoader $client
+ * @param \Evolution7\BugsnagBundle\Bugsnag\ClientLoader $client
*/
public function __construct(ClientLoader $client)
{
@@ -35,7 +35,7 @@ class ShutdownListener
/**
* Register the handler on the request.
*
- * @param Symfony\Component\HttpKernel\Event\FilterControllerEvent $event
+ * @param \Symfony\Component\HttpKernel\Event\FilterControllerEvent $event
*/
public function register(FilterControllerEvent $event)
{
|
Update ShutdownListener.php
|
evolution7_Evolution7BugsnagBundle
|
train
|
php
|
481001c8f1692b11fa973a5cbe2e37fb024cd34c
|
diff --git a/gosu-core/src/main/java/gw/internal/gosu/parser/GosuParser.java b/gosu-core/src/main/java/gw/internal/gosu/parser/GosuParser.java
index <HASH>..<HASH> 100644
--- a/gosu-core/src/main/java/gw/internal/gosu/parser/GosuParser.java
+++ b/gosu-core/src/main/java/gw/internal/gosu/parser/GosuParser.java
@@ -2628,7 +2628,7 @@ public final class GosuParser extends ParserBase implements IGosuParser
IType rhsType = ((TypeLiteral)rhs).getType().getType();
verify( rhs, rhsType != JavaTypes.pVOID(), Res.MSG_VOID_NOT_ALLOWED );
verifyComparable( TypeLord.replaceTypeVariableTypeParametersWithBoundingTypes( rhsType ), lhs, false, false );
- if( (rhs.hasParseExceptions() || lhs.hasParseExceptions()) && !(lhs instanceof TypeLiteral) )
+ if( (rhs.hasParseExceptions() || lhs.hasParseExceptions()) && (!(lhs instanceof TypeLiteral) || ((TypeLiteral)lhs).getType().getType() instanceof TypeVariableType) )
{
IType lhsType = lhs.getType();
if( TypeSystem.canCast( lhsType, rhsType ) )
|
support cross-casts on type variable types
|
gosu-lang_gosu-lang
|
train
|
java
|
2fe025b6803fe63370611bf76ab8e4f7e29e644f
|
diff --git a/activiti-engine/src/test/java/org/activiti/examples/bpmn/servicetask/ReverseStringsFieldInjected.java b/activiti-engine/src/test/java/org/activiti/examples/bpmn/servicetask/ReverseStringsFieldInjected.java
index <HASH>..<HASH> 100644
--- a/activiti-engine/src/test/java/org/activiti/examples/bpmn/servicetask/ReverseStringsFieldInjected.java
+++ b/activiti-engine/src/test/java/org/activiti/examples/bpmn/servicetask/ReverseStringsFieldInjected.java
@@ -17,7 +17,7 @@ import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.impl.el.Expression;
/**
- * Example BpmnJavaDelegation that uses an injected
+ * Example JavaDelegation that uses an injected
* {@link Expression}s in fields 'text1' and 'text2'. While executing, 'var1' is set with the reversed result of the
* method invocation and 'var2' will be the reversed result of the value expression.
*
|
ACT-<I> Transforming BpmnJavaDelegation class into JavaDelegation interface. and moved other unused pvm interfaces to impl internal
|
camunda_camunda-bpm-platform
|
train
|
java
|
f027e5204a52cad877f07519f668b9306f3a838e
|
diff --git a/polyglot/__main__.py b/polyglot/__main__.py
index <HASH>..<HASH> 100755
--- a/polyglot/__main__.py
+++ b/polyglot/__main__.py
@@ -6,7 +6,10 @@ import sys
from io import open
from argparse import ArgumentParser, FileType
from collections import Counter
-from signal import signal, SIGPIPE, SIG_DFL
+if sys.platform == 'win32':
+ from signal import signal, SIGABRT, SIG_DFL
+else:
+ from signal import signal, SIGPIPE, SIG_DFL
import logging
import six
@@ -25,7 +28,10 @@ from polyglot.tokenize import SentenceTokenizer, WordTokenizer
from polyglot.transliteration import Transliterator
from polyglot.utils import _print
-signal(SIGPIPE, SIG_DFL)
+if sys.platform == 'win32':
+ signal(SIGABRT, SIG_DFL)
+else:
+ signal(SIGPIPE, SIG_DFL)
logger = logging.getLogger(__name__)
LOGFORMAT = "%(asctime).19s %(levelname)s %(filename)s: %(lineno)s %(message)s"
|
Resolve SIGPIPE issue on Windows
|
aboSamoor_polyglot
|
train
|
py
|
8c37d5ed1fb633d32ec86a6c7db0724d135abac7
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ import setuptools.command.develop
import setuptools.command.build_py
setup_py_dir = os.path.dirname(os.path.realpath(__file__))
-version = "0.2.5" # ANTsPy version
+version = "0.2.6" # ANTsPy version
if "--weekly" in sys.argv:
sys.argv.remove("--weekly")
|
ENH: new tag
new n3
ants integrate velocity
documentation improvements
added parameters
local JLF
visualization plot
nibabel bug fix
time varying registration
various noise augmentation options
label overlap measures
bspline functions
deformation augmentation
landmark transformations
|
ANTsX_ANTsPy
|
train
|
py
|
9e93cfb0a51f30dd9a06bfe2519c7870ab3c025f
|
diff --git a/src/Pho/Lib/Graph/ClusterTrait.php b/src/Pho/Lib/Graph/ClusterTrait.php
index <HASH>..<HASH> 100644
--- a/src/Pho/Lib/Graph/ClusterTrait.php
+++ b/src/Pho/Lib/Graph/ClusterTrait.php
@@ -49,6 +49,14 @@ trait ClusterTrait {
return $node;
}
+ public function fromArray(array $node_ids): void
+ {
+ $this->node_ids = $node_ids;
+ if($this instanceof SubGraph) {
+ $this->context()->add($node);
+ }
+ }
+
/**
* A protected method that enables higher-level packages
* to extend the functionality of the add() call.
@@ -133,7 +141,9 @@ trait ClusterTrait {
*/
public function members(): array
{
- if(count($this->nodes)>0 || count($this->node_ids) == 0)
+ if(count($this->node_ids)<1)
+ return [];
+ else if(count($this->nodes) == count($this->node_ids))
return $this->nodes;
else
return $this->hydratedMembers();
|
added a fromArray function for the ClusterTrait
|
phonetworks_pho-lib-graph
|
train
|
php
|
bd79a7217fdc8f634a3e6bc82d748c58a0d84468
|
diff --git a/addon/comment/continuecomment.js b/addon/comment/continuecomment.js
index <HASH>..<HASH> 100644
--- a/addon/comment/continuecomment.js
+++ b/addon/comment/continuecomment.js
@@ -30,7 +30,7 @@
insert = full.slice(0, token.start);
if (!/^\s*$/.test(insert)) {
insert = "";
- for (var i = 0; i < token.start; ++i) insert += " ";
+ for (var j = 0; j < token.start; ++j) insert += " ";
}
} else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 &&
found + mode.blockCommentContinue.length > token.start &&
|
[continuecomment addon] Fix another reused loop variable
|
codemirror_CodeMirror
|
train
|
js
|
978b750297acf11d84b21b064d75b2df89cdb728
|
diff --git a/app/app.js b/app/app.js
index <HASH>..<HASH> 100755
--- a/app/app.js
+++ b/app/app.js
@@ -655,7 +655,7 @@ angular.module('spotmop', [
var track = getTrackTarget( event.target );
var isMenuItem = false;
- if( target.closest('.menu-item').length > 0 )
+ if( target && target.closest('.main-menu').length > 0 )
isMenuItem = true;
// if we have a target
@@ -795,9 +795,11 @@ angular.module('spotmop', [
$(document).find('.droppable').removeClass('dropping');
var isMenuItem = false;
- if( target.closest('.menu-item').length > 0 )
+ if( target && target.closest('.main-menu').length > 0 )
isMenuItem = true;
+ console.log( isMenuItem );
+
if( target && isMenuItem && target.attr('data-type') === 'queue' ){
dragTracer.addClass('good').html('Add to queue');
target.addClass('dropping');
|
Fixing draggable glitch from previous commit
|
jaedb_spotmop
|
train
|
js
|
5147a6c52b2c533f763a2a928e8447766534fae8
|
diff --git a/fullstop-plugins/fullstop-kontrolletti-plugin/src/main/java/org/zalando/stups/fullstop/plugin/kontrolletti/KontrollettiPlugin.java b/fullstop-plugins/fullstop-kontrolletti-plugin/src/main/java/org/zalando/stups/fullstop/plugin/kontrolletti/KontrollettiPlugin.java
index <HASH>..<HASH> 100644
--- a/fullstop-plugins/fullstop-kontrolletti-plugin/src/main/java/org/zalando/stups/fullstop/plugin/kontrolletti/KontrollettiPlugin.java
+++ b/fullstop-plugins/fullstop-kontrolletti-plugin/src/main/java/org/zalando/stups/fullstop/plugin/kontrolletti/KontrollettiPlugin.java
@@ -1,4 +1,5 @@
package org.zalando.stups.fullstop.plugin.kontrolletti;
public class KontrollettiPlugin {
+ //
}
|
#<I> some github issue
|
zalando-stups_fullstop
|
train
|
java
|
842279dce0546ccb8f57d14cc591257dc8f43565
|
diff --git a/www/_include.php b/www/_include.php
index <HASH>..<HASH> 100644
--- a/www/_include.php
+++ b/www/_include.php
@@ -22,6 +22,26 @@ if(get_magic_quotes_gpc()) {
/* Initialize the autoloader. */
require_once(dirname(dirname(__FILE__)) . '/lib/_autoload.php');
+/* Show error page on unhandled exceptions. */
+function SimpleSAML_exception_handler(Exception $exception) {
+ $e = new SimpleSAML_Error_Error('UNHANDLEDEXCEPTION', $exception);
+ $e->show();
+}
+set_exception_handler('SimpleSAML_exception_handler');
+
+/* Log full backtrace on errors and warnings. */
+function SimpleSAML_error_handler($errno, $errstr, $errfile = NULL, $errline = 0, $errcontext = NULL) {
+
+ /* Show an error with a full backtrace. */
+ $e = new SimpleSAML_Error_Exception('Error ' . $errno . ' - ' . $errstr);
+ $e->logError();
+
+ /* Resume normal error processing. */
+ return FALSE;
+}
+set_error_handler('SimpleSAML_error_handler');
+
+
$path_extra = dirname(dirname(__FILE__)) . '/lib';
|
_include.php: Improve handling of unhandled errors and exceptions.
This patch adds an exception handler which will catch all unhandled
exceptions and display an error page to the user. It also adds a
handler for PHP errors and warnings. This handler will show a stacktrace
of the error, and then pass the error to the normal PHP error handler.
|
simplesamlphp_saml2
|
train
|
php
|
b406e71f1fa529fc2c3468ad479bd199f5e2ad76
|
diff --git a/Tests/CompareTest.php b/Tests/CompareTest.php
index <HASH>..<HASH> 100644
--- a/Tests/CompareTest.php
+++ b/Tests/CompareTest.php
@@ -99,6 +99,20 @@ class CompareTest extends TestCase
$this->assertVersionBiggerThan('2.0.2', '0.0.4');
$this->assertVersionBiggerThan('1.2.3', '1.2.2');
$this->assertVersionBiggerThan('0.0.1', '0.0.0');
+
+ // Check that versions that are equal are not bigger/smaller
+ $this->assertFalse(
+ Compare::greaterThan(
+ parser::parse('4.0.0'),
+ parser::parse('4.0.0')
+ )
+ );
+ $this->assertFalse(
+ Compare::smallerThan(
+ parser::parse('4.0.0'),
+ parser::parse('4.0.0')
+ )
+ );
}
/**
|
adding test for greater/smaller of equal versions
as per <URL>
|
naneau_semver
|
train
|
php
|
854da1642d7b7fc97284485da6e0272b51065ccd
|
diff --git a/packages/@uppy/companion/src/server/Uploader.js b/packages/@uppy/companion/src/server/Uploader.js
index <HASH>..<HASH> 100644
--- a/packages/@uppy/companion/src/server/Uploader.js
+++ b/packages/@uppy/companion/src/server/Uploader.js
@@ -388,8 +388,12 @@ class Uploader {
}
if (response.statusCode >= 400) {
- logger.error(`upload failed with status: ${response.statusCode}`, 'upload.multipar.error')
+ logger.error(`upload failed with status: ${response.statusCode}`, 'upload.multipart.error')
this.emitError(new Error(response.statusMessage), respObj)
+ } else if (bytesUploaded !== this.bytesWritten && bytesUploaded !== this.options.size) {
+ const errMsg = `uploaded only ${bytesUploaded} of ${this.bytesWritten} with status: ${response.statusCode}`
+ logger.error(errMsg, 'upload.multipart.mismatch.error')
+ this.emitError(new Error(errMsg))
} else {
this.emitSuccess(null, { response: respObj })
}
|
companion: detect bytes upload mismatch for multipart uploads (#<I>)
|
transloadit_uppy
|
train
|
js
|
2ad4cdabd18f6d39ca1782c000a86429aa395578
|
diff --git a/lib/actions.js b/lib/actions.js
index <HASH>..<HASH> 100644
--- a/lib/actions.js
+++ b/lib/actions.js
@@ -69,7 +69,7 @@ yate.walk = function(ast, filename) {
// 0. Каждой ноде выставляется поле parent,
// кроме того, создается (или наследуются от parent'а) scope.
/// console.time('walk.parents');
- ast.setParents();
+ ast.w_setParents();
/// console.timeEnd('walk.parents');
/// console.time('walk.scope');
|
setParents -> w_setParents
|
pasaran_yate
|
train
|
js
|
e2b17e3a8b534998ea586ca27856a21918370811
|
diff --git a/Classes/Ttree/ContentRepositoryImporter/Aspect/EventLogAspect.php b/Classes/Ttree/ContentRepositoryImporter/Aspect/EventLogAspect.php
index <HASH>..<HASH> 100644
--- a/Classes/Ttree/ContentRepositoryImporter/Aspect/EventLogAspect.php
+++ b/Classes/Ttree/ContentRepositoryImporter/Aspect/EventLogAspect.php
@@ -10,6 +10,7 @@ use Ttree\ContentRepositoryImporter\Importer\ImporterInterface;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\AOP\JoinPointInterface;
use TYPO3\Flow\Utility\Arrays;
+use TYPO3\TYPO3CR\Domain\Repository\NodeDataRepository;
/**
* Aspect to automatically handle EventLog in Importer object
@@ -25,6 +26,12 @@ class EventLogAspect {
protected $importService;
/**
+ * @Flow\Inject
+ * @var NodeDataRepository
+ */
+ protected $nodeDataRepository;
+
+ /**
* Add batch started event
*
* @Flow\Before("within(Ttree\ContentRepositoryImporter\Importer\ImporterInterface) && method(.*->process())")
@@ -81,6 +88,7 @@ class EventLogAspect {
*/
public function flushEvents(JoinPointInterface $joinPoint) {
$this->importService->persisteEntities();
+ $this->nodeDataRepository->persistEntities();
}
/**
|
[TASK] Force persisting of NodeData after each processRecord call
|
ttreeagency_ContentRepositoryImporter
|
train
|
php
|
5b1b1e1898a055c48bdeb7d46b2b84b6c8d979f5
|
diff --git a/lib/searchkick/query.rb b/lib/searchkick/query.rb
index <HASH>..<HASH> 100644
--- a/lib/searchkick/query.rb
+++ b/lib/searchkick/query.rb
@@ -363,7 +363,9 @@ module Searchkick
queries.concat(queries_to_add)
- set_exclude(must_not, exclude_field, exclude_analyzer) if options[:exclude]
+ if options[:exclude]
+ must_not.concat(set_exclude(exclude_field, exclude_analyzer))
+ end
end
payload = {
@@ -372,7 +374,7 @@ module Searchkick
}
}
- set_conversions(should)
+ should.concat(set_conversions)
query = payload
end
@@ -514,11 +516,11 @@ module Searchkick
[boost_fields, fields]
end
- def set_conversions(should)
+ def set_conversions
conversions_fields = Array(options[:conversions] || searchkick_options[:conversions]).map(&:to_s)
if conversions_fields.present? && options[:conversions] != false
- conversions_fields.each do |conversions_field|
- should << {
+ conversions_fields.map do |conversions_field|
+ {
nested: {
path: conversions_field,
score_mode: "sum",
@@ -538,12 +540,14 @@ module Searchkick
}
}
end
+ else
+ []
end
end
- def set_exclude(must_not, field, analyzer)
+ def set_exclude(field, analyzer)
Array(options[:exclude]).map do |phrase|
- must_not << {
+ {
multi_match: {
fields: [field],
query: phrase,
|
Cleaner code (sort of) [skip ci]
|
ankane_searchkick
|
train
|
rb
|
95714929065537f597709e0c5ec81ab59c963197
|
diff --git a/librosa/onset.py b/librosa/onset.py
index <HASH>..<HASH> 100644
--- a/librosa/onset.py
+++ b/librosa/onset.py
@@ -226,12 +226,12 @@ def onset_strength(y=None, sr=22050, S=None, detrend=False, centering=True,
... label='Median aggregation (custom mel)')
- Log-frequency spectrogram instead of Mel
+ Constant-Q spectrogram instead of Mel
>>> onset_env = librosa.onset.onset_strength(y=y, sr=sr,
- ... feature=librosa.feature.logfsgram)
+ ... feature=librosa.cqt)
>>> plt.plot(onset_env / onset_env.max(), alpha=0.8,
- ... label='Mean aggregation (logfs)')
+ ... label='Mean aggregation (CQT)')
>>> plt.legend(frameon=True, framealpha=0.75)
>>> librosa.display.time_ticks(librosa.frames_to_time(np.arange(len(onset_env))))
|
changed onset strength example code to remove deprecated functions
|
librosa_librosa
|
train
|
py
|
5979e32dc3031d87cb8beb27d631b0b8b22cdf77
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -654,6 +654,10 @@ module.exports = class Applesign {
if (have.iPad.length > 0) {
df.push(2);
}
+ if (have.AppleWatch.length > 0 || have.AppleTV.length > 0) {
+ this.emit('message', 'Apple{TV/Watch} apps do not require to be re-familied');
+ return false;
+ }
if (df.length === 0) {
this.emit('message', 'UIDeviceFamily forced to iPhone/iPod');
df.push(1);
@@ -796,7 +800,7 @@ function supportedDevices (data) {
const df = data.UIDeviceFamily;
if (Array.isArray(df)) {
df.forEach(family => {
- const families = ['Any', 'iPhone', 'iPad', 'AppleTV', 'iWatch'];
+ const families = ['Any', 'iPhone', 'iPad', 'AppleTV', 'AppleWatch'];
const fam = families[family];
if (fam) {
have[fam].push(fam);
|
Fix -f for apple watch and apple tv apps
|
nowsecure_node-applesign
|
train
|
js
|
be6001fdad0ac978c10d0f94dcd60a0fd139cc12
|
diff --git a/src/Util/Time.php b/src/Util/Time.php
index <HASH>..<HASH> 100644
--- a/src/Util/Time.php
+++ b/src/Util/Time.php
@@ -23,8 +23,10 @@ class Time
*
* @param float $seconds
*/
- public static function sleep(float $seconds)
+ public static function sleep($seconds)
{
+ $seconds = (float) $seconds;
+
if ($seconds > 0) {
usleep($seconds * 1000000);
}
|
Optimized Util/Time class
|
ansas_php-component
|
train
|
php
|
e47140504670f86674347efa94d20b9bae0bd3d2
|
diff --git a/src/Driver/DrushTrait.php b/src/Driver/DrushTrait.php
index <HASH>..<HASH> 100644
--- a/src/Driver/DrushTrait.php
+++ b/src/Driver/DrushTrait.php
@@ -28,7 +28,7 @@ trait DrushTrait {
$output = $this->runCommand($method, $args);
}
catch (ProcessFailedException $e) {
- $this->sandbox()->logger()->warning($e->getProcess()->getOutput());
+ $this->sandbox()->logger()->info($e->getProcess()->getOutput());
throw new DrushFormatException("Drush command failed.", $e->getProcess()->getOutput());
}
|
Downgrade log message to info to prevent conflict with progress bar
|
drutiny_drutiny
|
train
|
php
|
40528c351af8ebe22e0cdd8d9363e63cbbea9ae3
|
diff --git a/tournaments/tournaments.go b/tournaments/tournaments.go
index <HASH>..<HASH> 100644
--- a/tournaments/tournaments.go
+++ b/tournaments/tournaments.go
@@ -118,9 +118,13 @@ func validateTournamentInfo(info Info) error {
}
func fixupTournamentInfo(oldinfo *Info, newinfo Info) {
- if oldinfo.Scheduled != newinfo.Scheduled {
+ if !newinfo.Scheduled.IsZero() && oldinfo.Scheduled != newinfo.Scheduled {
oldinfo.Scheduled = newinfo.Scheduled
}
+ if !newinfo.MovedFrom.IsZero() && oldinfo.MovedFrom != newinfo.MovedFrom {
+ oldinfo.MovedFrom = newinfo.MovedFrom
+ }
+
}
// Create a Tournament
|
Fix bug where update of tournament info could reset datetime.
|
ckpt_backend-services
|
train
|
go
|
b91866f2e1ca17b8c62938596003b57faaac7f51
|
diff --git a/app/assets/javascripts/jquery.pwdcalc.js b/app/assets/javascripts/jquery.pwdcalc.js
index <HASH>..<HASH> 100644
--- a/app/assets/javascripts/jquery.pwdcalc.js
+++ b/app/assets/javascripts/jquery.pwdcalc.js
@@ -90,7 +90,7 @@ https://github.com/trimentor/pwdcalc/blob/master/LICENSE
})();
- $(function() {
+ $(document).on('ready page:load', function () {
return $(".pwdcalc-form-group").each(function() {
return new Pwdcalc(this);
});
|
Support Turbolinks-enabled projects
|
trimentor_pwdcalc
|
train
|
js
|
42aeb504df7c0a7ed258d56dc1eae09942abc9d6
|
diff --git a/samples/helloworld-wc/src/main/java/org/ops4j/pax/web/samples/helloworld/wc/internal/Activator.java b/samples/helloworld-wc/src/main/java/org/ops4j/pax/web/samples/helloworld/wc/internal/Activator.java
index <HASH>..<HASH> 100644
--- a/samples/helloworld-wc/src/main/java/org/ops4j/pax/web/samples/helloworld/wc/internal/Activator.java
+++ b/samples/helloworld-wc/src/main/java/org/ops4j/pax/web/samples/helloworld/wc/internal/Activator.java
@@ -134,7 +134,7 @@ public final class Activator implements BundleActivator {
httpContext);
// register a welcome file
webContainer.registerWelcomeFiles(
- new String[]{"index.html"}, true, httpContext);
+ new String[]{"/html/index.html"}, true, httpContext);
errorServlet = new HelloWorldErrorServlet();
webContainer.registerServlet(errorServlet, // registered
// servlet
|
[PAXWEB-<I>] - Strange handling of welcome files
corrected the path for the welcome file
|
ops4j_org.ops4j.pax.web
|
train
|
java
|
49b998cd88ca706d258f49af5e6e46c598eb2073
|
diff --git a/lib/multirepo/commands/merge-command.rb b/lib/multirepo/commands/merge-command.rb
index <HASH>..<HASH> 100644
--- a/lib/multirepo/commands/merge-command.rb
+++ b/lib/multirepo/commands/merge-command.rb
@@ -50,6 +50,7 @@ module MultiRepo
rescue MultiRepoException => e
# Revert to the initial revision only if necessary
unless main_repo.current_branch == initial_revision || main_repo.head_hash == initial_revision
+ Console.log_substep("Restoring working copy to #{initial_revision}")
main_repo.checkout(initial_revision)
end
raise e
@@ -142,7 +143,7 @@ module MultiRepo
when RevisionSelectionMode::AS_LOCK
"merge specific commits as stored in the lock file for main repo revision #{ref}"
when RevisionSelectionMode::LATEST
- "merge each branch as stored in the lock file for main repo revision #{ref}"
+ "merge each branch as stored in the lock file of main repo revision #{ref}"
when RevisionSelectionMode::EXACT
"merge #{ref} for each repository, ignoring the contents of the lock file"
end
|
Added logging on checkout revert.
|
fortinmike_git-multirepo
|
train
|
rb
|
5d3c671d99d06b549d0e8edde3f863438170c11b
|
diff --git a/autofit/aggregator/phase_output.py b/autofit/aggregator/phase_output.py
index <HASH>..<HASH> 100644
--- a/autofit/aggregator/phase_output.py
+++ b/autofit/aggregator/phase_output.py
@@ -71,6 +71,26 @@ class PhaseOutput:
return pickle.load(f)
@property
+ def meta_dataset(self):
+ """
+ A pickled mask object
+ """
+ with open(
+ os.path.join(self.directory, "meta_dataset.pickle"), "rb"
+ ) as f:
+ return pickle.load(f)
+
+ @property
+ def phase_attributes(self):
+ """
+ A pickled mask object
+ """
+ with open(
+ os.path.join(self.directory, "phase_attributes.pickle"), "rb"
+ ) as f:
+ return pickle.load(f)
+
+ @property
def header(self) -> str:
"""
A header created by joining the pipeline, phase and dataset names
|
resrtored losst agg methods
|
rhayes777_PyAutoFit
|
train
|
py
|
20a3eb5d01c6383f8f73b3a68e0de0c49967113c
|
diff --git a/src/main/java/com/aquaticinformatics/aquarius/sdk/helpers/MultipartBuilder.java b/src/main/java/com/aquaticinformatics/aquarius/sdk/helpers/MultipartBuilder.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/aquaticinformatics/aquarius/sdk/helpers/MultipartBuilder.java
+++ b/src/main/java/com/aquaticinformatics/aquarius/sdk/helpers/MultipartBuilder.java
@@ -38,6 +38,8 @@ public class MultipartBuilder {
} catch (IOException e) {
throw new RuntimeException(e);
}
+
+ writeLine("");
}
private void writeFieldBoundary() {
|
PF-<I> End the file-stream content with a blank line
|
AquaticInformatics_aquarius-sdk-java
|
train
|
java
|
5f1fed4906c533a6b8d9dc564ce0b5d8bd87fb44
|
diff --git a/service_windows.go b/service_windows.go
index <HASH>..<HASH> 100644
--- a/service_windows.go
+++ b/service_windows.go
@@ -34,6 +34,8 @@ const (
OnFailureNoAction = "noaction"
OnFailureDelayDuration = "OnFailureDelayDuration"
OnFailureResetPeriod = "OnFailureResetPeriod"
+
+ errnoServiceDoesNotExist syscall.Errno = 1060
)
type windowsService struct {
@@ -361,7 +363,7 @@ func (ws *windowsService) Status() (Status, error) {
s, err := m.OpenService(ws.Name)
if err != nil {
- if err.Error() == "The specified service does not exist as an installed service." {
+ if errno, ok := err.(syscall.Errno); ok && errno == errnoServiceDoesNotExist {
return StatusUnknown, ErrNotInstalled
}
return StatusUnknown, err
|
patch the error text to check a syscall number instead (#<I>)
|
kardianos_service
|
train
|
go
|
66f703e6368a7c822383ebc34c64626eff2499ca
|
diff --git a/test/transacting/transacting_test.go b/test/transacting/transacting_test.go
index <HASH>..<HASH> 100644
--- a/test/transacting/transacting_test.go
+++ b/test/transacting/transacting_test.go
@@ -100,7 +100,8 @@ func (this *TxSuite) TearDownSuite() {
// TODO less duplication.
func (this *TxSuite) Test_A0_Tx_Create() {
input := getCreateInput([64]byte(this.testData.ChainData.PrivValidator.PrivKey))
- resp := this.postJson("/unsafe/txpool", input)
+ // FIXME: fails for ?hold=true
+ resp := this.postJson("/unsafe/txpool?hold=false", input)
bts, err := ioutil.ReadAll(resp.Body)
if err != nil {
panic(err)
|
leave explicit FIXME in test file
|
hyperledger_burrow
|
train
|
go
|
835d67116e0d10a22f80f30d78bae98a28df9e3a
|
diff --git a/__pkginfo__.py b/__pkginfo__.py
index <HASH>..<HASH> 100644
--- a/__pkginfo__.py
+++ b/__pkginfo__.py
@@ -23,7 +23,7 @@
import sys
-decompiler = "uncompyle6 >= 3.7.4"
+decompiler = "uncompyle6 >= 3.8.0"
SYS_VERSION = sys.version_info[0:2]
if SYS_VERSION <= (3, 2):
@@ -31,7 +31,7 @@ if SYS_VERSION <= (3, 2):
else:
pygments_version = ">= 2.2.0"
if (3, 7) <= SYS_VERSION < (3, 9):
- decompiler = "decompyle3 >= 3.7.6"
+ decompiler = "decompyle3 >= 3.7.7"
# Python-version | package | last-version |
|
Use recently released uncompyle6/decompile6
|
rocky_python3-trepan
|
train
|
py
|
f5e9b899c54768f269cd21e44eb0ecc5b04adfd5
|
diff --git a/src/Watcher.php b/src/Watcher.php
index <HASH>..<HASH> 100644
--- a/src/Watcher.php
+++ b/src/Watcher.php
@@ -50,8 +50,10 @@ class Watcher implements WatcherContract
*/
protected function init()
{
- $this->process = new Process(function ($process) {
- $process->exec(...$this->command->getCommand());
+ $command = $this->command->getCommand();
+
+ $this->process = new Process(function ($process) use ($command) {
+ $process->exec(...$command);
swoole_event_add($process->pipe, function () use ($process) {
$outputs = $process->read();
|
Create command params before new process
|
huang-yi_swoole-watcher
|
train
|
php
|
5d2fa5ef6fbdfa90163bd42c7b0f7bf6d0116543
|
diff --git a/tests/integration/states/test_user.py b/tests/integration/states/test_user.py
index <HASH>..<HASH> 100644
--- a/tests/integration/states/test_user.py
+++ b/tests/integration/states/test_user.py
@@ -5,7 +5,6 @@ user present
user present with custom homedir
"""
-
import os
import sys
from random import randint
|
Drop Py2 and six on tests/integration/states/test_user.py
|
saltstack_salt
|
train
|
py
|
1e48dd2de87679cf068a3fee2b9314340d709795
|
diff --git a/content_obj.go b/content_obj.go
index <HASH>..<HASH> 100644
--- a/content_obj.go
+++ b/content_obj.go
@@ -124,11 +124,13 @@ func (me *ContentObj) AppendStreamSetLineWidth(w float64) {
// Set the grayscale fills
func (me *ContentObj) AppendStreamSetGrayFill(w float64) {
+ w = fixRange10(w)
me.stream.WriteString(fmt.Sprintf("%.2f g\n", w))
}
// Set the grayscale stroke
func (me *ContentObj) AppendStreamSetGrayStroke(w float64) {
+ w = fixRange10(w)
me.stream.WriteString(fmt.Sprintf("%.2f G\n", w))
}
@@ -142,3 +144,16 @@ func (me *ContentObj) AppendStreamImage(index int, x float64, y float64, rect *R
func ContentObj_CalTextHeight(fontsize int) float64 {
return (float64(fontsize) * 0.7)
}
+
+// When setting colour and grayscales the value has to be between 0.00 and 1.00
+// This function takes a float64 and returns 0.0 if it is less than 0.0 and 1.0 if it
+// is more than 1.0
+func fixRange10(val float64) float64 {
+ if val < 0.0 {
+ return 0.0
+ }
+ if val > 1.0 {
+ return 1.0
+ }
+ return val
+}
|
Added a func, fixRange<I>, to content_obj.go to ensure the number passed to the stream.WriteString is between <I> and <I>
|
signintech_gopdf
|
train
|
go
|
85b0504cd2e04cbaf06fad5f3885165ddd174dc8
|
diff --git a/selendroid-server/src/main/java/io/selendroid/server/model/js/AndroidAtoms.java b/selendroid-server/src/main/java/io/selendroid/server/model/js/AndroidAtoms.java
index <HASH>..<HASH> 100644
--- a/selendroid-server/src/main/java/io/selendroid/server/model/js/AndroidAtoms.java
+++ b/selendroid-server/src/main/java/io/selendroid/server/model/js/AndroidAtoms.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.openqa.selenium.android.library;
+package io.selendroid.server.model.js;
/**
* The WebDriver atoms are used to ensure consistent behaviour cross-browser.
|
forgot to update the package of the Atoms on the last update
|
selendroid_selendroid
|
train
|
java
|
0333453e9d0541aa18a3882daf993367f508899c
|
diff --git a/NEWS b/NEWS
index <HASH>..<HASH> 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+trepan 0.7.0 2016-10-09
+
+- Remove namespace packages. These no longer work in Python3
+- expresssion and highlight changes
+ * show display expression after setting it
+ * clear source-code cache after setting highlight
+
trepan 0.6.5 2016-07-26
- PyPy tolerance
diff --git a/__pkginfo__.py b/__pkginfo__.py
index <HASH>..<HASH> 100644
--- a/__pkginfo__.py
+++ b/__pkginfo__.py
@@ -40,7 +40,7 @@ ftp_url = None
install_requires = ['columnize >= 0.3.8',
'pyficache >= 0.3.0',
'pygments >= 2.0.2',
- 'uncompyle6 >= 2.7.1',
+ 'uncompyle6 >= 2.8.4',
'tracer >= 0.3.2']
license = 'GPL'
mailing_list = '[email protected]'
diff --git a/trepan/version.py b/trepan/version.py
index <HASH>..<HASH> 100644
--- a/trepan/version.py
+++ b/trepan/version.py
@@ -4,4 +4,4 @@
# This file should define a variable VERSION which we use as the
# debugger version number.
-VERSION='0.6.5'
+VERSION='0.7.0'
|
Get ready for release <I>
|
rocky_python3-trepan
|
train
|
NEWS,py,py
|
cfe6ac6fcefea350e7d2c21425d6da7d964c491c
|
diff --git a/src/SDK/Keys/Models/UserData.php b/src/SDK/Keys/Models/UserData.php
index <HASH>..<HASH> 100755
--- a/src/SDK/Keys/Models/UserData.php
+++ b/src/SDK/Keys/Models/UserData.php
@@ -18,15 +18,15 @@ class UserData extends Model {
if(!empty($data)) {
if(isset($data['id']['account_id'])) {
- $this->id->account_id = $data['id']['account_id'];
+ $this->id->accountIid = $data['id']['account_id'];
}
if(isset($data['id']['public_key_id'])) {
- $this->id->public_key_id = $data['id']['public_key_id'];
+ $this->id->publicKeyId = $data['id']['public_key_id'];
}
if(isset($data['id']['user_data_id'])) {
- $this->id->user_data_id = $data['id']['user_data_id'];
+ $this->id->userDataId = $data['id']['user_data_id'];
}
foreach($data as $field => $value) {
|
*use camel case for internal class variables
|
VirgilSecurity_virgil-sdk-php
|
train
|
php
|
dc17f3488530a07b89cf1103e1feda0fd3927939
|
diff --git a/test/augmenters/test_meta.py b/test/augmenters/test_meta.py
index <HASH>..<HASH> 100644
--- a/test/augmenters/test_meta.py
+++ b/test/augmenters/test_meta.py
@@ -4077,6 +4077,10 @@ def test_WithChannels():
assert kpsoi_aug.shape == (5, 6, 3)
assert keypoints_equal([kpsoi_aug], [kpsoi_x])
+ kpsoi_aug = aug.augment_keypoints(ia.KeypointsOnImage([], shape=(5, 6, 3)))
+ assert len(kpsoi_aug.keypoints) == 0
+ assert kpsoi_aug.shape == (5, 6, 3)
+
# test polygon aug
psoi = ia.PolygonsOnImage(
[ia.Polygon([(0, 0), (3, 0), (3, 3), (0, 3)])],
@@ -4103,6 +4107,10 @@ def test_WithChannels():
assert psoi_aug.polygons[0].exterior_almost_equals(psoi_x.polygons[0])
assert psoi_aug.polygons[0].is_valid
+ psoi_aug = aug.augment_polygons(ia.PolygonsOnImage([], shape=(5, 6, 3)))
+ assert len(psoi_aug.polygons) == 0
+ assert psoi_aug.shape == (5, 6, 3)
+
# invalid datatype for channels
got_exception = False
try:
|
Add tests for empty keypoints/polys in WithChannels
|
aleju_imgaug
|
train
|
py
|
283c5ff72f0100e96d327ecf323edf4166c1decb
|
diff --git a/pyiso.py b/pyiso.py
index <HASH>..<HASH> 100644
--- a/pyiso.py
+++ b/pyiso.py
@@ -401,10 +401,10 @@ class DirectoryRecord(object):
# Bit 5 - Reserved
# Bit 6 - Reserved
# Bit 7 - Multi-extent - 0 for final directory record, 1 for not final directory record
- # FIXME: for now, we just assume that this is a file that exists,
- # is a file, is not associated, does not have additional record,
- # has now owner and group, and is not multi-extent (so 0 for all of
- # the bits). We probably want to allow these in the future.
+ # FIXME: for now, we just assume that this is a file/dir that exists,
+ # is not associated, does not have an additional record, has no owner
+ # and group, and is not multi-extent. We probably want to allow these
+ # bits to be set in the future.
self.file_flags = 0
if self.isdir:
self.file_flags |= (1 << self.FILE_FLAG_DIRECTORY_BIT)
|
Cleanup a FIXME comment.
|
clalancette_pycdlib
|
train
|
py
|
dcff407df739ca25a1d529d17630acea057b0d8b
|
diff --git a/bitshares/account.py b/bitshares/account.py
index <HASH>..<HASH> 100644
--- a/bitshares/account.py
+++ b/bitshares/account.py
@@ -12,7 +12,6 @@ class Account(dict):
bitshares_instance=None
):
self.cached = False
- self.name = account.strip().lower()
self.full = full
if not bitshares_instance:
@@ -23,9 +22,12 @@ class Account(dict):
super(Account, self).__init__(account)
self.name = account["name"]
self.cached = True
-
- if not lazy and not self.cached:
- self.refresh()
+ elif isinstance(account, str):
+ self.name = account.strip().lower()
+ if not lazy:
+ self.refresh()
+ else:
+ raise ValueError("Account() expects an account name, id or an instance of Account")
def refresh(self):
account = self.bitshares.rpc.get_account(self.name)
|
[account] Allow to properly use Account objects in __init__()
|
bitshares_python-bitshares
|
train
|
py
|
ba506bca73aeb88eb909da6559c602f9560dbee9
|
diff --git a/src/main/java/org/jbpm/designer/bpmn2/impl/Bpmn2JsonUnmarshaller.java b/src/main/java/org/jbpm/designer/bpmn2/impl/Bpmn2JsonUnmarshaller.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jbpm/designer/bpmn2/impl/Bpmn2JsonUnmarshaller.java
+++ b/src/main/java/org/jbpm/designer/bpmn2/impl/Bpmn2JsonUnmarshaller.java
@@ -1879,7 +1879,8 @@ public class Bpmn2JsonUnmarshaller {
rootLevelProcess.getArtifacts().add((Artifact) child);
} else if (child instanceof DataObject) {
// bubble up data objects
- rootLevelProcess.getFlowElements().add(0, (DataObject) child);
+ //rootLevelProcess.getFlowElements().add(0, (DataObject) child);
+ rootLevelProcess.getFlowElements().add((DataObject) child);
// ItemDefinition def = ((DataObject) child).getItemSubjectRef();
// if (def != null) {
// if (def.eResource() == null) {
|
Don't put data objects as first elements in the process
|
kiegroup_jbpm-designer
|
train
|
java
|
c63eb657064169d4232b3d2c93e3b2b868631dd5
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,7 @@ setup(
'schema>=0.4.0,<0.6.0',
'backports.csv',
] + (['total-ordering'] if sys.version_info < (2, 7) else []),
- classifiers=(
+ classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
@@ -53,5 +53,5 @@ setup(
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
- )
+ ]
)
|
Added py3 support to classifiers in setup.py.
|
jjjake_internetarchive
|
train
|
py
|
1adff0f057992cccfa68bd558b98c083b1ad18b4
|
diff --git a/py/doc/confrest.py b/py/doc/confrest.py
index <HASH>..<HASH> 100644
--- a/py/doc/confrest.py
+++ b/py/doc/confrest.py
@@ -4,7 +4,6 @@ from py.__.misc.difftime import worded_time
from py.__.doc.conftest import get_apigenpath, get_docpath
from py.__.apigen.linker import relpath
-mydir = py.magic.autopath().dirpath()
html = py.xml.html
class Page(object):
@@ -107,6 +106,7 @@ def getrealname(username):
class Project:
+ mydir = py.magic.autopath().dirpath()
# string for url, path for local file
stylesheet = mydir.join('style.css')
title = "py lib"
@@ -123,11 +123,14 @@ class Project:
def get_content(self, txtpath, encoding):
return unicode(txtpath.read(), encoding)
+ def get_docpath(self):
+ return get_docpath()
+
def process(self, txtpath):
encoding = self.encoding
content = self.get_content(txtpath, encoding)
- docpath = get_docpath()
- reloutputpath = txtpath.new(ext='.html').relto(mydir)
+ docpath = self.get_docpath()
+ reloutputpath = txtpath.new(ext='.html').relto(self.mydir)
outputpath = docpath.join(reloutputpath)
stylesheet = self.stylesheet
|
[svn r<I>] the target docpath needs to be determined per project
--HG--
branch : trunk
|
vmalloc_dessert
|
train
|
py
|
77bfa95fd60ec4c04bb7964dff9bcb31d6b7501e
|
diff --git a/packages/webdriver/src/request.js b/packages/webdriver/src/request.js
index <HASH>..<HASH> 100644
--- a/packages/webdriver/src/request.js
+++ b/packages/webdriver/src/request.js
@@ -98,10 +98,13 @@ export default class WebDriverRequest {
}
if (retryCount >= totalRetryCount) {
- // ToDo make proper request error
- return reject(new Error(err || body.value.error))
+ const error = new Error(err || body.value.error)
+ log.error('Request failed after retry due to', error)
+ return reject(error)
}
+ log.warn('Request failed due to', err.message)
+ log.info(`Retrying ${retryCount + 1}/${totalRetryCount}`)
this._request(fullRequestOptions, totalRetryCount, ++retryCount)
.then(resolve)
.catch(reject)
|
webdriver: more verbose logging when wd request errors out
|
webdriverio_webdriverio
|
train
|
js
|
d8b298b1aa6e3199296c0e918dfa32f9a658834a
|
diff --git a/lib/linters/id_selector.js b/lib/linters/id_selector.js
index <HASH>..<HASH> 100644
--- a/lib/linters/id_selector.js
+++ b/lib/linters/id_selector.js
@@ -18,13 +18,17 @@ module.exports = {
tree.each((selector) => {
selector.walkIds((id) => {
- if (excludes.indexOf(id.value) >= 0) {
+ if (excludes.indexOf(id.value) !== -1) {
return;
}
+ const position = node.positionBy({
+ word: id.toString()
+ });
+
results.push({
- column: node.source.start.column + id.source.start.column - 1,
- line: node.source.start.line + id.source.start.line - 1,
+ column: position.column,
+ line: position.line,
message: this.message
});
});
|
Refactor idSelector position reporting (#<I>)
|
lesshint_lesshint
|
train
|
js
|
3f29766b4809140019c62f0072a3453cf863da0f
|
diff --git a/src/Codeception/Test/Gherkin.php b/src/Codeception/Test/Gherkin.php
index <HASH>..<HASH> 100644
--- a/src/Codeception/Test/Gherkin.php
+++ b/src/Codeception/Test/Gherkin.php
@@ -63,7 +63,7 @@ class Gherkin extends Test implements ScenarioDriven
public function getSignature()
{
- return codecept_relative_path($this->getFileName());
+ return basename($this->getFileName(), '.feature') . ":" . $this->getFeature();
}
public function test()
diff --git a/tests/data/claypit/tests/_support/_generated/ScenarioGuyActions.php b/tests/data/claypit/tests/_support/_generated/ScenarioGuyActions.php
index <HASH>..<HASH> 100644
--- a/tests/data/claypit/tests/_support/_generated/ScenarioGuyActions.php
+++ b/tests/data/claypit/tests/_support/_generated/ScenarioGuyActions.php
@@ -1,4 +1,4 @@
-<?php //[STAMP] 708e717142dd3b37a520cb489679d954
+<?php //[STAMP] 448e253da1198f40ea9706332f5d57ab
namespace _generated;
// This class was automatically generated by build task
|
introduced unique signature to Gherkin format
|
Codeception_base
|
train
|
php,php
|
1a5c56c372ef286770e16919504dec7c9019c381
|
diff --git a/pymatgen/io/adf.py b/pymatgen/io/adf.py
index <HASH>..<HASH> 100644
--- a/pymatgen/io/adf.py
+++ b/pymatgen/io/adf.py
@@ -353,12 +353,6 @@ class AdfKey(MSONable):
d.update({"subkeys": subkeys})
return d
- def to_json(self):
- """
- Return a json string representation of the MSONable AdfKey object.
- """
- return super().to_json()
-
@classmethod
def from_dict(cls, d):
"""
@@ -614,12 +608,6 @@ class AdfTask(MSONable):
"others": [k.as_dict() for k in self.other_directives],
}
- def to_json(self):
- """
- Return a json string representation of the MSONable AdfTask object.
- """
- return super().to_json()
-
@classmethod
def from_dict(cls, d):
"""
@@ -969,7 +957,7 @@ class AdfOutput:
parse_mode = True
parse_freq = False
self.frequencies.extend(map(float, el))
- for i in range(nnext):
+ for _ in range(nnext):
self.normal_modes.append([])
elif parse_mode:
|
Remove redundant to_json methods.
|
materialsproject_pymatgen
|
train
|
py
|
fdcb9fae3e1b10dd1492608d136677f0899e8933
|
diff --git a/lib/rtsp-ffmpeg.js b/lib/rtsp-ffmpeg.js
index <HASH>..<HASH> 100644
--- a/lib/rtsp-ffmpeg.js
+++ b/lib/rtsp-ffmpeg.js
@@ -28,7 +28,7 @@ var FFMpeg = function(options) {
this.resolution = options.resolution;
this.quality = (options.quality === undefined || options.quality === "") ? 3 : options.quality;
this.arguments = options.arguments || [];
- this.buff = new Buffer(''); // Store the entire data image into this variable. This attribute is replaced each time a full image is received from the stream.
+ this.buff = Buffer.from(''); // Store the entire data image into this variable. This attribute is replaced each time a full image is received from the stream.
this.on('newListener', newListener.bind(this));
this.on('removeListener', removeListener.bind(this));
@@ -98,7 +98,7 @@ FFMpeg.prototype.start = function() {
if(offset == "ff" && offset2 == "d9") {
self.emit('data', self.buff);
- self.buff = new Buffer('');
+ self.buff = Buffer.from('');
}
}
});
|
Security patch of rtsp-ffmpeg.js
[DEP<I>] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
|
agsh_rtsp-ffmpeg
|
train
|
js
|
ebe3f023c4004cef103ee0a3bfaf0898cccd4766
|
diff --git a/test/test_models.py b/test/test_models.py
index <HASH>..<HASH> 100644
--- a/test/test_models.py
+++ b/test/test_models.py
@@ -71,6 +71,9 @@ script_test_models = {
"keypointrcnn_resnet50_fpn": {
'unwrapper': lambda x: x[1]
},
+ "retinanet_resnet50_fpn": {
+ 'unwrapper': lambda x: x[1]
+ }
}
diff --git a/torchvision/models/detection/retinanet.py b/torchvision/models/detection/retinanet.py
index <HASH>..<HASH> 100644
--- a/torchvision/models/detection/retinanet.py
+++ b/torchvision/models/detection/retinanet.py
@@ -565,7 +565,7 @@ class RetinaNet(nn.Module):
if not self._has_warned:
warnings.warn("RetinaNet always returns a (Losses, Detections) tuple in scripting")
self._has_warned = True
- return (losses, detections)
+ return losses, detections
return self.eager_outputs(losses, detections)
|
Added python model tests for retinanet <I> (#<I>)
|
pytorch_vision
|
train
|
py,py
|
d9523edc1f726f73a9ae5b39e15daac332aab2f9
|
diff --git a/pycoin/ecdsa/Group.py b/pycoin/ecdsa/Group.py
index <HASH>..<HASH> 100644
--- a/pycoin/ecdsa/Group.py
+++ b/pycoin/ecdsa/Group.py
@@ -53,6 +53,7 @@ class Group(Curve, Point):
for y in [beta, p - beta]:
# 1.4 the constructor checks that nR is at infinity
R = self.Point(x, y)
+ R.check_on_curve()
# 1.6 compute Q = r^-1 (sR - eG)
Q = inv_r * (s * R + minus_e * self)
# check that Q is the public key
|
Fix problem with possible_public_pairs_for_signature.
|
richardkiss_pycoin
|
train
|
py
|
79ad91e13658884a405a6bebe7b54b2a709717dc
|
diff --git a/libkbfs/interfaces.go b/libkbfs/interfaces.go
index <HASH>..<HASH> 100644
--- a/libkbfs/interfaces.go
+++ b/libkbfs/interfaces.go
@@ -124,11 +124,12 @@ type Node interface {
// GetBasename returns the current basename of the node, or ""
// if the node has been unlinked.
GetBasename() string
- // WrapChild returns a wrapped version of `child`, if desired, to
- // add custom behavior to the child node. If the Node instance
- // receiving this call is itself a wrapped node, it should call
- // `WrapChild(child)` on its internal wrapped node as well, in
- // case there are multiple wrapping layers available.
+ // WrapChild returns a wrapped version of child, if desired, to
+ // add custom behavior to the child node. An implementation that
+ // wraps another `Node` (`inner`) must first call
+ // `inner.WrapChild(child)` before performing its own wrapping
+ // operation, to ensure that all wrapping is preserved and that it
+ // happens in the correct order.
WrapChild(child Node) Node
// Unwrap returns the initial, unwrapped Node that was used to
// create this Node.
|
interfaces: update WrapChild comment with jzila's text
Issue: #<I>
|
keybase_client
|
train
|
go
|
6584391b1d4fcba597b21a6005aa538fba239266
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -30,7 +30,8 @@ class Sade {
!~cmd.indexOf('__') && usage.unshift(cmd); // re-include `cmd`
usage = usage.join(' '); // to string
- let config = { alias:{}, default:{} };
+ let obj = this.tree[ALL]; // stem from ALL, if avail
+ let config = obj ? $.clone(obj.config) : { alias:{}, default:{} };
this.tree[cmd] = { usage, options:[], config, examples:[] };
desc && this.describe(desc);
diff --git a/lib/utils.js b/lib/utils.js
index <HASH>..<HASH> 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -71,6 +71,10 @@ exports.help = function (bin, tree, key) {
return out;
}
+exports.clone = function (src) {
+ return JSON.parse( JSON.stringify(src) );
+}
+
exports.parse = function (str) {
return (str || '').replace(/-{1,2}/g, '').split(/,?\s+/);
}
|
clone & extend from ALL’s config;
- it has any global flags’ aliases & defaults
- TODO: restructure to avoid nested-objects?
~> Causes pointer reference during `Object.assign`, hence JSON.parse
|
lukeed_sade
|
train
|
js,js
|
27886ba171bdf88bc349703cd3842182f0d2ff38
|
diff --git a/exchangelib/__init__.py b/exchangelib/__init__.py
index <HASH>..<HASH> 100644
--- a/exchangelib/__init__.py
+++ b/exchangelib/__init__.py
@@ -1,12 +1,13 @@
-from .account import Account
-from .autodiscover import discover
-from .configuration import Configuration
-from .credentials import DELEGATE, IMPERSONATION, Credentials
-from .ewsdatetime import EWSDateTime, EWSTimeZone
-from .folders import CalendarItem, Contact, Message, Task, Mailbox, Attendee, Body, HTMLBody
-from .restriction import Q
-from .services import SHALLOW, DEEP
-from .transport import NTLM, DIGEST, BASIC
+# Add noqa on top-level convenience imports
+from .account import Account # noqa
+from .autodiscover import discover # noqa
+from .configuration import Configuration # noqa
+from .credentials import DELEGATE, IMPERSONATION, Credentials # noqa
+from .ewsdatetime import EWSDateTime, EWSTimeZone # noqa
+from .folders import CalendarItem, Contact, Message, Task, Mailbox, Attendee, Body, HTMLBody # noqa
+from .restriction import Q # noqa
+from .services import SHALLOW, DEEP # noqa
+from .transport import NTLM, DIGEST, BASIC # noqa
def close_connections():
|
Don't warn about unused imports in root
|
ecederstrand_exchangelib
|
train
|
py
|
5b3bb873ef4916de4f5e5a9e5996ea13e0ff89a5
|
diff --git a/lib/UnexpectedError.js b/lib/UnexpectedError.js
index <HASH>..<HASH> 100644
--- a/lib/UnexpectedError.js
+++ b/lib/UnexpectedError.js
@@ -6,6 +6,7 @@ var errorMethodBlacklist = ['message', 'line', 'sourceId', 'sourceURL', 'stack',
}, {});
function UnexpectedError(expect, assertion, parent) {
+ this.errorMode = (assertion && assertion.errorMode) || 'default';
var base = Error.call(this, '');
if (Error.captureStackTrace) {
@@ -122,20 +123,16 @@ UnexpectedError.prototype.getDiffMessage = function () {
};
UnexpectedError.prototype.getErrorMode = function () {
- var errorMode = this.errorMode ||
- (this.assertion && this.assertion.errorMode) ||
- 'default';
-
if (!this.parent) {
- switch (errorMode) {
+ switch (this.errorMode) {
case 'default':
case 'bubbleThrough':
- return errorMode;
+ return this.errorMode;
default:
return 'default';
}
} else {
- return errorMode;
+ return this.errorMode;
}
};
|
UnexpectedError: Capture the error mode of the assertion at creation time.
|
unexpectedjs_unexpected
|
train
|
js
|
cb4ff0ba6b8caeae86d800ad14e62b24858fe390
|
diff --git a/did/plugins/gerrit.py b/did/plugins/gerrit.py
index <HASH>..<HASH> 100644
--- a/did/plugins/gerrit.py
+++ b/did/plugins/gerrit.py
@@ -281,6 +281,7 @@ class AddedPatches(GerritUnit):
date = self.get_gerrit_date(chg['date'][:10])
comment_date = self.get_gerrit_date(chg['date'][:10])
if (owner == chg['author']['email'] and
+ chg['_revision_number'] > 1 and
comment_date >= self.since_date and
'uploaded patch' in chg['message'].lower()):
cmnts_by_user.append(chg)
|
Do not list first patch set among 'additional'
|
psss_did
|
train
|
py
|
f890565d617c248d834c47b8e2328def29245b98
|
diff --git a/cv/internal/run/impl/manager.go b/cv/internal/run/impl/manager.go
index <HASH>..<HASH> 100644
--- a/cv/internal/run/impl/manager.go
+++ b/cv/internal/run/impl/manager.go
@@ -30,6 +30,7 @@ import (
"go.chromium.org/luci/cv/internal/common"
"go.chromium.org/luci/cv/internal/common/bq"
"go.chromium.org/luci/cv/internal/common/eventbox"
+ "go.chromium.org/luci/cv/internal/common/lease"
"go.chromium.org/luci/cv/internal/common/tree"
"go.chromium.org/luci/cv/internal/gerrit/updater"
"go.chromium.org/luci/cv/internal/prjmanager"
@@ -75,6 +76,7 @@ func New(n *run.Notifier, pm *prjmanager.Notifier, u *updater.Updater, tc tree.C
return common.TQIfy{
KnownRetry: []error{
handler.ErrTransientSubmissionFailure,
+ lease.ErrConflict,
eventbox.ErrContention,
},
}.Error(ctx, err)
|
cv: add lease conflict to known retry
This does happen during concurrect task execution when both tasks try
to cancel the trigger of the same CL.
R=qyearsley, tandrii
Change-Id: I0bc<I>c3a<I>a<I>a8db<I>c2dcfdc<I>c<I>c<I>a3d
Reviewed-on: <URL>
|
luci_luci-go
|
train
|
go
|
45b931f0af612bc83004f0a7de4d10964ee1a108
|
diff --git a/openquake/baselib/parallel.py b/openquake/baselib/parallel.py
index <HASH>..<HASH> 100644
--- a/openquake/baselib/parallel.py
+++ b/openquake/baselib/parallel.py
@@ -657,8 +657,8 @@ class Starmap(object):
yield result_dict['result']
def _iter_celery_zmq(self):
- logging.info('Using receiver %s', self.receiver)
with Socket(self.receiver, zmq.PULL, 'bind') as socket:
+ logging.info('Using receiver %s', socket.backurl)
it = self._iter_celery(socket.backurl)
yield next(it) # number of results
isocket = iter(socket)
|
Better logging [skip CI]
|
gem_oq-engine
|
train
|
py
|
95d4bb214b414a592df3723ec50973a921a8fac7
|
diff --git a/lib/excon/response.rb b/lib/excon/response.rb
index <HASH>..<HASH> 100644
--- a/lib/excon/response.rb
+++ b/lib/excon/response.rb
@@ -1,5 +1,7 @@
module Excon
class Response
+ NO_ENTITY = [204, 205, 304].freeze
+
attr_accessor :body, :headers, :status
def initialize(attrs={})
@@ -24,7 +26,7 @@ module Excon
end
end
- unless (params[:method].to_s.casecmp('HEAD') == 0) || response.status == 204
+ unless (params[:method].to_s.casecmp('HEAD') == 0) || NO_ENTITY.include?(response.status)
# don't pass stuff into a block if there was an error
if params[:expects] && ![*params[:expects]].include?(response.status)
|
<I> and <I> are valid response codes that have no entity (body).
|
excon_excon
|
train
|
rb
|
083adb25ea45204bac771a5eb9dfa7b4accc54cd
|
diff --git a/tpot/_version.py b/tpot/_version.py
index <HASH>..<HASH> 100644
--- a/tpot/_version.py
+++ b/tpot/_version.py
@@ -23,4 +23,4 @@ License along with TPOT. If not, see <http://www.gnu.org/licenses/>.
"""
-__version__ = '0.11'
+__version__ = '0.11.0'
|
change version id to <I>
|
EpistasisLab_tpot
|
train
|
py
|
a59baab7fc5f6312b19b83656bf722702674bcc4
|
diff --git a/build/assembly/bin/assemble.rb b/build/assembly/bin/assemble.rb
index <HASH>..<HASH> 100755
--- a/build/assembly/bin/assemble.rb
+++ b/build/assembly/bin/assemble.rb
@@ -138,6 +138,7 @@ class Assembler
js_dir = FileUtils.mkdir_p( File.join( tool.torquebox_dir, 'share', 'javascript' ) )
FileUtils.cp( File.join( tool.src_dir, 'gems', 'rake-support', 'share', 'init', 'torquebox.conf' ), init_dir )
+ FileUtils.cp( File.join( tool.src_dir, 'gems', 'rake-support', 'share', 'init', 'torquebox.conf.erb' ), init_dir )
FileUtils.cp( File.join( tool.src_dir, 'gems', 'rake-support', 'share', 'init', 'TorqueBoxAgent.plist.template' ), init_dir )
FileUtils.cp( File.join( tool.src_dir, 'gems', 'rake-support', 'share', 'rails', 'template.rb' ), rails_dir )
FileUtils.cp( File.join( tool.src_dir, 'gems', 'rake-support', 'share', 'rails', 'openshift_app_builder.rb' ), rails_dir )
|
added the torquebox.conf.erb to the dist share dir for TORQUE-<I>
|
torquebox_torquebox
|
train
|
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.