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 |
|---|---|---|---|---|---|
16cd52892da5e4ac1db437f674ae836976bb62ea | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -2,8 +2,8 @@
import sys
import os.path as osp
-if not ((3, 3) <= sys.version_info < (3, 7)):
- raise Exception("Python Versions 3.3 to 3.6 are supported only. See trepan2 or pydbgr for older Pythons")
+if not ((3, 2) <= sys.version_info < (3, 7)):
+ raise Exception("Python Versions 3.2 to 3.6 are supported only. See trepan2 or pydbgr for older Pythons")
sys.path.insert(0, osp.abspath(osp.dirname(__file__)))
@@ -16,6 +16,7 @@ classifiers = ['Development Status :: 4 - Beta',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5', | Python <I> works as well. Note that | rocky_python3-trepan | train | py |
68f60d5005aa873e906bee75e0b876ee98faa701 | diff --git a/src/Sulu/Bundle/PageBundle/Command/ValidateWebspacesCommand.php b/src/Sulu/Bundle/PageBundle/Command/ValidateWebspacesCommand.php
index <HASH>..<HASH> 100644
--- a/src/Sulu/Bundle/PageBundle/Command/ValidateWebspacesCommand.php
+++ b/src/Sulu/Bundle/PageBundle/Command/ValidateWebspacesCommand.php
@@ -192,7 +192,7 @@ class ValidateWebspacesCommand extends Command
$this->output->writeln('Templates:');
foreach ($webspace->getTemplates() as $type => $template) {
- $this->validateTemplate($type, $template);
+ $this->validateTemplate($type, $template . '.html.twig');
}
} | Fix webspace validate command (#<I>) | sulu_sulu | train | php |
fc539cafffc94b7c0385c4df11427a7b413afa84 | diff --git a/src/Replace/Replace.php b/src/Replace/Replace.php
index <HASH>..<HASH> 100644
--- a/src/Replace/Replace.php
+++ b/src/Replace/Replace.php
@@ -3,6 +3,7 @@
namespace ptlis\GrepDb\Replace;
use Doctrine\DBAL\Connection;
+use ptlis\GrepDb\Metadata\TableMetadata;
use ptlis\GrepDb\Replace\ReplacementStrategy\ReplacementStrategy;
use ptlis\GrepDb\Replace\ReplacementStrategy\SerializedReplace;
use ptlis\GrepDb\Replace\ReplacementStrategy\StringReplace;
@@ -99,6 +100,8 @@ final class Replace
$replaceTerm,
$incrementalReturn
) {
+ $this->setCharset($tableResultGateway->getMetadata());
+
$this->connection->query('START TRANSACTION');
$columnCount = 0;
@@ -184,6 +187,19 @@ final class Replace
}
/**
+ * Set the correct charset & collation for the table.
+ *
+ * @param TableMetadata $metadata
+ */
+ private function setCharset(
+ TableMetadata $metadata
+ ) {
+ $this->connection
+ ->query('SET NAMES \'' . $metadata->getCharset() . '\' COLLATE \'' . $metadata->getCollation() . '\'')
+ ->execute();
+ }
+
+ /**
* Perform a search and replace on the subject.
*
* This is achieved by iterating through the replacement strategies and find one that can perform the replacement, | Fix charset handling (hopefully!)
This code was accidentally removed when reworking how replacements were applied. | ptlis_grep-db | train | php |
66db5525c65999208c15dbb52f2f942549cf275a | diff --git a/driver/src/main/java/org/neo4j/driver/QueryRunner.java b/driver/src/main/java/org/neo4j/driver/QueryRunner.java
index <HASH>..<HASH> 100644
--- a/driver/src/main/java/org/neo4j/driver/QueryRunner.java
+++ b/driver/src/main/java/org/neo4j/driver/QueryRunner.java
@@ -59,7 +59,7 @@ import java.util.Map;
* @see Transaction
* @since 1.0
*/
-public interface QueryRunner
+public interface QueryRunner extends AutoCloseable
{
/**
* Run a query and return a result stream. | Make QueryRunner interface extend AutoCloseable (#<I>) | neo4j_neo4j-java-driver | train | java |
25e1068e7c46378935fb52004a9dfa77e1c3cf78 | diff --git a/core/codegen/src/main/java/org/overture/codegen/assistant/ExpAssistantCG.java b/core/codegen/src/main/java/org/overture/codegen/assistant/ExpAssistantCG.java
index <HASH>..<HASH> 100644
--- a/core/codegen/src/main/java/org/overture/codegen/assistant/ExpAssistantCG.java
+++ b/core/codegen/src/main/java/org/overture/codegen/assistant/ExpAssistantCG.java
@@ -8,6 +8,8 @@ import org.overture.ast.analysis.AnalysisException;
import org.overture.ast.definitions.AAssignmentDefinition;
import org.overture.ast.definitions.AInstanceVariableDefinition;
import org.overture.ast.definitions.AValueDefinition;
+import org.overture.ast.definitions.SFunctionDefinition;
+import org.overture.ast.definitions.SOperationDefinition;
import org.overture.ast.expressions.ARealLiteralExp;
import org.overture.ast.expressions.PExp;
import org.overture.ast.expressions.SBinaryExp;
@@ -219,4 +221,9 @@ public class ExpAssistantCG
return header;
}
+
+ public boolean existWithinOpOrFunc(PExp exp)
+ {
+ return exp.getAncestor(SOperationDefinition.class) == null && exp.getAncestor(SFunctionDefinition.class) == null;
+ }
} | Extended expression assistant with functionality to check if a given expression exists within the context of an operation or a function | overturetool_overture | train | java |
20412496e7fd76083ecabe6d60ded9c46722feaf | diff --git a/spec/factories/tools.rb b/spec/factories/tools.rb
index <HASH>..<HASH> 100644
--- a/spec/factories/tools.rb
+++ b/spec/factories/tools.rb
@@ -22,6 +22,7 @@ FactoryBot.define do
:gemspec_packer,
:gemspec_reader,
:gemspec_writer,
+ :git,
:licenser,
:process_locker,
:rubocop, | tools (factories) git added | SwagDevOps_kamaze-project | train | rb |
a55c6674c1b497533a96df3e12cb60bbdb6cbfc8 | diff --git a/src/main/java/reactor/netty/channel/MonoSendMany.java b/src/main/java/reactor/netty/channel/MonoSendMany.java
index <HASH>..<HASH> 100644
--- a/src/main/java/reactor/netty/channel/MonoSendMany.java
+++ b/src/main/java/reactor/netty/channel/MonoSendMany.java
@@ -457,7 +457,7 @@ final class MonoSendMany<I, O> extends MonoSend<I, O> implements Scannable {
@Override
public boolean isVoid() {
- return true;
+ return false;
}
@Override | Fix regression with MonoSendManyInner:isVoid:true and send(Publisher)
SslHandler is relying on isVoid to aggregate or skip callback. | reactor_reactor-netty | train | java |
c5defe10794665554f4287ee91682dac900239d7 | diff --git a/parsl/dataflow/dflow.py b/parsl/dataflow/dflow.py
index <HASH>..<HASH> 100644
--- a/parsl/dataflow/dflow.py
+++ b/parsl/dataflow/dflow.py
@@ -69,11 +69,13 @@ class DataFlowKernel(object):
self.lazy_fail = lazy_fail
self.executors = executors
+ logger.debug("Created executors : ", self.executors)
self.task_count = 0
self.fut_task_lookup = {}
self.tasks = {}
- self.executor = self.executors[0]
+ first = self.config["sites"][0]["site"]
+ self.executor = self.executors[first]
logger.warn("Using only executor: {0}".format(self.executor)) | Adding logging and a minor fix | Parsl_parsl | train | py |
b1bba8fc6b62ace8f435cd414893fa2850e149b1 | diff --git a/src/builders/WhereBracketExpressionBuilder.php b/src/builders/WhereBracketExpressionBuilder.php
index <HASH>..<HASH> 100644
--- a/src/builders/WhereBracketExpressionBuilder.php
+++ b/src/builders/WhereBracketExpressionBuilder.php
@@ -118,7 +118,7 @@ class WhereBracketExpressionBuilder {
$sql .= " ";
}
- $sql = substr($sql, 0, -1);
+ $sql = "(" . substr($sql, 0, -1) . ")";
return $sql;
} | CHG: the brackets were lost.
git-svn-id: <URL> | greenlion_PHP-SQL-Parser | train | php |
475c5a3ef028744f316126cd506998e10f632cc2 | diff --git a/xtuml/load.py b/xtuml/load.py
index <HASH>..<HASH> 100644
--- a/xtuml/load.py
+++ b/xtuml/load.py
@@ -479,12 +479,16 @@ class ModelLoader(object):
raise ParsingException("unknown error")
-def load_metamodel(filenames):
+def load_metamodel(resource):
'''
- Load and return a meta model from a list of filenames.
+ Load and return a meta model from a resource.
+ The resource may be either a filename, or a list of filenames.
'''
+ if isinstance(resource, str):
+ resource = [resource]
+
loader = ModelLoader()
- for filename in filenames:
+ for filename in resource:
loader.filename_input(filename)
return loader.build_metamodel() | load: allow both a list of filenames, and a single filename as argument type to load_metamodel | xtuml_pyxtuml | train | py |
0e54ab7d07286fc811341364eff53b900fe0fff5 | diff --git a/dynect/client.go b/dynect/client.go
index <HASH>..<HASH> 100644
--- a/dynect/client.go
+++ b/dynect/client.go
@@ -14,6 +14,11 @@ const (
DynAPIPrefix = "https://api.dynect.net/REST"
)
+func init() {
+ // Set the logging prefix.
+ log.SetPrefix("go-dynect")
+}
+
// A client for use with DynECT's REST API.
type Client struct {
Token string | Added a logging prefix to the logger | nesv_go-dynect | train | go |
a170d9b030f657d5c7bd867dfd200ee4a1ea1571 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -4,6 +4,7 @@ const DumpProcess = require('bindings')('dumpme');
/**
* Dumps the current process
+ *
* @param {string} [gcore] - path and filename of the gcore binary
* @param {string} [coredump] - path and filename of the target coredump file
* @return {Boolean} | force 1st travis build | kuzzleio_dumpme | train | js |
fdee7b2faade14cebb5156033f7d0e00ff6f1277 | diff --git a/pkg/proxy/iptables/proxier.go b/pkg/proxy/iptables/proxier.go
index <HASH>..<HASH> 100644
--- a/pkg/proxy/iptables/proxier.go
+++ b/pkg/proxy/iptables/proxier.go
@@ -768,9 +768,11 @@ func (proxier *Proxier) deleteEndpointConnections(connectionMap []proxy.ServiceE
var err error
if nodePort != 0 {
err = conntrack.ClearEntriesForPortNAT(proxier.exec, endpointIP, nodePort, svcProto)
- } else {
- err = conntrack.ClearEntriesForNAT(proxier.exec, svcInfo.ClusterIP().String(), endpointIP, svcProto)
+ if err != nil {
+ klog.Errorf("Failed to delete nodeport-related %s endpoint connections, error: %v", epSvcPair.ServicePortName.String(), err)
+ }
}
+ err = conntrack.ClearEntriesForNAT(proxier.exec, svcInfo.ClusterIP().String(), endpointIP, svcProto)
if err != nil {
klog.Errorf("Failed to delete %s endpoint connections, error: %v", epSvcPair.ServicePortName.String(), err)
} | Correctly fix clearing conntrack entry on endpoint changes (nodeport)
A previous PR (#<I>) intended to clear conntrack entry on endpoint
changes when using nodeport by introducing a dedicated function to
remove the stale conntrack entry on the node port and allow traffic to
resume. By doing so, it has introduced a nodeport specific bug where the
conntrack entries related to the ClusterIP does not get clean if
endpoint is changed (issue #<I>). We fix by doing ClusterIP cleanup in
all cases. | kubernetes_kubernetes | train | go |
7bedb0b21d9843a58cd37066127744b5a6840be4 | diff --git a/lib/Doctrine/Query.php b/lib/Doctrine/Query.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/Query.php
+++ b/lib/Doctrine/Query.php
@@ -1544,4 +1544,18 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
return $new;
}
+
+ /**
+ * Frees the resources used by the query object. It especially breaks a
+ * cyclic reference between the query object and it's parsers. This enables
+ * PHP's current GC to reclaim the memory.
+ * This method can therefore be used to reduce memory usage when creating a lot
+ * of query objects during a request.
+ */
+ public function free() {
+ $this->reset();
+ $this->_parsers = array();
+ $this->_dqlParts = array();
+ $this->_enumParams = array();
+ }
}
\ No newline at end of file | Added Doctrine_Query::free() to make it possible to help PHPs current GC | doctrine_annotations | train | php |
9d38f4debba7efe9c388425fae518991b72eb1d1 | diff --git a/js/base/Exchange.js b/js/base/Exchange.js
index <HASH>..<HASH> 100644
--- a/js/base/Exchange.js
+++ b/js/base/Exchange.js
@@ -180,7 +180,7 @@ module.exports = class Exchange {
this.origin = '*' // CORS origin
this.iso8601 = timestamp => ((typeof timestamp === 'undefined') ? timestamp : new Date (timestamp).toISOString ())
- this.parse8601 = x => Date.parse (((x.indexOf ('+') >= 0) || (x.slice (-1) === 'Z')) ? x : (x + 'Z'))
+ this.parse8601 = x => Date.parse (((x.indexOf ('+') >= 0) || (x.slice (-1) === 'Z')) ? x : (x + 'Z').replace (/\s(\d\d):/, 'T$1:'))
this.parseDate = (x) => {
if (typeof x === 'undefined')
return x | added a workaround for Date.parse with non-ISO<I> strings in Safari fix #<I> | ccxt_ccxt | train | js |
ab0f5aabb326fe9e3bda1fd1530b59f0a4b79fea | diff --git a/src/Event/SpecificationDecoratedEventCdbXml.php b/src/Event/SpecificationDecoratedEventCdbXml.php
index <HASH>..<HASH> 100644
--- a/src/Event/SpecificationDecoratedEventCdbXml.php
+++ b/src/Event/SpecificationDecoratedEventCdbXml.php
@@ -44,6 +44,8 @@ class SpecificationDecoratedEventCdbXml implements EventCdbXmlServiceInterface
);
$this->guardSpecification($udb2Event);
+
+ return $eventCdbXml;
}
private function guardSpecification(\CultureFeed_Cdb_Item_Event $event) | III-<I>: Add specification decorated EventCdbXML service implementation and a specification for UDB3 Place labeled UDB2 events | cultuurnet_udb3-udb2-bridge | train | php |
a4f5784950f8093112e39ff8ed8c28aabc2cbcaa | diff --git a/client/lib/abtest/active-tests.js b/client/lib/abtest/active-tests.js
index <HASH>..<HASH> 100644
--- a/client/lib/abtest/active-tests.js
+++ b/client/lib/abtest/active-tests.js
@@ -213,7 +213,7 @@ export default {
countryCodeTargets: [ 'US' ],
},
monthlyPricing: {
- datestamp: '20201030',
+ datestamp: '20501030',
variations: {
control: 90,
treatment: 10, | Disable monthly pricing experiment while we research a bug. (#<I>) | Automattic_wp-calypso | train | js |
6037e82ba4c76c8cd3ff18d8bfa25275617adeb3 | diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/navigatorRenderer.js b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/navigatorRenderer.js
index <HASH>..<HASH> 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/navigatorRenderer.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/navigatorRenderer.js
@@ -25,8 +25,9 @@ define([
var max_more_info_column_length = 60;
/* Internal */
function addImageToLink(contentType, link, location, replace) {
+ var image;
if (contentType) {
- var image, imageClass = contentType.imageClass, imageURL = contentType.image;
+ var imageClass = contentType.imageClass, imageURL = contentType.image;
if (imageClass) {
image = document.createElement("span"); //$NON-NLS-0$
image.className += imageClass; // may be several classes in here
@@ -40,9 +41,8 @@ define([
if (image) {
link.replaceChild(image, replace);
}
- return image;
}
- return null;
+ return image ? image : replace;
}
var uriTemplate = new URITemplate("#{,resource,params*}"); //$NON-NLS-0$ | Bug <I> - Readonly widget: Show progress spinner when user clicks on a folder or file. -- support unknown file types. | eclipse_orion.client | train | js |
41ce18345bdd9efaaece674b609a466c3b78fb5a | diff --git a/src/Settings/Controller/IndexController.php b/src/Settings/Controller/IndexController.php
index <HASH>..<HASH> 100644
--- a/src/Settings/Controller/IndexController.php
+++ b/src/Settings/Controller/IndexController.php
@@ -12,9 +12,6 @@ namespace Settings\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
-//use Applications\Form\Application as ApplicationForm;
-//use Applications\Model\Application as ApplicationModel;
-//use Applications\Form\ApplicationHydrator;
use Zend\Stdlib\Hydrator\ClassMethods;
use Zend\View\Model\JsonModel;
use Zend\EventManager\Event;
@@ -42,7 +39,6 @@ class IndexController extends AbstractActionController
public function indexAction()
{
$services = $this->getServiceLocator();
- $translator = $services->get('translator');
$moduleName = $this->params('module', 'Core');
$settings = $this->settings($moduleName); | [General] upgrades to ZF2 <I>. | yawik_settings | train | php |
9dc891df06f3358844303356afc25cc00793569a | diff --git a/pliers/extractors/text.py b/pliers/extractors/text.py
index <HASH>..<HASH> 100644
--- a/pliers/extractors/text.py
+++ b/pliers/extractors/text.py
@@ -550,10 +550,6 @@ class BertSequenceEncodingExtractor(BertExtractor):
return_metadata=False,
model_kwargs=None,
tokenizer_kwargs=None):
-
- super(BertSequenceEncodingExtractor, self).__init__(pretrained_model,
- tokenizer, framework, return_metadata, model_kwargs,
- tokenizer_kwargs, model_class='BertModel')
if pooling:
if return_sep:
raise(ValueError('Pooling and return_seq argument are '
@@ -562,6 +558,9 @@ class BertSequenceEncodingExtractor(BertExtractor):
getattr(np, pooling)
except:
raise(ValueError('Pooling must be a valid numpy function.'))
+ super(BertSequenceEncodingExtractor, self).__init__(pretrained_model,
+ tokenizer, framework, return_metadata, model_kwargs,
+ tokenizer_kwargs, model_class='BertModel')
self.pooling = pooling
self.return_sep = return_sep | check pooling arg before superclass initializer | tyarkoni_pliers | train | py |
a43f8b314529cf3033569fd505d7ee187fbeae42 | diff --git a/Classes/Service/NodeRedirectService.php b/Classes/Service/NodeRedirectService.php
index <HASH>..<HASH> 100644
--- a/Classes/Service/NodeRedirectService.php
+++ b/Classes/Service/NodeRedirectService.php
@@ -112,7 +112,7 @@ class NodeRedirectService implements NodeRedirectServiceInterface
throw new Exception('The target URI path of the node could not be resolved', 1451945358);
}
- $hosts = $this->getHostPatterns($node->getContext());
+ $hosts = $this->getHostnames($node->getContext());
// The page has been removed
if ($node->isRemoved()) {
@@ -142,17 +142,19 @@ class NodeRedirectService implements NodeRedirectServiceInterface
}
/**
+ * Collects all hostnames from the Domain entries attached to the current site.
+ *
* @param ContentContext $contentContext
* @return array
*/
- protected function getHostPatterns(ContentContext $contentContext)
+ protected function getHostnames(ContentContext $contentContext)
{
$site = $contentContext->getCurrentSite();
$domains = [];
if ($site !== null) {
foreach ($site->getDomains() as $domain) {
/** @var Domain $domain */
- $domains[] = $domain->getHostPattern();
+ $domains[] = $domain->getHostname();
}
}
return $domains; | TASK: Rename getHostPatterns to getHostnames
This is related to a change in Neos (PR #<I>). Since <I> the hostPattern
no longer supported using a wildcard.
This change renames getHostPatterns to getHostnames. It therefore makes
things clearer. | neos_redirecthandler-neosadapter | train | php |
caaf55782e92f6d3df1acd9a2d0302bb340310bd | diff --git a/lib/fluent/test/helpers.rb b/lib/fluent/test/helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/fluent/test/helpers.rb
+++ b/lib/fluent/test/helpers.rb
@@ -116,5 +116,14 @@ EOT
driver.instance.log.out = tmp
end
end
+
+ def capture_stdout
+ out = StringIO.new
+ $stdout = out
+ yield
+ out.string.force_encoding('utf-8')
+ ensure
+ $stdout = STDOUT
+ end
end
end
diff --git a/test/helper.rb b/test/helper.rb
index <HASH>..<HASH> 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -146,15 +146,6 @@ def ipv6_enabled?
end
end
-def capture_stdout
- out = StringIO.new
- $stdout = out
- yield
- out.string.force_encoding('utf-8')
-ensure
- $stdout = STDOUT
-end
-
dl_opts = {}
dl_opts[:log_level] = ServerEngine::DaemonLogger::WARN
logdev = Fluent::Test::DummyLogDevice.new | Move capture_stdout under Fluetn::Test::Helpers | fluent_fluentd | train | rb,rb |
88125bce0c2e527eda96e3c68b930cd96752132c | diff --git a/pymc3/sampling.py b/pymc3/sampling.py
index <HASH>..<HASH> 100644
--- a/pymc3/sampling.py
+++ b/pymc3/sampling.py
@@ -432,7 +432,7 @@ def init_nuts(init='advi', n_init=500000, model=None, **kwargs):
if init == 'advi':
v_params = pm.variational.advi(n=n_init)
- start = pm.variational.sample_vp(v_params, 1, progressbar=False)[0]
+ start = pm.variational.sample_vp(v_params, 1, progressbar=False, hide_transformed=False)[0]
cov = np.power(model.dict_to_array(v_params.stds), 2)
elif init == 'advi_map':
start = pm.find_MAP() | use tranformed variables as starting points | pymc-devs_pymc | train | py |
747ccbd87fa186236c07115e3db503ce0cfda26b | diff --git a/packages/proact/component/index.js b/packages/proact/component/index.js
index <HASH>..<HASH> 100644
--- a/packages/proact/component/index.js
+++ b/packages/proact/component/index.js
@@ -61,6 +61,6 @@ export function toComponent(value, name = null) {
} else if( typeof value === 'function' ) {
return new RenderFunction(value, name || value.name);
} else {
- throw InvalidArgType('value', value, 'a render function or component');
+ throw InvalidArgType({ value }, 'a render function or component');
}
}
diff --git a/packages/proact/component/registry.js b/packages/proact/component/registry.js
index <HASH>..<HASH> 100644
--- a/packages/proact/component/registry.js
+++ b/packages/proact/component/registry.js
@@ -17,7 +17,7 @@ export function define(renderer) {
// To support both ReactLike and html-like component naming, only normalize
// name to lower case when checking for HTML tags.
if( !name || typeElement(name.toLowerCase()) ) {
- throw InvalidArgValue('name', name);
+ throw InvalidArgValue({ name });
} else if( registry.has(name) ) {
throw DuplicateBinding(name, registry.get(name), component);
} | proact: use improved error constructor API | apparebit_js-junction | train | js,js |
2ab0235a20ed897d14312b5e41bcfd1129fbce59 | diff --git a/invenio_base/config.py b/invenio_base/config.py
index <HASH>..<HASH> 100644
--- a/invenio_base/config.py
+++ b/invenio_base/config.py
@@ -64,9 +64,9 @@ EXTENSIONS = [
'invenio_ext.menu',
'invenio_ext.jasmine', # after assets
'flask_breadcrumbs:Breadcrumbs',
- 'invenio_deposit.url_converters',
+ # FIXME 'invenio_deposit.url_converters',
# TODO 'invenio_ext.iiif',
- 'invenio_ext.es',
+ # FIXME 'invenio_ext.es',
]
PACKAGES = [ | config: disabled non-core extensions
* INCOMPATIBLE Disables non-core extensions for Invenio deposit and
Elastic search, that requires Invenio-Records to be installed. | inveniosoftware_invenio-base | train | py |
e38c60849aec2b188136ee5669924bc45088ce07 | diff --git a/seleniumbase/fixtures/base_case.py b/seleniumbase/fixtures/base_case.py
index <HASH>..<HASH> 100755
--- a/seleniumbase/fixtures/base_case.py
+++ b/seleniumbase/fixtures/base_case.py
@@ -4282,6 +4282,7 @@ class BaseCase(unittest.TestCase):
"javascript:" not in link
and "mailto:" not in link
and "data:" not in link
+ and "://fonts.gstatic.com" not in link
):
links.append(link)
if timeout: | Update the tool that scans for broken links on a page | seleniumbase_SeleniumBase | train | py |
65133949bb9e0ff9bbbec83d4dc4085f8b432954 | diff --git a/src/Element.js b/src/Element.js
index <HASH>..<HASH> 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -514,7 +514,9 @@ OO.ui.Element.prototype.isElementAttached = function () {
* @return {HTMLDocument} Document object
*/
OO.ui.Element.prototype.getElementDocument = function () {
- return this.$.context;
+ // Don't use this.$.context because subclasses can rebind this.$
+ // Don't cache this in other ways either because subclasses could can change this.$element
+ return OO.ui.Element.static.getDocument( this.$element );
};
/** | Revert <I>b<I>: don't use this.$.context in getElementDocument()
Or any other cached value for that matter.
Reverts code change only, does not revert addition of tests.
Change-Id: I9fe6ccf7c<I>dfdaf<I>f1ad<I>efeb<I> | wikimedia_oojs-ui | train | js |
9fb2432b14ed85889b892e5ba024fb07a204faf7 | diff --git a/examples/with-react-with-styles/pages/_app.js b/examples/with-react-with-styles/pages/_app.js
index <HASH>..<HASH> 100644
--- a/examples/with-react-with-styles/pages/_app.js
+++ b/examples/with-react-with-styles/pages/_app.js
@@ -2,11 +2,14 @@ import React from 'react'
import { DIRECTIONS } from 'react-with-direction'
import AphroditeInterface from 'react-with-styles-interface-aphrodite'
import WithStylesContext from 'react-with-styles/lib/WithStylesContext'
+import ThemedStyleSheet from 'react-with-styles/lib/ThemedStyleSheet'
import defaultTheme from '../defaultTheme'
function MyApp(props) {
const { Component, pageProps } = props
+ ThemedStyleSheet.registerInterface(AphroditeInterface)
+
return (
<WithStylesContext.Provider
value={{ | Add ThemedStyleSheet.registerInterface to react-with-styles example (#<I>)
My [draft PR was merged](<URL>) so let's at least keep the code in canary in a working state. | zeit_next.js | train | js |
91580b1f30e5dac50615ef99f6185f1290a058f8 | diff --git a/comments-bundle/contao/Comments.php b/comments-bundle/contao/Comments.php
index <HASH>..<HASH> 100644
--- a/comments-bundle/contao/Comments.php
+++ b/comments-bundle/contao/Comments.php
@@ -321,7 +321,7 @@ class Comments extends \Frontend
}
// Notification
- $objEmail = \Email();
+ $objEmail = new \Email();
$objEmail->from = $GLOBALS['TL_ADMIN_EMAIL'];
$objEmail->fromName = $GLOBALS['TL_ADMIN_NAME']; | [Comments] The calendar extensions now uses Models | contao_contao | train | php |
68f68bb1d0bbdc8b4d5e9e4dacba26ce5a3074be | diff --git a/test/fixtures/empty.php b/test/fixtures/empty.php
index <HASH>..<HASH> 100644
--- a/test/fixtures/empty.php
+++ b/test/fixtures/empty.php
@@ -8,3 +8,5 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
+
+/* this space intentionally left blank */ | php-cs-fixer and styleci were fighting over this…
They seem to disagree about the proper number of newlines in an empty file. Throw them both a bone. | bobthecow_psysh | train | php |
cb2e07e5e21571fd30665f3bc74f2c85073679b4 | diff --git a/scripts/homestead.rb b/scripts/homestead.rb
index <HASH>..<HASH> 100644
--- a/scripts/homestead.rb
+++ b/scripts/homestead.rb
@@ -18,7 +18,7 @@ class Homestead
# Configure The Box
config.vm.define settings['name'] ||= 'homestead-7'
config.vm.box = settings['box'] ||= 'laravel/homestead'
- config.vm.box_version = settings['version'] ||= '>= 7.2.1'
+ config.vm.box_version = settings['version'] ||= '>= 7.2.1, < 8.0.0-alpha1'
config.vm.hostname = settings['hostname'] ||= 'homestead'
# Configure A Private Network IP | Prevent Homestead 8.x from using > v8 box | laravel_homestead | train | rb |
d2af97eb12bb05d8d9246cdfeb34befcc58a7baf | diff --git a/src/Sylius/Bundle/ResourceBundle/AbstractResourceBundle.php b/src/Sylius/Bundle/ResourceBundle/AbstractResourceBundle.php
index <HASH>..<HASH> 100644
--- a/src/Sylius/Bundle/ResourceBundle/AbstractResourceBundle.php
+++ b/src/Sylius/Bundle/ResourceBundle/AbstractResourceBundle.php
@@ -54,7 +54,7 @@ abstract class AbstractResourceBundle extends Bundle implements ResourceBundleIn
case ResourceBundleInterface::MAPPING_YAML:
$container->addCompilerPass($compilerPassClassName::$compilerPassMethod(
[$this->getConfigFilesPath() => $this->getModelNamespace()],
- [sprintf('%s.object_manager', $this->getBundlePrefix())],
+ [$this->getObjectManagerParameter()],
sprintf('%s.driver.%s', $this->getBundlePrefix(), $driver)
));
break;
@@ -147,4 +147,12 @@ abstract class AbstractResourceBundle extends Bundle implements ResourceBundleIn
strtolower($this->getDoctrineMappingDirectory())
);
}
+
+ /**
+ * @return string
+ */
+ protected function getObjectManagerParameter()
+ {
+ return sprintf('%s.object_manager', $this->getBundlePrefix());
+ }
} | add a way to make object manager name consistent | Sylius_Sylius | train | php |
afba798357372357a49068fa29b306b3e228e10f | diff --git a/xeth/xeth.go b/xeth/xeth.go
index <HASH>..<HASH> 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -946,9 +946,9 @@ func (self *XEth) Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceS
if contractCreation {
addr := crypto.CreateAddress(from, nonce)
- glog.V(logger.Info).Infof("Tx(%x) created: %x\n", tx.Hash(), addr)
+ glog.V(logger.Info).Infof("Tx(%s) created: %s\n", signed.Hash().Hex(), addr.Hex())
} else {
- glog.V(logger.Info).Infof("Tx(%x) to: %x\n", tx.Hash(), tx.To())
+ glog.V(logger.Info).Infof("Tx(%s) to: %s\n", signed.Hash().Hex(), tx.To().Hex())
}
return signed.Hash().Hex(), nil | xeth: log signed tx hash | ethereum_go-ethereum | train | go |
29f7792839b7ededb7f603658189a8868775969c | diff --git a/src/edeposit/amqp/storage/structures/templates/db_publication_template.py b/src/edeposit/amqp/storage/structures/templates/db_publication_template.py
index <HASH>..<HASH> 100755
--- a/src/edeposit/amqp/storage/structures/templates/db_publication_template.py
+++ b/src/edeposit/amqp/storage/structures/templates/db_publication_template.py
@@ -24,6 +24,7 @@ from publication import Publication
# !!! DO NOT EDIT THIS FILE - THIS IS GENERATED FILE !!!
# !!! DO NOT EDIT THIS FILE - THIS IS GENERATED FILE !!!
+
class DB{{CLASS_NAME}}(Persistent, KwargsObj):
'''
Database structure used to store basic metadata about Publications.
@@ -64,7 +65,6 @@ class DB{{CLASS_NAME}}(Persistent, KwargsObj):
unpacked_file.seek(0)
return bds.add_file(unpacked_file)
-
@staticmethod
def from_comm(pub):
'''
@@ -85,9 +85,7 @@ class DB{{CLASS_NAME}}(Persistent, KwargsObj):
{{field.name}}=pub.{{field.name}},
% end
-% for field in ONLY_DB_FIELDS:
- {{field.name}}=pub.{{field.name}},
-% end
+ file_pointer=filename
)
def to_comm(self, light_request=False): | #<I>: Fixed few bugs in DBPublication template. | edeposit_edeposit.amqp.storage | train | py |
ca9904be79646f1f53440fcd323536d0ae6fca9b | diff --git a/cmd/shfmt/main.go b/cmd/shfmt/main.go
index <HASH>..<HASH> 100644
--- a/cmd/shfmt/main.go
+++ b/cmd/shfmt/main.go
@@ -48,7 +48,7 @@ var (
in io.Reader = os.Stdin
out io.Writer = os.Stdout
- version = "v2.5.0"
+ version = "v2.6.0"
)
func main() { | all: bump to <I> | mvdan_sh | train | go |
22ccd8c9f3a996b3aae6bd85864c61470d279302 | diff --git a/spec/stylesheet.rb b/spec/stylesheet.rb
index <HASH>..<HASH> 100644
--- a/spec/stylesheet.rb
+++ b/spec/stylesheet.rb
@@ -45,8 +45,8 @@ describe 'stylesheet' do
end
it 'should allow stylesheet setup' do
- # TODO
- 1.should == 1
+ @vc.rmq.stylesheet = StyleSheetForStylesheetTests
+ @vc.rmq.stylesheet.setup_called.should.be.true
end
describe 'getting app and screen size, width, and height' do
@@ -256,6 +256,8 @@ class StyleSheetForStylesheetTests < RubyMotionQuery::Stylesheet
attr_accessor :app_setup_count
end
+ attr_accessor :setup_called
+
def application_setup
font_family = 'Helvetica Neue'
font.add_named :large, font_family, 36
@@ -268,6 +270,7 @@ class StyleSheetForStylesheetTests < RubyMotionQuery::Stylesheet
end
def setup
+ self.setup_called = true
color.add_named :panther_black, color.black
end | Test coverage for stylesheet.setup | infinitered_rmq | train | rb |
1b48e55642ec49a08738a0bbd82fc1a4286b5f52 | diff --git a/main/core/Resources/modules/scaffolding/date/index.js b/main/core/Resources/modules/scaffolding/date/index.js
index <HASH>..<HASH> 100644
--- a/main/core/Resources/modules/scaffolding/date/index.js
+++ b/main/core/Resources/modules/scaffolding/date/index.js
@@ -96,11 +96,11 @@ function apiToDateObject(apiDate) {
/**
* Gets API now value.
- *
+ * @param {boolean} local
* @return {string}
*/
-function now() {
- return moment().utc().format(getApiFormat())
+function now(local = true) {
+ return local ? moment().utc().local().format(getApiFormat()) : moment().utc().format(getApiFormat())
}
function computeElapsedTime(startDate) { | Patch now() for local (#<I>)
Now() currently return UTC time, not local.
Which means time comparaison currently done in React are off by two hours for french local.
Problematic for publication on a given period. | claroline_Distribution | train | js |
9e75ad92eefcc3dced5859a888c09f689a4ab058 | diff --git a/src/test/org/openscience/cdk/smiles/SmilesGeneratorTest.java b/src/test/org/openscience/cdk/smiles/SmilesGeneratorTest.java
index <HASH>..<HASH> 100644
--- a/src/test/org/openscience/cdk/smiles/SmilesGeneratorTest.java
+++ b/src/test/org/openscience/cdk/smiles/SmilesGeneratorTest.java
@@ -277,7 +277,7 @@ public class SmilesGeneratorTest extends CDKTestCase {
mol1 = AtomContainerManipulator.removeHydrogens(mol1);
smiles1 = sg.createSMILES(mol1);
Assert.assertNotNull(smiles1);
- Assert.assertEquals("OC1CCCCC1(O)", smiles1);
+ Assert.assertEquals("OC1CCCCC1O", smiles1);
} | Redundant brackets are not produced. | cdk_cdk | train | java |
25386aa8c84ff34d0742d3287354996e11634f2c | diff --git a/ella/core/box.py b/ella/core/box.py
index <HASH>..<HASH> 100644
--- a/ella/core/box.py
+++ b/ella/core/box.py
@@ -1,4 +1,4 @@
-from django.template import loader, Context
+from django.template import loader
from django.utils.datastructures import MultiValueDict
BOX_INFO = 'ella.core.box.BOX_INFO'
@@ -80,7 +80,11 @@ class Box(object):
media['js'] = media['js'].union(my_media['js'])
media['css'] = media['css'].union(my_media['css'])
- return loader.render_to_string(t_list, self.get_context())
+ t = loader.select_template(t_list)
+ self._context.update(self.get_context())
+ resp = t.render(self._context)
+ self._context.pop()
+ return resp
def get_media(self):
""" | Minor change to boxes to allow access to full context from within a box.
git-svn-id: <URL> | ella_ella | train | py |
669a74d9652f307ea403e46533efcf501ff1b3d5 | diff --git a/lib/flor/unit/storage.rb b/lib/flor/unit/storage.rb
index <HASH>..<HASH> 100644
--- a/lib/flor/unit/storage.rb
+++ b/lib/flor/unit/storage.rb
@@ -127,9 +127,9 @@ module Flor
.select(:exid)
.where(status: 'created')
.order(:ctime)
- .distinct
.all
.collect { |r| r[:exid] }
+ .uniq
end
rescue => err | Do the load_exids distinct flor side with a uniq
avoid MS-SQL and SQLException: ORDER BY items must appear in the select list if SELECT DISTINCT is specified | floraison_flor | train | rb |
35f38d9fa6323a0cee5728cf6a26789a72fef2d5 | diff --git a/biblion/templatetags/biblion_tags.py b/biblion/templatetags/biblion_tags.py
index <HASH>..<HASH> 100644
--- a/biblion/templatetags/biblion_tags.py
+++ b/biblion/templatetags/biblion_tags.py
@@ -56,7 +56,7 @@ class LatestSectionPostNode(template.Node):
post = post[0]
except IndexError:
post = None
- self.context[self.context_var] = post
+ context[self.context_var] = post
return u"" | fixed a little mistake with context in LatestSectionPostNode.render | pinax_pinax-blog | train | py |
5920b7983b5060c71f386b10c3dd48b7cea2d750 | diff --git a/openquake/commonlib/readinput.py b/openquake/commonlib/readinput.py
index <HASH>..<HASH> 100644
--- a/openquake/commonlib/readinput.py
+++ b/openquake/commonlib/readinput.py
@@ -869,7 +869,7 @@ def parallel_split_filter(csm, srcfilter, seed, monitor):
:returns: a new :class:`openquake.commonlib.source.CompositeSourceModel`
"""
mon = monitor('split_filter')
- sample_factor = 0 # disabled, turn it on manually when debugging
+ sample_factor = float(os.environ.get('OQ_SAMPLE_SOURCES', 0))
logging.info('Splitting/filtering sources with %s',
srcfilter.__class__.__name__)
sources = csm.get_sources() | Restored OQ_SAMPLE_SOURCES in split_filter [skip CI]
Former-commit-id: <I>d9d<I>a7bde3e4c<I>df<I>ccf<I>f0f<I>c<I> | gem_oq-engine | train | py |
57fc3f20c8bf44e8ce8476b1c4fa1b4c420e290c | diff --git a/code/test_png.py b/code/test_png.py
index <HASH>..<HASH> 100644
--- a/code/test_png.py
+++ b/code/test_png.py
@@ -14,12 +14,6 @@
# If you have nose installed you can use that:
# nosetests .
-# (For an in-memory binary file IO object) We use BytesIO where
-# available, otherwise we use StringIO, but name it BytesIO.
-try:
- from io import BytesIO
-except ImportError:
- from StringIO import StringIO as BytesIO
import itertools
import struct
import sys
@@ -28,6 +22,7 @@ import unittest
import zlib
from array import array
+from io import BytesIO
import png
import pngsuite | Use io.BytesIO unconditionally | drj11_pypng | train | py |
d183af143d00345e9bd7f28f636c60dae0034844 | diff --git a/tap.go b/tap.go
index <HASH>..<HASH> 100644
--- a/tap.go
+++ b/tap.go
@@ -30,6 +30,7 @@ func (b *Bucket) StartTapFeed(args *memcached.TapArguments) (*TapFeed, error) {
return nil, err
}
feed.feeds = append(feed.feeds, singleFeed)
+ feed.waiters.Add(1)
go feed.forwardTapEvents(singleFeed.C)
}
go feed.closeWhenDone()
@@ -41,7 +42,6 @@ func (b *Bucket) StartTapFeed(args *memcached.TapArguments) (*TapFeed, error) {
// Goroutine that forwards Tap events from a single node's feed to the aggregate feed.
func (feed *TapFeed) forwardTapEvents(singleFeed <-chan memcached.TapEvent) {
- feed.waiters.Add(1)
defer feed.waiters.Done()
for {
if event, ok := <-singleFeed; ok { | Fixed a race condition initializing a TapFeed
Occasionally you could get a "write to closed channel" panic on startup
due to misuse of the sync.Waiter API. | couchbase_go-couchbase | train | go |
71d7cec56bc570f3eb5433fd9406312ffba21aea | diff --git a/km3pipe/utils/qrunprocessor.py b/km3pipe/utils/qrunprocessor.py
index <HASH>..<HASH> 100644
--- a/km3pipe/utils/qrunprocessor.py
+++ b/km3pipe/utils/qrunprocessor.py
@@ -113,7 +113,7 @@ def main():
for job_id, file_chunk in enumerate(chunks(rem_files, FILES_PER_JOB)):
n_files = len(file_chunk)
s.add("echo Creating run summary for {} files".format(n_files))
- s.add("cd $TMPDIR; mkdir -p $USER; cd $USER")
+ # s.add("cd $TMPDIR; mkdir -p $USER; cd $USER")
s.add("echo")
for ipath in file_chunk:
@@ -121,6 +121,7 @@ def main():
s.separator(' ')
s.separator('=')
s.echo("Processing {}:".format(fname))
+ s.add('pwd')
s.iget(ipath)
s.add('ls -al {}'.format(fname))
s.add('JPrintTree -f {}'.format(fname)) | Don't use tmp dir | tamasgal_km3pipe | train | py |
e58161fedcb8718c3880eb1778e29468e4cb72bd | diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go
index <HASH>..<HASH> 100644
--- a/integration-cli/docker_cli_run_test.go
+++ b/integration-cli/docker_cli_run_test.go
@@ -3179,6 +3179,13 @@ func (s *DockerSuite) TestRunUnshareProc(c *check.C) {
if out, _, err := runCommandWithOutput(runCmd); err == nil || !strings.Contains(out, "Permission denied") {
c.Fatalf("unshare should have failed with permission denied, got: %s, %v", out, err)
}
+
+ /* Ensure still fails if running privileged with the default policy */
+ name = "crashoverride"
+ runCmd = exec.Command(dockerBinary, "run", "--privileged", "--security-opt", "apparmor:docker-default", "--name", name, "jess/unshare", "unshare", "-p", "-m", "-f", "-r", "mount", "-t", "proc", "none", "/proc")
+ if out, _, err := runCommandWithOutput(runCmd); err == nil || !strings.Contains(out, "Permission denied") {
+ c.Fatalf("unshare should have failed with permission denied, got: %s, %v", out, err)
+ }
}
func (s *DockerSuite) TestRunPublishPort(c *check.C) { | Expand unshare test to include privileged test
This ensures that AppArmor, not other mechanisms used
by Docker or the kernel is restricting the mount. | moby_moby | train | go |
97953b1ae0dc705b48bc989d526525b6b6ba3052 | diff --git a/presto-iceberg/src/test/java/com/facebook/presto/iceberg/TestIcebergDistributed.java b/presto-iceberg/src/test/java/com/facebook/presto/iceberg/TestIcebergDistributed.java
index <HASH>..<HASH> 100644
--- a/presto-iceberg/src/test/java/com/facebook/presto/iceberg/TestIcebergDistributed.java
+++ b/presto-iceberg/src/test/java/com/facebook/presto/iceberg/TestIcebergDistributed.java
@@ -14,6 +14,7 @@
package com.facebook.presto.iceberg;
import com.facebook.presto.testing.MaterializedResult;
+import com.facebook.presto.testing.QueryRunner;
import com.facebook.presto.tests.AbstractTestDistributedQueries;
import com.google.common.collect.ImmutableMap;
import org.testng.annotations.Test;
@@ -26,9 +27,11 @@ import static com.facebook.presto.testing.assertions.Assert.assertEquals;
public class TestIcebergDistributed
extends AbstractTestDistributedQueries
{
- public TestIcebergDistributed()
+ @Override
+ protected QueryRunner createQueryRunner()
+ throws Exception
{
- super(() -> IcebergQueryRunner.createIcebergQueryRunner(ImmutableMap.of()));
+ return IcebergQueryRunner.createIcebergQueryRunner(ImmutableMap.of());
}
@Override | Adjust the test change of AbstractTestDistributedQueries | prestodb_presto | train | java |
8e58edad6312a4e34ab22ff436bc641a87086f3a | diff --git a/vex/config.py b/vex/config.py
index <HASH>..<HASH> 100644
--- a/vex/config.py
+++ b/vex/config.py
@@ -102,8 +102,9 @@ class Vexrc(object):
if not home:
return ''
ve_base = os.path.join(home, '.virtualenvs')
- if not os.path.exists(ve_base) or os.path.isfile(ve_base):
- return ''
+ # pass through invalid paths so messages can be generated
+ # if not os.path.exists(ve_base) or os.path.isfile(ve_base):
+ # return ''
return ve_base or ''
def get_shell(self, environ):
diff --git a/vex/main.py b/vex/main.py
index <HASH>..<HASH> 100644
--- a/vex/main.py
+++ b/vex/main.py
@@ -177,6 +177,7 @@ def get_virtualenv_path(options, vexrc, environ):
"could not figure out a virtualenvs directory. "
"make sure $HOME is set, or $WORKON_HOME,"
" or set virtualenvs=something in your .vexrc")
+ # Using this requires get_ve_base to pass through nonexistent dirs
if not os.path.exists(ve_base):
raise NoVirtualenvsDirectory(
"virtualenvs directory {0!r} not found.".format(ve_base)) | let get_ve_base pass through absent paths for error message generation | sashahart_vex | train | py,py |
6f73a67c604339d7d639aba2800ef83d4e94dd35 | diff --git a/dvc/version.py b/dvc/version.py
index <HASH>..<HASH> 100644
--- a/dvc/version.py
+++ b/dvc/version.py
@@ -7,7 +7,7 @@ import os
import subprocess
-_BASE_VERSION = "0.93.0"
+_BASE_VERSION = "1.0.0a0"
def _generate_version(base_version): | dvc: bump to <I>a0 | iterative_dvc | train | py |
ffd9e29a313ad2972e0564922bcf007e16394453 | diff --git a/media.go b/media.go
index <HASH>..<HASH> 100644
--- a/media.go
+++ b/media.go
@@ -92,6 +92,8 @@ type Item struct {
StorySliders []interface{} `json:"story_sliders"`
StoryQuestions []interface{} `json:"story_questions"`
StoryProductItems []interface{} `json:"story_product_items"`
+ StoryCTA []interface{} `json:"story_cta"`
+ ReelMentions []interface{} `json:"reel_mentions"`
SupportsReelReactions bool `json:"supports_reel_reactions"`
ShowOneTapFbShareTooltip bool `json:"show_one_tap_fb_share_tooltip"`
HasSharedToFb int64 `json:"has_shared_to_fb"` | Stories: add CTA and reelMentions (#<I>) | ahmdrz_goinsta | train | go |
3104c588f7810165e50c31d08078da009e35060c | diff --git a/lib/travis/mailer.rb b/lib/travis/mailer.rb
index <HASH>..<HASH> 100644
--- a/lib/travis/mailer.rb
+++ b/lib/travis/mailer.rb
@@ -2,7 +2,6 @@ require 'action_mailer'
require 'i18n'
require 'pathname'
require 'postmark-rails'
-require 'hpricot' # so that premailer uses it
module Travis
module Mailer
diff --git a/script/premailer.rb b/script/premailer.rb
index <HASH>..<HASH> 100644
--- a/script/premailer.rb
+++ b/script/premailer.rb
@@ -1,4 +1,5 @@
require 'premailer'
+require 'hpricot' # so that premailer uses it
require 'base64'
require 'rack'
diff --git a/travis-core.gemspec b/travis-core.gemspec
index <HASH>..<HASH> 100644
--- a/travis-core.gemspec
+++ b/travis-core.gemspec
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
s.add_dependency 'activerecord', '~> 3.1.2'
s.add_dependency 'actionmailer', '~> 3.1.2'
s.add_dependency 'railties', '~> 3.1.2'
- s.add_dependency 'hpricot', '~> 0.8.4'
s.add_dependency 'postmark-rails', '~> 0.4.1'
# db | no need to install hpricot as we now inline css manually :/ | travis-ci_travis-core | train | rb,rb,gemspec |
6378d3829dc735d2536f19e29597d93eb7421c46 | diff --git a/core/src/main/java/org/bitcoinj/core/LegacyAddress.java b/core/src/main/java/org/bitcoinj/core/LegacyAddress.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/bitcoinj/core/LegacyAddress.java
+++ b/core/src/main/java/org/bitcoinj/core/LegacyAddress.java
@@ -53,7 +53,7 @@ public class LegacyAddress extends Address {
/**
* Private constructor. Use {@link #fromBase58(NetworkParameters, String)},
- * {@link #fromPubKeyHash(NetworkParameters, byte[])}, {@link #fromP2SHHash(NetworkParameters, byte[])} or
+ * {@link #fromPubKeyHash(NetworkParameters, byte[])}, {@link #fromScriptHash(NetworkParameters, byte[])} or
* {@link #fromKey(NetworkParameters, ECKey)}.
*
* @param params | LegacyAddress: Update outdated JavaDoc reference.
It suggests using a deprecated method. | bitcoinj_bitcoinj | train | java |
e0aac2a841b0abf9e0e0aec01199eb2734853872 | diff --git a/mocha.js b/mocha.js
index <HASH>..<HASH> 100644
--- a/mocha.js
+++ b/mocha.js
@@ -21,7 +21,7 @@ function addTest(file) {
fs.readdirSync(testDir).filter(function(file) {
if (fs.statSync(path.join(testDir, file)).isDirectory()) {
directories.push(path.join(testDir, file));
- } else if (file.substr(-7) === 'test.js') {
+ } else if (isTest(file)) {
mocha.addFile(path.join(testDir, file));
}
});
@@ -31,7 +31,7 @@ var ndx;
for (ndx in directories) {
if (directories[ndx] !== undefined) {
dir = directories[ndx];
- fs.readdirSync(directories[ndx]).filter(isTest)
+ fs.readdirSync(dir).filter(isTest)
.forEach(addTest);
}
} | made better use of custom callback isTest and global var dir | apigee-127_swagger-test-templates | train | js |
eefc4eac5536302aaabd91cac62fff802775e33f | diff --git a/integration-tests/spec/feature_demo_spec.rb b/integration-tests/spec/feature_demo_spec.rb
index <HASH>..<HASH> 100644
--- a/integration-tests/spec/feature_demo_spec.rb
+++ b/integration-tests/spec/feature_demo_spec.rb
@@ -27,7 +27,7 @@ feature "feature demo app" do
it 'should work for sockjs demo' do
visit "/sockjs.html"
- page.should have_content('message "Welcome!"')
+ page.should have_content('[*] open')
page.execute_script("inp.val('foobarbaz');form.submit();")
page.should have_content('message "foobarbaz"')
end | Look for the sockjs connection to open instead of first message in the feature demo spec | torquebox_torquebox | train | rb |
0e037358fe7e2b0f1c6b2942e1e2829c95dfb886 | diff --git a/lib/generators/simple_form/templates/config/initializers/simple_form.rb b/lib/generators/simple_form/templates/config/initializers/simple_form.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/simple_form/templates/config/initializers/simple_form.rb
+++ b/lib/generators/simple_form/templates/config/initializers/simple_form.rb
@@ -76,4 +76,7 @@ SimpleForm.setup do |config|
# When false, do not use translations for labels, hints or placeholders.
# config.translate = true
+
+ # Default class for buttons
+ # config.button_class = 'button'
end | Add the #button_class directive on the generated initializer | plataformatec_simple_form | train | rb |
c53eb565753df9fcc643852f2b93edb7a59f31d2 | diff --git a/uri_parser.js b/uri_parser.js
index <HASH>..<HASH> 100644
--- a/uri_parser.js
+++ b/uri_parser.js
@@ -190,6 +190,13 @@ function parseConnectionString(uri, options, callback) {
if (typeof options === 'function') (callback = options), (options = {});
options = options || {};
+ // Check for bad uris before we parse
+ try {
+ URL.parse(uri);
+ } catch (e) {
+ return callback(new MongoParseError('URI malformed, cannot be parsed'));
+ }
+
const cap = uri.match(HOSTS_RX);
if (!cap) {
return callback(new MongoParseError('Invalid connection string')); | tests(connection string): update to latest from specifications (#<I>)
Fixes NODE-<I> | mongodb_node-mongodb-native | train | js |
4344139753e7aafb66024d682e3721cadb8877d4 | diff --git a/src/main/java/de/undercouch/gradle/tasks/download/DownloadAction.java b/src/main/java/de/undercouch/gradle/tasks/download/DownloadAction.java
index <HASH>..<HASH> 100644
--- a/src/main/java/de/undercouch/gradle/tasks/download/DownloadAction.java
+++ b/src/main/java/de/undercouch/gradle/tasks/download/DownloadAction.java
@@ -439,7 +439,10 @@ public class DownloadAction implements DownloadSpec {
@Override
public void headers(Map<String, String> headers) {
- this.headers = headers;
+ if (headers == null) {
+ headers = new LinkedHashMap<String, String>();
+ }
+ this.headers.putAll(headers);
}
@Override | Allow multiple calls to header() and headers() | michel-kraemer_gradle-download-task | train | java |
5f373e9e23032d5762903b0dafd02d3b34cf7476 | diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/StringSplitterTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/StringSplitterTest.java
index <HASH>..<HASH> 100644
--- a/core/src/test/java/com/google/errorprone/bugpatterns/StringSplitterTest.java
+++ b/core/src/test/java/com/google/errorprone/bugpatterns/StringSplitterTest.java
@@ -208,4 +208,29 @@ public class StringSplitterTest {
"}")
.doTest(TestMode.TEXT_MATCH);
}
+
+ // regression test for b/72088500
+ @Test
+ public void b72088500() throws IOException {
+ testHelper
+ .addInputLines(
+ "in/Test.java",
+ "class Test {",
+ " void f(String input) {",
+ " String[] lines = input.split(\"\\\\r?\\\\n\");",
+ " System.err.println(lines[0]);",
+ " }",
+ "}")
+ .addOutputLines(
+ "out/Test.java",
+ "import com.google.common.base.Splitter;",
+ "import java.util.List;",
+ "class Test {",
+ " void f(String input) {",
+ " List<String> lines = Splitter.onPattern(\"\\\\r?\\\\n\").splitToList(input);",
+ " System.err.println(lines.get(0));",
+ " }",
+ "}")
+ .doTest();
+ }
} | Add a regression test for StringSplitter
This was fixed by f<I>cb8d<I>bcd<I>a2f<I>cd8cfc2bfe5ba<I>
RELNOTES: N/A
-------------
Created by MOE: <URL> | google_error-prone | train | java |
3be13b29ff524b253b94a88815dc1e4b148973e6 | diff --git a/test/conf.js b/test/conf.js
index <HASH>..<HASH> 100644
--- a/test/conf.js
+++ b/test/conf.js
@@ -1,5 +1,5 @@
exports.config = {
- allScriptsTimeout: 11000,
+ allScriptsTimeout: 110000,
jasmineNodeOpts: {
defaultTimeoutInterval: 100000
}, | Try to fix travis build with an increase in timeout | assisrafael_angular-input-masks | train | js |
141e6e05fa471eac5839bb1db68f0ced621e4f71 | diff --git a/lib/airbrake-api.rb b/lib/airbrake-api.rb
index <HASH>..<HASH> 100644
--- a/lib/airbrake-api.rb
+++ b/lib/airbrake-api.rb
@@ -21,6 +21,12 @@ module AirbrakeAPI
secure ? "https" : "http"
end
+ def reset
+ @account = nil
+ @auth_token = nil
+ @secure = false
+ end
+
end
require 'airbrake-api/core_extensions'
diff --git a/spec/airbrake_api_spec.rb b/spec/airbrake_api_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/airbrake_api_spec.rb
+++ b/spec/airbrake_api_spec.rb
@@ -4,9 +4,7 @@ describe AirbrakeAPI do
context "configuration" do
before(:each) do
- AirbrakeAPI.account = nil
- AirbrakeAPI.auth_token = nil
- AirbrakeAPI.secure = false
+ AirbrakeAPI.reset
end
it "should allow setting of the account" do | added .reset method to clear out configuration | stve_airbrake-api | train | rb,rb |
07bfbbea8fc65b57d41409e824e4193851f104c4 | diff --git a/src/main.js b/src/main.js
index <HASH>..<HASH> 100644
--- a/src/main.js
+++ b/src/main.js
@@ -84,17 +84,13 @@ export function typeaheadSimilarity(a: string, b: string): number {
[a, b] = [b, a];
}
- // Early exit if `a` startsWith `b`; these will be scored higher than any
+ // Early exit if `a` includes `b`; these will be scored higher than any
// other options with the same `b` (filter string), with a preference for
// shorter `a` strings (option labels).
- if (a.indexOf(b) === 0) {
+ if (a.indexOf(b) !== -1) {
return bLength + 1 / aLength;
}
- // TODO(riley): It would be nice if subsequence *proximity* was factored
- // in. For example, a filter string of "AL" should match
- // "wALnut grove" before it matches "wAtsonviLle"
-
// Initialize the table axes:
//
// 0 0 0 0 ... bLength | Preferential match included strings
It can be tricky, with the current fuzzy matching, to do non-fuzzy
sorting. For example, searching a bank of components for 'icon'
will find many results, very few of which are the ones you want.
Preferential treatment was given for finding strings that started
with a given string; this PR extends that preference for any
substring, regardless of its position in the target. | Khan_fuzzy-match-utils | train | js |
ea9c457991ed70112dbe217bfe0cc0b1afeed8c4 | diff --git a/test/benchmarks/isometry.py b/test/benchmarks/isometry.py
index <HASH>..<HASH> 100644
--- a/test/benchmarks/isometry.py
+++ b/test/benchmarks/isometry.py
@@ -46,3 +46,13 @@ class IsometryTranspileBench:
counts = circuit.count_ops()
cnot_count = counts.get('cx', 0)
return cnot_count
+
+ def track_cnot_counts_after_mapping_to_ibmq_16_melbourne(self, *unused):
+ coupling = [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4],
+ [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10],
+ [11, 3], [11, 10], [11, 12], [12, 2], [13, 1], [13, 12]]
+ circuit = transpile(self.circuit, basis_gates=['u1', 'u3', 'u2', 'cx'],
+ coupling_map=coupling, seed_transpiler=0)
+ counts = circuit.count_ops()
+ cnot_count = counts.get('cx', 0)
+ return cnot_count | Add a test to track mapper's performance on CNOT count (#<I>)
Add a test case for tracking CNOT count after mapping to IBM Q <I> Melbourne
using isometry circuits so that we can track the quality of mappings by default
pass manager.
* Add a bench to track mapper's cnot count performance
* lint | Qiskit_qiskit | train | py |
ad340702bdca4c80efc13d48ebf1684eaec851c0 | diff --git a/src/lib/Supra/Controller/Pages/BlockController.php b/src/lib/Supra/Controller/Pages/BlockController.php
index <HASH>..<HASH> 100644
--- a/src/lib/Supra/Controller/Pages/BlockController.php
+++ b/src/lib/Supra/Controller/Pages/BlockController.php
@@ -89,7 +89,7 @@ abstract class BlockController extends ControllerAbstraction
$this->setPage($page);
}
- $blockClass = $this->getBlock()->getComponentName();
+ $blockClass = $this->getBlock()->getComponentClass();
$configuration = ObjectRepository::getComponentConfiguration($blockClass);
if ( ! empty($configuration)) { | Task #<I> Only one (unique) block can be added to page | sitesupra_sitesupra | train | php |
541b67989f92bcaa0a4ec67807892f69299e1cf0 | diff --git a/strategyFunctions/kubeServices.js b/strategyFunctions/kubeServices.js
index <HASH>..<HASH> 100644
--- a/strategyFunctions/kubeServices.js
+++ b/strategyFunctions/kubeServices.js
@@ -438,10 +438,10 @@ var engine = {
}
function checkAutoscaler(options, cb) {
- if(options.params.autoscale && Object.keys(options.params.autoscale).length > 0) {
+ if(options.params.autoScale && Object.keys(options.params.autoScale).length > 0) {
let name = cleanLabel(options.params.name);
let type = options.params.type; //deployment or daemonset
- options.params = options.params.autoscale;
+ options.params = options.params.autoScale;
options.params.id = name;
options.params.type = type;
return autoscaler.createAutoscaler(options, cb); | Renamed autoscale object to autoScale | soajs_soajs.core.drivers | train | js |
27c3d884f7dfc0301d4ed282b10455026226e918 | diff --git a/lib/daru/vector.rb b/lib/daru/vector.rb
index <HASH>..<HASH> 100644
--- a/lib/daru/vector.rb
+++ b/lib/daru/vector.rb
@@ -474,6 +474,11 @@ module Daru
self[start..(size-1)]
end
+ def last q=1
+ # The Enumerable mixin dose not provide the last method.
+ tail(q)
+ end
+
def empty?
@index.empty?
end
diff --git a/spec/vector_spec.rb b/spec/vector_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/vector_spec.rb
+++ b/spec/vector_spec.rb
@@ -850,6 +850,24 @@ describe Daru::Vector do
end
end
+ context '#last' do
+ subject(:vector) do
+ Daru::Vector.new (1..20).to_a, dtype: dtype
+ end
+
+ it 'takes 1 by default' do
+ expect(vector.last).to eq 20
+ end
+
+ it 'takes num if provided' do
+ expect(vector.last(3)).to eq Daru::Vector.new (18..20).to_a, index: (17..19).to_a
+ end
+
+ it 'does not fail on too large num' do
+ expect(vector.last(3000)).to eq vector
+ end
+ end
+
context "#concat" do
before :each do
@dv = Daru::Vector.new [1,2,3,4,5], name: :yoga, | Add last for vector (#<I>) | SciRuby_daru | train | rb,rb |
5b6c07fcf3df9cfccd4097c088cfbfaa427419d5 | diff --git a/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/common/Constants.java b/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/common/Constants.java
index <HASH>..<HASH> 100644
--- a/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/common/Constants.java
+++ b/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/common/Constants.java
@@ -271,7 +271,7 @@ public final class Constants {
= "Remote host closed the connection without sending inbound response";
public static final String MAXIMUM_WAIT_TIME_EXCEED =
- "Maximum wait time exceeds. Cannot obtain a connection to send the request.";
+ "Cannot obtain a connection within maximum wait time";
public static final String JMX_AGENT_NAME = "jmx.agent.name"; | Change the constant value to make more sense | wso2_transport-http | train | java |
02a5650a8f418161bc92a03eaea7838cc57d8a08 | diff --git a/src/genfun.js b/src/genfun.js
index <HASH>..<HASH> 100644
--- a/src/genfun.js
+++ b/src/genfun.js
@@ -14,7 +14,7 @@ module.exports = Genfun;
* applied, and receives the expected binding for `this` when appropriate.
*
* @constructor
- * @param {object} opts - Options used when initializing the genfun.
+ * @param {object} [opts] - Options used when initializing the genfun.
* @returns {function} New generic function.
*/
function Genfun(opts) {
@@ -41,7 +41,7 @@ Genfun.MAX_CACHE_SIZE = 32; // Can't inline, so the cache will need to be bigger
*
* @function
* @param {Genfun} genfun - Genfun instance to add the method to.
- * @param {array-like} participants - Objects to dispatch this method on.
+ * @param {Array} participants - Objects to dispatch this method on.
* @param {function} methodFunction - Function to execute when the method
* successfully dispatches.
*/ | Tweaking typedefs in docs | zkat_genfun | train | js |
3b47195bfd594b80958560a988e72a4018c49507 | diff --git a/ns_api/ns_api.py b/ns_api/ns_api.py
index <HASH>..<HASH> 100644
--- a/ns_api/ns_api.py
+++ b/ns_api/ns_api.py
@@ -130,6 +130,19 @@ def list_same(list_a, list_b):
return result
+def list_merge(list_a, list_b):
+ """
+ Merge two lists without duplicating items
+
+ Args:
+ list_a: list
+ list_b: list
+ Returns:
+ New list with deduplicated items from list_a and list_b
+ """
+ return list(collections.OrderedDict.fromkeys(list_a + list_b))
+
+
## NS API objects
class BaseObject(object): | list_merge for deduplicated merge of 2 lists | aquatix_ns-api | train | py |
17847fd733cd365193ae23d259e3d91121cc346a | diff --git a/openquake/commonlib/calculators/base.py b/openquake/commonlib/calculators/base.py
index <HASH>..<HASH> 100644
--- a/openquake/commonlib/calculators/base.py
+++ b/openquake/commonlib/calculators/base.py
@@ -52,7 +52,7 @@ def persistent_attribute(name):
return self.datastore[name]
except IOError:
if self.precalc:
- return self.precalc.datastore[name]
+ return getattr(self.precalc, name)
else:
raise
diff --git a/openquake/commonlib/calculators/event_based.py b/openquake/commonlib/calculators/event_based.py
index <HASH>..<HASH> 100644
--- a/openquake/commonlib/calculators/event_based.py
+++ b/openquake/commonlib/calculators/event_based.py
@@ -437,8 +437,6 @@ class EventBasedCalculator(ClassicalCalculator):
hcalc = self.precalc
ruptures_by_trt = hcalc.datastore['ruptures_by_trt']
self.composite_source_model = hcalc.composite_source_model
- self.sitecol = hcalc.sitecol
- self.rlzs_assoc = hcalc.rlzs_assoc
self.sesruptures = sorted(sum(ruptures_by_trt.itervalues(), []),
key=operator.attrgetter('tag'))
self.saved = AccumDict() | Recursive search in the datastore | gem_oq-engine | train | py,py |
d1465df44bc9c1b4c2c945a94ae378c630748f3f | diff --git a/housekeeper/compile/core.py b/housekeeper/compile/core.py
index <HASH>..<HASH> 100644
--- a/housekeeper/compile/core.py
+++ b/housekeeper/compile/core.py
@@ -66,7 +66,7 @@ def encrypt_run(run_obj):
compilation_path = asset.path
- new_asset = api.add_asset(run_obj, compilation_path, asset.category)
+ new_asset = api.add_asset(run_obj, archive_path, asset.category)
new_asset.path = archive_path
new_asset.checksum = checksum(archive_path)
run_obj.assets.append(new_asset)
diff --git a/housekeeper/store/models.py b/housekeeper/store/models.py
index <HASH>..<HASH> 100644
--- a/housekeeper/store/models.py
+++ b/housekeeper/store/models.py
@@ -134,7 +134,7 @@ class Asset(Model):
sample_id = Column(types.Integer, ForeignKey('sample.id'))
def basename(self):
- return path(self.path).basename()
+ return path(self.original_path).basename()
class Archive(Model): | Fix original_path points to path for new gpg Asset
So we can have a basename of original_path. | Clinical-Genomics_housekeeper | train | py,py |
bad7cc2e54a86f6cdfc1f73a0902f55f8e65c1ae | diff --git a/Kwc/Abstract/Image/ImageFile.php b/Kwc/Abstract/Image/ImageFile.php
index <HASH>..<HASH> 100644
--- a/Kwc/Abstract/Image/ImageFile.php
+++ b/Kwc/Abstract/Image/ImageFile.php
@@ -12,9 +12,13 @@ class Kwc_Abstract_Image_ImageFile extends Kwf_Form_Field_File
{
$ret = parent::load($row, $postData);
$component = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($row->component_id, array('ignoreVisible' => true));
- if ($component) {
- //component can be non-existent if it's in a not selected card
- $ret[$this->getFieldName()]['contentWidth'] = $component->getComponent()->getMaxContentWidth();
+ if ($component) { //component can be non-existent if it's in a not selected card
+ if (is_instance_of($component->componentClass, 'Kwc_Abstract_Image_Component')) {
+ $contentWidth = $component->getComponent()->getMaxContentWidth();
+ } else {
+ $contentWidth = $component->getComponent()->getContentWidth();
+ }
+ $ret[$this->getFieldName()]['contentWidth'] = $contentWidth;
}
return $ret;
} | Get content width correctly even when selected component is not an image component | koala-framework_koala-framework | train | php |
7625b351332e041f56513d845490714e9e162586 | diff --git a/src/main/java/com/couchbase/lite/store/ForestDBStore.java b/src/main/java/com/couchbase/lite/store/ForestDBStore.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/couchbase/lite/store/ForestDBStore.java
+++ b/src/main/java/com/couchbase/lite/store/ForestDBStore.java
@@ -941,7 +941,7 @@ public class ForestDBStore implements Store, EncryptableStore, Constants {
if (json == null)
throw new CouchbaseLiteException(Status.BAD_JSON);
- final RevisionInternal rev = inRev;
+ final RevisionInternal rev = inRev.copy();
final List<String> history = inHistory;
final URL source = inSource; | Fixed #<I> - Add public API to add an existing revision (AKA new_edits=false, or -forceInsert:)
- Make `forceIncert()`method behavior same between ForestDB and SQLte. | couchbaselabs_couchbase-lite-java-forestdb | train | java |
97801a12ba4a0534feadceb7b5c767e185eb2b90 | diff --git a/src/python/pants/backend/go/subsystems/golang.py b/src/python/pants/backend/go/subsystems/golang.py
index <HASH>..<HASH> 100644
--- a/src/python/pants/backend/go/subsystems/golang.py
+++ b/src/python/pants/backend/go/subsystems/golang.py
@@ -157,7 +157,7 @@ async def setup_goroot(golang_subsystem: GolangSubsystem) -> GoRoot:
bulleted_list_sep = "\n * "
invalid_versions_str = bulleted_list_sep.join(
- f"{path}, {version}" for path, version in sorted(invalid_versions)
+ f"{path}: {version}" for path, version in sorted(invalid_versions)
)
raise BinaryNotFoundError(
"Cannot find a `go` binary with the expected version of " | [internal] go: use colon to separate binary name and version (#<I>)
Use a colon to separate binary names and their versions.
[ci skip-rust]
[ci skip-build-wheels] | pantsbuild_pants | train | py |
f52f2302126c2e433c5da5acf0e504eee131ebee | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -10,7 +10,7 @@ function normalize(filepath) {
filepath = path.resolve(path.dirname(module.parent.filename), filepath);
// tack .json on the end if need be
- if (!/.json$/.test(filepath))
+ if (!/\.json$/.test(filepath))
filepath = filepath + '.json';
return filepath; | fixing a problem with the filepath detector | weisjohn_jsonload | train | js |
8f7f9df910d82e4df1cb835caa5a524952ccc9fb | diff --git a/grace.go b/grace.go
index <HASH>..<HASH> 100644
--- a/grace.go
+++ b/grace.go
@@ -135,11 +135,16 @@ func (l *listener) Accept() (net.Conn, error) {
}
return nil, err
}
- l.counter <- inc
- return conn{
- Conn: c,
- counter: l.counter,
- }, nil
+ select {
+ case <-l.allClosed:
+ c.Close()
+ return nil, ErrAlreadyClosed
+ case l.counter <- inc:
+ return conn{
+ Conn: c,
+ counter: l.counter,
+ }, nil
+ }
}
panic("not reached")
} | drop connections that come in between a close and an accept race
this is bad, but worse is the current logic which can sometimes hit a
nil counter channel. | facebookarchive_grace | train | go |
05e53d4368ef92521ad35ac79b24c8d185cf9adf | diff --git a/libraries/mako/Mako.php b/libraries/mako/Mako.php
index <HASH>..<HASH> 100644
--- a/libraries/mako/Mako.php
+++ b/libraries/mako/Mako.php
@@ -10,6 +10,7 @@ namespace mako
use \mako\Response;
use \Exception;
use \ErrorException;
+ use \RuntimeException;
use \ArrayObject;
/** | Added missing "use" in Mako.php | mako-framework_framework | train | php |
fc757f7fbfb6eb00df17424f349b65fda95ca65a | diff --git a/js/cobinhood.js b/js/cobinhood.js
index <HASH>..<HASH> 100644
--- a/js/cobinhood.js
+++ b/js/cobinhood.js
@@ -851,10 +851,7 @@ module.exports = class cobinhood extends Exchange {
}
}
}
- const exceptions = this.exceptions;
- if (errorCode in exceptions) {
- throw new exceptions[errorCode] (feedback);
- }
+ this.throwExactlyMatchedException (this.exceptions, errorCode, feedback);
throw new ExchangeError (feedback);
} | cobinhood throwExactlyMatchedException | ccxt_ccxt | train | js |
8bc7787afabc468d06b5b412460c4f6f3a0a0009 | diff --git a/eulfedora/indexdata/views.py b/eulfedora/indexdata/views.py
index <HASH>..<HASH> 100644
--- a/eulfedora/indexdata/views.py
+++ b/eulfedora/indexdata/views.py
@@ -56,7 +56,7 @@ from django.http import HttpResponse, Http404, HttpResponseForbidden, \
HttpResponseBadRequest
from eulfedora.models import DigitalObject
-from eulfedora.server import Repository
+from eulfedora.server import TypeInferringRepository
from eulfedora.util import RequestFailed
@@ -94,10 +94,11 @@ def index_config(request):
return HttpResponse(json_response, content_type='application/json')
-def index_data(request, id):
+def index_data(request, id, repo=None):
'Return the fields and values to be indexed for a single object as JSON'
+ if repo is None:
+ repo = TypeInferringRepository()
try:
- repo = Repository()
# TODO: need a generic method to init by cmodel using DigitalObject defined_types
obj = repo.get_object(id)
return HttpResponse(simplejson.dumps(obj.index_data()), | use TypeInferringRepository in indexdata.views.index_data, and allow explicit repo arg for projects that need even more flexibility. enables that view to honor subclass overrides of DigitalObject.index_data | emory-libraries_eulfedora | train | py |
73db39fe2da41774f237c95e0e689a6168ab983a | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -34,7 +34,7 @@ def read(f):
return open(os.path.join(os.path.dirname(__file__), f)).read().strip()
-install_requires = ['aiohttp>=3.2.0', 'jinja2>=2.7']
+install_requires = ['aiohttp>=3.2.0', 'jinja2>=2.10.1']
setup(name='aiohttp-jinja2',
@@ -49,6 +49,7 @@ setup(name='aiohttp-jinja2',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
'Development Status :: 5 - Production/Stable',
'Topic :: Internet :: WWW/HTTP',
'Framework :: AsyncIO', | Pin jinja2 to security safe version | aio-libs_aiohttp-jinja2 | train | py |
5200ad59c9e4e182eb143a4b1f94d9d1d9942fa5 | diff --git a/sphinxcontrib/soliditydomain/domain.py b/sphinxcontrib/soliditydomain/domain.py
index <HASH>..<HASH> 100644
--- a/sphinxcontrib/soliditydomain/domain.py
+++ b/sphinxcontrib/soliditydomain/domain.py
@@ -99,7 +99,7 @@ class SolidityTypeLike(SolidityObject):
param_var_re = re.compile(
- r'''\s* ( [\w\s\[\]\(\)=>]+? ) # type
+ r'''\s* ( [\w\s\[\]\(\)=>\.]+? ) # type
(?: \s* \b (
public | private | internal |
storage | memory | | Allow handling inner enums of libraries as types | cag_sphinxcontrib-soliditydomain | train | py |
1fe03897f15aac0282d09716d18a82a8f48446a2 | diff --git a/holoviews/element/annotation.py b/holoviews/element/annotation.py
index <HASH>..<HASH> 100644
--- a/holoviews/element/annotation.py
+++ b/holoviews/element/annotation.py
@@ -257,16 +257,17 @@ class Text(Annotation):
class Div(Element):
"""
- The Div element represents a div DOM node in an HTML document.
+ The Div element represents a div DOM node in an HTML document defined
+ as a string containing valid HTML.
"""
group = param.String(default='Div', constant=True)
- def __init__(self, html, **params):
- if not isinstance(html, basestring):
+ def __init__(self, data, **params):
+ if not isinstance(data, basestring):
raise ValueError("Div element html data must be a string "
- "type, found %s type." % type(html).__name__)
- super(Div, self).__init__(html, **params)
+ "type, found %s type." % type(data).__name__)
+ super(Div, self).__init__(data, **params) | Made Div signature consistent (#<I>) | pyviz_holoviews | train | py |
7b34057a6b604171d9a266ca6da4bc57710b1074 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ __DIR__ = os.path.abspath(os.path.dirname(__file__))
setup(
name = 'rawl',
- version = '0.1.0b5',
+ version = '0.1.1b2',
description = 'An ugly raw SQL postgresql db layer',
url = 'https://github.com/mikeshultz/rawl',
author = 'Mike Shultz', | Version bump to <I>b2 | mikeshultz_rawl | train | py |
720d2be83f9a9213655e1fef7afaee127f474ec5 | diff --git a/ndb/test_utils.py b/ndb/test_utils.py
index <HASH>..<HASH> 100644
--- a/ndb/test_utils.py
+++ b/ndb/test_utils.py
@@ -39,12 +39,6 @@ from . import tasklets
from . import eventloop
-_STARTUP_OPTIONS = [
- '--dev_appserver_option='
- '--property=datastore.auto_id_allocation_policy=SEQUENTIAL',
-]
-
-
class NDBBaseTest(unittest.TestCase):
"""Base class for tests that interact with API stubs or create Models.
@@ -169,9 +163,9 @@ class NDBCloudDatastoreV1Test(NDBBaseTest):
def setUpClass(cls):
# Late import so that tests can still run if googledatastore is not
# available.
- from . import local_cloud_datastore_factory
- factory = local_cloud_datastore_factory.LocalCloudDatastoreFactory()
- cls.datastore = factory.Create(cls.APP_ID, _STARTUP_OPTIONS)
+ from . import datastore_emulator
+ factory = datastore_emulator.DatastoreEmulatorFactory()
+ cls.datastore = factory.Create(cls.APP_ID)
@classmethod
def tearDownClass(cls): | Update ndb/db from v1beta3 to v1.
-------------
Created by MOE: <URL> | GoogleCloudPlatform_datastore-ndb-python | train | py |
ce139ec4aa6b65021e3896b74bf0a21936282320 | diff --git a/vstutils/static/js/guiFields.js b/vstutils/static/js/guiFields.js
index <HASH>..<HASH> 100644
--- a/vstutils/static/js/guiFields.js
+++ b/vstutils/static/js/guiFields.js
@@ -513,7 +513,7 @@ guiFields.date = class DateField extends guiFields.base {
return;
}
- return moment(value).tz(window.timeZone).format("YYYY/MM/DD");
+ return moment(value).tz(window.timeZone).format("YYYY-MM-DD");
}
/**
* Redefinition of base guiField method toRepresent. | Resolve conflict guiField.date and django DateField | vstconsulting_vstutils | train | js |
c545ea51d08aa3ac82bcbe100413152d6c7ceac8 | diff --git a/js/jquery.fileupload.js b/js/jquery.fileupload.js
index <HASH>..<HASH> 100644
--- a/js/jquery.fileupload.js
+++ b/js/jquery.fileupload.js
@@ -453,7 +453,7 @@
}
if (!multipart || options.blob || !this._isInstanceOf('File', file)) {
options.headers['Content-Disposition'] = 'attachment; filename="' +
- encodeURI(file.name) + '"';
+ encodeURI(file.uploadName || file.name) + '"';
}
if (!multipart) {
options.contentType = file.type || 'application/octet-stream';
@@ -489,7 +489,11 @@
});
}
if (options.blob) {
- formData.append(paramName, options.blob, file.name);
+ formData.append(
+ paramName,
+ options.blob,
+ file.uploadName || file.name
+ );
} else {
$.each(options.files, function (index, file) {
// This check allows the tests to run with | Make use of file.uploadName for blob and non-multipart uploads.
Extends 0decc<I>e<I>db<I>c<I>b9a<I>a7d<I>e5fc<I>ae6ce.
Closes #<I>. | blueimp_jQuery-File-Upload | train | js |
0d6341096d7d73ff40328ea53ac691b49da9bef1 | diff --git a/src/init.js b/src/init.js
index <HASH>..<HASH> 100644
--- a/src/init.js
+++ b/src/init.js
@@ -1,4 +1,4 @@
-import { initialize as ldClientInitialize } from 'ldclient-js';
+import { initialize as ldClientInitialize } from 'launchdarkly-js-client-sdk';
import camelCase from 'lodash.camelcase';
import uuid from 'uuid';
import ip from 'ip';
diff --git a/src/init.test.js b/src/init.test.js
index <HASH>..<HASH> 100644
--- a/src/init.test.js
+++ b/src/init.test.js
@@ -1,4 +1,4 @@
-jest.mock('ldclient-js', () => ({
+jest.mock('launchdarkly-js-client-sdk', () => ({
initialize: global.td.function('ldClientPackage.initialize'),
}));
@@ -17,7 +17,7 @@ jest.mock('ua-parser-js', () => () => ({
jest.useFakeTimers();
-import ldClientPackage from 'ldclient-js';
+import ldClientPackage from 'launchdarkly-js-client-sdk';
import td from 'testdouble';
import ldReduxInit from './init'; | rename mock & imports | yusinto_ld-redux | train | js,js |
3644310b048b6d37fd4dfe7e7a3783f235dc3720 | diff --git a/tests/Unit/Suites/TestFileFixtureTrait.php b/tests/Unit/Suites/TestFileFixtureTrait.php
index <HASH>..<HASH> 100644
--- a/tests/Unit/Suites/TestFileFixtureTrait.php
+++ b/tests/Unit/Suites/TestFileFixtureTrait.php
@@ -26,7 +26,7 @@ trait TestFileFixtureTrait
$realFile = $this->___getAbsolutePath($filePath);
$this->___createMissingDirectories($realFile);
$this->___createFile($content, $realFile, $mode);
- $this->fixtureFiles[] = $realFile;
+ $this->addFileToCleanupAfterTest($realFile);
}
public function addFileToCleanupAfterTest(string $realFile) | Issue #<I>: Encapsulate array write access in single method | lizards-and-pumpkins_catalog | train | php |
97f117d8b90cb374cb13f14c829ae88dfb96e5c7 | diff --git a/sqlblock/postgres/connection.py b/sqlblock/postgres/connection.py
index <HASH>..<HASH> 100644
--- a/sqlblock/postgres/connection.py
+++ b/sqlblock/postgres/connection.py
@@ -88,6 +88,9 @@ class AsyncPostgresSQL:
def __await__(self):
return self._sqlblock.fetch().__await__()
+
+ async def fetch_first(self, **params):
+ return await self._sqlblock.fetch_first(**params)
async def first(self, **params):
return await self._sqlblock.fetch_first(**params) | refactor first into fetch_first | lcgong_sqlblock | train | py |
28a4201105ec263087452c51bb761b63145cee8b | diff --git a/lib/mercenary/program.rb b/lib/mercenary/program.rb
index <HASH>..<HASH> 100644
--- a/lib/mercenary/program.rb
+++ b/lib/mercenary/program.rb
@@ -46,7 +46,7 @@ module Mercenary
logger.debug("Parsed config: #{@config.inspect}")
- cmd.actions.each { |a| a.call(argv, @config) }
+ cmd.execute(argv, @config)
end
end
end | Use Command#execute instead of the other thing. | jekyll_mercenary | train | rb |
ce5172b2a3e1e2c04496861236d285a9d9429a2e | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -65,13 +65,13 @@ function loadTranslationsPath(id,path,reload){
for(var i=0,l=languages.length;i<l;i++){
var lang = languages[i];
if(!reload && heap[id] && heap[id][lang]){
- break;
+ continue;
}
var translations;
try {
translations = fs.readFileSync(paths.join(path,lang+'.js'),{encoding:'utf8'});
} catch (error) {
- break;
+ continue;
}
try { | Opps, not break, jump to next language check/load | pillarsjs_textualization | train | js |
9f8763dca94ef06a5886f2ce5d684b582346e537 | diff --git a/src/branch.js b/src/branch.js
index <HASH>..<HASH> 100644
--- a/src/branch.js
+++ b/src/branch.js
@@ -75,6 +75,11 @@ Branch.prototype.initSession = function (deepLinkDataListener) {
return execute('initSession')
}
+// deprecated for setRequestMetadata()
+Branch.prototype.setMixpanelToken = function (token) {
+ return this.setRequestMetadata('$mixpanel_distinct_id', token)
+}
+
Branch.prototype.setRequestMetadata = function (key, val) {
if (!key || typeof key !== 'string') {
return new Promise(function (resolve, reject) { | fix: added back backwards compatibility for setMixpanelToken() | BranchMetrics_cordova-ionic-phonegap-branch-deep-linking | train | js |
5a042e7466f58ea1660f276785de7522236db351 | diff --git a/lib/Condorcet/Condorcet.php b/lib/Condorcet/Condorcet.php
index <HASH>..<HASH> 100644
--- a/lib/Condorcet/Condorcet.php
+++ b/lib/Condorcet/Condorcet.php
@@ -782,7 +782,7 @@ class Condorcet
protected function checkVoteCandidate (namespace\Vote $vote)
{
- $linkCount = $vote->countLink();
+ $linkCount = $vote->countLinks();
if ( $vote->countInputRanking() > $this->_CandidatesCount )
{ return false ; }
@@ -1982,7 +1982,7 @@ trait CandidateVote_CondorcetLink
return in_array($election, $this->_link, true);
}
- public function countLink ()
+ public function countLinks ()
{
return count($this->_link);
} | Renaming countLink method to countLinks | julien-boudry_Condorcet | train | php |
5d160f38c93b493979b243b5657ff1cdbf5e990f | diff --git a/salt/utils/dictdiffer.py b/salt/utils/dictdiffer.py
index <HASH>..<HASH> 100644
--- a/salt/utils/dictdiffer.py
+++ b/salt/utils/dictdiffer.py
@@ -30,7 +30,7 @@ class DictDiffer(object):
"""
def __init__(self, current_dict, past_dict):
self.current_dict, self.past_dict = current_dict, past_dict
- self.set_current, self.set_past = set(current_dict.keys()), set(past_dict.keys())
+ self.set_current, self.set_past = set(list(current_dict)), set(list(past_dict))
self.intersect = self.set_current.intersection(self.set_past)
def added(self):
@@ -56,7 +56,7 @@ def deep_diff(old, new, ignore=None):
while len(stack) > 0:
tmps = []
tmp_old, tmp_new, reentrant = stack.pop()
- for key in set(tmp_old.keys() + tmp_new.keys()):
+ for key in set(list(tmp_old) + list(tmp_new)):
if key in tmp_old and key in tmp_new \
and tmp_old[key] == tmp_new[key]:
del tmp_old[key] | Py3 compat. Cast to list which works in Py2 and Py3. | saltstack_salt | train | py |
da33cdcc7b233f98b79e202401c8902dd6c3673b | diff --git a/cli/serve.js b/cli/serve.js
index <HASH>..<HASH> 100644
--- a/cli/serve.js
+++ b/cli/serve.js
@@ -64,7 +64,7 @@ function serve(argv, skyPagesConfig, webpack, WebpackDevServer) {
const compiler = webpack(config);
const server = new WebpackDevServer(compiler, config.devServer);
- server.listen(config.devServer.port, (err) => {
+ server.listen(config.devServer.port, 'localhost', (err) => {
if (err) {
logger.error(err);
}
diff --git a/test/cli-serve.spec.js b/test/cli-serve.spec.js
index <HASH>..<HASH> 100644
--- a/test/cli-serve.spec.js
+++ b/test/cli-serve.spec.js
@@ -74,7 +74,7 @@ describe('cli serve', () => {
function webpackDevServer() {
return {
- listen: (port, cb) => {
+ listen: (port, host, cb) => {
cb(err);
expect(logger.error).toHaveBeenCalledWith(err);
mock.stop(f);
@@ -98,7 +98,7 @@ describe('cli serve', () => {
function webpackDevServer() {
return {
- listen: (port, cb) => {
+ listen: (port, host, cb) => {
cb();
expect(logger.error).not.toHaveBeenCalled();
mock.stop(f); | Specifying host when listening for WebpackDevServer (#<I>) | blackbaud_skyux-builder | train | js,js |
cd618fbecf3449ff10d820b0f487186b4704a886 | diff --git a/src/MShop/Service/Provider/Payment/Stripe.php b/src/MShop/Service/Provider/Payment/Stripe.php
index <HASH>..<HASH> 100644
--- a/src/MShop/Service/Provider/Payment/Stripe.php
+++ b/src/MShop/Service/Provider/Payment/Stripe.php
@@ -297,6 +297,7 @@ class Stripe
$data['paymentIntentReference'] = $stripeIntentsRef;
}
+ $data['transferGroup'] = 'ORDER-' . $orderid;
$data['confirm'] = true;
return $data + $this->getPaymentUrls(); | Adds order ID as Stripe transfer group | aimeoscom_ai-payments | train | php |
2b285c5fd3ea9c12a2222a64a666e1dbd972320a | diff --git a/core/server/services/mega/mega.js b/core/server/services/mega/mega.js
index <HASH>..<HASH> 100644
--- a/core/server/services/mega/mega.js
+++ b/core/server/services/mega/mega.js
@@ -10,6 +10,7 @@ const urlUtils = require('../../lib/url-utils');
const getEmailData = (post, members) => {
const emailTmpl = postEmailSerializer.serialize(post);
+ emailTmpl.from = membersService.config.getEmailFromAddress();
const membersToSendTo = members.filter((member) => {
return membersService.contentGating.checkPostAccess(post, member); | Set from adress in the mega service
no-issue | TryGhost_Ghost | train | js |
643f83f9b9489b8afcad2bfe35edf03db22fcfbf | diff --git a/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java b/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java
index <HASH>..<HASH> 100644
--- a/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java
+++ b/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java
@@ -147,7 +147,7 @@ public class WSTrustTestUtils
UsernameTokenCallbackHandler ch = new UsernameTokenCallbackHandler();
- String str = ch.getUsernameTokenString("myactaskey", null);
+ String str = ch.getUsernameTokenString("alice","clarinet");
ctx.put(SecurityConstants.STS_TOKEN_ACT_AS, str); | [JBWS-<I>] changed UsernameToken input args | jbossws_jbossws-cxf | train | java |
67ec2c6ec5c456df7960d96d21d8c206532955f1 | diff --git a/src/DoctrineORMModule/Module.php b/src/DoctrineORMModule/Module.php
index <HASH>..<HASH> 100644
--- a/src/DoctrineORMModule/Module.php
+++ b/src/DoctrineORMModule/Module.php
@@ -20,7 +20,6 @@
namespace DoctrineORMModule;
use Zend\ModuleManager\Feature\ControllerProviderInterface;
-use Zend\ModuleManager\Feature\BootstrapListenerInterface;
use Zend\ModuleManager\Feature\ConfigProviderInterface;
use Zend\ModuleManager\Feature\InitProviderInterface;
use Zend\ModuleManager\Feature\DependencyIndicatorInterface;
@@ -44,7 +43,6 @@ use Zend\Stdlib\ArrayUtils;
*/
class Module implements
ControllerProviderInterface,
- BootstrapListenerInterface,
ConfigProviderInterface,
InitProviderInterface,
DependencyIndicatorInterface
@@ -68,17 +66,6 @@ class Module implements
/**
* {@inheritDoc}
*/
- public function onBootstrap(EventInterface $event)
- {
- /* @var $application \Zend\Mvc\ApplicationInterface */
- $application = $event->getTarget();
-
- $application->getServiceManager()->get('doctrine.entity_resolver.orm_default');
- }
-
- /**
- * {@inheritDoc}
- */
public function getConfig()
{
return include __DIR__ . '/../../config/module.config.php'; | Removing eager instantiation of the entity resolver (also a code smell)
With this, the ORM module does not need bootstrapping anymore | doctrine_DoctrineORMModule | train | php |
d48ee3e0f61bad913b4c050e9542b409fdd27e43 | diff --git a/test/ral/types/cron.rb b/test/ral/types/cron.rb
index <HASH>..<HASH> 100755
--- a/test/ral/types/cron.rb
+++ b/test/ral/types/cron.rb
@@ -464,9 +464,9 @@ class TestCron < Test::Unit::TestCase
inst = @crontype.create(
:name => "something", :command => "/some/thing",
:provider => :crontab)
- assert_equal(ENV["USER"], inst.should(:user),
+ assert_equal(Etc.getpwuid(Process.uid).name, inst.should(:user),
"user did not default to current user with crontab")
- assert_equal(ENV["USER"], inst.should(:target),
+ assert_equal(Etc.getpwuid(Process.uid).name, inst.should(:target),
"target did not default to current user with crontab")
# Now make a new cron with a user, and make sure it gets copied | fix crontests depending on ENV[USER] by using Etc.getpwuid(Process.uid) instead | puppetlabs_puppet | train | rb |
cb166acdfb3b95aaedee656d6f62133cf2a07cd4 | diff --git a/lib/licensee/version.rb b/lib/licensee/version.rb
index <HASH>..<HASH> 100644
--- a/lib/licensee/version.rb
+++ b/lib/licensee/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module Licensee
- VERSION = '9.12.0'
+ VERSION = '9.13.0'
end | Bump licensee to <I> | licensee_licensee | train | rb |
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.