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 |
|---|---|---|---|---|---|
e1282b7f2fd6a5f21f09d78dc604db069ec9f27b | diff --git a/spacy/tests/matcher/test_matcher_bugfixes.py b/spacy/tests/matcher/test_matcher_bugfixes.py
index <HASH>..<HASH> 100644
--- a/spacy/tests/matcher/test_matcher_bugfixes.py
+++ b/spacy/tests/matcher/test_matcher_bugfixes.py
@@ -113,7 +113,6 @@ def test_ner_interaction(EN):
doc = EN.tokenizer(u'get me a flight from SFO to LAX leaving 20 December and arriving on January 5th')
EN.tagger(doc)
EN.matcher(doc)
- EN.entity.add_label('AIRPORT')
EN.entity(doc)
ents = [(ent.label_, ent.text) for ent in doc.ents] | * Require user-custom NER classes to work without adding the label. | explosion_spaCy | train | py |
525565d430dffbcc0946ca054ccc29792b1a535d | diff --git a/docs/source/conf.py b/docs/source/conf.py
index <HASH>..<HASH> 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -56,7 +56,7 @@ author = u'Conor Svensson'
# The short X.Y version.
version = u'3.0'
# The full version, including alpha/beta/rc tags.
-release = u'3.0.0'
+release = u'3.0.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. | Updated version in conf.py. | web3j_web3j | train | py |
4de092d31d4ca05b7249e2f80bcf4e1560e35713 | diff --git a/packages/openneuro-server/graphql/resolvers/dataset.js b/packages/openneuro-server/graphql/resolvers/dataset.js
index <HASH>..<HASH> 100644
--- a/packages/openneuro-server/graphql/resolvers/dataset.js
+++ b/packages/openneuro-server/graphql/resolvers/dataset.js
@@ -34,13 +34,13 @@ export const datasetName = obj => {
if (results) {
// Return the latest snapshot name
const sortedSnapshots = results.sort(snapshotCreationComparison)
- return description(null, {
+ return description(obj, {
datasetId: obj.id,
revision: sortedSnapshots[0].hexsha,
}).then(desc => desc.Name)
} else if (obj.revision) {
// Return the draft name or null
- description(null, {
+ description(obj, {
datasetId: obj.id,
revision: obj.revision,
}).then(desc => desc.Name) | Include parent object in datasetName description call. | OpenNeuroOrg_openneuro | train | js |
70ca25aa7037bf654a31980310cb9fb611c9ca20 | diff --git a/src/main/java/org/dbflute/jetty/JettyBoot.java b/src/main/java/org/dbflute/jetty/JettyBoot.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/dbflute/jetty/JettyBoot.java
+++ b/src/main/java/org/dbflute/jetty/JettyBoot.java
@@ -522,6 +522,9 @@ public class JettyBoot {
// -----------------------------------------------------
// Classpath Jar
// -------------
+ // cannot use web-fragment and meta-inf as default
+ // because jetty does not see classpath jar resources
+ // so manually enable it
protected void setupClasspathJarResourceIfNeeds(WebAppContext context) {
if (isWarableWorld() || !isValidMetaInfConfiguration()) {
return; | comment about 'cannot use web-fragment and meta-inf as default...' | dbflute-session_jetty-boot | train | java |
64c905a498dca3b2acc3269b0fce1c64f3c99154 | diff --git a/js/gateio.js b/js/gateio.js
index <HASH>..<HASH> 100644
--- a/js/gateio.js
+++ b/js/gateio.js
@@ -277,7 +277,7 @@ module.exports = class gateio extends Exchange {
let address = undefined;
if ('addr' in response)
address = this.safeString (response, 'addr');
- if ((typeof address !== 'undefined') && (address.indexOf ('address') > 0))
+ if ((typeof address !== 'undefined') && (address.indexOf ('address') >= 0))
throw new InvalidAddress (this.id + ' queryDepositAddress ' + address);
return {
'currency': currency, | made transpiler happy #<I> | ccxt_ccxt | train | js |
4d438dac75b0ef08171a70fe82c916bb7a814269 | diff --git a/tests/integration/test_tornado.py b/tests/integration/test_tornado.py
index <HASH>..<HASH> 100644
--- a/tests/integration/test_tornado.py
+++ b/tests/integration/test_tornado.py
@@ -283,4 +283,4 @@ def test_tornado_with_decorator_use_cassette(get_client):
response = yield get_client().fetch(
http.HTTPRequest('http://www.google.com/', method='GET')
)
- assert response.body == "not actually google"
+ assert response.body.decode('utf-8') == "not actually google" | Fix tornado python3 tests. | kevin1024_vcrpy | train | py |
f087b3097903e0448ee149dd1b3d262f12281d98 | diff --git a/device_state.go b/device_state.go
index <HASH>..<HASH> 100644
--- a/device_state.go
+++ b/device_state.go
@@ -12,15 +12,17 @@ type DeviceState int8
const (
StateInvalid DeviceState = iota
+ StateUnauthorized
StateDisconnected
StateOffline
StateOnline
)
var deviceStateStrings = map[string]DeviceState{
- "": StateDisconnected,
- "offline": StateOffline,
- "device": StateOnline,
+ "": StateDisconnected,
+ "offline": StateOffline,
+ "device": StateOnline,
+ "unauthorized": StateUnauthorized,
}
func parseDeviceState(str string) (DeviceState, error) {
diff --git a/devicestate_string.go b/devicestate_string.go
index <HASH>..<HASH> 100644
--- a/devicestate_string.go
+++ b/devicestate_string.go
@@ -4,9 +4,9 @@ package adb
import "fmt"
-const _DeviceState_name = "StateInvalidStateDisconnectedStateOfflineStateOnline"
+const _DeviceState_name = "StateInvalidStateUnauthorizedStateDisconnectedStateOfflineStateOnline"
-var _DeviceState_index = [...]uint8{0, 12, 29, 41, 52}
+var _DeviceState_index = [...]uint8{0, 12, 29, 46, 58, 69}
func (i DeviceState) String() string {
if i < 0 || i >= DeviceState(len(_DeviceState_index)-1) { | Pr state unauthorized (#<I>)
Support parsing unauthorized state.
Includes a few fixes for Windows support as well:
* Adds conditional build files for `unix.Access`.
* Renames files for platform specific `isExecutable()`. | zach-klippenstein_goadb | train | go,go |
f90301520f9411a4915641da6ce476c805a5eaf8 | diff --git a/src/main/java/com/github/seratch/jslack/api/model/Attachment.java b/src/main/java/com/github/seratch/jslack/api/model/Attachment.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/seratch/jslack/api/model/Attachment.java
+++ b/src/main/java/com/github/seratch/jslack/api/model/Attachment.java
@@ -128,7 +128,7 @@ public class Attachment {
* <p>
* Use ts when referencing articles or happenings. Your message will have its own timestamp when published.
*/
- private Integer ts;
+ private String ts;
/**
* By default, | 'ts' -- should be a String (#<I>)
'ts' values are more or less like --> <I>
which is not an integer. So changing it to String instead of Integer --> keeping it consistent with the 'ts' attribute in the 'message' model | seratch_jslack | train | java |
0dacb0134e1500d39aa9354343cb58e79a7cca07 | diff --git a/pymongo/cursor.py b/pymongo/cursor.py
index <HASH>..<HASH> 100644
--- a/pymongo/cursor.py
+++ b/pymongo/cursor.py
@@ -133,9 +133,9 @@ class Cursor(object):
def __query_spec(self):
"""Get the spec to use for a query.
"""
- if self.__is_command or "$query" in self.__spec:
- return self.__spec
- spec = SON({"$query": self.__spec})
+ spec = self.__spec
+ if not self.__is_command and "$query" not in self.__spec:
+ spec = SON({"$query": self.__spec})
if self.__ordering:
spec["$orderby"] = self.__ordering
if self.__explain: | support adding additional special query options automatically, even if we've already specified some manually | mongodb_mongo-python-driver | train | py |
21ad9deddb37295f260f0c2ad054a5008fa72852 | diff --git a/lib/commons/dom/is-offscreen.js b/lib/commons/dom/is-offscreen.js
index <HASH>..<HASH> 100644
--- a/lib/commons/dom/is-offscreen.js
+++ b/lib/commons/dom/is-offscreen.js
@@ -13,6 +13,11 @@ dom.isOffscreen = function (element) {
if (coords.bottom < 0) {
return true;
}
+
+ if (coords.left === 0 && coords.right === 0) {
+ //This is an edge case, an empty (zero-width) element that isn't positioned 'off screen'.
+ return false;
+ }
if (dir === 'ltr') {
if (coords.right <= 0) { | Handle the edge case of a zero width element with a right bound of 0
This was causing some tests to fail | dequelabs_axe-core | train | js |
7b93ce0fc89968d8410102a1ecde6f8130b8e33a | diff --git a/skyfield/tests/test_keplerlib.py b/skyfield/tests/test_keplerlib.py
index <HASH>..<HASH> 100644
--- a/skyfield/tests/test_keplerlib.py
+++ b/skyfield/tests/test_keplerlib.py
@@ -57,7 +57,7 @@ def test_comet():
b' 283.3593 88.9908 20200224 -2.0 4.0 C/1995 O1 (Hale-Bopp)'
b' MPC106342\n')
df = load_comets_dataframe(BytesIO(text))
- row = df.ix[0]
+ row = df.iloc[0]
ts = load.timescale(builtin=True)
eph = load('de421.bsp') | Switch test away from deprecated ".ix", to fix CI | skyfielders_python-skyfield | train | py |
cf6950c95a8b9b74bf8bfe4a754fabe2bbf7eb77 | diff --git a/src/Environment.php b/src/Environment.php
index <HASH>..<HASH> 100644
--- a/src/Environment.php
+++ b/src/Environment.php
@@ -92,8 +92,7 @@ class Environment
self::purge(TEMP_DIR);
register_shutdown_function(function () {
- self::purge(TMP_DIR);
- @rmdir(TMP_DIR);
+ self::rmdir(TEMP_DIR);
});
}
@@ -170,6 +169,17 @@ class Environment
* @param string $dir
* @return void
*/
+ public static function rmdir($dir)
+ {
+ if (!is_dir($dir)) return;
+ self::purge($dir);
+ @rmdir($dir);
+ }
+
+ /**
+ * @param string $dir
+ * @return void
+ */
private static function purge($dir)
{
THelpers::purge($dir); | Environment: cleanup only TEMP_DIR (single test-case) | ninjify_nunjuck | train | php |
d66fa944054178990e69d2603e54f76a4507634b | diff --git a/master/buildbot/util/deferwaiter.py b/master/buildbot/util/deferwaiter.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/util/deferwaiter.py
+++ b/master/buildbot/util/deferwaiter.py
@@ -37,6 +37,7 @@ class DeferWaiter:
self._waited.add(id(d))
d.addBoth(self._finished, d)
+ return d
@defer.inlineCallbacks
def wait(self): | util: Return added Deferred from DeferWaiter.add() | buildbot_buildbot | train | py |
0d2ad141d40c9741fede642a0f1e351f29c3b934 | diff --git a/src/test/java/hex/DeepLearningProstateTest.java b/src/test/java/hex/DeepLearningProstateTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/hex/DeepLearningProstateTest.java
+++ b/src/test/java/hex/DeepLearningProstateTest.java
@@ -147,6 +147,7 @@ public class DeepLearningProstateTest extends TestUtil {
}
model1 = UKV.get(dest_tmp);
+ Assert.assertTrue(p.train_samples_per_iteration <= 0 || model1.epoch_counter > epochs || Math.abs(model1.epoch_counter - epochs)/epochs < 0.1);
if (n_folds != 0)
// test HTML of cv models | Add assertion that the number of training rows is correct. | h2oai_h2o-2 | train | java |
95ad0acf5e0ffc67399fe191a9d48b54fc01bca1 | diff --git a/pkg/volume/downwardapi/downwardapi_test.go b/pkg/volume/downwardapi/downwardapi_test.go
index <HASH>..<HASH> 100644
--- a/pkg/volume/downwardapi/downwardapi_test.go
+++ b/pkg/volume/downwardapi/downwardapi_test.go
@@ -33,12 +33,12 @@ import (
const basePath = "/tmp/fake"
-func formatMap(m map[string]string) string {
- var l string
+func formatMap(m map[string]string) (fmtstr string) {
for key, value := range m {
- l += key + "=" + fmt.Sprintf("%q", value) + "\n"
+ fmtstr += fmt.Sprintf("%v=%q\n", key, value)
}
- return l
+
+ return
}
func newTestHost(t *testing.T, client client.Interface) volume.VolumeHost { | Refactor helper method in api/volume/downwardapi | kubernetes_kubernetes | train | go |
0250a5f435b7bdde88eae210445e7de28459878a | diff --git a/src/edu/rpi/sss/util/servlets/HttpServletUtils.java b/src/edu/rpi/sss/util/servlets/HttpServletUtils.java
index <HASH>..<HASH> 100644
--- a/src/edu/rpi/sss/util/servlets/HttpServletUtils.java
+++ b/src/edu/rpi/sss/util/servlets/HttpServletUtils.java
@@ -150,10 +150,16 @@ public class HttpServletUtils {
}
try {
- return request.getRequestURL().toString();
+ StringBuffer sb = request.getRequestURL();
+ if (sb != null) {
+ return sb.toString();
+ }
+
+ // Presumably portlet - see what happens with uri
+ return request.getRequestURI();
} catch (Throwable t) {
Logger.getLogger(HttpServletUtils.class).warn(
- "Unable to get url from " + request);
+ "Unable to get url from " + request, t);
return "BogusURL.this.is.probably.a.portal";
}
} | To build bedework after this update will require ant-contrib.jar to be added to apache-ant-<I>/lib
This will be done in the preview quickstart
Upgraded portlet support. Managed to display the user calendar in liferay4.
Made much more of the portlet support common. Moved many config settings into the properties file.
Some changes still needed
Moved portlet stylesheets into common portlet directory | Bedework_bw-util | train | java |
4f5387cbbd4bca879fdacb354013f65d1b3efb9c | diff --git a/client_test.go b/client_test.go
index <HASH>..<HASH> 100644
--- a/client_test.go
+++ b/client_test.go
@@ -498,7 +498,6 @@ func BenchmarkAddLargeTorrent(b *testing.B) {
cfg := TestingConfig()
cfg.DisableTCP = true
cfg.DisableUTP = true
- cfg.ListenHost = func(string) string { return "redonk" }
cl, err := NewClient(cfg)
require.NoError(b, err)
defer cl.Close() | Fix benchmark broken by changes to client listeners | anacrolix_torrent | train | go |
da31be28ae69d1efcdb2048ab11070031be72801 | diff --git a/jax/lax.py b/jax/lax.py
index <HASH>..<HASH> 100644
--- a/jax/lax.py
+++ b/jax/lax.py
@@ -841,13 +841,10 @@ class _OpaqueParam(object):
"""Wrapper that hashes on its identity, instead of its contents.
Used to pass unhashable parameters as primitive attributes."""
- __slots__ = ["val", "id"]
+ __slots__ = ["val"]
+
def __init__(self, val):
self.val = val
- self.id = next(_opaque_param_ids)
- def __hash__(self):
- return self.id
-_opaque_param_ids = itertools.count()
def while_loop(cond_fun, body_fun, init_val): | Simplify definition of _OpaqueParam to use object identity for hashing/equality. | tensorflow_probability | train | py |
0505771481222b4893daa5454ff6c9c16f471fa4 | diff --git a/plugins/guests/debian/cap/configure_networks.rb b/plugins/guests/debian/cap/configure_networks.rb
index <HASH>..<HASH> 100644
--- a/plugins/guests/debian/cap/configure_networks.rb
+++ b/plugins/guests/debian/cap/configure_networks.rb
@@ -42,7 +42,10 @@ module VagrantPlugins
# each specifically, we avoid reconfiguring eth0 (the NAT interface) so
# SSH never dies.
interfaces.each do |interface|
- comm.sudo("/sbin/ifdown eth#{interface} 2> /dev/null")
+ # Ubuntu 16.04+ returns an error when downing an interface that
+ # does not exist. The `|| true` preserves the behavior that older
+ # Ubuntu versions exhibit and Vagrant expects (GH-7155)
+ comm.sudo("/sbin/ifdown eth#{interface} 2> /dev/null || true")
comm.sudo("/sbin/ip addr flush dev eth#{interface} 2> /dev/null")
end | Do not return an error if ifdown fails
Ubuntu versions prior to <I> always returned a successful exit status,
even if one tried to down an interface that does not exist. This
behavior changed in Ubuntu <I> to return an error. This commit
preserves the old behavior.
Fixes GH-<I> | hashicorp_vagrant | train | rb |
0c861f05009f768270ea35bf957b13bb352f326d | diff --git a/ddmrp_history/models/stock_buffer.py b/ddmrp_history/models/stock_buffer.py
index <HASH>..<HASH> 100644
--- a/ddmrp_history/models/stock_buffer.py
+++ b/ddmrp_history/models/stock_buffer.py
@@ -54,7 +54,7 @@ class StockBuffer(models.Model):
"top_of_yellow": self.top_of_yellow,
"top_of_green": self.top_of_green,
"net_flow_position": self.net_flow_position,
- "on_hand_position": self.product_location_qty,
+ "on_hand_position": self.product_location_qty_available_not_res,
"adu": self.adu,
}
return data | [<I>][FIX] ddmrp_history: record not reserved on-hand qty | OCA_ddmrp | train | py |
65333a17a827c1d2b589116a375cf7daa6826c6f | diff --git a/sendRequest.js b/sendRequest.js
index <HASH>..<HASH> 100644
--- a/sendRequest.js
+++ b/sendRequest.js
@@ -13,7 +13,9 @@
var http = require('http');
var defer = function () {
- var promise = (global.protractor ? protractor.promise : Q);
+ var promise = (global.protractor && protractor.promise.USE_PROMISE_MANAGER !== false)
+ ? protractor.promise
+ : Q;
var deferred = promise.defer();
if (deferred.fulfill && !deferred.resolve) { | Do not use protractor promise if promise manager is disabled | jamesdbloom_mockserver-client-node | train | js |
3ae1f0541455197801011cc99927a10125739c71 | diff --git a/client/js/util.js b/client/js/util.js
index <HASH>..<HASH> 100644
--- a/client/js/util.js
+++ b/client/js/util.js
@@ -154,7 +154,7 @@ qq.log = function(message, level) {
qq.isObject = function(variable) {
"use strict";
- return Object.prototype.toString.call(variable) === '[object Object]';
+ return variable && !variable.nodeType && Object.prototype.toString.call(variable) === '[object Object]';
};
qq.isFunction = function(variable) { | fixes #<I> - Fix uploader freeze during init in IE8 or older | FineUploader_fine-uploader | train | js |
71a80fdfd4ebfe28bfa4f6db04661a6e2a1bd190 | diff --git a/buildbot/status/web/console.py b/buildbot/status/web/console.py
index <HASH>..<HASH> 100755
--- a/buildbot/status/web/console.py
+++ b/buildbot/status/web/console.py
@@ -315,7 +315,7 @@ class ConsoleStatusResource(HtmlResource):
return builds
def getChangeForBuild(self, build, revision):
- if not build.getChanges(): # Forced build
+ if not build or not build.getChanges(): # Forced build
devBuild = DevBuild(revision, build.getResults(),
build.getNumber(),
build.isFinished(), | Don't fail if getChangeForBuild gets None for a build
I'm not sure why this would happen, but this change should prevent it
from crashing. Fixes #<I>, hopefully. | buildbot_buildbot | train | py |
3c710c9ea046d92449615d25394c015938b158f6 | diff --git a/lib/config/config-initializer.js b/lib/config/config-initializer.js
index <HASH>..<HASH> 100644
--- a/lib/config/config-initializer.js
+++ b/lib/config/config-initializer.js
@@ -305,7 +305,7 @@ function promptUser(callback) {
type: "list",
name: "styleguide",
message: "Which style guide do you want to follow?",
- choices: [{name: "Google", value: "google"}, {name: "AirBnB", value: "airbnb"}, {name: "Standard", value: "standard"}],
+ choices: [{name: "Google", value: "google"}, {name: "Airbnb", value: "airbnb"}, {name: "Standard", value: "standard"}],
when(answers) {
answers.packageJsonExists = npmUtil.checkPackageJson();
return answers.source === "guide" && answers.packageJsonExists; | Fix: rename "AirBnB" => "Airbnb" init choice (fixes #<I>)
This renames the config initializer choice name from `AirBnB` to the preferred spelling of `Airbnb` | eslint_eslint | train | js |
80797a5d65ac66353a904d0a26bec2175daf06c8 | diff --git a/src/elements/db/SuperTableBlockQuery.php b/src/elements/db/SuperTableBlockQuery.php
index <HASH>..<HASH> 100644
--- a/src/elements/db/SuperTableBlockQuery.php
+++ b/src/elements/db/SuperTableBlockQuery.php
@@ -96,9 +96,13 @@ class SuperTableBlockQuery extends ElementQuery
*/
public function __call($name, $params)
{
- // Handle calling methods a Static Super Table field - `{{ superTable.getFieldLayout().fields }}`
+ // Handle calling methods via a Static Super Table field - `{{ superTable.getFieldLayout().fields }}`
if (is_string($name)) {
- return $this->one()->$name($params) ?? null;
+ $block = $this->one() ?? null;
+
+ if ($block && method_exists($block, $name)) {
+ return $block->$name($params) ?? null;
+ }
}
return parent::__call($name, $params); | Fix being unable to query ST fields directly | verbb_super-table | train | php |
39dd09da7cac4a50a8c655657fadaecb615c8da7 | diff --git a/lib/freetype/c.rb b/lib/freetype/c.rb
index <HASH>..<HASH> 100644
--- a/lib/freetype/c.rb
+++ b/lib/freetype/c.rb
@@ -211,6 +211,19 @@ module FreeType
charmap: :pointer
end
+ class << self
+ module LazyAttach
+ def attach_function(name, func, args, returns = nil, options = nil)
+ super
+ rescue FFI::NotFoundError
+ define_method(name) do |*|
+ raise NotImplementedError, "`#{name}' is not implemented in this system"
+ end
+ end
+ end
+ prepend LazyAttach
+ end
+
# library = FFI::MemoryPointer.new(:pointer)
# err = FT_Init_FreeType(library)
# err = FT_Done_Library(library.get_pointer(0)) | Lazy Attach when target function is not defined | ksss_freetype | train | rb |
13df9c697c3f8cdac9874cc88bef9a1a299a73b4 | diff --git a/autogen/config.js b/autogen/config.js
index <HASH>..<HASH> 100644
--- a/autogen/config.js
+++ b/autogen/config.js
@@ -80,6 +80,9 @@ exports.extraLiquidFilters = {
json_stringify: function(value) {
return JSON.stringify(value);
},
+ trim: function(value) {
+ return value.trim();
+ },
//evaluates expression as JavaScript in the given context
eval: function (expression, context) {
var vm = require('vm'); | Add trim filter in autogen config | ev3dev_ev3dev-lang | train | js |
6c56c9221e701ef6b3b087aa5308a28664567d5e | diff --git a/src/components/button/index.js b/src/components/button/index.js
index <HASH>..<HASH> 100644
--- a/src/components/button/index.js
+++ b/src/components/button/index.js
@@ -22,6 +22,10 @@ export default class Button extends BaseComponent {
*/
iconSource: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
/**
+ * Icon image style
+ */
+ iconStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.number, PropTypes.array]),
+ /**
* Color of the button background
*/
backgroundColor: PropTypes.string,
@@ -95,7 +99,7 @@ export default class Button extends BaseComponent {
}
renderIcon() {
- const {iconSource, label, link, disabled} = this.props;
+ const {iconSource, iconStyle, label, link, disabled} = this.props;
if (iconSource) {
return (
<Image
@@ -104,6 +108,7 @@ export default class Button extends BaseComponent {
this.styles.icon,
(link && disabled) && this.styles.iconDisabled,
label && this.styles.iconSpacing,
+ iconStyle,
]}
/>);
} | allow to custom style the icon in button component | wix_react-native-ui-lib | train | js |
a53a2a6d67a7145736d3ca8940692aa968959991 | diff --git a/SUFIA_VERSION b/SUFIA_VERSION
index <HASH>..<HASH> 100644
--- a/SUFIA_VERSION
+++ b/SUFIA_VERSION
@@ -1 +1 @@
-3.5.0
+3.6.0
diff --git a/lib/sufia/version.rb b/lib/sufia/version.rb
index <HASH>..<HASH> 100644
--- a/lib/sufia/version.rb
+++ b/lib/sufia/version.rb
@@ -1,3 +1,3 @@
module Sufia
- VERSION = "3.5.0"
+ VERSION = "3.6.0"
end
diff --git a/sufia-models/lib/sufia/models/version.rb b/sufia-models/lib/sufia/models/version.rb
index <HASH>..<HASH> 100644
--- a/sufia-models/lib/sufia/models/version.rb
+++ b/sufia-models/lib/sufia/models/version.rb
@@ -1,5 +1,5 @@
module Sufia
module Models
- VERSION = "3.5.0"
+ VERSION = "3.6.0"
end
end | Preparing for <I> release | samvera_hyrax | train | SUFIA_VERSION,rb,rb |
cc6d793578600e0b5740da551895f316d34d5db7 | diff --git a/src/core/plugins/configure/validateConfig.js b/src/core/plugins/configure/validateConfig.js
index <HASH>..<HASH> 100644
--- a/src/core/plugins/configure/validateConfig.js
+++ b/src/core/plugins/configure/validateConfig.js
@@ -42,6 +42,12 @@ function validateCommand(command) {
}
function validateConfig(schema, config) {
+ // ajv caches schemas by their ids effectively preventing us from using
+ // multiple instances of appache with a single instance of ajv, so we bust
+ // the cache on every config validation as a workaround.
+ // TODO: we should use an ajv instance per appache instance and only clear
+ // the cache when the schema changes
+ ajv.removeSchema()
let isValid = ajv.validate(schema, config)
if (!isValid) { | Avoid ajv caching to allow multiple appache instances | appache_appache | train | js |
1260d7705ce1eeb89df3f801d96121fa2a4110a8 | diff --git a/resources/lang/de-DE/cachet.php b/resources/lang/de-DE/cachet.php
index <HASH>..<HASH> 100644
--- a/resources/lang/de-DE/cachet.php
+++ b/resources/lang/de-DE/cachet.php
@@ -121,8 +121,8 @@ return [
'meta' => [
'description' => [
'incident' => 'Details and updates about the :name incident that occurred on :date',
- 'schedule' => 'Details about the scheduled maintenance period :name starting :startDate',
- 'subscribe' => 'Subscribe to :app in order to receive updates of incidents and scheduled maintenance periods',
+ 'schedule' => 'Details zu den geplanten Wartungszeitraum :name Beginn ab :startDate',
+ 'subscribe' => 'Abonniere :app um Updates von Vorfällen und geplanten Wartungszeiten zu erhalten',
'overview' => 'Bleiben sie auf dem Laufenden mit den neuesten Service-Updates von :app.',
],
], | New translations cachet.php (German) | CachetHQ_Cachet | train | php |
619707ac0265826f48ca0640aa245e8711db7690 | diff --git a/bokeh/bbmodel.py b/bokeh/bbmodel.py
index <HASH>..<HASH> 100644
--- a/bokeh/bbmodel.py
+++ b/bokeh/bbmodel.py
@@ -40,11 +40,11 @@ class ContinuumModel(object):
def get(self, key, default=None):
return self.attributes.get(key, default)
- def get_ref(self, field, client):
+ def get_obj(self, field, client):
ref = self.get(field)
return client.get(ref['type'], ref['id'])
- def vget_ref(self, field, client):
+ def vget_obj(self, field, client):
return [client.get(ref['type'], ref['id']) for ref in \
self.attributes.get(field)] | changing our get_ref calls to be get_obj, since that's what they actually do | bokeh_bokeh | train | py |
9f6a1688d921559f88bc8afef8c806b6504621ca | diff --git a/sunspot/lib/sunspot/search/abstract_search.rb b/sunspot/lib/sunspot/search/abstract_search.rb
index <HASH>..<HASH> 100644
--- a/sunspot/lib/sunspot/search/abstract_search.rb
+++ b/sunspot/lib/sunspot/search/abstract_search.rb
@@ -38,7 +38,7 @@ module Sunspot
# Sunspot#new_search(), you will need to call this method after building the
# query.
#
- def execute
+ def execute opts={}
reset
params = @query.to_params
# Here we add the ability to perform the request through POST rather than GET | You can now submit your requests using GET or POST verb | sunspot_sunspot | train | rb |
9421aad1a6859fe12c26b9b54151dfee0af437a0 | diff --git a/src/Models/User.php b/src/Models/User.php
index <HASH>..<HASH> 100644
--- a/src/Models/User.php
+++ b/src/Models/User.php
@@ -692,34 +692,6 @@ class User extends Entry
}
/**
- * Enables the current user.
- *
- * @throws AdldapException
- *
- * @return User
- */
- public function enable()
- {
- $this->enabled = 1;
-
- return $this;
- }
-
- /**
- * Disables the current user.
- *
- * @throws AdldapException
- *
- * @return User
- */
- public function disable()
- {
- $this->enabled = 0;
-
- return $this;
- }
-
- /**
* Sets the password on the current user.
*
* @param string $password | Remove enable and disable User model methods
- Removed enable and disable User model methods due to
UserAccountControl needing to be set for this functionality | Adldap2_Adldap2 | train | php |
4e395f923085d9e11e9aa9d6626dede4949fab03 | diff --git a/openid/oidutil.py b/openid/oidutil.py
index <HASH>..<HASH> 100644
--- a/openid/oidutil.py
+++ b/openid/oidutil.py
@@ -11,6 +11,10 @@ def log(message, unused_level=0):
sys.stderr.write('\n')
def appendArgs(url, args):
+ if hasattr(args, 'items'):
+ args = args.items()
+ args.sort()
+
if len(args) == 0:
return url | [project @ Change behavior of appendArgs to sort dicts before using] | openid_python-openid | train | py |
91c4e43c8a262a9929e9711c7899163b724109b5 | diff --git a/worker/worker-execution/score-worker-execution-impl/src/main/java/io/cloudslang/worker/execution/services/StubAplsLicensingServiceImpl.java b/worker/worker-execution/score-worker-execution-impl/src/main/java/io/cloudslang/worker/execution/services/StubAplsLicensingServiceImpl.java
index <HASH>..<HASH> 100644
--- a/worker/worker-execution/score-worker-execution-impl/src/main/java/io/cloudslang/worker/execution/services/StubAplsLicensingServiceImpl.java
+++ b/worker/worker-execution/score-worker-execution-impl/src/main/java/io/cloudslang/worker/execution/services/StubAplsLicensingServiceImpl.java
@@ -31,12 +31,12 @@ public class StubAplsLicensingServiceImpl implements AplsLicensingService {
}
@Override
- public boolean checkoutUiStep(String executionId, String branchId) {
+ public boolean incrementUiStep(String executionId, String branchId) {
return true;
}
@Override
- public void checkinUiStep(String executionId, String branchId) {
+ public void decrementUiStep(String executionId, String branchId) {
}
} | US/<I>/merge UI steps from master | CloudSlang_score | train | java |
292f749437886671187e4d0412c251f175b1275c | diff --git a/lib/httparty/logger/logger.rb b/lib/httparty/logger/logger.rb
index <HASH>..<HASH> 100644
--- a/lib/httparty/logger/logger.rb
+++ b/lib/httparty/logger/logger.rb
@@ -3,16 +3,19 @@ require 'httparty/logger/curl_logger'
module HTTParty
module Logger
+ def self.formatters
+ {
+ :curl => Logger::CurlLogger,
+ :apache => Logger::ApacheLogger
+ }
+ end
+
def self.build(logger, level, formatter)
level ||= :info
formatter ||= :apache
- case formatter
- when :curl
- Logger::CurlLogger.new(logger, level)
- else
- Logger::ApacheLogger.new(logger, level)
- end
+ logger_klass = formatters[formatter] || Logger::ApacheLogger
+ logger_klass.new(logger, level)
end
end
end | abstract formatter selection so easy to override and add custom formatter | jnunemaker_httparty | train | rb |
2d1ef0d6d4185d3b57bbb1b8631b14507036b8c2 | diff --git a/src/factory/Bodies.js b/src/factory/Bodies.js
index <HASH>..<HASH> 100644
--- a/src/factory/Bodies.js
+++ b/src/factory/Bodies.js
@@ -191,7 +191,7 @@ var Bodies = {};
// vertices are convex, so just create a body normally
body = {
position: { x: x, y: y },
- vertices: vertices
+ vertices: Vertices.clockwiseSort(vertices)
};
return Body.create(Common.extend({}, body, options));
@@ -209,12 +209,6 @@ var Bodies = {};
concave.vertices.push([vertices[i].x, vertices[i].y]);
}
- // check for complexity
- if (!concave.isSimple()) {
- Common.log('Bodies.fromVertices: Non-simple polygons are not supported. Could not decompose vertices. Fallback to convex hull.', 'warn');
- canDecompose = false;
- }
-
// try to decompose
if (canDecompose) {
// vertices are concave and simple, we can decompose into parts
@@ -298,4 +292,4 @@ var Bodies = {};
}
};
-})();
+})();
\ No newline at end of file | removed complexity check in Bodies.fromVertices, enforce clockwise sort | liabru_matter-js | train | js |
76b9661b8fde4ee594696224721b56994e5d34ec | diff --git a/src/com/google/javascript/jscomp/CompilerOptions.java b/src/com/google/javascript/jscomp/CompilerOptions.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/jscomp/CompilerOptions.java
+++ b/src/com/google/javascript/jscomp/CompilerOptions.java
@@ -2796,6 +2796,14 @@ public class CompilerOptions implements Serializable {
this.packageJsonEntryNames = names;
}
+ public void setUseSizeHeuristicToStopOptimizationLoop(boolean mayStopEarly) {
+ this.useSizeHeuristicToStopOptimizationLoop = mayStopEarly;
+ }
+
+ public void setMaxOptimizationLoopIterations(int maxIterations) {
+ this.optimizationLoopMaxIterations = maxIterations;
+ }
+
/** Serializes compiler options to a stream. */
@GwtIncompatible("ObjectOutputStream")
public void serialize(OutputStream objectOutputStream) throws IOException { | Move the optimization loop tuning API into the public API.
-------------
Created by MOE: <URL> | google_closure-compiler | train | java |
81a3200a92c127fe018a61f39dd7a6eb9c9bc594 | diff --git a/Adapter/ShopwareAdapter/ServiceBus/CommandHandler/Category/HandleCategoryCommandHandler.php b/Adapter/ShopwareAdapter/ServiceBus/CommandHandler/Category/HandleCategoryCommandHandler.php
index <HASH>..<HASH> 100644
--- a/Adapter/ShopwareAdapter/ServiceBus/CommandHandler/Category/HandleCategoryCommandHandler.php
+++ b/Adapter/ShopwareAdapter/ServiceBus/CommandHandler/Category/HandleCategoryCommandHandler.php
@@ -130,7 +130,7 @@ class HandleCategoryCommandHandler implements CommandHandlerInterface
]);
if (empty($shopIdentities)) {
- return null;
+ continue;
}
foreach ($shopIdentities as $shopIdentity) { | bugfix import categories if first shop is not mapped | plentymarkets_plentymarkets-shopware-connector | train | php |
df378d85543f15ac4146166c69e3117a22fb16f0 | diff --git a/models/Menu.php b/models/Menu.php
index <HASH>..<HASH> 100644
--- a/models/Menu.php
+++ b/models/Menu.php
@@ -23,12 +23,11 @@ class Menu extends ActiveRecord
public static function getDefaultId() {
$cache = \yii::$app->cache;
$cacheDefaultKey = self::getCacheDefaultKey();
- if (($result = $cache->get($cacheDefaultKey)) !== null) {
- return $result;
+ if (($result = $cache->get($cacheDefaultKey)) === null) {
+ $result = self::find()->andWhere('is_default')->select('id')->createCommand()->queryScalar();
+ $cache->set($cacheDefaultKey, $result);
}
- $result = self::find()->andWhere('is_default')->select('id')->createCommand()->queryScalar();
- $cache->set($cacheDefaultKey, $result);
if ($result === false) {
$result = null;
} | Fixed bug with no default cached value | execut_yii2-menu | train | php |
315bf9e0c2b572301475adb5c7f98fc2c4225aca | diff --git a/Kwf/Assets/Filter/Css/KwfLocal.php b/Kwf/Assets/Filter/Css/KwfLocal.php
index <HASH>..<HASH> 100644
--- a/Kwf/Assets/Filter/Css/KwfLocal.php
+++ b/Kwf/Assets/Filter/Css/KwfLocal.php
@@ -14,10 +14,12 @@ class Kwf_Assets_Filter_Css_KwfLocal extends Kwf_Assets_Filter_Css_SelectorRepla
throw new Kwf_Exception("dependency is required for this filter");
}
- $prefix = Kwf_Config::getValue('application.uniquePrefix');
- if ($prefix) $prefix .= '-';
- else $prefix = '';
- $replacements['kwfLocal'] = $prefix.self::getLocalClassForDependency($dependency);
+ if ($dependency instanceof Kwf_Assets_Dependency_File) {
+ $prefix = Kwf_Config::getValue('application.uniquePrefix');
+ if ($prefix) $prefix .= '-';
+ else $prefix = '';
+ $replacements['kwfLocal'] = $prefix.self::getLocalClassForDependency($dependency);
+ }
return array(
'replacements' => $replacements | Fix kwfLocal with Component.css dependency | koala-framework_koala-framework | train | php |
b4c35355226086254ee9cf24d991bc1bedb0a9a3 | diff --git a/generators/generator-constants.js b/generators/generator-constants.js
index <HASH>..<HASH> 100644
--- a/generators/generator-constants.js
+++ b/generators/generator-constants.js
@@ -61,7 +61,7 @@ const DOCKER_MYSQL_VERSION = '8.0.30';
const DOCKER_MYSQL = `mysql:${DOCKER_MYSQL_VERSION}`;
const DOCKER_MARIADB_VERSION = '10.8.3';
const DOCKER_MARIADB = `mariadb:${DOCKER_MARIADB_VERSION}`;
-const DOCKER_POSTGRESQL_VERSION = '14.4';
+const DOCKER_POSTGRESQL_VERSION = '14.5';
const DOCKER_POSTGRESQL = `postgres:${DOCKER_POSTGRESQL_VERSION}`;
const DOCKER_MONGODB_VERSION = '4.4.14';
const DOCKER_MONGODB = `mongo:${DOCKER_MONGODB_VERSION}`; | Update postgres docker image version to <I> | jhipster_generator-jhipster | train | js |
10399e8eb8c0b297e4ecc04fc609000b2fc19b62 | diff --git a/dvc/remote/gdrive.py b/dvc/remote/gdrive.py
index <HASH>..<HASH> 100644
--- a/dvc/remote/gdrive.py
+++ b/dvc/remote/gdrive.py
@@ -33,12 +33,11 @@ class GDriveMissedCredentialKeyError(DvcException):
@decorator
def _wrap_pydrive_retriable(call):
- from apiclient import errors
from pydrive2.files import ApiRequestError
try:
result = call()
- except (ApiRequestError, errors.HttpError) as exception:
+ except ApiRequestError as exception:
retry_codes = ["403", "500", "502", "503", "504"]
if any(
"HttpError {}".format(code) in str(exception)
@@ -210,6 +209,7 @@ class RemoteGDrive(RemoteBASE):
GoogleAuth.DEFAULT_SETTINGS["get_refresh_token"] = True
GoogleAuth.DEFAULT_SETTINGS["oauth_scope"] = [
"https://www.googleapis.com/auth/drive",
+ # drive.appdata grants access to appDataFolder GDrive directory
"https://www.googleapis.com/auth/drive.appdata",
] | Remove usage of google-api-python-client deps | iterative_dvc | train | py |
7d4b21a1fa9692bedea0f29097b2e2a74872ac74 | diff --git a/spec/database_cleaner/sequel/base_spec.rb b/spec/database_cleaner/sequel/base_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/database_cleaner/sequel/base_spec.rb
+++ b/spec/database_cleaner/sequel/base_spec.rb
@@ -24,6 +24,7 @@ module DatabaseCleaner
end
it "should default to :default" do
+ pending "I figure out how to use Sequel and write some real tests for it..."
subject.db.should == :default
end
end | marks failing Sequel test as pending | DatabaseCleaner_database_cleaner | train | rb |
b15abeabe4b0b395485cb8754e05732c9de4953d | diff --git a/test/integration/server/test_bunyan.js b/test/integration/server/test_bunyan.js
index <HASH>..<HASH> 100644
--- a/test/integration/server/test_bunyan.js
+++ b/test/integration/server/test_bunyan.js
@@ -12,7 +12,7 @@ describe('bunyan', function() {
var child;
before(function(done) {
- this.timeout(10000);
+ this.timeout(30000);
util.setupScenario('bunyan', function(err) {
if (err) { | Increase timeout for bunyan test
Build can sometimes take a long time… | thehelp_log-shim | train | js |
f969c9366c931c996290e47fccb57c756f6b3c47 | diff --git a/holoviews/core/data/__init__.py b/holoviews/core/data/__init__.py
index <HASH>..<HASH> 100644
--- a/holoviews/core/data/__init__.py
+++ b/holoviews/core/data/__init__.py
@@ -378,10 +378,10 @@ class Dataset(Element):
raise ValueError("The aggregate method requires a function to be specified")
if dimensions is None: dimensions = self.kdims
elif not isinstance(dimensions, list): dimensions = [dimensions]
- aggregated = self.interface.aggregate(self, dimensions, function, **kwargs)
+ kdims = [self.get_dimension(d) for d in dimensions]
+ aggregated = self.interface.aggregate(self, kdims, function, **kwargs)
aggregated = self.interface.unpack_scalar(self, aggregated)
- kdims = [self.get_dimension(d) for d in dimensions]
vdims = self.vdims
if spreadfn:
error = self.interface.aggregate(self, dimensions, spreadfn) | Fixed aliases on Dataset aggregate | pyviz_holoviews | train | py |
082916e7b707ead96449995272c9874f6ae1c255 | diff --git a/gandi/cli/core/conf.py b/gandi/cli/core/conf.py
index <HASH>..<HASH> 100644
--- a/gandi/cli/core/conf.py
+++ b/gandi/cli/core/conf.py
@@ -134,6 +134,9 @@ class GandiModule(object):
def _get(cls, scope, key, default=None, separator='.'):
key = key.split(separator)
value = cls._conffiles.get(scope, {})
+ if not value:
+ return default
+
try:
for k in key:
value = value[k]
@@ -164,8 +167,7 @@ class GandiModule(object):
if ret is None:
if mandatory:
msg = ('missing configuration value for %s\n'
- 'please use "gandi config [-g] %s <VALUE>" to set a value\n\n'
- '-g globally\n'
+ 'please use "gandi config [-g] %s <VALUE>" to set a value\n'
% (key, key))
raise UsageError(msg)
return default | Fixes but with config retrieval if local is empty | Gandi_gandi.cli | train | py |
749d789f6d6b1772426e27f06ce3fb1474ecb666 | diff --git a/spec/components/all_components_spec.rb b/spec/components/all_components_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/components/all_components_spec.rb
+++ b/spec/components/all_components_spec.rb
@@ -18,7 +18,9 @@ describe "All components" do
expect(yaml["name"]).not_to be_nil
expect(yaml["description"]).not_to be_nil
expect(yaml["examples"]).not_to be_nil
- expect(yaml["accessibility_criteria"]).not_to be_nil
+ expect(
+ yaml["accessibility_criteria"] || yaml["shared_accessibility_criteria"]
+ ).not_to be_nil
end
it "has the correct class in the ERB template", | Allow shared_accessibility_criteria to fulfill need
When a components accessibility has only shared accessibility criterias
it doesn't seem necessary to force typing some in. | alphagov_govuk_publishing_components | train | rb |
9f0f36560bea06df30c911510c26b765f2bf8b6c | diff --git a/spec/integration/lhm_spec.rb b/spec/integration/lhm_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/integration/lhm_spec.rb
+++ b/spec/integration/lhm_spec.rb
@@ -77,7 +77,7 @@ describe Lhm do
end
slave do
- key?(table_read(:users), ["username", "created_at"]).must_equal(false)
+ key?(table_read(:users), [:username, :created_at]).must_equal(false)
end
end | added slave blocks to lhm | soundcloud_lhm | train | rb |
3a57539f774be4f63510efcc95b4793b54426258 | diff --git a/gns3server/version.py b/gns3server/version.py
index <HASH>..<HASH> 100644
--- a/gns3server/version.py
+++ b/gns3server/version.py
@@ -23,5 +23,5 @@
# or negative for a release candidate or beta (after the base version
# number has been incremented)
-__version__ = "1.0a6"
+__version__ = "1.0a7.dev1"
__version_info__ = (1, 0, 0, -99) | Bump to version alpha7.dev1 | GNS3_gns3-server | train | py |
767b4b23d53cc2914e0b09020690210f0d7584c9 | diff --git a/src/Container.php b/src/Container.php
index <HASH>..<HASH> 100644
--- a/src/Container.php
+++ b/src/Container.php
@@ -152,7 +152,7 @@ class Container implements ContainerInterface
{
if (!isset($this->definitions[$id])) {
if (isset($this->rootContainer)) {
- if ($this->rootContainer instanceof static) {
+ if ($this->rootContainer instanceof self) {
return $this->rootContainer->getWithParams($id, $params);
} else {
return $this->rootContainer->get($id); | Fixed mistake: `self` is ok this case too | yiisoft_di | train | php |
8bca5cf6cfc03a49411cedea15da6759fca790a8 | diff --git a/pypreprocessor/__init__.py b/pypreprocessor/__init__.py
index <HASH>..<HASH> 100644
--- a/pypreprocessor/__init__.py
+++ b/pypreprocessor/__init__.py
@@ -5,14 +5,11 @@ __author__ = 'Evan Plaice'
__version__ = '0.6.0'
#modified by hendiol
-
# changed by hendiol at 18.01.2017: added reset_internal for processing several files after each other
-<<<<<<< HEAD
# changed by hendiol at 11.04.2017: trying to get nested #ifdefs handeld
+# changed by hendiol at 12.04.2017: improved (several file processing) and added nested ifdef statements possible
+
-=======
-#test for further changes
->>>>>>> develop-several_files
import sys
import os
import traceback | Added the features and cleaned up head information | interpreters_pypreprocessor | train | py |
749016f7e6a054e81c8416c8bf6f2a89c8dc095f | diff --git a/btceapi/common.py b/btceapi/common.py
index <HASH>..<HASH> 100644
--- a/btceapi/common.py
+++ b/btceapi/common.py
@@ -10,7 +10,7 @@ exps = [decimal.Decimal("1e-%d" % i) for i in range(16)]
btce_domain = "btc-e.com"
all_currencies = ("btc", "usd", "rur", "ltc", "nmc", "eur", "nvc",
- "trc", "ppc", "ftc")
+ "trc", "ppc", "ftc", "xpm")
all_pairs = ("btc_usd", "btc_rur", "btc_eur", "ltc_btc", "ltc_usd",
"ltc_rur", "ltc_eur", "nmc_btc", "nmc_usd", "nvc_btc",
"nvc_usd", "usd_rur", "eur_usd", "trc_btc", "ppc_btc", | Add XPM to the list of currencies
Update all_currencies in btceapi/common.py. | CodeReclaimers_btce-api | train | py |
c9b21beec21f3243189c4cc642ec3d984f03f357 | diff --git a/estnltk/taggers/standard_taggers/flatten_tagger.py b/estnltk/taggers/standard_taggers/flatten_tagger.py
index <HASH>..<HASH> 100644
--- a/estnltk/taggers/standard_taggers/flatten_tagger.py
+++ b/estnltk/taggers/standard_taggers/flatten_tagger.py
@@ -22,6 +22,14 @@ class FlattenTagger(Tagger):
self.attribute_mapping = attribute_mapping
self.default_values = default_values
+ def _make_layer_template(self):
+ return Layer(name=self.output_layer,
+ attributes=self.output_attributes,
+ text_object=None,
+ parent=None,
+ enveloping=None,
+ ambiguous=False)
+
def _make_layer(self, text, layers, status):
layer = flatten(input_layer=layers[self.input_layers[0]],
output_layer=self.output_layer, | Refactored estnltk/taggers/standard_taggers (remaining part) | estnltk_estnltk | train | py |
85c7c77a71dcb41f8cae06968e40805ddc3c066b | diff --git a/src/BotApi.php b/src/BotApi.php
index <HASH>..<HASH> 100644
--- a/src/BotApi.php
+++ b/src/BotApi.php
@@ -845,7 +845,6 @@ class BotApi
) {
$results = array_map(function ($item) {
/* @var AbstractInlineQueryResult $item */
-
return json_decode($item->toJson(), true);
}, $results); | Empty commit to relaunch Scrutinizer "time-out" tests | TelegramBot_Api | train | php |
3fd3026c862594f184aca18661a146fe37f02d69 | diff --git a/singularity/build/utils.py b/singularity/build/utils.py
index <HASH>..<HASH> 100644
--- a/singularity/build/utils.py
+++ b/singularity/build/utils.py
@@ -48,7 +48,7 @@ def test_container(image_path):
work in most linux.
:param image_path: path to the container image
'''
- testing_command = ["singularity", "exec", image, 'echo pancakemania']
+ testing_command = ["singularity", "exec", image_path, 'echo pancakemania']
output = Popen(testing_command,stderr=STDOUT,stdout=PIPE)
t = output.communicate()[0],output.returncode
result = {'message':t[0],
diff --git a/singularity/version.py b/singularity/version.py
index <HASH>..<HASH> 100644
--- a/singularity/version.py
+++ b/singularity/version.py
@@ -1,4 +1,4 @@
-__version__ = "0.95"
+__version__ = "0.96"
AUTHOR = 'Vanessa Sochat'
AUTHOR_EMAIL = 'vsochat@stanford.edu'
NAME = 'singularity' | modified: singularity/build/utils.py
modified: singularity/version.py | singularityhub_singularity-python | train | py,py |
e48c6ca57f8ac0bc3104ea4602c23e7d3b87acb5 | diff --git a/lib/SimpleSAML/Configuration.php b/lib/SimpleSAML/Configuration.php
index <HASH>..<HASH> 100644
--- a/lib/SimpleSAML/Configuration.php
+++ b/lib/SimpleSAML/Configuration.php
@@ -58,7 +58,25 @@ class SimpleSAML_Configuration {
echo '<p>This file was missing: [' . $filename . ']</p>';
exit;
}
- require_once($filename);
+ require($filename);
+
+ // Check that $config array is defined...
+ if (!isset($config) || !is_array($config))
+ throw new Exception('Configuration file [' . $this->configfilename . '] does not contain a valid $config array.');
+
+ if(array_key_exists('override.host', $config)) {
+ foreach($config['override.host'] AS $host => $ofs) {
+ if (SimpleSAML_Utilities::getSelfHost() === $host) {
+ foreach(SimpleSAML_Utilities::arrayize($ofs) AS $of) {
+ $overrideFile = $this->configpath . '/' . $of;
+ if (!file_exists($overrideFile))
+ throw new Exception('Config file [' . $this->configfilename . '] requests override for host ' . $host . ' but file does not exists [' . $of . ']');
+ require($overrideFile);
+ }
+ }
+ }
+ }
+
$this->configuration = $config;
} | Add support for hostbased override of configuration files | simplesamlphp_saml2 | train | php |
b62892bed310d111fbc79a68f37799a81190e9d2 | diff --git a/bower.js b/bower.js
index <HASH>..<HASH> 100644
--- a/bower.js
+++ b/bower.js
@@ -1,6 +1,6 @@
{
"name": "flipclock",
- "version": "0.5.1",
+ "version": "0.5.2",
"homepage": "https://github.com/objectivehtml/FlipClock",
"authors": [
"Objective HTML",
diff --git a/compiled/flipclock.js b/compiled/flipclock.js
index <HASH>..<HASH> 100644
--- a/compiled/flipclock.js
+++ b/compiled/flipclock.js
@@ -199,7 +199,7 @@ var FlipClock;
* Version
*/
- version: '0.5.1',
+ version: '0.5.2',
/**
* Sets the default options
diff --git a/src/flipclock/js/libs/core.js b/src/flipclock/js/libs/core.js
index <HASH>..<HASH> 100644
--- a/src/flipclock/js/libs/core.js
+++ b/src/flipclock/js/libs/core.js
@@ -57,7 +57,7 @@ var FlipClock;
* Version
*/
- version: '0.5.1',
+ version: '0.5.2',
/**
* Sets the default options | Updated lib to <I> | objectivehtml_FlipClock | train | js,js,js |
aad05f3755a212bbed0b4867b83e3255ce488458 | diff --git a/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/constraints/constraintdefinition/ConstraintDefinitionsTest.java b/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/constraints/constraintdefinition/ConstraintDefinitionsTest.java
index <HASH>..<HASH> 100644
--- a/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/constraints/constraintdefinition/ConstraintDefinitionsTest.java
+++ b/tests/src/main/java/org/hibernate/beanvalidation/tck/tests/constraints/constraintdefinition/ConstraintDefinitionsTest.java
@@ -77,7 +77,8 @@ public class ConstraintDefinitionsTest extends Arquillian {
@Test
@SpecAssertions({
- @SpecAssertion(section = "3.2", id = "a")
+ @SpecAssertion(section = "3.2", id = "a"),
+ @SpecAssertion(section = "3.2", id = "b")
})
public void testRepeatableConstraint() {
Validator validator = TestUtil.getValidatorUnderTest(); | Add a spec reference for a test added as part of BVTCK-<I> | beanvalidation_beanvalidation-tck | train | java |
83438d9202f01e7690f32dc664a39c3dcc53b343 | diff --git a/lib/maruku/input/parse_block.rb b/lib/maruku/input/parse_block.rb
index <HASH>..<HASH> 100644
--- a/lib/maruku/input/parse_block.rb
+++ b/lib/maruku/input/parse_block.rb
@@ -549,7 +549,11 @@ module MaRuKu; module In; module Markdown; module BlockLevelParser
def split_cells(s,allowBlank=false)
if (allowBlank)
- s.split('|',-1)[1..-2] # allow blank cells, but only keep the inner elements of the cells
+ if (/^[|].*[|]$/ =~ s) # handle the simple and decorated table cases
+ s.split('|',-1)[1..-2] # allow blank cells, but only keep the inner elements of the cells
+ else
+ s.split('|',-1)
+ end
else
s.split('|').reject(&:empty?).map(&:strip)
end | Handle the undecorated table case as well. This was broken with the initial better table handling | bhollis_maruku | train | rb |
fbeb99ee8386d892691ef65c19da55b094b09a79 | diff --git a/command/hook_ui.go b/command/hook_ui.go
index <HASH>..<HASH> 100644
--- a/command/hook_ui.go
+++ b/command/hook_ui.go
@@ -177,7 +177,9 @@ func (h *UiHook) ProvisionOutput(
s := bufio.NewScanner(strings.NewReader(msg))
s.Split(scanLines)
for s.Scan() {
- buf.WriteString(fmt.Sprintf("%s%s\n", prefix, s.Text()))
+ if line := strings.TrimSpace(s.Text()); line != "" {
+ buf.WriteString(fmt.Sprintf("%s%s\n", prefix, line))
+ }
}
h.ui.Output(strings.TrimSpace(buf.String())) | command: make sure the output has a line from a provisioner to output | hashicorp_terraform | train | go |
72971c400052b8d5a0278ccb77f4dbef77cf1a64 | diff --git a/test/karma.browserstack.js b/test/karma.browserstack.js
index <HASH>..<HASH> 100644
--- a/test/karma.browserstack.js
+++ b/test/karma.browserstack.js
@@ -9,7 +9,7 @@ module.exports = {
bs_firefox_latest_supported: {
base: 'BrowserStack',
browser: 'firefox',
- browser_version: '69',
+ browser_version: '81',
os: 'Windows',
os_version: 10
},
@@ -30,7 +30,7 @@ module.exports = {
bs_edge_latest_supported: {
base: 'BrowserStack',
browser: 'Edge',
- browser_version: '18',
+ browser_version: '86',
os: 'Windows',
os_version: '10'
},
@@ -51,7 +51,7 @@ module.exports = {
bs_chrome_latest_supported: {
base: 'BrowserStack',
browser: "Chrome",
- browser_version: "77",
+ browser_version: "86",
os: 'Windows',
os_version: 10
},
@@ -65,9 +65,9 @@ module.exports = {
bs_safari_latest_supported: {
base: 'BrowserStack',
browser: "Safari",
- browser_version: "12.1",
+ browser_version: "13.1",
os: 'OS X',
- os_version: 'Mojave'
+ os_version: 'Catalina'
},
bs_iphone7: {
base: 'BrowserStack', | Update supported browsers to test on browserstack | dfahlander_Dexie.js | train | js |
ce5995a46d26f5c386ee2cbebf01362c2892ec8b | diff --git a/test/index.js b/test/index.js
index <HASH>..<HASH> 100644
--- a/test/index.js
+++ b/test/index.js
@@ -297,9 +297,17 @@ function assertFixture(t, rule, fixture, basename, setting) {
t.plan(positionless ? 1 : 2);
- try {
- remark().use(lint, options).process(file, fixture.config);
- } catch (err) {}
+ remark().use(lint, options).process(file, fixture.config, function (err) {
+ if (err && err.source !== 'remark-lint') {
+ throw err;
+ }
+ });
+
+ t.deepEqual(
+ normalize(file.messages),
+ expected,
+ 'should equal with position'
+ );
file.messages.forEach(function (message) {
if (message.ruleId !== ruleId) {
@@ -311,19 +319,16 @@ function assertFixture(t, rule, fixture, basename, setting) {
}
});
- t.deepEqual(
- normalize(file.messages),
- expected,
- 'should equal with position'
- );
-
if (!positionless) {
file.messages = [];
try {
- remark().use(function () {
- return removePosition;
- }).use(lint, options).process(file);
+ remark()
+ .use(function () {
+ return removePosition;
+ })
+ .use(lint, options)
+ .process(file);
} catch (err) {}
t.deepEqual( | Refactor tests to not swallow unknown errors | remarkjs_remark-lint | train | js |
ef8f08d8a0cfef5e9d4525e66e0c1eae098a5972 | diff --git a/src/Google/Service/Compute.php b/src/Google/Service/Compute.php
index <HASH>..<HASH> 100644
--- a/src/Google/Service/Compute.php
+++ b/src/Google/Service/Compute.php
@@ -6082,6 +6082,7 @@ class Google_Service_Compute_AttachedDisk extends Google_Collection
public $index;
protected $initializeParamsType = 'Google_Service_Compute_AttachedDiskInitializeParams';
protected $initializeParamsDataType = '';
+ public $interface;
public $kind;
public $licenses;
public $mode;
@@ -6138,6 +6139,16 @@ class Google_Service_Compute_AttachedDisk extends Google_Collection
return $this->initializeParams;
}
+ public function setInterface($interface)
+ {
+ $this->interface = $interface;
+ }
+
+ public function getInterface()
+ {
+ return $this->interface;
+ }
+
public function setKind($kind)
{
$this->kind = $kind; | Updated Compute.php
This change has been generated by a script that has detected changes in the
discovery doc of the API.
Check <URL> | googleapis_google-api-php-client | train | php |
b2c8a7a755d680ccbd154e1900f050efeeb438e5 | diff --git a/jquery.scrollify.js b/jquery.scrollify.js
index <HASH>..<HASH> 100644
--- a/jquery.scrollify.js
+++ b/jquery.scrollify.js
@@ -173,6 +173,7 @@
console.warn("Scrollify warning:", window.location.hash, "is not a valid jQuery expression.");
}
}
+ currentIndex = index;
$(settings.target).promise().done(function(){
currentIndex = index;
locked = false; | fix issue #<I>: before()/after() doesn't trigger | lukehaas_Scrollify | train | js |
331239d32027c859d80cb62d55f629f37e180779 | diff --git a/lib/ddbcli/ddb-endpoint.rb b/lib/ddbcli/ddb-endpoint.rb
index <HASH>..<HASH> 100644
--- a/lib/ddbcli/ddb-endpoint.rb
+++ b/lib/ddbcli/ddb-endpoint.rb
@@ -13,6 +13,7 @@ module DynamoDB
'dynamodb.ap-southeast-1.amazonaws.com' => 'ap-southeast-1',
'dynamodb.ap-southeast-2.amazonaws.com' => 'ap-southeast-2',
'dynamodb.ap-northeast-1.amazonaws.com' => 'ap-northeast-1',
+ 'dynamodb.ap-northeast-2.amazonaws.com' => 'ap-northeast-2',
'dynamodb.sa-east-1.amazonaws.com' => 'sa-east-1',
} | add ap-northeast-2 region | winebarrel_ddbcli | train | rb |
2243f6eb3361139275081d0649cedf82394c65b1 | diff --git a/lib/deliver/deliverfile/deliverfile_creator.rb b/lib/deliver/deliverfile/deliverfile_creator.rb
index <HASH>..<HASH> 100644
--- a/lib/deliver/deliverfile/deliverfile_creator.rb
+++ b/lib/deliver/deliverfile/deliverfile_creator.rb
@@ -64,7 +64,11 @@ module Deliver
private
def self.gem_path
- Gem::Specification.find_by_name("deliver").gem_dir
+ if Gem::Specification::find_all_by_name('deliver').any?
+ return Gem::Specification.find_by_name('deliver').gem_dir
+ else
+ return './'
+ end
end
# This method takes care of creating a new 'deliver' folder, containg the app metadata | Fixed fetching gem_path in test env | fastlane_fastlane | train | rb |
f549dae45f7573401d98e790874271ddb78207a6 | diff --git a/lib/reporters/base.js b/lib/reporters/base.js
index <HASH>..<HASH> 100644
--- a/lib/reporters/base.js
+++ b/lib/reporters/base.js
@@ -116,7 +116,8 @@ exports.list = function(failures){
// msg
var err = test.err
, stack = err.stack
- , index = stack.indexOf(err.message) + err.message.length
+ , message = err.message || ''
+ , index = stack.indexOf(message) + message.length
, msg = stack.slice(0, index);
// indent stack trace without msg | Fixed weird reporting when err.message is not present
nodes core "assert" lib will throw without a .message,
for example assert(1 == 2), assert(1 == 2, "something failed")
is fine however | mochajs_mocha | train | js |
c2dc368a997a294acd2c04bb67baa938b7c5efb9 | diff --git a/odl/solvers/functional/functional.py b/odl/solvers/functional/functional.py
index <HASH>..<HASH> 100644
--- a/odl/solvers/functional/functional.py
+++ b/odl/solvers/functional/functional.py
@@ -926,14 +926,14 @@ class FunctionalProduct(Functional, OperatorPointwiseProduct):
class FunctionalProductGradient(Operator):
- """Functional representing the derivative of ``f(.) * g(.)``."""
+ """Functional representing the gradient of ``f(.) * g(.)``."""
def _call(self, x):
return (func.right(x) * func.left.gradient(x) +
func.left(x) * func.right.gradient(x))
return FunctionalProductGradient(self.domain, self.domain,
- linear=True)
+ linear=False)
class FunctionalQuotient(Functional):
@@ -1006,7 +1006,7 @@ class FunctionalQuotient(Functional):
class FunctionalQuotientGradient(Operator):
- """Functional representing the derivative of ``f(.) / g(.)``."""
+ """Functional representing the gradient of ``f(.) / g(.)``."""
def _call(self, x):
"""Apply the functional to the given point."""
@@ -1016,7 +1016,7 @@ class FunctionalQuotient(Functional):
(- dividendx / divisorx**2) * func.divisor.gradient(x))
return FunctionalQuotientGradient(self.domain, self.domain,
- linear=True)
+ linear=False)
class FunctionalDefaultConvexConjugate(Functional): | BUG: fixed FunctionalProduct and Quotient's gradient being set to linear | odlgroup_odl | train | py |
5560f761f0184269535ffc843ec68471a132b135 | diff --git a/bids/variables/tests/test_variables.py b/bids/variables/tests/test_variables.py
index <HASH>..<HASH> 100644
--- a/bids/variables/tests/test_variables.py
+++ b/bids/variables/tests/test_variables.py
@@ -141,7 +141,7 @@ def test_merge_dense_run_variables(layout2):
n_rows = sum([len(c.values) for c in variables])
merged = merge_variables(variables)
assert len(merged.values) == n_rows
- assert merged.index.columns.equals(variables[0].index.columns)
+ assert set(merged.index.columns) == set(variables[0].index.columns)
def test_simple_variable_to_df(layout1): | fix test so order of columns doesn't matter | bids-standard_pybids | train | py |
210d0be7bd404976db81c1133948a64569fa6eeb | diff --git a/test/support/helper.js b/test/support/helper.js
index <HASH>..<HASH> 100644
--- a/test/support/helper.js
+++ b/test/support/helper.js
@@ -3,7 +3,10 @@ var path = require('path'),
assert = require('assert'),
crypto = require('crypto'),
sax = require('sax'),
- diff = require('./diff').diff;
+ diff = require('./diff').diff,
+ constants = ((!process.ENOENT) >= 1) ?
+ require('constants') :
+ { ENOENT: process.ENOENT };
var helper = exports;
@@ -150,7 +153,7 @@ exports.rmrf = function rmrf(p) {
}
else fs.unlinkSync(p);
} catch (err) {
- if (err.errno !== process.ENOENT) throw err;
+ if (err.errno !== constants.ENOENT) throw err;
}
}; | Node <I> compatibility. | mapbox_carto | train | js |
ba506c199098a4c15024a24d4d58fe50f9e4b57f | diff --git a/lib/puppet/util/mode.rb b/lib/puppet/util/mode.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/util/mode.rb
+++ b/lib/puppet/util/mode.rb
@@ -20,11 +20,17 @@ module Puppet
end
def conf_dir
- which_dir("/etc/puppet", "~/.puppet")
+ which_dir(
+ (Puppet.features.win32? ? File.join(Dir::WINDOWS, "puppet", "etc") : "/etc/puppet"),
+ "~/.puppet"
+ )
end
def var_dir
- which_dir("/var/lib/puppet", "~/.puppet/var")
+ which_dir(
+ (Puppet.features.win32? ? File.join(Dir::WINDOWS, "puppet", "var") : "/var/lib/puppet"),
+ "~/.puppet/var"
+ )
end
def run_dir | Resolving conflicts with jes<I>:ticket/master/<I>-settings-mode
Jesse moved the code David was patching; the conflict resolution omits David's
change (since the code isn't there to be changed) and this moves the change to
the new location. | puppetlabs_puppet | train | rb |
b89866e69b5227804fcd7718e42da3865d2d542a | diff --git a/lib/chef/resource/lwrp_base.rb b/lib/chef/resource/lwrp_base.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/resource/lwrp_base.rb
+++ b/lib/chef/resource/lwrp_base.rb
@@ -102,10 +102,6 @@ class Chef
run_context ? run_context.node : nil
end
- def lazy(&block)
- DelayedEvaluator.new(&block)
- end
-
protected
def loaded_lwrps | Remove now-unused function (already implemented by Chef::Resource) | chef_chef | train | rb |
07975a94e6ae699fa24f67f679e89537ff9d0002 | diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,6 +1,7 @@
# Configure Rails Envinronment
ENV["RAILS_ENV"] = "test"
require File.expand_path("../dummy/config/environment.rb", __FILE__)
+SPEC_ROOT = File.dirname(__FILE__)
require 'rspec/rails' | Defined the SPEC_ROOT constant for the specs that use it | radiant_radiant | train | rb |
a41342e2f473247070257f7247e093a19b91dd88 | diff --git a/xwiki-commons-core/xwiki-commons-crypto/xwiki-platform-crypto-common/src/main/java/org/xwiki/crypto/internal/digest/BouncyCastleDigest.java b/xwiki-commons-core/xwiki-commons-crypto/xwiki-platform-crypto-common/src/main/java/org/xwiki/crypto/internal/digest/BouncyCastleDigest.java
index <HASH>..<HASH> 100644
--- a/xwiki-commons-core/xwiki-commons-crypto/xwiki-platform-crypto-common/src/main/java/org/xwiki/crypto/internal/digest/BouncyCastleDigest.java
+++ b/xwiki-commons-core/xwiki-commons-crypto/xwiki-platform-crypto-common/src/main/java/org/xwiki/crypto/internal/digest/BouncyCastleDigest.java
@@ -76,12 +76,14 @@ public class BouncyCastleDigest implements Digest
@Override
public FilterInputStream getInputStream(InputStream is)
{
+ digest.reset();
return new DigestInputStream(is, digest);
}
@Override
public OutputStream getOutputStream()
{
+ digest.reset();
return new org.bouncycastle.crypto.io.DigestOutputStream(digest);
} | XWIKI-<I>: New Crypto Service API
- Properly reset digest as documented in comments | xwiki_xwiki-commons | train | java |
5d7386e114831c28ab6090f6ef8ca1d65c211144 | diff --git a/state/apiserver/usermanager/usermanager.go b/state/apiserver/usermanager/usermanager.go
index <HASH>..<HASH> 100644
--- a/state/apiserver/usermanager/usermanager.go
+++ b/state/apiserver/usermanager/usermanager.go
@@ -6,7 +6,7 @@ package usermanager
import (
"fmt"
- "github.com/loggo/loggo"
+ "github.com/juju/loggo"
"launchpad.net/juju-core/state"
"launchpad.net/juju-core/state/api/params" | Fix import; github.com/loggo/loggo moved to /juju/loggo. | juju_juju | train | go |
ea674c02244092d7cb58ca1825a9bf8b0429e53b | diff --git a/Tone/shim/WaveShaperNode.js b/Tone/shim/WaveShaperNode.js
index <HASH>..<HASH> 100644
--- a/Tone/shim/WaveShaperNode.js
+++ b/Tone/shim/WaveShaperNode.js
@@ -1,6 +1,6 @@
define(["../core/Tone", "../shim/AudioContext"], function(Tone){
- if (Tone.supported){
+ if (Tone.supported && !Tone.global.AudioContext.prototype._native_createWaveShaper){
//fixes safari only bug which is still present in 11
var ua = navigator.userAgent.toLowerCase(); | test if waveshaper shim is already installed | Tonejs_Tone.js | train | js |
76dbcd294d22be30e6c60dcd26c08c341d6e4c57 | diff --git a/src/server/pkg/deploy/assets/assets.go b/src/server/pkg/deploy/assets/assets.go
index <HASH>..<HASH> 100644
--- a/src/server/pkg/deploy/assets/assets.go
+++ b/src/server/pkg/deploy/assets/assets.go
@@ -30,7 +30,7 @@ var (
// that hasn't been released, and which has been manually applied
// to the official v3.2.7 release.
etcdImage = "quay.io/coreos/etcd:v3.3.5"
- grpcProxyImage = "pachyderm/grpc-proxy:0.4.3"
+ grpcProxyImage = "pachyderm/grpc-proxy:0.4.4"
dashName = "dash"
workerImage = "pachyderm/worker"
pauseImage = "gcr.io/google_containers/pause-amd64:3.0" | Update GRPC Proxy version to <I> | pachyderm_pachyderm | train | go |
ed7ecbf9e5f2e484a198caa475ade8c1321506ac | diff --git a/vendor/seahorse/lib/seahorse/client/http/headers.rb b/vendor/seahorse/lib/seahorse/client/http/headers.rb
index <HASH>..<HASH> 100644
--- a/vendor/seahorse/lib/seahorse/client/http/headers.rb
+++ b/vendor/seahorse/lib/seahorse/client/http/headers.rb
@@ -1,6 +1,26 @@
module Seahorse
module Client
module Http
+
+ # Provides a Hash-like interface for HTTP headers. Header names
+ # are treated indifferently as lower-cased strings. Header values
+ # are cast to strings.
+ #
+ # headers = Http::Headers.new
+ # headers['Content-Length'] = 100
+ # headers[:Authorization] = 'Abc'
+ #
+ # headers.keys
+ # #=> ['content-length', 'authorization']]
+ #
+ # headers.values
+ # #=> ['100', 'Abc']
+ #
+ # You can get the header values as a vanilla hash by calling {#to_h}:
+ #
+ # headers.to_h
+ # #=> { 'content-length' => '100', 'authorization' => 'Abc' }
+ #
class Headers
include Enumerable | Documented the Seahorse::Client::Http::Headers class. | aws_aws-sdk-ruby | train | rb |
c94158c04dbbe5e2be9560775c1bba72ed6594ca | diff --git a/stix2patterns/pattern.py b/stix2patterns/pattern.py
index <HASH>..<HASH> 100644
--- a/stix2patterns/pattern.py
+++ b/stix2patterns/pattern.py
@@ -34,6 +34,12 @@ class Pattern(object):
self.__parse_tree = self.__do_parse(pattern_str)
def inspect(self):
+ """
+ Inspect a pattern. This gives information regarding the sorts of
+ operations, content, etc in use in the pattern.
+
+ :return: Pattern information
+ """
inspector = stix2patterns.inspector.InspectionListener()
antlr4.ParseTreeWalker.DEFAULT.walk(inspector, self.__parse_tree) | Added a missing docstring | oasis-open_cti-pattern-validator | train | py |
46e9fdb562e44e651e9a380cc4b79667b13affa6 | diff --git a/lib/socketLogic.js b/lib/socketLogic.js
index <HASH>..<HASH> 100644
--- a/lib/socketLogic.js
+++ b/lib/socketLogic.js
@@ -150,6 +150,7 @@ function socketLogic (socket, secure, skynet){
socket.on('unsubscribe', function(data, fn) {
console.log('leaving room ', data.uuid);
socket.leave(data.uuid);
+ socket.leave(data.uuid + "_bc");
// Emit API request from device to room for subscribers
getDevice(socket, function(err, device){
if(err){ return; } | added leave bc room on unsubscribe websocket api | octoblu_meshblu | train | js |
65a6ce690fceb5154b888479062691a92029e7b8 | diff --git a/src/experimentalcode/erich/utilities/tree/rtree/RTreeChooseLeaf.java b/src/experimentalcode/erich/utilities/tree/rtree/RTreeChooseLeaf.java
index <HASH>..<HASH> 100644
--- a/src/experimentalcode/erich/utilities/tree/rtree/RTreeChooseLeaf.java
+++ b/src/experimentalcode/erich/utilities/tree/rtree/RTreeChooseLeaf.java
@@ -49,4 +49,4 @@ public class RTreeChooseLeaf implements InsertionStrategy {
assert (best > -1);
return best;
}
-}
+}
\ No newline at end of file | Cleanup RTree code. Working on-disk operation now. :-) | elki-project_elki | train | java |
d49381c0b612036b21baddc63a4be9ce43a54366 | diff --git a/salt/master.py b/salt/master.py
index <HASH>..<HASH> 100644
--- a/salt/master.py
+++ b/salt/master.py
@@ -2211,7 +2211,11 @@ class ClearFuncs(object):
if save_load_func:
try:
- self.mminion.returners[fstr](clear_load['jid'], clear_load, minions=minions)
+ returner_args = [clear_load['jid'], clear_load]
+ returner_kwargs = {}
+ if 'minions' in salt.utils.args.get_function_argspec(self.mminion.returners[fstring]).args:
+ returner_kwargs['minions'] = minions
+ self.mminion.returners[fstr](*returner_args, **returner_kwargs)
except Exception:
log.critical(
'The specified returner threw a stack trace:\n', | don't break save_load backwards compat | saltstack_salt | train | py |
087d7e55e20407f705d6481e72eacd3cb43b75d1 | diff --git a/lib/writer/xelatex.js b/lib/writer/xelatex.js
index <HASH>..<HASH> 100644
--- a/lib/writer/xelatex.js
+++ b/lib/writer/xelatex.js
@@ -35,6 +35,15 @@ function formatBlock(block) {
};
var formatImage = function(spans) {
+ if (spans.length > 0 && spans[0][0] === 'url') {
+ var url = spans[0][1];
+ var str =
+'\\begin{figure}[H]\n' +
+'\\centering\n' +
+'\\includegraphics{' + url + '}\n' +
+'\\end{figure}';
+ return str;
+ }
return formatSpans(spans);
}; | [xelatex] Implement image formatting. | sheremetyev_texts.js | train | js |
7512775574ae3da6ed89c95e03db51f647fd420e | diff --git a/cosmic_ray/interceptors/__init__.py b/cosmic_ray/interceptors/__init__.py
index <HASH>..<HASH> 100644
--- a/cosmic_ray/interceptors/__init__.py
+++ b/cosmic_ray/interceptors/__init__.py
@@ -0,0 +1,5 @@
+# An interceptor is a callable that is called at the end of the "init" command.
+#
+# Interceptors are passed the initialized WorkDB, and they are able to do
+# things like mark certain mutations as skipped (i.e. so that they are never
+# performed). | Added docstring describing what an "interceptor" is. | sixty-north_cosmic-ray | train | py |
621775361c2535b819ca1f3416170d4bb2deadd5 | diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb
index <HASH>..<HASH> 100644
--- a/lib/arel/visitors/to_sql.rb
+++ b/lib/arel/visitors/to_sql.rb
@@ -229,9 +229,9 @@ module Arel
def visit_Arel_Nodes_SelectCore o, collector
collector << "SELECT"
- maybe_visit o.top, collector
+ collector = maybe_visit o.top, collector
- maybe_visit o.set_quantifier, collector
+ collector = maybe_visit o.set_quantifier, collector
unless o.projections.empty?
collector << SPACE
@@ -265,7 +265,7 @@ module Arel
end
end
- maybe_visit o.having, collector
+ collector = maybe_visit o.having, collector
unless o.windows.empty?
collector << WINDOW | Completes <I>e<I> in reusing `maybe_visit`
:sweat: I don't know why the tests did not fail, but to keep
the same syntax as before, `collector =` is required.
Maybe `visit` changes `collector` in-place, so the result is the
same, but since I'm not sure about the side effects, I think this
PR is needed to. Sorry! :sweat: | rails_rails | train | rb |
3ba41ccc31194558bc93e0b0e5f801ab71f9ea19 | diff --git a/gwpy/plotter/decorators.py b/gwpy/plotter/decorators.py
index <HASH>..<HASH> 100644
--- a/gwpy/plotter/decorators.py
+++ b/gwpy/plotter/decorators.py
@@ -36,10 +36,13 @@ def auto_refresh(f, *args, **kwargs):
def axes_method(f, *args, **kwargs):
figure = args[0]
axes = [ax for ax in figure.axes]
+ if len(axes) == 0:
+ raise RuntimeError("No axes found for which '%s' is applicable"
+ % f.__name__)
if len(axes) != 1:
- raise ValueError("{0} only applicable for a Plot with a single set "
- "of data axes. With multiple data axes, you should "
- "access the {0} method of the relevant Axes (stored "
- "in ``Plot.axes``) directly".format(f.__name__))
+ raise RuntimeError("{0} only applicable for a Plot with a single set "
+ "of data axes. With multiple data axes, you should "
+ "access the {0} method of the relevant Axes (stored "
+ "in ``Plot.axes``) directly".format(f.__name__))
axesf = getattr(axes[0], f.__name__)
return axesf(*args[1:], **kwargs) | axes_method decorator: changed exeption type
- now throws RuntimeError if len(fig.axes) <= 1 | gwpy_gwpy | train | py |
ee8b01367dafafe69241e75532930b08d9c1adbf | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,6 @@ setup(
author_email="jdherman8@gmail.com",
license=open('LICENSE.md').read(),
install_requires=[
- "docopt",
"numpy",
"scipy",
"scikit-learn", | seems docopt is not used anywhere | SALib_SALib | train | py |
45833f170c13b3b8908c9a46c462676aaa7d4a5e | diff --git a/cider/_sh.py b/cider/_sh.py
index <HASH>..<HASH> 100644
--- a/cider/_sh.py
+++ b/cider/_sh.py
@@ -141,7 +141,8 @@ def mkdir_p(path):
def collapseuser(path):
home_dir = os.environ.get("HOME", pwd.getpwuid(os.getuid()).pw_dir)
if os.path.samefile(home_dir, commonpath([path, home_dir])):
- return os.path.join("~", os.path.relpath(path, home_dir))
+ relpath = os.path.relpath(path, home_dir)
+ return os.path.join("~", relpath) if relpath != "." else "~"
return path | Fix bug in collapseuser: $HOME should expand to "~", not "~/." | msanders_cider | train | py |
a93df81e41919e273e79d5f19a2dfdb04b5a71ad | diff --git a/src/com/diffplug/common/base/Consumers.java b/src/com/diffplug/common/base/Consumers.java
index <HASH>..<HASH> 100644
--- a/src/com/diffplug/common/base/Consumers.java
+++ b/src/com/diffplug/common/base/Consumers.java
@@ -16,6 +16,7 @@
package com.diffplug.common.base;
import java.util.function.Consumer;
+import java.util.function.Function;
import java.util.function.Supplier;
/** Helper functions for manipulating {@link Consumer}. */
@@ -25,11 +26,15 @@ public class Consumers {
return value -> {};
}
+ /** The equivalent of {@link Function#compose}, but for Consumer. */
+ public static <T, R> Consumer<T> compose(Function<? super T, ? extends R> function, Consumer<? super R> consumer) {
+ return value -> consumer.accept(function.apply(value));
+ }
+
/**
* A Consumer which always passes its its input to whatever Consumer is supplied by target.
* <p>
- * By passing something mutable, such as a {@link Box}, as
- * the input, you can redirect the returned consumer.
+ * By passing something mutable, such as a {@link Box}, you can redirect the returned consumer.
*/
public static <T> Consumer<T> redirectable(Supplier<Consumer<T>> target) {
return value -> target.get().accept(value); | Added Consumers.compose(). | diffplug_durian | train | java |
dbe7f3418165e34c5d4c1dbf8ade90159e5e1290 | diff --git a/src/Composer/Command/DependsCommand.php b/src/Composer/Command/DependsCommand.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Command/DependsCommand.php
+++ b/src/Composer/Command/DependsCommand.php
@@ -17,6 +17,7 @@ use Composer\Package\Link;
use Composer\Package\PackageInterface;
use Composer\Repository\ArrayRepository;
use Composer\Repository\CompositeRepository;
+use Composer\Repository\PlatformRepository;
use Composer\Plugin\CommandEvent;
use Composer\Plugin\PluginEvents;
use Symfony\Component\Console\Input\InputInterface;
@@ -61,9 +62,11 @@ EOT
$commandEvent = new CommandEvent(PluginEvents::COMMAND, 'depends', $input, $output);
$composer->getEventDispatcher()->dispatch($commandEvent->getName(), $commandEvent);
+ $platformOverrides = $composer->getConfig()->get('platform') ?: array();
$repo = new CompositeRepository(array(
new ArrayRepository(array($composer->getPackage())),
$composer->getRepositoryManager()->getLocalRepository(),
+ new PlatformRepository(array(), $platformOverrides),
));
$needle = $input->getArgument('package'); | Allow depend command to show results for platform packages, fixes #<I>, fixes #<I> | composer_composer | train | php |
2a0544abf2a8fdc51fd404c6cc4b61dd681dbf77 | diff --git a/lib/sensu/client.rb b/lib/sensu/client.rb
index <HASH>..<HASH> 100644
--- a/lib/sensu/client.rb
+++ b/lib/sensu/client.rb
@@ -136,18 +136,10 @@ module Sensu
:check => check
})
extension = @extensions[:checks][check[:name]]
- begin
- extension.run do |output, status|
- check[:output] = output
- check[:status] = status
- publish_result(check)
- end
- rescue => error
- @logger.error('check extension error', {
- :extension => extension,
- :error => error.to_s,
- :backtrace => error.backtrace.join("\n")
- })
+ extension.run do |output, status|
+ check[:output] = output
+ check[:status] = status
+ publish_result(check)
end
end | [hacks] removed check extension run rescue, almost useless, threads man | sensu_sensu | train | rb |
73d146633d5df8643be43a41460481779b372838 | diff --git a/tests/unit/geometry/ImportedTest.py b/tests/unit/geometry/ImportedTest.py
index <HASH>..<HASH> 100644
--- a/tests/unit/geometry/ImportedTest.py
+++ b/tests/unit/geometry/ImportedTest.py
@@ -27,8 +27,8 @@ class ImportedTest:
assert 'throat.endpoints' not in geo.keys()
assert 'throat.conduit_lengths' not in geo.keys()
assert 'throat.length' in geo.models.keys()
- assert 'throat.endpoints' in geo.models.keys()
- assert 'throat.conduit_lengths' in geo.models.keys()
+ assert 'throat.diffusive_size_factors' in geo.models.keys()
+ assert 'throat.hydraulic_size_factors' in geo.models.keys()
def test_with_added_pores(self):
net = op.network.Cubic(shape=[3, 3, 3]) | updating Imported class to use new flow factors | PMEAL_OpenPNM | train | py |
44971b6b44b7229a6494b28db729447b3c0ba4f1 | diff --git a/src/Rebing/GraphQL/Support/SelectFields.php b/src/Rebing/GraphQL/Support/SelectFields.php
index <HASH>..<HASH> 100644
--- a/src/Rebing/GraphQL/Support/SelectFields.php
+++ b/src/Rebing/GraphQL/Support/SelectFields.php
@@ -169,7 +169,22 @@ class SelectFields {
$foreignKey = $parentTable ? ($parentTable . '.' . $foreignKey) : $foreignKey;
- if(is_a($relation, BelongsTo::class) || is_a($relation, MorphTo::class))
+ if(is_a($relation, MorphTo::class))
+ {
+ $foreignKeyType = $relation->getMorphType();
+ $foreignKeyType = $parentTable ? ($parentTable . '.' . $foreignKeyType) : $foreignKeyType;
+
+ if( ! in_array($foreignKey, $select))
+ {
+ $select[] = $foreignKey;
+ }
+
+ if( ! in_array($foreignKeyType, $select))
+ {
+ $select[] = $foreignKeyType;
+ }
+ }
+ elseif(is_a($relation, BelongsTo::class))
{
if( ! in_array($foreignKey, $select))
{ | Fix MorphTo (#<I>)
* Fix MorphTo
MorphTo requires foreign key and foreign morph type
I tested and works
* Update SelectFields.php | rebing_graphql-laravel | train | php |
79b5751cbb21df6063d33f719096728f3edf1730 | diff --git a/packages/vaex-hdf5/vaex/hdf5/_version.py b/packages/vaex-hdf5/vaex/hdf5/_version.py
index <HASH>..<HASH> 100644
--- a/packages/vaex-hdf5/vaex/hdf5/_version.py
+++ b/packages/vaex-hdf5/vaex/hdf5/_version.py
@@ -1,2 +1,2 @@
-__version_tuple__ = (0, 1, 4, None, None)
-__version__ = '0.1.4'
+__version_tuple__ = (0, 2, 0)
+__version__ = '0.2.0' | Release <I> of vaex-hdf5 | vaexio_vaex | train | py |
2bc43229f60c10f04b1307cfe809b391efbf14d2 | diff --git a/src/sap.m/test/sap/m/demokit/basicTemplate/webapp/controller/App.controller.js b/src/sap.m/test/sap/m/demokit/basicTemplate/webapp/controller/App.controller.js
index <HASH>..<HASH> 100644
--- a/src/sap.m/test/sap/m/demokit/basicTemplate/webapp/controller/App.controller.js
+++ b/src/sap.m/test/sap/m/demokit/basicTemplate/webapp/controller/App.controller.js
@@ -1,10 +1,13 @@
sap.ui.define([
- "sap/ui/core/mvc/Controller"
-], function(Controller) {
+ "sap/ui/core/mvc/Controller",
+ "sap/ui/demo/basicTemplate/model/formatter"
+], function(Controller, formatter) {
"use strict";
return Controller.extend("sap.ui.demo.basicTemplate.controller.App", {
+ formatter: formatter,
+
onInit: function () {
} | [INTERNAL] sap.m.demo.basicTemplate: Add a formatter reference
The App controller should have a reference to the formatter
Change-Id: I<I>fe<I>c8c<I>addfc<I>e2d1fb<I>dd2c<I>d | SAP_openui5 | train | js |
8a246da57256c44f9d5a3e38a969e0d6ff256d8e | diff --git a/src/components/calendar/Calendar.js b/src/components/calendar/Calendar.js
index <HASH>..<HASH> 100644
--- a/src/components/calendar/Calendar.js
+++ b/src/components/calendar/Calendar.js
@@ -201,6 +201,24 @@ export class Calendar extends Component {
else
this.renderTooltip();
}
+
+ if (!this.props.onViewDateChange && !this.viewStateChanged) {
+ let propValue = this.props.value;
+ if (Array.isArray(propValue)) {
+ propValue = propValue[0];
+ }
+
+ let prevPropValue = prevProps.value;
+ if (Array.isArray(prevPropValue)) {
+ prevPropValue = prevPropValue[0];
+ }
+
+ if ((!prevPropValue && propValue) || (propValue && propValue.getTime() !== prevPropValue.getTime())) {
+ this.setState({
+ viewDate: (this.props.viewDate || propValue || new Date())
+ });
+ }
+ }
}
componentWillUnmount() {
@@ -596,6 +614,7 @@ export class Calendar extends Component {
});
}
else {
+ this.viewStateChanged = true;
this.setState({
viewDate: value
}); | Fixed #<I> - Calendar Overlay doesnt open with current date after value update | primefaces_primereact | train | js |
8eb23fbefc120951ef4ba75bf49864f14f77de87 | diff --git a/src/main/java/water/api/Predict.java b/src/main/java/water/api/Predict.java
index <HASH>..<HASH> 100644
--- a/src/main/java/water/api/Predict.java
+++ b/src/main/java/water/api/Predict.java
@@ -33,8 +33,8 @@ public class Predict extends Request2 {
if( model instanceof Model )
fr = (( Model)model).score(data);
else fr = ((OldModel)model).score(data);
+ fr = new Frame(prediction,fr._names,fr.vecs()); // Jam in the frame key
fr.unlock();
- UKV.put(prediction, fr);
return Inspect2.redirect(this, prediction.toString());
} catch( Throwable t ) {
Log.err(t);
diff --git a/src/main/java/water/fvec/Frame.java b/src/main/java/water/fvec/Frame.java
index <HASH>..<HASH> 100644
--- a/src/main/java/water/fvec/Frame.java
+++ b/src/main/java/water/fvec/Frame.java
@@ -252,7 +252,7 @@ public class Frame extends Lockable<Frame> {
public final String[] names() { return _names; }
public int numCols() { return vecs().length; }
- public long numRows(){ return anyVec().length();}
+ public long numRows() { return anyVec()==null ? 0 : anyVec().length(); }
// Number of columns when categoricals expanded.
// Note: One level is dropped in each categorical col. | Remove debugging code
And inject Frame key in predict | h2oai_h2o-2 | train | java,java |
6c693039cfdaaaca2ce842d7f0a8d1ff26346990 | diff --git a/alphalens/tears.py b/alphalens/tears.py
index <HASH>..<HASH> 100644
--- a/alphalens/tears.py
+++ b/alphalens/tears.py
@@ -20,7 +20,7 @@ import matplotlib.gridspec as gridspec
from itertools import product
-@plotting_context
+@p.plotting_context
def create_factor_tear_sheet(factor,
prices,
sectors=None, | BUG import plotting context from plotting | quantopian_alphalens | train | py |
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.