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
|
---|---|---|---|---|---|
922d58c3096966f3c0c18fa60db6c244059a574a
|
diff --git a/azure-toolkit-libs/azure-toolkit-common-lib/src/main/java/com/microsoft/azure/toolkit/lib/common/action/Action.java b/azure-toolkit-libs/azure-toolkit-common-lib/src/main/java/com/microsoft/azure/toolkit/lib/common/action/Action.java
index <HASH>..<HASH> 100644
--- a/azure-toolkit-libs/azure-toolkit-common-lib/src/main/java/com/microsoft/azure/toolkit/lib/common/action/Action.java
+++ b/azure-toolkit-libs/azure-toolkit-common-lib/src/main/java/com/microsoft/azure/toolkit/lib/common/action/Action.java
@@ -122,9 +122,9 @@ public class Action<D> {
protected void handle(D source, Object e, BiConsumer<D, Object> handler) {
if (source instanceof AzResource) {
- Optional.of(AzureTelemetry.getContext()).map(AzureTelemetry.Context::getActionParent).ifPresent(c -> {
+ Optional.of(AzureTelemetry.getActionContext()).ifPresent(c -> {
c.setProperty("subscriptionId", ((AzResource<?, ?, ?>) source).getSubscriptionId());
- c.setProperty("resourceType", source.getClass().getSimpleName());
+ c.setProperty("resourceType", ((AzResource<?, ?, ?>) source).getFullResourceType());
});
}
handler.accept(source, e);
|
#<I>: use `FullResourceTypeName` instead of class name as `resourceType` in telemetry
|
Microsoft_azure-maven-plugins
|
train
|
java
|
4d3814844cf09ac6a6b1647514083c1df47ad14e
|
diff --git a/lib/format_engine/format_spec/literal.rb b/lib/format_engine/format_spec/literal.rb
index <HASH>..<HASH> 100644
--- a/lib/format_engine/format_spec/literal.rb
+++ b/lib/format_engine/format_spec/literal.rb
@@ -8,9 +8,9 @@ module FormatEngine
# Set up a literal format specification.
def initialize(literal)
- @literal = literal
- @head = literal.rstrip
- @tail = @head != @literal
+ @literal = literal
+ @head = literal.rstrip
+ @has_tail = @head != @literal
end
# Is this literal supported by the engine? YES!
@@ -26,7 +26,7 @@ module FormatEngine
# Parse from the input string
def do_parse(spec_info)
spec_info.parse!(@head) unless @head.empty?
- spec_info.parse(/\s*/) if @tail
+ spec_info.parse(/\s*/) if @has_tail
end
# Inspect for debugging.
|
Renamed inst var for clarity.
|
PeterCamilleri_format_engine
|
train
|
rb
|
3f21412aef10dd57ae93f5932cd2f649485bf748
|
diff --git a/src/raven.js b/src/raven.js
index <HASH>..<HASH> 100644
--- a/src/raven.js
+++ b/src/raven.js
@@ -18,6 +18,7 @@ var urlencode = utils.urlencode;
var uuid4 = utils.uuid4;
var htmlTreeAsString = utils.htmlTreeAsString;
var parseUrl = utils.parseUrl;
+var isString = utils.isString;
var wrapConsoleMethod = require('./console').wrapMethod;
@@ -837,7 +838,7 @@ Raven.prototype = {
return function (method, url) { // preserve arity
// if Sentry key appears in URL, don't capture
- if (url.indexOf(self._globalKey) === -1) {
+ if (isString(url) && url.indexOf(self._globalKey) === -1) {
this.__raven_xhr = {
method: method,
url: url,
|
Check url exists before looking for sentry token
|
getsentry_sentry-javascript
|
train
|
js
|
c25ac58231938731af20dbcaeca6d5bae8347610
|
diff --git a/src/ExtendedPostProcessingRepository.php b/src/ExtendedPostProcessingRepository.php
index <HASH>..<HASH> 100644
--- a/src/ExtendedPostProcessingRepository.php
+++ b/src/ExtendedPostProcessingRepository.php
@@ -2,6 +2,7 @@
namespace Czim\Repository;
use Czim\Repository\Contracts\PostProcessingRepositoryInterface;
+use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Czim\Repository\Contracts\PostProcessorInterface;
@@ -345,7 +346,7 @@ abstract class ExtendedPostProcessingRepository extends ExtendedRepository imple
* @param array $columns
* @param string $pageName
* @param null $page
- * @return Model|Collection|null
+ * @return LengthAwarePaginator|null
*/
public function paginate($perPage = 1, $columns = ['*'], $pageName = 'page', $page = null)
{
|
Minor docblock fix for paginate method
|
czim_laravel-repository
|
train
|
php
|
eb3a3f50870d9061d3b96d02c790f0b91267a426
|
diff --git a/eng/mgmt/automation/parameters.py b/eng/mgmt/automation/parameters.py
index <HASH>..<HASH> 100644
--- a/eng/mgmt/automation/parameters.py
+++ b/eng/mgmt/automation/parameters.py
@@ -16,7 +16,7 @@ MAVEN_URL = 'https://repo1.maven.org/maven2/{group_id}/{artifact_id}/{version}/{
SDK_ROOT = '../../../' # related to file dir
AUTOREST_CORE_VERSION = '3.8.4'
-AUTOREST_JAVA = '@autorest/[email protected]'
+AUTOREST_JAVA = '@autorest/[email protected]'
DEFAULT_VERSION = '1.0.0-beta.1'
GROUP_ID = 'com.azure.resourcemanager'
API_SPECS_FILE = 'api-specs.yaml'
|
mgmt, upgrade codegen (#<I>)
|
Azure_azure-sdk-for-java
|
train
|
py
|
8330a1936d9576760e983be9b529b2470d32da3c
|
diff --git a/stories/index.js b/stories/index.js
index <HASH>..<HASH> 100644
--- a/stories/index.js
+++ b/stories/index.js
@@ -25,7 +25,10 @@ class App extends Component {
]
};
+ changeAction = action("onChange");
+
handleChange = data => {
+ // this.changeAction(data);
// this.setState({ data });
};
|
gonna log chages as well
|
iddan_react-spreadsheet
|
train
|
js
|
b5ba2c16b3fbd8210461bb8b87ddb8afcec0c291
|
diff --git a/ftpretty.py b/ftpretty.py
index <HASH>..<HASH> 100644
--- a/ftpretty.py
+++ b/ftpretty.py
@@ -109,8 +109,6 @@ class ftpretty(object):
try:
self.conn.storbinary('STOR %s' % remote_file, local_file)
size = self.conn.size(remote_file)
- except Exception as exc:
- print(exc)
finally:
local_file.close()
self.conn.cwd(current)
|
Raise exception if fails to put.
|
codebynumbers_ftpretty
|
train
|
py
|
ef463ab3e48073b23b12ba504f86f94fba1686ec
|
diff --git a/lib/cinch/channel.rb b/lib/cinch/channel.rb
index <HASH>..<HASH> 100644
--- a/lib/cinch/channel.rb
+++ b/lib/cinch/channel.rb
@@ -59,6 +59,14 @@ module Cinch
@synced_attributes = Set.new
@when_requesting_synced_attribute = lambda {|attr|
+ if @in_channel && attr == :topic && !attribute_synced?(:topic)
+ # Even if we are in the channel, if there's no topic set,
+ # the attribute won't be synchronised yet. Explicitly
+ # request the topic.
+ @bot.irc.send "TOPIC #@name"
+ next
+ end
+
unless @in_channel
unsync(attr)
case attr
|
Explicitly request the channel topic even if the bot is in the channel.
When no channel topic is set, the server won't notify us of that when
we join the channel. That means the topic attribute wouldn't be
synchronised and requesting the channel's topic would lock
indefinitely.
Closes gh-<I>
|
cinchrb_cinch
|
train
|
rb
|
a0efb2da920d2a9fb43ec68cd4d25e1a605ecd59
|
diff --git a/spring-android-rest-template/src/main/java/org/springframework/http/client/support/InterceptingHttpAccessor.java b/spring-android-rest-template/src/main/java/org/springframework/http/client/support/InterceptingHttpAccessor.java
index <HASH>..<HASH> 100644
--- a/spring-android-rest-template/src/main/java/org/springframework/http/client/support/InterceptingHttpAccessor.java
+++ b/spring-android-rest-template/src/main/java/org/springframework/http/client/support/InterceptingHttpAccessor.java
@@ -17,6 +17,7 @@
package org.springframework.http.client.support;
import java.util.List;
+import java.util.ArrayList;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.ClientHttpRequestInterceptor;
@@ -34,7 +35,7 @@ import org.springframework.util.CollectionUtils;
*/
public abstract class InterceptingHttpAccessor extends HttpAccessor {
- private List<ClientHttpRequestInterceptor> interceptors;
+ private List<ClientHttpRequestInterceptor> interceptors = new ArrayList<ClientHttpRequestInterceptor>();
/**
* Sets the request interceptors that this accessor should use.
|
Initialize interceptor list in InterceptingHttpAccessor to avoid NPE and for consistency with Spring Framework. SOCIAL-<I>
|
spring-projects_spring-android
|
train
|
java
|
69e42e4d6eafe016cfc524ed44120a8d93421641
|
diff --git a/grails-web/src/main/groovy/org/codehaus/groovy/grails/web/sitemesh/SpringMVCViewDecorator.java b/grails-web/src/main/groovy/org/codehaus/groovy/grails/web/sitemesh/SpringMVCViewDecorator.java
index <HASH>..<HASH> 100644
--- a/grails-web/src/main/groovy/org/codehaus/groovy/grails/web/sitemesh/SpringMVCViewDecorator.java
+++ b/grails-web/src/main/groovy/org/codehaus/groovy/grails/web/sitemesh/SpringMVCViewDecorator.java
@@ -61,6 +61,7 @@ public class SpringMVCViewDecorator extends DefaultDecorator implements com.open
if (!response.isCommitted()) {
boolean dispatched = false;
try {
+ request.setAttribute(GrailsPageFilter.GSP_SITEMESH_PAGE, new GSPSitemeshPage(true));
request.setAttribute(GrailsPageFilter.ALREADY_APPLIED_KEY, Boolean.TRUE);
try {
view.render(Collections.<String, Object>emptyMap(), request, response);
@@ -80,6 +81,7 @@ public class SpringMVCViewDecorator extends DefaultDecorator implements com.open
}
request.removeAttribute(RequestConstants.PAGE);
+ request.removeAttribute(GrailsPageFilter.GSP_SITEMESH_PAGE);
}
private void cleanRequestAttributes(HttpServletRequest request) {
|
Add new GSPSitemeshPage to request attributes so that rendering layout doesn't modify the previous instance "captured" during view rendering.
|
grails_grails-core
|
train
|
java
|
8da4ffc28e1e099306d338787d7cdf6fb80f5dff
|
diff --git a/openquake/hazardlib/valid.py b/openquake/hazardlib/valid.py
index <HASH>..<HASH> 100644
--- a/openquake/hazardlib/valid.py
+++ b/openquake/hazardlib/valid.py
@@ -993,7 +993,8 @@ def pmf(value):
[(0.157, 0), (0.843, 1)]
"""
probs = probabilities(value)
- if abs(1.-sum(map(float, value.split()))) > 1e-12:
+ if sum(probs) != 1:
+ # avoid https://github.com/gem/oq-engine/issues/5901
raise ValueError('The probabilities %s do not sum up to 1!' % value)
return [(p, i) for i, p in enumerate(probs)]
|
Make sure the sum of probabilities is exactly 1 in valid.pmf
|
gem_oq-engine
|
train
|
py
|
6a3eb3dafce5d814441c08f837a4960213a0e3ce
|
diff --git a/smbl/prog/plugins/kallisto.py b/smbl/prog/plugins/kallisto.py
index <HASH>..<HASH> 100644
--- a/smbl/prog/plugins/kallisto.py
+++ b/smbl/prog/plugins/kallisto.py
@@ -41,4 +41,5 @@ class Kallisto(Program):
@classmethod
def supported_platforms(cls):
- return ["osx","linux","cygwin"]
+ return []
+ #["osx","linux","cygwin"]
|
Deactivation of Kallisto plugin -- problems with libraries
|
karel-brinda_smbl
|
train
|
py
|
dcbb35256d7132716c8ffd4d73628d45113c1cd9
|
diff --git a/tests/DatabaseDriverTest.php b/tests/DatabaseDriverTest.php
index <HASH>..<HASH> 100644
--- a/tests/DatabaseDriverTest.php
+++ b/tests/DatabaseDriverTest.php
@@ -47,8 +47,7 @@ class DatabaseDriverTest extends PersistentDriverTestCase
$this->database = new Manager;
$this->database->addConnection([
'driver' => 'sqlite',
- 'database' => __DIR__ . '/database.sqlite',
- 'prefix' => '',
+ 'database' => ':memory:'
]);
// Reset the sqlite database.
|
SQLite now uses memory for tests - helps free the package from laravel-app dependency.
|
BeatSwitch_lock-laravel
|
train
|
php
|
64f65f85c26278729c89c2efc9e231d186d7f54f
|
diff --git a/src/Parser/Banking/Mt940/Engine/Rabo.php b/src/Parser/Banking/Mt940/Engine/Rabo.php
index <HASH>..<HASH> 100644
--- a/src/Parser/Banking/Mt940/Engine/Rabo.php
+++ b/src/Parser/Banking/Mt940/Engine/Rabo.php
@@ -74,6 +74,12 @@ class Rabo extends Engine
return $this->sanitizeAccountName($accountName);
}
}
+
+ if (preg_match('#/NAME/(.+?)/#ms',$this->getCurrentTransactionData(), $results)) // Last chance test to see if we get something from the AM04 or something
+ {
+ $accountName = trim($results[1]);
+ return $this->sanitizeAccountName($accountName);
+ }
return '';
}
|
Update Rabo.php
Added support for getting name in mode:
:<I>:/MARF/blah/EREF/blah2/RTRN/AM<I>/BENM//NAME/LoremIpsum/
|
fruitl00p_php-mt940
|
train
|
php
|
0d0349744567847b5e09dbc3b1577387fd7ce1a2
|
diff --git a/lib/tunnel.js b/lib/tunnel.js
index <HASH>..<HASH> 100644
--- a/lib/tunnel.js
+++ b/lib/tunnel.js
@@ -48,6 +48,9 @@ function tunnelProxy(server, proxy) {
var useTunnelPolicy = policy == 'tunnel';
var isLocalUIUrl = !useTunnelPolicy && (config.isLocalUIUrl(hostname) || config.isPluginUrl(hostname));
var _rules = req.rules = (isICloundCKDB || isLocalUIUrl) ? {} : rules.initRules(req);
+ if (!isLocalUIUrl && util.isLocalAddress(hostname)) {
+ isLocalUIUrl = options.port == config.port || options.port == config.uiport;
+ }
rules.resolveRulesFile(req, function() {
var filter = req.filter;
var disable = req.disable;
|
feat: auto intecept the https request of local webui
|
avwo_whistle
|
train
|
js
|
78fd9181cfdc93ef9b5a9eaea942fd3adcfccd79
|
diff --git a/tests/phpunit/unit/Storage/FieldSetTest.php b/tests/phpunit/unit/Storage/FieldSetTest.php
index <HASH>..<HASH> 100644
--- a/tests/phpunit/unit/Storage/FieldSetTest.php
+++ b/tests/phpunit/unit/Storage/FieldSetTest.php
@@ -37,6 +37,10 @@ class FieldSetTest extends BoltUnitTest
]);
$repo->save($entity);
+
+ $entity2 = $repo->find(1);
+ $this->assertEquals('An awesome image', $entity2->templatefields->image['title']);
+
}
|
added test to check saving and hydrating of template fields
|
bolt_bolt
|
train
|
php
|
f47d5c91d67268f05da9b7e85c7502a7f121f9c2
|
diff --git a/core/common/src/main/java/alluxio/collections/FieldIndex.java b/core/common/src/main/java/alluxio/collections/FieldIndex.java
index <HASH>..<HASH> 100644
--- a/core/common/src/main/java/alluxio/collections/FieldIndex.java
+++ b/core/common/src/main/java/alluxio/collections/FieldIndex.java
@@ -89,7 +89,7 @@ public interface FieldIndex<T> extends Iterable<T> {
Iterator<T> iterator();
/**
- * @return the number of objects in this indexed set
+ * @return the number of objects in this index set
*/
int size();
}
|
indexed set is changed to index set
|
Alluxio_alluxio
|
train
|
java
|
26000401f45074b1bc7877eda9d0127cd943b580
|
diff --git a/lib/morpheus-heroku/deploy.rb b/lib/morpheus-heroku/deploy.rb
index <HASH>..<HASH> 100644
--- a/lib/morpheus-heroku/deploy.rb
+++ b/lib/morpheus-heroku/deploy.rb
@@ -1,6 +1,8 @@
module MorpheusHeroku
module Deploy
- extend self
+ DEPLOY_ENV = "production"
+
+ module_function
def production
fetch_active_remotes!
@@ -39,7 +41,7 @@ module MorpheusHeroku
end
def tag_name
- "heroku_deploy_#{Time.now.to_s(:db).gsub(/[- :]/, "_")}"
+ "heroku_#{DEPLOY_ENV}_#{Time.now.to_s(:db).gsub(/[- :]/, "_")}"
end
def update_git!
|
[deploy] State the env in the tag name
|
cionescu_morpheus-heroku
|
train
|
rb
|
242200458c58206f135e83726e4dcce471d8ac3f
|
diff --git a/xarray/backends/plugins.py b/xarray/backends/plugins.py
index <HASH>..<HASH> 100644
--- a/xarray/backends/plugins.py
+++ b/xarray/backends/plugins.py
@@ -9,7 +9,7 @@ try:
from importlib.metadata import entry_points
except ImportError:
# if the fallback library is missing, we are doomed.
- from importlib_metadata import entry_points # type: ignore[no-redef]
+ from importlib_metadata import entry_points # type: ignore
STANDARD_BACKENDS_ORDER = ["netcdf4", "h5netcdf", "scipy"]
|
Fix mypy issue with entry_points (#<I>)
|
pydata_xarray
|
train
|
py
|
c95da25eb25e853ee406772b374bad3d6f644e97
|
diff --git a/src/Whoops/JsonResponseHandler.php b/src/Whoops/JsonResponseHandler.php
index <HASH>..<HASH> 100644
--- a/src/Whoops/JsonResponseHandler.php
+++ b/src/Whoops/JsonResponseHandler.php
@@ -38,6 +38,8 @@ class JsonResponseHandler extends OriginalJsonHandler
$response["debug"] = $debug;
}
+ $this->setProperHeader($this->getException());
+
echo json_encode($response, defined('JSON_PARTIAL_OUTPUT_ON_ERROR') ? JSON_PARTIAL_OUTPUT_ON_ERROR : 0);
return Handler::QUIT;
|
Added the Status Code on Error
|
byjg_restserver
|
train
|
php
|
b60632a2dea33f3930b2b8d57aa9bcbe08f3d8f2
|
diff --git a/lib/scene_toolkit/cli.rb b/lib/scene_toolkit/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/scene_toolkit/cli.rb
+++ b/lib/scene_toolkit/cli.rb
@@ -99,7 +99,6 @@ class SceneToolkit::CLI
raise ArgumentError("#{source} is not a directory") unless File.directory?(source)
releases = []
- uids = {}
Dir.glob(File.join(source, "**", "*.mp3")).each do |file|
release_path = File.expand_path(File.dirname(file))
@@ -108,12 +107,6 @@ class SceneToolkit::CLI
release = SceneToolkit::Release.new(release_path, @cache)
releases << release_path
yield(release)
-
- if uids.has_key?(release.uid)
- release.errors << "Duplicate release of #{uids[release.uid]}"
- else
- uids[release.uid] = release.path
- end
end
end
end
|
FIX: Skip duplicate checking by now
|
knoopx_scene-toolkit
|
train
|
rb
|
0edd0935d145ac2501c8a1615cbf1e054e2af0ab
|
diff --git a/tests/WidgetTest/DbTest.php b/tests/WidgetTest/DbTest.php
index <HASH>..<HASH> 100644
--- a/tests/WidgetTest/DbTest.php
+++ b/tests/WidgetTest/DbTest.php
@@ -103,6 +103,7 @@ class DbTest extends TestCase
public function testGetRecord()
{
+ $this->initFixtures();
$this->assertInstanceOf('\Widget\Db\Record', $this->db->create('member'));
}
|
fixed get record but table not exits error
|
twinh_wei
|
train
|
php
|
f0674e96481a1a37778dc9834e838f298eb4483d
|
diff --git a/slf4j-migrator/src/main/java/org/slf4j/migrator/ProjectConverter.java b/slf4j-migrator/src/main/java/org/slf4j/migrator/ProjectConverter.java
index <HASH>..<HASH> 100644
--- a/slf4j-migrator/src/main/java/org/slf4j/migrator/ProjectConverter.java
+++ b/slf4j-migrator/src/main/java/org/slf4j/migrator/ProjectConverter.java
@@ -56,7 +56,7 @@ public class ProjectConverter {
/**
* Ask for concrete matcher implementation depending on the conversion mode
* Ask for user confirmation to convert the selected source directory if valid
- * Ask for user confirmation in case of number of files to convert > 1000
+ * Ask for user confirmation in case of number of files to convert > 1000
*
* @param conversionType
* @param progressListener
|
attempt to fix slf4j-migrator Maven Central upload issue
|
qos-ch_slf4j
|
train
|
java
|
22d25ac1a378d5c9e51c981f13b3e2d6cf269b48
|
diff --git a/infoblox_client/objects.py b/infoblox_client/objects.py
index <HASH>..<HASH> 100644
--- a/infoblox_client/objects.py
+++ b/infoblox_client/objects.py
@@ -451,7 +451,8 @@ class InfobloxObject(BaseObject):
class Network(InfobloxObject):
_fields = ['network_view', 'network', 'template',
- 'options', 'members', 'extattrs', 'comment']
+ 'options', 'members', 'extattrs', 'comment',
+ 'zone_associations']
_search_for_update_fields = ['network_view', 'network']
_all_searchable_fields = _search_for_update_fields
_shadow_fields = ['_ref']
|
Add zone_associations for _field on Network Class (#<I>)
Add an extra _field to the Network Class
|
infobloxopen_infoblox-client
|
train
|
py
|
2bffd449e8cac12c9c006f6f7e23e209d9514151
|
diff --git a/src/yajra/Oci8/Query/Grammars/OracleGrammar.php b/src/yajra/Oci8/Query/Grammars/OracleGrammar.php
index <HASH>..<HASH> 100644
--- a/src/yajra/Oci8/Query/Grammars/OracleGrammar.php
+++ b/src/yajra/Oci8/Query/Grammars/OracleGrammar.php
@@ -206,13 +206,8 @@ class OracleGrammar extends Grammar {
* @param string $sequence
* @return string
*/
- public function compileInsertGetId(Builder $query, $values, $sequence)
+ public function compileInsertGetId(Builder $query, $values, $sequence = 'id')
{
- if (is_null($sequence))
- {
- $sequence = 'id';
- }
-
return $this->compileInsert($query, $values) . ' returning ' . $this->wrap($sequence) . ' into ?';
}
|
refactor unnecessary if condition and make sequence id optional
|
yajra_laravel-oci8
|
train
|
php
|
aab5020670827be09a627193d5f7e5a5f7f4c651
|
diff --git a/lib/cfndsl/conditions.rb b/lib/cfndsl/conditions.rb
index <HASH>..<HASH> 100644
--- a/lib/cfndsl/conditions.rb
+++ b/lib/cfndsl/conditions.rb
@@ -4,7 +4,7 @@ module CfnDsl
# Handles condition objects
#
# Usage:
- # Condition :ConditionName, FnEqual(Ref(:ParameterName), 'helloworld')
+ # Condition :ConditionName, FnEquals(Ref(:ParameterName), 'helloworld')
class ConditionDefinition < JSONable
include JSONSerialisableObject
|
Update conditions.rb (#<I>)
FnEquals in sample usage
|
cfndsl_cfndsl
|
train
|
rb
|
2190ec44f3148bddb13c6a791dd69fa5097443f9
|
diff --git a/src/main/java/com/cognitect/transit/impl/Util.java b/src/main/java/com/cognitect/transit/impl/Util.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cognitect/transit/impl/Util.java
+++ b/src/main/java/com/cognitect/transit/impl/Util.java
@@ -2,6 +2,8 @@ package com.cognitect.transit.impl;
import java.lang.reflect.Array;
import java.util.Collection;
+import java.util.List;
+import java.util.Map;
/**
* Created by fogus on 4/2/14.
@@ -45,7 +47,9 @@ public class Util {
i++;
}
return i;
- }
+ } else if (a instanceof List) {
+ return ((List)a).size();
+ }
else
throw new UnsupportedOperationException("arraySize not supported on this type " + a.getClass().getSimpleName());
@@ -54,6 +58,8 @@ public class Util {
public static long mapSize(Object m) {
if(m instanceof Collection)
return ((Collection) m).size();
+ else if (m instanceof Map)
+ return ((Map)m).size();
else
throw new UnsupportedOperationException("mapSize not supported on this type " + m.getClass().getSimpleName());
}
|
Add Map and List support to mapSize and arraySize, respectively
|
cognitect_transit-java
|
train
|
java
|
957664cf3ab6b44adfbc707b2c8afe3237ce7ffd
|
diff --git a/data/features/features_csv_to_dict.py b/data/features/features_csv_to_dict.py
index <HASH>..<HASH> 100755
--- a/data/features/features_csv_to_dict.py
+++ b/data/features/features_csv_to_dict.py
@@ -52,14 +52,16 @@ def main(argv):
sys.exit(2)
def binarize(num):
- """Replace 0, -1, 1 with 11, 10, 01
+ """Replace 0, -1, 1, 2 with 00, 10, 01, 11
"""
- if num == '0':
- return '11'
- elif num == '-1':
+ if num == '0': # 0
+ return '00'
+ elif num == '-1': # -
return '10'
- elif num == '1':
+ elif num == '1': # +
return '01'
+ elif num == '2': # ±
+ return '11'
ifile = ''
|
introducing '2' value for +/- --> 0b<I> ('0' for 0 now --> '<I>'; interpret each as necessary in the library)
|
chrislit_abydos
|
train
|
py
|
5c7f1fc3a79720df21b4db23ea3a4ea28588b5e8
|
diff --git a/lib/Gitlab/Model/Project.php b/lib/Gitlab/Model/Project.php
index <HASH>..<HASH> 100644
--- a/lib/Gitlab/Model/Project.php
+++ b/lib/Gitlab/Model/Project.php
@@ -8,6 +8,7 @@ class Project extends AbstractModel
'id',
'code',
'name',
+ 'namespace',
'description',
'path',
'default_branch',
|
Added namespace property to model.
|
m4tthumphrey_php-gitlab-api
|
train
|
php
|
375c4da5d32528cb1e250b475e548512d63858ac
|
diff --git a/core/src/main/java/org/ehcache/core/config/store/StoreEventSourceConfiguration.java b/core/src/main/java/org/ehcache/core/config/store/StoreEventSourceConfiguration.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/ehcache/core/config/store/StoreEventSourceConfiguration.java
+++ b/core/src/main/java/org/ehcache/core/config/store/StoreEventSourceConfiguration.java
@@ -29,7 +29,7 @@ public interface StoreEventSourceConfiguration extends ServiceConfiguration<Stor
/**
* Default dispatcher concurrency
*/
- int DEFAULT_DISPATCHER_CONCURRENCY = 8;
+ int DEFAULT_DISPATCHER_CONCURRENCY = 1;
/**
* Indicates over how many buckets should ordered events be spread
|
Issue #<I> Single queue for event ordering
|
ehcache_ehcache3
|
train
|
java
|
c704a9c426d20f4b8294131805e04d39d1016beb
|
diff --git a/src/lib/chimp-helper.js b/src/lib/chimp-helper.js
index <HASH>..<HASH> 100644
--- a/src/lib/chimp-helper.js
+++ b/src/lib/chimp-helper.js
@@ -209,17 +209,12 @@ var chimpHelper = {
}
};
- var configureChimpWidgetsDriver = function () {
- widgets.driver.api = global.browser;
- };
-
try {
setupBrowser();
initBrowser();
if (booleanHelper.isTruthy(process.env['chimp.ddp'])) {
setupDdp();
}
- configureChimpWidgetsDriver();
} catch (error) {
log.error('[chimp][helper] setupBrowserAndDDP had error');
log.error(error);
|
getting rid of the remanins of chimp widgets
|
TheBrainFamily_chimpy
|
train
|
js
|
ec0fee620843cf8f878d19a00d44c016cc2323ab
|
diff --git a/cmd/erasure-server-pool.go b/cmd/erasure-server-pool.go
index <HASH>..<HASH> 100644
--- a/cmd/erasure-server-pool.go
+++ b/cmd/erasure-server-pool.go
@@ -900,7 +900,11 @@ func (z *erasureServerPools) DeleteObjects(ctx context.Context, bucket string, o
defer multiDeleteLock.Unlock(lkctx.Cancel)
if z.SinglePool() {
- return z.serverPools[0].DeleteObjects(ctx, bucket, objects, opts)
+ deleteObjects, dErrs := z.serverPools[0].DeleteObjects(ctx, bucket, objects, opts)
+ for i := range deleteObjects {
+ deleteObjects[i].ObjectName = decodeDirObject(deleteObjects[i].ObjectName)
+ }
+ return deleteObjects, dErrs
}
// Fetch location of up to 10 objects concurrently.
@@ -954,6 +958,7 @@ func (z *erasureServerPools) DeleteObjects(ctx context.Context, bucket string, o
if derr != nil {
derrs[orgIndexes[i]] = derr
}
+ deletedObjects[i].ObjectName = decodeDirObject(deletedObjects[i].ObjectName)
dobjects[orgIndexes[i]] = deletedObjects[i]
}
mu.Unlock()
|
fix: the returned object key when object is directory (#<I>)
|
minio_minio
|
train
|
go
|
c438a362ac13e2168325741912e887f397b61342
|
diff --git a/docs/lib/jsdoc/merge_params.js b/docs/lib/jsdoc/merge_params.js
index <HASH>..<HASH> 100644
--- a/docs/lib/jsdoc/merge_params.js
+++ b/docs/lib/jsdoc/merge_params.js
@@ -1,7 +1,7 @@
'use strict';
exports.defineTags = function(dictionary) {
- dictionary.defineTag('merge-props', {
+ dictionary.defineTag('mergeProps', {
mustHaveValue: true,
canHaveName: true,
onTagged: function(doclet, tag) {
@@ -10,7 +10,7 @@ exports.defineTags = function(dictionary) {
}
});
- dictionary.defineTag('merge-params', {
+ dictionary.defineTag('mergeParams', {
mustHaveValue: true,
canHaveType: true,
canHaveName: true,
|
docs(merge): update tags for merge operations to be camelCase
Done for syntax highlighting
|
mongodb_node-mongodb-native
|
train
|
js
|
d8d5b7be1fdbed40c6d66e988ae77d15b5630edd
|
diff --git a/test/index.js b/test/index.js
index <HASH>..<HASH> 100644
--- a/test/index.js
+++ b/test/index.js
@@ -120,12 +120,18 @@ tape('legacy invite', function (t) {
tape('parse multiserver address to legacy', function (t) {
- t.ok(R.isAddress(multiserver1))
- t.deepEqual(R.parseAddress(multiserver1), {
+ var objAddr = {
host: "145.12.20.3",
port :8080,
key: "@gYCJpN4eGDjHFnWW2Fcusj8O4QYbVDUW6rNYh7nNEnc=.ed25519"
- })
+ }
+
+ t.ok(R.isAddress(multiserver1))
+ t.deepEqual(R.parseAddress(multiserver1), objAddr)
+
+ t.ok(R.isAddress(objAddr))
+ t.notOk(R.isAddress({}))
+
t.end()
@@ -200,8 +206,6 @@ tape('parse link', function (t) {
t.end()
})
-
-
tape('blob', function (t) {
t.ok(R.isBlob(blob))
@@ -246,12 +250,3 @@ tape('urls', function (t) {
-
-
-
-
-
-
-
-
-
|
test that isAddress accepts object, backwards compatible with old versions
|
ssbc_ssb-ref
|
train
|
js
|
68bfba29b9cd89a076675e1f5409da4b853234b6
|
diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go
index <HASH>..<HASH> 100644
--- a/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go
+++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go
@@ -589,6 +589,8 @@ func protobufTagToField(tag string, field *protoField, m types.Member, t *types.
return fmt.Errorf("member %q of %q malformed 'protobuf' tag, tag %d should be key=value, got %q\n", m.Name, t.Name, i+4, extra)
}
switch parts[0] {
+ case "name":
+ protoExtra[parts[0]] = parts[1]
case "casttype", "castkey", "castvalue":
parts[0] = fmt.Sprintf("(gogoproto.%s)", parts[0])
protoExtra[parts[0]] = parts[1]
|
Allow proto tag to define field name
When we introduce a new field for backwards compatibility, we may want
to specify a different protobuf field name (one that matches JSON) than
the automatic transformation applied to the struct field. This allows an
API field to define the name of its protobuf tag.
|
kubernetes_kubernetes
|
train
|
go
|
18124f4c7d3a9604d2386f41601b63d803b5621f
|
diff --git a/lib/python/pivot/results.py b/lib/python/pivot/results.py
index <HASH>..<HASH> 100644
--- a/lib/python/pivot/results.py
+++ b/lib/python/pivot/results.py
@@ -56,7 +56,7 @@ class RecordSet(object):
return out
def __getitem__(self, key):
- return self.records.__getattribute__(key)
+ return self.records.__getitem__(key)
def __len__(self):
return len(self.records)
|
Adding indexing to lib/python
|
ghetzel_pivot
|
train
|
py
|
1c6b4cdb341f21565e62eb547f9920238834fb7b
|
diff --git a/src/events.js b/src/events.js
index <HASH>..<HASH> 100644
--- a/src/events.js
+++ b/src/events.js
@@ -30,7 +30,9 @@ module.exports = function(ctx) {
.filter(f => f.isValid())
.map(f => f.toGeoJSON());
- if (features.length > 0) ctx.map.fire('draw.modified', {features: features});
+ if (features.length > 0) {
+ ctx.map.fire('draw.modified', {features: features, stack: (new Error('hi')).stack});
+ }
recentlyUpdatedFeatureIds.clear();
};
@@ -136,6 +138,7 @@ module.exports = function(ctx) {
},
changeMode: function(modename, opts) {
currentMode.stop();
+
var modebuilder = modes[modename];
if (modebuilder === undefined) {
throw new Error(`${modename} is not valid`);
@@ -151,7 +154,7 @@ module.exports = function(ctx) {
ctx.store.setDirty();
ctx.store.render();
- emitModifiedFeatures();
+
},
fire: function(name, event) {
if (events[name]) {
|
we don't need to emit changes on mode change
|
mapbox_mapbox-gl-draw
|
train
|
js
|
d7d9623740eb40a586fcb55f83ce6c301de5ba38
|
diff --git a/lib/Downloader.js b/lib/Downloader.js
index <HASH>..<HASH> 100644
--- a/lib/Downloader.js
+++ b/lib/Downloader.js
@@ -65,7 +65,7 @@ class Downloader {
* @param {string} downloadHost
*/
setDownloadHost(downloadHost) {
- this._downloadHost = downloadHost;
+ this._downloadHost = downloadHost.replace(/\/+$/, '');
}
/**
|
fix: downloader host fault tolerance (#<I>)
Strip trailing slashes from Downloader download host.
|
GoogleChrome_puppeteer
|
train
|
js
|
cd975978a1fec9cdfa514ad559eb5e31fff54ee6
|
diff --git a/lib/ecstatic/showdir.js b/lib/ecstatic/showdir.js
index <HASH>..<HASH> 100644
--- a/lib/ecstatic/showdir.js
+++ b/lib/ecstatic/showdir.js
@@ -117,7 +117,7 @@ module.exports = function (opts, stat) {
+ process.version
+ '/<a href="https://github.com/jesusabdullah/node-ecstatic">ecstatic</a>'
+ ' server running @ '
- + ent.encode(req.headers.host) + '</address>\n'
+ + ent.encode(req.headers.host || '') + '</address>\n'
+ '</body></html>'
;
|
Don't rely on host header being present
|
jfhbrook_node-ecstatic
|
train
|
js
|
02392d4a937c468fff0f4e4c3f307c516a10e026
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -106,16 +106,17 @@ module.exports = function (gulp, options) {
console.log('');
console.log(gutil.colors.underline('Available tasks'));
Object.keys(gulp.tasks).sort().forEach(function (name) {
- if (gulp.tasks[name].help) {
- var helpText = gulp.tasks[name].help.message || '';
+ if (gulp.tasks[name].help || process.argv.indexOf('--all') !== -1) {
+ var help = gulp.tasks[name].help || { message: '', options: {} };
+ var helpText = help.message || '';
var args = [' ', gutil.colors.cyan(name)];
args.push(new Array(margin - name.length + 1 + optionsBuffer.length).join(" "));
args.push(helpText);
- var options = Object.keys(gulp.tasks[name].help.options).sort();
+ var options = Object.keys(help.options).sort();
options.forEach(function (option) {
- var optText = gulp.tasks[name].help.options[option];
+ var optText = help.options[option];
args.push('\n ' + optionsBuffer + gutil.colors.cyan(option) + ' ');
args.push(new Array(margin - option.length + 1).join(" "));
|
Add option to have an --all flag to show all tasks.
|
chmontgomery_gulp-help
|
train
|
js
|
94aa6c172ee5e88f53166523aab67ef931e9de78
|
diff --git a/src/constants/posts.js b/src/constants/posts.js
index <HASH>..<HASH> 100644
--- a/src/constants/posts.js
+++ b/src/constants/posts.js
@@ -13,9 +13,11 @@ export const PostTypes = {
JOIN_LEAVE: 'system_join_leave',
JOIN_CHANNEL: 'system_join_channel',
+ GUEST_JOIN_CHANNEL: 'system_guest_join_channel',
LEAVE_CHANNEL: 'system_leave_channel',
ADD_REMOVE: 'system_add_remove',
ADD_TO_CHANNEL: 'system_add_to_channel',
+ ADD_GUEST_TO_CHANNEL: 'system_add_guest_to_chan',
REMOVE_FROM_CHANNEL: 'system_remove_from_channel',
JOIN_TEAM: 'system_join_team',
|
[MM-<I>] Adds constants for new system posts for guests (#<I>)
|
mattermost_mattermost-redux
|
train
|
js
|
7ff5131256a1055c088556cbcbf81b7468b2f7ef
|
diff --git a/src/Client/ResourceVerification.php b/src/Client/ResourceVerification.php
index <HASH>..<HASH> 100644
--- a/src/Client/ResourceVerification.php
+++ b/src/Client/ResourceVerification.php
@@ -37,7 +37,7 @@ class ResourceVerification extends Client
* @param string $token
* @return \Unirest\Response
*/
- public function getVerification($token = '')
+ public function getVerification($token)
{
return $this->_get($token);
}
@@ -50,7 +50,7 @@ class ResourceVerification extends Client
* @param string $token
* @return \Unirest\Response
*/
- public function postVerification($token = '')
+ public function postVerification($token)
{
return $this->_post(['token' => $token]);
}
|
removed uneeded default values from Resource verification client client
|
OpenResourceManager_client-php
|
train
|
php
|
11081ad307b20d306ecfa743600d4f98bbc54eb4
|
diff --git a/metal/label_model/label_model.py b/metal/label_model/label_model.py
index <HASH>..<HASH> 100644
--- a/metal/label_model/label_model.py
+++ b/metal/label_model/label_model.py
@@ -62,7 +62,7 @@ class LabelModelBase(Classifier):
raise Exception(f"L[{t}] has type {L_t.dtype}, should be int.")
# Ensure is in CSC sparse format for efficient col (LF) slicing
- L_t = L_t.tocsc()
+ L[t] = L_t.tocsc()
# If no label_map was provided, assume labels are continuous integers
# starting from 1
@@ -102,7 +102,6 @@ class LabelModel(LabelModelBase):
def _infer_polarity(self, L_t, t, j):
"""Infer the polarity (labeled class) of LF j on task t"""
- # Note: We assume that L_t is in CSC format here!
assert(isinstance(L_t, csc_matrix))
vals = set(L_t.data[L_t.indptr[j]:L_t.indptr[j+1]])
if len(vals) > 1:
|
Fix assignment error in _check_L
|
HazyResearch_metal
|
train
|
py
|
933b4b9c43a73afbdb70510e37037f55db0e886a
|
diff --git a/php-binance-api.php b/php-binance-api.php
index <HASH>..<HASH> 100644
--- a/php-binance-api.php
+++ b/php-binance-api.php
@@ -884,10 +884,10 @@ class API
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
}
- // PUT Method
- if ($method === "PUT") {
- curl_setopt($curl, CURLOPT_PUT, true);
- }
+ // PUT Method
+ if ($method === "PUT") {
+ curl_setopt($curl, CURLOPT_PUT, true);
+ }
// proxy settings
if (is_array($this->proxyConf)) {
|
Fix WebSocket keepalive. Thanks kwshimhyunbo!
|
jaggedsoft_php-binance-api
|
train
|
php
|
3685d4b6f8226f64b4b814072f015ca07a5ec4f7
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,16 +1,23 @@
# Bootstrap setuptools with ez_setup. Wrapped in try as Tox and Travis CI don't
# like the bootstrapping code very much.
-try:
- import ez_setup
- ez_setup.use_setuptools()
-except Exception as exception:
- pass
+# Neither does readthedocs!
+
+# on_rtd is whether we are on readthedocs.org,
+# this line of code grabbed from docs.readthedocs.org
+import os
+import sys
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+if not on_rtd:
+ try:
+ import ez_setup
+ ez_setup.use_setuptools()
+ except Exception as exception:
+ pass
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from codecs import open # To use a consistent encoding
from os import path
-import sys
here = path.abspath(path.dirname(__file__))
|
trying to fix rtd doc build failures due to setuptools bootstrap
|
DC23_scriptabit
|
train
|
py
|
884236e9e18a2a93df1ab9f009d3721a81f488e6
|
diff --git a/lib/punchblock/translator/freeswitch.rb b/lib/punchblock/translator/freeswitch.rb
index <HASH>..<HASH> 100644
--- a/lib/punchblock/translator/freeswitch.rb
+++ b/lib/punchblock/translator/freeswitch.rb
@@ -8,6 +8,7 @@ module Punchblock
class Freeswitch
include Celluloid
include HasGuardedHandlers
+ include DeadActorSafety
extend ActiveSupport::Autoload
@@ -79,7 +80,11 @@ module Punchblock
end
def finalize
- @calls.values.each(&:terminate)
+ @calls.values.each do |call|
+ safe_from_dead_actors do
+ call.terminate
+ end
+ end
end
def handle_es_event(event)
|
[BUGFIX] Avoid dead actor errors when shutting down a FreeSWITCH translator
|
adhearsion_punchblock
|
train
|
rb
|
332d665a77d8e749779bda6f79994ee6f57dabd6
|
diff --git a/test/irb_test.rb b/test/irb_test.rb
index <HASH>..<HASH> 100644
--- a/test/irb_test.rb
+++ b/test/irb_test.rb
@@ -42,10 +42,11 @@ describe 'Irb Command' do
end
end
- # TODO: Can't reliably test the signal, from time to time Signal.trap, which
- # is defined in IRBCommand, misses the SIGINT signal, which makes the test
- # suite exit. Not sure how to fix that...
it 'must translate SIGINT into "cont" command' do
+ skip 'TODO: Can\'t reliably test the signal, from time to time ' \
+ 'Signal.trap, which is defined in IRBCommand, misses the SIGINT ' \
+ 'signal, which makes the test suite exit. Not sure how to fix ' \
+ 'that...'
irb.stubs(:eval_input).calls { Process.kill('SIGINT', Process.pid) }
enter 'break 4', 'irb'
debug_file('irb') { state.line.must_equal 4 }
|
Disable conflictive test
Sometimes it signals a non captures SIGNIT which terminates the whole suite
|
deivid-rodriguez_byebug
|
train
|
rb
|
5b1cf48440a55516c5b9fa4096961076f0cadff4
|
diff --git a/core/lib/refinery/core.rb b/core/lib/refinery/core.rb
index <HASH>..<HASH> 100644
--- a/core/lib/refinery/core.rb
+++ b/core/lib/refinery/core.rb
@@ -15,3 +15,7 @@ module Refinery
end
end
end
+
+# this require has to be down here
+# see https://github.com/refinery/refinerycms/issues/2273
+require 'decorators'
diff --git a/core/lib/refinery/core/engine.rb b/core/lib/refinery/core/engine.rb
index <HASH>..<HASH> 100644
--- a/core/lib/refinery/core/engine.rb
+++ b/core/lib/refinery/core/engine.rb
@@ -1,5 +1,3 @@
-require 'decorators'
-
module Refinery
module Core
class Engine < ::Rails::Engine
|
Require decorators after Refinery::Core::Engine has been loaded.
|
refinery_refinerycms
|
train
|
rb,rb
|
f257ed61a48ea8fd0b6e94aa060fed50fdeaa85c
|
diff --git a/tests/test_schema.py b/tests/test_schema.py
index <HASH>..<HASH> 100755
--- a/tests/test_schema.py
+++ b/tests/test_schema.py
@@ -2248,3 +2248,14 @@ class TestLoadOnly:
assert 'str_dump_only' not in result
assert 'str_load_only' in result
assert 'str_regular' in result
+
+ # regression test for https://github.com/marshmallow-code/marshmallow/pull/765
+ def test_url_field_requre_tld_false(self):
+
+ class NoTldTestSchema(Schema):
+ url = fields.Url(require_tld=False, schemes=['marshmallow'])
+
+ schema = NoTldTestSchema()
+ data_with_no_top_level_domain = {'url': 'marshmallow://app/discounts'}
+ result = schema.load(data_with_no_top_level_domain)
+ assert result == data_with_no_top_level_domain
|
Add regression test for require_tld=False in the Url field
|
marshmallow-code_marshmallow
|
train
|
py
|
dc99d119c321613a4c0b226dfe23175f84e86deb
|
diff --git a/telethon/events/__init__.py b/telethon/events/__init__.py
index <HASH>..<HASH> 100644
--- a/telethon/events/__init__.py
+++ b/telethon/events/__init__.py
@@ -908,7 +908,7 @@ class MessageDeleted(_EventBuilder):
types.Message((deleted_ids or [0])[0], peer, None, '')
)
self.deleted_id = None if not deleted_ids else deleted_ids[0]
- self.deleted_ids = self.deleted_ids
+ self.deleted_ids = deleted_ids
class StopPropagation(Exception):
|
Fix events.MessageDeleted always failing due to extra "self."
|
LonamiWebs_Telethon
|
train
|
py
|
0edcce37c73a1180fc0d84026ecc3066fdf01cbf
|
diff --git a/lib/rackstash/fields/hash.rb b/lib/rackstash/fields/hash.rb
index <HASH>..<HASH> 100644
--- a/lib/rackstash/fields/hash.rb
+++ b/lib/rackstash/fields/hash.rb
@@ -276,8 +276,14 @@ module Rackstash
# and `force` is `true`
# @return [Rackstash::Fields::Hash] a new hash containing the merged
# key-value pairs
- def merge(hash, force: true, scope: nil, &block)
- dup.merge!(hash, force: force, scope: scope, &block)
+ def merge(hash, force: true, scope: nil)
+ if block_given?
+ dup.merge!(hash, force: force, scope: scope) { |key, old_val, new_val|
+ yield key, old_val, new_val
+ }
+ else
+ dup.merge!(hash, force: force, scope: scope)
+ end
end
# Adds the contents of `hash` to `self`. `hash` is normalized before being
|
Use yield instead of to_proc in Hash#merge
This is functionally equivalent. However, the previous behavior resulted
in the block being materialized as a proc which is quite expensive, both
during materialization as well as when calling it. By using
`block_given?`, we can avoid this materialization.
|
meineerde_rackstash
|
train
|
rb
|
e0419c3fda2949537232df8d82c5a15236d77cad
|
diff --git a/Validator/Constraints/UniqueValidator.php b/Validator/Constraints/UniqueValidator.php
index <HASH>..<HASH> 100755
--- a/Validator/Constraints/UniqueValidator.php
+++ b/Validator/Constraints/UniqueValidator.php
@@ -21,6 +21,7 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
* Unique document validator checks if one field contains a unique value.
*
* @author Bulat Shakirzyanov <[email protected]>
+ * @author Jeremy Mikola <[email protected]>
*/
class UniqueValidator extends ConstraintValidator
{
|
Add author attribution in UniqueValidator
|
doctrine_DoctrineMongoDBBundle
|
train
|
php
|
bfd81eaabcf59bb29f60921f5a33e5e8365c4cdb
|
diff --git a/pages/admin/forms.py b/pages/admin/forms.py
index <HASH>..<HASH> 100644
--- a/pages/admin/forms.py
+++ b/pages/admin/forms.py
@@ -105,8 +105,6 @@ class PageForm(SlugFormMixin):
target = forms.IntegerField(required=False, widget=forms.HiddenInput)
position = forms.CharField(required=False, widget=forms.HiddenInput)
- category = forms.ModelMultipleChoiceField(Category.objects.all())
-
class Meta:
model = Page
|
ModelForm does not need separate category
|
batiste_django-page-cms
|
train
|
py
|
5b8a43fb717082a2956f953343bd64552ea842a4
|
diff --git a/lib/Bugsnag.js b/lib/Bugsnag.js
index <HASH>..<HASH> 100644
--- a/lib/Bugsnag.js
+++ b/lib/Bugsnag.js
@@ -106,7 +106,7 @@ export class Client {
}
if (!metadata instanceof Map) {
console.warn('Breadcrumb metadata is not a Map or String');
- return;
+ metadata = {};
}
let type = metadata['type'] || 'manual';
delete metadata['type'];
|
Discard unknown metadata types instead of cancelling the breadcrumb
|
bugsnag_bugsnag-react-native
|
train
|
js
|
49934044cda864046705aaa9a571ff526da652db
|
diff --git a/src/main/java/org/jpmml/converter/Feature.java b/src/main/java/org/jpmml/converter/Feature.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jpmml/converter/Feature.java
+++ b/src/main/java/org/jpmml/converter/Feature.java
@@ -20,6 +20,7 @@ package org.jpmml.converter;
import org.dmg.pmml.DataType;
import org.dmg.pmml.FieldName;
+import org.dmg.pmml.FieldRef;
abstract
public class Feature {
@@ -34,6 +35,12 @@ public class Feature {
setDataType(dataType);
}
+ public FieldRef ref(){
+ FieldRef fieldRef = new FieldRef(getName());
+
+ return fieldRef;
+ }
+
public FieldName getName(){
return this.name;
}
|
Added method Feature#ref()
|
jpmml_jpmml-converter
|
train
|
java
|
44e04e7d2f2c44acb3782c6a2a91e3d4fe3088b2
|
diff --git a/decls/i18n.js b/decls/i18n.js
index <HASH>..<HASH> 100644
--- a/decls/i18n.js
+++ b/decls/i18n.js
@@ -62,6 +62,7 @@ declare type I18nOptions = {
fallbackRoot?: boolean,
sync?: boolean,
silentTranslationWarn?: boolean,
+ silentFallbackWarn?: boolean,
pluralizationRules?: {
[lang: string]: (choice: number, choicesLength: number) => number,
},
@@ -90,6 +91,8 @@ declare interface I18n {
set formatter (formatter: Formatter): void,
get silentTranslationWarn (): boolean,
set silentTranslationWarn (silent: boolean): void,
+ get silentFallbackWarn (): boolean,
+ set silentFallbackWarn (slient: boolean): void,
getLocaleMessage (locale: Locale): LocaleMessageObject,
setLocaleMessage (locale: Locale, message: LocaleMessageObject): void,
mergeLocaleMessage (locale: Locale, message: LocaleMessageObject): void,
|
:zap: improvement(flowtype): update typings
|
kazupon_vue-i18n
|
train
|
js
|
4e7dcd01a8633d723587d4a3d509a1e344816597
|
diff --git a/lib/cronlib.php b/lib/cronlib.php
index <HASH>..<HASH> 100644
--- a/lib/cronlib.php
+++ b/lib/cronlib.php
@@ -151,7 +151,7 @@ function cron_run_adhoc_tasks(int $timenow) {
// Run all adhoc tasks.
while (!\core\task\manager::static_caches_cleared_since($timenow) &&
- $task = \core\task\manager::get_next_adhoc_task($timenow)) {
+ $task = \core\task\manager::get_next_adhoc_task(time())) {
cron_run_inner_adhoc_task($task);
unset($task);
|
MDL-<I> cron: Process new adhoc tasks immediately
|
moodle_moodle
|
train
|
php
|
bc44fcc6e0d77c20563dafa8ee240583a27fb05f
|
diff --git a/lib/aws-xray-sdk/facets/net_http.rb b/lib/aws-xray-sdk/facets/net_http.rb
index <HASH>..<HASH> 100644
--- a/lib/aws-xray-sdk/facets/net_http.rb
+++ b/lib/aws-xray-sdk/facets/net_http.rb
@@ -29,7 +29,10 @@ module XRay
def xray_sampling_request?(req)
req.path && (req.path == ('/GetSamplingRules') || req.path == ('/SamplingTargets'))
end
-
+
+ # HTTP requests to IMDS endpoint will be made to 169.254.169.254
+ # for both IMDSv1 and IMDSv2 with the latter including the
+ # X-aws-ec2-metadata-token-ttl-seconds header.
def ec2_metadata_request?(req)
req.uri && req.uri.hostname == '169.254.169.254'
end
|
Update net_http.rb (#<I>)
|
aws_aws-xray-sdk-ruby
|
train
|
rb
|
420d6103db27014b9b35783ca56125dedb5d4449
|
diff --git a/src/iceqube/storage/backends/inmem.py b/src/iceqube/storage/backends/inmem.py
index <HASH>..<HASH> 100644
--- a/src/iceqube/storage/backends/inmem.py
+++ b/src/iceqube/storage/backends/inmem.py
@@ -5,7 +5,7 @@ from copy import copy
from sqlalchemy import Column, DateTime, Index, Integer, PickleType, String, create_engine, event, func, or_
from sqlalchemy.ext.declarative import declarative_base
-from sqlalchemy.orm import sessionmaker
+from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.pool import QueuePool, StaticPool
from iceqube.common.classes import State
@@ -70,7 +70,7 @@ class StorageBackend(BaseBackend):
poolclass=connection_class)
self.set_sqlite_pragmas()
Base.metadata.create_all(self.engine)
- self.sessionmaker = sessionmaker(bind=self.engine)
+ self.sessionmaker = scoped_session(sessionmaker(bind=self.engine))
# create the tables if they don't exist yet
super(StorageBackend, self).__init__(*args, **kwargs)
|
Scope our sessions within a thread
|
learningequality_iceqube
|
train
|
py
|
54038e85d2976b09c96ef099a3d8732e91734c8b
|
diff --git a/src/main/index.js b/src/main/index.js
index <HASH>..<HASH> 100644
--- a/src/main/index.js
+++ b/src/main/index.js
@@ -109,11 +109,14 @@ export function createSplashSubscriber() {
height: 400,
title: 'loading',
frame: false,
+ show: false
});
const index = join(__dirname, '..', '..', 'static', 'splash.html');
win.loadURL(`file://${index}`);
- win.show();
+ win.once('ready-to-show', () => {
+ win.show();
+ });
}, null,
() => {
// Close the splash page when completed
|
fix(splash): Show splash window gracefully
|
nteract_nteract
|
train
|
js
|
7052d7953de622b2ec90e4fd64f0536e7d5a6260
|
diff --git a/salt/cloud/clouds/cloudstack.py b/salt/cloud/clouds/cloudstack.py
index <HASH>..<HASH> 100644
--- a/salt/cloud/clouds/cloudstack.py
+++ b/salt/cloud/clouds/cloudstack.py
@@ -290,8 +290,9 @@ def create(vm_):
'location': get_location(conn, vm_),
}
- if get_security_groups(conn, vm_) is not False:
- kwargs['ex_security_groups'] = get_security_groups(conn, vm_)
+ sg = get_security_groups(conn, vm_)
+ if sg is not False:
+ kwargs['ex_security_groups'] = sg
if get_keypair(vm_) is not False:
kwargs['ex_keyname'] = get_keypair(vm_)
|
assign get_security_groups to a variable so it isn't called twice
|
saltstack_salt
|
train
|
py
|
e527776ad61eaa914bff1719e900096f27af12c1
|
diff --git a/registration/tests/test_views.py b/registration/tests/test_views.py
index <HASH>..<HASH> 100644
--- a/registration/tests/test_views.py
+++ b/registration/tests/test_views.py
@@ -14,13 +14,18 @@ class ActivationViewTests(TestCase):
simple string URL as the success redirect.
"""
+ data = {
+ 'username': 'bob',
+ 'email': '[email protected]',
+ 'password1': 'secret',
+ 'password2': 'secret'
+ }
resp = self.client.post(reverse('registration_register'),
- data={'username': 'bob',
- 'email': '[email protected]',
- 'password1': 'secret',
- 'password2': 'secret'})
+ data=data)
- profile = RegistrationProfile.objects.get(user__username='bob')
+ profile = RegistrationProfile.objects.get(
+ user__username=data['username']
+ )
resp = self.client.get(reverse(
'registration_activate',
|
Factor out data in the views tests.
|
ubernostrum_django-registration
|
train
|
py
|
505ce2372c708460bf5ed47712412c72f605e095
|
diff --git a/cmd/influx/main.go b/cmd/influx/main.go
index <HASH>..<HASH> 100644
--- a/cmd/influx/main.go
+++ b/cmd/influx/main.go
@@ -157,10 +157,12 @@ func influxCmd(opts ...genericCLIOptFn) *cobra.Command {
}
fOpts.mustRegister(cmd)
- // this is after the flagOpts register b/c we don't want to show the default value
- // in the usage display. This will add it as the token value, then if a token flag
- // is provided too, the flag will take precedence.
- flags.token = getTokenFromDefaultPath()
+ if flags.token != "" {
+ // this is after the flagOpts register b/c we don't want to show the default value
+ // in the usage display. This will add it as the token value, then if a token flag
+ // is provided too, the flag will take precedence.
+ flags.token = getTokenFromDefaultPath()
+ }
cmd.PersistentFlags().BoolVar(&flags.local, "local", false, "Run commands locally against the filesystem")
cmd.PersistentFlags().BoolVar(&flags.skipVerify, "skip-verify", false, "SkipVerify controls whether a client verifies the server's certificate chain and host name.")
|
fix(influx): fix issue with locla state overriding env vars for token
closes: #<I>
|
influxdata_influxdb
|
train
|
go
|
d76ff75d102c6e79544d4c11eea74f357af82c87
|
diff --git a/src/Contracts/Html/Table/Grid.php b/src/Contracts/Html/Table/Grid.php
index <HASH>..<HASH> 100644
--- a/src/Contracts/Html/Table/Grid.php
+++ b/src/Contracts/Html/Table/Grid.php
@@ -100,10 +100,11 @@ interface Grid extends GridContract
/**
* Execute sortable query filter on model instance.
*
+ * @param array $orderColumns
* @param string $orderByKey
* @param string $directionKey
*
* @return void
*/
- public function sortable($orderByKey = 'order_by', $directionKey = 'direction');
+ public function sortable($orderColumns = [], $orderByKey = 'order_by', $directionKey = 'direction');
}
|
Fixes Table Grid contract params differ from actual Table Grid method.
Closes orchestral/html#<I>
|
orchestral_kernel
|
train
|
php
|
f621d57dab97cf38176d34f8c446092afebf56db
|
diff --git a/Generator/Service.php b/Generator/Service.php
index <HASH>..<HASH> 100644
--- a/Generator/Service.php
+++ b/Generator/Service.php
@@ -156,6 +156,10 @@ class Service extends PHPClassFile {
* Creates the code lines for the __construct() method.
*/
protected function codeBodyClassMethodConstruct() {
+ if (empty($this->injectedServices)) {
+ return [];
+ }
+
$parameters = [];
foreach ($this->childContentsGrouped['constructor_param'] as $service_parameter) {
$parameters[] = $service_parameter;
|
Changed codeBodyClassMethodConstruct() to work when child classes call it.
|
drupal-code-builder_drupal-code-builder
|
train
|
php
|
3ab2cb3f96a79de898016bd1b35c47bc7db67f9b
|
diff --git a/openquake/server/manage.py b/openquake/server/manage.py
index <HASH>..<HASH> 100755
--- a/openquake/server/manage.py
+++ b/openquake/server/manage.py
@@ -52,6 +52,5 @@ if __name__ == "__main__":
if '--nothreading' in sys.argv:
logs.dbcmd = dbcmd # turn this on when debugging
logs.dbcmd('upgrade_db') # make sure the DB exists
- logs.dbcmd('reset_is_running') # reset the flag is_running
with executor:
execute_from_command_line(sys.argv)
|
Removed reset_is_running even from manage.py
Former-commit-id: <I>aa3c7dc<I>d5feae<I>cf6e<I>dc5d2e7f<I>
|
gem_oq-engine
|
train
|
py
|
9c7b9553aafe71b5d6ea51fee62dddfb234aafd8
|
diff --git a/mail_deduplicate/deduplicate.py b/mail_deduplicate/deduplicate.py
index <HASH>..<HASH> 100644
--- a/mail_deduplicate/deduplicate.py
+++ b/mail_deduplicate/deduplicate.py
@@ -89,7 +89,7 @@ STATS_DEF = OrderedDict(
"too disimilar in size.",
),
(
- "set_skipeed_content",
+ "set_skipped_content",
"Number of sets skipped from the selection process because they were "
"too disimilar in content.",
),
|
deduplicate.py: s/skipeed/skipped/
|
kdeldycke_maildir-deduplicate
|
train
|
py
|
5a31f0179be08a8787268e224844f73fc6dc4d26
|
diff --git a/kafka/config.go b/kafka/config.go
index <HASH>..<HASH> 100644
--- a/kafka/config.go
+++ b/kafka/config.go
@@ -124,7 +124,7 @@ func (cConf *rdkConf) set(cKey *C.char, cVal *C.char, cErrstr *C.char, errstrSiz
}
func (ctopicConf *rdkTopicConf) set(cKey *C.char, cVal *C.char, cErrstr *C.char, errstrSize int) C.rd_kafka_conf_res_t {
- return C.rd_kafka_topic_conf_set((*C.rd_kafka_conf_t)(ctopicConf), cKey, cVal, cErrstr, C.size_t(errstrSize))
+ return C.rd_kafka_topic_conf_set((*C.rd_kafka_topic_conf_t)(ctopicConf), cKey, cVal, cErrstr, C.size_t(errstrSize))
}
func configConvertAnyconf(m ConfigMap, anyconf rdkAnyconf) (err error) {
|
Correct C cast (#<I>)
|
confluentinc_confluent-kafka-go
|
train
|
go
|
ca7bfeb3ae1deea4badde0ab017e15cdc9b4a141
|
diff --git a/lib/skeletor/skeletons/loader.rb b/lib/skeletor/skeletons/loader.rb
index <HASH>..<HASH> 100644
--- a/lib/skeletor/skeletons/loader.rb
+++ b/lib/skeletor/skeletons/loader.rb
@@ -1,4 +1,4 @@
-require 'YAML'
+require 'yaml'
module Skeletor
diff --git a/lib/skeletor/skeletons/validator.rb b/lib/skeletor/skeletons/validator.rb
index <HASH>..<HASH> 100644
--- a/lib/skeletor/skeletons/validator.rb
+++ b/lib/skeletor/skeletons/validator.rb
@@ -1,3 +1,5 @@
+require 'yaml'
+
module Skeletor
module Skeletons
diff --git a/lib/skeletor/version.rb b/lib/skeletor/version.rb
index <HASH>..<HASH> 100644
--- a/lib/skeletor/version.rb
+++ b/lib/skeletor/version.rb
@@ -1,4 +1,4 @@
module Skeletor
# Current version number
- VERSION="0.6.4"
+ VERSION="0.6.5"
end
\ No newline at end of file
|
Fixed YAML require statement
Switched YAML to lower case in require statement. No idea how this was
working before.
|
OiNutter_skeletor
|
train
|
rb,rb,rb
|
3bbfeacb049d78b19d59cc696ec6b57cb3e1d42f
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -331,6 +331,8 @@ def linkcode_resolve(domain, info):
obj = getattr(obj, part)
except:
return None
+ if hasattr(obj, '__wrapped__'):
+ obj = obj.__wrapped__
try:
fn = inspect.getsourcefile(obj)
@@ -340,10 +342,7 @@ def linkcode_resolve(domain, info):
return None
try:
- if hasattr(obj, '__wrapped__'):
- _, lineno = inspect.findsource(obj.__wrapped__)
- else:
- _, lineno = inspect.findsource(obj)
+ _, lineno = inspect.findsource(obj)
except:
lineno = None
|
Make everything refer to a wrapped object
|
mila-iqia_fuel
|
train
|
py
|
33d8578c8302fbd45946294069c67adf68f4f189
|
diff --git a/api/graph.go b/api/graph.go
index <HASH>..<HASH> 100644
--- a/api/graph.go
+++ b/api/graph.go
@@ -37,13 +37,13 @@ type GraphAccessKey struct {
// GraphComposite defines a composite
type GraphComposite struct {
- Axis string `json:"axis,omitempty"` // string
- Color string `json:"color,omitempty"` // string
- DataFormula *string `json:"data_formula,omitempty"` // string or null
- Hidden bool `json:"hidden,omitempty"` // boolean
- LegendFormula *string `json:"legend_formula,omitempty"` // string or null
- Name string `json:"name,omitempty"` // string
- Stack *uint `json:"stack,omitempty"` // uint or null
+ Axis string `json:"axis"` // string
+ Color string `json:"color"` // string
+ DataFormula *string `json:"data_formula"` // string or null
+ Hidden bool `json:"hidden"` // boolean
+ LegendFormula *string `json:"legend_formula"` // string or null
+ Name string `json:"name"` // string
+ Stack *uint `json:"stack"` // uint or null
}
// GraphDatapoint defines a datapoint
|
fix: several of these composite fields are required and should not be omitempty
|
circonus-labs_circonus-gometrics
|
train
|
go
|
d31fee7c4b414db3f44059ba248c71898f197d13
|
diff --git a/src/commands/add-cognito-user-pool-trigger.js b/src/commands/add-cognito-user-pool-trigger.js
index <HASH>..<HASH> 100644
--- a/src/commands/add-cognito-user-pool-trigger.js
+++ b/src/commands/add-cognito-user-pool-trigger.js
@@ -47,7 +47,7 @@ module.exports = function addCognitoUserPoolTrigger(options, optionalLogger) {
data.UserPoolId = data.Id;
data.LambdaConfig = data.LambdaConfig || {};
options.events.split(',').forEach(name => data.LambdaConfig[name] = lambdaConfig.arn);
- ['Id', 'Name', 'LastModifiedDate', 'CreationDate', 'SchemaAttributes', 'EstimatedNumberOfUsers'].forEach(n => delete data[n]);
+ ['Id', 'Name', 'LastModifiedDate', 'CreationDate', 'SchemaAttributes', 'EstimatedNumberOfUsers','AliasAttributes'].forEach(n => delete data[n]);
return cognito.updateUserPool(data).promise();
});
};
|
Delete AliasAttribute in UserPool object
|
claudiajs_claudia
|
train
|
js
|
7d6713a297b34f34a785c1c4ea29244d6205d3c1
|
diff --git a/lib/sprockets/sass_compressor.rb b/lib/sprockets/sass_compressor.rb
index <HASH>..<HASH> 100644
--- a/lib/sprockets/sass_compressor.rb
+++ b/lib/sprockets/sass_compressor.rb
@@ -40,16 +40,13 @@ module Sprockets
end
def call(input)
- data = input[:data]
- input[:cache].fetch([@cache_key, data]) do
- options = {
- syntax: :scss,
- cache: false,
- read_cache: false,
- style: :compressed
- }.merge(@options)
- Autoload::Sass::Engine.new(data, options).render
- end
+ options = {
+ syntax: :scss,
+ cache: false,
+ read_cache: false,
+ style: :compressed
+ }.merge(@options)
+ Autoload::Sass::Engine.new(input[:data], options).render
end
end
end
|
Skip sass compressor cache
|
rails_sprockets
|
train
|
rb
|
831b935ec9db337bf5c75364db99985372330f8a
|
diff --git a/avatar/forms.py b/avatar/forms.py
index <HASH>..<HASH> 100644
--- a/avatar/forms.py
+++ b/avatar/forms.py
@@ -15,7 +15,7 @@ def avatar_img(avatar, size):
if not avatar.thumbnail_exists(size):
avatar.create_thumbnail(size)
return mark_safe('<img src="%s" alt="%s" width="%s" height="%s" />' %
- (avatar.avatar_url(size), avatar, size, size))
+ (avatar.avatar_url(size), unicode(avatar), size, size))
class UploadAvatarForm(forms.Form):
|
Fixed #<I> -- make sure to cast avatar into a string before showing the option of the avatar upload form.
|
grantmcconnaughey_django-avatar
|
train
|
py
|
4b8627e5cd979542ee79558ba61f4084836404aa
|
diff --git a/djangocms_inherit/cms_plugins.py b/djangocms_inherit/cms_plugins.py
index <HASH>..<HASH> 100644
--- a/djangocms_inherit/cms_plugins.py
+++ b/djangocms_inherit/cms_plugins.py
@@ -7,6 +7,7 @@ from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cms.utils import get_language_from_request
from cms.utils.moderator import get_cmsplugin_queryset
+from cms.utils.plugins import downcast_plugins, build_plugin_tree
from .forms import InheritForm
from .models import InheritPagePlaceholder
@@ -56,6 +57,12 @@ class InheritPagePlaceholderPlugin(CMSPluginBase):
inst, name = plg.get_plugin_instance()
if inst is None:
continue
+ # Get child plugins for this plugin instance, if any child plugins exist
+ plugin_tree = downcast_plugins(inst.get_descendants(include_self=True)
+ .order_by('placeholder', 'tree_id', 'level', 'position'))
+ plugin_tree[0].parent_id = None
+ plugin_tree = build_plugin_tree(plugin_tree)
+ inst = plugin_tree[0] # Replace plugin instance with plugin instance with correct child_plugin_instances set
outstr = inst.render_plugin(tmpctx, placeholder)
plugin_output.append(outstr)
template_vars['parent_output'] = plugin_output
|
Load (and render) child plugins correctly for inherited plugins.
Before the changes in this commit, child_plugin_instances of inherited plugins would be None; loading all descendant plugins and building the tree resolves this issue.
Not entirely sure if this might break things or cause insane slowdowns, (I couldn't detect any errors myself) but it "works for me".
Implementation may not be the best either.
|
divio_djangocms-inherit
|
train
|
py
|
204af911f0bf731b7907fef51e1e11b64ee1a0ca
|
diff --git a/clusterpost-execution/executionserver.methods.js b/clusterpost-execution/executionserver.methods.js
index <HASH>..<HASH> 100644
--- a/clusterpost-execution/executionserver.methods.js
+++ b/clusterpost-execution/executionserver.methods.js
@@ -302,6 +302,11 @@ module.exports = function (conf) {
.then(function(compressedpath){
var compressedname = path.basename(compressedpath);
return handler.addDocumentAttachment(doc, compressedname, compressedpath)
+ })
+ .catch(function(e){
+ return {
+ "error": e
+ };
});
}
|
BUG: Check for directory before compression
|
juanprietob_clusterpost
|
train
|
js
|
0c82f5feaea6ef121229b971a4e3439714a9dcfe
|
diff --git a/klein.php b/klein.php
index <HASH>..<HASH> 100644
--- a/klein.php
+++ b/klein.php
@@ -371,7 +371,7 @@ class _Response extends StdClass {
} elseif (!isset($_SESSION['__flashes'][$type])) {
$_SESSION['__flashes'][$type] = array();
}
- $_SESSION['__flashes'][$type] = $this->markdown($msg, $params);
+ $_SESSION['__flashes'][$type][] = $this->markdown($msg, $params);
}
//Support basic markdown syntax
|
Flashes should be a set of arrays, not a single item
|
klein_klein.php
|
train
|
php
|
f064081bc0a38f498c0f7bc64298971173baad03
|
diff --git a/class.phpmailer.php b/class.phpmailer.php
index <HASH>..<HASH> 100644
--- a/class.phpmailer.php
+++ b/class.phpmailer.php
@@ -730,17 +730,22 @@ class PHPMailer {
}
protected function PostSend() {
+ $rtn = false;
try {
// Choose the mailer and send through it
switch($this->Mailer) {
case 'sendmail':
- return $this->SendmailSend($this->MIMEHeader, $this->MIMEBody);
+ $rtn = $this->SendmailSend($this->MIMEHeader, $this->MIMEBody);
+ break;
case 'smtp':
- return $this->SmtpSend($this->MIMEHeader, $this->MIMEBody);
+ $rtn = $this->SmtpSend($this->MIMEHeader, $this->MIMEBody);
+ break;
case 'mail':
- return $this->MailSend($this->MIMEHeader, $this->MIMEBody);
+ $rtn = $this->MailSend($this->MIMEHeader, $this->MIMEBody);
+ break;
default:
- return $this->MailSend($this->MIMEHeader, $this->MIMEBody);
+ $rtn = $this->MailSend($this->MIMEHeader, $this->MIMEBody);
+ break;
}
} catch (phpmailerException $e) {
@@ -753,6 +758,7 @@ class PHPMailer {
}
return false;
}
+ return $rtn;
}
/**
|
Bugz #<I>... handle weirdness w/ try/catch
|
minmb_phpmailer
|
train
|
php
|
edce4abed957759c7faa6d06d9602de884d83b9b
|
diff --git a/lib/my_help.rb b/lib/my_help.rb
index <HASH>..<HASH> 100644
--- a/lib/my_help.rb
+++ b/lib/my_help.rb
@@ -117,8 +117,9 @@ require 'specific_help'
help_file = File.join(ENV['HOME'],'.my_help','#{file}')
SpecificHelp::Command.run(help_file, ARGV)
EOS
+ exe_path = File.expand_path("../../exe", __FILE__)
[title, short_name(title)].each do |name|
- p target=File.join('exe',name)
+ p target=File.join(exe_path,name)
File.open(target,'w'){|file| file.print exe_cont}
FileUtils.chmod('a+x', target, :verbose => true)
end
|
rev make_help and install_local
|
daddygongon_my_help
|
train
|
rb
|
87cc4ec975726ceb5a08d1e9de1fd57e7ea9fd17
|
diff --git a/src-test/com/linkedin/parseq/ParSeqUnitTestHelper.java b/src-test/com/linkedin/parseq/ParSeqUnitTestHelper.java
index <HASH>..<HASH> 100644
--- a/src-test/com/linkedin/parseq/ParSeqUnitTestHelper.java
+++ b/src-test/com/linkedin/parseq/ParSeqUnitTestHelper.java
@@ -100,7 +100,7 @@ public class ParSeqUnitTestHelper {
public void tearDown() throws Exception {
_engine.shutdown();
- _engine.awaitTermination(60, TimeUnit.SECONDS);
+ _engine.awaitTermination(200, TimeUnit.MILLISECONDS);
_engine = null;
_scheduler.shutdownNow();
_scheduler = null;
|
Brought back original <I>ms wait for engine termination in unit tests on
tear down.
|
linkedin_parseq
|
train
|
java
|
386e1e07d370e27dbe0dec3cc4b727f9a015ab72
|
diff --git a/metapack/test/test_issues.py b/metapack/test/test_issues.py
index <HASH>..<HASH> 100644
--- a/metapack/test/test_issues.py
+++ b/metapack/test/test_issues.py
@@ -204,23 +204,6 @@ Reference.Description: CRA Loan originations, aggregated to tracts.
u = MetapackDocumentUrl('/Users/eric/proj/data-projects/metatab-packages/census.foobtomtoob', downloader=downloader)
print(str(u))
- def test_broken_package_urls(self):
- from metapack import open_package
- from metapack.appurl import MetapackPackageUrl
-
- p = open_package('metapack+file:///Users/eric/proj/data-projects/cde.ca.gov/cde.ca.gov-current_expense/metadata.csv')
-
- u = parse_app_url('file:README.md')
-
- r = p.package_url.join_target(u).get_resource()
-
- print(p.package_url)
- print(r)
- del r._parts['fragment']
- del r._parts['fragment_query']
- print(r.get_target())
- pprint(r._parts)
-
if __name__ == '__main__':
|
Fixing Excel, Zip urls
|
Metatab_metapack
|
train
|
py
|
e9559931083a9cfb8ec13df02f0a7e60d53c3737
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -283,7 +283,8 @@ PacketStreamSubstream.prototype.destroy = function (err) {
this.readEnd = true
try {
// catch errors to ensure cleanup
- this.read(null, err)
+ // don't assume that a stream has been piped anywhere.
+ if(this.read) this.read(null, err)
} catch (e) {
console.error('Exception thrown by PacketStream substream end handler', e)
console.error(e.stack)
@@ -299,3 +300,4 @@ PacketStreamSubstream.prototype.destroy = function (err) {
}
}
+
|
don't assume that streams that have ended have been piped anywhere
|
ssbc_packet-stream
|
train
|
js
|
a0ced04591a9be43fff6e24549c1721838c99adb
|
diff --git a/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java b/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java
index <HASH>..<HASH> 100644
--- a/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java
+++ b/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java
@@ -329,8 +329,13 @@ implements ShutdownListener {
CaptureSearchResult closest = captureResults.getClosest(wbRequest,
isUseAnchorWindow());
closest.setClosest(true);
- resource =
- getCollection().getResourceStore().retrieveResource(closest);
+ try {
+ resource =
+ getCollection().getResourceStore().retrieveResource(closest);
+ } catch (ResourceNotAvailableException rnae) {
+ rnae.setCaptureSearchResults((CaptureSearchResults)results);
+ throw rnae;
+ }
p.retrieved();
ReplayRenderer renderer =
getReplay().getRenderer(wbRequest, closest, resource);
|
FEATURE: add CaptureSearchResults to the exception if the problem is ResourceNotAvailable, allowing jsp to offer alternate versions.
git-svn-id: <URL>
|
iipc_openwayback
|
train
|
java
|
903f880e7283047d1458a324449e1615fbaf6853
|
diff --git a/fork_daemon.php b/fork_daemon.php
index <HASH>..<HASH> 100644
--- a/fork_daemon.php
+++ b/fork_daemon.php
@@ -1325,12 +1325,12 @@ class fork_daemon
$time = 0;
// make sure the children exit
- while ((count($pids) > 0) && ($time >= $kill_delay))
+ while ((count($pids) > 0) && ($time < $kill_delay))
{
foreach ($pids as $index => $pid)
{
// check if the pid exited gracefully
- if ($this->forked_children[$pid]['status'] == self::STOPPED)
+ if (!isset($this->forked_children[$pid]) || $this->forked_children[$pid]['status'] == self::STOPPED)
{
$this->log('Pid ' . $pid . ' has exited gracefully', self::LOG_LEVEL_INFO);
unset($pids[$index]);
@@ -1340,7 +1340,7 @@ class fork_daemon
$time = microtime(true) - $request_time;
if ($time < $kill_delay)
{
- $this->log('Waiting ' . round($time, 0) . ' seconds for ' . count($pids) . ' to exit gracefully', self::LOG_LEVEL_INFO);
+ $this->log('Waiting ' . ($kill_delay - round($time, 0)) . ' seconds for ' . count($pids) . ' to exit gracefully', self::LOG_LEVEL_INFO);
sleep(1);
continue;
}
|
Fixed logic issue where waiting for children to exit was not happening.
|
barracudanetworks_forkdaemon-php
|
train
|
php
|
a1230b92919dcf3b0d0781f227286827385cad64
|
diff --git a/python/ray/tune/suggest/optuna.py b/python/ray/tune/suggest/optuna.py
index <HASH>..<HASH> 100644
--- a/python/ray/tune/suggest/optuna.py
+++ b/python/ray/tune/suggest/optuna.py
@@ -121,6 +121,16 @@ class OptunaSearch(Searcher):
draw hyperparameter configurations. Defaults to ``MOTPESampler``
for multi-objective optimization with Optuna<2.9.0, and
``TPESampler`` in every other case.
+
+ .. warning::
+ Please note that with Optuna 2.10.0 and earlier
+ default ``MOTPESampler``/``TPESampler`` suffer
+ from performance issues when dealing with a large number of
+ completed trials (approx. >100). This will manifest as
+ a delay when suggesting new configurations.
+ This is an Optuna issue and may be fixed in a future
+ Optuna release.
+
seed (int): Seed to initialize sampler with. This parameter is only
used when ``sampler=None``. In all other cases, the sampler
you pass should be initialized with the seed already.
@@ -131,7 +141,7 @@ class OptunaSearch(Searcher):
needing to re-compute the trial. Must be the same length as
points_to_evaluate.
- ..warning::
+ .. warning::
When using ``evaluated_rewards``, the search space ``space``
must be provided as a :class:`dict` with parameter names as
keys and ``optuna.distributions`` instances as values. The
|
[tune] Note `TPESampler` performance issues in docs (#<I>)
|
ray-project_ray
|
train
|
py
|
38244f44d0e78acc57df594bae69fb0107a46415
|
diff --git a/src/net/sf/mpxj/FileVersion.java b/src/net/sf/mpxj/FileVersion.java
index <HASH>..<HASH> 100644
--- a/src/net/sf/mpxj/FileVersion.java
+++ b/src/net/sf/mpxj/FileVersion.java
@@ -26,8 +26,12 @@ package net.sf.mpxj;
/**
* Instances of this class represent enumerated file version values.
*/
-public final class FileVersion
+public enum FileVersion implements MpxjEnum
{
+ VERSION_1_0(1),
+ VERSION_3_0(3),
+ VERSION_4_0(4);
+
/**
* Private constructor.
*
@@ -43,7 +47,7 @@ public final class FileVersion
*
* @return file version value
*/
- public int getValue()
+ @Override public int getValue()
{
return (m_value);
}
@@ -114,19 +118,4 @@ public final class FileVersion
}
private int m_value;
-
- /**
- * Constant representing file version.
- */
- public static final FileVersion VERSION_1_0 = new FileVersion(1);
-
- /**
- * Constant representing file version.
- */
- public static final FileVersion VERSION_3_0 = new FileVersion(3);
-
- /**
- * Constant representing file version.
- */
- public static final FileVersion VERSION_4_0 = new FileVersion(4);
}
|
Converted FileVersion class to enum
|
joniles_mpxj
|
train
|
java
|
ebea28268dbfb2106dafd36e33c696af47b2dd97
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -115,7 +115,7 @@ module.exports = function(config) {
autoWatch: false,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
- browsers: process.env.TEST_HEADLESS ? ['ChromeHeadless', 'FirefoxHeadless'] : ['Chrome', 'Firefox'],
+ browsers: process.env.TEST_HEADLESS ? ['ChromeHeadless'] : ['Chrome', 'Firefox'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
|
Update jenkins to only test using ChromeHeadless
|
cloudinary_cloudinary_js
|
train
|
js
|
bf50225e02f5c33b2953ed985690c6d04c69ea00
|
diff --git a/pkg/minikube/assets/addons.go b/pkg/minikube/assets/addons.go
index <HASH>..<HASH> 100644
--- a/pkg/minikube/assets/addons.go
+++ b/pkg/minikube/assets/addons.go
@@ -260,6 +260,12 @@ var Addons = map[string]*Addon{
"registry-svc.yaml",
"0640",
false),
+ MustBinAsset(
+ "deploy/addons/registry/registry-proxy.yaml.tmpl",
+ constants.AddonsPath,
+ "registry-proxy.yaml",
+ "0640",
+ false),
}, false, "registry"),
"registry-creds": NewAddon([]*BinAsset{
MustBinAsset(
|
Register registry-proxy with registry addons
|
kubernetes_minikube
|
train
|
go
|
1faa05fc28d8ed1d3efc4e16d6be1681968ba05b
|
diff --git a/org/xbill/DNS/Cache.java b/org/xbill/DNS/Cache.java
index <HASH>..<HASH> 100644
--- a/org/xbill/DNS/Cache.java
+++ b/org/xbill/DNS/Cache.java
@@ -21,7 +21,7 @@ import org.xbill.DNS.utils.*;
public class Cache extends NameSet {
-private static abstract class Element implements TypedObject {
+private abstract static class Element implements TypedObject {
byte credibility;
int expire;
diff --git a/org/xbill/DNS/TTL.java b/org/xbill/DNS/TTL.java
index <HASH>..<HASH> 100644
--- a/org/xbill/DNS/TTL.java
+++ b/org/xbill/DNS/TTL.java
@@ -19,9 +19,10 @@ TTL() {}
/**
* Parses a BIND-stype TTL
* @return The TTL as a number of seconds
+ * @throws NumberFormatException The TTL was not a valid number
*/
public static int
-parseTTL(String s) throws NumberFormatException {
+parseTTL(String s) {
if (s == null || !Character.isDigit(s.charAt(0)))
throw new NumberFormatException();
int value = 0, ttl = 0;
|
Fix semantic warnings reported by jikes.
git-svn-id: <URL>
|
dnsjava_dnsjava
|
train
|
java,java
|
198e3a7baef87934228760308dfa2cee745630c4
|
diff --git a/hypermap/aggregator/models.py b/hypermap/aggregator/models.py
index <HASH>..<HASH> 100644
--- a/hypermap/aggregator/models.py
+++ b/hypermap/aggregator/models.py
@@ -618,7 +618,6 @@ class Layer(Resource):
upfile = SimpleUploadedFile(thumbnail_file_name, img.read(), "image/jpeg")
self.thumbnail.save(thumbnail_file_name, upfile, True)
print 'Thumbnail updated for layer %s' % self.name
- img.close()
def check_available(self):
"""
|
Removing a line that was causing error in layer check
|
cga-harvard_Hypermap-Registry
|
train
|
py
|
271d2b7e3bf6446c35b23350db5df878b59cba44
|
diff --git a/spec/crud_spec.rb b/spec/crud_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/crud_spec.rb
+++ b/spec/crud_spec.rb
@@ -216,5 +216,13 @@ describe 'A REST adapter' do
@book.save
end
end
+
+ it "should not do an HTTP PUT for non-dirty resources" do
+ @book.should_receive(:dirty_attributes).and_return({})
+ @adapter.connection.should_receive(:http_put).never
+ @repository.scope do
+ @book.save
+ end
+ end
end
end
|
[dm-rest-adapter] Adding update example for non-dirty resources
|
datamapper_dm-rest-adapter
|
train
|
rb
|
7c134914ecbe9d4236cdcd25ab3b11278bf05f3a
|
diff --git a/mode/javascript/javascript.js b/mode/javascript/javascript.js
index <HASH>..<HASH> 100644
--- a/mode/javascript/javascript.js
+++ b/mode/javascript/javascript.js
@@ -345,7 +345,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
- if (type == "function") return cont(functiondef);
+ if (type == "function") return cont(functiondef, maybeop);
if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop);
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
|
[javascript mode] Fix parsing of ops and derefs after function literal
Closes #<I>
|
codemirror_CodeMirror
|
train
|
js
|
bb7ae3c105e6baf1c58fe50027e23693730089b1
|
diff --git a/lib/will_paginate/finder.rb b/lib/will_paginate/finder.rb
index <HASH>..<HASH> 100644
--- a/lib/will_paginate/finder.rb
+++ b/lib/will_paginate/finder.rb
@@ -23,7 +23,7 @@ module WillPaginate
entries_per_page = options.delete(:per_page) || per_page
total_entries = unless options[:total_entries]
- count_options = options.slice :conditions, :joins, :include, :order, :group, :select, :distinct
+ count_options = options.slice :conditions, :joins, :include, :order, :group, :distinct
count_options[:select] = options[:count]
count(count_options)
else
|
We're overwriting :select with :count for count statements, so don't extract :select in the first place.
git-svn-id: svn://errtheblog.com/svn/plugins/will_paginate@<I> 1eaa<I>fe-a<I>a-<I>-9c2e-ae7a<I>a<I>c4
|
mislav_will_paginate
|
train
|
rb
|
a4003d8bb985b656df632ee0957eedbb0e62be5d
|
diff --git a/bundles/org.eclipse.orion.client.core/static/js/auth.js b/bundles/org.eclipse.orion.client.core/static/js/auth.js
index <HASH>..<HASH> 100644
--- a/bundles/org.eclipse.orion.client.core/static/js/auth.js
+++ b/bundles/org.eclipse.orion.client.core/static/js/auth.js
@@ -66,7 +66,7 @@ function handlePutAuthenticationError(xhrArgs, ioArgs) {
*/
function handleAuthenticationError(error, retry) {
if (error.status === 403) {
- if (forbiddenAccessDlg === null) {
+ if (forbiddenAccessDlg == null) {
forbiddenAccessDlg = new dijit.Dialog({
title: "Forbidden access"
});
|
Bug <I> [client] Forbidden access dialog does not display
|
eclipse_orion.client
|
train
|
js
|
cdf9eda132a46a67921488ac4dab9e0fa9c97126
|
diff --git a/test/spec/ol/format/gmlformat.test.js b/test/spec/ol/format/gmlformat.test.js
index <HASH>..<HASH> 100644
--- a/test/spec/ol/format/gmlformat.test.js
+++ b/test/spec/ol/format/gmlformat.test.js
@@ -1034,7 +1034,7 @@ describe('ol.format.GML3', function() {
it('writes back features as GML', function() {
var serialized = gmlFormat.writeFeaturesNode(features);
- expect(serialized).to.xmleql(ol.xml.parse(text));
+ expect(serialized).to.xmleql(ol.xml.parse(text), {ignoreElementOrder: true});
});
});
|
Ignore element order for FeatureCollection round trip
|
openlayers_openlayers
|
train
|
js
|
1e94fe25fa399d196f004a26fc4fb3b82dba9bfd
|
diff --git a/telethon/network/mtprotosender.py b/telethon/network/mtprotosender.py
index <HASH>..<HASH> 100644
--- a/telethon/network/mtprotosender.py
+++ b/telethon/network/mtprotosender.py
@@ -1,5 +1,6 @@
import asyncio
import collections
+import struct
from . import authenticator
from ..extensions.messagepacker import MessagePacker
@@ -169,7 +170,14 @@ class MTProtoSender:
raise ConnectionError('Cannot send requests while disconnected')
if not utils.is_list_like(request):
- state = RequestState(request, self._loop)
+ try:
+ state = RequestState(request, self._loop)
+ except struct.error as e:
+ # "struct.error: required argument is not an integer" is not
+ # very helpful; log the request to find out what wasn't int.
+ self._log.error('Request caused struct.error: %s: %s', e, request)
+ raise
+
self._send_queue.append(state)
return state.future
else:
@@ -177,7 +185,12 @@ class MTProtoSender:
futures = []
state = None
for req in request:
- state = RequestState(req, self._loop, after=ordered and state)
+ try:
+ state = RequestState(req, self._loop, after=ordered and state)
+ except struct.error as e:
+ self._log.error('Request caused struct.error: %s: %s', e, request)
+ raise
+
states.append(state)
futures.append(state.future)
|
Log requests that trigger struct.error
The exception hardly provides any valuable information.
This will hopefully help troubleshooting why the error happens.
|
LonamiWebs_Telethon
|
train
|
py
|
aaa28b33bf49c22a3ac3d121b4a530f93d90f855
|
diff --git a/src/main/java/com/sendgrid/helpers/mail/Mail.java b/src/main/java/com/sendgrid/helpers/mail/Mail.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/sendgrid/helpers/mail/Mail.java
+++ b/src/main/java/com/sendgrid/helpers/mail/Mail.java
@@ -481,7 +481,7 @@ public class Mail {
}
}
- private <K,V> Map<T,V> addToMap(K key, V value, Map<K,V> defaultMap) {
+ private <K,V> Map<K,V> addToMap(K key, V value, Map<K,V> defaultMap) {
if (defaultMap != null) {
defaultMap.put(key, value);
return defaultMap;
|
[issue#<I>] Fix a generic type mismatch
|
sendgrid_sendgrid-java
|
train
|
java
|
e5f54fbc37898ae810a488579ea99a068f83a25a
|
diff --git a/lib/blockdevice.js b/lib/blockdevice.js
index <HASH>..<HASH> 100644
--- a/lib/blockdevice.js
+++ b/lib/blockdevice.js
@@ -280,6 +280,13 @@ BlockDevice.prototype = {
fromLBA = fromLBA || 0
toLBA = toLBA || ( fromLBA + 1 )
+ if( fromLBA > toLBA ) {
+ var swap = fromLBA
+ fromLBA = toLBA
+ toLBA = swap
+ swap = void 0
+ }
+
var self = this
var from = this.blockSize * fromLBA
var to = this.blockSize * toLBA
|
Updated lib/blockdevice: Added from/to swap if f>t
|
jhermsmeier_node-blockdevice
|
train
|
js
|
9fdf1487ce818249b42c686b6130e111de0e4fdf
|
diff --git a/init.php b/init.php
index <HASH>..<HASH> 100644
--- a/init.php
+++ b/init.php
@@ -8,7 +8,7 @@ Author: Pods Framework Team
Author URI: http://pods.io/about/
Text Domain: pods
GitHub Plugin URI: https://github.com/pods-framework/pods
-GitHub Branch: 2.x
+GitHub Branch: master
Copyright 2009-2015 Pods Foundation, Inc (email : [email protected])
|
Pods <I>-a-1
|
pods-framework_pods
|
train
|
php
|
0077f70b98d9e0fa837723a9321a4f4cc4b7f19e
|
diff --git a/ox_modules/module-web.js b/ox_modules/module-web.js
index <HASH>..<HASH> 100644
--- a/ox_modules/module-web.js
+++ b/ox_modules/module-web.js
@@ -90,7 +90,7 @@ module.exports = function (opts, context, rs, logger, dispatcher, handleStepResu
*/
module.transaction = function (name) {
global._lastTransactionName = name;
- dispatcher.execute('web', 'transaction', Array.prototype.slice.call(arguments));
+ handleStepResult(dispatcher.execute('web', 'transaction', Array.prototype.slice.call(arguments)), rs);
};
/**
* @summary Specifies the amount of time that Oxygen will wait for actions to complete.
|
[web] Handle results for transaction command
|
oxygenhq_oxygen
|
train
|
js
|
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.