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
|
---|---|---|---|---|---|
192a057da1a1f444645cd628fd6260bf6e471e1d
|
diff --git a/core/src/main/java/org/infinispan/configuration/parsing/Parser.java b/core/src/main/java/org/infinispan/configuration/parsing/Parser.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/infinispan/configuration/parsing/Parser.java
+++ b/core/src/main/java/org/infinispan/configuration/parsing/Parser.java
@@ -608,6 +608,9 @@ public class Parser {
else
builder.indexing().disable();
break;
+ case INDEX_LOCAL_ONLY:
+ builder.indexing().indexLocalOnly(Boolean.valueOf(value));
+ break;
default:
throw ParseUtils.unexpectedAttribute(reader, i);
}
|
ISPN-<I> Configuration parser: INDEX_LOCAL_ONLY is a valid attribute for the indexing element
|
infinispan_infinispan
|
train
|
java
|
164521a48510c586552443a4fd19bdcbbae3a1d0
|
diff --git a/core/src/main/java/com/github/srec/jemmy/JemmyDSL.java b/core/src/main/java/com/github/srec/jemmy/JemmyDSL.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/github/srec/jemmy/JemmyDSL.java
+++ b/core/src/main/java/com/github/srec/jemmy/JemmyDSL.java
@@ -520,6 +520,9 @@ public class JemmyDSL {
if (operator == null) {
throw new JemmyDSLException("Could not find component for clicking " + locator);
}
+ if (operator instanceof JButtonOperator) {
+ operator.requestFocus();
+ }
operator.clickMouse(operator.getCenterXForClick(),
operator.getCenterYForClick(),
count,
|
<I>: click operator requesting focus before the actual click
|
vtatai_srec
|
train
|
java
|
fcff4e741aba116891f918987b9b51ccfe2343a2
|
diff --git a/blimpy/stix.py b/blimpy/stix.py
index <HASH>..<HASH> 100644
--- a/blimpy/stix.py
+++ b/blimpy/stix.py
@@ -24,7 +24,19 @@ from blimpy.plotting import plot_waterfall
def image_stitch(orientation, chunk_count, png_collection, path_saved_png):
- r""" Stitch together multiple PNGs into one"""
+ r""" Stitch together multiple PNGs into one
+
+ Parameters
+ ----------
+ orientation : str
+ Assembling images horizontally (h) or vertically (v)?
+ chunk_count : int
+ Number of chunks in the file.
+ png_collection : list
+ The set of PNG file paths whose images are to be stitched together.
+ path_saved_png : str
+ The path of where to save the final PNG file.
+ """
logger.info("Stitching together the images, orientation is {}".format(orientation))
@@ -101,6 +113,14 @@ def make_waterfall_plots(input_file, chunk_count, plot_dir, width, height, dpi,
The number of chunks to divide the entire bandwidth into.
plot_dir : str
Directory for storing the PNG files.
+ width : float
+ Plot width in inches.
+ height : float
+ Plot height in inches.
+ dpi : int
+ Plot dots per inch.
+ source_name : str
+ Source name from the file header.
"""
# Get directory path for storing PNG file
|
Add some commentary to stix.py
|
UCBerkeleySETI_blimpy
|
train
|
py
|
4ff2415d6908c43a25c9b879367e52be7be3be85
|
diff --git a/cy_build.py b/cy_build.py
index <HASH>..<HASH> 100644
--- a/cy_build.py
+++ b/cy_build.py
@@ -60,14 +60,20 @@ class cy_build_ext(build_ext):
ext.library_dirs.append(os.path.join(self.build_lib, "pysam"))
if sys.platform == 'darwin':
+ # The idea is to give shared libraries an install name of the form
+ # `@rpath/<library-name.so>`, and to set the rpath equal to
+ # @loader_path. This will allow Python packages to find the library
+ # in the expected place, while still giving enough flexibility to
+ # external applications to link against the library.
relative_module_path = ext.name.replace(".", os.sep) + get_config_vars()["SO"]
library_path = os.path.join(
- "@loader_path", os.path.basename(relative_module_path)
+ "@rpath", os.path.basename(relative_module_path)
)
if not ext.extra_link_args:
ext.extra_link_args = []
ext.extra_link_args += ['-dynamiclib',
+ '-rpath', '@loader_path',
'-Wl,-headerpad_max_install_names',
'-Wl,-install_name,%s' % library_path,
'-Wl,-x']
|
Use @rpath for library name.
|
pysam-developers_pysam
|
train
|
py
|
88dc68dee4fc2188bfdd759c0671eca26260c7a0
|
diff --git a/android/app/src/main/java/com/enaml/Bridge.java b/android/app/src/main/java/com/enaml/Bridge.java
index <HASH>..<HASH> 100644
--- a/android/app/src/main/java/com/enaml/Bridge.java
+++ b/android/app/src/main/java/com/enaml/Bridge.java
@@ -222,7 +222,23 @@ public class Bridge {
if (argType.equals("android.graphics.Color")) {
// Hack for colors
spec = int.class; // Umm?
- arg = Color.parseColor(v.asStringValue().asString());
+ String color = v.asStringValue().asString();
+ // Add support for #RGB and #ARGB
+ if (color.length()==4) {
+ // #RGB
+ color = String.format("#%c%c%c%c%c%c",
+ color.charAt(1),color.charAt(1), // R
+ color.charAt(2),color.charAt(2), // G
+ color.charAt(3),color.charAt(3)); // B
+ } else if (color.length()==5) {
+ // #ARGB
+ color = String.format("#%c%c%c%c%c%c%c%c",
+ color.charAt(1),color.charAt(1), // A
+ color.charAt(2),color.charAt(2), // R
+ color.charAt(3),color.charAt(3), // G
+ color.charAt(4),color.charAt(4)); // B
+ }
+ arg = Color.parseColor(color);
} else if (argType.equals("android.R")) {
// Hack for resources such as
// @drawable/icon_name
|
Add support for colors of in format RGB and ARGB
|
codelv_enaml-native
|
train
|
java
|
e0d58ddb65eff1a52572dff75944d8b28ea706d3
|
diff --git a/tests/test_tokenization_marian.py b/tests/test_tokenization_marian.py
index <HASH>..<HASH> 100644
--- a/tests/test_tokenization_marian.py
+++ b/tests/test_tokenization_marian.py
@@ -20,11 +20,11 @@ import unittest
from pathlib import Path
from shutil import copyfile
+from transformers.testing_utils import _torch_available
from transformers.tokenization_marian import MarianTokenizer, save_json, vocab_files_names
from transformers.tokenization_utils import BatchEncoding
from .test_tokenization_common import TokenizerTesterMixin
-from .utils import _torch_available
SAMPLE_SP = os.path.join(os.path.dirname(os.path.abspath(__file__)), "fixtures/test_sentencepiece.model")
|
[fix] Marian tests import (#<I>)
|
huggingface_pytorch-pretrained-BERT
|
train
|
py
|
ac4060293b2a059cfeffa69e4ab8f8b503f7de5b
|
diff --git a/src/Pingpong/Support/Stub.php b/src/Pingpong/Support/Stub.php
index <HASH>..<HASH> 100644
--- a/src/Pingpong/Support/Stub.php
+++ b/src/Pingpong/Support/Stub.php
@@ -51,6 +51,22 @@ class Stub
}
/**
+ * Create new self instance from full path.
+ *
+ * @param string $path
+ * @param array $replaces
+ * @return self
+ */
+ public static function createFromPath($path, array $replaces = [])
+ {
+ $stub = static::create($path, $replaces);
+
+ $stub->setBasePath('');
+
+ return $stub;
+ }
+
+ /**
* Set stub path.
*
* @param string $path
|
added new createFromPath method: allow to create stub class from full path
|
pingpong-labs_sky
|
train
|
php
|
9cbd770dc90db4b3f5871b1eb3c2867dc9b41ea6
|
diff --git a/lib/parse_message.js b/lib/parse_message.js
index <HASH>..<HASH> 100644
--- a/lib/parse_message.js
+++ b/lib/parse_message.js
@@ -23,7 +23,7 @@ module.exports = function parseMessage(line, stripColors) {
if (match) {
message.prefix = match[1];
line = line.replace(/^:[^ ]+ +/, '');
- match = message.prefix.match(/^([_a-zA-Z0-9\[\]\\`^{}|-]*)(!([^@]+)@(.*))?$/);
+ match = message.prefix.match(/^([_a-zA-Z0-9\~\[\]\\`^{}|-]*)(!([^@]+)@(.*))?$/);
if (match) {
message.nick = match[1];
message.user = match[3];
|
Allow tilde in nicks
|
martynsmith_node-irc
|
train
|
js
|
ff807cccf23427919e7d5fdcc8a4326ef5cc7b31
|
diff --git a/src/Illuminate/Routing/RedirectController.php b/src/Illuminate/Routing/RedirectController.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Routing/RedirectController.php
+++ b/src/Illuminate/Routing/RedirectController.php
@@ -19,9 +19,11 @@ class RedirectController extends Controller
{
$parameters = collect($request->route()->parameters());
- $status = $parameters->pop();
+ $status = $parameters->get('status');
- $destination = $parameters->pop();
+ $destination = $parameters->get('destination');
+
+ $parameters->forget('status')->forget('destination');
$route = (new Route('GET', $destination, [
'as' => 'laravel_route_redirect_destination',
|
replace collection pop() with get() accessor (#<I>)
|
laravel_framework
|
train
|
php
|
29dbfab074a6d8fe9b76a9ac433f0479fc344503
|
diff --git a/rebulk/match.py b/rebulk/match.py
index <HASH>..<HASH> 100644
--- a/rebulk/match.py
+++ b/rebulk/match.py
@@ -547,7 +547,7 @@ class Match(object):
self.pattern = pattern
self.private = private
self.conflict_solver = conflict_solver
- self.children = []
+ self.children = Matches([], input_string)
self._raw_start = None
self._raw_end = None
self.defined_at = pattern.defined_at if pattern else defined_at()
|
Match children is now a Matches list
|
Toilal_rebulk
|
train
|
py
|
740e13eb964fc5c671202c470d2be0a9917085bd
|
diff --git a/modules/admin/storage/Image.php b/modules/admin/storage/Image.php
index <HASH>..<HASH> 100644
--- a/modules/admin/storage/Image.php
+++ b/modules/admin/storage/Image.php
@@ -2,13 +2,16 @@
namespace admin\storage;
+use \admin\models\StorageImage;
+
class Image
{
- /**
- * @todo see if the image for this filterid does already exists.
- */
public function create($fileId, $filterId = 0)
{
+ $img = StorageImage::find()->where(['file_id' => $fileId, 'filter_id' => $filterId])->asArray()->one();
+ if($img) {
+ return $img['id'];
+ }
$file = \yii::$app->luya->storage->file->getPath($fileId);
$info = \yii::$app->luya->storage->file->getInfo($fileId);
$imagine = new \Imagine\Gd\Imagine();
|
image ref will not be created if already exists.
|
luyadev_luya
|
train
|
php
|
e722dc89c9c2526610bb124050db50f3db226870
|
diff --git a/lib/meta_inspector/document.rb b/lib/meta_inspector/document.rb
index <HASH>..<HASH> 100644
--- a/lib/meta_inspector/document.rb
+++ b/lib/meta_inspector/document.rb
@@ -1,7 +1,7 @@
module MetaInspector
# A MetaInspector::Document knows about its URL and its contents
class Document
- attr_reader :html_content_only, :allow_redirections, :warn_level, :headers
+ attr_reader :html_content_only, :allow_redirections, :headers
# Initializes a new instance of MetaInspector::Document, setting the URL
# Options:
@@ -25,7 +25,6 @@ module MetaInspector
@document = options[:document]
@download_images = options[:download_images]
@headers = options[:headers]
- @warn_level = options[:warn_level]
@normalize_url = options[:normalize_url]
@faraday_options = options[:faraday_options]
@faraday_http_cache = options[:faraday_http_cache]
@@ -85,7 +84,6 @@ module MetaInspector
{ :timeout => 20,
:retries => 3,
:html_content_only => false,
- :warn_level => :raise,
:headers => {
'User-Agent' => default_user_agent,
'Accept-Encoding' => 'identity'
|
remove references to warn_level. Ref. #<I>
|
jaimeiniesta_metainspector
|
train
|
rb
|
363f3f31727281872a44dcdbe36ac6bb838be886
|
diff --git a/features/support/http_lib_filters.rb b/features/support/http_lib_filters.rb
index <HASH>..<HASH> 100644
--- a/features/support/http_lib_filters.rb
+++ b/features/support/http_lib_filters.rb
@@ -28,9 +28,9 @@ if defined?(UNSUPPORTED_HTTP_LIBS)
UNSUPPORTED_HTTP_LIB_REGEX = Regexp.union(*UNSUPPORTED_HTTP_LIBS)
# Filter out example rows that use libraries that are not supported on the current ruby interpreter
- Around do |scenario, block|
- unless scenario.respond_to?(:cell_values) && scenario.cell_values.any? { |v| v =~ UNSUPPORTED_HTTP_LIB_REGEX }
- block.call
+ Before do |scenario|
+ if scenario.respond_to?(:cell_values) && scenario.cell_values.any? { |v| v =~ UNSUPPORTED_HTTP_LIB_REGEX }
+ scenario.skip_invoke!
end
end
end
|
Fix skipping certain HTTP adapter in Cucumber outlines
This avoids the error:
undefined method `with_filtered_backtrace' on an
instance of Cucumber::Core::Test::Result::Unknown
Perhaps Cucumber doesn't like it anymore that we use Around hooks to
skip steps by simply not executing the block.
<URL>
|
vcr_vcr
|
train
|
rb
|
93cce5a4123ea6842faa4ab973d77eb358bfe46e
|
diff --git a/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/AbstractCommand.php b/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/AbstractCommand.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/AbstractCommand.php
+++ b/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/AbstractCommand.php
@@ -100,7 +100,8 @@ abstract class AbstractCommand extends Command
protected function getMigrationConfiguration(InputInterface $input, OutputInterface $output)
{
if (!$this->migrationConfiguration) {
- if ($this->getHelperSet()->has('configuration')) {
+ if ($this->getHelperSet()->has('configuration')
+ && $this->getHelperSet()->get('configuration') instanceof ConfigurationHelper) {
$configHelper = $this->getHelperSet()->get('configuration');
} else {
$configHelper = new ConfigurationHelper($this->getConnection($input), $this->configuration);
|
Added a check for correct helper class instance
|
doctrine_migrations
|
train
|
php
|
4b8afeefe36c8b02dddc9263581195c911c72ee6
|
diff --git a/src/Message.php b/src/Message.php
index <HASH>..<HASH> 100644
--- a/src/Message.php
+++ b/src/Message.php
@@ -776,17 +776,15 @@ class Message extends MimePart
*/
protected function createPartForAttachment()
{
- $part = null;
if ($this->isMime()) {
$part = $this->mimePartFactory->newMimePart();
$part->setRawHeader('Content-Transfer-Encoding', 'base64');
if ($this->getHeaderValue('Content-Type') !== 'multipart/mixed') {
$this->setMessageAsMixed();
}
- } else {
- $part = $this->mimePartFactory->newUUEncodedPart();
+ return $part;
}
- return $part;
+ return $this->mimePartFactory->newUUEncodedPart();
}
/**
|
Fix scrutinizer issue about unused code
|
zbateson_mail-mime-parser
|
train
|
php
|
fd3f954e262a8ebb7934d1433fbe8d010c12664e
|
diff --git a/neo4jrestclient/client.py b/neo4jrestclient/client.py
index <HASH>..<HASH> 100644
--- a/neo4jrestclient/client.py
+++ b/neo4jrestclient/client.py
@@ -1668,7 +1668,7 @@ class Extension(object):
return Iterable(Path, result)
elif POSITION in returns:
return Iterable(Position, result)
- if isinstance(result, dict) and returns:
+ elif isinstance(result, dict) and returns:
if NODE in returns:
return Node(result["self"], data=result)
elif RELATIONSHIP in returns:
@@ -1677,7 +1677,7 @@ class Extension(object):
return Path(result)
elif POSITION in returns:
return Position(result)
- if result:
+ elif result:
return result
else:
return []
|
returns=RAW fix based on @versae's feedback.
|
versae_neo4j-rest-client
|
train
|
py
|
eaa8fde2984e4576186a55dd7fb155bc2705d178
|
diff --git a/command/agent/event_endpoint.go b/command/agent/event_endpoint.go
index <HASH>..<HASH> 100644
--- a/command/agent/event_endpoint.go
+++ b/command/agent/event_endpoint.go
@@ -97,7 +97,7 @@ func (s *HTTPServer) EventList(resp http.ResponseWriter, req *http.Request) (int
nameFilter = filt
}
- // Lots of this logic is borrowed from consul/rpc.go:blockingRPC
+ // Lots of this logic is borrowed from consul/rpc.go:blockingQuery
// However we cannot use that directly since this code has some
// slight semantics differences...
var timeout <-chan time.Time
|
Updates a comment to point to new blockingQuery function.
|
hashicorp_consul
|
train
|
go
|
9c5ee1126fc012f902d8a3291a82066813eae1d7
|
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizerTests.java
index <HASH>..<HASH> 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizerTests.java
+++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizerTests.java
@@ -164,7 +164,7 @@ public class JettyWebServerFactoryCustomizerTests {
@Test
public void customIdleTimeout() {
- bind("server.jetty.idle-timeout=60s");
+ bind("server.jetty.connection-idle-timeout=60s");
JettyWebServer server = customizeAndGetServer();
List<Long> timeouts = connectorsIdleTimeouts(server);
assertThat(timeouts).containsOnly(60000L);
|
Polish
See gh-<I>
|
spring-projects_spring-boot
|
train
|
java
|
115e20162d92b679a8bed1ce41198cc89b47c594
|
diff --git a/app/routes/page.create.route.js b/app/routes/page.create.route.js
index <HASH>..<HASH> 100644
--- a/app/routes/page.create.route.js
+++ b/app/routes/page.create.route.js
@@ -28,10 +28,10 @@ function route_page_create (config) {
message : error
});
}
- });
- res.json({
- status : 0,
- message : config.lang.api.pageCreated
+ res.json({
+ status : 0,
+ message : config.lang.api.pageCreated
+ });
});
});
|
Move file save response into close callback.
|
gilbitron_Raneto
|
train
|
js
|
027a219d595fbea2d39678a7fc19b052c17aa9c1
|
diff --git a/goatools/gaf_reader.py b/goatools/gaf_reader.py
index <HASH>..<HASH> 100755
--- a/goatools/gaf_reader.py
+++ b/goatools/gaf_reader.py
@@ -56,10 +56,10 @@ class GafReader(object):
# Expected values for a Qualifier
exp_qualifiers = set(['NOT', 'contributes_to', 'colocalizes_with'])
- def __init__(self, filename, log=sys.stdout):
+ def __init__(self, filename=None, log=sys.stdout):
self.filename = filename
self.log = log
- self.associations = self.read_gaf(filename)
+ self.associations = self.read_gaf(filename) if filename is not None else []
def _get_ntgaf(self, ntgafobj, flds, ver):
"""Convert fields from string to preferred format for GAF ver 2.1 and 2.0."""
|
allow for instantiating gafobj once and reading many gaf files.
|
tanghaibao_goatools
|
train
|
py
|
2d03aa7a646c47bb622ed22cf110d1dcb3a5624f
|
diff --git a/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb b/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb
+++ b/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb
@@ -69,7 +69,7 @@ module Fog
@response['MaxKeys'] = value.to_i
when 'Size'
@version['Size'] = value.to_i
- when 'Key', 'KeyMarker', 'Name', 'Prefix', 'StorageClass', 'VersionId', 'VersionIdMarker'
+ when 'Key', 'KeyMarker', 'Name', 'NextKeyMarker', 'NextVersionIdMarker', 'Prefix', 'StorageClass', 'VersionId', 'VersionIdMarker'
if @in_delete_marker
@delete_marker
elsif @in_version
|
[aws|storage] Added the pagination offset params to the get_object_bucket_versions parser.
|
fog_fog
|
train
|
rb
|
c5eba7c7eea9db6ae10a49acb3ad7d6facb534fd
|
diff --git a/pauldron-fhir-proxy/controllers/FHIRProxy.js b/pauldron-fhir-proxy/controllers/FHIRProxy.js
index <HASH>..<HASH> 100644
--- a/pauldron-fhir-proxy/controllers/FHIRProxy.js
+++ b/pauldron-fhir-proxy/controllers/FHIRProxy.js
@@ -101,16 +101,16 @@ async function handleGet(rawBackendBody, proxyRes, req, res) {
} else if (e instanceof SyntaxError) {
res.statusCode = 400;
const responseBody = {
- message: "Invalid response from the FHIR server. FHIRProxy only supports JSON at this time.",
+ message: "Invalid response from the FHIR server. Pauldron FHIR Proxy only supports JSON at this time.",
error: "unsupported_response",
- status: 500
+ status: 400
};
res.write(Buffer.from(JSON.stringify(responseBody), "utf8"));
} else {
logger.warn(e);
res.statusCode = 500;
const responseBody = {
- message: "FHIRProxy encountered an error",
+ message: "Pauldron FHIR Proxy encountered an error",
error: "internal_error",
status: 500
};
|
fixed the wrong error code sent in the body status code in the case of unsupported backend response format.
|
mojitoholic_pauldron
|
train
|
js
|
450044d820490d3ca7322326dcf2e9527365c526
|
diff --git a/com/jetbrains/teamsys/dnq/database/TransientChangesTrackerImpl.java b/com/jetbrains/teamsys/dnq/database/TransientChangesTrackerImpl.java
index <HASH>..<HASH> 100644
--- a/com/jetbrains/teamsys/dnq/database/TransientChangesTrackerImpl.java
+++ b/com/jetbrains/teamsys/dnq/database/TransientChangesTrackerImpl.java
@@ -227,8 +227,11 @@ final class TransientChangesTrackerImpl implements TransientChangesTracker {
public void linkSet(@NotNull final TransientEntity source, @NotNull final String linkName, @NotNull final TransientEntity target, final TransientEntity oldTarget) {
entityChanged(source);
+ // don't set old target if the original old target was already set for current linkName
+ Map<String, LinkChange> linkChangeMap = entityToChangedLinksDetailed.get(source);
+ boolean dontSetOldTarget = oldTarget == null || (linkChangeMap != null && linkChangeMap.get(linkName) != null);
linkChangedDetailed(source, linkName, LinkChangeType.SET,
- new NanoSet<TransientEntity>(target), oldTarget != null ? new NanoSet<TransientEntity>(oldTarget) : null);
+ new NanoSet<TransientEntity>(target), dontSetOldTarget ? null : new NanoSet<TransientEntity>(oldTarget));
offerChange(new Runnable() {
public void run() {
|
fix ChangesTest (TransientChangesTrackerImpl: don't set old target if the original old target was already set for current linkName for simple association)
git-svn-id: <URL>
|
JetBrains_xodus-dnq
|
train
|
java
|
5a836954898b3a355555fa21adf17b3453833469
|
diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js
index <HASH>..<HASH> 100644
--- a/.storybook/webpack.config.js
+++ b/.storybook/webpack.config.js
@@ -14,6 +14,6 @@ module.exports = function(config) {
rules.less({ browsers }),
],
},
- plugins: [...config.plugins, plugins.extractText()],
+ plugins: [...config.plugins],
}
}
|
chore: remove extractText plugin to fix storybook (#<I>)
|
intljusticemission_react-big-calendar
|
train
|
js
|
1ee6a8fe33b8f4bdc93394d5fb631d8bd1853101
|
diff --git a/lib/proxylocal/client.rb b/lib/proxylocal/client.rb
index <HASH>..<HASH> 100644
--- a/lib/proxylocal/client.rb
+++ b/lib/proxylocal/client.rb
@@ -31,7 +31,7 @@ module ProxyLocal
def initialize(options)
@options = options
- @reconnect = options[:hosts].any?
+ @reconnect = options[:hosts] && options[:hosts].any?
end
def send_options
|
fix execution w/o host option
|
proxylocal_proxylocal-gem
|
train
|
rb
|
7ab346719574a591fbad2353d05f75a84daf3f18
|
diff --git a/src/GitHub_Updater/Theme.php b/src/GitHub_Updater/Theme.php
index <HASH>..<HASH> 100644
--- a/src/GitHub_Updater/Theme.php
+++ b/src/GitHub_Updater/Theme.php
@@ -87,7 +87,7 @@ class Theme extends Base {
$this->{$theme->type} = $theme;
$this->set_defaults( $theme->type );
- if ( $this->repo_api->get_remote_info( 'style.css' ) ) {
+ if ( $this->force_meta_update && $this->repo_api->get_remote_info( 'style.css' ) ) {
$this->repo_api->get_repo_meta();
$this->repo_api->get_remote_tag();
$changelog = $this->get_changelog_filename( $theme->type );
|
Add conditional to Theme class before loading remote resources
|
afragen_github-updater
|
train
|
php
|
661e1ba5797d1ead003ca2221733bcac07062081
|
diff --git a/anyconfig/schema.py b/anyconfig/schema.py
index <HASH>..<HASH> 100644
--- a/anyconfig/schema.py
+++ b/anyconfig/schema.py
@@ -156,14 +156,14 @@ def gen_schema(node, **options):
if _type in _SIMPLE_TYPES:
typemap = options.get("ac_schema_typemap", _SIMPLETYPE_MAP)
- ret = dict(type=typemap[_type])
+ scm = dict(type=typemap[_type])
elif isinstance(node, dict):
- ret = object_to_schema(node, **options)
+ scm = object_to_schema(node, **options)
elif _type in (list, tuple) or hasattr(node, "__iter__"):
- ret = array_to_schema(node, **options)
+ scm = array_to_schema(node, **options)
- return ret
+ return scm
# vim:sw=4:ts=4:et:
|
refactor: change variable name from ret to scm (schema object) in .schema.gen_schema
|
ssato_python-anyconfig
|
train
|
py
|
9d1a489931ecbdd652111669c0bd86bcd6f5abbe
|
diff --git a/git/remote.py b/git/remote.py
index <HASH>..<HASH> 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -458,7 +458,7 @@ class Remote(LazyMixin, Iterable):
'refs' property for an example.
To make things more complicated, it can be possble for the list to include
- other kinds of references, for example, tag references, if these are stale
+ other kinds of references, for example, tag references, if these are stale
as well. This is a fix for the issue described here:
https://github.com/gitpython-developers/GitPython/issues/260
"""
|
Fixed trailing white space!
Think about how expensive this single invisible character was, with
all the time and energy spent on it !
|
gitpython-developers_GitPython
|
train
|
py
|
b947892453248e4b6da14ff1abb41f0e1e6fae13
|
diff --git a/tests/components/laser-controls.test.js b/tests/components/laser-controls.test.js
index <HASH>..<HASH> 100644
--- a/tests/components/laser-controls.test.js
+++ b/tests/components/laser-controls.test.js
@@ -43,8 +43,8 @@ suite('laser-controls', function () {
el.emit('controllerconnected', {name: 'oculus-touch-controls'});
setTimeout(() => {
var raycaster = el.getAttribute('raycaster');
- assert.notEqual(raycaster.origin.z, 0);
- assert.notEqual(raycaster.direction.y, 0);
+ assert.equal(raycaster.origin.z, 0);
+ assert.equal(raycaster.direction.y, 0);
done();
});
});
|
fix laser-controls Touch test now that offsets have been zeroed
|
aframevr_aframe
|
train
|
js
|
8aef747d68b339e514e71c55df7a4d0d02fdc0f1
|
diff --git a/lib/releasecop/version.rb b/lib/releasecop/version.rb
index <HASH>..<HASH> 100644
--- a/lib/releasecop/version.rb
+++ b/lib/releasecop/version.rb
@@ -1,3 +1,3 @@
module Releasecop
- VERSION = "0.0.3"
+ VERSION = "0.0.4"
end
|
Bump to version <I> with jonallured's verbose option
|
joeyAghion_releasecop
|
train
|
rb
|
1e61a246f95d97cc376a4a56e4372d9cd225defd
|
diff --git a/mod/wiki/index.php b/mod/wiki/index.php
index <HASH>..<HASH> 100644
--- a/mod/wiki/index.php
+++ b/mod/wiki/index.php
@@ -68,7 +68,7 @@
}
$timmod = '<span class="smallinfo">'.userdate($wiki->timemodified).'</span>';
- $summary = '<span class="smallinfo">'.format_text($wiki->summary).'</span>';
+ $summary = '<div class="smallinfo">'.format_text($wiki->summary).'</div>';
$site = get_site();
switch ($wiki->wtype) {
|
"WIKI/MDL-<I>, wrap wiki summary by div, merged from <I>"
|
moodle_moodle
|
train
|
php
|
a506b2b3a12ce657011cce27784b24442c56c1ca
|
diff --git a/paramiko/channel.py b/paramiko/channel.py
index <HASH>..<HASH> 100644
--- a/paramiko/channel.py
+++ b/paramiko/channel.py
@@ -330,12 +330,10 @@ class Channel (ClosingContextManager):
m.add_byte(cMSG_CHANNEL_REQUEST)
m.add_int(self.remote_chanid)
m.add_string('env')
- m.add_boolean(True)
+ m.add_boolean(False)
m.add_string(name)
m.add_string(value)
- self._event_pending()
self.transport._send_user_message(m)
- self._wait_for_event()
def exit_status_ready(self):
"""
|
Don't expect reply to env-setting messages.
Re #<I>
|
paramiko_paramiko
|
train
|
py
|
9e63f0eb244f6bf32b121d628572f690b93015f2
|
diff --git a/pandas/tseries/tools.py b/pandas/tseries/tools.py
index <HASH>..<HASH> 100644
--- a/pandas/tseries/tools.py
+++ b/pandas/tseries/tools.py
@@ -14,7 +14,7 @@ try:
# raise exception if dateutil 2.0 install on 2.x platform
if (sys.version_info[0] == 2 and
- dateutil.__version__ == '2.0'): # pragma: no cover
+ dateutil.__version__ >= '2.0'): # pragma: no cover
raise Exception('dateutil 2.0 incompatible with Python 2.x, you must '
'install version 1.5!')
except ImportError: # pragma: no cover
|
TST: check for dateutil <I> too #<I>
|
pandas-dev_pandas
|
train
|
py
|
7cc0b427a63f01bf99836bb76fc53be2a93edf52
|
diff --git a/spec/site_spec.rb b/spec/site_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/site_spec.rb
+++ b/spec/site_spec.rb
@@ -32,6 +32,6 @@ describe 'A site' do
files << File.basename(file)
end
- expect(files).to eq(["a.jpg", "b.jpg", "c.jpg"])
+ expect(files.sort).to eq(["a.jpg", "b.jpg", "c.jpg"])
end
end
\ No newline at end of file
|
Sort the files list in the asset copying before comparing.
|
waferbaby_dimples
|
train
|
rb
|
6e927a21608d91f271d556f2d32bf9ba628217df
|
diff --git a/scrapekit/core.py b/scrapekit/core.py
index <HASH>..<HASH> 100644
--- a/scrapekit/core.py
+++ b/scrapekit/core.py
@@ -1,3 +1,4 @@
+import os
from uuid import uuid4
from datetime import datetime
from threading import local
@@ -18,6 +19,10 @@ class Scraper(object):
self.id = uuid4()
self.start_time = datetime.utcnow()
self.config = Config(self, config)
+ try:
+ os.makedirs(self.config.data_path)
+ except:
+ pass
self._task_manager = None
self.task_ctx = local()
self.log = make_logger(self)
|
make the data path if needed.
|
pudo-attic_scrapekit
|
train
|
py
|
7bf354bf946a5ebdb8fff6b916ca415758130c3d
|
diff --git a/src/Surfer/Adapter/AbstractAdapter.php b/src/Surfer/Adapter/AbstractAdapter.php
index <HASH>..<HASH> 100644
--- a/src/Surfer/Adapter/AbstractAdapter.php
+++ b/src/Surfer/Adapter/AbstractAdapter.php
@@ -27,7 +27,7 @@ abstract class AbstractAdapter implements IClientAdapter {
const DEFAULT_PORT = "80"; //!< Default port.
const SCHEME_HOST_PORT_URI = '/^
- (?P<scheme>tcp:\/\/|ssl:\/\/|tls:\/\/)? # Scheme
+ (?P<scheme>tcp:\/\/|ssl:\/\/|tls:\/\/|http:\/\/|https:\/\/)? # Scheme
# Authority
(?P<host>[a-z0-9\-._~%]+ # Named host
| \[[a-f0-9:.]+\] # IPv6 host
|
added http and https to the supported schemes
|
dedalozzo_surfer
|
train
|
php
|
bf1bafbbebeab86a213e4c4bed0be6f1b18404c6
|
diff --git a/python/grizzly/grizzly/lazy_op.py b/python/grizzly/grizzly/lazy_op.py
index <HASH>..<HASH> 100644
--- a/python/grizzly/grizzly/lazy_op.py
+++ b/python/grizzly/grizzly/lazy_op.py
@@ -40,7 +40,7 @@ class LazyOpResult:
self.weld_type = weld_type
self.dim = dim
- def evaluate(self, verbose=True, decode=True):
+ def evaluate(self, verbose=True, decode=True, passes=None):
"""Summary
Args:
@@ -56,5 +56,6 @@ class LazyOpResult:
self.weld_type,
self.dim),
verbose,
- decode)
+ decode,
+ passes=passes)
return self.expr
|
Add passes to Grizzly's lazyOp
|
weld-project_weld
|
train
|
py
|
f8dea6942529af4bd42db586090000dc6d1b23f3
|
diff --git a/lib/deploy.js b/lib/deploy.js
index <HASH>..<HASH> 100644
--- a/lib/deploy.js
+++ b/lib/deploy.js
@@ -100,7 +100,7 @@ function execDeploy(options, connection) {
},
deleteLocalZip:function (callback) {
if (!options.zip) return callback();
- var command = 'rm deploy.tgz';
+ var command = process.platform === 'win32' ? 'del deploy.tgz' : 'rm deploy.tgz';
console.info('Local cleanup: '.yellow);
console.info(' > ' + command);
execLocal(command, options.debug ,callback);
|
Patch to fix deleting deploy.tgz on local windows (#3)
|
unadlib_ssh-webpack-plugin
|
train
|
js
|
2bbf6ba79c8ab166b4a603485f720933bf239c0d
|
diff --git a/code/DashboardMember.php b/code/DashboardMember.php
index <HASH>..<HASH> 100644
--- a/code/DashboardMember.php
+++ b/code/DashboardMember.php
@@ -45,9 +45,9 @@ class DashboardMember extends DataExtension {
$clone->MemberID = $this->owner->ID;
$clone->write();
}
- $this->owner->HasConfiguredDashboard = 1;
- // Get a fresh record, so we don't run in to recursive writes.
- Member::get()->byID($this->owner->ID)->write();
+
+ DB::query("UPDATE Member SET HasConfiguredDashboard = 1 WHERE ID = {$this->owner->ID}");
+ $this->owner->flushCache();
}
}
}
|
BUGFIX: DashbaordMember onAfterWrite creates infinite loop
|
unclecheese_silverstripe-dashboard
|
train
|
php
|
f00c8bb4180b05d0b14368f50bd83f465a51e2a0
|
diff --git a/commitlint.config.js b/commitlint.config.js
index <HASH>..<HASH> 100644
--- a/commitlint.config.js
+++ b/commitlint.config.js
@@ -16,8 +16,8 @@ if (isPushEvent) {
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
- 'header-max-length': [2, 'always', maxLineLength],
- 'body-max-line-length': [2, 'always', maxLineLength],
- 'footer-max-line-length': [2, 'always', maxLineLength],
+ 'header-max-length': [1, 'always', maxLineLength],
+ 'body-max-line-length': [1, 'always', maxLineLength],
+ 'footer-max-line-length': [1, 'always', maxLineLength],
},
};
|
ci: consider commit linting errors about length as warnings (#<I>)
|
ForestAdmin_forest-express-sequelize
|
train
|
js
|
a3dc68a7bb9ef28e8c7692daa917cf6a99a25cd3
|
diff --git a/src/Keboola/DeveloperPortal/Client.php b/src/Keboola/DeveloperPortal/Client.php
index <HASH>..<HASH> 100644
--- a/src/Keboola/DeveloperPortal/Client.php
+++ b/src/Keboola/DeveloperPortal/Client.php
@@ -32,15 +32,15 @@ class Client
];
/** @var \GuzzleHttp\Client */
- protected $guzzle;
- protected $guzzleOptions;
+ private $guzzle;
+ private $guzzleOptions;
- protected $username;
- protected $password;
+ private $username;
+ private $password;
- protected $token;
- protected $accessToken;
- protected $refreshToken;
+ private $token;
+ private $accessToken;
+ private $refreshToken;
/**
* Client constructor
@@ -72,7 +72,7 @@ class Client
}
}
- protected function setCredentials($credentials)
+ private function setCredentials($credentials)
{
foreach (['token', 'accessToken', 'refreshToken'] as $key) {
if (!empty($credentials[$key])) {
@@ -81,7 +81,7 @@ class Client
}
}
- protected function initClient()
+ private function initClient()
{
$handlerStack = HandlerStack::create();
|
Replace protected methods/props by private
|
keboola_developer-portal-php-client
|
train
|
php
|
680f5e91e83d3868a3e05618e3b270e325c5003b
|
diff --git a/simpleai/search/csp.py b/simpleai/search/csp.py
index <HASH>..<HASH> 100644
--- a/simpleai/search/csp.py
+++ b/simpleai/search/csp.py
@@ -71,6 +71,12 @@ def _count_conflicts(problem, assignment, variable=None, value=None):
return len(_find_conflicts(problem, assignment, variable, value))
+def _call_constraint(assignment, neighbors, constraint):
+ variables, values = zip(*[(n, assignment[n])
+ for n in neighbors])
+ return constraint(variables, values)
+
+
def _find_conflicts(problem, assignment, variable=None, value=None):
'''
Find violated constraints on a given assignment, with the possibility
@@ -85,9 +91,7 @@ def _find_conflicts(problem, assignment, variable=None, value=None):
for neighbors, constraint in problem.constraints:
# if all the neighbors on the constraint have values, check if conflict
if all(n in assignment for n in neighbors):
- variables, values = zip(*[(n, assignment[n])
- for n in neighbors])
- if not constraint(variables, values):
+ if not _call_constraint(assignment, neighbors, constraint):
conflicts.append((neighbors, constraint))
return conflicts
|
Refactored the logic to call a constraint with variables and values in the correct order
|
simpleai-team_simpleai
|
train
|
py
|
d5bacbbdc8324e90918acecec071318a6ba2f872
|
diff --git a/packages/victory-axis/src/helper-methods.js b/packages/victory-axis/src/helper-methods.js
index <HASH>..<HASH> 100644
--- a/packages/victory-axis/src/helper-methods.js
+++ b/packages/victory-axis/src/helper-methods.js
@@ -352,12 +352,12 @@ const getGridOffset = (calculatedValues, offset) => {
const getLayoutProps = (modifiedProps, calculatedValues) => {
let offset;
- if (modifiedProps.standalone) {
- offset = getStandaloneOffset(modifiedProps, calculatedValues);
- } else {
+ if (calculatedValues.domain.x && calculatedValues.domain.y) {
offset = modifiedProps.horizontal
? getHorizontalOffset(modifiedProps, calculatedValues)
: getOffset(modifiedProps, calculatedValues);
+ } else {
+ offset = getStandaloneOffset(modifiedProps, calculatedValues);
}
return {
globalTransform: getTransform(modifiedProps, calculatedValues, offset),
|
use domain x/y check rather than standalone prop for single axis layout
|
FormidableLabs_victory
|
train
|
js
|
9a69dfd382ba6ce9ae074065175a9030c30c8410
|
diff --git a/nornir/plugins/tasks/networking/netmiko_save_config.py b/nornir/plugins/tasks/networking/netmiko_save_config.py
index <HASH>..<HASH> 100644
--- a/nornir/plugins/tasks/networking/netmiko_save_config.py
+++ b/nornir/plugins/tasks/networking/netmiko_save_config.py
@@ -8,6 +8,7 @@ def netmiko_save_config(
) -> Result:
"""
Execute Netmiko save_config method
+
Arguments:
cmd(str, optional): Command used to save the configuration.
confirm(bool, optional): Does device prompt for confirmation before executing save operation
|
added empty line so the docstring is properly formatter (#<I>)
|
nornir-automation_nornir
|
train
|
py
|
9d2e922e4da2ff3278514f638644d82e8b172249
|
diff --git a/test/Broadway/Saga/SagaMetadataEnricherTest.php b/test/Broadway/Saga/SagaMetadataEnricherTest.php
index <HASH>..<HASH> 100644
--- a/test/Broadway/Saga/SagaMetadataEnricherTest.php
+++ b/test/Broadway/Saga/SagaMetadataEnricherTest.php
@@ -28,7 +28,7 @@ class SagaMetadataEnricherTest extends TestCase
/**
* @test
*/
- public function it_should_store_the_state()
+ public function it_stores_the_state()
{
$type = 'type';
$id = 'id';
@@ -43,7 +43,7 @@ class SagaMetadataEnricherTest extends TestCase
/**
* @test
*/
- public function it_should_use_the_last_saga_data_it_received()
+ public function it_uses_the_latest_saga_data_it_received()
{
$this->sagaMetadataEnricher->postHandleSaga('type1', 'id1');
$this->sagaMetadataEnricher->postHandleSaga('type2', 'id2');
@@ -57,7 +57,7 @@ class SagaMetadataEnricherTest extends TestCase
/**
* @test
*/
- public function it_should_enrich_multiple_instances_of_metadata()
+ public function it_enriches_multiple_instances_of_metadata()
{
$this->sagaMetadataEnricher->postHandleSaga('type', 'id');
|
Remove usage of `should` in test method names betterspecs.org/#should
|
broadway_broadway-saga
|
train
|
php
|
9162af7f2bc9803ec461e9e8fd555546aff22320
|
diff --git a/ext_emconf.php b/ext_emconf.php
index <HASH>..<HASH> 100755
--- a/ext_emconf.php
+++ b/ext_emconf.php
@@ -5,7 +5,7 @@ declare(strict_types=1);
$EM_CONF[$_EXTKEY] = [
'title' => 'StaticFileCache',
'description' => 'Transparent StaticFileCache solution using mod_rewrite and mod_expires. Increase performance for static pages by a factor of 230!!',
- 'version' => '12.0.3',
+ 'version' => '12.0.4',
'category' => 'fe',
'constraints' => [
'depends' => [
|
Change ext_emconf.php version to <I>
|
lochmueller_staticfilecache
|
train
|
php
|
7480ded658720267a23a537d30e939ec9218eee0
|
diff --git a/tests/test_processor_wav2vec2_with_lm.py b/tests/test_processor_wav2vec2_with_lm.py
index <HASH>..<HASH> 100644
--- a/tests/test_processor_wav2vec2_with_lm.py
+++ b/tests/test_processor_wav2vec2_with_lm.py
@@ -243,8 +243,12 @@ class Wav2Vec2ProcessorWithLMTest(unittest.TestCase):
path_to_cached_dir = Path(language_model._kenlm_model.path.decode("utf-8")).parent.parent.absolute()
downloaded_decoder_files = os.listdir(path_to_cached_dir)
+ expected_decoder_files = ["alphabet.json", "language_model"]
+
+ downloaded_decoder_files.sort()
+ expected_decoder_files.sort()
# test that only decoder relevant files from
# https://huggingface.co/hf-internal-testing/processor_with_lm/tree/main
# are downloaded and none of the rest (e.g. README.md, ...)
- self.assertListEqual(downloaded_decoder_files, ["alphabet.json", "language_model"])
+ self.assertListEqual(downloaded_decoder_files, expected_decoder_files)
|
Fix failing test (#<I>)
|
huggingface_pytorch-pretrained-BERT
|
train
|
py
|
9e802533c88c40ee042e7a4a12f33fdb6f038fd3
|
diff --git a/icklebot/src/main/java/com/lonepulse/icklebot/bind/expressive/ProjectElement.java b/icklebot/src/main/java/com/lonepulse/icklebot/bind/expressive/ProjectElement.java
index <HASH>..<HASH> 100644
--- a/icklebot/src/main/java/com/lonepulse/icklebot/bind/expressive/ProjectElement.java
+++ b/icklebot/src/main/java/com/lonepulse/icklebot/bind/expressive/ProjectElement.java
@@ -58,7 +58,7 @@ public class ProjectElement extends AbstractOperator {
throw new IllegalArgumentException(errorContext.toString());
}
- if(!int.class.isAssignableFrom(args[0].getClass()) && !(args[0] instanceof Integer)) {
+ if(!(args[0] instanceof Integer)) {
StringBuilder errorContext = new StringBuilder()
.append(getClass().getName())
|
Update expressive binding with an element-projection operator
|
sahan_IckleBot
|
train
|
java
|
45590f805cadb0d3a5f51402bb05a1b72ad2e75b
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1,7 +1,7 @@
/**
* Pon task to bundle browser script
* @module pon-task-browser
- * @version 7.2.9
+ * @version 7.2.10
*/
'use strict'
|
[ci skip] Travis CI committed after build
|
realglobe-Inc_pon-task-browser
|
train
|
js
|
02146f4a9a94362fb168abc0da4680c5aaa2e3c1
|
diff --git a/modesolverpy/structure_base.py b/modesolverpy/structure_base.py
index <HASH>..<HASH> 100644
--- a/modesolverpy/structure_base.py
+++ b/modesolverpy/structure_base.py
@@ -526,14 +526,14 @@ class StructureAni():
struct_dummy._wl = self.xx._wl
if structure_xy:
- self.yx = structure_xy
+ self.xy = structure_xy
else:
- self.yx = struct_dummy
+ self.xy = struct_dummy
if structure_yx:
- self.xy = structure_yx
+ self.yx = structure_yx
else:
- self.xy = struct_dummy
+ self.yx = struct_dummy
assert self.xx._wl == self.xy._wl == self.yx._wl == \
self.yy._wl == self.zz._wl
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup
setup(name='modesolverpy',
- version='0.3.8',
+ version='0.4',
description='Photonic mode solver.',
url='https://github.com/jtambasco/modesolverpy',
author='Jean-Luc Tambasco',
|
Minor bug fix when using anisotropic materials with `xy` and `yx`
tensor components.
|
jtambasco_modesolverpy
|
train
|
py,py
|
b4dd9dfc0de74d56d6c184c4c5a634e211e338bb
|
diff --git a/views/js/qtiCreator/plugins/menu/preview.js b/views/js/qtiCreator/plugins/menu/preview.js
index <HASH>..<HASH> 100644
--- a/views/js/qtiCreator/plugins/menu/preview.js
+++ b/views/js/qtiCreator/plugins/menu/preview.js
@@ -30,7 +30,7 @@ define([
'i18n',
'core/plugin',
'ui/hider',
- 'taoMediaManager/previewer/adapter/item/qtiSharedStimulusItem',
+ 'taoItems/previewer/factory',
'tpl!taoQtiItem/qtiCreator/plugins/button',
], function($, __, pluginFactory, hider, previewerFactory, buttonTpl){
@@ -78,7 +78,7 @@ define([
self.disable();
- sharedStimulusCreator.trigger('preview', SharedStimulusCreator.getSharedStimulusId());
+ sharedStimulusCreator.trigger('preview', sharedStimulusCreator.getItem().data('uri'));
self.enable();
});
|
rename passage to sharedStimulus
|
oat-sa_extension-tao-mediamanager
|
train
|
js
|
0d17ee888f562ba70d678d9ad9b412704bc2d3af
|
diff --git a/src/heading/heading_view.js b/src/heading/heading_view.js
index <HASH>..<HASH> 100644
--- a/src/heading/heading_view.js
+++ b/src/heading/heading_view.js
@@ -9,6 +9,8 @@ var HeadingView = function(node) {
TextView.call(this, node);
this.$el.addClass('heading');
+ this.$el.addClass('level-'+this.node.level);
+
};
HeadingView.Prototype = function() {};
|
Add css classes for heading levels.
|
substance_nodes
|
train
|
js
|
7c28bff9893f8b075e61c261e6516570095718c3
|
diff --git a/lib/puppet/util/windows/taskscheduler.rb b/lib/puppet/util/windows/taskscheduler.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/util/windows/taskscheduler.rb
+++ b/lib/puppet/util/windows/taskscheduler.rb
@@ -173,6 +173,13 @@ module Win32
end
@pITS = COM::TaskScheduler.new
+ at_exit do
+ begin
+ @pITS.Release if @pITS && !@pITS.null?
+ @pITS = nil
+ rescue
+ end
+ end
if work_item
if trigger
@@ -264,9 +271,6 @@ module Win32
# If +file+ (an absolute path) is specified then the job is saved to that
# file instead. A '.job' extension is recommended but not enforced.
#
- # Note that calling TaskScheduler#save also resets the TaskScheduler object
- # so that there is no currently active task.
- #
def save(file = nil)
raise Error.new('No currently active task. ITask is NULL.') if @pITask.nil?
@@ -279,11 +283,7 @@ module Win32
rescue
reset = false
ensure
- if reset
- @pITS = COM::TaskScheduler.new
-
- reset_current_task
- end
+ reset_current_task if reset
end
end
|
(PUP-<I>) Don't Release TaskScheduler in save
- It doesn't make a lot of sense to reset the TaskScheduler instance
upon save, given the current Task has release called and is set to
nil. There are no methods called against @pITaskScheduler that
have any bearing on 'the current task'. Any methods that need
a valid @pITask are already guarded.
|
puppetlabs_puppet
|
train
|
rb
|
24f1dae66ffa159504e919fd75a5a6385bc2e25c
|
diff --git a/src/toil/test/jobStores/jobStoreTest.py b/src/toil/test/jobStores/jobStoreTest.py
index <HASH>..<HASH> 100644
--- a/src/toil/test/jobStores/jobStoreTest.py
+++ b/src/toil/test/jobStores/jobStoreTest.py
@@ -960,7 +960,7 @@ class AWSJobStoreTest(AbstractJobStoreTest.Test):
testJobStoreUUID = str(uuid.uuid4())
# Create the nucket at the external region
s3 = S3Connection()
- for attempt in retry_s3():
+ for attempt in retry_s3(delays=(2,5,10,30,60), timeout=600):
with attempt:
bucket = s3.create_bucket('domain-test-' + testJobStoreUUID + '--files',
location=externalAWSLocation)
|
Increase timeout and delay leeway for bucket creation test
AWS considers bucket creation/deletion operations the most "expensive"
for throttling purposes, so we should use a much more dramatic backoff
than default.
|
DataBiosphere_toil
|
train
|
py
|
2ea28495f76b5e45f51b5e16d02a36dfd521d054
|
diff --git a/code/UserDefinedForm.php b/code/UserDefinedForm.php
index <HASH>..<HASH> 100755
--- a/code/UserDefinedForm.php
+++ b/code/UserDefinedForm.php
@@ -659,11 +659,10 @@ JS
if(!$field->showInReports()) continue;
- // create a new submitted form field.
$submittedField = $field->getSubmittedFormField();
$submittedField->ParentID = $submittedForm->ID;
$submittedField->Name = $field->Name;
- $submittedField->Title = $field->Title;
+ $submittedField->Title = $field->getField('Title');
// save the value from the data
if($field->hasMethod('getValueFromData')) {
@@ -696,7 +695,7 @@ JS
}
if(!$this->DisableSaveSubmissions) $submittedField->write();
-
+
$submittedFields->push($submittedField);
}
diff --git a/code/submissions/SubmittedFormField.php b/code/submissions/SubmittedFormField.php
index <HASH>..<HASH> 100755
--- a/code/submissions/SubmittedFormField.php
+++ b/code/submissions/SubmittedFormField.php
@@ -25,6 +25,6 @@ class SubmittedFormField extends DataObject {
* @return String
*/
function getFormattedValue() {
- return nl2br($this->dbObject('Value')->RAW());
+ return nl2br($this->dbObject('Value')->ATT());
}
}
|
BUGFIX: fix titles and labels being escaped multiple times resulting in html entities displaying in submission pages, export and emails. Fixes <URL>
|
silverstripe_silverstripe-userforms
|
train
|
php,php
|
7e31210887a719d28eb93cc16595361d8887a536
|
diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py
index <HASH>..<HASH> 100644
--- a/pandas/core/internals/blocks.py
+++ b/pandas/core/internals/blocks.py
@@ -1084,14 +1084,9 @@ class Block(PandasObject):
inplace = validate_bool_kwarg(inplace, "inplace")
- def check_int_bool(self, inplace):
- # Only FloatBlocks will contain NaNs.
- # timedelta subclasses IntBlock
- if (self.is_bool or self.is_integer) and not self.is_timedelta:
- if inplace:
- return self
- else:
- return self.copy()
+ # Only FloatBlocks will contain NaNs. timedelta subclasses IntBlock
+ if (self.is_bool or self.is_integer) and not self.is_timedelta:
+ return self if inplace else self.copy()
# a fill na type method
try:
@@ -1100,9 +1095,6 @@ class Block(PandasObject):
m = None
if m is not None:
- r = check_int_bool(self, inplace)
- if r is not None:
- return r
return self._interpolate_with_fill(
method=m,
axis=axis,
@@ -1115,10 +1107,6 @@ class Block(PandasObject):
# validate the interp method
m = missing.clean_interp_method(method, **kwargs)
- r = check_int_bool(self, inplace)
- if r is not None:
- return r
-
assert index is not None # for mypy
return self._interpolate(
|
CLN: deduplicate in core.internals.blocks.interpolate (#<I>)
|
pandas-dev_pandas
|
train
|
py
|
06d7e690f371277ba40c89a7785f9dcb4db69c81
|
diff --git a/GPy/kern/_src/coregionalize.py b/GPy/kern/_src/coregionalize.py
index <HASH>..<HASH> 100644
--- a/GPy/kern/_src/coregionalize.py
+++ b/GPy/kern/_src/coregionalize.py
@@ -127,7 +127,7 @@ class Coregionalize(Kern):
config.set('weave', 'working', 'False')
dL_dK_small = self._gradient_reduce_weave(dL_dK, index, index2)
else:
- dL_dK_small = self._gradient_reduce_weave(dL_dK, index, index2)
+ dL_dK_small = self._gradient_reduce_numpy(dL_dK, index, index2)
|
minor weave/numpy bug in coregionalize
|
SheffieldML_GPy
|
train
|
py
|
8aae16fb4181322529cfe09f404649642635ddec
|
diff --git a/lib/db/install.php b/lib/db/install.php
index <HASH>..<HASH> 100644
--- a/lib/db/install.php
+++ b/lib/db/install.php
@@ -328,7 +328,7 @@ function xmldb_main_install() {
set_config('jsrev', time());
// No admin setting for this any more, GD is now required, remove in Moodle 2.6.
- gdversion('gdversion', 2);
+ set_config('gdversion', 2);
// Install licenses
require_once($CFG->libdir . '/licenselib.php');
|
MDL-<I> Deprecating gdversion setting: Fix typo for new install
|
moodle_moodle
|
train
|
php
|
416d2ee425e5d733433072ed6fef17808f86229d
|
diff --git a/src/components/checkout/component.js b/src/components/checkout/component.js
index <HASH>..<HASH> 100644
--- a/src/components/checkout/component.js
+++ b/src/components/checkout/component.js
@@ -126,7 +126,6 @@ export let Checkout = xcomponent.create({
required: false,
getter: true,
queryParam: 'ba_token',
- sendToChild: false,
def(props) {
diff --git a/src/fallback.js b/src/fallback.js
index <HASH>..<HASH> 100644
--- a/src/fallback.js
+++ b/src/fallback.js
@@ -3,7 +3,9 @@ import postRobot from 'post-robot/src';
function match(str, pattern) {
let regmatch = str.match(pattern);
- return regmatch && regmatch[1];
+ if (regmatch) {
+ return regmatch[1];
+ }
}
function onLegacyFallback(win) {
|
Allow billingToken to be sent to child
|
paypal_paypal-checkout-components
|
train
|
js,js
|
af6643f377e7b7601b95f5fc10bcff77cf9ffcd8
|
diff --git a/app/Blueprint/Healthcheck/HealthcheckInitService/HealthcheckInitService.php b/app/Blueprint/Healthcheck/HealthcheckInitService/HealthcheckInitService.php
index <HASH>..<HASH> 100644
--- a/app/Blueprint/Healthcheck/HealthcheckInitService/HealthcheckInitService.php
+++ b/app/Blueprint/Healthcheck/HealthcheckInitService/HealthcheckInitService.php
@@ -27,7 +27,7 @@ class HealthcheckInitService {
*/
public function init( Configurable $configurable ) {
- $healthcheckConfigurable = new PrefixConfigurableDecorator($configurable, '.healthcheck');
+ $healthcheckConfigurable = new PrefixConfigurableDecorator($configurable, 'healthcheck.');
$this->initializer->init($healthcheckConfigurable, 'enable', false);
$this->initializer->init($healthcheckConfigurable, 'url', false);
|
fixed dot placement in prefix configurable
|
ipunkt_rancherize
|
train
|
php
|
65edc60a308c456b6140a8abe711c6044f753f31
|
diff --git a/lib/3scale_toolbox/commands/import_command/openapi/update_policies_step.rb b/lib/3scale_toolbox/commands/import_command/openapi/update_policies_step.rb
index <HASH>..<HASH> 100644
--- a/lib/3scale_toolbox/commands/import_command/openapi/update_policies_step.rb
+++ b/lib/3scale_toolbox/commands/import_command/openapi/update_policies_step.rb
@@ -64,6 +64,9 @@ module ThreeScaleToolbox
return if policies.any? { |policy| policy['name'] == 'keycloak_role_check' }
+ # only when there are scopes defined
+ return if security.scopes.empty?
+
policies << keycloak_policy
end
diff --git a/spec/unit/commands/import_command/openapi/update_policies_spec.rb b/spec/unit/commands/import_command/openapi/update_policies_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/commands/import_command/openapi/update_policies_spec.rb
+++ b/spec/unit/commands/import_command/openapi/update_policies_spec.rb
@@ -148,6 +148,16 @@ RSpec.describe ThreeScaleToolbox::Commands::ImportCommand::OpenAPI::UpdatePolici
subject
end
end
+
+ context 'empty scope array' do
+ let(:scopes) { [] }
+
+ it 'policy chain not updated' do
+ # doubles are strict by default.
+ # if service double receives `update_policies` call, test will fail
+ subject
+ end
+ end
end
context 'same private and public base paths' do
|
openapi: create keycloak policy only when scopes are not empty
|
3scale_3scale_toolbox
|
train
|
rb,rb
|
cc60dd19e75f5c83ef48816fbc888bb09a83a3f0
|
diff --git a/tests/Sharing/BucketsTest.php b/tests/Sharing/BucketsTest.php
index <HASH>..<HASH> 100644
--- a/tests/Sharing/BucketsTest.php
+++ b/tests/Sharing/BucketsTest.php
@@ -321,19 +321,14 @@ class BucketsTest extends StorageApiTestCase
$this->fail('Shared table delete should fail');
} catch (ClientException $e) {
$this->assertEquals('tables.cannotDeletedTableWithAliases', $e->getStringCode());
- // $this->assertEquals('tables.cannotDeleteTableWithLinks', $e->getStringCode());
}
- //@FIXME
- /*
try {
$this->_client->deleteTableColumn($table['id'], 'name');
$this->fail('Shared table column delete should fail');
} catch (ClientException $e) {
- $this->assertEquals('tables.cannotDeleteRowWithLinks', $e->getStringCode());
- $this->assertEquals('tables.cannotDeleteRowWithLinks', $e->getStringCode());
+ $this->assertEquals('storage.buckets.alreadyLinked', $e->getStringCode());
}
- */
}
// bucket drop
|
shared-buckets: test for restricted column drop
|
keboola_storage-api-php-client
|
train
|
php
|
d423742d46a95d8be53b93f9a86852e61b557e12
|
diff --git a/functional_tests/test_surface_surface.py b/functional_tests/test_surface_surface.py
index <HASH>..<HASH> 100644
--- a/functional_tests/test_surface_surface.py
+++ b/functional_tests/test_surface_surface.py
@@ -547,7 +547,7 @@ def test_surfaces1L_and_3L():
edge_inds1, edge_inds2)
-def test_surfaces1Q_and_2Q():
+def test_surfaces1Q_and_2Q(): # pylint: disable=too-many-locals
s_val1, _ = runtime_utils.real_roots([3, -21, 10])
_, s_val2 = runtime_utils.real_roots([12, -24, 0, 140, -105])
s_val3, _ = runtime_utils.real_roots([12, -72, 56, -100, 23])
@@ -776,7 +776,7 @@ def test_surfaces4L_and_23Q():
make_plots(SURFACE4L, SURFACE23Q, points)
-def test_surfaces6Q_and_7Q():
+def test_surfaces6Q_and_7Q(): # pylint: disable=too-many-locals
s_val3, _ = runtime_utils.real_roots([1, -13, 2])
_, s_val4 = runtime_utils.real_roots([7, 5, -10])
s_val5, s_val6 = runtime_utils.real_roots([4, 120, 1592, -1908, 489])
|
Lint fix (using too many locals to define intersection pts).
|
dhermes_bezier
|
train
|
py
|
ee44a4b583b48f82235037c6bc3fa2cb51e1166d
|
diff --git a/src/main/java/org/jdbdt/DataSet.java b/src/main/java/org/jdbdt/DataSet.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jdbdt/DataSet.java
+++ b/src/main/java/org/jdbdt/DataSet.java
@@ -33,7 +33,7 @@ public class DataSet {
* Constructs a new data set.
* @param ds Data source.
*/
- DataSet(DataSource ds) {
+ public DataSet(DataSource ds) {
this(ds, new ArrayList<>());
}
|
DataSet: constructor now public (no reason to be "obscure" about this)
|
JDBDT_jdbdt
|
train
|
java
|
20f13d6fab2201482141918ed398ab8ad6ef616b
|
diff --git a/framework/messages/ar/yii.php b/framework/messages/ar/yii.php
index <HASH>..<HASH> 100644
--- a/framework/messages/ar/yii.php
+++ b/framework/messages/ar/yii.php
@@ -66,6 +66,7 @@ return [
'{attribute} must be a string.' => '{attribute} يجب أن يكون كلمات',
'{attribute} must be an integer.' => '{attribute} يجب أن يكون رقمًا صحيحًا',
'{attribute} must be either "{true}" or "{false}".' => '{attribute} يجب أن يكن إما "{true}" أو "{false}".',
+ '{attribute} must be equal to "{compareValueOrAttribute}".' => '{attribute} يجب أن يساوي "{compareValueOrAttribute}".',
'{attribute} must be greater than "{compareValue}".' => '{attribute} يجب أن يكون أكبر من "{compareValue}".',
'{attribute} must be greater than or equal to "{compareValue}".' => '{attribute} يجب أن يكون أكبر من أو يساوي "{compareValue}".',
'{attribute} must be less than "{compareValue}".' => '{attribute} يجب أن يكون أصغر من "{compareValue}".',
|
Update yii.php (#<I>)
Add a missing translation [skip ci]
|
yiisoft_yii-core
|
train
|
php
|
f8248513ee97cdd950f21ef3cab3d892a4f5f0c3
|
diff --git a/cli.test.js b/cli.test.js
index <HASH>..<HASH> 100644
--- a/cli.test.js
+++ b/cli.test.js
@@ -174,6 +174,8 @@ test('config', t => {
.then(() => {
cli.getCurrentRegistry((cur) => {
const npmrc = ini.parse(fs.readFileSync(NPMRC, 'utf-8'));
+ // `npm.config.get('registry')` will get a wrong registry, maybe cause below statement to fail
+ // just do not know why
t.equal(cur, registry, 'can get registry rightly');
t.equal(npmrc.registry, registry, 'can set registry rightly');
t.equal(npmrc.home, home, 'can set home rightly');
|
add comment for why test case will fail
|
Pana_nrm
|
train
|
js
|
e325a22ef4e56d86caccf24b52c40bc254e13cbe
|
diff --git a/stimela_misc/stimela-test-ngc417.py b/stimela_misc/stimela-test-ngc417.py
index <HASH>..<HASH> 100644
--- a/stimela_misc/stimela-test-ngc417.py
+++ b/stimela_misc/stimela-test-ngc417.py
@@ -562,17 +562,17 @@ recipe.add("cab/ddfacet", "ddfacet_test",
{
"Data-MS": [MS],
"Output-Name": imname,
- "Image-NPix": 4084,
- "Image-Cell": 1,
+ "Image-NPix": 2048,
+ "Image-Cell": 2,
"Cache-Reset": True,
- "Freq-NBand": 4,
+ "Freq-NBand": 2,
"Weight-ColName": "WEIGHT",
"Beam-Model": "FITS",
"Beam-FITSFile": "'beams/JVLA-L-centred-$(xy)_$(reim).fits'",
"Data-ChunkHours": 0.5,
"Data-Sort": True,
"Log-Boring": True,
- "Deconv-MaxMajorIter": 2,
+ "Deconv-MaxMajorIter": 1,
"Deconv-MaxMinorIter": 500,
},
input=INPUT, output=OUTPUT, shared_memory="36gb",
|
Do one major iteration in DDFacet
|
SpheMakh_Stimela
|
train
|
py
|
b371401058096cc2a50cd87d41d4763239b89153
|
diff --git a/Classes/Domain/Repository/StorageRepository.php b/Classes/Domain/Repository/StorageRepository.php
index <HASH>..<HASH> 100644
--- a/Classes/Domain/Repository/StorageRepository.php
+++ b/Classes/Domain/Repository/StorageRepository.php
@@ -84,6 +84,7 @@ class StorageRepository implements SingletonInterface
public function write(array $json): TableDefinitionCollection
{
$tableDefinitionCollection = TableDefinitionCollection::createFromArray($json);
+ $tableDefinitionCollection->setToCurrentVersion();
$this->loader->write($tableDefinitionCollection);
return $tableDefinitionCollection;
}
|
[BUGFIX] Set version to current in StorageRepository->write
|
Gernott_mask
|
train
|
php
|
b0c095e75dbc0eb357aeaa0bff6c5cd101f6f9f9
|
diff --git a/lib/ffi-geos/version.rb b/lib/ffi-geos/version.rb
index <HASH>..<HASH> 100644
--- a/lib/ffi-geos/version.rb
+++ b/lib/ffi-geos/version.rb
@@ -1,6 +1,6 @@
# encoding: UTF-8
module Geos
- VERSION = "0.3.1.dev"
+ VERSION = "0.4.0"
end
|
Bump to version <I>.
|
dark-panda_ffi-geos
|
train
|
rb
|
fa7e771cc34fd88aedfb969a1a2b1f5c19680611
|
diff --git a/sos/report/plugins/foreman.py b/sos/report/plugins/foreman.py
index <HASH>..<HASH> 100644
--- a/sos/report/plugins/foreman.py
+++ b/sos/report/plugins/foreman.py
@@ -268,6 +268,11 @@ class Foreman(Plugin):
"/var/log/foreman-installer/sat*",
sat_debug_reg,
r"\1 \2 ********")
+ # also hide passwords in yet different format
+ self.do_path_regex_sub(
+ "/var/log/foreman-installer/sat*",
+ r"--password=(\S*)",
+ r"--password=********")
self.do_path_regex_sub(
"/var/log/foreman-installer/foreman-proxy*",
r"(\s*proxy_password\s=) (.*)",
|
[foreman] scrub cpdb password in installer logs
Obfuscate passwords in logs like
..'cpdb --create .. --password='Qg6Fej9wekDGiWrMDR9j8WWgwcq4dyP3' ..
Resolves: #<I>
|
sosreport_sos
|
train
|
py
|
16096ff32c182eb5479b99c37c60d675d5ae80cd
|
diff --git a/lib/foundation_rails_helper/form_builder.rb b/lib/foundation_rails_helper/form_builder.rb
index <HASH>..<HASH> 100644
--- a/lib/foundation_rails_helper/form_builder.rb
+++ b/lib/foundation_rails_helper/form_builder.rb
@@ -201,7 +201,6 @@ module FoundationRailsHelper
end
def field_label(attribute, options)
- auto_labels = @options[:auto_labels] != false
return ''.html_safe unless auto_labels || options[:label]
custom_label(attribute, options[:label], options[:label_options])
end
|
Fix auto labels regression
Introduced after rebasing on top of #<I>
|
sgruhier_foundation_rails_helper
|
train
|
rb
|
b7c91178a941fc855f2c159626028d3d90986d6b
|
diff --git a/packages/babel-runtime/scripts/build-dist.js b/packages/babel-runtime/scripts/build-dist.js
index <HASH>..<HASH> 100644
--- a/packages/babel-runtime/scripts/build-dist.js
+++ b/packages/babel-runtime/scripts/build-dist.js
@@ -1,10 +1,10 @@
var outputFile = require("output-file-sync");
-var transform = require("../../babel/lib/transformation");
+var transform = require("../../babel-core/lib/transformation");
var each = require("lodash/collection/each");
-var File = require("../../babel/lib/transformation/file");
-var util = require("../../babel/lib/util");
+var File = require("../../babel-core/lib/transformation/file");
+var util = require("../../babel-core/lib/util");
var fs = require("fs");
-var t = require("../../babel/lib/types");
+var t = require("../../babel-types");
var _ = require("lodash");
function relative(filename) {
|
fix babel-runtime build-dist requires
|
babel_babel
|
train
|
js
|
c11edc9a98501cab108fef8063e2c26b460a2da9
|
diff --git a/src/Renderer/AbstractFormRenderer.php b/src/Renderer/AbstractFormRenderer.php
index <HASH>..<HASH> 100644
--- a/src/Renderer/AbstractFormRenderer.php
+++ b/src/Renderer/AbstractFormRenderer.php
@@ -48,7 +48,6 @@ abstract class AbstractFormRenderer implements FormRendererInterface
public function __construct()
{
$this->resetDom();
- $this->errorRenderer = new DefaultErrorRender($this->dom);
}
/**
@@ -58,6 +57,7 @@ abstract class AbstractFormRenderer implements FormRendererInterface
{
$this->setDom(new DOMDocument());
$this->form = $this->getDom()->createElement('form');
+ $this->errorRenderer = new DefaultErrorRender($this->dom);
}
/**
|
Reset DOM to fix wrong document error on fileupload error block
|
delboy1978uk_form
|
train
|
php
|
2795b3d81576fe58379a627c8b93482c2b8fb9c8
|
diff --git a/dpark/rdd.py b/dpark/rdd.py
index <HASH>..<HASH> 100644
--- a/dpark/rdd.py
+++ b/dpark/rdd.py
@@ -1066,14 +1066,14 @@ class GZipFileRDD(TextFileRDD):
while True:
p = block.find(ENDING)
while p < 0:
- pos += len(block) - 3
+ pos += max(len(block) - 3, 0)
block = block[-3:] + f.read(32<<10)
- if len(block) == 3:
+ if len(block) < 4:
return pos + 3 # EOF
p = block.find(ENDING)
pos += p + 4
block = block[p+4:]
- if not block:
+ if len(block) < 4096:
block += f.read(4096)
if not block:
return pos # EOF
|
bugfix: pos is wrong when len(block) < 3
|
douban_dpark
|
train
|
py
|
642c2a9fdddef5306ea4094edeb014f600e60cd9
|
diff --git a/lib/droplet_kit/version.rb b/lib/droplet_kit/version.rb
index <HASH>..<HASH> 100644
--- a/lib/droplet_kit/version.rb
+++ b/lib/droplet_kit/version.rb
@@ -1,3 +1,3 @@
module DropletKit
- VERSION = "1.2.2"
+ VERSION = "1.2.3"
end
|
Bump patch version for pagination fixes.
|
digitalocean_droplet_kit
|
train
|
rb
|
428ba0c1cf09a84097e0641369f38df78945972b
|
diff --git a/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/report-generator.js b/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/report-generator.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/report-generator.js
+++ b/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/report-generator.js
@@ -14,7 +14,7 @@ const ReportGenerator = SparkPlugin.extend({
props: {
zip: 'object',
folder: 'object',
- count: 'int'
+ count: 'number'
},
/**
|
feat(ediscovery): switching from int to number
|
webex_spark-js-sdk
|
train
|
js
|
d4570bdde5f0de68f67ced19ae4cd4db02f28258
|
diff --git a/pysos/utils.py b/pysos/utils.py
index <HASH>..<HASH> 100644
--- a/pysos/utils.py
+++ b/pysos/utils.py
@@ -952,7 +952,7 @@ class RuntimeInfo:
env.logger.waring('{} not need to be checked'.format(f))
continue
if partialMD5(f) != m.strip():
- env.logger.error('MD5 mismatch {}'.format(f))
+ env.logger.debug('MD5 mismatch {}'.format(f))
return False
files_checked[f] = True
#
|
Reduce a message of MD5 mismatch from error to debug
|
vatlab_SoS
|
train
|
py
|
ddf58646129ae8a47390d1498ba07793e79aee8a
|
diff --git a/vaex/dataset.py b/vaex/dataset.py
index <HASH>..<HASH> 100644
--- a/vaex/dataset.py
+++ b/vaex/dataset.py
@@ -414,7 +414,7 @@ class TaskStatistic(Task):
mask = self.dataset.evaluate_selection_mask(selection, i1=i1, i2=i2)
if mask is None:
raise ValueError("performing operation on selection while no selection present")
- selection_blocks = [block[mask[i1:i2]] for block in blocks]
+ selection_blocks = [block[mask] for block in blocks]
else:
selection_blocks = [block for block in blocks]
subblock_weight = None
|
bugfix for selections in new api
|
vaexio_vaex
|
train
|
py
|
233954da7456cc408bfe9de0bee6b7e482dae321
|
diff --git a/client/decorators/DecoratorWithPorts/Core/Port.js b/client/decorators/DecoratorWithPorts/Core/Port.js
index <HASH>..<HASH> 100644
--- a/client/decorators/DecoratorWithPorts/Core/Port.js
+++ b/client/decorators/DecoratorWithPorts/Core/Port.js
@@ -109,6 +109,10 @@ define(['logManager',
//now it has WEST orientation
this.$el.prepend(this.$connectors).prepend(this.$portDot);
}
+
+ if (this.decorator._displayConnectors !== true) {
+ this.$connectors.remove();
+ }
}
}
|
bugfix: do not display connectors on port position change if not needed by the decorator
Former-commit-id: f4f<I>ea<I>e9c<I>d<I>d1eb<I>bccf<I>fc<I>d1
|
webgme_webgme-engine
|
train
|
js
|
63f564c943344133404087ec45e53460a02e5262
|
diff --git a/spec/functional/invoice_spec.rb b/spec/functional/invoice_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/functional/invoice_spec.rb
+++ b/spec/functional/invoice_spec.rb
@@ -96,7 +96,7 @@ describe 'harvest invoices' do
invoices = harvest.invoices.all(:status => 'draft', :page => 1)
invoices.count.should == 1
- invoices = harvest.invoices.all(:timeframe => {:from => Date.today, :to => Date.today})
+ invoices = harvest.invoices.all(:timeframe => {:from => '2014-01-01', :to => '2014-01-01'})
invoices.count.should == 1
invoices = harvest.invoices.all(:timeframe => {:from => '19690101', :to => '19690101'})
|
Looks like from/to semantics changed
Now they search on issued_at
|
zmoazeni_harvested
|
train
|
rb
|
51a0638553b6aa95b8c0812edd3f5323267814d0
|
diff --git a/config/webpack.loaders.js b/config/webpack.loaders.js
index <HASH>..<HASH> 100644
--- a/config/webpack.loaders.js
+++ b/config/webpack.loaders.js
@@ -30,7 +30,7 @@ module.exports = [
loader: 'html-loader',
}, {
test: /\.js$/,
- include: /node_modules\/|\\paraviewweb\/|\\/,
+ include: /node_modules(\/|\\)paraviewweb(\/|\\)/,
loader: 'babel?presets[]=es2015,presets[]=react',
}, {
test: /\.js$/,
|
fix(loaders): Fix loader rule used by other projects
Fix broken loader rule which caused everything matching either
node_modules or paraviewweb to be run through babel, instead of
only things matching node_modules/paraviewweb/.
|
Kitware_paraviewweb
|
train
|
js
|
75fe4efe1eb4b61b66f99281e8d642d3723a8d27
|
diff --git a/lxd/swagger.go b/lxd/swagger.go
index <HASH>..<HASH> 100644
--- a/lxd/swagger.go
+++ b/lxd/swagger.go
@@ -137,3 +137,21 @@ type swaggerInternalServerError struct {
Error string `json:"error"`
}
}
+
+// Not found
+//
+// swagger:response NotFound
+type swaggerNotFound struct {
+ // Not found
+ // in: body
+ Body struct {
+ // Example: error
+ Type string `json:"type"`
+
+ // Example: 404
+ Code int `json:"code"`
+
+ // Example: not found
+ Error string `json:"error"`
+ }
+}
|
lxd/swagger: Add NotFound response
|
lxc_lxd
|
train
|
go
|
e6568b0c5bdd726bcc20b128a1f9d0af1b5a2f2d
|
diff --git a/pymola/backends/casadi/model.py b/pymola/backends/casadi/model.py
index <HASH>..<HASH> 100644
--- a/pymola/backends/casadi/model.py
+++ b/pymola/backends/casadi/model.py
@@ -264,6 +264,11 @@ class Model:
reduced_equations = []
for eq in self.equations:
+ if eq.is_symbolic() and eq.name() in alg_states and p.match(eq.name()):
+ variables.append(eq)
+ values.append(0.0)
+ # Skip this equation
+ continue
if eq.n_dep() == 2 and (eq.is_op(ca.OP_SUB) or eq.is_op(ca.OP_ADD)):
if eq.dep(0).is_symbolic() and eq.dep(0).name() in alg_states and p.match(eq.dep(0).name()):
variable = eq.dep(0)
|
check symbolic equations for eliminable_variable_expression
|
pymoca_pymoca
|
train
|
py
|
c2a4d31c02cee24aec12fec974c8ee4b7178f2a9
|
diff --git a/gunicorn.conf.py b/gunicorn.conf.py
index <HASH>..<HASH> 100644
--- a/gunicorn.conf.py
+++ b/gunicorn.conf.py
@@ -34,9 +34,11 @@ def context_factory():
get_context = context_factory()
+collector_addr = 'tcp://127.0.0.2:2345'
+
def pre_request(worker, req):
_collector = get_context().socket(zmq.REQ)
- _collector.connect('tcp://127.0.0.2:2345')
+ _collector.connect(collector_addr)
_collector.send_multipart(['my_app', ''])
_collector.recv()
@@ -53,7 +55,7 @@ def post_request(worker, req):
del requests[req]
_collector = get_context().socket(zmq.REQ)
- _collector.connect('tcp://127.0.0.2:2345')
+ _collector.connect(collector_addr)
_collector.send_multipart(['my_app', str(req_time)])
_collector.recv()
|
more better: address set in one place
|
m0n5t3r_gstats
|
train
|
py
|
2a9c3bbbf0b75d6a416343e061b4ac9203a38dc8
|
diff --git a/session/clustered_index_test.go b/session/clustered_index_test.go
index <HASH>..<HASH> 100644
--- a/session/clustered_index_test.go
+++ b/session/clustered_index_test.go
@@ -517,7 +517,7 @@ func (s *testClusteredSuite) TestClusteredIndexSelectWhereInNull(c *C) {
tk.MustQuery("select * from t where a in (null);").Check(testkit.Rows( /* empty result */ ))
}
-func (s *testClusteredSuite) TestClusteredIndexSyntax(c *C) {
+func (s *testClusteredSerialSuite) TestClusteredIndexSyntax(c *C) {
tk := testkit.NewTestKitWithInit(c, s.store)
const showPKType = `select tidb_pk_type from information_schema.tables where table_schema = 'test' and table_name = 't';`
const nonClustered, clustered = `NONCLUSTERED`, `CLUSTERED`
|
session, test: make `TestClusteredIndexSyntax` stable (#<I>)
|
pingcap_tidb
|
train
|
go
|
5661867e0ea8e572bb5b18e7afc874b3db253e3f
|
diff --git a/lib/authlogic/session/foundation.rb b/lib/authlogic/session/foundation.rb
index <HASH>..<HASH> 100644
--- a/lib/authlogic/session/foundation.rb
+++ b/lib/authlogic/session/foundation.rb
@@ -53,6 +53,10 @@ module Authlogic
"#<#{self.class.name}: #{credentials.blank? ? "no credentials provided" : credentials.inspect}>"
end
+ def to_key
+ new_record? ? nil : [ self.send(self.class.primary_key) ]
+ end
+
private
def build_key(last_part)
last_part
|
add to_key for rails 3, thanks to nzadrozny
|
binarylogic_authlogic
|
train
|
rb
|
3814f7046726a652d7f59ebe4b4f58811734abd3
|
diff --git a/src/main/java/io/vlingo/wire/fdx/bidirectional/ServerRequestResponseChannelActor.java b/src/main/java/io/vlingo/wire/fdx/bidirectional/ServerRequestResponseChannelActor.java
index <HASH>..<HASH> 100644
--- a/src/main/java/io/vlingo/wire/fdx/bidirectional/ServerRequestResponseChannelActor.java
+++ b/src/main/java/io/vlingo/wire/fdx/bidirectional/ServerRequestResponseChannelActor.java
@@ -66,7 +66,7 @@ public class ServerRequestResponseChannelActor extends Actor implements ServerRe
} catch (Exception e) {
final String message = "Failure opening socket because: " + e.getMessage();
logger().log(message, e);
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException(message);
}
this.cancellable = stage().scheduler().schedule(selfAs(Scheduled.class), null, 100, probeInterval);
|
Explicit exception handling to understand socket issues.
|
vlingo_vlingo-wire
|
train
|
java
|
31455def83f99d42b0e5e146c20b4f52ca2f71da
|
diff --git a/lib/model_extensions.rb b/lib/model_extensions.rb
index <HASH>..<HASH> 100644
--- a/lib/model_extensions.rb
+++ b/lib/model_extensions.rb
@@ -167,7 +167,7 @@ module Offroad
end
if self.class.offroad_group_data?
- if obj.class.offroad_group_data? && obj.owning_group.id != owning_group.id
+ if obj.class.offroad_group_data? && obj.owning_group && obj.owning_group.id != owning_group.id
raise DataError.new("Invalid #{colname}: Group data cannot hold a foreign key to data owned by another group")
end
elsif self.class.offroad_global_data?
|
When checking foreign key group matching, making sure target actually has a group
|
DavidMikeSimon_offroad
|
train
|
rb
|
e673963057eb11cd0ec95935b1d163a69820ceda
|
diff --git a/lib/runner.js b/lib/runner.js
index <HASH>..<HASH> 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -159,6 +159,7 @@ Runner.prototype.hook = function(name, fn){
});
hook.run(function(err){
+ hook.removeAllListeners('error');
if (err) return self.failHook(hook, err);
self.emit('hook end', hook);
next(++i);
|
Fixed event emitter leak. Closes #<I>
|
mochajs_mocha
|
train
|
js
|
01fe5893c01e3a6e60a5239e59dc4c74ef487545
|
diff --git a/utils/index_mapping.py b/utils/index_mapping.py
index <HASH>..<HASH> 100755
--- a/utils/index_mapping.py
+++ b/utils/index_mapping.py
@@ -30,7 +30,7 @@ import sys
import requests
-from grimoire_elk.elk.elastic import ElasticSearch
+from grimoire_elk.elastic import ElasticSearch
from grimoire_elk.utils import get_connectors, get_connector_name_from_cls_name
DEFAULT_LIMIT = 1000
|
[index_mapping] Update elastic import
This code updates the import of the elastic class
|
chaoss_grimoirelab-elk
|
train
|
py
|
efb139f7ad22dc4a31d8ef8d5c1d67623b2563e3
|
diff --git a/test/unit/support.js b/test/unit/support.js
index <HASH>..<HASH> 100644
--- a/test/unit/support.js
+++ b/test/unit/support.js
@@ -83,7 +83,7 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo
"cors":true,
"doesNotIncludeMarginInBodyOffset":true
};
- } else if ( /opera/i.test( userAgent ) ) {
+ } else if ( /opera.*version\/12\.1/i.test( userAgent ) ) {
expected = {
"leadingWhitespace":true,
"tbody":true,
|
Do not perform support check for old Opera. Close gh-<I>.
|
jquery_jquery
|
train
|
js
|
ffac8e2d0b9ef29448685f81343a05e7d333757a
|
diff --git a/model/src/Component.php b/model/src/Component.php
index <HASH>..<HASH> 100644
--- a/model/src/Component.php
+++ b/model/src/Component.php
@@ -143,7 +143,10 @@ class Component extends BaseEloquent
{
$name = str_replace('_', '-', $name);
- if( ! Str::contains($name, '/') ) {
+ if($name === 'core') {
+ $name = 'antaresproject/core';
+ }
+ else if( ! Str::contains($name, '/') ) {
$name = 'antaresproject/component-' . $name;
}
|
FIX: resolving component name based on short one
|
antaresproject_core
|
train
|
php
|
488799078e3c153b8e30712bc1d953e6e2065d4b
|
diff --git a/certsuite/cert.py b/certsuite/cert.py
index <HASH>..<HASH> 100755
--- a/certsuite/cert.py
+++ b/certsuite/cert.py
@@ -145,7 +145,8 @@ def log_results(diff, logger, report, name):
logger.test_status('webapi', name, 'PASS')
def parse_results(expected_results_path, results, prefix, logger, report):
- expected_results = json.loads(open(expected_results_path, 'r').read())
+ with open(expected_results_path) as f:
+ expected_results = json.load(f)
webapi_passed = True
@@ -306,6 +307,8 @@ def cli():
# Step 2: Navigate to local hosted web server to install app for
# WebIDL iteration and fetching HTTP headers
if 'webapi' in test_groups:
+ logger.test_start('webapi')
+
addr = (moznetwork.get_ip(), 8080)
httpd = wptserve.server.WebTestHttpd(
host=addr[0], port=addr[1], routes=routes, doc_root=static_path)
|
Fixes for ato's review
|
mozilla-b2g_fxos-certsuite
|
train
|
py
|
a514e637c8f73e5d8a9968e06918a082fc1657ca
|
diff --git a/lib/rabl-rails/renderer.rb b/lib/rabl-rails/renderer.rb
index <HASH>..<HASH> 100644
--- a/lib/rabl-rails/renderer.rb
+++ b/lib/rabl-rails/renderer.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/module/attribute_accessors'
+
require 'rabl-rails/renderers/hash'
require 'rabl-rails/renderers/json'
require 'rabl-rails/renderers/xml'
|
Require correct active_support extension per file
|
ccocchi_rabl-rails
|
train
|
rb
|
9e2b49139f6b16742a5b2dc5ea096ea47db23944
|
diff --git a/app/gosqs/gosqs.go b/app/gosqs/gosqs.go
index <HASH>..<HASH> 100644
--- a/app/gosqs/gosqs.go
+++ b/app/gosqs/gosqs.go
@@ -572,8 +572,8 @@ func DeleteMessageBatch(w http.ResponseWriter, req *http.Request) {
app.SyncQueues.Lock()
if _, ok := app.SyncQueues.Queues[queueName]; ok {
- for i, msg := range app.SyncQueues.Queues[queueName].Messages {
- for _, deleteEntry := range deleteEntries {
+ for _, deleteEntry := range deleteEntries {
+ for i, msg := range app.SyncQueues.Queues[queueName].Messages {
if msg.ReceiptHandle == deleteEntry.ReceiptHandle {
// Unlock messages for the group
log.Printf("FIFO Queue %s unlocking group %s:", queueName, msg.GroupID)
@@ -583,6 +583,7 @@ func DeleteMessageBatch(w http.ResponseWriter, req *http.Request) {
deleteEntry.Deleted = true
deletedEntry := app.DeleteMessageBatchResultEntry{Id: deleteEntry.Id}
deletedEntries = append(deletedEntries, deletedEntry)
+ break
}
}
}
|
Fix 'slice bounds out of range' in DeleteMessageBatch
|
p4tin_goaws
|
train
|
go
|
52085092ac0b774ca5b3e84d3c7d8e7c980b97f3
|
diff --git a/components/permissions-ng/permissions-ng.js b/components/permissions-ng/permissions-ng.js
index <HASH>..<HASH> 100644
--- a/components/permissions-ng/permissions-ng.js
+++ b/components/permissions-ng/permissions-ng.js
@@ -157,6 +157,7 @@ angularModule.directive('rgPermissionIf', ($animate, userPermissions, $interpola
priority: 600,
terminal: true,
restrict: 'A',
+ $$tlb: true, // eslint-disable-line angular/no-private-call
require: '^?rgSomePermissions',
link(scope, iElement, iAttrs, somePermittedCtrl, $transclude) {
let block;
|
permissionsNg: rgPermissionIf should not throw error about multiple transclude like ngIf
Former-commit-id: 6e4c<I>b8f<I>ca<I>a<I>a2decaa9ad<I>
|
JetBrains_ring-ui
|
train
|
js
|
9983e05535c2954c544fac94be9c42f3ab8f2191
|
diff --git a/core/client/router.js b/core/client/router.js
index <HASH>..<HASH> 100755
--- a/core/client/router.js
+++ b/core/client/router.js
@@ -4,7 +4,7 @@
var Router = Ember.Router.extend();
Router.reopen({
- //location: 'history', // use HTML5 History API instead of hash-tag based URLs
+ location: 'history', // use HTML5 History API instead of hash-tag based URLs
rootURL: '/ghost/ember/' // admin interface lives under sub-directory /ghost
});
diff --git a/core/server/routes/admin.js b/core/server/routes/admin.js
index <HASH>..<HASH> 100644
--- a/core/server/routes/admin.js
+++ b/core/server/routes/admin.js
@@ -58,5 +58,5 @@ module.exports = function (server) {
});
server.get('/ghost/', admin.indexold);
- server.get('/ghost/ember/', admin.index);
+ server.get('/ghost/ember/*', admin.index);
};
\ No newline at end of file
|
Add HTML5 pushState support for Ember
- also updates associated route
|
TryGhost_Ghost
|
train
|
js,js
|
59a296af10a547233d1df6f30a94113c7dd98d43
|
diff --git a/go/vt/worker/vtworkerclienttest/client_testsuite.go b/go/vt/worker/vtworkerclienttest/client_testsuite.go
index <HASH>..<HASH> 100644
--- a/go/vt/worker/vtworkerclienttest/client_testsuite.go
+++ b/go/vt/worker/vtworkerclienttest/client_testsuite.go
@@ -138,6 +138,8 @@ func commandErrorsBecauseBusy(t *testing.T, client vtworkerclient.Client, server
errChan <- err
close(blockCommandStarted)
return
+ } else {
+ errChan <- nil
}
firstLineReceived := false
|
send to errchan anyway to cancel race
|
vitessio_vitess
|
train
|
go
|
6f8e9b593f36e31e808239764ce65d21685d016c
|
diff --git a/mongoctl/repository.py b/mongoctl/repository.py
index <HASH>..<HASH> 100644
--- a/mongoctl/repository.py
+++ b/mongoctl/repository.py
@@ -3,6 +3,7 @@
__author__ = 'abdul'
import pymongo
+import pymongo.read_preferences
import config
from bson import DBRef
@@ -53,9 +54,7 @@ def get_mongoctl_database():
log_verbose("Connecting to mongoctl db...")
try:
- (conn, dbname) = _db_repo_connect()
-
- __mongoctl_db__ = conn[dbname]
+ __mongoctl_db__ = _db_repo_connect()
return __mongoctl_db__
except Exception, e:
log_exception(e)
@@ -89,9 +88,10 @@ def is_db_repository_online():
def _db_repo_connect():
db_conf = config.get_database_repository_conf()
uri = db_conf["databaseURI"]
- conn = pymongo.Connection(uri)
- dbname = parse_mongo_uri(uri).database
- return conn, dbname
+ client = pymongo.MongoClient(uri, read_preference=
+ pymongo.read_preferences.ReadPreference.PRIMARY_PREFERRED)
+ return client.get_default_database()
+
###############################################################################
|
Use MongoClient for mongoctl repo connection
|
mongolab_mongoctl
|
train
|
py
|
95341801f91f337a9335585e05266690e0b0f9c1
|
diff --git a/engine/src/main/java/com/stratio/decision/functions/SaveToMongoActionExecutionFunction.java b/engine/src/main/java/com/stratio/decision/functions/SaveToMongoActionExecutionFunction.java
index <HASH>..<HASH> 100644
--- a/engine/src/main/java/com/stratio/decision/functions/SaveToMongoActionExecutionFunction.java
+++ b/engine/src/main/java/com/stratio/decision/functions/SaveToMongoActionExecutionFunction.java
@@ -74,7 +74,7 @@ public class SaveToMongoActionExecutionFunction extends BaseActionExecutionFunct
}
} catch (Exception e) {
- log.error("Error in Mongo: " + e.getMessage());
+ log.error("Error saving in Mongo: " + e.getMessage());
}
}
|
Corrected bug when the persistence is down during Decision is inserting data.
|
Stratio_Decision
|
train
|
java
|
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.