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
|
---|---|---|---|---|---|
ff5980423554f135b9de34e6625725355e383827
|
diff --git a/example.py b/example.py
index <HASH>..<HASH> 100644
--- a/example.py
+++ b/example.py
@@ -115,7 +115,7 @@ def get_glob(glob_path):
>>> # Get the expected file names in the platform's native style
>>> file_names == (['/test/file1.txt', '/test/file2.txt'] # UNIX-like
... or
- ... [r'c:\test\file1.txt', r'c:\test\file2.txt']) # Windows
+ ... [r'\test\file1.txt', r'\test\file2.txt']) # Windows
True
'''
return glob.glob(glob_path)
|
Remove "c:" from Windows paths in doctest.
|
jmcgeheeiv_pyfakefs
|
train
|
py
|
263fdb2dc84ac668aa63329fe7de24653cbd29cc
|
diff --git a/src/segments/profile.py b/src/segments/profile.py
index <HASH>..<HASH> 100644
--- a/src/segments/profile.py
+++ b/src/segments/profile.py
@@ -2,6 +2,7 @@ import logging
from collections import Counter, OrderedDict
import unicodedata
from pathlib import Path
+import warnings
from csvw import TableGroup, Column
from clldutils.path import readlines
@@ -109,10 +110,13 @@ class Profile(object):
raise ValueError('profile description must contain exactly one table')
metadata = tg.common_props
metadata.update(fname=Path(fname), form=form)
- return cls(
- *[{k: None if (k != cls.GRAPHEME_COL and v == cls.NULL) else v for k, v in d.items()}
- for d in tg.tables[0].iterdicts(fname=opfname)],
- **metadata)
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ res = cls(
+ *[{k: None if (k != cls.GRAPHEME_COL and v == cls.NULL) else v for k, v in d.items()}
+ for d in tg.tables[0].iterdicts(fname=opfname)],
+ **metadata)
+ return res
@classmethod
def from_text(cls, text, mapping='mapping'):
|
ignore warnings from csvw about unspecified columns - the spec allows arbitrary additional columns
|
cldf_segments
|
train
|
py
|
d97295b21ccb8594826c8957824e82ad20c9f456
|
diff --git a/geomdl/visualization/VisVTK.py b/geomdl/visualization/VisVTK.py
index <HASH>..<HASH> 100644
--- a/geomdl/visualization/VisVTK.py
+++ b/geomdl/visualization/VisVTK.py
@@ -53,6 +53,10 @@ class VisConfig(vis.VisConfigAbstract):
* ``s`` and ``w``: switch between solid and wireframe modes
* ``b``: change background color
* ``arrow keys``: pan the model
+ * ``d``: print debug information (of picked object, point, etc.)
+
+ Please refer to `vtkInteractorStyle <https://vtk.org/doc/nightly/html/classvtkInteractorStyle.html>`_ class
+ reference for more details.
:param obj: render window interactor
:type obj: vtkRenderWindowInteractor
@@ -86,7 +90,13 @@ class VisConfig(vis.VisConfigAbstract):
actor = picker.GetActor() # vtkActor
if actor is not None:
actor.GetProperty().SetColor(random(), random(), random())
- # print(picker.GetSelectionPoint())
+ if key == 'd':
+ picker = obj.GetPicker() # vtkPropPicker
+ actor = picker.GetActor() # vtkActor
+ if actor is not None:
+ print("Name:", actor.GetMapper().GetArrayName())
+ print("Index:", actor.GetMapper().GetArrayId())
+ print("Selected point:", picker.GetSelectionPoint()[0:2])
# Update render window
render_window.Render()
|
Assign keypress event to "d" for debugging
|
orbingol_NURBS-Python
|
train
|
py
|
de43378a33699313faeaed265140bb6917ccd7ee
|
diff --git a/tests/unique_test.py b/tests/unique_test.py
index <HASH>..<HASH> 100644
--- a/tests/unique_test.py
+++ b/tests/unique_test.py
@@ -37,3 +37,10 @@ def test_unique_nan():
mask = np.isnan(values)
assert values[~mask].tolist() == df.x.values[~mask].tolist()
# assert indices.tolist() == [0, 1, 2, 0, 3, 0]
+
+def test_unique_missing():
+ # Create test databn
+ x = np.array([None, 'A', 'B', -1, 0, 2, '', '', None, None, None, np.nan, np.nan, np.nan, np.nan,])
+ df = vaex.from_arrays(x=x)
+ uniques = df.x.unique(dropnan=True).tolist()
+ assert set(uniques) == set(['', 'A', 'B', -1, 0, 2, None])
|
Unit-test for unique in case of dtype object and n/a values (#<I>)
* Unit-test for unique in case of object type and missing values (np.nan, None)
* make first element None so it is dtype=object
* fix: include None, skip nan, since comparison of nan is always false
|
vaexio_vaex
|
train
|
py
|
c873fa5bf661bb887222445ee90aa559f11c9ccb
|
diff --git a/mithril.js b/mithril.js
index <HASH>..<HASH> 100644
--- a/mithril.js
+++ b/mithril.js
@@ -1017,6 +1017,8 @@ var m = (function app(window, undefined) {
var currentTarget = e.currentTarget || e.srcElement;
var args = m.route.mode === "pathname" && currentTarget.search ? parseQueryString(currentTarget.search.slice(1)) : {};
while (currentTarget && currentTarget.nodeName.toUpperCase() !== "A") currentTarget = currentTarget.parentNode;
+ // clear pendingRequests because we want an immediate route change
+ pendingRequests = 0;
m.route(currentTarget[m.route.mode].slice(modes[m.route.mode].length), args);
}
function setScroll() {
|
clear pendingRequests count on routeUnobtrusive(e)
|
MithrilJS_mithril.js
|
train
|
js
|
7fde303ec5cc3872ff52ba44a14257c55d76944c
|
diff --git a/src/frontend/org/voltdb/RestoreAgent.java b/src/frontend/org/voltdb/RestoreAgent.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/RestoreAgent.java
+++ b/src/frontend/org/voltdb/RestoreAgent.java
@@ -830,7 +830,7 @@ SnapshotCompletionInterest {
*/
private Long deserializeRestoreInformation(List<String> children,
Map<Long, Set<SnapshotInfo>> snapshotFragments) {
- byte recover = m_action != START_ACTION.CREATE ? (byte) 1 : 0;
+ byte recover = (byte) m_action.ordinal();
Long clStartTxnId = null;
ByteBuffer buf;
for (String node : children) {
@@ -927,7 +927,7 @@ SnapshotCompletionInterest {
buf.putLong(min);
}
// 1 means recover, 0 means to create new DB
- buf.put(m_action != START_ACTION.CREATE ? (byte) 1 : 0);
+ buf.put((byte) m_action.ordinal());
buf.putInt(snapshots.size());
for (SnapshotInfo snapshot : snapshots) {
|
Serialize the ordinal value or the start action so that if we add something
later, they will be checked as well.
|
VoltDB_voltdb
|
train
|
java
|
551ef0a87414295cb4d70dbdbe6843cb14c63392
|
diff --git a/kerncraft/machinemodel.py b/kerncraft/machinemodel.py
index <HASH>..<HASH> 100755
--- a/kerncraft/machinemodel.py
+++ b/kerncraft/machinemodel.py
@@ -129,9 +129,9 @@ class MachineModel(object):
if 'cache per group' not in c:
continue
cache_dict[c['level']] = deepcopy(c['cache per group'])
- # Scale size of shared caches according to cores
+ # Scale size of last cache according to cores (typically shared within NUMA domain)
if c['cores per group'] > 1:
- cache_dict[c['level']]['sets'] //= cores
+ cache_dict[c['level']]['sets'] //= min(cores, self['cores per NUMA domain'])
cs, caches, mem = cachesim.CacheSimulator.from_dict(cache_dict)
|
fixed out of numa domain scaling of last level cache size
|
RRZE-HPC_kerncraft
|
train
|
py
|
0b2b73ce4ad44cb15a1b8302ca2ee873a94c2625
|
diff --git a/pixelgl/interface.go b/pixelgl/interface.go
index <HASH>..<HASH> 100644
--- a/pixelgl/interface.go
+++ b/pixelgl/interface.go
@@ -70,4 +70,4 @@ func (noOpDoer) Do(sub func(ctx Context)) {
}
// NoOpDoer is a Doer that just passes an empty context to the caller of Do.
-var NoOpDoer = noOpDoer{}
+var NoOpDoer Doer = noOpDoer{}
|
change NoOpDoer type just to Doer
|
faiface_pixel
|
train
|
go
|
17ac7986f63a9922c19ab03560554d288cd376ea
|
diff --git a/djstripe/admin.py b/djstripe/admin.py
index <HASH>..<HASH> 100644
--- a/djstripe/admin.py
+++ b/djstripe/admin.py
@@ -837,7 +837,14 @@ class WebhookEndpointAdmin(admin.ModelAdmin):
ret.setdefault("base_url", base_url)
return ret
- def delete_model(self, request, obj):
- obj._api_delete()
+ def delete_model(self, request, obj: models.WebhookEndpoint):
+ try:
+ obj._api_delete()
+ except InvalidRequestError as e:
+ if e.user_message.startswith("No such webhook endpoint: "):
+ # Webhook was already deleted in Stripe
+ pass
+ else:
+ raise
return super().delete_model(request, obj)
|
Handle webhook endpoints already having been deleted upstream
|
dj-stripe_dj-stripe
|
train
|
py
|
22adcd988f54d5e7d7e7930be93756c89399f125
|
diff --git a/app/controllers/renalware/exit_site_infections_controller.rb b/app/controllers/renalware/exit_site_infections_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/renalware/exit_site_infections_controller.rb
+++ b/app/controllers/renalware/exit_site_infections_controller.rb
@@ -23,8 +23,8 @@ module Renalware
def update
if @exit_site_infection.update(exit_site_infection_params)
- redirect_to patient_pd_summary_path(@patient),
- notice: "You have successfully updated an exit site infection."
+ redirect_to patient_exit_site_infection_path(@patient, @exit_site_infection),
+ :notice => "You have successfully updated an exit site infection."
else
render :edit
end
diff --git a/spec/controllers/renalware/exit_site_infections_controller_spec.rb b/spec/controllers/renalware/exit_site_infections_controller_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/controllers/renalware/exit_site_infections_controller_spec.rb
+++ b/spec/controllers/renalware/exit_site_infections_controller_spec.rb
@@ -66,7 +66,7 @@ module Renalware
exit_site_infection: {
diagnosis_date: "25/06/#{Date.current.year}"
}
- expect(response).to redirect_to(pd_info_patient_path(@patient))
+ expect(response).to redirect_to(patient_exit_site_infection_path(@patient, subject))
end
end
|
Fixing rebase - adjusted update redirect for exit site infections controller
|
airslie_renalware-core
|
train
|
rb,rb
|
6b1cdea5db51a7ed88302008a81121c0ce4feedb
|
diff --git a/src/argumentsToList.js b/src/argumentsToList.js
index <HASH>..<HASH> 100644
--- a/src/argumentsToList.js
+++ b/src/argumentsToList.js
@@ -8,7 +8,7 @@ import { unapply, identity } from 'ramda';
*
* @example
*
- * R.compose(R.sum, argumentsToList)(1, 2, 3) // 6
+ * R.compose(R.sum, R_.argumentsToList)(1, 2, 3) // 6
*
* @sig (a, b, c, ...) → ([a, b, c, ...])
*/
|
Added missing R_ in the docs
|
tommmyy_ramda-extension
|
train
|
js
|
a820bc4a2f1cc5bd912b0fd0978f03b868c39e4d
|
diff --git a/bounce/bounce.go b/bounce/bounce.go
index <HASH>..<HASH> 100644
--- a/bounce/bounce.go
+++ b/bounce/bounce.go
@@ -138,8 +138,8 @@ again:
count++
}
if count > 1 {
- go handleMouse(m, mc, mcc, rasterMaker)
- mc = nil
+// go handleMouse(m, mc, mcc, rasterMaker)
+// mc = nil
}else if m.Buttons != 0 {
go handleMouse(m, mc, mcc, lineMaker)
mc = nil
|
removed rasterMaker call for the time being
|
rogpeppe_godef
|
train
|
go
|
27913081148a0008c855c8a8cd3b26f5c5c90ba8
|
diff --git a/baron/grammator_operators.py b/baron/grammator_operators.py
index <HASH>..<HASH> 100644
--- a/baron/grammator_operators.py
+++ b/baron/grammator_operators.py
@@ -137,13 +137,14 @@ def include_operators(pg):
@pg.production("power : atom DOUBLE_STAR factor")
@pg.production("power : atom DOUBLE_STAR power")
def binary_operator_node((first, operator, second)):
- return binary_operator(
- operator.value,
- first,
- second,
- first_space=operator.before_space,
- second_space=operator.after_space
- )
+ return {
+ "type": "binary_operator",
+ "value": operator.value,
+ "first": first,
+ "second": second,
+ "first_space": operator.before_space,
+ "second_space": operator.after_space
+ }
@pg.production("factor : PLUS factor")
|
[mod] continue refactoring
|
PyCQA_baron
|
train
|
py
|
f493fdcb49650b81828340df295f1de711414fe0
|
diff --git a/salt/modules/vault.py b/salt/modules/vault.py
index <HASH>..<HASH> 100644
--- a/salt/modules/vault.py
+++ b/salt/modules/vault.py
@@ -31,6 +31,19 @@ Functions to interact with Hashicorp Vault.
Currently only token auth is supported. The token must be able to create
tokens with the policies that should be assigned to minions. Required.
+ You can still use the token via a OS environment variable via this
+ config example:
+
+ .. code-block: yaml
+
+ vault:
+ url: https://vault.service.domain:8200
+ auth:
+ method: token
+ token: sdb://osenv/VAULT_TOKEN
+ osenv:
+ driver: env
+
policies
Policies that are assigned to minions when requesting a token. These can
either be static, eg saltstack/minions, or templated, eg
|
Add example how to setup vault token via environment variable.
|
saltstack_salt
|
train
|
py
|
cd592725cbbba18828855ed5a59f4da2d3d9a4ed
|
diff --git a/docs/assets/js/src/application.js b/docs/assets/js/src/application.js
index <HASH>..<HASH> 100644
--- a/docs/assets/js/src/application.js
+++ b/docs/assets/js/src/application.js
@@ -28,6 +28,11 @@
$('.tooltip-test').tooltip()
$('.popover-test').popover()
+ // Disable empty links in docs examples
+ $('.bd-example [href=#]').click(function (e) {
+ e.preventDefault()
+ })
+
// Config ZeroClipboard
ZeroClipboard.config({
moviePath: '/assets/flash/ZeroClipboard.swf',
|
restore docs kill links js
|
twbs_bootstrap
|
train
|
js
|
f1eac6510914dcd4d56035ac93d3aad12ab5d0df
|
diff --git a/Generator/PHPMethod.php b/Generator/PHPMethod.php
index <HASH>..<HASH> 100644
--- a/Generator/PHPMethod.php
+++ b/Generator/PHPMethod.php
@@ -4,6 +4,10 @@ namespace DrupalCodeBuilder\Generator;
/**
* Generator class for class methods.
+ *
+ * @deprecated
+ *
+ * TODO: replace this with PHPFunction throughout.
*/
class PHPMethod extends PHPFunction {
|
Changed PHPMethod generator to deprecated.
|
drupal-code-builder_drupal-code-builder
|
train
|
php
|
fa2417e9924ce810e6ae3aede5176bd50bc94d9c
|
diff --git a/twitter4j-core/src/main/java/twitter4j/util/TimeSpanConverter.java b/twitter4j-core/src/main/java/twitter4j/util/TimeSpanConverter.java
index <HASH>..<HASH> 100644
--- a/twitter4j-core/src/main/java/twitter4j/util/TimeSpanConverter.java
+++ b/twitter4j-core/src/main/java/twitter4j/util/TimeSpanConverter.java
@@ -78,8 +78,8 @@ public final class TimeSpanConverter implements Serializable {
} else if ("es".equals(language)) {
formats[NOW] = new MessageFormat("Ahora");
formats[N_SECONDS_AGO] = new MessageFormat("hace {0} segundos");
- formats[A_MINUTE_AGO] = new MessageFormat("hace 1 munito");
- formats[N_MINUTES_AGO] = new MessageFormat("hace {0} munitos");
+ formats[A_MINUTE_AGO] = new MessageFormat("hace 1 minuto");
+ formats[N_MINUTES_AGO] = new MessageFormat("hace {0} minutos");
formats[AN_HOUR_AGO] = new MessageFormat("hace 1 hora");
formats[N_HOURS_AGO] = new MessageFormat("hace {0} horas");
dateMonth = new SimpleDateFormat("d MMM", locale);
|
Fix to the translation for the word minute
|
Twitter4J_Twitter4J
|
train
|
java
|
fa074a8fa7d501f4d4e3683ad560ab769302e40f
|
diff --git a/tests/integration/components/sl-date-time-test.js b/tests/integration/components/sl-date-time-test.js
index <HASH>..<HASH> 100644
--- a/tests/integration/components/sl-date-time-test.js
+++ b/tests/integration/components/sl-date-time-test.js
@@ -131,9 +131,9 @@ test( 'Relative values applied correctly', function( assert ) {
test( 'Date values applied correctly', function( assert ) {
- const pastDate = window.moment().subtract( 3, 'months' ).toISOString();
+ const pastDateISO = window.moment().subtract( 3, 'months' ).toISOString();
- this.set( 'value', pastDate );
+ this.set( 'value', pastDateISO );
this.render( hbs`
{{sl-date-time
@@ -144,11 +144,12 @@ test( 'Date values applied correctly', function( assert ) {
` );
const pastRendered = this.$( '>:first-child' ).text().trim();
+ const pastDate = window.moment().subtract( 3, 'months' );
assert.strictEqual(
- /^\d{4}[-]\d{2}[-]\d{2}$/.test( pastRendered ),
- true,
- 'Default date string matches default ISO date pattern'
+ pastRendered,
+ pastDate.format( 'YYYY-MM-DD' ),
+ 'Default date string matches default date pattern'
);
const datetimeAttr = this.$( '>:first-child' ).attr( 'datetime' );
|
changed 3 months ago relative date from code review
|
softlayer_sl-ember-components
|
train
|
js
|
bd5a7ee98a6b987f402071f4b836edf51b071f16
|
diff --git a/org.parallelj/parallelj/parallelj-launching/src/main/java/org/parallelj/launching/LaunchingMessageKind.java b/org.parallelj/parallelj/parallelj-launching/src/main/java/org/parallelj/launching/LaunchingMessageKind.java
index <HASH>..<HASH> 100644
--- a/org.parallelj/parallelj/parallelj-launching/src/main/java/org/parallelj/launching/LaunchingMessageKind.java
+++ b/org.parallelj/parallelj/parallelj-launching/src/main/java/org/parallelj/launching/LaunchingMessageKind.java
@@ -43,6 +43,12 @@ public enum LaunchingMessageKind {
@Format("Error launching %s. Is the program annotated with @QuartzExecution?")
ELAUNCH0001,
+ /**
+ * An Error occurred
+ */
+ @Format("An Error occurred when running the Program %s!")
+ ELAUNCH0002,
+
/*
* Information messages for TcpIp
*/
@@ -156,7 +162,7 @@ public enum LaunchingMessageKind {
/**
* Program %s with jobId %s is terminated!
*/
- @Format("Program %s with jobId %s is terminated!")
+ @Format("Program %s with jobId %s is terminated with status %s!")
IQUARTZ0003,
/*
|
Add a entry in logs if an Exception is thrown in a Procedure.
|
awltech_org.parallelj
|
train
|
java
|
ed1b04e0b6a4ef7b05a2e96630c66c9f03f8fb94
|
diff --git a/simple8b/encoding.go b/simple8b/encoding.go
index <HASH>..<HASH> 100644
--- a/simple8b/encoding.go
+++ b/simple8b/encoding.go
@@ -30,7 +30,7 @@ const MaxValue = (1 << 60) - 1
// Encoder converts a stream of unsigned 64bit integers to a compressed byte slice.
type Encoder interface {
// Write writes a uint64 to the stream.
- Write(v uint64)
+ Write(v uint64) error
// Bytes returns the compressed uint64 as a byte slice.
Bytes() ([]byte, error)
@@ -60,13 +60,16 @@ func NewEncoder() Encoder {
}
}
-func (e *encoder) Write(v uint64) {
+func (e *encoder) Write(v uint64) error {
if e.i >= len(e.buf) {
- e.flush()
+ if err := e.flush(); err != nil {
+ return err
+ }
}
e.buf[e.i] = v
e.i += 1
+ return nil
}
func (e *encoder) flush() error {
|
Return an error from simple8b.Write
If the value is too large, an error could be returned.
|
jwilder_encoding
|
train
|
go
|
d39958d2106d3a6ede848c540d2f0d13de8d6dd7
|
diff --git a/listener/listener.go b/listener/listener.go
index <HASH>..<HASH> 100644
--- a/listener/listener.go
+++ b/listener/listener.go
@@ -71,7 +71,6 @@ func (l *SQSListener) waitForMessages(qURL *string) {
o, err := l.sqsClient.ReceiveMessage(&sqs.ReceiveMessageInput{
MaxNumberOfMessages: aws.Int64(1),
QueueUrl: qURL,
- VisibilityTimeout: aws.Int64(10),
})
if err != nil || len(o.Messages) < 1 {
time.Sleep(l.pollInterval)
|
Remove default visibility timeout from SQS Listener
Test Plan: ran sqs_test.go with some debug logging
Reviewers: gareth
Reviewed By: gareth
Subscribers: mperrone, rhu, jackgao, maasted
Differential Revision: <URL>
|
twitchscience_aws_utils
|
train
|
go
|
2d03a60481de1002131fba37011b8333e516f89e
|
diff --git a/protocols/raft/src/main/java/io/atomix/protocols/raft/impl/RaftServiceManager.java b/protocols/raft/src/main/java/io/atomix/protocols/raft/impl/RaftServiceManager.java
index <HASH>..<HASH> 100644
--- a/protocols/raft/src/main/java/io/atomix/protocols/raft/impl/RaftServiceManager.java
+++ b/protocols/raft/src/main/java/io/atomix/protocols/raft/impl/RaftServiceManager.java
@@ -508,6 +508,8 @@ public class RaftServiceManager implements AutoCloseable {
scheduleCompaction();
}
}, threadContext);
+ } else {
+ scheduleCompaction();
}
}
|
Ensure log compaction is rescheduled for no-op compactions.
|
atomix_atomix
|
train
|
java
|
038f8e49a2d6952256781d144fa1365b12e4d6b9
|
diff --git a/file_system.go b/file_system.go
index <HASH>..<HASH> 100644
--- a/file_system.go
+++ b/file_system.go
@@ -406,6 +406,9 @@ type ChildInodeEntry struct {
// lookup request.
//
// Leave at the zero value to disable caching.
+ //
+ // Beware: this value is ignored on OS X, where entry caching is disabled by
+ // default. See notes on MountConfig.EnableVnodeCaching for more.
EntryExpiration time.Time
}
|
Added a note on the EntryExpiration field.
|
jacobsa_fuse
|
train
|
go
|
9522334513f44a21006ede2c6ed547a6a6d3b634
|
diff --git a/server/integration/testsuite/src/test/java/org/infinispan/server/test/jgroups/auth/AuthAndEncryptProtocolTest.java b/server/integration/testsuite/src/test/java/org/infinispan/server/test/jgroups/auth/AuthAndEncryptProtocolTest.java
index <HASH>..<HASH> 100644
--- a/server/integration/testsuite/src/test/java/org/infinispan/server/test/jgroups/auth/AuthAndEncryptProtocolTest.java
+++ b/server/integration/testsuite/src/test/java/org/infinispan/server/test/jgroups/auth/AuthAndEncryptProtocolTest.java
@@ -74,7 +74,7 @@ public class AuthAndEncryptProtocolTest {
}
@WithRunningServer(COORDINATOR_NODE)
- @Test
+ @Test(group = "unstable", description = "ISPN-4164")
public void testFriendlyNodeCanJoin() throws Exception {
try {
controller.start(JOINING_NODE_FRIEND);
@@ -105,7 +105,7 @@ public class AuthAndEncryptProtocolTest {
}
@WithRunningServer(COORDINATOR_NODE_NO_ENCRYPT)
- @Test
+ @Test(group = "unstable", description = "ISPN-4164")
public void testAlienNodeCannotJoin() throws Exception {
try {
controller.start(JOINING_NODE_ALIEN);
@@ -115,4 +115,4 @@ public class AuthAndEncryptProtocolTest {
controller.stop(JOINING_NODE_ALIEN);
}
}
-}
\ No newline at end of file
+}
|
ISPN-<I> AuthAndEncryptProtocolTest fails
Temporarily disable the test.
|
infinispan_infinispan
|
train
|
java
|
83efa6472bee294f99821a133ca7dd5042269833
|
diff --git a/packages/util/browser.js b/packages/util/browser.js
index <HASH>..<HASH> 100644
--- a/packages/util/browser.js
+++ b/packages/util/browser.js
@@ -36,7 +36,7 @@ if (jsio.__env.name == 'browser') {
if(!params) { params = 'div'; }
if(typeof params == 'string') { return doc.createElement(params); }
- var el = doc.createElement(params.tag || 'div');
+ var el = doc.createElement(params.tag || params.tagName || 'div');
if(params.style) { $.style(el, params.style); }
if(params.src) { el.src = params.src; }
if(params.attrs) {
|
browser should accept tag or tagName since tagName is standard
|
gameclosure_js.io
|
train
|
js
|
7291118bfa0f8a5973db00e1ed64f0fc6f8c3fef
|
diff --git a/src/ProcessManager.php b/src/ProcessManager.php
index <HASH>..<HASH> 100644
--- a/src/ProcessManager.php
+++ b/src/ProcessManager.php
@@ -875,7 +875,15 @@ class ProcessManager
continue;
}
- if ($knownMTime !== filemtime($filePath) && $this->filesLastMd5[$filePath] !== md5_file($filePath, true)) {
+ $actualFileTime = filemtime($filePath);
+ $actualFileHash = md5_file($filePath);
+
+ if ($knownMTime !== $actualFileTime && $this->filesLastMd5[$filePath] !== $actualFileHash) {
+
+ // update tracked entry metadata
+ $this->filesLastMd5[$filePath] = $actualFileHash;
+ $this->filesLastMTime[$filePath] = $actualFileTime;
+
$this->output->writeln(
sprintf("<info>[%s] File %s has changed.</info>", date('d/M/Y:H:i:s O'), $filePath)
);
@@ -1030,7 +1038,7 @@ class ProcessManager
$onSlaveClosed($slave);
}
}
-
+
if ($this->reloadTimeoutTimer !== null) {
$this->reloadTimeoutTimer->cancel();
}
|
Fix infinite reload after tracked file changed (#<I>)
|
php-pm_php-pm
|
train
|
php
|
7677e5c0e2a8f87db87f46dec1821698cc625acb
|
diff --git a/spacy/training/loggers.py b/spacy/training/loggers.py
index <HASH>..<HASH> 100644
--- a/spacy/training/loggers.py
+++ b/spacy/training/loggers.py
@@ -72,7 +72,7 @@ def wandb_logger(project_name: str, remove_config_values: List[str] = []):
for field in remove_config_values:
del config_dot[field]
config = util.dot_to_dict(config_dot)
- wandb.init(project=project_name, config=config)
+ wandb.init(project=project_name, config=config, reinit=True)
console_log_step, console_finalize = console(nlp)
def log_step(info: Dict[str, Any]):
@@ -88,7 +88,7 @@ def wandb_logger(project_name: str, remove_config_values: List[str] = []):
def finalize():
console_finalize()
- pass
+ wandb.join()
return log_step, finalize
|
fix wandb logger when calling multiple times from same script
|
explosion_spaCy
|
train
|
py
|
98049a5ab7790da656d3618aaf8b5ddeda8685a3
|
diff --git a/scipy_data_fitting/plot.py b/scipy_data_fitting/plot.py
index <HASH>..<HASH> 100644
--- a/scipy_data_fitting/plot.py
+++ b/scipy_data_fitting/plot.py
@@ -41,7 +41,7 @@ class Plot:
Must contain the keys `data` and `fit`.
- Options are passed as keyword arguments to [``][1] for the corresponding plot
+ Options are passed as keyword arguments to [`matplotlib.pyplot.plot`][1] for the corresponding plot
Default:
@@ -50,6 +50,8 @@ class Plot:
'data': {'marker': '.', 'linestyle': 'None'},
'fit': {},
}
+
+ [1]: http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.plot
"""
if not hasattr(self, '_options'):
self._options = {
|
Added a missing external reference to docstring.
|
razor-x_scipy-data_fitting
|
train
|
py
|
d0c3961aef41f17773fb14d06213df3fcb7fc8d2
|
diff --git a/src/managers/GuildMemberManager.js b/src/managers/GuildMemberManager.js
index <HASH>..<HASH> 100644
--- a/src/managers/GuildMemberManager.js
+++ b/src/managers/GuildMemberManager.js
@@ -268,7 +268,7 @@ class GuildMemberManager extends CachedManager {
let endpoint = this.client.api.guilds(this.guild.id);
if (id === this.client.user.id) {
- const keys = Object.keys(_data);
+ const keys = Object.keys(data);
if (keys.length === 1 && keys[0] === 'nick') endpoint = endpoint.members('@me');
else endpoint = endpoint.members(id);
} else {
|
fix(GuildMemberManager): nick endpoint (#<I>)
|
discordjs_discord.js
|
train
|
js
|
04660c215255a51b39c6ec06a0f068f5eae0e41a
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -152,7 +152,7 @@ getServerString = () => {
if (err) {
throw err;
}
- const fileContent = fs.readFileSync('/bundle.js').toString('ascii');
+ const fileContent = fs.readFileSync('/bundle.js').toString('utf-8');
// Using eval because we can't require from `memory-fs`
data = requireFromString(fileContent);
sync = false;
|
In webpack config, now toString transform bundle to utf-8 instead of ascii (used in build for production)
|
unimonkiez_react-cordova-boilerplate
|
train
|
js
|
7095ad3388d503f4a752403530c2e7c24b385248
|
diff --git a/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js b/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js
index <HASH>..<HASH> 100644
--- a/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js
+++ b/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js
@@ -401,13 +401,8 @@ export default class CommonBabelGenerator extends Generator {
} else {
packageUtils.removeDependencies(pkg, ['@types/node']);
packageUtils.removeDevDependencies(pkg, ['@types/node']);
- if (pkg.engines && useBabel) {
- delete pkg.engines.node;
- if (Object.keys(pkg.engines).length === 0) delete pkg.engines;
- } else {
- // Supported LTS versions of node, that supports ESM modules.
- pkg.engines.node = '^14.13.1 || >=16.0.0';
- }
+ // Supported LTS versions of node, that supports ESM modules.
+ pkg.engines.node = '^14.13.1 || >=16.0.0';
}
/* browserslist */
|
fix(pob): always add engines
|
christophehurpeau_pob-lerna
|
train
|
js
|
987c7524b45ad50912a97e0b5236c375e8f1ca2b
|
diff --git a/tests/test_widgets.py b/tests/test_widgets.py
index <HASH>..<HASH> 100644
--- a/tests/test_widgets.py
+++ b/tests/test_widgets.py
@@ -130,7 +130,7 @@ class TestWidgetManagerInActivity(TestBetamax):
partInstanceId=str(self.frame.id)
),
writable_models=self.frame_model.properties,
- reable_models=[]
+ readable_models=[]
)
def test_attachment_widget_with_associations_using_widget_manager(self):
|
widgets: tests for the propertygrid and attachmentwidget
|
KE-works_pykechain
|
train
|
py
|
4af470925d225e63d8e8d841b9f3151e4693a48c
|
diff --git a/src/projects/index.js b/src/projects/index.js
index <HASH>..<HASH> 100644
--- a/src/projects/index.js
+++ b/src/projects/index.js
@@ -117,7 +117,7 @@ module.exports.getConfig = packs(async argv => {
return config;
});
-async function resolveDeployConfig(config) {
+function resolveDeployConfig(config) {
config.deploy = config.deploy || DEFAULTS.deploy;
Object.keys(config.deploy)
|
resolveDeployConfig doesn't need to be async
|
abcnews_aunty
|
train
|
js
|
d6bdc8ff07f1604dbb4d7be32aaca9a4f7e19c59
|
diff --git a/index.php b/index.php
index <HASH>..<HASH> 100644
--- a/index.php
+++ b/index.php
@@ -1,3 +1,3 @@
<?php
-header('Location: /demos/index.php');
+header('Location: ./demos/index.php');
|
make this work even if ATK is not in your root folder
|
atk4_ui
|
train
|
php
|
4e37156de460f9739ba7e16941fd79e8a3e6e83e
|
diff --git a/src/Meting.php b/src/Meting.php
index <HASH>..<HASH> 100644
--- a/src/Meting.php
+++ b/src/Meting.php
@@ -496,7 +496,7 @@ class Meting
case 'netease':
$api = array(
'method' => 'POST',
- 'url' => 'http://music.163.com/api/v3/playlist/detail',
+ 'url' => 'http://music.163.com/api/v6/playlist/detail',
'body' => array(
's' => '0',
'id' => $id,
|
<I>, fixed netease playlist api
|
metowolf_Meting
|
train
|
php
|
abf87255f7599d3e1dd6b5a360dd9ab0157268ca
|
diff --git a/lib/less/index.js b/lib/less/index.js
index <HASH>..<HASH> 100644
--- a/lib/less/index.js
+++ b/lib/less/index.js
@@ -41,7 +41,8 @@ var less = {
var error = [];
var stylize = options.color ? require('./lessc_helper').stylize : function (str) { return str };
- if (ctx.stack) { return stylize(ctx.stack, 'red') }
+ // only output a stack if it isn't a less error
+ if (ctx.stack && !ctx.type) { return stylize(ctx.stack, 'red') }
if (!ctx.hasOwnProperty('index')) {
return ctx.stack || ctx.message;
|
Only output stack if it is not a less error
|
less_less.js
|
train
|
js
|
be5347237d1fdf194b01662e0ddd043fe91dc2b9
|
diff --git a/Model/Service/TransactionHandlerService.php b/Model/Service/TransactionHandlerService.php
index <HASH>..<HASH> 100755
--- a/Model/Service/TransactionHandlerService.php
+++ b/Model/Service/TransactionHandlerService.php
@@ -293,9 +293,6 @@ class TransactionHandlerService
$this->transaction
);
- // Set the total paid
- $this->order->setTotalPaid($this->order->getGrandTotal());
-
// Add order comment
$this->addOrderComment('The captured amount is %1.');
} else {
|
Removed an unneeded order total setter in the capture webhook handler
|
checkout_checkout-magento2-plugin
|
train
|
php
|
af1ee8163cd2253e62169256c450e09c78a2961a
|
diff --git a/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ModuleClassLoaderProvider.java b/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ModuleClassLoaderProvider.java
index <HASH>..<HASH> 100644
--- a/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ModuleClassLoaderProvider.java
+++ b/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ModuleClassLoaderProvider.java
@@ -59,7 +59,7 @@ public class ModuleClassLoaderProvider extends ClassLoaderProvider {
@Override
public ClassLoader getServerJAXRPCIntegrationClassLoader() {
- throw new UnsupportedOperationException("JAXRPC not supported"); //TODO!!
+ throw new UnsupportedOperationException();
}
public static void register() {
|
[AS7-<I>] minor change on ModuleClassLoaderProvider, JAXRPC related method will later be dropped.
|
wildfly_wildfly
|
train
|
java
|
04128f8309b41d356f534957aaf8b118b2d6db80
|
diff --git a/ObjJAcornCompiler.js b/ObjJAcornCompiler.js
index <HASH>..<HASH> 100644
--- a/ObjJAcornCompiler.js
+++ b/ObjJAcornCompiler.js
@@ -2985,7 +2985,7 @@ ClassDeclarationStatement: function(node, st, c, format) {
// Check if ivar is already declared in this class or its super classes.
checkIfIvarIsAlreadyDeclaredAndInSuperClass(classDef, checkIfIvarIsAlreadyDeclaredAndInSuperClass);
- var isTypeDefined = !ivarTypeIsClass || typeof global[ivarType] !== "undefined" || typeof window[ivarType] !== "undefined"
+ var isTypeDefined = !ivarTypeIsClass || typeof global[ivarType] !== "undefined" || (typeof window !== "undefined" && typeof window[ivarType] !== "undefined")
|| compiler.getClassDef(ivarType) || compiler.getTypeDef(ivarType) || ivarType == classDef.name;
if (!isTypeDefined && compiler.options.warnings.includes(warningUnknownIvarType))
|
Fixed: Don't crash if "window" variable is don't defined
|
mrcarlberg_objj-transpiler
|
train
|
js
|
9d0ae74656811ea8f37d1ab5a9817b05dbe9746a
|
diff --git a/lib/lolapi.js b/lib/lolapi.js
index <HASH>..<HASH> 100644
--- a/lib/lolapi.js
+++ b/lib/lolapi.js
@@ -630,11 +630,9 @@
// TODO: add getProfileIcons
/** @deprecated will stop workin on 2017-06-24 if not migrated to v3 */
- League.Static.getRealm = function(regionOrFunction, callback) { // TODO: migrate to v3
- var realmUrl = '/v1.2/realm?', // TODO: replace with definition of urls on top of file
- regionAndFunc = util.getCallbackAndRegion(regionOrFunction, region, callback),
- url = util.craftStaticUrl(endpoint + staticUrl, regionAndFunc.region, realmUrl, authKey);
- return util.makeRequest(url, 'Error getting realm: ', null, regionAndFunc.callback);
+ League.Static.getRealm = function(platformId = platformIdDefault, callback = undefined) {
+ const url = util.craftUrlV3(apiUrl.staticData.realms(platformId), authKey);
+ return util.makeRequest(url, 'Error getting realm: ', null, callback);
};
League.Static.getRuneList = function({version, runeListData, locale} = {}, platformId = platformIdDefault, callback = undefined) {
|
refactor (v3 methods) migrate Static.getRealm
|
Colorfulstan_LeagueJS
|
train
|
js
|
dd8600dab3aa764b19911f84d1f289c7ac2c965f
|
diff --git a/app.js b/app.js
index <HASH>..<HASH> 100755
--- a/app.js
+++ b/app.js
@@ -1,7 +1,7 @@
// Config
// Load required files
-var sys = require('sys'),
+var util = require('util'),
path = require('path'),
fs = require('fs'),
util = require('util'),
|
[fix] Changed require('util') to require('util') for compatibility with node <I>
|
lorentzkim_misao-chan
|
train
|
js
|
d207337d0eb713eee02d37c69da40e14c420bebe
|
diff --git a/simplepie.class.php b/simplepie.class.php
index <HASH>..<HASH> 100644
--- a/simplepie.class.php
+++ b/simplepie.class.php
@@ -1764,15 +1764,7 @@ class SimplePie
$this->multifeed_objects = array();
foreach ($this->multifeed_url as $url)
{
- if (SIMPLEPIE_PHP5)
- {
- // This keyword needs to defy coding standards for PHP4 compatibility
- $this->multifeed_objects[$i] = clone($this);
- }
- else
- {
- $this->multifeed_objects[$i] = $this;
- }
+ $this->multifeed_objects[$i] = clone $this;
$this->multifeed_objects[$i]->set_feed_url($url);
$success |= $this->multifeed_objects[$i]->init();
$i++;
@@ -8522,11 +8514,7 @@ class SimplePie_Cache_MySQL extends SimplePie_Cache_DB
if (is_a($data, 'SimplePie'))
{
- if (SIMPLEPIE_PHP5)
- {
- // This keyword needs to defy coding standards for PHP4 compatibility
- $data = clone($data);
- }
+ $data = clone $data;
$prepared = $this->prepare_simplepie_object_for_cache($data);
|
Replace clone() with clone as per PHP 5 coding standards
|
simplepie_simplepie
|
train
|
php
|
5096e87a8c752e521a47dd5923f8d2fbf30f2bf1
|
diff --git a/lib/unexpectedMessy.js b/lib/unexpectedMessy.js
index <HASH>..<HASH> 100644
--- a/lib/unexpectedMessy.js
+++ b/lib/unexpectedMessy.js
@@ -88,13 +88,13 @@ function bufferCanBeInterpretedAsUtf8(buffer) {
}
function expectMessageToSatisfy(expect, subject, value) {
+ subject.upgradeOrDowngradeBodyToMatchSpec(value);
try {
if (typeof value === 'string') {
value = new messy.Message(value);
}
expect(subject.headers, 'to [exhaustively] satisfy', value.headers || {});
- subject.upgradeOrDowngradeBodyToMatchSpec(value);
if ('body' in value) {
if (isRegExp(value.body)) {
expect(subject.body, 'to satisfy', value.body);
|
upgrade/downgrade the body before doing anything else so the diff will come out correctly in case of a header mismatch.
|
unexpectedjs_unexpected-messy
|
train
|
js
|
cfbae426c45c503e3bb5ffa8e4b74ce05092c8e1
|
diff --git a/conn_linux_integration_test.go b/conn_linux_integration_test.go
index <HASH>..<HASH> 100644
--- a/conn_linux_integration_test.go
+++ b/conn_linux_integration_test.go
@@ -3,7 +3,6 @@
package netlink_test
import (
- "errors"
"fmt"
"net"
"os"
@@ -1055,7 +1054,8 @@ func rtnlReceive(t *testing.T, c *netlink.Conn, do func()) string {
func setStrictCheck(t *testing.T, c *netlink.Conn) {
if err := c.SetOption(netlink.GetStrictCheck, true); err != nil {
- if errors.Is(err, unix.ENOPROTOOPT) {
+ // TODO(mdlayher): use errors.Is when we drop support for Go 1.12.
+ if err.(*netlink.OpError).Err == unix.ENOPROTOOPT {
t.Skipf("skipping, netlink strict checking is not supported on this kernel")
}
|
netlink: avoid errors.Is for netlink strict checking test
|
mdlayher_netlink
|
train
|
go
|
1b378b9d07868b024a107c932fa3532b6d08e087
|
diff --git a/cumulusci/robotframework/utils.py b/cumulusci/robotframework/utils.py
index <HASH>..<HASH> 100644
--- a/cumulusci/robotframework/utils.py
+++ b/cumulusci/robotframework/utils.py
@@ -208,7 +208,7 @@ class PerfJSONConverter:
def perfJSON2Dict(self, include_raw=False):
rc = {
- f"{metric['metrics']}-{metricType}": metric[metricType]
+ metric["metrics"] + "-" + metricType: metric[metricType]
for metricType in ("totalTime", "totalCalls")
for metric in self.data["summary"]
}
|
Python 2 compatibility because it was easy.
|
SFDO-Tooling_CumulusCI
|
train
|
py
|
be989a85ff089155eca34d464555f2bc857ef6d2
|
diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go
index <HASH>..<HASH> 100644
--- a/cmd/lncli/commands.go
+++ b/cmd/lncli/commands.go
@@ -15,6 +15,7 @@ import (
"strings"
"sync"
"syscall"
+ "time"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
@@ -3532,7 +3533,7 @@ var forwardingHistoryCommand = cli.Command{
payment circuits (HTLCs) over a particular time range (--start_time and
--end_time). The start and end times are meant to be expressed in
seconds since the Unix epoch. If --start_time isn't provided,
- then the Unix epoch (01-01-1970) is used. If --end_time isn't provided,
+ then 24 hours ago is used. If --end_time isn't provided,
then the current time is used.
The max number of events returned is 50k. The default number is 100,
@@ -3586,6 +3587,9 @@ func forwardingHistory(ctx *cli.Context) error {
return fmt.Errorf("unable to decode start_time %v", err)
}
args = args.Tail()
+ default:
+ now := time.Now()
+ startTime = uint64(now.Add(-time.Hour * 24).Unix())
}
switch {
|
lncli: start_time defaults to <I> hours ago
Here we set start_time to <I> hours prior
if it's not provided on the CLI. The
effect of this is when you don't provide
a start_time:
CLI: -<I>h
RPC: Unix Epoch
|
lightningnetwork_lnd
|
train
|
go
|
0eff9ac1f410bd09af5d35ac7dcc28d3b5976542
|
diff --git a/src/main/java/nl/hsac/fitnesse/fixture/slim/HttpTest.java b/src/main/java/nl/hsac/fitnesse/fixture/slim/HttpTest.java
index <HASH>..<HASH> 100644
--- a/src/main/java/nl/hsac/fitnesse/fixture/slim/HttpTest.java
+++ b/src/main/java/nl/hsac/fitnesse/fixture/slim/HttpTest.java
@@ -172,7 +172,7 @@ public class HttpTest extends SlimFixtureWithMap {
String filePath = getFilePathFromWikiUrl(fileName);
File file = new File(filePath);
if (!file.exists()) {
- throw new StopTestException(false, "File " + fileName + " not found. Resolved to: " + file.getAbsolutePath());
+ throw new StopTestException(false, "File " + filePath + " not found.");
}
try {
|
Improve error message: getFilePathFromWikiUrl already checked whether file existed. The location returned does not specify where it looked exactly
|
fhoeben_hsac-fitnesse-fixtures
|
train
|
java
|
9aa09d8fed15a253b9fe3ecbf101171198ebd66e
|
diff --git a/comment/lib.php b/comment/lib.php
index <HASH>..<HASH> 100644
--- a/comment/lib.php
+++ b/comment/lib.php
@@ -636,7 +636,7 @@ class comment {
* }
* @return boolean
*/
- public function delete_comments($param) {
+ public static function delete_comments($param) {
global $DB;
$param = (array)$param;
if (empty($param['contextid'])) {
diff --git a/question/category_class.php b/question/category_class.php
index <HASH>..<HASH> 100644
--- a/question/category_class.php
+++ b/question/category_class.php
@@ -428,7 +428,7 @@ class question_category_object {
}
// Update the category record.
- $cat = null;
+ $cat = new stdClass();
$cat->id = $updateid;
$cat->name = $newname;
$cat->info = $newinfo;
|
MDL-<I> more E_STRCT fixes
|
moodle_moodle
|
train
|
php,php
|
903c063ab00febd6605ce4757e5ced9294a6ed55
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,16 +2,6 @@ from distutils.command.build import build as DistutilsBuild
from setuptools import setup, Extension
import subprocess
-class FakeNumpy(object):
- def get_include(self):
- raise Exception('Tried to compile doom-py, but numpy is not installed. HINT: Please install numpy separately before attempting this -- `pip install numpy` should do it.')
-
-try:
- import numpy
-except Exception as e:
- print('Failed to load numpy: {}. Numpy must be already installed to normally set up doom-py. Trying to actually build doom-py will result in an error.'.format(e))
- numpy = FakeNumpy()
-
# For building Doom
class BuildDoom(DistutilsBuild):
def run(self):
|
Remove FakeNumpy
Only neeed in pachi-py where numpy is needed at build time
|
openai_doom-py
|
train
|
py
|
3d0e62c536d4a8284e7ae9adeb89ea25a253d7c5
|
diff --git a/includes/class-parse-this-base.php b/includes/class-parse-this-base.php
index <HASH>..<HASH> 100644
--- a/includes/class-parse-this-base.php
+++ b/includes/class-parse-this-base.php
@@ -39,6 +39,10 @@ class Parse_This_Base {
return $return->format( DATE_W3C );
}
+ public static function validate_email( $email ) {
+ return filter_var( $email, FILTER_VALIDATE_EMAIL );
+ }
+
/**
*
*/
diff --git a/includes/class-parse-this-rss.php b/includes/class-parse-this-rss.php
index <HASH>..<HASH> 100644
--- a/includes/class-parse-this-rss.php
+++ b/includes/class-parse-this-rss.php
@@ -63,12 +63,6 @@ class Parse_This_RSS extends Parse_This_Base {
}
}
- public static function validate_email( $email ) {
- $regexp = '/([a-z0-9_\.\-])+(\@|\[at\])+(([a-z0-9\-])+\.)+([a-z0-9]{2,4})+/i';
- preg_match( $regexp, $email, $match );
- return is_array( $match ) ? array_shift( $match ) : '';
- }
-
/*
* Takes a SimplePie_Author object and Turns it into a JF2 Author property
* @param SimplePie_Author $author
|
Move validate email to base class and refresh.
|
dshanske_parse-this
|
train
|
php,php
|
5d9968228a450b07b9b630aee1b8443726d4e11f
|
diff --git a/src/iterable-functions.php b/src/iterable-functions.php
index <HASH>..<HASH> 100644
--- a/src/iterable-functions.php
+++ b/src/iterable-functions.php
@@ -84,17 +84,16 @@ function iterable_filter(iterable $iterable, ?callable $filter = null): iterable
/**
* Reduces an iterable.
*
- * @param iterable<mixed> $iterable
- * @param callable(mixed, mixed):mixed $reduce
+ * @param iterable<TValue> $iterable
+ * @param callable(TResult|null, TValue):TResult $reduce
+ * @param TResult|null $initial
*
- * @return mixed
+ * @return TResult|null
*
- * @psalm-template TValue
+ * @template TValue
* @template TResult
- * @psalm-param iterable<TValue> $iterable
- * @psalm-param callable(TResult|null, TValue):TResult $reduce
- * @psalm-param TResult|null $initial
- * @psalm-return TResult|null
+ * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint
+ * @phpcsSuppress SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint
*/
function iterable_reduce(iterable $iterable, callable $reduce, $initial = null)
{
|
Chore: Add types to iterable_reduce() (#<I>)
|
bpolaszek_php-iterable-functions
|
train
|
php
|
023df9cb5931e14d3e30363bf77c36850f11941a
|
diff --git a/raft.go b/raft.go
index <HASH>..<HASH> 100644
--- a/raft.go
+++ b/raft.go
@@ -725,12 +725,13 @@ func (r *Raft) leaderLoop() {
}
// Group commit, gather all the ready commits
ready := []*logFuture{newLog}
+ GROUP_COMMIT_LOOP:
for i := 0; i < r.conf.MaxAppendEntries; i++ {
select {
case newLog := <-r.applyCh:
ready = append(ready, newLog)
default:
- break
+ break GROUP_COMMIT_LOOP
}
}
|
Break out of group commit early.
This is a very minor optimisation to not waste a few cycles re-checking the applyCh for new logs up to <I> times when none are present.
|
hashicorp_raft
|
train
|
go
|
3760693193e173c3708b78c7ffad06a8ff274b1d
|
diff --git a/lib/rack/heartbeat.rb b/lib/rack/heartbeat.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/heartbeat.rb
+++ b/lib/rack/heartbeat.rb
@@ -16,5 +16,5 @@ module Rack
end
end
-require 'heartbeat/railtie' if defined?(Rails)
+require File.expand_path('../heartbeat/railtie', __FILE__) if defined?(Rails)
diff --git a/lib/rack/heartbeat/railtie.rb b/lib/rack/heartbeat/railtie.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/heartbeat/railtie.rb
+++ b/lib/rack/heartbeat/railtie.rb
@@ -1,4 +1,4 @@
-module Rack::Heartbeat
+module Rack
class HeartBeatRailtie < Rails::Railtie
initializer "heartbeat.initializer" do |app|
|
oh, and fix path / naming issues
|
imajes_rack-heartbeat
|
train
|
rb,rb
|
ae0458f1edd21101ebc954052f5bc0d3569bada8
|
diff --git a/lib/irc.js b/lib/irc.js
index <HASH>..<HASH> 100644
--- a/lib/irc.js
+++ b/lib/irc.js
@@ -551,10 +551,18 @@ function Client(server, nick, opt) {
case "PING":
self.send("PONG", message.args[0]);
break;
+ case "QUIT":
+ if ( self.opt.debug )
+ sys.log("QUIT: " + message.prefix + " " + message.args.join(" "));
+ break;
case "NOTICE":
if ( self.opt.debug )
sys.log("NOTICE: " + message.args.join(" "));
break;
+ case "MODE":
+ if ( self.opt.debug )
+ sys.log("MODE:" + message.args[0] + " sets mode: " + message.args[1]);
+ break;
case "rpl_motdstart":
self.motd = message.args[1] + "\n";
break;
|
Added QUIT and MODE to handled messages
|
martynsmith_node-irc
|
train
|
js
|
a14170287ba94f5af6dc139fb3c03f2d38be6562
|
diff --git a/test/cases/EmptyDisallow.php b/test/cases/EmptyDisallow.php
index <HASH>..<HASH> 100644
--- a/test/cases/EmptyDisallow.php
+++ b/test/cases/EmptyDisallow.php
@@ -7,8 +7,6 @@ class EmptyDisallowTest extends \PHPUnit_Framework_TestCase
* @covers RobotsTxtParser::isAllowed
* @covers RobotsTxtParser::isDisallowed
* @covers RobotsTxtParser::checkRule
- * @expectedException \DomainException
- * @expectedExceptionMessage Unable to check rules
* @param string $robotsTxtContent
*/
public function testEmptyDisallow($robotsTxtContent)
|
Removed even more non-sense code
This test was never intended to throw any exception, still it expects one.
Please don't mess up the code !!!
|
t1gor_Robots.txt-Parser-Class
|
train
|
php
|
3de00fadab8c8dc947e050c8b9921edcfe3f139b
|
diff --git a/spyder/plugins/ipythonconsole/plugin.py b/spyder/plugins/ipythonconsole/plugin.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/ipythonconsole/plugin.py
+++ b/spyder/plugins/ipythonconsole/plugin.py
@@ -773,8 +773,7 @@ class IPythonConsole(SpyderPluginWidget):
# Add the action to the 'Consoles' menu on the main window
main_consoles_menu = self.main.consoles_menu_actions
main_consoles_menu.insert(0, create_client_action)
- main_consoles_menu += [create_pylab_action, create_sympy_action,
- create_cython_action, connect_to_kernel_action,
+ main_consoles_menu += [special_console_menu, connect_to_kernel_action,
MENU_SEPARATOR,
self.interrupt_action, restart_action,
reset_action]
|
Add special console menu to main consoles menu
|
spyder-ide_spyder
|
train
|
py
|
ae9914accd4846caaeb0a5bd5f0f7ce4b02cd078
|
diff --git a/packages/react-atlas-core/src/radioGroup/RadioGroup.js b/packages/react-atlas-core/src/radioGroup/RadioGroup.js
index <HASH>..<HASH> 100644
--- a/packages/react-atlas-core/src/radioGroup/RadioGroup.js
+++ b/packages/react-atlas-core/src/radioGroup/RadioGroup.js
@@ -4,7 +4,7 @@ import cx from 'classNames';
const RadioGroup = ({ className, children, name, ...props }) => {
return (
- <div {...props} styleName={className}>
+ <div {...props} className={className}>
{React.Children.map(children, child => {
if (child.type === Radio) {
return <Radio {...child.props} name={name}/>;
|
changed styleName to className in radioGroup
|
DigitalRiver_react-atlas
|
train
|
js
|
f145f131bb49ac0097ecedbaa07115e4b974082b
|
diff --git a/nion/swift/ScriptsDialog.py b/nion/swift/ScriptsDialog.py
index <HASH>..<HASH> 100644
--- a/nion/swift/ScriptsDialog.py
+++ b/nion/swift/ScriptsDialog.py
@@ -146,6 +146,13 @@ class RunScriptDialog(Dialog.ActionDialog):
list_widget.items = items
self.ui.set_persistent_object("interactive_scripts_0", items)
+ def remove_clicked() -> None:
+ indexes = list(list_widget.selected_items)
+ for index in sorted(indexes, reverse=True):
+ del items[index]
+ list_widget.items = items
+ self.ui.set_persistent_object("interactive_scripts_0", items)
+
def run_clicked() -> None:
indexes = list_widget.selected_items
if len(indexes) == 1:
@@ -159,6 +166,7 @@ class RunScriptDialog(Dialog.ActionDialog):
add_button_widget.on_clicked = add_clicked
remove_button_widget = ui.create_push_button_widget(_("Remove"))
+ remove_button_widget.on_clicked = remove_clicked
run_button_widget = ui.create_push_button_widget(_("Run"))
run_button_widget.on_clicked = run_clicked
|
Connect the 'remove' button in Scripts dialog.
|
nion-software_nionswift
|
train
|
py
|
068348a64855562f6ff9d27fddc9e6aac5cf207a
|
diff --git a/tests/Whoops/Exception/InspectorTest.php b/tests/Whoops/Exception/InspectorTest.php
index <HASH>..<HASH> 100644
--- a/tests/Whoops/Exception/InspectorTest.php
+++ b/tests/Whoops/Exception/InspectorTest.php
@@ -45,6 +45,19 @@ class InspectorTest extends TestCase
}
/**
+ * @covers Whoops\Exception\Inspector::getFrames
+ */
+ public function testDoesNotFailOnPHP7ErrorObject()
+ {
+ if (class_exists('Error')) {
+ $inner = new \Error('inner');
+ $outer = $this->getException('outer', 0, $inner);
+ $inspector = $this->getInspectorInstance($outer);
+ $frames = $inspector->getFrames();
+ $this->assertSame($outer->getLine(), $frames[0]->getLine());
+ }
+ }
+ /**
* @covers Whoops\Exception\Inspector::getExceptionName
*/
public function testReturnsCorrectExceptionName()
|
Add unit test, fails on PHP7 if Inspector::getTrace() requires Exception instead of also allowing Error
|
filp_whoops
|
train
|
php
|
a7dc26d0407e451721adfea6c01f6b8d67ab820e
|
diff --git a/eppy/tests/test_report_tables/test_report_tables.py b/eppy/tests/test_report_tables/test_report_tables.py
index <HASH>..<HASH> 100644
--- a/eppy/tests/test_report_tables/test_report_tables.py
+++ b/eppy/tests/test_report_tables/test_report_tables.py
@@ -21,9 +21,9 @@ def _report_tables(linesTable):
#print(reportNm[indx], reportHeader[2], 'Report')
reportDict[reportHeader[j]] = linesTable[i][1]
else:
- #print(reportNm[indx], reportHeader[2], 'Table')
+ print(reportNm[indx], reportHeader[2], 'Table')
indx = indx+1
- return reportDict.keys()
+ return reportDict.keys()
# def select_table(report_name, table_name, html_doc):
# """Uses the output of report_tables function to produce a
|
Minor adjustments to get the test running, and provide some meaningful output
|
santoshphilip_eppy
|
train
|
py
|
ec439be6cb675761a7794db3f1399e7fe67d28b0
|
diff --git a/pg.js b/pg.js
index <HASH>..<HASH> 100644
--- a/pg.js
+++ b/pg.js
@@ -435,11 +435,15 @@ SqlBuilder.column = function(name, schema) {
switch (cast) {
case 'integer':
case 'int':
- case 'byte':
case 'smallint':
case 'number':
cast = '::int';
break;
+ case 'byte':
+ case 'binary':
+ case 'bytea':
+ cast = '::bytea';
+ break;
case 'float':
case 'real':
case 'double':
@@ -451,6 +455,13 @@ SqlBuilder.column = function(name, schema) {
case 'bool':
cast = '::boolean';
break;
+ case 'text':
+ case 'varchar':
+ case 'character':
+ case 'char':
+ case 'string':
+ cast = '::text';
+ break;
}
}
|
Added more types for casting in Postgres
Separated out binary casting from integer (binary is stored as "bytea" which contains alpha characters).
Added in string casting to "text".
|
totaljs_node-sqlagent
|
train
|
js
|
5a2d5179a9bce061139e745a38098ff281d0a002
|
diff --git a/lionengine-core/src/main/java/com/b3dgs/lionengine/Resolution.java b/lionengine-core/src/main/java/com/b3dgs/lionengine/Resolution.java
index <HASH>..<HASH> 100644
--- a/lionengine-core/src/main/java/com/b3dgs/lionengine/Resolution.java
+++ b/lionengine-core/src/main/java/com/b3dgs/lionengine/Resolution.java
@@ -102,6 +102,24 @@ public final class Resolution
/**
* Get scaled resolution.
*
+ * @param factor The scale factor (strictly superior to 0).
+ * @return The scaled resolution.
+ * @throws LionEngineException If invalid arguments.
+ */
+ public Resolution getScaled(double factor)
+ {
+ Check.superiorStrict(factor, 0);
+
+ final double ratio = width / (double) height;
+ final double h = Math.ceil(height * factor);
+ final double w = Math.ceil(h * ratio);
+
+ return new Resolution((int) w, (int) h, rate);
+ }
+
+ /**
+ * Get scaled resolution.
+ *
* @param factorX The horizontal scale factor (strictly superior to 0).
* @param factorY The vertical scale factor (strictly superior to 0).
* @return The scaled resolution.
|
#<I>: Resolution getScaled function added.
|
b3dgs_lionengine
|
train
|
java
|
76d24a94c0f10fc26aff13fd9779ceeda715901d
|
diff --git a/mpop/projectable.py b/mpop/projectable.py
index <HASH>..<HASH> 100644
--- a/mpop/projectable.py
+++ b/mpop/projectable.py
@@ -178,4 +178,4 @@ class Projectable(Dataset):
else:
res.append("not loaded")
- return ", ".join(res)
+ return res[0] + ", ".join(res[1:])
|
Fix projectables str to look better.
|
pytroll_satpy
|
train
|
py
|
2b03d089ad3d67b0f0dd9f046ed7a7fb204888be
|
diff --git a/BehatAliceLoader.php b/BehatAliceLoader.php
index <HASH>..<HASH> 100644
--- a/BehatAliceLoader.php
+++ b/BehatAliceLoader.php
@@ -35,16 +35,17 @@ class BehatAliceLoader extends Yaml
public function loadTableNode($entity, TableNode $data) {
$hash = [];
- $key = null;
+ $key_col = null;
foreach ($data->getRow(0) as $col => $header) {
if ($col === 0 || $header[0] === '@') {
- $key = $header;
+ $key_col = $header;
}
}
// Parse any inline YAML inside a cell
foreach ($data->getHash() as $row) {
+ $key = $row[$key_col];
foreach ($row as $j => $cell) {
if ($j[0] === '@') continue;
|
Slight logic bug in last fix.
|
vivait_BehatAliceLoader
|
train
|
php
|
1b5a264d52a24a7a60b42963e1c6eafb0cf5e9df
|
diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java
index <HASH>..<HASH> 100644
--- a/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java
+++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java
@@ -261,6 +261,8 @@ public abstract class IQ extends Stanza {
}
protected final void initializeAsResultFor(IQ request) {
+ assert this != request;
+
if (!(request.getType() == Type.get || request.getType() == Type.set)) {
throw new IllegalArgumentException(
"IQ must be of type 'set' or 'get'. Original IQ: " + request.toXML());
|
Add assert to IQ.initializeAsResultFor(IQ)
This method is not meant to be used to be invoked with the identity.
|
igniterealtime_Smack
|
train
|
java
|
1006a12a533ff62a05ef49db35d6604ac13837ec
|
diff --git a/public/js/jsbin.js b/public/js/jsbin.js
index <HASH>..<HASH> 100644
--- a/public/js/jsbin.js
+++ b/public/js/jsbin.js
@@ -96,6 +96,13 @@ function dedupe(array) {
function exposeSettings() {
'use strict';
+ function mockEditor (editor, methods) {
+ return methods.reduce(function (mockEditor, method) {
+ mockEditor[method] = editor[method].bind(editor);
+ return mockEditor;
+ }, {});
+ }
+
function mockPanels() {
var results = {};
var panels = jsbin.panels.panels;
|
mockEditor function, to ease future method additions
|
jsbin_jsbin
|
train
|
js
|
6ff5dca62ec6e61f80ab5f75886838c5ce9896b0
|
diff --git a/flatpack/src/main/java/net/sf/flatpack/util/ParserUtils.java b/flatpack/src/main/java/net/sf/flatpack/util/ParserUtils.java
index <HASH>..<HASH> 100644
--- a/flatpack/src/main/java/net/sf/flatpack/util/ParserUtils.java
+++ b/flatpack/src/main/java/net/sf/flatpack/util/ParserUtils.java
@@ -152,7 +152,7 @@ public final class ParserUtils {
continue; // skip bad char
}
- if (currentChar != delimiter && currentChar != qualifier) {
+ if ((currentChar != delimiter || insideQualifier) && currentChar != qualifier) {
previousChar = currentChar;
newBlock[sizeSelected++] = currentChar;
// endBlock = i + 1;
|
Fixing regression with delimiter inside qualifier.
|
Appendium_flatpack
|
train
|
java
|
c8ad925c6fec0a68cdfc13d93f7ce649b908db1c
|
diff --git a/phy/cluster/manual/view_models.py b/phy/cluster/manual/view_models.py
index <HASH>..<HASH> 100644
--- a/phy/cluster/manual/view_models.py
+++ b/phy/cluster/manual/view_models.py
@@ -624,6 +624,8 @@ class TraceViewModel(VispyViewModel):
@interval.setter
def interval(self, value):
+ if self.model.traces is None:
+ return
if not isinstance(value, tuple) or len(value) != 2:
raise ValueError("The interval should be a (start, end) tuple.")
# Restrict the interval to the boundaries of the traces.
|
Fixed bug in GUI with unavailable traces.
|
kwikteam_phy
|
train
|
py
|
06da40cdcd0705c7eb8d05027d9e8db2cb1bc121
|
diff --git a/gns3server/modules/dynamips/hypervisor.py b/gns3server/modules/dynamips/hypervisor.py
index <HASH>..<HASH> 100644
--- a/gns3server/modules/dynamips/hypervisor.py
+++ b/gns3server/modules/dynamips/hypervisor.py
@@ -21,7 +21,6 @@ Represents a Dynamips hypervisor and starts/stops the associated Dynamips proces
import os
import subprocess
-import tempfile
import asyncio
from gns3server.utils.asyncio import wait_for_process_termination
@@ -120,10 +119,9 @@ class Hypervisor(DynamipsHypervisor):
self._command = self._build_command()
try:
log.info("Starting Dynamips: {}".format(self._command))
-
- with tempfile.NamedTemporaryFile(delete=False) as fd:
- self._stdout_file = fd.name
- log.info("Dynamips process logging to {}".format(fd.name))
+ self._stdout_file = os.path.join(self.working_dir, "dynamips_i{}_stdout.txt".format(self._id))
+ log.info("Dynamips process logging to {}".format(self._stdout_file))
+ with open(self._stdout_file, "w", encoding="utf-8") as fd:
self._process = yield from asyncio.create_subprocess_exec(*self._command,
stdout=fd,
stderr=subprocess.STDOUT,
|
Keep Dynamips stdout log file in the project directory.
|
GNS3_gns3-server
|
train
|
py
|
3e8210542aee1be6744df73954f754516ff595b5
|
diff --git a/gbdxtools/images/dem_image.py b/gbdxtools/images/dem_image.py
index <HASH>..<HASH> 100644
--- a/gbdxtools/images/dem_image.py
+++ b/gbdxtools/images/dem_image.py
@@ -23,7 +23,7 @@ class DemImage(IpeImage):
print(e)
print("Specified product not implemented: {}".format(options["product"]))
raise
- self = self.aoi(**kwargs)
+ self = self.aoi(bbox=bbox)
self.idaho_id = idaho_id
self._products = standard_products
if self.ipe.metadata['image']['minX'] == -1:
|
passing bbox in demimage creation which is important
|
DigitalGlobe_gbdxtools
|
train
|
py
|
a1e37839287af1b1da5c67b8da0be69127ea21fe
|
diff --git a/django_mobile_tests/tests.py b/django_mobile_tests/tests.py
index <HASH>..<HASH> 100644
--- a/django_mobile_tests/tests.py
+++ b/django_mobile_tests/tests.py
@@ -173,6 +173,12 @@ class RealAgentNameTests(BaseTestCase):
def test_ipad(self):
self.assertFullFlavour(u'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10')
+ def test_iphone(self):
+ self.assertMobileFlavour(u'Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3')
+
+ def test_motorola_xoom(self):
+ self.assertFullFlavour(u'Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13')
+
def test_opera_mobile_on_android(self):
'''
Regression test of issue #9
|
Tests for iPhone and Motorola Xoom.
|
gregmuellegger_django-mobile
|
train
|
py
|
57ce28fb06ad761603a88b8d1c40f68e3644a6ec
|
diff --git a/src/Two/GoogleProvider.php b/src/Two/GoogleProvider.php
index <HASH>..<HASH> 100644
--- a/src/Two/GoogleProvider.php
+++ b/src/Two/GoogleProvider.php
@@ -77,8 +77,12 @@ class GoogleProvider extends AbstractProvider implements ProviderInterface
protected function mapUserToObject(array $user)
{
return (new User)->setRaw($user)->map([
- 'id' => $user['id'], 'nickname' => Arr::get($user, 'nickname'), 'name' => $user['displayName'],
- 'email' => $user['emails'][0]['value'], 'avatar' => Arr::get($user, 'image')['url'],
+ 'id' => $user['id'],
+ 'nickname' => Arr::get($user, 'nickname'),
+ 'name' => $user['displayName'],
+ 'email' => $user['emails'][0]['value'],
+ 'avatar' => Arr::get($user, 'image')['url'],
+ 'avatar_original' => preg_replace('/\?sz=([0-9]+)/', '', Arr::get($user, 'image')['url']),
]);
}
}
|
Added "avatar_original" which returns a full size photo instead of <I>x<I> for Google provider.
|
laravel_socialite
|
train
|
php
|
9df907e0d602d2c6e56ac24815e7022a509fb224
|
diff --git a/sem/cli.py b/sem/cli.py
index <HASH>..<HASH> 100644
--- a/sem/cli.py
+++ b/sem/cli.py
@@ -282,7 +282,7 @@ def export(results_dir, filename, do_not_try_parsing, parameters):
required=True)
@click.argument('sources',
nargs=-1,
- (type)=click.Path(exists=True, resolve_path=True),
+ type=click.Path(exists=True, resolve_path=True),
required=True)
@click.option("--move",
default=False,
|
Fix Python <I> SyntaxError in cli.py
Python error was `SyntaxError: expression cannot contain assignment, perhaps you meant "=="?`
Not sure from which Python version the language semantics changed such that this error occured. Sure thing this was happening with <I>, this commit addresses that.
|
signetlabdei_sem
|
train
|
py
|
4c5bed001557e4f7ae14d0a6f1dabe09c45b369e
|
diff --git a/pythonzombie/server/__init__.py b/pythonzombie/server/__init__.py
index <HASH>..<HASH> 100644
--- a/pythonzombie/server/__init__.py
+++ b/pythonzombie/server/__init__.py
@@ -37,7 +37,7 @@ class ZombieProxyServer(object):
print "Starting Zombie.js..."
#
- # Execute the node proxy server in a subprocess.
+ # Spawn the node proxy server in a subprocess.
# This is a simple socket server that listens for data,
# evaluates it as Javascript, and passes the eval'ed
# input to a Zombie.js Browser object.
@@ -45,10 +45,11 @@ class ZombieProxyServer(object):
args = ['node', self.__proxy_path__()]
self.process = subprocess.Popen(
args,
+ stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
- stderr = subprocess.STDOUT,
- universal_newlines = True
+ stderr = subprocess.STDOUT
)
+ self.process.stdin.close()
time.sleep(.5)
#
@@ -75,7 +76,7 @@ class ZombieProxyServer(object):
# Read the response
response = []
while True:
- data = self.sock.recv(1024)
+ data = self.sock.recv(4096)
if not data: break
response.append(data)
|
Closing stdin for the spawned node child process.
|
ryanpetrello_python-zombie
|
train
|
py
|
d8b2c50b620c32b65c96b84f7fb3e1234cf25010
|
diff --git a/response.go b/response.go
index <HASH>..<HASH> 100644
--- a/response.go
+++ b/response.go
@@ -7,6 +7,13 @@ import (
"strings"
)
+// If Accept header matching fails, fall back to this type, otherwise
+// a "406: Not Acceptable" response is returned.
+// Valid values are restful.MIME_JSON and restful.MIME_XML
+// Example:
+// restful.DefaultResponseMimeType = restful.MIME_JSON
+var DefaultResponseMimeType string
+
// Response is a wrapper on the actual http ResponseWriter
// It provides several convenience methods to prepare and write response content.
type Response struct {
@@ -57,7 +64,14 @@ func (self Response) WriteEntity(value interface{}) Response {
}
}
}
- self.WriteHeader(http.StatusNotAcceptable)
+ if DefaultResponseMimeType == MIME_JSON {
+ self.WriteAsJson(value)
+ } else if DefaultResponseMimeType == MIME_XML {
+ self.WriteAsXml(value)
+ } else {
+ self.WriteHeader(http.StatusNotAcceptable)
+ self.Write([]byte("406: Not Acceptable"))
+ }
return self
}
|
Allow falling back to a mime type instead of sending a <I> response.
|
emicklei_go-restful
|
train
|
go
|
33fe680533087f73cee8ad9fd52cee54566dfa2e
|
diff --git a/lib/fastlane/actions/mailgun.rb b/lib/fastlane/actions/mailgun.rb
index <HASH>..<HASH> 100644
--- a/lib/fastlane/actions/mailgun.rb
+++ b/lib/fastlane/actions/mailgun.rb
@@ -103,8 +103,8 @@ module Fastlane
message: options[:message],
app_link: options[:app_link]
}
- hash[:success] = options[:success] if options[:success]
- hash[:ci_build_link] = options[:success] if options[:ci_build_link]
+ hash[:success] = options[:success]
+ hash[:ci_build_link] = options[:ci_build_link]
Fastlane::ErbTemplateHelper.render(
Fastlane::ErbTemplateHelper.load("mailgun_html_template"),
hash
|
Update mailgun.rb to fix missing values
Fixed bug: HTML template of mailgun doesn't have CI Build link if build has failed.
Fixed bug: CI Build link is pointing to the result of the build, and not the build link.
|
fastlane_fastlane
|
train
|
rb
|
e3ddacce39687c69686d8afb6e54998b45c9e974
|
diff --git a/browser/http.js b/browser/http.js
index <HASH>..<HASH> 100644
--- a/browser/http.js
+++ b/browser/http.js
@@ -155,16 +155,34 @@ connect.define(String, function(uri) { return connect(request({ uri: uri })) })
exports.connect = connect
function readHead(request) {
+ /**
+ Read the head data for a single request.
+ Returns a reducible.
+ **/
return take(connect(request), 1)
}
exports.readHead = readHead
function readHeaders(request) {
+ /**
+ Read the headers for a single request.
+ Returns a reducible.
+ **/
return map(readHead(request), function(head) { return head.headers })
}
exports.readHeaders = readHeaders
function read(request) {
+ /**
+ Read the request body for a single request.
+ Returns a reducible.
+
+ Example:
+
+ var body = http.read('http://example.com');
+ reduce(body, writeBodyToDOM);
+
+ **/
return drop(connect(request), 1)
}
exports.read = read
|
Add doc comments for read, readHead, readHeaders
|
Gozala_reducers
|
train
|
js
|
130a9ab5ec4e8e1bf0ce97e7f525ba82479f5b84
|
diff --git a/src/Google/Service/AppState.php b/src/Google/Service/AppState.php
index <HASH>..<HASH> 100644
--- a/src/Google/Service/AppState.php
+++ b/src/Google/Service/AppState.php
@@ -45,6 +45,7 @@ class Google_Service_AppState extends Google_Service
public function __construct(Google_Client $client)
{
parent::__construct($client);
+ $this->rootUrl = 'https://www.googleapis.com/';
$this->servicePath = 'appstate/v1/';
$this->version = 'v1';
$this->serviceName = 'appstate';
|
Updated AppState.php
This change has been generated by a script that has detected changes in the
discovery doc of the API.
Check <URL>
|
googleapis_google-api-php-client
|
train
|
php
|
35da0ca844679c8165132ad5f886363578b47a14
|
diff --git a/autopep8.py b/autopep8.py
index <HASH>..<HASH> 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -1783,9 +1783,6 @@ class Container(object):
def __getitem__(self, idx):
return self._items[idx]
- def _get_item(self, index):
- return self._items[index] if 0 <= index < len(self._items) else None
-
def reflow(self, reflowed_lines, continued_indent,
break_after_open_bracket=False):
for (index, item) in enumerate(self._items):
@@ -1794,7 +1791,7 @@ class Container(object):
else: # isinstance(item, Container)
reflowed_lines.add(item, len(continued_indent))
- next_item = self._get_item(index + 1)
+ next_item = get_item(self._items, index + 1)
if (
break_after_open_bracket and index == 0 and
# Prefer to keep empty containers together instead of
|
Use get_item that has exists
|
hhatto_autopep8
|
train
|
py
|
5984a8773bcc25bff78b58fea4d86a91f7aba178
|
diff --git a/redis-cache.php b/redis-cache.php
index <HASH>..<HASH> 100644
--- a/redis-cache.php
+++ b/redis-cache.php
@@ -16,6 +16,8 @@ if ( ! defined( 'ABSPATH' ) ) {
exit;
}
+define( 'REDIS_CACHE_VERSION', '1.5.1' );
+
if ( defined( 'WP_CLI' ) && WP_CLI ) {
require_once dirname( __FILE__ ) . '/includes/wp-cli-commands.php';
}
@@ -116,8 +118,7 @@ class RedisObjectCache {
public function enqueue_admin_styles( $hook_suffix ) {
if ( $hook_suffix === $this->screen ) {
- $plugin = get_plugin_data( __FILE__ );
- wp_enqueue_style( 'redis-cache', plugin_dir_url( __FILE__ ) . 'includes/admin-page.css', null, $plugin[ 'Version' ] );
+ wp_enqueue_style( 'redis-cache', plugin_dir_url( __FILE__ ) . 'includes/admin-page.css', null, WP_REDIS_VERSION );
}
}
|
added `WP_REDIS_VERSION`
|
tillkruss_redis-cache
|
train
|
php
|
a4143795d22fb7ab177f94aa67554f63eedb2fe6
|
diff --git a/cqlengine/tests/columns/test_container_columns.py b/cqlengine/tests/columns/test_container_columns.py
index <HASH>..<HASH> 100644
--- a/cqlengine/tests/columns/test_container_columns.py
+++ b/cqlengine/tests/columns/test_container_columns.py
@@ -67,6 +67,16 @@ class TestSetColumn(BaseCassEngTestCase):
m = TestSetModel.get(partition=m.partition)
self.assertNotIn(5, m.int_set)
+ def test_blind_deleting_last_item_should_succeed(self):
+ m = TestSetModel.create()
+ m.int_set.add(5)
+ m.save()
+
+ TestSetModel.objects(partition=m.partition).update(int_set=set())
+
+ m = TestSetModel.get(partition=m.partition)
+ self.assertNotIn(5, m.int_set)
+
def test_empty_set_retrieval(self):
m = TestSetModel.create()
m2 = TestSetModel.get(partition=m.partition)
|
test to show blind update of empty set causes CQLEngineException
|
cqlengine_cqlengine
|
train
|
py
|
90bdd11e4bb8687935ef88c118fb602103808bc4
|
diff --git a/pose-detection/demo/src/option_panel.js b/pose-detection/demo/src/option_panel.js
index <HASH>..<HASH> 100644
--- a/pose-detection/demo/src/option_panel.js
+++ b/pose-detection/demo/src/option_panel.js
@@ -135,10 +135,10 @@ function addPoseNetControllers(modelConfigFolder) {
// settings.
function addMoveNetControllers(modelConfigFolder, type) {
params.STATE.modelConfig = {...params.MOVENET_CONFIG};
- params.STATE.modelConfig.type = type != null ? type : 'thunder';
+ params.STATE.modelConfig.type = type != null ? type : 'lightning';
const typeController = modelConfigFolder.add(
- params.STATE.modelConfig, 'type', ['thunder', 'lightning']);
+ params.STATE.modelConfig, 'type', ['lightning', 'thunder']);
typeController.onChange(_ => {
// Set isModelChanged to true, so that we don't render any result during
// changing models.
|
[pose-detection]Default to lightning model for MoveNet demo. (#<I>)
PROCESS
|
tensorflow_tfjs-models
|
train
|
js
|
dc2b057137185d6b53f270f1fbf9f201264e041b
|
diff --git a/tests/unit/states/test_network.py b/tests/unit/states/test_network.py
index <HASH>..<HASH> 100644
--- a/tests/unit/states/test_network.py
+++ b/tests/unit/states/test_network.py
@@ -2,14 +2,9 @@
:codeauthor: Rahul Handay <[email protected]>
"""
-# Import Python Libs
-
import logging
-# Import Salt Libs
import salt.states.network as network
-
-# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.mock import MagicMock, patch
from tests.support.unit import TestCase
|
Drop Py2 and six on tests/unit/states/test_network.py
|
saltstack_salt
|
train
|
py
|
c8d19bb7955663f31b0c376aa88d8e4ebc73822a
|
diff --git a/src/analyzer/properties/prefixed.js b/src/analyzer/properties/prefixed.js
index <HASH>..<HASH> 100644
--- a/src/analyzer/properties/prefixed.js
+++ b/src/analyzer/properties/prefixed.js
@@ -1,9 +1,9 @@
const arrayUniq = require('array-uniq')
-const PREFIX_RE = /^-(?:webkit|moz|ms|o)-/
+const PREFIXED_REGEX = /^-(?:webkit|moz|ms|o)-/
module.exports = properties => {
- const all = properties.filter(property => PREFIX_RE.test(property))
+ const all = properties.filter(property => PREFIXED_REGEX.test(property))
const unique = arrayUniq(all).sort()
const share = (() => {
|
Cleanup (#<I>)
* Cleans up unused files
* Convert filters to user regex.test(string) instead of String.match(regex)
* Convert one more regex to the new form
|
projectwallace_css-analyzer
|
train
|
js
|
4533d008615c6a1b0fb4be0ffb6bcaf4940cdf7b
|
diff --git a/automat/_methodical.py b/automat/_methodical.py
index <HASH>..<HASH> 100644
--- a/automat/_methodical.py
+++ b/automat/_methodical.py
@@ -78,7 +78,7 @@ class MethodicalInput(object):
automaton = attr.ib(repr=False)
method = attr.ib()
symbol = attr.ib(repr=False)
- collectors = attr.ib(default=attr.Factory(dict))
+ collectors = attr.ib(default=attr.Factory(dict), repr=False)
def __get__(self, oself, type=None):
|
Exclude MethodicalInput.collectors from repr
|
glyph_automat
|
train
|
py
|
d368bce1daa911cf1c80a5e071c0bf22a91402d4
|
diff --git a/utxonursery.go b/utxonursery.go
index <HASH>..<HASH> 100644
--- a/utxonursery.go
+++ b/utxonursery.go
@@ -938,7 +938,7 @@ func (u *utxoNursery) createSweepTx(kgtnOutputs []kidOutput,
// sweep.
case lnwallet.HtlcOfferedTimeoutSecondLevel:
weightEstimate.AddWitnessInput(
- lnwallet.OfferedHtlcTimeoutWitnessSize,
+ lnwallet.SecondLevelHtlcSuccessWitnessSize,
)
csvOutputs = append(csvOutputs, input)
@@ -947,7 +947,7 @@ func (u *utxoNursery) createSweepTx(kgtnOutputs []kidOutput,
// sweep.
case lnwallet.HtlcAcceptedSuccessSecondLevel:
weightEstimate.AddWitnessInput(
- lnwallet.AcceptedHtlcSuccessWitnessSize,
+ lnwallet.SecondLevelHtlcSuccessWitnessSize,
)
csvOutputs = append(csvOutputs, input)
|
utxonursery: use proper weight estimation for second-level spends
|
lightningnetwork_lnd
|
train
|
go
|
b594bcea7d26930cb8bf3459344602b060ea4379
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -8,7 +8,15 @@ import {ensureHTMLTemplateElement} from './html-template-element';
import {ensureElementMatches} from './element-matches';
import {ensureClassList} from './class-list';
+let isInitialized = false;
+
export function initialize(): void {
+ if (isInitialized) {
+ return;
+ }
+
+ isInitialized = true;
+
ensureCustomEvent();
ensureFunctionName();
ensureHTMLTemplateElement();
|
fix(all): ensure initialization happens only once
|
aurelia_pal-browser
|
train
|
js
|
f420d683e728a7753b23474277215d1a9af7d50f
|
diff --git a/includes/class-github-api.php b/includes/class-github-api.php
index <HASH>..<HASH> 100644
--- a/includes/class-github-api.php
+++ b/includes/class-github-api.php
@@ -138,7 +138,7 @@ class GitHub_Updater_GitHub_API {
preg_match( '/^[ \t\/*#@]*Version\:\s*(.*)$/im', base64_decode( $remote->content ), $matches );
if ( ! empty( $matches[1] ) )
- $this->type->remote_version = $matches[1];
+ $this->type->remote_version = trim( $matches[1] );
}
|
trim line endings from remote_version
|
afragen_github-updater
|
train
|
php
|
683399ca27f42ec7722e49d9713e6c780710ad86
|
diff --git a/tcpport.js b/tcpport.js
index <HASH>..<HASH> 100644
--- a/tcpport.js
+++ b/tcpport.js
@@ -83,7 +83,8 @@ TcpPort.prototype.write = function (data) {
var buffer = new Buffer(data.length + 6 - 2);
buffer.writeUInt16BE(1, 0);
buffer.writeUInt16BE(0, 2);
- buffer.writeUInt16BE(data.length, 4);
+ // subtract crc bytes
+ buffer.writeUInt16BE(data.length - 2, 4);
data.copy(buffer, 6);
// send buffer to slave
|
fix mbap payload length
Even though it's not copied to the payload, data already includes the CRC. This leads to an invalid payload length in the MBAP header.
|
yaacov_node-modbus-serial
|
train
|
js
|
dd759bd0b65f20805a07ba93fcd1a93575e65b9b
|
diff --git a/src/Symfony/Components/DependencyInjection/Loader/Extension/SymfonyTemplatingExtension.php b/src/Symfony/Components/DependencyInjection/Loader/Extension/SymfonyTemplatingExtension.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Components/DependencyInjection/Loader/Extension/SymfonyTemplatingExtension.php
+++ b/src/Symfony/Components/DependencyInjection/Loader/Extension/SymfonyTemplatingExtension.php
@@ -85,7 +85,7 @@ class SymfonyTemplatingExtension extends LoaderExtension
}
else
{
- $helpers = array(
+ $helpers = null === $config['helper'] ? array() : array(
new Reference('symfony.templating.helper.javascripts'),
new Reference('symfony.templating.helper.stylesheets'),
);
|
[DependencyInjection] allowed to disabled the helpers in the templating extension
|
symfony_symfony
|
train
|
php
|
bd3732aa2227c6011823b5238939cff2766e019b
|
diff --git a/packages/ream/vue-app/get-before-resolve.js b/packages/ream/vue-app/get-before-resolve.js
index <HASH>..<HASH> 100644
--- a/packages/ream/vue-app/get-before-resolve.js
+++ b/packages/ream/vue-app/get-before-resolve.js
@@ -6,7 +6,7 @@ import { getServerPreloadPath } from 'ream/dist/runtime-utils'
* @param {import('vue').App} vm vm is the root Vue app instance
*/
export const getBeforeResolve = (vm) =>
- function beforeResolve(to, from, next) {
+ async function beforeResolve(to, from, next) {
if (!to.matched || to.matched.length === 0) {
return next()
}
@@ -16,7 +16,7 @@ export const getBeforeResolve = (vm) =>
return next()
}
const fetchProps = (next) => {
- Promise.all(
+ return Promise.all(
[
preload && preload({ params: to.params }),
hasServerPreload &&
@@ -40,6 +40,6 @@ export const getBeforeResolve = (vm) =>
next()
fetchProps()
} else {
- fetchProps(next)
+ await fetchProps(next)
}
}
|
Fix beforeResolve (#<I>)
|
ream_ream
|
train
|
js
|
bca46e0552b38175ea29ffd4303f7813ae1dbb09
|
diff --git a/lib/reference/keywordSets.js b/lib/reference/keywordSets.js
index <HASH>..<HASH> 100644
--- a/lib/reference/keywordSets.js
+++ b/lib/reference/keywordSets.js
@@ -642,6 +642,7 @@ keywordSets.atRules = uniteSets(keywordSets.pageMarginAtRules, [
'font-feature-values',
'import',
'keyframes',
+ 'layer',
'media',
'namespace',
'nest',
diff --git a/lib/rules/at-rule-no-unknown/__tests__/index.js b/lib/rules/at-rule-no-unknown/__tests__/index.js
index <HASH>..<HASH> 100644
--- a/lib/rules/at-rule-no-unknown/__tests__/index.js
+++ b/lib/rules/at-rule-no-unknown/__tests__/index.js
@@ -82,6 +82,9 @@ testRule({
{
code: '.foo { color: red; @nest .parent & { color: blue; } }',
},
+ {
+ code: '@layer framework { h1 { background: white; } }',
+ },
],
reject: [
|
Fix `at-rule-no-unknown` false positives for `@layer` (#<I>)
|
stylelint_stylelint
|
train
|
js,js
|
d2d7ae6c592bf24f1e7519c5f0db97fee766ed95
|
diff --git a/lib/itamae/handler.rb b/lib/itamae/handler.rb
index <HASH>..<HASH> 100644
--- a/lib/itamae/handler.rb
+++ b/lib/itamae/handler.rb
@@ -1,5 +1,4 @@
require 'itamae/handler/base'
-require 'itamae/handler/debug'
module Itamae
module Handler
|
Do not require handler/debug explicitly.
|
itamae-kitchen_itamae
|
train
|
rb
|
e7686882fa80b119c1f71730ce07384bcb81f5f5
|
diff --git a/plugins/commands/serve/mappers.rb b/plugins/commands/serve/mappers.rb
index <HASH>..<HASH> 100644
--- a/plugins/commands/serve/mappers.rb
+++ b/plugins/commands/serve/mappers.rb
@@ -249,6 +249,10 @@ module VagrantPlugins
end
logger.debug("map of #{value.class} to #{to.nil? ? 'unknown' : to.inspect} => #{result}")
result
+ rescue => err
+ logger.debug("mapping failed of #{value.class} to #{to.nil? ? 'unknown' : to.inspect}")
+ logger.debug("#{err.class}: #{err}\n" + err.backtrace.join("\n"))
+ raise
end
# Generate the given type based on given and/or
|
Log error and stacktrace on mapping errors
|
hashicorp_vagrant
|
train
|
rb
|
d8ff2c08854ddc5169cc06b8887aa53308c309be
|
diff --git a/datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/modelselection/splitters/ShuffleSplitter.java b/datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/modelselection/splitters/ShuffleSplitter.java
index <HASH>..<HASH> 100644
--- a/datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/modelselection/splitters/ShuffleSplitter.java
+++ b/datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/modelselection/splitters/ShuffleSplitter.java
@@ -59,7 +59,7 @@ public class ShuffleSplitter extends AbstractSplitter {
}
@Override
- public Iterable<Split> split(Dataframe dataset) {
+ public Iterable<ShuffleSplitter.Split> split(Dataframe dataset) {
final int n = dataset.size();
if(proportion <=0.0 || proportion >=1.0) {
throw new IllegalArgumentException("The train size should be between 0.0 and 1.0.");
|
Change return type on ShuffleSplitter.
|
datumbox_datumbox-framework
|
train
|
java
|
a29efb4426178d18d399981e0c79472f83998a03
|
diff --git a/src/Admin42/Permission/Rbac/Identity/IdentityRoleProvider.php b/src/Admin42/Permission/Rbac/Identity/IdentityRoleProvider.php
index <HASH>..<HASH> 100644
--- a/src/Admin42/Permission/Rbac/Identity/IdentityRoleProvider.php
+++ b/src/Admin42/Permission/Rbac/Identity/IdentityRoleProvider.php
@@ -9,7 +9,7 @@
namespace Admin42\Permission\Rbac\Identity;
-use Core42\Authentication\AuthenticationService;
+use Admin42\Authentication\AuthenticationService;
use Core42\Permission\Rbac\Identity\IdentityRoleProviderInterface;
use Core42\Permission\Rbac\Role\RoleInterface;
|
reverted change - why was this changed anyways?
|
kiwi-suite_admin42
|
train
|
php
|
edf87ad9d9a63f9539dba312aa7bd0ea7e9b8667
|
diff --git a/src/navigation-plan.js b/src/navigation-plan.js
index <HASH>..<HASH> 100644
--- a/src/navigation-plan.js
+++ b/src/navigation-plan.js
@@ -41,6 +41,8 @@ export function buildNavigationPlan(navigationContext, forceLifecycleMinimum) {
//TODO: should we tell them if the parent had a lifecycle min change?
viewPortPlan.strategy = prevViewPortInstruction.component.executionContext
.determineActivationStrategy(...next.lifecycleArgs);
+ } else if(next.config.activationStrategy){
+ viewPortPlan.strategy = next.config.activationStrategy;
} else if (newParams || forceLifecycleMinimum) {
viewPortPlan.strategy = activationStrategy.invokeLifecycle;
} else {
@@ -55,7 +57,7 @@ export function buildNavigationPlan(navigationContext, forceLifecycleMinimum) {
.createNavigationContext(childInstruction);
return buildNavigationPlan(
- viewPortPlan.childNavigationContext,
+ viewPortPlan.childNavigationContext,
viewPortPlan.strategy == activationStrategy.invokeLifecycle)
.then(childPlan => {
viewPortPlan.childNavigationContext.plan = childPlan;
|
feat(navigation-plan): enable configuring the activationStrategy on the route config instead of the view model
|
aurelia_router
|
train
|
js
|
05f07a4d9afb6ff22ec676d89c3f5655a4070ebf
|
diff --git a/internal/pipeline/pipeline.go b/internal/pipeline/pipeline.go
index <HASH>..<HASH> 100644
--- a/internal/pipeline/pipeline.go
+++ b/internal/pipeline/pipeline.go
@@ -37,10 +37,10 @@ type Piper interface {
// BuildPipeline contains all build-related pipe implementations in order
// nolint:gochecknoglobals
var BuildPipeline = []Piper{
- before.Pipe{}, // run global hooks before build
env.Pipe{}, // load and validate environment variables
git.Pipe{}, // get and validate git repo state
semver.Pipe{}, // parse current tag to a semver
+ before.Pipe{}, // run global hooks before build
defaults.Pipe{}, // load default configs
snapshot.Pipe{}, // snapshot version handling
dist.Pipe{}, // ensure ./dist is clean
|
feat(pipeline): change the pipeline order to support additional template variables in the before pipe (#<I>)
This change allows us to use all the template variables in the named templates in the before hook.
Issue: GH-<I>
|
goreleaser_goreleaser
|
train
|
go
|
545e7222959d8e73e6d78e618ab2964b1a90defc
|
diff --git a/lib/crash_reporter.rb b/lib/crash_reporter.rb
index <HASH>..<HASH> 100644
--- a/lib/crash_reporter.rb
+++ b/lib/crash_reporter.rb
@@ -1,5 +1,6 @@
require 'crash_reporter/version'
require 'crash_reporter/configure'
+require 'crash_reporter/dsl'
module CrashReporter
class << self
|
include dsl in the main requires
|
articulate_crash-reporter
|
train
|
rb
|
767af0001069f1cb2edf7187eccacb74e9b23752
|
diff --git a/src/main/java/com/hubspot/jinjava/objects/collections/PyMap.java b/src/main/java/com/hubspot/jinjava/objects/collections/PyMap.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/hubspot/jinjava/objects/collections/PyMap.java
+++ b/src/main/java/com/hubspot/jinjava/objects/collections/PyMap.java
@@ -6,9 +6,7 @@ import java.util.Iterator;
import java.util.Map;
import java.util.Set;
-public class PyMap
- extends ForwardingMap<String, Object>
- implements PyWrapper, Iterable<String> {
+public class PyMap extends ForwardingMap<String, Object> implements PyWrapper {
private Map<String, Object> map;
public PyMap(Map<String, Object> map) {
|
fixed pymap post rever revert
|
HubSpot_jinjava
|
train
|
java
|
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.