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
|
---|---|---|---|---|---|
02a2fce840a0b5e9293175427d5215e6fa5cbafd
|
diff --git a/pnc_cli/productmilestones.py b/pnc_cli/productmilestones.py
index <HASH>..<HASH> 100644
--- a/pnc_cli/productmilestones.py
+++ b/pnc_cli/productmilestones.py
@@ -98,9 +98,9 @@ def get_milestone(id):
@arg("id", help="ProductMilestone ID to update.", type=types.existing_product_milestone)
-@arg("-v, --version", help="New version for the ProductMilestone.", type=types.valid_version_update)
-@arg("-sd, --starting-date", help="New start date for the ProductMilestone.", type=types.valid_date)
-@arg("-ped, --planned-end-date", help="New release date for the ProductMilestone.", type=types.valid_date)
+@arg("-v", "--version", help="New version for the ProductMilestone.", type=types.valid_version_update)
+@arg("-sd", "--starting-date", help="New start date for the ProductMilestone.", type=types.valid_date)
+@arg("-ped", "--planned-end-date", help="New release date for the ProductMilestone.", type=types.valid_date)
def update_milestone(id, **kwargs):
"""
Update a ProductMilestone
|
Bug fix for arg annotation
The arg annotation was incorrectly defined, and as such the cli options
weren't working as expected. This commit fixes it
|
project-ncl_pnc-cli
|
train
|
py
|
e728821d6b26e321ce88885d174f73ddfa8f9ec8
|
diff --git a/pysat/_instrument.py b/pysat/_instrument.py
index <HASH>..<HASH> 100644
--- a/pysat/_instrument.py
+++ b/pysat/_instrument.py
@@ -2291,18 +2291,7 @@ class Instrument(object):
new_dict = self._filter_netcdf4_metadata(new_dict,
coltype,
export_nan=export_nan)
- # remove any metadata with a value of nan not present in
- # export_nan
- filtered_dict = new_dict.copy()
- for key, value in new_dict.items():
- try:
- if np.isnan(value):
- if key not in export_nan:
- filtered_dict.pop(key)
- except TypeError:
- # if typerror thrown, it's not nan
- pass
- cdfkey.setncatts(filtered_dict)
+ cdfkey.setncatts(new_dict)
except KeyError as err:
logger.info(' '.join((str(err), '\n',
', '.join(('Unable to find MetaData for',
|
ENH: Removed filter that was already replaced
|
rstoneback_pysat
|
train
|
py
|
82ab6f7c1f5b4fa150c3938122a78a620d055f23
|
diff --git a/go/vt/tabletmanager/healthcheck.go b/go/vt/tabletmanager/healthcheck.go
index <HASH>..<HASH> 100644
--- a/go/vt/tabletmanager/healthcheck.go
+++ b/go/vt/tabletmanager/healthcheck.go
@@ -51,7 +51,7 @@ func (r *HealthRecord) Class() string {
// IsDuplicate implements history.Deduplicable
func (r *HealthRecord) IsDuplicate(other interface{}) bool {
- rother, ok := other.(HealthRecord)
+ rother, ok := other.(*HealthRecord)
if !ok {
return false
}
@@ -119,7 +119,7 @@ func (agent *ActionAgent) runHealthCheck(targetTabletType topo.TabletType, lockT
}
// save the health record
- record := HealthRecord{
+ record := &HealthRecord{
Error: err,
Result: health,
Time: time.Now(),
|
Storing pointers to health records in health.
So we don't copy them around all the time when displaying them.
|
vitessio_vitess
|
train
|
go
|
af2c7ce1c333f0ffdef1c40031aab5eb0c245d19
|
diff --git a/dist/angular-carousel.js b/dist/angular-carousel.js
index <HASH>..<HASH> 100644
--- a/dist/angular-carousel.js
+++ b/dist/angular-carousel.js
@@ -307,7 +307,14 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
}
function getSlidesDOM() {
- return iElement[0].querySelectorAll('ul[rn-carousel] > li');
+ var nodes = iElement[0].childNodes;
+ var slides = [];
+ for(var i=0; i<nodes.length ;i++){
+ if(nodes[i].tagName === "LI"){
+ slides.push(nodes[i]);
+ }
+ }
+ return slides;
}
function documentMouseUpEvent(event) {
|
Allow nested carousels
GetSlidesDOM was looking all the way down the DOM tree.
If a carousel had another carousel nested in, the GetSlidesDOM was returning an array containing all the slides from both the parent and the child carousel, causing the topmost slides to have a wrong translation.
|
revolunet_angular-carousel
|
train
|
js
|
446136e36b6724f780d30af7618d8690fa14982c
|
diff --git a/Swat/SwatString.php b/Swat/SwatString.php
index <HASH>..<HASH> 100644
--- a/Swat/SwatString.php
+++ b/Swat/SwatString.php
@@ -1008,8 +1008,8 @@ class SwatString extends SwatObject
$unit_magnitude = null;
- if ($magnitude > 0) {
- $magnitude = round($magnitude / 10) * 10;
+ if ($magnitude >= 0) {
+ $magnitude = intval(round($magnitude / 10) * 10);
if (array_key_exists($magnitude, $units)) {
$unit_magnitude = $magnitude;
} else {
|
Fix SwatString::formatBytes() when a magnitude is specified.
svn commit r<I>
|
silverorange_swat
|
train
|
php
|
e5ea7a5483f2ec01ad805bf2ea85cfcf53c300c9
|
diff --git a/dist/tezos/TezosOperations.js b/dist/tezos/TezosOperations.js
index <HASH>..<HASH> 100644
--- a/dist/tezos/TezosOperations.js
+++ b/dist/tezos/TezosOperations.js
@@ -267,8 +267,8 @@ var TezosOperations;
counter: (Number(account.counter) + 1).toString(),
gas_limit: '10000',
storage_limit: '277',
- managerPubkey: keyStore.publicKeyHash,
- //manager_pubkey: keyStore.publicKeyHash, // zeronet
+ // managerPubkey: keyStore.publicKeyHash, //mainnet
+ manager_pubkey: keyStore.publicKeyHash, // zeronet
balance: amount.toString(),
spendable: spendable,
delegatable: delegatable,
@@ -338,4 +338,4 @@ var TezosOperations;
}
TezosOperations.sendIdentityActivationOperation = sendIdentityActivationOperation;
})(TezosOperations = exports.TezosOperations || (exports.TezosOperations = {}));
-//# sourceMappingURL=TezosOperations.js.map
\ No newline at end of file
+//# sourceMappingURL=TezosOperations.js.map
|
Update TezosOperations.js
changed the manager_pubkey
|
Cryptonomic_ConseilJS
|
train
|
js
|
9cb771c69347fe43c4316535e5bde9f2f194d317
|
diff --git a/spec/unit/resource/catalog_spec.rb b/spec/unit/resource/catalog_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/resource/catalog_spec.rb
+++ b/spec/unit/resource/catalog_spec.rb
@@ -205,7 +205,7 @@ describe Puppet::Resource::Catalog, "when compiling" do
end
it "should set itself as the catalog for each converted resource" do
- @catalog.vertices.each { |v| expect(v.catalog.object_id).to equal(@catalog.object_id) }
+ @catalog.vertices.each { |v| expect(v.catalog.object_id).to eql(@catalog.object_id) }
end
# This tests #931.
|
(maint) Fix object_id assertion in catalog spec
|
puppetlabs_puppet
|
train
|
rb
|
3f66a39e15a71b981e8c5f887a4adc3ad486a45f
|
diff --git a/bgen_reader/test/test_large_file.py b/bgen_reader/test/test_large_file.py
index <HASH>..<HASH> 100644
--- a/bgen_reader/test/test_large_file.py
+++ b/bgen_reader/test/test_large_file.py
@@ -33,8 +33,8 @@ def test_large_file(capsys):
assert_equal(g["probs"].shape, (415, 3))
assert_allclose(
- g["probs"][410, :], [0.32562752727550165, 0.6743724727244984, 0.0]
+ g["probs"][410, :], [0.0, 0.4268863965819791, 0.5731136034180209]
)
assert_equal(g["phased"], False)
- assert_equal(g["missing"][3], True)
+ assert_equal(g["missing"][3], False)
assert_equal(g["ploidy"][3], 2)
|
Issue #<I>, genotype part_size
|
limix_bgen-reader-py
|
train
|
py
|
e457cf4a077dbc152ad42ba8c4a173427f5bd2a9
|
diff --git a/Neos.Neos/Resources/Public/JavaScript/index.js b/Neos.Neos/Resources/Public/JavaScript/index.js
index <HASH>..<HASH> 100644
--- a/Neos.Neos/Resources/Public/JavaScript/index.js
+++ b/Neos.Neos/Resources/Public/JavaScript/index.js
@@ -14,7 +14,6 @@ menuPanelElements.forEach(panelElement => {
const treeElements = document.querySelectorAll('.neos-tree-container');
treeElements.forEach(treeElement => {
new Tree(treeElement);
- console.log(treeElement);
});
|
TASK: Remove debug code in tree
|
neos_neos-development-collection
|
train
|
js
|
5a3f18a55f6e2bb49b25d521288559120177ebc4
|
diff --git a/lxd/daemon.go b/lxd/daemon.go
index <HASH>..<HASH> 100644
--- a/lxd/daemon.go
+++ b/lxd/daemon.go
@@ -2103,7 +2103,13 @@ func (d *Daemon) nodeRefreshTask(heartbeatData *cluster.APIHeartbeat, isLeader b
// Refresh event listeners from heartbeat members (after certificates refreshed if needed).
// Run asynchronously so that connecting to remote members doesn't delay other heartbeat tasks.
- go cluster.EventsUpdateListeners(d.endpoints, d.cluster, d.serverCert, heartbeatData.Members, d.events.Forward)
+ wg := sync.WaitGroup{}
+
+ wg.Add(1)
+ go func() {
+ cluster.EventsUpdateListeners(d.endpoints, d.cluster, d.serverCert, heartbeatData.Members, d.events.Forward)
+ wg.Done()
+ }()
// Only update the node list if there are no state change task failures.
// If there are failures, then we leave the old state so that we can re-try the tasks again next heartbeat.
@@ -2178,4 +2184,6 @@ func (d *Daemon) nodeRefreshTask(heartbeatData *cluster.APIHeartbeat, isLeader b
d.clusterMembershipMutex.Unlock()
}
}
+
+ wg.Wait()
}
|
lxd/daemon: Run nodeRefreshTask inside cluster.EventsUpdateListeners as part of wait group
Wait until its done before returning to help reason about what is completed when nodeRefreshTask returns.
|
lxc_lxd
|
train
|
go
|
818985feafcb0ce2b90dccaa41f6443c27bc1090
|
diff --git a/django_enumfield/tests/test_validators.py b/django_enumfield/tests/test_validators.py
index <HASH>..<HASH> 100644
--- a/django_enumfield/tests/test_validators.py
+++ b/django_enumfield/tests/test_validators.py
@@ -9,7 +9,7 @@ from django_enumfield.validators import validate_available_choice
class ValidatorTest(unittest.TestCase):
def test_validate_available_choice_1(self):
- """Test passing a value non convertable to an int raises an
+ """Test passing a value non convertible to an int raises an
InvalidStatusOperationError
"""
self.assertRaises(
|
docs: Fix simple typo, convertable -> convertible
There is a small typo in django_enumfield/tests/test_validators.py.
Should read `convertible` rather than `convertable`.
|
5monkeys_django-enumfield
|
train
|
py
|
8c6d0440c2fa903388af1121433c71d33b9a9ef9
|
diff --git a/t.go b/t.go
index <HASH>..<HASH> 100644
--- a/t.go
+++ b/t.go
@@ -80,7 +80,10 @@ func (t *Torrent) Drop() {
t.cl.mu.Unlock()
}
-// Number of bytes of the entire torrent we have completed.
+// Number of bytes of the entire torrent we have completed. This is the sum of
+// completed pieces, and dirtied chunks of incomplete pieces. Do not use this
+// for download rate, as it can go down when pieces are lost or fail checks.
+// Sample Torrent.Stats.DataBytesRead for actual file data download rate.
func (t *Torrent) BytesCompleted() int64 {
t.cl.mu.RLock()
defer t.cl.mu.RUnlock()
|
Improve Torrent.BytesCompleted comment
|
anacrolix_torrent
|
train
|
go
|
ed61ab39963f7440cf70d592412e474684f49e5a
|
diff --git a/src/ContaoCommunityAlliance/DcGeneral/DataDefinition/Definition/DefaultPropertiesDefinition.php b/src/ContaoCommunityAlliance/DcGeneral/DataDefinition/Definition/DefaultPropertiesDefinition.php
index <HASH>..<HASH> 100644
--- a/src/ContaoCommunityAlliance/DcGeneral/DataDefinition/Definition/DefaultPropertiesDefinition.php
+++ b/src/ContaoCommunityAlliance/DcGeneral/DataDefinition/Definition/DefaultPropertiesDefinition.php
@@ -90,6 +90,10 @@ class DefaultPropertiesDefinition implements PropertiesDefinitionInterface
{
throw new DcGeneralInvalidArgumentException('Property ' . $name . ' is not registered.');
}
+
+ unset($this->properties[$name]);
+
+ return $this;
}
/**
|
Implement `removeProperty($property)`
At the moment `removeProperty` does nothing but validating the argument. This pull request implements the removing
|
contao-community-alliance_dc-general
|
train
|
php
|
87ef3a265a143db1684b792b2ef2ade973dd59ec
|
diff --git a/docs/src/ComponentsPage.js b/docs/src/ComponentsPage.js
index <HASH>..<HASH> 100644
--- a/docs/src/ComponentsPage.js
+++ b/docs/src/ComponentsPage.js
@@ -952,6 +952,20 @@ const ComponentsPage = React.createClass({
<h3><Anchor id="utilities-collapse">Collapse</Anchor></h3>
<p>Add a collapse toggle animation to an element or component.</p>
+ <div className="bs-callout bs-callout-info">
+ <h4>Smoothing animations</h4>
+ <p>
+ If you're noticing choppy animations,
+ and the component that's being collapsed
+ has non-zero margin or padding,
+ try wrapping the contents
+ of your <code><Collapse></code>
+ {" "}inside a node with no margin or padding,
+ like the <code><div></code> in the example below.
+ This will allow the height to be computed properly,
+ so the animation can proceed smoothly.
+ </p>
+ </div>
<ReactPlayground codeText={Samples.Collapse} />
<h4><Anchor id="utilities-collapse-props">Props</Anchor></h4>
|
Suggest wrapping Collapse child in no-margin node
It makes a big difference when you have elements with margin or padding;
the animation appears much smoother when the contents are enclosed
in a node with zero padding and zero margin (like a raw `<div>`).
Here are two examples.
* with a div: <URL>
The example already wraps its contents in a `<div>`,
but it's not clear that or why this is beneficial.
|
react-bootstrap_react-bootstrap
|
train
|
js
|
88563f1a9d20b78fa66dd4c93730c06d1c768db4
|
diff --git a/spec/performance/benchmark_spec.rb b/spec/performance/benchmark_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/performance/benchmark_spec.rb
+++ b/spec/performance/benchmark_spec.rb
@@ -57,6 +57,6 @@ RSpec.describe FiniteMachine do
}
end
- expect { fsm.next }.to perform_at_least(400).ips
+ expect { fsm.next }.to perform_at_least(300).ips
end
end
|
Change boundary for ruby <I>
|
piotrmurach_finite_machine
|
train
|
rb
|
401c763bb0c65f42b1a76a9ab24a2f0c90ff8e20
|
diff --git a/measure_it.py b/measure_it.py
index <HASH>..<HASH> 100644
--- a/measure_it.py
+++ b/measure_it.py
@@ -55,11 +55,12 @@ def measure_each(iterable, metric = print_metric, name = None):
:arg function metric: f(name, 1, time)
:arg str name: a name for the stats.
"""
+ it = iter(iterable)
while True:
# time retrieving an element.
t = time()
try:
- x = next(iterable)
+ x = next(it)
except StopIteration:
# don't record a metric for final next() call, as that's
# confusing & useless
|
fix bug, python 2/3 support
|
wearpants_instrument
|
train
|
py
|
d5b0d6961b047582efe7ef7f858bd8dcc11f0d15
|
diff --git a/pymouse/windows.py b/pymouse/windows.py
index <HASH>..<HASH> 100644
--- a/pymouse/windows.py
+++ b/pymouse/windows.py
@@ -57,6 +57,7 @@ class PyMouseEvent(PyMouseEventMeta):
def run(self):
self.hm.MouseAllButtons = self._click
self.hm.MouseMove = self._move
+ #I think I can add scrollwheel support at some point
self.hm.HookMouse()
while self.state:
sleep(0.01)
|
Added a note, as a reminder, that I can add scrolling support
|
SavinaRoja_PyUserInput
|
train
|
py
|
e91d4165076d7474d20abda83f92d15c7ebc3e81
|
diff --git a/gddo-server/main.go b/gddo-server/main.go
index <HASH>..<HASH> 100644
--- a/gddo-server/main.go
+++ b/gddo-server/main.go
@@ -963,9 +963,13 @@ func main() {
"third_party/jquery.timeago.js",
"site.js"))
mux.Handle("/-/site.css", staticServer.FilesHandler("site.css"))
+ mux.Handle("/-/bootstrap.min.css", staticServer.FilesHandler("bootstrap.min.css"))
+ mux.Handle("/-/bootstrap.min.js", staticServer.FilesHandler("bootstrap.min.js"))
+ mux.Handle("/-/jquery-2.0.3.min.js", staticServer.FilesHandler("jquery-2.0.3.min.js"))
if *sidebarEnabled {
mux.Handle("/-/sidebar.css", staticServer.FilesHandler("sidebar.css"))
}
+ mux.Handle("/-/", http.NotFoundHandler())
mux.Handle("/-/about", handler(serveAbout))
mux.Handle("/-/bot", handler(serveBot))
|
gddo-server: Handle static files properly.
Add handlers for newly added Bootstrap and jQuery files. These files are
stored locally now instead of being fetched from CDN. But those static
files are not handled properly in our serve mux, causing the serve keeps
requesting them infinitely.
Change-Id: Iddc<I>bb<I>f<I>ec<I>fa<I>eff<I>d9fa8dec4
Reviewed-on: <URL>
|
golang_gddo
|
train
|
go
|
853ecc70f0e1772b607554e98a714675c1dc5821
|
diff --git a/tests/test_using.py b/tests/test_using.py
index <HASH>..<HASH> 100644
--- a/tests/test_using.py
+++ b/tests/test_using.py
@@ -249,6 +249,16 @@ class UsingFactoryTestCase(unittest.TestCase):
test_object = TestObjectFactory.build()
self.assertEqual(test_object.one, 'one')
+ def test_inheritance(self):
+ @factory.use_strategy(factory.BUILD_STRATEGY)
+ class TestObjectFactory(factory.Factory, TestObject):
+ FACTORY_FOR = TestObject
+
+ one = 'one'
+
+ test_object = TestObjectFactory()
+ self.assertEqual(test_object.one, 'one')
+
def test_abstract(self):
class SomeAbstractFactory(factory.Factory):
FACTORY_ABSTRACT = True
|
Add test for dual class/factory inheritance.
If it works properly, this would make pylint happy.
|
FactoryBoy_factory_boy
|
train
|
py
|
b5d8093d9dd15655d31faa7d61f0b2b56fdca8e3
|
diff --git a/lib/base/properties.js b/lib/base/properties.js
index <HASH>..<HASH> 100644
--- a/lib/base/properties.js
+++ b/lib/base/properties.js
@@ -54,9 +54,11 @@ exports.bind = true
* if val is string tries to get this[val]
*/
exports.ChildConstructor = function (val) {
- var typeOf = typeof val
- if (typeOf === 'string') {
+ var type = typeof val
+ if (type === 'string') {
val = this[val]
+ } else if (val && type !== 'function') {
+ val = this[val].Constructor
}
this.define({ ChildConstructor: val })
}
@@ -129,4 +131,4 @@ exports.overwrite = function (val, event) {
exports.constructor = function (val, event) {
this._Constructor = val
val.prototype = this
-}
\ No newline at end of file
+}
|
ChildConstructor property tries to get .Constructor if the input is a base
|
vigour-io_vjs
|
train
|
js
|
ab4973d4f23cfb501e3ab834e8836c6383f974fb
|
diff --git a/upup/pkg/fi/cloudup/awsup/logging_retryer.go b/upup/pkg/fi/cloudup/awsup/logging_retryer.go
index <HASH>..<HASH> 100644
--- a/upup/pkg/fi/cloudup/awsup/logging_retryer.go
+++ b/upup/pkg/fi/cloudup/awsup/logging_retryer.go
@@ -57,7 +57,7 @@ func (l LoggingRetryer) RetryRules(r *request.Request) time.Duration {
errorDescription = fmt.Sprintf("%d %s", r.HTTPResponse.StatusCode, r.HTTPResponse.Status)
}
- glog.Infof("Retryable error (%s) from %s - will retry after delay of %v", errorDescription, methodDescription, duration)
+ glog.V(2).Infof("Retryable error (%s) from %s - will retry after delay of %v", errorDescription, methodDescription, duration)
return duration
}
|
Retry Logging
- changing the verbosity of the api retries
|
kubernetes_kops
|
train
|
go
|
8b3286be6bb5c3c147a93a20778641aab68891dc
|
diff --git a/api/insight/apirouter.go b/api/insight/apirouter.go
index <HASH>..<HASH> 100644
--- a/api/insight/apirouter.go
+++ b/api/insight/apirouter.go
@@ -26,18 +26,24 @@ const APIVersion = 0
// NewInsightApiRouter returns a new HTTP path router, ApiMux, for the Insight
// API, app.
func NewInsightApiRouter(app *insightApiContext, useRealIP bool) ApiMux {
- // Create a rate limiter struct.
- limiter := tollbooth.NewLimiter(1, nil)
-
// chi router
mux := chi.NewRouter()
- mux.Use(tollbooth_chi.LimitHandler(limiter))
+ // Create a rate limiter struct.
+ reqPerSecLimit := 10.0
+ limiter := tollbooth.NewLimiter(reqPerSecLimit, nil)
if useRealIP {
mux.Use(middleware.RealIP)
+ // RealIP sets RemoteAddr
+ limiter.SetIPLookups([]string{"RemoteAddr"})
+ } else {
+ limiter.SetIPLookups([]string{"X-Forwarded-For", "X-Real-IP", "RemoteAddr"})
}
+ // Put the limiter after RealIP
+ mux.Use(tollbooth_chi.LimitHandler(limiter))
+
mux.Use(middleware.Logger)
mux.Use(middleware.Recoverer)
mux.Use(middleware.StripSlashes)
|
insight: rate limiter needs to check certain headers
Also bump the rate lmiit up. In the future this should be configurable.
|
decred_dcrdata
|
train
|
go
|
b0b70ea609d60de61c3d6dee4e636ea1f4ea738b
|
diff --git a/AdminModule/presenters/UpdatePresenter.php b/AdminModule/presenters/UpdatePresenter.php
index <HASH>..<HASH> 100755
--- a/AdminModule/presenters/UpdatePresenter.php
+++ b/AdminModule/presenters/UpdatePresenter.php
@@ -40,7 +40,7 @@ class UpdatePresenter extends \AdminModule\BasePresenter {
putenv("COMPOSER_HOME=/usr/bin/.composer");
- exec("cd ../;git pull;composer update > $installLog 2> $installErrorLog");
+ exec("cd ../;git pull;composer update -n > $installLog 2> $installErrorLog");
$successMessage = $this->getMessageFromFile('.' . $installLog);
|
Added no interactive mode
Added no interactive mode to composer update command
|
voslartomas_WebCMS2
|
train
|
php
|
a25288d6d6f1d36dd04c351690c52746d51af2f9
|
diff --git a/lib/elements/bfe_publi_info.py b/lib/elements/bfe_publi_info.py
index <HASH>..<HASH> 100644
--- a/lib/elements/bfe_publi_info.py
+++ b/lib/elements/bfe_publi_info.py
@@ -45,14 +45,19 @@ def format(bfo):
number = publication_info.get('n')
pages = publication_info.get('c')
- if journal != '' and volume is not None:
-
+ if journal is not None:
journal = cgi.escape(journal)
+ if volume is not None:
volume = cgi.escape(volume)
+ if year is not None:
year = cgi.escape(year)
+ if number is not None:
number = cgi.escape(number)
+ if pages is not None:
pages = cgi.escape(pages)
+ if journal != '' and volume is not None:
+
out += '<a href="http://weblib.cern.ch/cgi-bin/ejournals?publication='
out += quote(journal_source)
out += '&volume=' + volume
|
Fixed bug when trying to escape 'None' values.
|
inveniosoftware_invenio-formatter
|
train
|
py
|
d995b138c3894f4233358787b9750b9b9e764e69
|
diff --git a/tests/Path/InterpolatorTest.php b/tests/Path/InterpolatorTest.php
index <HASH>..<HASH> 100644
--- a/tests/Path/InterpolatorTest.php
+++ b/tests/Path/InterpolatorTest.php
@@ -10,27 +10,6 @@ use Mockery;
class InterpolatorTest extends TestCase
{
- ///**
- // * @test
- // */
- //function it_shit()
- //{
- // $interpolator = new Interpolator;
- //
- // $model = $this->getMockModel();
- // $model->shouldReceive('getKey')->andReturn(13);
- //
- // $attachment = $this->getMockAttachment();
- // $attachment->shouldReceive('name')->once()->andReturn('attributename');
- // $attachment->shouldReceive('getInstance')->andReturn($model);
- // $attachment->shouldReceive('getInstanceClass')->once()->andReturn('App\\Models\\Test');
- // $attachment->shouldReceive('originalFilename')->once()->andReturn('testing.txt');
- //
- // $result = $interpolator->interpolate('/:class_name/:attachment/:style/:hash.:extension', $attachment, 'variant');
- //
- // dd($result);
- //}
-
/**
* @test
*/
|
Removed nasty accidental debugging commit
|
czim_laravel-paperclip
|
train
|
php
|
a4e3d3142d5d2a0b1ae841e0673398efebdaeecc
|
diff --git a/f90nml/tokenizer.py b/f90nml/tokenizer.py
index <HASH>..<HASH> 100644
--- a/f90nml/tokenizer.py
+++ b/f90nml/tokenizer.py
@@ -22,7 +22,7 @@ class Tokenizer(object):
self.prior_delim = None
- def parse(self, line, macros={}):
+ def parse(self, line):
"""Tokenize a line of Fortran source."""
tokens = []
@@ -91,12 +91,6 @@ class Tokenizer(object):
# This should never happen
raise ValueError
- # Modify token if needed
- if word in macros:
- # TODO: Multiword substitutions are not tokenized!
- print('replacing {} with {}'.format(word, macros[word]))
- word = macros[word]
-
tokens.append(word)
return tokens
|
Macro support removed from tokenizer
I don't see how macros would ever be applied to namelists (unless it was
some hefty user-defined thing) so they've been removed.
If, for some reason, this is ever needed, it can be checked and applied
outside of the tokenizer.
This seems to produce a minor speedup (1-2%).
|
marshallward_f90nml
|
train
|
py
|
3a78a64b05713a96f171e80b3aba51264b21bff7
|
diff --git a/src/CyberSpectrum/Command/CommandBase.php b/src/CyberSpectrum/Command/CommandBase.php
index <HASH>..<HASH> 100644
--- a/src/CyberSpectrum/Command/CommandBase.php
+++ b/src/CyberSpectrum/Command/CommandBase.php
@@ -180,7 +180,7 @@ abstract class CommandBase extends Command
$this->txlang = $input->getOption('xliff');
$this->ctolang = $input->getOption('contao');
$this->baselanguage = $input->getOption('base-language');
- $this->skipFiles = $input->getOption('skip-files') ? explode(',', $input->getOption('skip-files')) : null;
+ $this->skipFiles = $input->getOption('skip-files') ? explode(',', $input->getOption('skip-files')) : null;
$this->transifexconfig = $input->getOption('transifex-config');
$this->checkValidSlug($this->project);
@@ -232,7 +232,7 @@ abstract class CommandBase extends Command
}
if (!$this->skipFiles) {
- $this->skipFiles = $this->getTransifexConfigValue('/skip_files');
+ $this->skipFiles = $this->getTransifexConfigValue('/skip_files') ?: array();
} else {
// Make sure it is an array
$this->skipFiles = array();
|
Fixed bug where skipFiles was not initialized as an array
|
cyberspectrum_contao-toolbox
|
train
|
php
|
80c9215b66f93becad8476eb5adae329de5b9353
|
diff --git a/src/Sismo/Contrib/XmppNotifier.php b/src/Sismo/Contrib/XmppNotifier.php
index <HASH>..<HASH> 100644
--- a/src/Sismo/Contrib/XmppNotifier.php
+++ b/src/Sismo/Contrib/XmppNotifier.php
@@ -11,6 +11,9 @@
namespace Sismo\Contrib;
+use Sismo\Notifier;
+use Sismo\Commit;
+
// @codeCoverageIgnoreStart
/**
* Notifies builds via a XMPP server.
|
added missing use statemetns for XmppNotifer
|
FriendsOfPHP_Sismo
|
train
|
php
|
e27d82dd3d6ceceda92f96db15d5c932ce765735
|
diff --git a/tests/unit/modules/boto_vpc_test.py b/tests/unit/modules/boto_vpc_test.py
index <HASH>..<HASH> 100644
--- a/tests/unit/modules/boto_vpc_test.py
+++ b/tests/unit/modules/boto_vpc_test.py
@@ -190,6 +190,21 @@ class BotoVpcTestCase(TestCase):
self.assertFalse(subnet_creation_result)
+ @mock_ec2
+ def test_that_when_deleting_an_existing_subnet_the_delete_subnet_method_returns_true(self):
+ vpc = self._create_vpc()
+ subnet = self._create_subnet(vpc.id)
+
+ subnet_deletion_result = boto_vpc.delete_subnet(subnet.id, **conn_parameters)
+
+ self.assertTrue(subnet_deletion_result)
+
+ @mock_ec2
+ def test_that_when_deleting_a_non_existent_subnet_the_delete_vpc_method_returns_false(self):
+ subnet_deletion_result = boto_vpc.delete_subnet('1234', **conn_parameters)
+
+ self.assertFalse(subnet_deletion_result)
+
if __name__ == '__main__':
from integration import run_tests
|
Added unit tests that verify that subnet deletion reports success/failure correctly.
|
saltstack_salt
|
train
|
py
|
fdba401c495ad2aaabe75210a7765842c9ef822e
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -6,6 +6,11 @@ version = open("VERSION.txt", "rb").read().strip()
deps = ["setuptools"]
+if sys.version_info[:2] not in [(2, 6), (2, 7)]:
+ sys.stderr.write("Sorry, only Python 2.6 and Python 2.7 are supported "
+ "at this time. Python 3.x support is coming soon.\n")
+ exit(1)
+
setup(name="geojson",
version =version,
|
Limit execution of setup.py to Python <I>/<I>
|
jazzband_python-geojson
|
train
|
py
|
c8602e3572b9bb9d2e26e7fb3700b44b20ff870a
|
diff --git a/filters/component.js b/filters/component.js
index <HASH>..<HASH> 100644
--- a/filters/component.js
+++ b/filters/component.js
@@ -22,6 +22,7 @@ exports.include = ['*/build/build.js', '*/build/build.css'];
exports.exclude = '';
function apply(directory, filePath, options, res, next) {
+ next = guard(next);
//debug('%j -> %j using %j', directory, filePath, options);
var dir = filePath.replace(/\/[^\/]+$/g, '/');
//debug('dir %j', dir);
@@ -58,5 +59,16 @@ function apply(directory, filePath, options, res, next) {
debug('sent');
});
}, function () { return next(); })
+ .timeout(60000)
.done(null, next);
-};
\ No newline at end of file
+};
+
+
+function guard(next) {
+ var called = false;
+ return function () {
+ if (called) return;
+ called = true;
+ next.apply(this, arguments);
+ }
+}
\ No newline at end of file
|
Timeout component builds after <I> seconds
|
ForbesLindesay-Unmaintained_jproxy
|
train
|
js
|
5b8855319df7a9e6b114094046b10da4ed8c9e9b
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -66,7 +66,7 @@ ext_modules = [
setup(
name = 'dragnet',
- version = '1.1.0',
+ version = '2.0.2',
description = 'Extract the main article content (and optionally comments) from a web page',
author = 'Matt Peters, Dan Lecocq',
author_email = '[email protected], [email protected]',
@@ -99,5 +99,5 @@ setup(
'numpy',
'scipy',
'ftfy>=4.1.0,<5.0.0'
- ]
+ ]
)
|
Update version in setup.py to match pypi release.
|
dragnet-org_dragnet
|
train
|
py
|
c7c7d1e2a1c224ed6e520ab73dccff8b7e8ab5d6
|
diff --git a/dojo/nlp/TF_IDF.py b/dojo/nlp/TF_IDF.py
index <HASH>..<HASH> 100644
--- a/dojo/nlp/TF_IDF.py
+++ b/dojo/nlp/TF_IDF.py
@@ -31,6 +31,9 @@ class TF_IDF(BasePreprocessor):
self.idf_weighting_scheme = idf_weighting_scheme.lower()
self.k = k
+ self.unique_terms = []
+ self.idfs = {}
+
def _term_frequency(self, t, d):
arr = np.array(d.split(' '))
raw_count = np.count_nonzero(
@@ -56,7 +59,12 @@ class TF_IDF(BasePreprocessor):
return np.log(1 + N / (nt+1))
def fit(self, X):
- pass
+ X = super().fit(X)
+ self.unique_terms = np.unique([term for term in doc for doc in X])
+ self.idfs = {term: self._inverse_doc_frequency(term, X) for term in self.unique_terms}
def transform(self, X):
- pass
+ X = super().transform(X)
+ return np.array([
+ [self._term_frequency(term, doc) * self.idfs[term] for term, doc in zip(self.unique_terms, X)]
+ ])
|
[Update] TF-IDF fit/transform v1
|
VIVelev_PyDojoML
|
train
|
py
|
30d05ed842af021139f447ca37e327b0dc2c1608
|
diff --git a/lib/console/init.js b/lib/console/init.js
index <HASH>..<HASH> 100644
--- a/lib/console/init.js
+++ b/lib/console/init.js
@@ -18,7 +18,7 @@ function initConsole(args) {
}, args);
var baseDir = this.base_dir;
- var target = args._[0] ? pathFn.resolve(baseDir, args._[0]) : baseDir;
+ var target = args._[0] ? pathFn.resolve(baseDir, String(args._[0])) : baseDir;
var log = this.log;
var promise, npmCommand;
|
Fixed the invalid type error while running init with a numeric folder name. (#<I>)
|
hexojs_hexo-cli
|
train
|
js
|
875b224a9b3468f539333d66bc888367120a375e
|
diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py
index <HASH>..<HASH> 100644
--- a/pandas/io/formats/style.py
+++ b/pandas/io/formats/style.py
@@ -536,7 +536,7 @@ class Styler(StylerRenderer):
>>> df = pd.DataFrame([[1,2], [3,4]])
>>> s = df.style.highlight_max(axis=None,
... props='background-color:red; font-weight:bold;')
- >>> s.render()
+ >>> s.render() # doctest: +SKIP
The equivalent using LaTeX only commands is the following:
|
skipped doc test (#<I>)
|
pandas-dev_pandas
|
train
|
py
|
1ace4e607f01b98c42bbcec767e653ca4135ea49
|
diff --git a/test/interfaces_test.php b/test/interfaces_test.php
index <HASH>..<HASH> 100644
--- a/test/interfaces_test.php
+++ b/test/interfaces_test.php
@@ -45,6 +45,7 @@ class TestOfSpl extends UnitTestCase
static $classesToExclude = [
'SplHeap', // the method compare() is missing
'FilterIterator', // the method accept() is missing
+ 'RecursiveFilterIterator' // the method hasChildren() must contain body
];
foreach (spl_classes() as $class) {
@@ -53,7 +54,7 @@ class TestOfSpl extends UnitTestCase
if (in_array($class, $classesToExclude)) {
continue;
}
-
+
$mock_class = "Mock$class";
Mock::generate($class);
$this->assertIsA(new $mock_class(), $mock_class);
|
exclude RecursiveFilterIterator from mocking
|
simpletest_simpletest
|
train
|
php
|
da3f92fac4564643113b7722f64e3dd3f8c4af7e
|
diff --git a/ghost/admin/app/components/gh-billing-iframe.js b/ghost/admin/app/components/gh-billing-iframe.js
index <HASH>..<HASH> 100644
--- a/ghost/admin/app/components/gh-billing-iframe.js
+++ b/ghost/admin/app/components/gh-billing-iframe.js
@@ -13,9 +13,10 @@ export default Component.extend({
let iframe = this.element.querySelector('#billing-frame');
window.addEventListener('message', (event) => {
if (event && event.data && event.data.request === 'token') {
- const ghostIdentityUrl = this.get('ghostPaths.url').api('ghost-identity');
+ const ghostIdentityUrl = this.get('ghostPaths.url').api('identities');
- this.ajax.post(ghostIdentityUrl).then(({token}) => {
+ this.ajax.request(ghostIdentityUrl).then((response) => {
+ const token = response && response.identities && response.identities[0] && response.identities[0].token;
iframe.contentWindow.postMessage({
request: 'token',
response: token
|
Updated URL and response handling for identity token
no-issue
This just keeps the admin in line with the changes made in
<URL>
|
TryGhost_Ghost
|
train
|
js
|
1003d05fa479de216a8b1dd6a91204429ef5efc6
|
diff --git a/tests/Reference/Extension/PhpPecl/Memcached/MemcachedExtensionTest.php b/tests/Reference/Extension/PhpPecl/Memcached/MemcachedExtensionTest.php
index <HASH>..<HASH> 100644
--- a/tests/Reference/Extension/PhpPecl/Memcached/MemcachedExtensionTest.php
+++ b/tests/Reference/Extension/PhpPecl/Memcached/MemcachedExtensionTest.php
@@ -101,6 +101,12 @@ class MemcachedExtensionTest extends GenericTest
'Memcached::RES_MAXIMUM_RETURN',
];
+ self::$ignoredmethods = [
+ // only available in master branch and none tag
+ // @see https://github.com/php-memcached-dev/php-memcached/commit/7bbf4fbad3b25cb2628b96eafce50d19f22e3b47
+ 'Memcached::checkKey',
+ ];
+
parent::setUpBeforeClass();
}
}
|
fixed Memcached unit tests about unreferenced method in any version known
|
llaville_php-compatinfo-db
|
train
|
php
|
e88c14836e01643d520bc3a16a055007d13ada89
|
diff --git a/test/StatsTestCases.test.js b/test/StatsTestCases.test.js
index <HASH>..<HASH> 100644
--- a/test/StatsTestCases.test.js
+++ b/test/StatsTestCases.test.js
@@ -184,6 +184,10 @@ describe("StatsTestCases", () => {
actual = actual
.replace(/\r\n?/g, "\n")
.replace(/webpack [^ )]+(\)?) compiled/g, "webpack x.x.x$1 compiled")
+ .replace(
+ /LOG from webpack\.Compilation\.ModuleProfile\n([^\n]+\n)*\n/g,
+ ""
+ )
.replace(new RegExp(quotemeta(testPath), "g"), "Xdir/" + testName)
.replace(/(\w)\\(\w)/g, "$1/$2")
.replace(/, additional resolving: X ms/g, "");
|
exclude ModuleProfile from snapshot as it's not deterministic
|
webpack_webpack
|
train
|
js
|
0b0cbb6a4f5626ca6dcacdd372a14fb154199e4e
|
diff --git a/config/software/chef-init.rb b/config/software/chef-init.rb
index <HASH>..<HASH> 100644
--- a/config/software/chef-init.rb
+++ b/config/software/chef-init.rb
@@ -29,8 +29,8 @@ env = with_embedded_path()
env = with_standard_compiler_flags(env)
build do
- bundle "install"
- rake "build"
+ bundle "install", :env => env
+ rake "build", :env => env
gem ["install pkg/chef-init*.gem -n #{install_dir}/bin",
"--no-rdoc --no-ri"].join(" "), :env => env
end
|
adding :env to all commands on recommendation from @sersut
|
chef_chef
|
train
|
rb
|
36e6202b204220ce4656b51f881b40fceaf69624
|
diff --git a/ehforwarderbot/__version__.py b/ehforwarderbot/__version__.py
index <HASH>..<HASH> 100644
--- a/ehforwarderbot/__version__.py
+++ b/ehforwarderbot/__version__.py
@@ -1,3 +1,3 @@
# coding=utf-8
-__version__ = "2.1.1.dev3"
+__version__ = "2.1.1"
|
bump: bumping version: <I>.dev3 -> <I>
|
blueset_ehForwarderBot
|
train
|
py
|
0a6695f696809943aa3c90bea1bf9b2c99b94d26
|
diff --git a/grade/report/grader/db/access.php b/grade/report/grader/db/access.php
index <HASH>..<HASH> 100644
--- a/grade/report/grader/db/access.php
+++ b/grade/report/grader/db/access.php
@@ -1,2 +1,29 @@
+<?php // $Id$
+$gradereport_grader_capabilities = array(
+ 'gradereport/grader:view' => array(
+ 'riskbitmask' => RISK_PERSONAL,
+ 'captype' => 'read',
+ 'contextlevel' => CONTEXT_COURSE,
+ 'legacy' => array(
+ 'teacher' => CAP_ALLOW,
+ 'editingteacher' => CAP_ALLOW,
+ 'admin' => CAP_ALLOW
+ )
+ ),
+
+ 'gradereport/grader:manage' => array(
+ 'riskbitmask' => RISK_PERSONAL | RISK_CONFIG,
+ 'captype' => 'write',
+ 'contextlevel' => CONTEXT_COURSE,
+ 'legacy' => array(
+ 'teacher' => CAP_ALLOW,
+ 'editingteacher' => CAP_ALLOW,
+ 'admin' => CAP_ALLOW
+ )
+ )
+
+);
+
+?>
|
Added two capabilities for the grader report
|
moodle_moodle
|
train
|
php
|
9b489eae9b4baa7bfae2a573e63e12000abc59aa
|
diff --git a/src/ReduxTable.js b/src/ReduxTable.js
index <HASH>..<HASH> 100644
--- a/src/ReduxTable.js
+++ b/src/ReduxTable.js
@@ -144,6 +144,7 @@ export default class ReduxTable extends React.Component {
<Cell
key={selectDataKey(rowData) + key}
value={rowData[key]}
+ rowValue={rowData}
columnKey={key}
sorting={sorting}
/>
|
pass the whole row value to each cell
|
a-type_redux-data-table
|
train
|
js
|
e3e464df61df72aef42e9038c43a92ad406ed8dc
|
diff --git a/src/Node.php b/src/Node.php
index <HASH>..<HASH> 100644
--- a/src/Node.php
+++ b/src/Node.php
@@ -18,5 +18,21 @@ abstract class Node {
return $this->parent;
}
+ /**
+ * Get the ancestor of given type.
+ * @param string $type
+ * @return ParentNode
+ */
+ public function getAncestor($type) {
+ $ancestor = $this->parent;
+ while ($ancestor !== NULL) {
+ if ($ancestor instanceof $type) {
+ return $ancestor;
+ }
+ $ancestor = $ancestor->parent;
+ }
+ return NULL;
+ }
+
abstract public function getSourcePosition();
}
|
Added Node::getAncestor()
|
grom358_pharborist
|
train
|
php
|
40475c130f3498cfd3c209633e20a51e89850451
|
diff --git a/bread/__init__.py b/bread/__init__.py
index <HASH>..<HASH> 100644
--- a/bread/__init__.py
+++ b/bread/__init__.py
@@ -1,5 +1,5 @@
__title__ = 'bread'
-__version__ = '1.5.4'
+__version__ = '2.0.0'
__author__ = 'Alex Rasmussen'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 Alex Rasmussen'
diff --git a/docs/source/conf.py b/docs/source/conf.py
index <HASH>..<HASH> 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -48,9 +48,9 @@ copyright = u'2013, Alex Rasmussen'
# built documents.
#
# The short X.Y version.
-version = '1.5.4'
+version = '2.0.0'
# The full version, including alpha/beta/rc tags.
-release = '1.5.4'
+release = '2.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup
setup(name='bread',
- version='1.5.4',
+ version='2.0.0',
description='Binary format parsing made easier',
url='https://github.com/alexras/bread',
author='Alex Rasmussen',
|
Bumping version to <I>
|
alexras_bread
|
train
|
py,py,py
|
69de7fe59e45348eaac59c4c5adcde01ecd67337
|
diff --git a/benchmarks/empty_catalog/benchmarker.rb b/benchmarks/empty_catalog/benchmarker.rb
index <HASH>..<HASH> 100644
--- a/benchmarks/empty_catalog/benchmarker.rb
+++ b/benchmarks/empty_catalog/benchmarker.rb
@@ -12,12 +12,15 @@ class Benchmarker
end
def setup
- require 'puppet'
- config = File.join(@target, 'puppet.conf')
- Puppet.initialize_settings(['--config', config])
end
def run(args=nil)
+ unless @initialized
+ require 'puppet'
+ config = File.join(@target, 'puppet.conf')
+ Puppet.initialize_settings(['--config', config])
+ @initialized = true
+ end
env = Puppet.lookup(:environments).get('benchmarking')
node = Puppet::Node.new("testing", :environment => env)
Puppet::Resource::Catalog.indirection.find("testing", :use_node => node)
|
(perf) Change benchmark:empty_catalog to include measure of startup
The intent of this benchmark is to provide measures for optimizing the
puppet apply case, not including the startup time skewes the result in
favor of the current parser/evaluator as it is loaded as part of
startup, and "pops" is loaded lazily when a compilation takes place.
|
puppetlabs_puppet
|
train
|
rb
|
7cee88dc3ee7ab7c9c69b0a6e91f78882cddce5b
|
diff --git a/openpnm/algorithms/GenericTransport.py b/openpnm/algorithms/GenericTransport.py
index <HASH>..<HASH> 100644
--- a/openpnm/algorithms/GenericTransport.py
+++ b/openpnm/algorithms/GenericTransport.py
@@ -438,7 +438,7 @@ class GenericTransport(GenericAlgorithm):
# Set tolerance for iterative solvers
min_A = np.abs(A.data).min()
min_b = np.min(b[np.nonzero(b)])
- tol = min(min_A, min_b) * 1e-04
+ tol = min(min_A, min_b) * def_set['atol']
# Default behavior -> use Scipy
if type(settings) == str:
|
Set default tol from settings instead of hard code
|
PMEAL_OpenPNM
|
train
|
py
|
985971be4501f5524c2075c1cd348f41bbd6b138
|
diff --git a/Octo/Shop/Admin/Controller/ProductController.php b/Octo/Shop/Admin/Controller/ProductController.php
index <HASH>..<HASH> 100644
--- a/Octo/Shop/Admin/Controller/ProductController.php
+++ b/Octo/Shop/Admin/Controller/ProductController.php
@@ -6,7 +6,7 @@ use Octo\Admin\Form as FormElement;
use Octo\Admin\Controller;
use Octo\Admin\Menu;
use Octo\Form\Element\ImageUpload;
-use Octo\Shop\Model\Item;
+use Octo\Invoicing\Model\Item;
use Octo\Shop\Model\ItemFile;
use Octo\Shop\Model\ItemVariant;
use Octo\System\Model\File;;
|
Products to use Invoicing/Model/Item.
|
Block8_Octo
|
train
|
php
|
037c416f7063aafa52b9ac6e0f015c51dc303222
|
diff --git a/src/atoms/Icon/constants.js b/src/atoms/Icon/constants.js
index <HASH>..<HASH> 100644
--- a/src/atoms/Icon/constants.js
+++ b/src/atoms/Icon/constants.js
@@ -41,6 +41,7 @@ module.exports = {
'chatQuestionPadded',
'checkBlackGreyCircle',
'checkCircle',
+ 'checkCircleBlue',
'checkMark-1',
'checklist',
'checklistFolded',
|
Add checkCircleBlue to Icon constants (#<I>)
|
policygenius_athenaeum
|
train
|
js
|
26c9448a1d7bf01396f0c23e602283879113ab5f
|
diff --git a/lib/wed/wed.js b/lib/wed/wed.js
index <HASH>..<HASH> 100644
--- a/lib/wed/wed.js
+++ b/lib/wed/wed.js
@@ -417,7 +417,9 @@ Editor.prototype._postInitialize = log.wrap(function () {
"._real, ._phantom_wrap, .wed-document",
function ($root, $added, $removed, $prev, $next, $target) {
if ($added.is("._real, ._phantom_wrap") ||
- $removed.is("._real, ._phantom_wrap")) {
+ $added.filter(jqutil.textFilter).length ||
+ $removed.is("._real, ._phantom_wrap") ||
+ $removed.filter(jqutil.textFilter).length) {
this._last_done_shown = 0;
this.validator.restartAt($target.get(0));
}
|
Addition or removal of text nodes should trigger a revalidation.
|
mangalam-research_wed
|
train
|
js
|
e592434eec88ee9049fbb57431b4355b09d672e3
|
diff --git a/lib/rackstash/buffer.rb b/lib/rackstash/buffer.rb
index <HASH>..<HASH> 100644
--- a/lib/rackstash/buffer.rb
+++ b/lib/rackstash/buffer.rb
@@ -80,8 +80,8 @@ module Rackstash
clear
end
- # Extract useful data from an exception and add it to fields of the buffer
- # for structured logging. The following fields will be set:
+ # Extract useful data from an exception and add it to fields of the current
+ # buffer for structured logging. The following fields will be set:
#
# * `error` - The class name of the exception
# * `error_message` - The exception's message
@@ -95,9 +95,9 @@ module Rackstash
# `false`, we will preserve existing exceptions.
#
# If a new exception was set, the buffer will be flushed to all
- # auto_flushing flows automatically. If the buffer is not {#buffering?}, it
- # will also be flushed to the non auto_flushing flows and cleared
- # afterwards.
+ # auto_flushing flows automatically. If the buffer is not buffering log
+ # messages, it will also be flushed to the non auto_flushing flows and
+ # cleared afterwards.
#
# @param exception [Exception] an Exception object as caught by a
# `begin` ... `rescue` block.
|
Do not mention local methods of Buffer class in methods docs referenced by Logger
|
meineerde_rackstash
|
train
|
rb
|
7ec55ed3ff71d8e6bdeaca058d592c5862621975
|
diff --git a/fabfile.py b/fabfile.py
index <HASH>..<HASH> 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -714,7 +714,7 @@ def docker(subtask='info'):
parsed_commands = []
replacements = {}
- for key in ('user', 'host', 'port', 'branch'):
+ for key in ('user', 'host', 'port', 'branch', 'rootFolder'):
replacements['%guest.'+key+'%'] = str(env.config[key])
for key in ('user', 'host', 'port', 'rootFolder'):
replacements['%'+key+'%'] = str(docker_configuration[key])
|
allow rootFolder for docker-script-replacements via %guest.rootFolder%
|
factorial-io_fabalicious
|
train
|
py
|
8af3576360c51219fd4c8eb600d83bc9c09eb84d
|
diff --git a/go/vt/servenv/grpc_codec.go b/go/vt/servenv/grpc_codec.go
index <HASH>..<HASH> 100644
--- a/go/vt/servenv/grpc_codec.go
+++ b/go/vt/servenv/grpc_codec.go
@@ -3,7 +3,10 @@ package servenv
import (
"fmt"
- "github.com/golang/protobuf/proto"
+ // use the original golang/protobuf package we can continue serializing
+ // messages from our dependencies, particularly from etcd
+ "github.com/golang/protobuf/proto" //nolint
+
"google.golang.org/grpc/encoding"
_ "google.golang.org/grpc/encoding/proto"
)
|
grpc: disable linting
|
vitessio_vitess
|
train
|
go
|
a08ebd2fd315a07a06bae594fe627963519fd885
|
diff --git a/js/huobipro.js b/js/huobipro.js
index <HASH>..<HASH> 100644
--- a/js/huobipro.js
+++ b/js/huobipro.js
@@ -456,12 +456,12 @@ module.exports = class huobipro extends Exchange {
async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) {
await this.loadMarkets ();
- let market = this.market (symbol);
- let request = {
- 'symbol': market['id'],
- };
- let response = await this.privateGetOrderMatchresults (this.extend (request, params));
- let trades = this.parseTrades (response['data'], market, since, limit);
+ let response = await this.privateGetOrderMatchresults (params);
+ let trades = this.parseTrades (response['data'], undefined, since, limit);
+ if (symbol !== undefined) {
+ let market = this.market (symbol);
+ trades = this.filterBySymbol (trades, market['symbol']);
+ }
return trades;
}
|
reverted previous fetchMyTrades change
|
ccxt_ccxt
|
train
|
js
|
e691d09a250b34181866da37e0a64bc516e0e51a
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -22,7 +22,7 @@ function decodeFGHIURL(encodedString){
// takes a string
function FidonetURL(initialString){
// a fair number of helper functions is used in object's context (this)!
- // _END_OF_HELPER_FUNCTIONS_ below is the�real constructor code's start
+ // _END_OF_HELPER_FUNCTIONS_ below is the real constructor code's start
var parseStation = function(){
// takes this.station and makes slices:
|
erased a non-ASCII character, made jshint (default mode) very happy
|
Mithgol_FGHI-URL
|
train
|
js
|
ea70a464319d3b9d9452ad790490bf32d7aa95c5
|
diff --git a/master/buildbot/test/__init__.py b/master/buildbot/test/__init__.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/test/__init__.py
+++ b/master/buildbot/test/__init__.py
@@ -114,6 +114,11 @@ warnings.filterwarnings('ignore', ".*the imp module is deprecated in favour of i
# sqlalchemy-migrate uses deprecated api from sqlalchemy https://review.openstack.org/#/c/648072/
warnings.filterwarnings('ignore', ".*Engine.contextual_connect.*", DeprecationWarning)
+warnings.filterwarnings('ignore', r'.*The Table.exists\(\) method is deprecated.*',
+ DeprecationWarning)
+warnings.filterwarnings('ignore', '.*is already present in table.*',
+ DeprecationWarning)
+
# ignore an attrs API warning for APIs used in dependencies
warnings.filterwarnings('ignore', ".*The usage of `cmp` is deprecated and will be removed "
"on or after.*", DeprecationWarning)
|
test: Ignore deprecation warnings of API used by sqlalchemy-migrate
|
buildbot_buildbot
|
train
|
py
|
5b46d2722e3bf39f5a287e3e0e6db3ecbc9d4d7a
|
diff --git a/build/tasks/build-release/download.js b/build/tasks/build-release/download.js
index <HASH>..<HASH> 100644
--- a/build/tasks/build-release/download.js
+++ b/build/tasks/build-release/download.js
@@ -1,7 +1,7 @@
/* jshint unused:vars, undef:true, node:true */
module.exports = function(grunt, config, parameters, done) {
- var zipUrl = parameters.releaseSourceZip || 'https://github.com/concrete5/concrete5/archive/release/8.2.1.zip';
+ var zipUrl = parameters.releaseSourceZip || 'https://github.com/concrete5/concrete5/archive/release/8.3.0.zip';
var workFolder = parameters.releaseWorkFolder || './release';
function endForError(e) {
process.stderr.write(e.message || e);
|
updating download.js for new build
|
concrete5_concrete5
|
train
|
js
|
f1b555aba932870a8a8920f0d12134c1528c0449
|
diff --git a/src/Toml.php b/src/Toml.php
index <HASH>..<HASH> 100644
--- a/src/Toml.php
+++ b/src/Toml.php
@@ -42,7 +42,7 @@ class Toml
try {
$data = self::doParse($input, $resultAsObject);
} catch (SyntaxErrorException $e) {
- $exception = new ParseException($e->getMessage());
+ $exception = new ParseException($e->getMessage(), -1, null, null, $e);
if ($token = $e->getToken()) {
$exception->setParsedLine($token->getLine());
|
Added the inner exception when a `ParseException` is thrown in method `parse` of class `Toml`
|
yosymfony_toml
|
train
|
php
|
8ab479dbc3f25ed6bf5ae3a3e675606b87a9757c
|
diff --git a/src/ol-ext/format/featurehash.js b/src/ol-ext/format/featurehash.js
index <HASH>..<HASH> 100644
--- a/src/ol-ext/format/featurehash.js
+++ b/src/ol-ext/format/featurehash.js
@@ -194,7 +194,7 @@ ngeo.format.FeatureHash.CHAR64_ =
* @const
* @private
*/
-ngeo.format.FeatureHash.ACCURACY_ = 1;
+ngeo.format.FeatureHash.ACCURACY_ = 0.1;
/**
|
FeatureHash - Use same accuracy as in cgxp
|
camptocamp_ngeo
|
train
|
js
|
bdaa43510b294bf49bbac1392d5518611c06eedc
|
diff --git a/cmd/disasm/main.go b/cmd/disasm/main.go
index <HASH>..<HASH> 100644
--- a/cmd/disasm/main.go
+++ b/cmd/disasm/main.go
@@ -21,8 +21,9 @@ import (
"fmt"
"io/ioutil"
"os"
+ "encoding/hex"
+ "strings"
- "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/vm"
)
@@ -32,7 +33,11 @@ func main() {
fmt.Println(err)
os.Exit(1)
}
- code = common.Hex2Bytes(string(code[:len(code)-1]))
+ code, err = hex.DecodeString(strings.TrimSpace(string(code[:])))
+ if err != nil {
+ fmt.Printf("Error: %v\n", err)
+ return
+ }
fmt.Printf("%x\n", code)
for pc := uint64(0); pc < uint64(len(code)); pc++ {
|
cmd/disasm: fix off-by-one error and improve error handling (#<I>)
|
ethereum_go-ethereum
|
train
|
go
|
0d01a50dd64b69383faaf1e8d3df1e5e72813558
|
diff --git a/karaage/applications/forms.py b/karaage/applications/forms.py
index <HASH>..<HASH> 100644
--- a/karaage/applications/forms.py
+++ b/karaage/applications/forms.py
@@ -61,12 +61,18 @@ class UserApplicantForm(ApplicantForm):
return data
+ def clean_email(self):
+ email = self.cleaned_data['email']
+ users = Person.active.filter(user__email__exact=email)
+ if users:
+ raise forms.ValidationError(u'An account with this email already exists. Please email %s' % settings.ACCOUNTS_EMAIL)
+ return email
+
def clean(self):
from karaage.util.helpers import create_password_hash
super(self.__class__, self).clean()
if 'password1' in self.cleaned_data:
self.cleaned_data['password'] = create_password_hash(self.cleaned_data['password1'])
- print self.cleaned_data
return self.cleaned_data
|
Make sure email isn't already in the system when signing up for accounts
|
Karaage-Cluster_karaage
|
train
|
py
|
52c01d2667adfd68210a0905b75c30ff4363f10e
|
diff --git a/tests/Doctrine/Tests/Inflector/Rules/English/EnglishFunctionalTest.php b/tests/Doctrine/Tests/Inflector/Rules/English/EnglishFunctionalTest.php
index <HASH>..<HASH> 100644
--- a/tests/Doctrine/Tests/Inflector/Rules/English/EnglishFunctionalTest.php
+++ b/tests/Doctrine/Tests/Inflector/Rules/English/EnglishFunctionalTest.php
@@ -201,6 +201,7 @@ class EnglishFunctionalTest extends LanguageFunctionalTest
['jeans', 'jeans'],
['jedi', 'jedi'],
['kiplingese', 'kiplingese'],
+ ['kitchenware', 'kitchenware'],
['kiss', 'kisses'],
['knife', 'knives'],
['knife', 'knives'],
@@ -410,6 +411,7 @@ class EnglishFunctionalTest extends LanguageFunctionalTest
['virus', 'viri'],
['volcano', 'volcanoes'],
['volcano', 'volcanoes'],
+ ['ware', 'wares'],
['wash', 'washes'],
['watch', 'watches'],
['wave', 'waves'],
|
Add test cases for generic English -ware rule
|
doctrine_inflector
|
train
|
php
|
17a5fa6840b612c2f81634c1ddc5cbc063fe640a
|
diff --git a/.bach/src/build/build/Build.java b/.bach/src/build/build/Build.java
index <HASH>..<HASH> 100644
--- a/.bach/src/build/build/Build.java
+++ b/.bach/src/build/build/Build.java
@@ -17,6 +17,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
+/** Silk's build program. */
class Build {
public static void main(String... args) throws Exception {
@@ -37,7 +38,9 @@ class Build {
.with(
Project.of("silk", version)
.with(Sources.of().with(MainSources.of().with(SourceUnits.of().with(unit))))
- .withTestSource("src/se.jbee.inject/test/java-module")
+ .withTestSource("src/se.jbee.inject/test/java-module") // in-module tests
+ .withTestSource("src/com.example.app/test/java") // silk's first client
+ .withTestSource("src/com.example.test/test/java") // modular integration tests
.with(
Library.of()
.withRequires("org.hamcrest")
|
Include in-module tests and modular integration tests
|
jbee_silk
|
train
|
java
|
5458e9c1de0bafced6d125d25c40ea89ba07dc61
|
diff --git a/src/Illuminate/Validation/Validator.php b/src/Illuminate/Validation/Validator.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Validation/Validator.php
+++ b/src/Illuminate/Validation/Validator.php
@@ -9,7 +9,7 @@ use Illuminate\Container\Container;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;
-use Illuminate\Support\Contracts\MessageProviderInterface;
+use Illuminate\Support\Contracts\MessageProviderInterface;
class Validator implements MessageProviderInterface {
|
Delete whitespace
Delete whitespace
|
laravel_framework
|
train
|
php
|
8e0fde8343243a4761e29dad80b657ec84aaf288
|
diff --git a/test/MysqlPersistentConnectionTest.php b/test/MysqlPersistentConnectionTest.php
index <HASH>..<HASH> 100644
--- a/test/MysqlPersistentConnectionTest.php
+++ b/test/MysqlPersistentConnectionTest.php
@@ -71,6 +71,7 @@ class MysqlPersistentConnectionTest extends TestCase
case 'information_schema':
case 'performance_schema':
case 'travis':
+ case 'sys':
return false;
default:
return true;
|
Also exclude 'sys' as database (Travis) (#<I>)
this makes Travis happy
|
hostnet_database-test-lib
|
train
|
php
|
3cf39b1030a8ea4b1c71e3f63d6a7fe1c852aa49
|
diff --git a/lib/gov_kit.rb b/lib/gov_kit.rb
index <HASH>..<HASH> 100644
--- a/lib/gov_kit.rb
+++ b/lib/gov_kit.rb
@@ -10,7 +10,7 @@ require 'json'
require 'gov_kit/configuration'
require 'csv'
-if VERSION[0,3] == "1.8"
+if RUBY_VERSION[0,3] == "1.8"
require 'fastercsv'
end
|
Made version check compatible with Ruby <I>.
|
opengovernment_govkit
|
train
|
rb
|
29cdabf45a10a8ded11f98a505399b3033f7d3b1
|
diff --git a/src/Annotations/Handler/CollectionHandler.php b/src/Annotations/Handler/CollectionHandler.php
index <HASH>..<HASH> 100644
--- a/src/Annotations/Handler/CollectionHandler.php
+++ b/src/Annotations/Handler/CollectionHandler.php
@@ -17,6 +17,11 @@ class CollectionHandler extends AbstractHandler implements HandlerInterface
}
foreach ($annotation->properties() as $property) {
+ if (!isset($json[$property])) {
+ $json[$property] = [];
+ continue;
+ }
+
$array = $json[$property];
if (!is_array($array)) {
|
Ensure missing properties are filled up with an empty array
|
php-api-clients_hydrator
|
train
|
php
|
d3d8d368c583724b214c2d497aa58df7181434a9
|
diff --git a/pandas/tests/test_groupby.py b/pandas/tests/test_groupby.py
index <HASH>..<HASH> 100644
--- a/pandas/tests/test_groupby.py
+++ b/pandas/tests/test_groupby.py
@@ -1265,6 +1265,18 @@ class TestGroupBy(unittest.TestCase):
for key, group in grouped:
assert_frame_equal(result.ix[key], f(group))
+ def test_apply_chunk_view(self):
+ # Low level tinkering could be unsafe, make sure not
+ df = DataFrame({'key': [1, 1, 1, 2, 2, 2, 3, 3, 3],
+ 'value': range(9)})
+
+ # return view
+ f = lambda x: x[:2]
+
+ result = df.groupby('key', group_keys=False).apply(f)
+ expected = df.take([0, 1, 3, 4, 6, 7])
+ assert_frame_equal(result, expected)
+
def test_groupby_series_indexed_differently(self):
s1 = Series([5.0,-9.0,4.0,100.,-5.,55.,6.7],
index=Index(['a','b','c','d','e','f','g']))
|
TST: unit test for groupby apply
|
pandas-dev_pandas
|
train
|
py
|
0bedc738473ccf04caf2d92cd0b702250f76e76d
|
diff --git a/lib/jsi/base.rb b/lib/jsi/base.rb
index <HASH>..<HASH> 100644
--- a/lib/jsi/base.rb
+++ b/lib/jsi/base.rb
@@ -128,7 +128,7 @@ module JSI
#
# @return [JSI::Base, self]
def deref
- derefed = instance.deref
+ derefed = instance.respond_to?(:deref) ? instance.deref : instance
if derefed.object_id == instance.object_id
self
else
|
Base#deref returns self if instance has no deref
|
notEthan_jsi
|
train
|
rb
|
39de6327c2611966c491c2fcf4d9c7379cc411d1
|
diff --git a/tests/_support/Page/bill/Create.php b/tests/_support/Page/bill/Create.php
index <HASH>..<HASH> 100644
--- a/tests/_support/Page/bill/Create.php
+++ b/tests/_support/Page/bill/Create.php
@@ -124,6 +124,11 @@ JS
$this->tester->click('div.bill-charges>div:last-child button');
}
+ public function deleteChargeByName(string $chargeName): void
+ {
+ $this->tester->executeJS(';$("div.bill-charges :contains(\'" + arguments[0] + "\')").parents(".charge-item").find("button").click();', [$chargeName]);
+ }
+
/**
* Checks whether a bill was created successfully and returns its id.
*
diff --git a/tests/acceptance/manager/PaymentsCest.php b/tests/acceptance/manager/PaymentsCest.php
index <HASH>..<HASH> 100644
--- a/tests/acceptance/manager/PaymentsCest.php
+++ b/tests/acceptance/manager/PaymentsCest.php
@@ -123,7 +123,7 @@ class PaymentsCest
$updatePage->containsCharges(2);
- $updatePage->deleteLastCharge();
+ $updatePage->deleteChargeByName('TEST01');
$updatePage->containsCharges(1);
$chargesSum = $updatePage->getChargesTotalSum();
|
Fixed PaymentCest:ensureICanUpdateBill, delete charge by name (#<I>)
|
hiqdev_hipanel-module-finance
|
train
|
php,php
|
021773833ba2d0dc74709ef33f0923536e364713
|
diff --git a/lib/sessionManager.js b/lib/sessionManager.js
index <HASH>..<HASH> 100644
--- a/lib/sessionManager.js
+++ b/lib/sessionManager.js
@@ -265,6 +265,7 @@ Jingle.prototype.process = function (req) {
this.peers[sender] = [];
}
this.peers[sender].push(session);
+ this.emit('createdSession', session);
}
session.process(action, req.jingle, function (err) {
@@ -300,6 +301,7 @@ Jingle.prototype.createMediaSession = function (peer, sid, stream) {
this.peers[peer] = [];
}
this.peers[peer].push(session);
+ this.emit('createdSession', session);
log('Outgoing session', session.sid, session);
this.emit('outgoing', session);
@@ -321,6 +323,7 @@ Jingle.prototype.createFileTransferSession = function (peer, sid) {
this.peers[peer] = [];
}
this.peers[peer].push(session);
+ this.emit('createdSession', session);
log('Outgoing session', session.sid, session);
this.emit('outgoing', session);
|
add createdSession event to allow hooking the traceablepeerconnection events early
|
otalk_jingle.js
|
train
|
js
|
b250ad03133833ee25640b5039d2c371fc825f06
|
diff --git a/test/function/matrix/cross.test.js b/test/function/matrix/cross.test.js
index <HASH>..<HASH> 100644
--- a/test/function/matrix/cross.test.js
+++ b/test/function/matrix/cross.test.js
@@ -23,9 +23,9 @@ describe('cross', function() {
});
it('should calculate cross product for n-d arrays and matrices', function () {
- assert.deepEqual(math.cross([[1, 2, 3]], [[4, 5, 6]]), [-3, 6, -3]);
- assert.deepEqual(math.cross([[1], [2], [3]], [4, 5, 6]), [-3, 6, -3]);
- assert.deepEqual(math.cross([[[[1, 2, 3]]]], [[4, 5, 6]]), [-3, 6, -3]);
+ assert.deepEqual(math.cross([[1, 2, 3]], [[4, 5, 6]]), [[-3, 6, -3]]);
+ assert.deepEqual(math.cross([[1], [2], [3]], [4, 5, 6]), [[-3, 6, -3]]);
+ assert.deepEqual(math.cross([[[[1, 2, 3]]]], [[4, 5, 6]]), [[-3, 6, -3]]);
});
it('should throw an error for unsupported types of arguments', function() {
|
Change spec for output vector's shape for cross()
Depending on the input vectors' dimensions, either a 1-d vector or a 2-d
matrix should be returned.
|
josdejong_mathjs
|
train
|
js
|
419bf7a4c653165b2690b4cb538db4f079323ae1
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -122,7 +122,7 @@ setup(
#
# For an analysis of "install_requires" vs pip's requirements files see:
# https://packaging.python.org/en/latest/requirements.html
- install_requires=['click', 'sqlalchemy', 'piecash', 'gnucash_portfolio'], # Optional
+ install_requires=['click', 'sqlalchemy', 'piecash', 'pricedb', 'gnucash_portfolio'], # Optional
python_requires='>=3.0',
|
#<I> adding pricedb as a dependency
|
MisterY_asset-allocation
|
train
|
py
|
561dda3134a2719d8b45ea7d81aaa42a8ce50f1f
|
diff --git a/src/main/java/com/couchbase/cblite/replicator/CBLPusher.java b/src/main/java/com/couchbase/cblite/replicator/CBLPusher.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/couchbase/cblite/replicator/CBLPusher.java
+++ b/src/main/java/com/couchbase/cblite/replicator/CBLPusher.java
@@ -296,15 +296,15 @@ public class CBLPusher extends CBLReplicator implements CBLDatabaseChangedFuncti
multiPart = null;
}
else {
- // workaround for issue #80 - it was looking at the "content_type" field instead of "content-type".
- // fix is backwards compatible in case any code is using content_type.
String contentType = null;
if (attachment.containsKey("content_type")) {
contentType = (String) attachment.get("content_type");
- Log.w(CBLDatabase.TAG, "Found attachment that uses content_type field name instead of content-type: " + attachment);
}
else if (attachment.containsKey("content-type")) {
- contentType = (String) attachment.get("content-type");
+ String message = String.format("Found attachment that uses content-type" +
+ " field name instead of content_type (see couchbase-lite-android" +
+ " issue #80): " + attachment);
+ Log.w(CBLDatabase.TAG, message);
}
multiPart.addPart(attachmentKey, new InputStreamBody(inputStream, contentType, attachmentKey));
}
|
Remove the workaround which allowed use of content-type. Make it strictly use content_type. It will print a warning if it sees content-type but just ignore it. (issue #<I>)
|
couchbase_couchbase-lite-java-core
|
train
|
java
|
465499958558c5335ab2fbbe868c564414cf0a70
|
diff --git a/lib/zendesk_apps_support/package.rb b/lib/zendesk_apps_support/package.rb
index <HASH>..<HASH> 100644
--- a/lib/zendesk_apps_support/package.rb
+++ b/lib/zendesk_apps_support/package.rb
@@ -88,11 +88,11 @@ module ZendeskAppsSupport
end
def js_files
- files.select { |f| f =~ /\.js$/ }
+ @js_files ||= files.select { |f| f =~ /\.js$/ }
end
def lib_files
- @lib_files ||= files.select { |f| f =~ /^lib\/.*\.js$/ }
+ @lib_files ||= js_files.select { |f| f =~ /^lib\/.*\.js$/ }
end
def template_files
|
use js_files instead of files and cache it
|
zendesk_zendesk_apps_support
|
train
|
rb
|
f00d8ac93bad39db116fe09009120ec9731cc1eb
|
diff --git a/tests/calculators/hazard/classical/post_processing_test.py b/tests/calculators/hazard/classical/post_processing_test.py
index <HASH>..<HASH> 100644
--- a/tests/calculators/hazard/classical/post_processing_test.py
+++ b/tests/calculators/hazard/classical/post_processing_test.py
@@ -473,14 +473,6 @@ class HazardMapsTestCase(unittest.TestCase):
actual = post_processing.compute_hazard_maps(curves, imls, poes)
aaae(expected, actual)
- def test_do_hazard_map_post_process(self):
- cfg = helpers.get_data_path(
- 'calculators/hazard/classical/haz_map_test_job.ini')
- job = helpers.run_hazard_job(cfg)
-
- hazard_maps = models.HazardMap.objects.filter(output__oq_job=job)
- # TODO: verify hazard maps
-
class HazardMapTaskFuncTestCase(unittest.TestCase):
|
tests/calcs/hazard/classical/post_processing_test:
Removed a useless test.
|
gem_oq-engine
|
train
|
py
|
793187a4f47539a566c0808994ff76b939fb3044
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -58,11 +58,12 @@ function loader(patterns, config) {
function appLoader(app, config) {
app.define('load', load('view', config));
- var emit = app.emit;
+ var fn = app.view;
- app.define('emit', function(name, view) {
- if (name === 'view') utils.contents.sync(view);
- emit.apply(app, arguments);
+ app.define('view', function() {
+ var view = fn.apply(this, arguments);
+ utils.contents.sync(view);
+ return view;
});
}
|
wrap `app.view` instead of emit
this ensures that view.contents will be loaded regardless of whether or not listeners are registered. we don't want to emit events when no listeners are registered.
|
assemble_assemble-loader
|
train
|
js
|
cf8c411bef19c1dce76a2d124683653b277f45f8
|
diff --git a/test/test_nested.py b/test/test_nested.py
index <HASH>..<HASH> 100644
--- a/test/test_nested.py
+++ b/test/test_nested.py
@@ -366,6 +366,8 @@ sos_run('A', shared='executed')
subprocess.call('sos remove -s', shell=True)
for file in ('a.txt.a1', 'a.txt.a1.a2', 'b.txt.a1', 'b.txt.a1.a2'):
file_target(file).remove('both')
+ #
+ env.sos_dict.pop('executed', None)
script = SoS_Script('''
%include inc as k
|
Fix tests for included nested workflow using interactive executor
|
vatlab_SoS
|
train
|
py
|
13ebf1b89cc51d6a9daa301ad07b4a5582174f4f
|
diff --git a/tests/test_text_utils.py b/tests/test_text_utils.py
index <HASH>..<HASH> 100644
--- a/tests/test_text_utils.py
+++ b/tests/test_text_utils.py
@@ -62,9 +62,9 @@ def test_compare_str(left, right, score):
@pytest.mark.parametrize('input,n,output', [
- ['Lille', 2, {'Li', 'il', 'll', 'le'}],
- ['Lille', 3, {'Lil', 'ill', 'lle'}],
- ['L', 3, {'L'}],
+ ['Lille', 2, {' l', 'li', 'il', 'll', 'le', 'e '}],
+ ['Lille', 3, {' li', 'lil', 'ill', 'lle','le '}],
+ ['L', 3, {' l '}],
])
def test_ngrams(input, n, output):
assert ngrams(input, n) == output
|
ngrams are now padded with spaces
|
addok_addok
|
train
|
py
|
183456ad800beef105f904cb37ce0c37a9d7119f
|
diff --git a/pysc2/lib/remote_controller.py b/pysc2/lib/remote_controller.py
index <HASH>..<HASH> 100644
--- a/pysc2/lib/remote_controller.py
+++ b/pysc2/lib/remote_controller.py
@@ -147,7 +147,7 @@ class RemoteController(object):
"""Create a new game. This can only be done by the host."""
return self._client.send(create_game=req_create_game)
- @valid_status(Status.launched)
+ @valid_status(Status.launched, Status.init_game)
@decorate_check_error(sc_pb.ResponseSaveMap.Error)
@sw.decorate
def save_map(self, map_path, map_data):
|
RequestSaveMap is valid in init_game. This is needed to be first-player on the sc2ai.net ladder.
PiperOrigin-RevId: <I>
|
deepmind_pysc2
|
train
|
py
|
b741774c88de221a9561b3218eb858361d201a2f
|
diff --git a/splunk_handler/__init__.py b/splunk_handler/__init__.py
index <HASH>..<HASH> 100644
--- a/splunk_handler/__init__.py
+++ b/splunk_handler/__init__.py
@@ -310,7 +310,7 @@ class SplunkHandler(logging.Handler):
# without looking at each item, estimate how many can fit in 50 MB
apprx_size_base = len(self.queue[0])
# dont count more than what is in queue to ensure the same number as pulled are deleted
- count = min(int(524288 / apprx_size_base), len(self.queue))
+ count = max(min(int(524288 / apprx_size_base), len(self.queue)), 1)
self.log_payload += ''.join(self.queue[:count])
del self.queue[:count]
self.write_debug_log("Queue task completed")
|
Fix queued event ><I>MB causes hang
|
zach-taylor_splunk_handler
|
train
|
py
|
53ca73ab745c15c1e01bfef7340080d532fafabc
|
diff --git a/timeside/server/urls.py b/timeside/server/urls.py
index <HASH>..<HASH> 100644
--- a/timeside/server/urls.py
+++ b/timeside/server/urls.py
@@ -26,6 +26,7 @@ api_router.register(r'items', views.ItemViewSet)
api_router.register(r'providers', views.ProviderViewSet)
api_router.register(r'selections', views.SelectionViewSet)
api_router.register(r'processors', views.ProcessorViewSet)
+api_router.register(r'subprocessors', views.SubProcessorViewSet)
api_router.register(r'presets', views.PresetViewSet)
api_router.register(r'experiences', views.ExperienceViewSet)
api_router.register(r'tasks', views.TaskViewSet)
diff --git a/timeside/server/views.py b/timeside/server/views.py
index <HASH>..<HASH> 100644
--- a/timeside/server/views.py
+++ b/timeside/server/views.py
@@ -209,7 +209,7 @@ class ProcessorViewSet(viewsets.ReadOnlyModelViewSet):
return Response(serializer.data)
-class SubProcessorViewSet(viewsets.ModelViewSet):
+class SubProcessorViewSet(viewsets.ReadOnlyModelViewSet):
"""Link between a processor depending on another."""
model = models.SubProcessor
queryset = model.objects.all()
|
[server] put subprocessors back into the api fixing #<I> setting corresponding view to readOnly
|
Parisson_TimeSide
|
train
|
py,py
|
9e23e0baf30774c3fef7634055f8a35d37fb09aa
|
diff --git a/nutch/test_nutch.py b/nutch/test_nutch.py
index <HASH>..<HASH> 100644
--- a/nutch/test_nutch.py
+++ b/nutch/test_nutch.py
@@ -189,5 +189,4 @@ def test_crawl_client():
assert len(rounds) == 1
assert cc.currentJob is None
jobs = rounds[0]
- assert len(jobs) == 4
assert all([j.info()['state'] == 'FINISHED' for j in jobs])
\ No newline at end of file
|
Remove len(jobs) test.
I'm not quite sure how to do this one correctly right now.
|
chrismattmann_nutch-python
|
train
|
py
|
36fc363bddf265b62b6c4324049aee12476786db
|
diff --git a/runtime/src/main/java/io/micronaut/reactive/rxjava2/converters/RxJavaConverterRegistrar.java b/runtime/src/main/java/io/micronaut/reactive/rxjava2/converters/RxJavaConverterRegistrar.java
index <HASH>..<HASH> 100644
--- a/runtime/src/main/java/io/micronaut/reactive/rxjava2/converters/RxJavaConverterRegistrar.java
+++ b/runtime/src/main/java/io/micronaut/reactive/rxjava2/converters/RxJavaConverterRegistrar.java
@@ -99,7 +99,7 @@ public class RxJavaConverterRegistrar implements TypeConverterRegistrar {
);
conversionService.addConverter(Publisher.class, Single.class, (Function<Publisher, Single>) Single::fromPublisher);
conversionService.addConverter(Publisher.class, Observable.class, (Function<Publisher, Observable>) Observable::fromPublisher);
- conversionService.addConverter(Publisher.class, Maybe.class, (Function<Publisher, Maybe>) publisher -> Maybe.fromSingle(Single.fromPublisher(publisher)));
+ conversionService.addConverter(Publisher.class, Maybe.class, (Function<Publisher, Maybe>) publisher -> Flowable.fromPublisher(publisher).firstElement());
conversionService.addConverter(Publisher.class, Completable.class, (Function<Publisher, Completable>) Completable::fromPublisher);
}
}
|
Changed Publisher to Maybe Conversion to use Flowable
Changed the conversion of Publisher to Maybe to use Flowable to allow support of the source emitting 0 items
|
micronaut-projects_micronaut-core
|
train
|
java
|
a9cf07f65a1b206b7f776183d29923aa345f582e
|
diff --git a/lib/idlc-sdk-core/restclient.rb b/lib/idlc-sdk-core/restclient.rb
index <HASH>..<HASH> 100644
--- a/lib/idlc-sdk-core/restclient.rb
+++ b/lib/idlc-sdk-core/restclient.rb
@@ -91,7 +91,7 @@ module Idlc
)
result = JSON.parse(resp.body)
- message = "status: #{resp.code}, message: #{result['message']}"
+ message = "status: #{resp.code}, response: #{result}"
raise message unless resp.code == '200'
break
rescue Exception => e
diff --git a/lib/idlc-sdk-core/version.rb b/lib/idlc-sdk-core/version.rb
index <HASH>..<HASH> 100644
--- a/lib/idlc-sdk-core/version.rb
+++ b/lib/idlc-sdk-core/version.rb
@@ -1,3 +1,3 @@
module Idlc
- VERSION = '1.2.2'.freeze
+ VERSION = '1.2.3'.freeze
end
|
fix result parsing in restclient
|
NathanTCz_idlc-sdk-core
|
train
|
rb,rb
|
67e785489f24adffc97551e3304bf65a92ddd362
|
diff --git a/kie-spring-boot/kie-spring-boot-samples/keycloak-kie-server-spring-boot-sample/src/test/java/org/kie/server/springboot/samples/KeycloakKieServerTest.java b/kie-spring-boot/kie-spring-boot-samples/keycloak-kie-server-spring-boot-sample/src/test/java/org/kie/server/springboot/samples/KeycloakKieServerTest.java
index <HASH>..<HASH> 100644
--- a/kie-spring-boot/kie-spring-boot-samples/keycloak-kie-server-spring-boot-sample/src/test/java/org/kie/server/springboot/samples/KeycloakKieServerTest.java
+++ b/kie-spring-boot/kie-spring-boot-samples/keycloak-kie-server-spring-boot-sample/src/test/java/org/kie/server/springboot/samples/KeycloakKieServerTest.java
@@ -104,11 +104,12 @@ public class KeycloakKieServerTest {
private KModuleDeploymentUnit unit;
private KieServicesClient kieServicesClient;
- private static KeycloakContainer keycloak = new KeycloakContainer();
+ private static KeycloakContainer keycloak;
@BeforeClass
public static void startTestContainers() {
assumeTrue(isDockerAvailable());
+ keycloak = new KeycloakContainer();
keycloak.start();
KeycloakFixture.setup(keycloak.getAuthServerUrl());
}
|
[JBPM-<I>] Upgrade testcontainers to <I> (#<I>)
|
kiegroup_droolsjbpm-integration
|
train
|
java
|
3b633cdb726f86a73fd63be2582ecd5d442b138f
|
diff --git a/tests/testmock.py b/tests/testmock.py
index <HASH>..<HASH> 100644
--- a/tests/testmock.py
+++ b/tests/testmock.py
@@ -749,5 +749,10 @@ class MockTest(unittest2.TestCase):
self.assertEqual(mock.mock_calls, expected)
+ def DONTtest_named_mock_calls(self):
+ mock = MagicMock(name='foo')
+ mock()
+
+
if __name__ == '__main__':
unittest2.main()
|
Start extending a test for mock_calls
|
testing-cabal_mock
|
train
|
py
|
3b60e813a4167a4dd5bc05e92775ec7a3bf12195
|
diff --git a/src/Generator.php b/src/Generator.php
index <HASH>..<HASH> 100644
--- a/src/Generator.php
+++ b/src/Generator.php
@@ -176,8 +176,8 @@ class Generator implements GeneratorInterface
* Returns a MODE message.
*
* @param string $target
- * @param string $mode
- * @param string $param
+ * @param string|null $mode
+ * @param string|null $param
* @return string
*/
public function ircMode($target, $mode = null, $param = null)
|
Updated PHPDoc for ircMode() in Generator
|
phergie_phergie-irc-generator
|
train
|
php
|
f1da03a95e7f1463cd76e6f40bbcf8569ef2a70c
|
diff --git a/src/growlDirective.js b/src/growlDirective.js
index <HASH>..<HASH> 100644
--- a/src/growlDirective.js
+++ b/src/growlDirective.js
@@ -9,7 +9,7 @@ angular.module("angular-growl").directive("growl", ["$rootScope", function ($roo
' <div ng-switch="message.enableHtml">' +
' <div ng-switch-when="true" ng-bind-html="message.text"></div>' +
' <div ng-switch-default ng-bind="message.text"></div>' +
- ' </div>' +
+ ' </div>' +
' </div>' +
'</div>',
replace: false,
@@ -31,7 +31,7 @@ angular.module("angular-growl").directive("growl", ["$rootScope", function ($roo
$rootScope.$on("growlMessage", function (event, message) {
var found;
if (onlyUnique) {
- angular.forEach($scope.messages, function(msg, index) {
+ angular.forEach($scope.messages, function(msg) {
if (message.text === msg.text && message.severity === msg.severity) {
found = true;
}
|
fixed jshint warnings
|
marcorinck_angular-growl
|
train
|
js
|
173bc9989ce8a921f50ec6bd731d3ab569dc7065
|
diff --git a/api/app/app_test.go b/api/app/app_test.go
index <HASH>..<HASH> 100644
--- a/api/app/app_test.go
+++ b/api/app/app_test.go
@@ -40,6 +40,7 @@ func Test(t *testing.T) { TestingT(t) }
type S struct {
session *mgo.Session
team auth.Team
+ user *auth.User
}
var _ = Suite(&S{})
@@ -48,7 +49,9 @@ func (s *S) SetUpSuite(c *C) {
var err error
db.Session, err = db.Open("127.0.0.1:27017", "tsuru_app_test")
c.Assert(err, IsNil)
- s.team = auth.Team{Name: "tsuruteam"}
+ s.user = &auth.User{Email: "[email protected]", Password: "123"}
+ s.user.Create()
+ s.team = auth.Team{Name: "tsuruteam", Users: []*auth.User{s.user}}
db.Session.Teams().Insert(s.team)
}
|
api/app: creating user on setup
|
tsuru_tsuru
|
train
|
go
|
3d428f40c8dabab540d2c749776bdfc9ec8c5e4a
|
diff --git a/matplotlib2tikz/save.py b/matplotlib2tikz/save.py
index <HASH>..<HASH> 100644
--- a/matplotlib2tikz/save.py
+++ b/matplotlib2tikz/save.py
@@ -245,7 +245,7 @@ def save(filepath, *args, encoding=None, **kwargs):
For supported values: see ``codecs`` module.
:returns: None
"""
- code = get_tikz_code(*args, **kwargs)
+ code = get_tikz_code(*args, filepath=filepath, **kwargs)
file_handle = codecs.open(filepath, "w", encoding)
try:
file_handle.write(code)
|
fix #<I>
fix #<I> by passing filepath from `save` to `get_tikz_code`
|
nschloe_matplotlib2tikz
|
train
|
py
|
edd7298bac7f170a8a7dbc110b12147485f81e2f
|
diff --git a/examples/sampleserver.py b/examples/sampleserver.py
index <HASH>..<HASH> 100644
--- a/examples/sampleserver.py
+++ b/examples/sampleserver.py
@@ -25,7 +25,7 @@ class ConcreteServer(OpenIDServer):
# This is reimplemented in the subclass so that extra
# debugging/tracing information can be extracted. It isn't
# necessary in the general case.
- print 'handling openid.mode=%r' % (req.get('openid.mode'),)
+ print 'handling openid.mode=%r' % (req.get('mode'),)
return OpenIDServer.handle(self, req)
def get_new_secret(self, assoc_type):
|
[project @ Fix bug in tracing code]
|
openid_python-openid
|
train
|
py
|
2a1c10a2e0fa93289a3571e62e6aa2ccaaab094a
|
diff --git a/push/model/src/main/java/org/jboss/aerogear/unifiedpush/message/UnifiedPushMessage.java b/push/model/src/main/java/org/jboss/aerogear/unifiedpush/message/UnifiedPushMessage.java
index <HASH>..<HASH> 100644
--- a/push/model/src/main/java/org/jboss/aerogear/unifiedpush/message/UnifiedPushMessage.java
+++ b/push/model/src/main/java/org/jboss/aerogear/unifiedpush/message/UnifiedPushMessage.java
@@ -33,6 +33,9 @@ import java.io.IOException;
* <pre>
* "message": {
* "alert": "HELLO!",
+ * "title": "Safari Title",
+ * "action": "Safari Action",
+ * "url-args":[ "arg1", "arg2" ],
* "action-category": "some value",
* "sound": "default",
* "badge": 2,
|
update message format in java docs to include safari options
|
aerogear_aerogear-unifiedpush-server
|
train
|
java
|
02e4e1d37499fe895f8ab69be687802c49aec10c
|
diff --git a/src/python/pants/pantsd/pants_daemon_core.py b/src/python/pants/pantsd/pants_daemon_core.py
index <HASH>..<HASH> 100644
--- a/src/python/pants/pantsd/pants_daemon_core.py
+++ b/src/python/pants/pantsd/pants_daemon_core.py
@@ -138,7 +138,10 @@ class PantsDaemonCore:
dynamic_remote_options, auth_plugin_result = DynamicRemoteOptions.from_options(
options, env, self._prior_auth_plugin_result
)
- remote_options_changed = dynamic_remote_options != self._prior_dynamic_remote_options
+ remote_options_changed = (
+ self._prior_dynamic_remote_options is not None
+ and dynamic_remote_options != self._prior_dynamic_remote_options
+ )
if remote_options_changed:
scheduler_restart_explanation = "Remote cache/execution options updated"
@@ -151,7 +154,9 @@ class PantsDaemonCore:
options_bootstrapper.bootstrap_options,
invert=True,
)
- bootstrap_options_changed = options_fingerprint != self._fingerprint
+ bootstrap_options_changed = (
+ self._fingerprint is not None and options_fingerprint != self._fingerprint
+ )
if bootstrap_options_changed:
scheduler_restart_explanation = "Initialization options changed"
|
Fix scheduler initialization log (#<I>)
Before, we never would show "Initializing scheduler" and we'd always say "Reinitializing scheduler".
[ci skip-rust]
[ci skip-build-wheels]
|
pantsbuild_pants
|
train
|
py
|
3164ae4eb5042b858458f4d252401ab12854c440
|
diff --git a/test/replace_test.js b/test/replace_test.js
index <HASH>..<HASH> 100644
--- a/test/replace_test.js
+++ b/test/replace_test.js
@@ -25,11 +25,11 @@ exports['replace'] = {
expect = '@@value\n';
result = grunt.file.read('tmp/preserve_prefix.txt');
- test.equal(expect, result, 'should replace simple key with value preserving prefix');
+ test.equal(expect, result, 'should replace simple key with value but preserve prefix');
- expect = 'value\n';
+ expect = '@@value\n';
result = grunt.file.read('tmp/preserve_prefix_function.txt');
- test.equal(expect, result, 'should replace simple key with value preserving prefix but with function replacement');
+ test.notEqual(expect, result, 'should replace simple key with value and not preserve prefix (function in replacement)');
expect = 'value\n';
result = grunt.file.read('tmp/template_key.txt');
|
Earlier commit of version <I>.
|
outaTiME_grunt-replace
|
train
|
js
|
58d8a092363e3a219b3fe15a61a57226d84c0eb9
|
diff --git a/packages/docs/themes/cerebral-website/page/__edit/page__edit.bemhtml.js b/packages/docs/themes/cerebral-website/page/__edit/page__edit.bemhtml.js
index <HASH>..<HASH> 100644
--- a/packages/docs/themes/cerebral-website/page/__edit/page__edit.bemhtml.js
+++ b/packages/docs/themes/cerebral-website/page/__edit/page__edit.bemhtml.js
@@ -1,6 +1,6 @@
block('page').elem('edit')(
content()(function () {
- var url = 'https://github.com/cerebral/cerebral/tree/master/packages/docs/content'
+ var url = 'https://github.com/cerebral/cerebral/tree/master/packages/docs/content/'
if (this._layout !== 'root') {
url += this._layout + '/'
|
fix(docs): edit on github link fix (#<I>)
|
cerebral_cerebral
|
train
|
js
|
709459e732d9ceb9ea891ce609bf262786d8725c
|
diff --git a/lib/mortar/config.rb b/lib/mortar/config.rb
index <HASH>..<HASH> 100644
--- a/lib/mortar/config.rb
+++ b/lib/mortar/config.rb
@@ -49,7 +49,7 @@ module Mortar
def labels(other = {})
hash = @labels.dup
hash.merge!(other)
- RecursiveOpenStruct.new(hash)
+ RecursiveOpenStruct.new(hash, preserve_original_keys: true)
end
end
end
diff --git a/lib/mortar/fire_command.rb b/lib/mortar/fire_command.rb
index <HASH>..<HASH> 100644
--- a/lib/mortar/fire_command.rb
+++ b/lib/mortar/fire_command.rb
@@ -116,7 +116,7 @@ module Mortar
resources.map { |resource|
resource.merge(
metadata: {
- labels: labels
+ labels: labels.to_hash
}
)
}
|
Fix crash when using shots with labels (#<I>)
|
kontena_mortar
|
train
|
rb,rb
|
14ebc396459f77a385af9a5cc41be1b62953058e
|
diff --git a/mod/forum/externallib.php b/mod/forum/externallib.php
index <HASH>..<HASH> 100644
--- a/mod/forum/externallib.php
+++ b/mod/forum/externallib.php
@@ -478,15 +478,15 @@ class mod_forum_external extends external_api {
$post->children = array();
}
- $userpicture = new user_picture($post);
- $userpicture->size = 1; // Size f1.
- $post->userpictureurl = $userpicture->get_url($PAGE)->out(false);
-
$user = new stdclass();
$user->id = $post->userid;
- $user = username_load_fields_from_object($user, $post);
+ $user = username_load_fields_from_object($user, $post, null, array('picture', 'imagealt', 'email'));
$post->userfullname = fullname($user, $canviewfullname);
+ $userpicture = new user_picture($user);
+ $userpicture->size = 1; // Size f1.
+ $post->userpictureurl = $userpicture->get_url($PAGE)->out(false);
+
// Rewrite embedded images URLs.
list($post->message, $post->messageformat) =
external_format_text($post->message, $post->messageformat, $modcontext->id, 'mod_forum', 'post', $post->id);
|
MDL-<I> forum: fix user profile picture in external service
|
moodle_moodle
|
train
|
php
|
d07761267ccab5c36f1fd1b83704c6f00db55287
|
diff --git a/components/user-agreement/smart-user-agreement.js b/components/user-agreement/smart-user-agreement.js
index <HASH>..<HASH> 100644
--- a/components/user-agreement/smart-user-agreement.js
+++ b/components/user-agreement/smart-user-agreement.js
@@ -13,7 +13,6 @@ export default class SmartUserAgreement extends PureComponent {
static propTypes = {
getUser: PropTypes.func.isRequired,
getAgreement: PropTypes.func.isRequired,
- auth: PropTypes.object.isRequired,
setUserConsent: PropTypes.func.isRequired,
onAccept: PropTypes.func,
onDecline: PropTypes.func,
@@ -85,15 +84,10 @@ export default class SmartUserAgreement extends PureComponent {
};
onDecline = () => {
- const {auth: {auth}, onDecline} = this.props;
-
+ const {onDecline} = this.props;
if (onDecline) {
onDecline();
}
-
- return auth.logout({
- message: 'user-agreement-was-declined'
- });
};
render() {
|
smart-user-agreement: getting rid of auth
|
JetBrains_ring-ui
|
train
|
js
|
207637080ac4b8e41b0361fc0feef33f60ddf802
|
diff --git a/aws_xray_sdk/ext/botocore/patch.py b/aws_xray_sdk/ext/botocore/patch.py
index <HASH>..<HASH> 100644
--- a/aws_xray_sdk/ext/botocore/patch.py
+++ b/aws_xray_sdk/ext/botocore/patch.py
@@ -31,7 +31,9 @@ def _xray_traced_botocore(wrapped, instance, args, kwargs):
service = instance._service_model.metadata["endpointPrefix"]
if service == 'xray':
# skip tracing for SDK built-in sampling pollers
- if 'GetSamplingRules' in args or 'GetSamplingTargets' in args:
+ if ('GetSamplingRules' in args or
+ 'GetSamplingTargets' in args or
+ 'PutTraceSegments' in args):
return wrapped(*args, **kwargs)
return xray_recorder.record_subsegment(
wrapped, instance, args, kwargs,
|
add puttracesegments to boto whitelist avoid a catch <I>
|
aws_aws-xray-sdk-python
|
train
|
py
|
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.