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 |
|---|---|---|---|---|---|
6a85b20c3fd8305cad69f82427ffbc96469dfbce | diff --git a/drivers/ris.php b/drivers/ris.php
index <HASH>..<HASH> 100644
--- a/drivers/ris.php
+++ b/drivers/ris.php
@@ -117,7 +117,7 @@ class RefLib_ris {
$ref = array('type' => strtolower($match[1]));
$rawref = array();
- preg_match_all('!^([A-Z]{2}) - (.*)$!m', $match[2], $rawrefextracted, PREG_SET_ORDER);
+ preg_match_all('!^([A-Z0-9]{2}) - (.*)$!m', $match[2], $rawrefextracted, PREG_SET_ORDER);
foreach ($rawrefextracted as $rawrefbit) {
// key/val mappings
if (isset($this->_mapHash[$rawrefbit[1]])) { | Corrected extraction regex
The regex didn’t pull tags with numbers (e.g., `T1`, the title). | hash-bang_RefLib | train | php |
ef2ff08bff15599c06cf98e00a1678cfc109e00c | diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/main.js b/lib/node_modules/@stdlib/repl/presentation/lib/main.js
index <HASH>..<HASH> 100644
--- a/lib/node_modules/@stdlib/repl/presentation/lib/main.js
+++ b/lib/node_modules/@stdlib/repl/presentation/lib/main.js
@@ -1120,13 +1120,17 @@ setNonEnumerableReadOnly( Presentation.prototype, 'show', function show() {
* - `\u001b`: ESC, the escape character
* - `[2K`: clear the entire line
* - `[1G`: move the cursor to the beginning of the line
+ * - `[1F`: move the cursor to the beginning of the previous line
*
* [1]: https://en.wikipedia.org/wiki/ANSI_escape_code
*/
+ str = '\u001b[2K\u001b[1G' + str + this._opts.newline;
if ( this._opts.autoClear ) {
this._repl.clear();
+ } else {
+ str += this._opts.newline + this._opts.newline + '\u001b[2A';
}
- this._repl._ostream.write( '\u001b[2K\u001b[1G'+str+this._opts.newline );
+ this._repl._ostream.write( str );
this._repl._displayPrompt( false );
}
return this; | Fix presentation alignment when not automatically clearing screen | stdlib-js_stdlib | train | js |
1f897ae67933e9819753ee03dc113ff25fadc429 | diff --git a/tornado/curl_httpclient.py b/tornado/curl_httpclient.py
index <HASH>..<HASH> 100644
--- a/tornado/curl_httpclient.py
+++ b/tornado/curl_httpclient.py
@@ -268,7 +268,7 @@ class CurlAsyncHTTPClient(AsyncHTTPClient):
info["callback"](HTTPResponse(
request=info["request"], code=code, headers=info["headers"],
buffer=buffer, effective_url=effective_url, error=error,
- reason=info['headers'].get("reason", None),
+ reason=info['headers'].get("x-http-reason", None),
request_time=time.time() - info["curl_start_time"],
time_info=time_info))
except Exception:
@@ -473,9 +473,9 @@ def _curl_header_callback(headers, header_line):
headers.clear()
try:
(__, __, reason) = httputil.parse_response_start_line(header_line)
- header_line = "Reason: %s" % reason
+ header_line = "X-HTTP-Reason: %s" % reason
except AssertionError:
- pass
+ return
if not header_line:
return
headers.parse_line(header_line) | Fixes based on code review.
Don't fall through if regex doesn't match.
Use 'X-HTTP-Reason' instead of 'Reason'. | tornadoweb_tornado | train | py |
23509837148246af9cc9374ce64021d0b6c3a9ad | diff --git a/java/org.cohorte.herald.core/src/main/java/org/cohorte/herald/core/utils/MessageUtils.java b/java/org.cohorte.herald.core/src/main/java/org/cohorte/herald/core/utils/MessageUtils.java
index <HASH>..<HASH> 100644
--- a/java/org.cohorte.herald.core/src/main/java/org/cohorte/herald/core/utils/MessageUtils.java
+++ b/java/org.cohorte.herald.core/src/main/java/org/cohorte/herald/core/utils/MessageUtils.java
@@ -61,7 +61,8 @@ public class MessageUtils {
return json.toString();
}
- public static MessageReceived fromJSON(String json) throws UnmarshallException {
+ @SuppressWarnings("unchecked")
+ public static MessageReceived fromJSON(String json) throws UnmarshallException {
try {
JSONObject wParsedMsg = new JSONObject(json);
{ | adding supresswarning annotation for unchecked code | cohorte_cohorte-herald | train | java |
6c8d583cb35585049d18adff927029e023f3b89f | diff --git a/src/main/java/org/metacsp/sensing/Sensor.java b/src/main/java/org/metacsp/sensing/Sensor.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/metacsp/sensing/Sensor.java
+++ b/src/main/java/org/metacsp/sensing/Sensor.java
@@ -112,8 +112,14 @@ public class Sensor implements Serializable {
return ret;
}
- public void postSensorValue(String sensorValue, long time) {
+ public int postSensorValue(String sensorValue, long time) {
animator.postSensorValueToDispatch(this, time, sensorValue);
+ return getHashCode(this.getName(), sensorValue, time);
+ }
+
+ public static int getHashCode(String sensorName, String sensorValue, long time) {
+ String ret = sensorName + sensorValue + (""+time);
+ return ret.hashCode();
}
public void registerSensorTrace(String sensorTraceFile) { | Added hashcode method for posted sensor values in class Sensor | FedericoPecora_meta-csp-framework | train | java |
6c71391a4e1559450abf38657f14d05474a5cb3f | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ _doc_requires = [
'sphinx-better-theme'
]
-if sys.version_info[:2] <= (3, 4):
+if sys.version_info[:2] < (3, 4):
# only depend on enum34 and singledispatch if Python is older than 3.4
_requires += ['singledispatch']
_requires += ['enum34'] | only older not equals
we do not want to depend on these if python is version <I>
we only want to depend on these if python is older than <I>
delete the equals. | SecurityInnovation_PGPy | train | py |
748c691a09ed2f30bc4297788c71147836caaea8 | diff --git a/tests/iDimensionz/SendGridWebApiV3/Api/ApiUnitTestAbstract.php b/tests/iDimensionz/SendGridWebApiV3/Api/ApiUnitTestAbstract.php
index <HASH>..<HASH> 100644
--- a/tests/iDimensionz/SendGridWebApiV3/Api/ApiUnitTestAbstract.php
+++ b/tests/iDimensionz/SendGridWebApiV3/Api/ApiUnitTestAbstract.php
@@ -28,6 +28,9 @@
namespace Tests\iDimensionz\SendGridWebApiV3\Api;
+/**
+ * @codeCoverageIgnore
+ */
class ApiUnitTestAbstract extends \PHPUnit_Framework_TestCase
{
protected $sendGridRequest; | Ignore ApiUnitTestAbstract from code coverage analysis | idimensionz_sendgrid-webapi-v3-php | train | php |
539275141dd3a4efbbbfd9bdb978f3ed59e3f05d | diff --git a/hdf5storage/Marshallers.py b/hdf5storage/Marshallers.py
index <HASH>..<HASH> 100644
--- a/hdf5storage/Marshallers.py
+++ b/hdf5storage/Marshallers.py
@@ -529,6 +529,7 @@ class NumpyScalarArrayMarshaller(TypeMarshaller):
np.float16, np.float32, np.float64,
np.complex64, np.complex128,
np.bytes_, np.unicode_, np.object_]
+ self._numpy_types = list(self.types)
# Using Python 3 type strings.
self.python_type_strings = ['numpy.ndarray', 'numpy.matrix',
'numpy.chararray',
@@ -1128,7 +1129,7 @@ class NumpyScalarArrayMarshaller(TypeMarshaller):
# don't all have the exact same dtype and shape, then
# this field will just be an object field.
if v.size == 0 or type(v.flat[0]) \
- not in self.type_to_typestring:
+ not in self._numpy_types:
dt_whole.append((k_name, 'object'))
continue | Fixed small bug in NumpyScalarArrayMarshallers where a list that is modified by inheriting classes was used to check if something was a handled numpy type. | frejanordsiek_hdf5storage | train | py |
643c09a28e170ea02d4d3c0ce81814e9183f7eac | diff --git a/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php b/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php
+++ b/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php
@@ -277,7 +277,7 @@ class DoctrineExtension extends Extension
);
$ormEmDef = new Definition('%doctrine.orm.entity_manager_class%', $ormEmArgs);
$ormEmDef->setFactoryMethod('create');
- $ormEmDef->addTag('doctrine.orm.entity_manager');
+ $ormEmDef->addTag('doctrine.orm.entity_manager');
$container->setDefinition(sprintf('doctrine.orm.%s_entity_manager', $entityManager['name']), $ormEmDef);
if ($entityManager['name'] == $defaultEntityManager) { | [DoctrineBundle] Tabs to spaces | symfony_symfony | train | php |
b7cf2a2575995b1c5966e8b0c079381f2c9cde84 | diff --git a/src/Service/ProducerManager.php b/src/Service/ProducerManager.php
index <HASH>..<HASH> 100644
--- a/src/Service/ProducerManager.php
+++ b/src/Service/ProducerManager.php
@@ -48,7 +48,8 @@ class ProducerManager
Loop::defer(function () use ($producer) {
if ($producer instanceof RepeatProducerInterface) {
yield $this->beanstalk->use($producer->getTube());
- Loop::repeat($producer->getInterval(), function () use ($producer) {
+ Loop::repeat($producer->getInterval(), function ($watcherId) use ($producer) {
+ Loop::disable($watcherId);
$jobs = $producer->produce();
foreach ($jobs as $job) {
try {
@@ -69,6 +70,7 @@ class ProducerManager
$producer->onProduceFail($job, $e);
}
}
+ Loop::enable($watcherId);
});
} else {
throw new \RuntimeException(sprintf('Unknown producer type "%s".', get_class($producer))); | Avoid repeat producers to be called before previous is finished | webgriffe_esb | train | php |
4aa58f1c14daa3bab264e1968beb25a5cdb17234 | diff --git a/packages/ember-template-compiler/lib/system/compile-options.js b/packages/ember-template-compiler/lib/system/compile-options.js
index <HASH>..<HASH> 100644
--- a/packages/ember-template-compiler/lib/system/compile-options.js
+++ b/packages/ember-template-compiler/lib/system/compile-options.js
@@ -10,8 +10,6 @@ export default function compileOptions(_options) {
if (options.moduleName) {
let meta = options.meta;
meta.moduleName = options.moduleName;
-
- delete options.moduleName;
}
if (!options.plugins) { | [Bugfix Beta] Don't delete moduleName from options | emberjs_ember.js | train | js |
9ede0a548dc2341d147ed0a283c01006539e6a8d | diff --git a/src/MediaCollections/FileAdder.php b/src/MediaCollections/FileAdder.php
index <HASH>..<HASH> 100644
--- a/src/MediaCollections/FileAdder.php
+++ b/src/MediaCollections/FileAdder.php
@@ -123,9 +123,9 @@ class FileAdder
throw UnknownType::create();
}
- public function preservingOriginal(): self
+ public function preservingOriginal(bool $preserveOriginal = true): self
{
- $this->preserveOriginal = true;
+ $this->preserveOriginal = $preserveOriginal;
return $this;
} | Update FileAdder.php (#<I>)
With this little one you avoid having to make:
if($preserveOriginal){
return $this
->addMedia($file)
->usingName($name)
->preservingOriginal()
->toMediaCollection($collection_name);
}
else{
return $this
->addMedia($file)
->usingName($name)
->toMediaCollection($collection_name);
} | spatie_laravel-medialibrary | train | php |
e8752b37578ffdd910a82ef1dec57c80cfc1b809 | diff --git a/code/MemberProfilePage.php b/code/MemberProfilePage.php
index <HASH>..<HASH> 100644
--- a/code/MemberProfilePage.php
+++ b/code/MemberProfilePage.php
@@ -788,7 +788,7 @@ class MemberProfilePage_Controller extends Page_Controller {
if ($groups) foreach ($groups as $group) {
foreach ($group->Members() as $_member) {
- if ($member->Email) $emails[] = $_member->Email;
+ if ($_member->Email) $emails[] = $_member->Email;
}
} | Fix a typo in approval member email | symbiote_silverstripe-memberprofiles | train | php |
34d32aab4571f38d7ce3b143d6db6b349dd5e416 | diff --git a/tests/Rct567/DomQuery/Tests/DomQueryTest.php b/tests/Rct567/DomQuery/Tests/DomQueryTest.php
index <HASH>..<HASH> 100644
--- a/tests/Rct567/DomQuery/Tests/DomQueryTest.php
+++ b/tests/Rct567/DomQuery/Tests/DomQueryTest.php
@@ -307,6 +307,18 @@ class DomQueryTest extends \PHPUnit\Framework\TestCase
}
/*
+ * Test to array and array as constructor argument
+ */
+ public function testConstructorWithNodesArray()
+ {
+ $nodes_array = DomQuery::create('<div>X</div><p>Nope</p>')->toArray();
+ $this->assertContainsOnlyInstancesOf(\DOMNode::class, $nodes_array);
+ $this->assertCount(2, $nodes_array);
+ $dom = new DomQuery($nodes_array);
+ $this->assertEquals('<div>X</div><p>Nope</p>', (string) $dom);
+ }
+
+ /*
* Test constructor exception
*/
public function testConstructorException() | add test for to and from array of nodes | Rct567_DomQuery | train | php |
ce609c5f50dcfcad901b2bf1e1df4e9472e0ae46 | diff --git a/dvc/command/data_sync.py b/dvc/command/data_sync.py
index <HASH>..<HASH> 100644
--- a/dvc/command/data_sync.py
+++ b/dvc/command/data_sync.py
@@ -52,9 +52,6 @@ class CmdDataStatus(CmdBase):
with DvcLock(self.is_locker, self.git):
status = self.cloud.status(self.parsed_args.targets, self.parsed_args.jobs)
- if len(list(status)) != len(self.parsed_args.targets):
- return 1
-
self._show(status)
return 0 | status: don't return 1 if len(statuses) != len(targets)
Number of targets from command line doesn't have to match
number of actual files that we've processed, as it may as
well be a directory.
Fixes #<I> | iterative_dvc | train | py |
ede15c602ec79971b9372eddeb9e0ad3f649b4b1 | diff --git a/bin/browsertimeWebPageReplay.js b/bin/browsertimeWebPageReplay.js
index <HASH>..<HASH> 100755
--- a/bin/browsertimeWebPageReplay.js
+++ b/bin/browsertimeWebPageReplay.js
@@ -76,7 +76,7 @@ async function runBrowsertime() {
const btOptions = merge({}, parsed.argv.browsertime, defaultConfig);
browsertime.logging.configure(parsed.argv);
- if (btOptions.mobile) {
+ if (parsed.argv.mobile) {
btOptions.viewPort = '360x640';
if (btOptions.browser === 'chrome') {
const emulation = get( | Using WebPagReplay and --mobile didn't set mobile settings correctly (#<I>) | sitespeedio_sitespeed.io | train | js |
f9856c62600bb572be1227d99549a106531dd1da | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -36,6 +36,14 @@ function makeOnDragOver (elem, ondragover) {
return function (e) {
e.stopPropagation()
e.preventDefault()
+ if (e.dataTransfer.items) {
+ // Only add "drag" class when `items` contains a file
+ var items = toArray(e.dataTransfer.items).filter(function (item) {
+ return item.kind === 'file'
+ })
+ if (items.length === 0) return
+ }
+
if (elem instanceof window.Element) elem.classList.add('drag')
e.dataTransfer.dropEffect = 'copy'
if (ondragover) ondragover(e) | dragover: Only add "drag" class when `items` contains a file | feross_drag-drop | train | js |
b5ccdddfc928bbbc2b813e581299ad3cb9336cb4 | diff --git a/lib/commander/runner.rb b/lib/commander/runner.rb
index <HASH>..<HASH> 100644
--- a/lib/commander/runner.rb
+++ b/lib/commander/runner.rb
@@ -328,7 +328,6 @@ module Commander
# again for the command.
def remove_global_options(options, args)
- # TODO: refactor with flipflop, please TJ ! have time to refactor me !
options.each do |option|
switches = option[:switches].dup
next if switches.empty?
@@ -341,6 +340,7 @@ module Commander
past_switch, arg_removed = false, false
args.delete_if do |arg|
+ break if arg == '--'
if switches.any? { |s| s[0, arg.length] == arg }
arg_removed = !switch_has_arg
past_switch = true
diff --git a/spec/runner_spec.rb b/spec/runner_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/runner_spec.rb
+++ b/spec/runner_spec.rb
@@ -643,4 +643,18 @@ describe Commander do
end.run!
end
end
+
+ describe 'with double dash' do
+ it 'should interpret the remainder as arguments' do
+ new_command_runner 'foo', '--', '-x' do
+ command('foo') do |c|
+ c.option '-x', 'Switch'
+ c.when_called do |args, options|
+ expect(args).to eq(%w(-x))
+ expect(options.x).to be_nil
+ end
+ end
+ end.run!
+ end
+ end
end | Fix global option code to preserve double dash | commander-rb_commander | train | rb,rb |
5b6ad9cef993b86e3854ba0c4cb0bcee34b99c1c | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -60,9 +60,9 @@ setup(
classifiers=[
'Development Status :: 4 - Beta',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
'Natural Language :: English'
],
keywords='tkinter gui widgets' | Updating setup.py with python version. | slightlynybbled_tk_tools | train | py |
6216137d2267fb802ae9151cd138b9e74f1e8b45 | diff --git a/lib/aruba/api.rb b/lib/aruba/api.rb
index <HASH>..<HASH> 100644
--- a/lib/aruba/api.rb
+++ b/lib/aruba/api.rb
@@ -298,7 +298,7 @@ module Aruba
end
end
- DEFAULT_TIMEOUT_SECONDS = 5
+ DEFAULT_TIMEOUT_SECONDS = 8
def exit_timeout
@aruba_timeout_seconds || DEFAULT_TIMEOUT_SECONDS | jruby is really slower than I expected, so increasing to 8 seconds | cucumber_aruba | train | rb |
2851c6394cc372e6a221d9921cc139a959f560a4 | diff --git a/stdeb/util.py b/stdeb/util.py
index <HASH>..<HASH> 100644
--- a/stdeb/util.py
+++ b/stdeb/util.py
@@ -550,7 +550,9 @@ class DebianInfo:
build_deps.extend( [
'python-all-dev',
'debhelper (>= 7)',
- 'python-support (>= 0.5.3)',
+ 'python-support (>= 1.0.3)', # Namespace package support was added
+ # sometime between 0.7.5ubuntu1 and
+ # 1.0.3ubuntu1.
] )
build_deps.extend( parse_vals(cfg,module_name,'Build-Depends') ) | increase version of python-support required to handle namespace packages | astraw_stdeb | train | py |
6d469a9a61f63aed39910eed9a5c57c01084ff75 | diff --git a/lib/fog/core/scp.rb b/lib/fog/core/scp.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/core/scp.rb
+++ b/lib/fog/core/scp.rb
@@ -66,11 +66,11 @@ module Fog
@options = { :paranoid => false }.merge(options)
end
- def upload(local_path, remote_path, upload_options = {})
+ def upload(local_path, remote_path, upload_options = {}, &block)
begin
Net::SCP.start(@address, @username, @options) do |scp|
scp.upload!(local_path, remote_path, upload_options) do |ch, name, sent, total|
- # TODO: handle progress display?
+ block.call(ch, name, sent, total) if block
end
end
rescue Exception => error
@@ -82,7 +82,7 @@ module Fog
begin
Net::SCP.start(@address, @username, @options) do |scp|
scp.download!(remote_path, local_path, download_options) do |ch, name, sent, total|
- # TODO: handle progress display?
+ block.call(ch, name, sent, total) if block
end
end
rescue Exception => error | Use passed blocks to handle scp callbacks. | fog_fog | train | rb |
96aaa0cd5cd8d2bc8dafcf402a893fe9f8759192 | diff --git a/lib/id3tag/frames/v2/frame_fabricator.rb b/lib/id3tag/frames/v2/frame_fabricator.rb
index <HASH>..<HASH> 100644
--- a/lib/id3tag/frames/v2/frame_fabricator.rb
+++ b/lib/id3tag/frames/v2/frame_fabricator.rb
@@ -20,7 +20,7 @@ module ID3Tag
case @id
when /^(TCON|TCO)$/
GenreFrame
- when /^TXX$/
+ when /^TXX/
UserTextFrame
when /^T/
TextFrame | Bugfix: <I> user text frames are properly recognised | krists_id3tag | train | rb |
855362b0178f23001398cecd8a6bd196bbc9b0c1 | diff --git a/src/org/opencms/cmis/CmsCmisResourceHelper.java b/src/org/opencms/cmis/CmsCmisResourceHelper.java
index <HASH>..<HASH> 100644
--- a/src/org/opencms/cmis/CmsCmisResourceHelper.java
+++ b/src/org/opencms/cmis/CmsCmisResourceHelper.java
@@ -472,6 +472,9 @@ public class CmsCmisResourceHelper implements I_CmsCmisObjectHelper {
objectInfo.setId(id);
String name = resource.getName();
+ if ("".equals(name)) {
+ name = "/";
+ }
addPropertyString(tm, result, typeId, filter, PropertyIds.NAME, name);
objectInfo.setName(name); | Changed name for root folder in CMIS repository code. | alkacon_opencms-core | train | java |
0a01aeb440843ce2d6d1f793f6f6dda83e4e7aa5 | diff --git a/src/Pazuzu156/Gravatar/Laravel/GravatarServiceProvider.php b/src/Pazuzu156/Gravatar/Laravel/GravatarServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/Pazuzu156/Gravatar/Laravel/GravatarServiceProvider.php
+++ b/src/Pazuzu156/Gravatar/Laravel/GravatarServiceProvider.php
@@ -25,7 +25,7 @@ class GravatarServiceProvider extends ServiceProvider
*/
public function register()
{
- $this->app->singleton('gravatar', function($app) {
+ $this->app->singleton('gravatar', function ($app) {
return new Gravatar(
config('gravatar.defaults.size'),
config('gravatar.secure') | Updated to support Laravel <I> | pazuzu156_Gravatar | train | php |
08dbe85c57ace4ea59456a951d2129fe55fb8f91 | diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py
index <HASH>..<HASH> 100644
--- a/salt/modules/aptpkg.py
+++ b/salt/modules/aptpkg.py
@@ -1802,6 +1802,10 @@ def mod_repo(repo, saltenv='base', **kwargs):
elif 'key_url' in kwargs:
key_url = kwargs['key_url']
fn_ = __salt__['cp.cache_file'](key_url, saltenv)
+ if not fn_:
+ raise CommandExecutionError(
+ 'Error: file not found: {0}'.format(key_url)
+ )
cmd = 'apt-key add {0}'.format(_cmd_quote(fn_))
out = __salt__['cmd.run_stdout'](cmd, **kwargs)
if not out.upper().startswith('OK'): | aptpkg.mod_repo: Raise when key_url doesn't exist
_cmd_quote would raise with unexplicit error if _fn = False | saltstack_salt | train | py |
5f0fe8fd38382f122d3a78b68f2a6799833d8c83 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -35,9 +35,9 @@ CLASSIFIERS = [
'Programming Language :: Python :: 2.7'
]
-SUMMARY = "Digital Ocean API v2 with SSH integration"
+DESCRIPTION = "Digital Ocean API v2 with SSH integration"
-DESCRIPTION = """
+LONG_DESCRIPTION = """
********************************
poseidon: tame the digital ocean
********************************
@@ -95,6 +95,7 @@ Deploy a new Flask app from github
ssh.pip_r('requirements.txt')
ssh.nohup('python app.py') # DNS takes a while to propagate
print ssh.ps()
+
"""
setup(
@@ -107,6 +108,7 @@ setup(
keywords=['digitalocean', 'digital ocean', 'digital', 'ocean', 'api', 'v2',
'web programming', 'cloud', 'digitalocean api v2'],
description=DESCRIPTION,
+ long_description=LONG_DESCRIPTION,
classifiers=CLASSIFIERS,
download_url=DOWNLOAD_URL,
package_data={'': ['requirements.txt']}, | CLN: fix long description and description in setup | changhiskhan_poseidon | train | py |
78a70bc22d663f56d3d39b89a3b94ebd59e54726 | diff --git a/lib/instana/backend/host_agent_activation_observer.rb b/lib/instana/backend/host_agent_activation_observer.rb
index <HASH>..<HASH> 100644
--- a/lib/instana/backend/host_agent_activation_observer.rb
+++ b/lib/instana/backend/host_agent_activation_observer.rb
@@ -12,7 +12,7 @@ module Instana
# @param [RequestClient] client used to make requests to the backend
# @param [Concurrent::Atom] discovery object used to store discovery response in
- def initialize(client, discovery, wait_time: 1, logger: ::Instana.logger, max_wait_tries: 60, proc_table: Sys::ProcTable, socket_proc: default_socket_proc) # rubocop:disable Metrics/ParameterLists
+ def initialize(client, discovery, wait_time: 30, logger: ::Instana.logger, max_wait_tries: 60, proc_table: Sys::ProcTable, socket_proc: default_socket_proc) # rubocop:disable Metrics/ParameterLists
@client = client
@discovery = discovery
@wait_time = wait_time | Wait <I> seconds between announce attempts | instana_ruby-sensor | train | rb |
f8675fb1ce3e2fa07a9e4eac53b31de1cebe9585 | diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index <HASH>..<HASH> 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1447,6 +1447,7 @@ function pbxCopyFilesBuildPhaseObj(obj, folderType, subfolderPath, phaseName){
command_line_tool: 'wrapper',
dynamic_library: 'products_directory',
framework: 'shared_frameworks',
+ frameworks: 'frameworks',
static_library: 'products_directory',
unit_test_bundle: 'wrapper',
watch_app: 'wrapper', | pbxProject: pbxCopyFilesBuildPhaseObj missing 'frameworks'
Previously there was no way to access SUBFOLDERSPEC_BY_DESTINATION.frameworks | apache_cordova-node-xcode | train | js |
cb912dfa490eb6db6ac383ce6451ca4f1cd8a683 | diff --git a/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb b/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb
+++ b/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb
@@ -12,6 +12,11 @@ module Katello
before_action :validate_content_action, :only => [:install_content, :update_content, :remove_content]
+ resource_description do
+ api_version 'v2'
+ api_base_url "/api"
+ end
+
PARAM_ACTIONS = {
:install_content => {
:package => :install_packages, | Fixes #<I> - Remove katello api base url for... (#<I>)
for host bulk actions | Katello_katello | train | rb |
5ebab3a4d1bdc395c755e20bb38fa9d43671e05b | diff --git a/go/vt/vttablet/tabletserver/state_manager_test.go b/go/vt/vttablet/tabletserver/state_manager_test.go
index <HASH>..<HASH> 100644
--- a/go/vt/vttablet/tabletserver/state_manager_test.go
+++ b/go/vt/vttablet/tabletserver/state_manager_test.go
@@ -270,6 +270,16 @@ func TestStateManagerTransitionFailRetry(t *testing.T) {
require.Error(t, err)
assert.True(t, stateChanged)
+ // Calling retryTransition while retrying should be a no-op.
+ sm.retryTransition("")
+
+ // Steal the lock and wait long enough for the retry
+ // to fail, and then release it. The retry will have
+ // to keep retrying.
+ sm.transitioning.Acquire()
+ time.Sleep(30 * time.Millisecond)
+ sm.transitioning.Release()
+
for {
sm.mu.Lock()
retrying := sm.retrying
@@ -310,6 +320,9 @@ func TestStateManagerCheckMySQL(t *testing.T) {
order.Set(0)
sm.CheckMySQL()
+ // Rechecking immediately should be a no-op:
+ sm.CheckMySQL()
+
// Wait for closeAll to get under way.
for {
if order.Get() >= 1 { | vttablet: address review comments | vitessio_vitess | train | go |
f991e75481e60e6c18a066e3cc617f169213d097 | diff --git a/raiden/network/transport/matrix/utils.py b/raiden/network/transport/matrix/utils.py
index <HASH>..<HASH> 100644
--- a/raiden/network/transport/matrix/utils.py
+++ b/raiden/network/transport/matrix/utils.py
@@ -122,11 +122,11 @@ class UserAddressManager:
self._reset_state()
@property
- def known_addresses(self) -> List[Address]:
+ def known_addresses(self) -> Set[Address]:
""" Return all addresses we keep track of """
# This must return a copy of the current keys, because the container
# may be modified while these values are used. Issue: #5240
- return list(self._address_to_userids)
+ return set(self._address_to_userids)
def is_address_known(self, address: Address) -> bool:
""" Is the given ``address`` reachability being monitored? """ | PR review
`set` is a better type than `list` for the dictionary keys since these
are unique. | raiden-network_raiden | train | py |
c75b0c1d2b91d6101d6527b8c24fee2d0234b4ab | diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java b/src/java/org/apache/cassandra/tools/NodeCmd.java
index <HASH>..<HASH> 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -209,11 +209,15 @@ public class NodeCmd
*/
public void printInfo(PrintStream outs)
{
+ boolean gossipInitialized = probe.isInitialized();
outs.println(probe.getToken());
- outs.printf("%-17s: %s%n", "Gossip active", probe.isInitialized());
+ outs.printf("%-17s: %s%n", "Gossip active", gossipInitialized);
outs.printf("%-17s: %s%n", "Load", probe.getLoadString());
- outs.printf("%-17s: %s%n", "Generation No", probe.getCurrentGenerationNumber());
-
+ if (gossipInitialized)
+ outs.printf("%-17s: %s%n", "Generation No", probe.getCurrentGenerationNumber());
+ else
+ outs.printf("%-17s: %s%n", "Generation No", 0);
+
// Uptime
long secondsUp = probe.getUptime() / 1000;
outs.printf("%-17s: %d%n", "Uptime (seconds)", secondsUp); | Fix NPE in nodetool when gossip isn't initialized.
Patch by brandonwilliams, reviewed by jbellis for CASSANDRA-<I>
git-svn-id: <URL> | Stratio_stratio-cassandra | train | java |
78114739ea3f82e3f313358168af37f97785bcce | diff --git a/lib/rib/core/strip_backtrace.rb b/lib/rib/core/strip_backtrace.rb
index <HASH>..<HASH> 100644
--- a/lib/rib/core/strip_backtrace.rb
+++ b/lib/rib/core/strip_backtrace.rb
@@ -18,10 +18,9 @@ module Rib::StripBacktrace
["#{err.class}: #{err.message}", format_backtrace(err.backtrace)]
end
-
-
module_function
def format_backtrace backtrace
+ return super if StripBacktrace.disabled?
strip_home_backtrace(
strip_cwd_backtrace(
strip_rib_backtrace(super(backtrace)))) | don't strip backstrace if disabled | godfat_rib | train | rb |
a2f4ba2caa5dff1aa68e75ad4ce69c8362d1f95e | diff --git a/app/src/Middleware/PageConfig.php b/app/src/Middleware/PageConfig.php
index <HASH>..<HASH> 100644
--- a/app/src/Middleware/PageConfig.php
+++ b/app/src/Middleware/PageConfig.php
@@ -11,13 +11,16 @@ class PageConfig extends Middleware
{
$pageName = $request->getAttribute('route')->getName();
- $pageConfig = ConfigGroups::where('page_name', '=', $pageName)->with('config')->first();
+ $pageConfig = ConfigGroups::where('page_name', '=', $pageName)->with('config')->get();
if ($pageConfig) {
$cfg = array();
- foreach ($pageConfig->config as $value) {
- $cfg[$value->name] = $value->value;
+ foreach ($pageConfig as $pc) {
+ foreach ($pc->config as $value) {
+ $cfg[$value->name] = $value->value;
+ }
}
+
$this->view->getEnvironment()->addGlobal('page_config', $cfg);
return $next($request, $response);
} | fixed page configs to support multiple groups | dappur_framework | train | php |
4198264b420d37796f5bf6058ebd54509a98b15f | diff --git a/analytics-core/src/main/java/com/segment/analytics/IntegrationManager.java b/analytics-core/src/main/java/com/segment/analytics/IntegrationManager.java
index <HASH>..<HASH> 100644
--- a/analytics-core/src/main/java/com/segment/analytics/IntegrationManager.java
+++ b/analytics-core/src/main/java/com/segment/analytics/IntegrationManager.java
@@ -372,6 +372,9 @@ class IntegrationManager implements Application.ActivityLifecycleCallbacks {
/** Runs the given operation on all bundled integrations. */
void run(IntegrationOperation operation) {
+ if (logLevel.log()) {
+ debug("Running %s on %s integrations.", operation, integrations.size());
+ }
for (int i = 0; i < integrations.size(); i++) {
AbstractIntegration integration = integrations.get(i);
long startTime = System.nanoTime(); | Log how many integrations an operation is run on | segmentio_analytics-android | train | java |
3152b64f5fb1441a68cd353d0bd997f98ff78315 | diff --git a/openfisca_survey_manager/surveys.py b/openfisca_survey_manager/surveys.py
index <HASH>..<HASH> 100644
--- a/openfisca_survey_manager/surveys.py
+++ b/openfisca_survey_manager/surveys.py
@@ -37,8 +37,11 @@ from ConfigParser import SafeConfigParser
import logging
from pandas import HDFStore
from pandas.lib import infer_dtype
-import pandas.rpy.common as com
-import rpy2.rpy_classic as rpy
+try:
+ import pandas.rpy.common as com
+ import rpy2.rpy_classic as rpy
+except:
+ pass
import yaml | Introduce a try for rpy2 | openfisca_openfisca-survey-manager | train | py |
516d78922ef3c24fb5008c229c02a314b19ee6dc | diff --git a/lib/bumper_pusher/version.rb b/lib/bumper_pusher/version.rb
index <HASH>..<HASH> 100644
--- a/lib/bumper_pusher/version.rb
+++ b/lib/bumper_pusher/version.rb
@@ -1,3 +1,3 @@
module BumperPusher
- VERSION = "0.1.19"
+ VERSION = "0.2.0"
end | Update gemspec to version <I> | skywinder_bumper_pusher | train | rb |
b256c17d22ad97c9e8933e00c427841dffb244c1 | diff --git a/tests/system/Files/FileTest.php b/tests/system/Files/FileTest.php
index <HASH>..<HASH> 100644
--- a/tests/system/Files/FileTest.php
+++ b/tests/system/Files/FileTest.php
@@ -32,7 +32,7 @@ class FileTest extends \CIUnitTestCase {
*/
public function testThrowsExceptionIfNotAFile()
{
- $file = new File(BASEPATH.'Commoner.php');
+ $file = new File(BASEPATH.'Commoner.php',true);
}
} | Fixed the file test with exception file not found. (allowing it to verify if the file exist) | codeigniter4_CodeIgniter4 | train | php |
625b51d4e087073741962c8488f7f0c3f55f811f | diff --git a/admin/blocks.php b/admin/blocks.php
index <HASH>..<HASH> 100644
--- a/admin/blocks.php
+++ b/admin/blocks.php
@@ -63,9 +63,6 @@
print_error('blockdoesnotexist', 'error');
}
- if (!block_is_compatible($block->name)) {
- $strblockname = $block->name;
- }
else {
$blockobject = block_instance($block->name);
$strblockname = $blockobject->get_title();
@@ -128,11 +125,6 @@
$incompatible = array();
foreach ($blocks as $block) {
- if (!block_is_compatible($block->name)) {
- notify('Block '. $block->name .' is not compatible with the current version of Moodle and needs to be updated by a programmer.');
- $incompatible[] = $block;
- continue;
- }
if (($blockobject = block_instance($block->name)) === false) {
// Failed to load
continue; | upgrade refactoring: MDL-<I> remove references to block_is_compatible, since Petr deleted that function. | moodle_moodle | train | php |
c23fdf934be9706d0860a09ce0013274a41867ee | diff --git a/docs-site/src/components/Example/index.js b/docs-site/src/components/Example/index.js
index <HASH>..<HASH> 100644
--- a/docs-site/src/components/Example/index.js
+++ b/docs-site/src/components/Example/index.js
@@ -37,6 +37,7 @@ export default class CodeExampleComponent extends React.Component {
<LiveProvider
code={component.trim()}
scope={{
+ // NB any globals added here should also be referenced in ../../examples/.eslintrc
PropTypes,
useState,
DatePicker, | Leave a waymarker for the next intrepid coder | Hacker0x01_react-datepicker | train | js |
506bdf0213d6649c399e6085a20cc5af9ca6dadd | diff --git a/src/Artisaninweb/SoapWrapper/SoapWrapper.php b/src/Artisaninweb/SoapWrapper/SoapWrapper.php
index <HASH>..<HASH> 100644
--- a/src/Artisaninweb/SoapWrapper/SoapWrapper.php
+++ b/src/Artisaninweb/SoapWrapper/SoapWrapper.php
@@ -108,6 +108,8 @@ class SoapWrapper
if (is_null($service->getClient())) {
$client = new Client($service->getWsdl(), $service->getOptions());
+
+ $service->client($client);
} else {
$client = $service->getClient();
} | Fixed issue #<I> properly
Fixed issue #<I> properly | artisaninweb_laravel-soap | train | php |
2fbaba39141a93b7fef5d56582650251d8355e53 | diff --git a/src/Test/MockDatasource.php b/src/Test/MockDatasource.php
index <HASH>..<HASH> 100644
--- a/src/Test/MockDatasource.php
+++ b/src/Test/MockDatasource.php
@@ -68,7 +68,15 @@ class MockDatasource implements \CFX\JsonApi\DatasourceInterface
public function convert(\CFX\JsonApi\ResourceInterface $src, $convertTo)
{
$this->callStack[] = "convert([resource], '$convertTo')";
- return $src;
+ if (!($classname = array_shift($this->creationStack))) {
+ throw new \RuntimeException(
+ "Since this is a mock datasource and not a real one, you need to actually add the class to create to ".
+ "the creation stack using the `addClassToCreate` method. This class should be the class you want to convert ".
+ "the resource to."
+ );
+ }
+ $converted = $classname::fromResource($src, $this);
+ return $converted;
}
public function save(\CFX\JsonApi\ResourceInterface $r) | Added improved testing facilities to MockDatasource | cfxmarkets_php-jsonapi-objects | train | php |
cd4bfd9e39fc57dce09728cde44d9aad9768e6be | diff --git a/asammdf/blocks/mdf_v4.py b/asammdf/blocks/mdf_v4.py
index <HASH>..<HASH> 100644
--- a/asammdf/blocks/mdf_v4.py
+++ b/asammdf/blocks/mdf_v4.py
@@ -883,13 +883,14 @@ class MDF4(object):
attachment, at_name = self.extract_attachment(
index=attachment_addr
)
- if (
- not at_name.name.lower().endswith(("dbc", "arxml"))
- or not attachment
- ):
+ if not at_name.name.lower().endswith(("dbc", "arxml")):
message = f'Expected .dbc or .arxml file as CAN channel attachment but got "{at_name}"'
logger.warning(message)
grp.CAN_database = False
+ elif not attachment:
+ message = f'Attachment "{at_name}" not found'
+ logger.warning(message)
+ grp.CAN_database = False
else:
import_type = (
"dbc" | show better error message if the external attachment is not found | danielhrisca_asammdf | train | py |
1d526006955a6d5ac3988b10231b3f791c822090 | diff --git a/tests/ParserTest.php b/tests/ParserTest.php
index <HASH>..<HASH> 100755
--- a/tests/ParserTest.php
+++ b/tests/ParserTest.php
@@ -1165,6 +1165,22 @@ class ParserTest extends \PHPUnit_Framework_TestCase
),
),
+ // Test nicks with ~
+ array(
+ ":Angel~ PRIVMSG Wiz~ :Hello are you receiving this message ?\r\n",
+ array(
+ 'prefix' => ':Angel~',
+ 'nick' => 'Angel~',
+ 'command' => 'PRIVMSG',
+ 'params' => array(
+ 'receivers' => 'Wiz~',
+ 'text' => 'Hello are you receiving this message ?',
+ 'all' => 'Wiz~ :Hello are you receiving this message ?',
+ ),
+ 'targets' => array('Wiz~'),
+ ),
+ ),
+
array(
"PRIVMSG Angel :yes I'm receiving it !receiving it !'u>(768u+1n) .br\r\n",
array( | Adding test to check nicks with ~ on PRIVMSG | phergie_phergie-irc-parser | train | php |
c5fb8c1436ec352bc417b07d6c0569120834740e | diff --git a/stomp/transport.py b/stomp/transport.py
index <HASH>..<HASH> 100644
--- a/stomp/transport.py
+++ b/stomp/transport.py
@@ -242,9 +242,10 @@ class BaseTransport(stomp.listener.Publisher):
for listener in self.listeners.values():
if not listener:
continue
- if not hasattr(listener, 'on_send'):
+ try:
+ listener.on_send(frame)
+ except AttributeError:
continue
- listener.on_send(frame)
lines = utils.convert_frame_to_lines(frame) | Just invoke listener.on_send, don't bother checking existence | jasonrbriggs_stomp.py | train | py |
c89b5fbb3e321c78add86c35b524cc7a64d15152 | diff --git a/src/LdapClient.php b/src/LdapClient.php
index <HASH>..<HASH> 100644
--- a/src/LdapClient.php
+++ b/src/LdapClient.php
@@ -192,7 +192,7 @@ class LdapClient
*
* @since 1.0
*/
- public function setDN($username, $nosub = 0)
+ public function setDn($username, $nosub = 0)
{
if ($this->users_dn == '' || $nosub)
{
@@ -215,7 +215,7 @@ class LdapClient
*
* @since 1.0
*/
- public function getDN()
+ public function getDn()
{
return $this->dn;
}
@@ -257,8 +257,8 @@ class LdapClient
$password = $this->password;
}
- $this->setDN($username, $nosub);
- $bindResult = @ldap_bind($this->resource, $this->getDN(), $password);
+ $this->setDn($username, $nosub);
+ $bindResult = @ldap_bind($this->resource, $this->getDn(), $password);
return $bindResult;
}
@@ -570,7 +570,7 @@ class LdapClient
* @author Jay Burrell, Systems & Networks, Mississippi State University
* @since 1.0
*/
- public static function LDAPNetAddr($networkaddress)
+ public static function LdapNetAddr($networkaddress)
{
$addr = "";
$addrtype = (int) substr($networkaddress, 0, 1); | [codestyle] Fixed first letter casing in method names | joomla-framework_ldap | train | php |
2e82fd38c113b8416f60a82465507a0e663cc523 | diff --git a/mod/forum/post.php b/mod/forum/post.php
index <HASH>..<HASH> 100644
--- a/mod/forum/post.php
+++ b/mod/forum/post.php
@@ -339,11 +339,13 @@
}
- echo "<center>";
if (!empty($parent)) {
forum_print_post($parent, $course->id, $ownpost=false, $reply=false, $link=false);
+ forum_print_posts_threaded($parent->id, $course, 0, false, false);
+ echo "<center>";
echo "<H2>".get_string("yourreply", "forum").":</H2>";
} else {
+ echo "<center>";
echo "<H2>".get_string("yournewtopic", "forum")."</H2>";
}
if (!empty($post->error)) { | This has been annoying me for ages, and the fix is so simple.
When replying to a post that already has replies - the replies
are listed in threaded form. | moodle_moodle | train | php |
f1ce2eed84041c1752bdb99985f5fce4f3ffedde | diff --git a/lib/stax/cfer.rb b/lib/stax/cfer.rb
index <HASH>..<HASH> 100644
--- a/lib/stax/cfer.rb
+++ b/lib/stax/cfer.rb
@@ -10,9 +10,8 @@ module Stax
{}
end
- ## location of cfer template file
- def cfer_template
- File.join('cf', "#{class_name}.rb")
+ def cfn_parameters
+ cfer_parameters
end
## override with S3 bucket for upload of large templates as needed
@@ -43,10 +42,15 @@ module Stax
# Cfer.converge!(stack_name, opts.merge(args))
# end
+ ## location of template file
+ def cfn_template_path
+ File.join('cf', "#{class_name}.rb")
+ end
+
## generate JSON for stack without sending to cloudformation
def cfer_generate
- opts = {parameters: stringify_keys(cfer_parameters)}
- Cfer.generate!(cfer_template, opts)
+ opts = {parameters: stringify_keys(cfn_parameters)}
+ Cfer.generate!(cfn_template_path, opts)
end
## generate method does puts, so steal stdout into a string | start renaming template methods in a more generic fashion | rlister_stax | train | rb |
7faa2049cd2d18d0e8276844ddce16562b79bd0c | diff --git a/extension/data/lib/data.js b/extension/data/lib/data.js
index <HASH>..<HASH> 100644
--- a/extension/data/lib/data.js
+++ b/extension/data/lib/data.js
@@ -43,7 +43,7 @@ var Data = function (reporter, definition) {
});
});
- reporter.beforeRenderListeners.insert(0, definition.name, this, Data.prototype.handleBeforeRender);
+ reporter.beforeRenderListeners.insert({ after: "templates"}, definition.name, this, Data.prototype.handleBeforeRender);
};
Data.prototype.handleBeforeRender = function (request, response) { | scripts can call reporter.render | jsreport_jsreport-data | train | js |
52494dfe239327077ad399bf255c80d507bb1028 | diff --git a/aeron-driver/src/main/java/io/aeron/driver/IpcPublication.java b/aeron-driver/src/main/java/io/aeron/driver/IpcPublication.java
index <HASH>..<HASH> 100644
--- a/aeron-driver/src/main/java/io/aeron/driver/IpcPublication.java
+++ b/aeron-driver/src/main/java/io/aeron/driver/IpcPublication.java
@@ -320,6 +320,7 @@ public final class IpcPublication implements DriverManagedResource, Subscribable
{
tripLimit = consumerPosition;
publisherLimit.setOrdered(consumerPosition);
+ cleanBufferTo(consumerPosition);
}
return workCount;
diff --git a/aeron-driver/src/main/java/io/aeron/driver/NetworkPublication.java b/aeron-driver/src/main/java/io/aeron/driver/NetworkPublication.java
index <HASH>..<HASH> 100644
--- a/aeron-driver/src/main/java/io/aeron/driver/NetworkPublication.java
+++ b/aeron-driver/src/main/java/io/aeron/driver/NetworkPublication.java
@@ -525,6 +525,7 @@ public class NetworkPublication
else if (publisherLimit.get() > senderPosition)
{
publisherLimit.setOrdered(senderPosition);
+ cleanBufferTo(senderPosition - termBufferLength);
workCount = 1;
} | [Java] Ensure cleaning is up to date when consumers drop out and back in again on publications. | real-logic_aeron | train | java,java |
de919e0e380d04654617afdb9149d964f0c47115 | diff --git a/src/DataStore/src/Middleware/Handler/DownloadCsvHandler.php b/src/DataStore/src/Middleware/Handler/DownloadCsvHandler.php
index <HASH>..<HASH> 100644
--- a/src/DataStore/src/Middleware/Handler/DownloadCsvHandler.php
+++ b/src/DataStore/src/Middleware/Handler/DownloadCsvHandler.php
@@ -21,7 +21,7 @@ class DownloadCsvHandler extends AbstractHandler
const DELIMITER = ',';
const ENCLOSURE = '"';
const ESCAPE_CHAR = '\\';
- const LIMIT = 5000;
+ const LIMIT = 8000;
/**
* @inheritDoc
@@ -54,7 +54,7 @@ class DownloadCsvHandler extends AbstractHandler
$rqlQuery = $request->getAttribute('rqlQueryObject');
// create csv file
- $file = fopen('php://memory', 'w');
+ $file = fopen('php://temp', 'w');
$offset = 0; | Update DownloadCsvHandler for export large files | rollun-com_rollun-datastore | train | php |
f4501a2f9030eb8c43b9e8cde01f73eb078f700a | diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go
index <HASH>..<HASH> 100644
--- a/aws/resource_aws_emr_cluster.go
+++ b/aws/resource_aws_emr_cluster.go
@@ -496,7 +496,11 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error {
}
d.Set("name", cluster.Name)
- d.Set("scale_down_behavior", cluster.ScaleDownBehavior)
+
+ if d.Get("scale_down_behavior").(string) != "" {
+ d.Set("scale_down_behavior", cluster.ScaleDownBehavior)
+ }
+
d.Set("service_role", cluster.ServiceRole)
d.Set("security_configuration", cluster.SecurityConfiguration)
d.Set("autoscaling_role", cluster.AutoScalingRole) | If user has not defined scale_down_behavior, use current value. This means the AWS default for the release_label will be used, unless the user wants to override this | terraform-providers_terraform-provider-aws | train | go |
95dc0278979f4f4363d8623fac3e605baa1d318d | diff --git a/py/selenium/webdriver/safari/options.py b/py/selenium/webdriver/safari/options.py
index <HASH>..<HASH> 100644
--- a/py/selenium/webdriver/safari/options.py
+++ b/py/selenium/webdriver/safari/options.py
@@ -14,11 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-from typing import Union
-import warnings
-from selenium.common.exceptions import InvalidArgumentException
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
-from selenium.webdriver.common.proxy import Proxy
from selenium.webdriver.common.options import ArgOptions
@@ -33,24 +29,23 @@ class Log(object):
class Options(ArgOptions):
- KEY = "webkit:safariOptions"
+ KEY = "safari.options"
def __init__(self):
super(Options, self).__init__()
self._binary_location = None
self._preferences: dict = {}
- self._proxy = None
self.log = Log()
@property
- def binary_location(self):
+ def binary_location(self) -> str:
"""
:Returns: The location of the browser binary otherwise an empty string
"""
return self._binary_location
@binary_location.setter
- def binary_location(self, value):
+ def binary_location(self, value: str):
"""
Allows you to set the browser binary to launch | [py] Fix flake8 issues in safari options | SeleniumHQ_selenium | train | py |
fc52e6311fa5378839c59858c78a7e4eeb4344a5 | diff --git a/lib/api-client/resources/deployment.js b/lib/api-client/resources/deployment.js
index <HASH>..<HASH> 100644
--- a/lib/api-client/resources/deployment.js
+++ b/lib/api-client/resources/deployment.js
@@ -153,4 +153,23 @@ Deployment.getResourceData = function(deploymentId, resourceId, done) {
});
};
+/**
+ * Redeploy a deployment
+
+ * @param {Object} options
+ * @param {String} options.id
+ * @param {Array} [options.resourceIds]
+ * @param {Array} [options.resourceNames]
+ * @param {Function} done
+ */
+Deployment.redeploy = function(options, done) {
+ var id = options.id;
+ delete options.id;
+
+ return this.http.post(this.path + '/' + id + '/redeploy', {
+ data: options,
+ done: done || function() {}
+ });
+}
+
module.exports = Deployment; | feat(redeploy): I can redeploy an existing deployment
related to CAM-<I> | camunda_camunda-bpm-sdk-js | train | js |
4dcf2e3c2fcb61d674cbf3ba01ef0366f181a048 | diff --git a/packages/graphql-language-service-types/scripts/build-js.js b/packages/graphql-language-service-types/scripts/build-js.js
index <HASH>..<HASH> 100644
--- a/packages/graphql-language-service-types/scripts/build-js.js
+++ b/packages/graphql-language-service-types/scripts/build-js.js
@@ -9,7 +9,6 @@
'use strict';
import {join} from 'path';
-import {cp, exec} from './util';
+import {exec} from './util';
exec('babel', 'src', '--out-dir', 'dist');
-cp('package.json', join('dist', 'package.json')); | Remove unnecessary bundling of package.json inside dist dir | graphql_graphiql | train | js |
74d77392cd55c304c9eb9158bdb9afc84b01ae38 | diff --git a/tests/model_selection/test_incremental.py b/tests/model_selection/test_incremental.py
index <HASH>..<HASH> 100644
--- a/tests/model_selection/test_incremental.py
+++ b/tests/model_selection/test_incremental.py
@@ -223,12 +223,15 @@ def test_search_basic(c, s, a, b):
"param_alpha",
"param_l1_ratio",
}.issubset(set(search.cv_results_.keys()))
+
assert all(isinstance(v, np.ndarray) for v in search.cv_results_.values())
- assert (
- search.cv_results_["test_score"][search.best_index_]
- >= search.cv_results_["test_score"]
- ).all()
- assert search.cv_results_["rank_test_score"][search.best_index_] == 1
+ assert all(search.cv_results_["test_score"] >= 0)
+ assert all(search.cv_results_["rank_test_score"] >= 1)
+ assert all(search.cv_results_["partial_fit_calls"] >= 1)
+ assert len(np.unique(search.cv_results_["model_id"])) == len(
+ search.cv_results_["model_id"]
+ )
+
X_, = yield c.compute([X])
proba = search.predict_proba(X_) | Replace cv_results asserts with sanity checks | dask_dask-ml | train | py |
82c094c41b7a55ec05024d0513ab902091754b7e | diff --git a/modin/pandas/__init__.py b/modin/pandas/__init__.py
index <HASH>..<HASH> 100644
--- a/modin/pandas/__init__.py
+++ b/modin/pandas/__init__.py
@@ -159,7 +159,7 @@ def initialize_ray():
num_cpus=int(num_cpus),
include_webui=False,
ignore_reinit_error=True,
- redis_address=redis_address,
+ address=redis_address,
redis_password=redis_password,
logging_level=100,
)
@@ -193,7 +193,7 @@ def initialize_ray():
ignore_reinit_error=True,
plasma_directory=plasma_directory,
object_store_memory=object_store_memory,
- redis_address=redis_address,
+ address=redis_address,
redis_password=redis_password,
logging_level=100,
memory=object_store_memory,
diff --git a/stress_tests/test_kaggle_ipynb.py b/stress_tests/test_kaggle_ipynb.py
index <HASH>..<HASH> 100644
--- a/stress_tests/test_kaggle_ipynb.py
+++ b/stress_tests/test_kaggle_ipynb.py
@@ -6,7 +6,7 @@ import numpy as np
import pytest
# import ray
-# ray.init(redis_address="localhost:6379")
+# ray.init(address="localhost:6379")
import modin.pandas as pd | change redis_address -> address | modin-project_modin | train | py,py |
973ef97d6ac275dc4463795ada02eb5942c8b0c3 | diff --git a/rdomanager_oscplugin/__init__.py b/rdomanager_oscplugin/__init__.py
index <HASH>..<HASH> 100644
--- a/rdomanager_oscplugin/__init__.py
+++ b/rdomanager_oscplugin/__init__.py
@@ -15,4 +15,4 @@
import pbr.version
-__version__ = pbr.version.VersionInfo('rdomanager_oscplugin').version_string()
+__version__ = pbr.version.VersionInfo('python-rdomanager-oscplugin').version_string() | Fix pbr info
The VersionInfo string was wrong. It needed to be the name of the
package, not the name of the module.
Change-Id: If<I>a8fffc6ddd<I>ea<I>b<I>b5 | rdo-management_python-rdomanager-oscplugin | train | py |
f26d0a18e0792e4a37ae7cf3538224a398b17a84 | diff --git a/src/Command/Debug/ThemeCommand.php b/src/Command/Debug/ThemeCommand.php
index <HASH>..<HASH> 100644
--- a/src/Command/Debug/ThemeCommand.php
+++ b/src/Command/Debug/ThemeCommand.php
@@ -78,8 +78,10 @@ class ThemeCommand extends Command
foreach ($themes as $themeId => $theme) {
$status = $this->getThemeStatus($theme);
$tableRows[] = [
- $themeId, $theme->info['name'],
- $status, $theme->info['version'],
+ $themeId,
+ $theme->info['name'],
+ $status,
+ (isset($theme->info['version'])) ? $theme->info['version'] : '',
];
} | Fix issue <I> (#<I>) | hechoendrupal_drupal-console | train | php |
c98da81b39a142ccbc6eeb8296d0e2d422b14a75 | diff --git a/go/chat/sourceofflinable.go b/go/chat/sourceofflinable.go
index <HASH>..<HASH> 100644
--- a/go/chat/sourceofflinable.go
+++ b/go/chat/sourceofflinable.go
@@ -80,11 +80,23 @@ func (s *sourceOfflinable) IsOffline(ctx context.Context) bool {
defer s.Unlock()
s.Debug(ctx, "IsOffline: waited and got %v", s.offline)
return s.offline
+ case <-ctx.Done():
+ s.Lock()
+ defer s.Unlock()
+ s.Debug(ctx, "IsOffline: aborted: %s state: %v", ctx.Err(), s.offline)
+ return s.offline
case <-time.After(4 * time.Second):
s.Lock()
defer s.Unlock()
+ select {
+ case <-ctx.Done():
+ s.Debug(ctx, "IsOffline: timed out, but context canceled so not setting delayed: state: %v",
+ s.offline)
+ return s.offline
+ default:
+ }
s.delayed = true
- s.Debug(ctx, "IsOffline: timed out")
+ s.Debug(ctx, "IsOffline: timed out, setting delay wait: state: %v", s.offline)
return s.offline
}
} | dont set the delay check if the request has been aborted CORE-<I> (#<I>)
* dont set the delay check if the request has been aborted
* wording
* check at top level too | keybase_client | train | go |
58a06caa135dbedd02a855c00e856c7cb1943561 | diff --git a/lib/poolparty/cloud.rb b/lib/poolparty/cloud.rb
index <HASH>..<HASH> 100644
--- a/lib/poolparty/cloud.rb
+++ b/lib/poolparty/cloud.rb
@@ -277,11 +277,11 @@ No autoscalers defined
# Run command/s on all nodes in the cloud.
# Returns a hash of instance_id=>result pairs
def cmd(commands, opts={})
- opts[:key_by]= :instance_id unless opts[:key_by]
+ key_by = opts.delete(:key_by) || :instance_id
results = {}
threads = nodes.collect do |n|
- puts "result for #{n.instance_id} ==> #{n.ssh(commands, opts)}"
- Thread.new{ results[ n.send(opts[:key_by]) ] = n.ssh(commands, opts) }
+ puts "result for #{n.instance_id} ==> n.ssh(#{commands.inspect}, #{opts.inspect})"
+ Thread.new{ results[ n.send(key_by) ] = n.ssh(commands, opts) }
end
threads.each{ |aThread| aThread.join }
results | Fix Cloud#cmd to avoid injection of the text "key_by instance_id" into the generated ssh command | auser_poolparty | train | rb |
058e06095389c8834e0ae38d02bc95358d083230 | diff --git a/molgenis-core-ui/src/main/resources/js/molgenis.js b/molgenis-core-ui/src/main/resources/js/molgenis.js
index <HASH>..<HASH> 100644
--- a/molgenis-core-ui/src/main/resources/js/molgenis.js
+++ b/molgenis-core-ui/src/main/resources/js/molgenis.js
@@ -1043,6 +1043,7 @@ $(function() {
// focus first input on modal display
$(document).on('click', '.plugin-settings-btn', function() {
+ React.unmountComponentAtNode($('#plugin-settings-container')[0]); // fix https://github.com/molgenis/molgenis/issues/3587
React.render(molgenis.ui.Form({
entity: molgenis.getPluginSettingsId(),
entityInstance: molgenis.getPluginId(), | Fix #<I> Settings panel can't be reopened after cancel/close | molgenis_molgenis | train | js |
bf91fca3795f7780feb0711d7d9082e1ef0eaa17 | diff --git a/trie4j/src/org/trie4j/patricia/PatriciaTrie.java b/trie4j/src/org/trie4j/patricia/PatriciaTrie.java
index <HASH>..<HASH> 100644
--- a/trie4j/src/org/trie4j/patricia/PatriciaTrie.java
+++ b/trie4j/src/org/trie4j/patricia/PatriciaTrie.java
@@ -29,6 +29,13 @@ import org.trie4j.util.Pair;
public class PatriciaTrie
extends AbstractTrie
implements Serializable, Trie{
+ public PatriciaTrie(){
+ }
+
+ public PatriciaTrie(String... words){
+ for(String s : words) insert(s);
+ }
+
@Override
public int size() {
return size; | add Constructor that receives String[]. | takawitter_trie4j | train | java |
3c89781714d616d99ad8b890874af9103c13f47a | diff --git a/lib/commands/commands.rb b/lib/commands/commands.rb
index <HASH>..<HASH> 100644
--- a/lib/commands/commands.rb
+++ b/lib/commands/commands.rb
@@ -37,7 +37,6 @@ command :open do |arg|
helper.open "http://github.com/#{arg}"
end
-
desc "Info about this project."
command :info do
puts "== Info for #{helper.project}"
@@ -162,7 +161,7 @@ end
desc "Generate the text for a pull request."
usage "github pull-request [user] [branch]"
-command 'pull-request' do |user, branch|
+command :'pull-request' do |user, branch|
if helper.project
die "Specify a user for the pull request" if user.nil?
user, branch = user.split('/', 2) if branch.nil?
@@ -227,7 +226,7 @@ end
desc "Create a new GitHub repository from the current local repository"
flags :private => 'Create private repository'
-command 'create-from-local' do
+command :'create-from-local' do
cwd = sh "pwd"
repo = File.basename(cwd)
is_repo = !git("status").match(/fatal/) | All command names are symbols so they look pretty in editors | defunkt_github-gem | train | rb |
3a80703655059aa931232a109553325101e47ac9 | diff --git a/holoviews/core/settings.py b/holoviews/core/settings.py
index <HASH>..<HASH> 100644
--- a/holoviews/core/settings.py
+++ b/holoviews/core/settings.py
@@ -207,14 +207,19 @@ class SettingsTree(AttrTree):
def __setattr__(self, identifier, val):
new_groups = {}
if isinstance(val, dict):
- group_items = val.items()
+ group_items = val
elif isinstance(val, Settings) and val.group is None:
raise AttributeError("Settings object needs to have a group name specified.")
elif isinstance(val, Settings):
- group_items = [(val.group, val)]
+ group_items = {val.group: val}
- for group_name, settings in group_items:
- new_groups[group_name] = self._inherited_settings(group_name, settings)
+ current_node = self[identifier] if identifier in self.children else self
+ for group_name in current_node.groups:
+ settings = group_items.get(group_name, False)
+ if settings:
+ new_groups[group_name] = self._inherited_settings(group_name, settings)
+ else:
+ new_groups[group_name] = current_node.groups[group_name]
if new_groups:
new_node = SettingsTree(None, identifier=identifier, parent=self, groups=new_groups) | Fixed settings inheritance on SettingsTree | pyviz_holoviews | train | py |
0ca2b3696867d48e5c85c7c83935376ea879b84f | diff --git a/lib/delfos/patching/method_override.rb b/lib/delfos/patching/method_override.rb
index <HASH>..<HASH> 100644
--- a/lib/delfos/patching/method_override.rb
+++ b/lib/delfos/patching/method_override.rb
@@ -107,27 +107,11 @@ module Delfos
end
def record_method!
- return true if bail?
+ return true if ::Delfos::MethodLogging.exclude?(original_method)
MethodCache.append(klass: klass, method: original_method)
yield
end
-
- def bail?
- method_has_been_added? || private_method? || exclude?
- end
-
- def method_has_been_added?
- MethodCache.find(klass: klass, class_method: class_method, method_name: name)
- end
-
- def private_method?
- private_methods.include?(name.to_sym)
- end
-
- def exclude?
- ::Delfos::MethodLogging.exclude?(original_method)
- end
end
end
end | stop checking again if method has been recorded, and allow private methods | ruby-analysis_delfos | train | rb |
0e0ad85f92ace1b78053d3039579e3d12eb556ec | diff --git a/tests/event-gateway/processes.js b/tests/event-gateway/processes.js
index <HASH>..<HASH> 100644
--- a/tests/event-gateway/processes.js
+++ b/tests/event-gateway/processes.js
@@ -10,7 +10,7 @@ const rimraf = require('rimraf')
// eslint-disable-next-line no-undef
jasmine.DEFAULT_TIMEOUT_INTERVAL = 4000
-const eventGatewayPath = path.join(__dirname, 'darwin_amd64', 'event-gateway')
+const eventGatewayPath = path.join(__dirname, `${process.platform}_amd64`, 'event-gateway')
const processStore = {}
module.exports = { | support linux for the test-suite | serverless_event-gateway-sdk | train | js |
17d398b1191e2cd9d59c5b08904fa8090798b96f | diff --git a/lib/async.js b/lib/async.js
index <HASH>..<HASH> 100644
--- a/lib/async.js
+++ b/lib/async.js
@@ -683,14 +683,14 @@
};
// AMD / RequireJS
- if (typeof define !== 'undefined' && define.amd) {
- define('async', [], function () {
+ if (typeof root.define !== 'undefined' && root.define.amd) {
+ root.define('async', [], function () {
return async;
});
}
// Node.js
- else if (typeof module !== 'undefined' && module.exports) {
- module.exports = async;
+ else if (typeof root.module !== 'undefined' && root.module.exports) {
+ root.module.exports = async;
}
// included directly via <script> tag
else { | because globals suck :(
I had a bit of a trouble today when I tried to run async in an env where the root wasn't the window. | caolan_async | train | js |
4956e88e6593485007fea9c068c3b0646cdc6391 | diff --git a/calendar-bundle/contao/ModuleEventlist.php b/calendar-bundle/contao/ModuleEventlist.php
index <HASH>..<HASH> 100644
--- a/calendar-bundle/contao/ModuleEventlist.php
+++ b/calendar-bundle/contao/ModuleEventlist.php
@@ -89,7 +89,9 @@ class ModuleEventlist extends Events
*/
protected function compile()
{
- // Jump to current period
+ $blnClearInput = false;
+
+ // Jump to the current period
if (!isset($_GET['year']) && !isset($_GET['month']) && !isset($_GET['day']))
{
switch ($this->cal_format)
@@ -106,6 +108,8 @@ class ModuleEventlist extends Events
$this->Input->setGet('day', date('Ymd'));
break;
}
+
+ $blnClearInput = true;
}
$blnDynamicFormat = in_array($this->cal_format, array('cal_day', 'cal_month', 'cal_year'));
@@ -300,6 +304,14 @@ class ModuleEventlist extends Events
}
$this->Template->events = $strEvents;
+
+ // Clear the $_GET array (see #2445)
+ if ($blnClearInput)
+ {
+ $this->Input->setGet('year', null);
+ $this->Input->setGet('month', null);
+ $this->Input->setGet('day', null);
+ }
}
} | [Calendar] Clear the $_GET array after rendering the event list module (#<I>) | contao_contao | train | php |
6034f726378ee31a8120da014a4be5a95de4affb | diff --git a/app/models/renalware/zip_archive.rb b/app/models/renalware/zip_archive.rb
index <HASH>..<HASH> 100644
--- a/app/models/renalware/zip_archive.rb
+++ b/app/models/renalware/zip_archive.rb
@@ -9,7 +9,9 @@ module Renalware
end
def unzip
- Dir.mktmpdir(nil, Rails.root.join("tmp").to_s) do |dir|
+ # Create a tmp dir and ensure PG has access to it.
+ Dir.mktmpdir do |dir|
+ `chmod a+rX #{dir}`
files = unzip_to_tmp_dir_and_return_pathames_array(dir)
yield(files)
end | Zip fles to /tmp and ensure PG has access | airslie_renalware-core | train | rb |
422978e0384cf77cea6e7f80223f698ddef45496 | diff --git a/pifpaf/tests/test_drivers.py b/pifpaf/tests/test_drivers.py
index <HASH>..<HASH> 100644
--- a/pifpaf/tests/test_drivers.py
+++ b/pifpaf/tests/test_drivers.py
@@ -38,6 +38,7 @@ from pifpaf.drivers import mysql
from pifpaf.drivers import postgresql
from pifpaf.drivers import rabbitmq
from pifpaf.drivers import redis
+from pifpaf.drivers import s3rver
from pifpaf.drivers import zookeeper
@@ -149,7 +150,7 @@ class TestDrivers(testtools.TestCase):
"s3rver not found")
def test_s3rver(self):
port = 4569
- self.useFixture(fakes3.FakeS3Driver(port=port))
+ self.useFixture(s3rver.S3rverDriver(port=port))
self.assertEqual("s3://localhost:%d" % port,
os.getenv("PIFPAF_URL"))
self.assertEqual("http://localhost:%d" % port, | tests: fix s3rver tests | jd_pifpaf | train | py |
4c794326d69c24d2940b9e82aa3fab675fb75822 | diff --git a/test/browser-tests/methods/transition.js b/test/browser-tests/methods/transition.js
index <HASH>..<HASH> 100644
--- a/test/browser-tests/methods/transition.js
+++ b/test/browser-tests/methods/transition.js
@@ -37,7 +37,7 @@ export default function() {
});
// this test really likes to randomly fail on phantom
- if ( !/phantom/.test( navigator.userAgent ) ) {
+ if ( !/phantom/i.test( navigator.userAgent ) ) {
test( 'Use transitions from event with implicit node', t => {
const done = t.async();
t.expect(2); | missed the insensitive flag on the test to skip in phantom | ractivejs_ractive | train | js |
5d7081d0a85fc98c00eb2cf9d193795d535473f9 | diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/OStorageEmbedded.java b/core/src/main/java/com/orientechnologies/orient/core/storage/OStorageEmbedded.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/orientechnologies/orient/core/storage/OStorageEmbedded.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/storage/OStorageEmbedded.java
@@ -109,6 +109,9 @@ public abstract class OStorageEmbedded extends OStorageAbstract {
: -1;
ioRecord = browseCluster(iListener, ioRecord, cluster, beginClusterPosition, endClusterPosition, iLockEntireCluster);
+ if (ioRecord == null)
+ // BREAK: LIMIT REACHED
+ break;
}
} catch (IOException e) {
@@ -146,9 +149,11 @@ public abstract class OStorageEmbedded extends OStorageAbstract {
// GET THE CACHED RECORD
recordToCheck = record;
- if (!iListener.foreach(recordToCheck))
- // LISTENER HAS INTERRUPTED THE EXECUTION
+ if (!iListener.foreach(recordToCheck)) {
+ // LISTENER HAS INTERRUPTED THE EXECUTION: RETURN NULL TO TELL TO THE CALLER TO STOP ITERATION
+ ioRecord = null;
break;
+ }
} catch (OCommandExecutionException e) {
// PASS THROUGH
throw e; | Fixed bug on LIMIT keywork in SQL UPDATE statement | orientechnologies_orientdb | train | java |
c4b2b52db0a8872fefe11a45bf4828fc4e5617b9 | diff --git a/dispatcher_test.go b/dispatcher_test.go
index <HASH>..<HASH> 100644
--- a/dispatcher_test.go
+++ b/dispatcher_test.go
@@ -8,6 +8,13 @@ import (
"unsafe"
)
+func TestDispatcherAddNonFunc(t *testing.T) {
+ d := NewDispatcher()
+ testPanic(t, func() {
+ d.AddFunc("foobar", 123)
+ })
+}
+
func TestDispatcherEmptyFuncName(t *testing.T) {
d := NewDispatcher()
testPanic(t, func() { | added a test non-func passing to Dispatcher.AddFunc | valyala_gorpc | train | go |
5ab1c42be430a2af75dce95c7fc327e61a812cd1 | diff --git a/lib/simple_enum/version.rb b/lib/simple_enum/version.rb
index <HASH>..<HASH> 100644
--- a/lib/simple_enum/version.rb
+++ b/lib/simple_enum/version.rb
@@ -1,5 +1,5 @@
module SimpleEnum
# The current `SimpleEnum` version.
- VERSION = "2.0.0.rc3"
+ VERSION = "2.0.0"
end | release <I> (finally) | lwe_simple_enum | train | rb |
38b79fdca8ed6b3796001982e60fa37a875d107d | diff --git a/repairbox/tool.py b/repairbox/tool.py
index <HASH>..<HASH> 100644
--- a/repairbox/tool.py
+++ b/repairbox/tool.py
@@ -50,6 +50,14 @@ class Tool(object):
return self.__build_instructions.build(force=force)
+ def upload(self) -> bool:
+ """
+ Attempts to upload the image for this tool to
+ `DockerHub <https://hub.docker.com>`_.
+ """
+ return self.__build_instructions.upload()
+
+
class ToolManager(object):
def __init__(self, manager: 'repairbox.manager.RepairBox') -> None:
self.__manager = manager | added copypasto Tool.upload | squaresLab_BugZoo | train | py |
fc5210ced4b35108b52b3a59bbc4fbe028a58cd4 | diff --git a/tests/calculators/hazard/disagg/core_test.py b/tests/calculators/hazard/disagg/core_test.py
index <HASH>..<HASH> 100644
--- a/tests/calculators/hazard/disagg/core_test.py
+++ b/tests/calculators/hazard/disagg/core_test.py
@@ -76,7 +76,8 @@ class TaskCompleteCallbackTest(unittest.TestCase):
self.calc.progress['total'] = 6
self.calc.progress['hc_total'] = 3
- callback = self.calc.get_task_complete_callback(hc_tag, block_size=1, concurrent_tasks=2)
+ callback = self.calc.get_task_complete_callback(
+ hc_tag, block_size=1, concurrent_tasks=2)
message = self.__class__.FakeMessage() | tests/calcs/hazard/disagg/core_test:
Whitespace. | gem_oq-engine | train | py |
3c7298b6fe3f298e4b2999d85ae54a9cdfc20cdd | diff --git a/lib/zones/can_import.js b/lib/zones/can_import.js
index <HASH>..<HASH> 100644
--- a/lib/zones/can_import.js
+++ b/lib/zones/can_import.js
@@ -9,7 +9,7 @@ module.exports = function(can){
var canImport = function(el, tagData){
var moduleName = el.getAttribute("from");
- var templateModule = tagData.options.attr("helpers.module");
+ var templateModule = tagData.options.get("helpers.module");
var parentName = templateModule ? templateModule.id : undefined;
var isAPage = !!tagData.subtemplate; | Replace deprecated attr call with get | donejs_done-ssr | train | js |
161be5d459dba10db046f1c3df08f8c80b5c8c55 | diff --git a/lib/active_scaffold/helpers/controller_helpers.rb b/lib/active_scaffold/helpers/controller_helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/active_scaffold/helpers/controller_helpers.rb
+++ b/lib/active_scaffold/helpers/controller_helpers.rb
@@ -33,6 +33,8 @@ module ActiveScaffold
parameters[:parent_id] = nil
parameters[:action] = "index"
parameters[:id] = nil
+ parameters[:associated_id] = nil
+ parameters[:utf8] = nil
params_for(parameters)
end
end | Bugfix: reset some more parameters when going back to main | activescaffold_active_scaffold | train | rb |
3604b5a55bd7923788a1a3ff46afac5e60d78b46 | diff --git a/redis/client.py b/redis/client.py
index <HASH>..<HASH> 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -368,6 +368,12 @@ class StrictRedis(object):
self.response_callbacks = self.__class__.RESPONSE_CALLBACKS.copy()
+ def __repr__(self):
+ return "{class_name}<host={host},port={port},db={db}>".format(
+ class_name=type(self).__name__,
+ **self.connection_pool.connection_kwargs
+ )
+
def set_response_callback(self, command, callback):
"Set a custom Response Callback"
self.response_callbacks[command] = callback
diff --git a/tests/test_connection_pool.py b/tests/test_connection_pool.py
index <HASH>..<HASH> 100644
--- a/tests/test_connection_pool.py
+++ b/tests/test_connection_pool.py
@@ -123,3 +123,9 @@ class TestConnection(object):
pool = bad_connection.connection_pool
assert len(pool._available_connections) == 1
assert not pool._available_connections[0]._sock
+
+ def test_repr_contains_db_info(self, r):
+ """
+ Repr should contain database connection info
+ """
+ assert repr(redis.Redis()) == 'Redis<host=localhost,port=6379,db=0>' | Add support for showing db connection info via repr | andymccurdy_redis-py | train | py,py |
05654c92b120e46ecd027589cbdbdb0d8f1733da | diff --git a/chwrapper/services/base.py b/chwrapper/services/base.py
index <HASH>..<HASH> 100644
--- a/chwrapper/services/base.py
+++ b/chwrapper/services/base.py
@@ -63,7 +63,7 @@ class Service(object):
custom_messages = {
429: cust_str.format(
datetime.utcfromtimestamp(
- float(response.headers['X-Ratelimit-Reset']))
+ float(response.headers.get('X-Ratelimit-Reset', 0)))
)
} | Use .get to stop KeyErrors being raised when no headers returned by Companies House | JamesGardiner_chwrapper | train | py |
bcbbd86745a2e215e88dfe7e8c90950ff900c810 | diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -95,11 +95,10 @@ class Sade {
}
let opts = mri(arr.slice(3), cmd.config);
- let args = opts._;
- // TODO: parse arguments (`_`)
- // TODO: push to new `arguments` arr per known key
- // TODO: append remaining `opts:options` to arr
- return cmd.handler(opts);
+ let reqs = cmd.usage.split(/\s+/).filter(x => x.charAt(0)==='<');
+ let args = opts._.splice(0, reqs.length);
+ args.push(opts); // flags & co are last
+ return cmd.handler.apply(null, args);
}
help(str) { | parse cmd usage for named args; pass thru handler;
- only counts required params (‘<foobar>’)
- any optionals will be available on `opts._` key | lukeed_sade | train | js |
0f331ddb40c752f4af1e0ea854a3bdac691e66fb | diff --git a/src/filter/collection/filter-by.js b/src/filter/collection/filter-by.js
index <HASH>..<HASH> 100644
--- a/src/filter/collection/filter-by.js
+++ b/src/filter/collection/filter-by.js
@@ -13,7 +13,8 @@ angular.module('a8m.filter-by', [])
var comparator;
- search = (isString(search)) ? search.toLowerCase() : undefined;
+ search = (isString(search) || isNumber(search)) ?
+ String(search).toLowerCase() : undefined;
collection = (isObject(collection)) ? toArray(collection) : collection;
@@ -41,12 +42,12 @@ angular.module('a8m.filter-by', [])
});
}
- return (isString(comparator)) ?
- !comparator.toLowerCase().indexOf(search) :
+ return (isString(comparator) || isNumber(comparator)) ?
+ !String(comparator).toLowerCase().indexOf(search) :
false;
})
});
}
- }]);
\ No newline at end of file
+ }]); | fix(filter-by): add is number conditaion + casting | a8m_angular-filter | train | js |
849fd95a65dd1e47da3e518c8af4a0ab4a468fbb | diff --git a/python/docs/conf.py b/python/docs/conf.py
index <HASH>..<HASH> 100644
--- a/python/docs/conf.py
+++ b/python/docs/conf.py
@@ -45,6 +45,7 @@ extensions = [
autosummary_generate = True
add_module_names = False
+autodoc_default_flags = ['members', 'inherited-members']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] | Make members, inherited-members default in autodoc | equinor_segyio | train | py |
45d63f6195d473fa12ab1ffc37ee3edd257a6d0b | diff --git a/swipe.js b/swipe.js
index <HASH>..<HASH> 100644
--- a/swipe.js
+++ b/swipe.js
@@ -140,6 +140,8 @@ function Swipe(container, options) {
if (options.continuous) move(circle(to - direction), -(width * direction), 0); // we need to get the next in place
} else {
+
+ to = circle(to);
animate(index * -width, to * -width, slideSpeed || speed);
//no fallback for a circular continuous if the browser does not accept transitions
} | fix continuous for no-transitions browsers | lyfeyaj_swipe | train | js |
f33ee70708ba7196471bfb5fff53816fef66307e | diff --git a/slacker/__init__.py b/slacker/__init__.py
index <HASH>..<HASH> 100644
--- a/slacker/__init__.py
+++ b/slacker/__init__.py
@@ -114,13 +114,15 @@ class Groups(BaseAPI):
return self.get('groups.list',
params={'exclude_archived': exclude_archived})
- def history(self, channel, latest=None, oldest=None, count=None):
+ def history(self, channel, latest=None, oldest=None, count=None,
+ inclusive=None):
return self.get('groups.history',
params={
'channel': channel,
'latest': latest,
'oldest': oldest,
- 'count': count
+ 'count': count,
+ 'inclusive': inclusive
})
def invite(self, channel, user): | "inclusive" argument for groups.history API. | os_slacker | train | py |
96bde699f69b2d263a0338c1762aeedea82aea80 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,5 @@
import os
import sys
-# Temporary patch for issue reported here:
-# https://groups.google.com/forum/#!topic/nose-users/fnJ-kAUbYHQ
-import multiprocessing # TODO: Remove when Travis-CI updates 2.7 to 2.7.4+
__DIR__ = os.path.abspath(os.path.dirname(__file__))
import codecs
from setuptools import setup | Remove multiprocessing import as Travis-CI has upgraded to <I>+ | hfaran_Tornado-JSON | train | py |
287f60af574f613015a6da087bb7a0789117b093 | diff --git a/src/client.js b/src/client.js
index <HASH>..<HASH> 100644
--- a/src/client.js
+++ b/src/client.js
@@ -648,8 +648,8 @@ exports.makeClientConstructor = function(methods, serviceName) {
var deserialize = attrs.responseDeserialize;
Client.prototype[name] = requester_makers[method_type](
attrs.path, serialize, deserialize);
- Client.prototype[name].serialize = serialize;
- Client.prototype[name].deserialize = deserialize;
+ // Associate all provided attributes with the method
+ _.assign(Client.prototype[name], attrs);
});
return Client;
diff --git a/src/common.js b/src/common.js
index <HASH>..<HASH> 100644
--- a/src/common.js
+++ b/src/common.js
@@ -146,6 +146,8 @@ exports.getProtobufServiceAttrs = function getProtobufServiceAttrs(service,
path: prefix + method.name,
requestStream: method.requestStream,
responseStream: method.responseStream,
+ requestType: method.resolvedRequestType,
+ responseType: method.resolvedResponseType,
requestSerialize: serializeCls(method.resolvedRequestType.build()),
requestDeserialize: deserializeCls(method.resolvedRequestType.build(),
binaryAsBase64, longsAsStrings), | Add more reflection information to Node client classes | grpc_grpc-node | train | js,js |
bbb07d1b2cfc7b73ed67f802ae22988a20df2858 | diff --git a/lib/Memcache.php b/lib/Memcache.php
index <HASH>..<HASH> 100644
--- a/lib/Memcache.php
+++ b/lib/Memcache.php
@@ -37,7 +37,7 @@ class Memcache extends BaseCache
);
/**
- * MEMCACHE_COMPRESSED
+ * The flag that use MEMCACHE_COMPRESSED to store the item compressed (uses zlib).
*
* @var int
*/
diff --git a/tests/unit/MemcacheTest.php b/tests/unit/MemcacheTest.php
index <HASH>..<HASH> 100644
--- a/tests/unit/MemcacheTest.php
+++ b/tests/unit/MemcacheTest.php
@@ -12,11 +12,6 @@ class MemcacheTest extends CacheTestCase
parent::setUp();
- // HHVM: Unable to handle compressed values yet
- if (defined('HHVM_VERSION')) {
- $this->object->setOption('flag', 0);
- }
-
if (false === @$this->object->getObject()->getStats()) {
$this->markTestSkipped('The memcache is not running');
} | changed flag default to 0, false zlib is not install by default | twinh_wei | train | php,php |
2d9bf772dfdfeafeed75441b955e4f31c0dc4957 | diff --git a/ast_test.go b/ast_test.go
index <HASH>..<HASH> 100644
--- a/ast_test.go
+++ b/ast_test.go
@@ -576,14 +576,12 @@ func removePos(v interface{}) Node {
case IfStmt:
removePos(&x.Cond)
removePos(x.ThenStmts)
- removePos(x.Elifs)
+ for i := range x.Elifs {
+ removePos(&x.Elifs[i].Cond)
+ removePos(x.Elifs[i].ThenStmts)
+ }
removePos(x.ElseStmts)
return x
- case []Elif:
- for i := range x {
- removePos(&x[i].Cond)
- removePos(x[i].ThenStmts)
- }
case WhileStmt:
x.While = Position{}
x.Done = Position{} | ast_test: no need for []Elif case | mvdan_sh | train | go |
82365d28f663dda1a0d45a47b04411598a276571 | diff --git a/quilt/push.py b/quilt/push.py
index <HASH>..<HASH> 100644
--- a/quilt/push.py
+++ b/quilt/push.py
@@ -25,6 +25,7 @@ from quilt.command import Command
from quilt.db import Db, Series
from quilt.error import NoPatchesInSeries
from quilt.patch import Patch
+from quilt.utils import SubprocessError, Touch
class Push(Command):
@@ -38,11 +39,22 @@ class Push(Command):
def _apply_patch(self, patch_name):
prefix = os.path.join(self.quilt_pc, patch_name)
patch_file = os.path.join(self.quilt_patches, patch_name)
- Patch(self.cwd, patch_file, backup=True, prefix=prefix)
+ refresh = prefix + "~refresh"
+
+ if os.path.exists(refresh):
+ raise QuiltException("Patch %s needs to be refreshed" % \
+ patch_name)
+
+ try:
+ Patch(self.cwd, patch_file, backup=True, prefix=prefix)
+ except SubprocessError, e:
+ Touch(refresh)
+ raise QuiltError("Patch %s does not apply" % patch_name)
+
self.db.add_patch(patch_name)
if os.path.exists(prefix):
- open(os.path.join(prefix, ".timestamp"), "w").close()
+ Touch(os.path.join(prefix, ".timestamp"))
else:
os.makedirs(prefix) | Implement the refresh bahaviour of quilt
If a patch could no be applied quilt creates a ~refresh file in the .pc
directory. If this file is present quilt won't apply the patch until it
is forced to do so. | bjoernricks_python-quilt | train | py |
7c4e8ac4a59ce2d1f7be4f1af9c6cdc9a5433966 | diff --git a/src/examples/java/NodeExample.java b/src/examples/java/NodeExample.java
index <HASH>..<HASH> 100644
--- a/src/examples/java/NodeExample.java
+++ b/src/examples/java/NodeExample.java
@@ -38,11 +38,14 @@ public class NodeExample {
//
String bob = "3N9gDFq8tKFhBDBTQxR3zqvtpXjw5wW3syA";
+ // Create an alias
+ String txId = node.alias(alice, "alice", 'T', FEE);
+
// Issue an asset
String assetId = node.issueAsset(alice, "CleanAir", "The first air-backed blockchain asset ever",
1_000_000 * TOKEN, 8, true, ISSUE_FEE);
// Reissuing, making it no longer reissuable
- String txId = node.reissueAsset(alice, assetId, 100 * TOKEN, true, ISSUE_FEE);
+ txId = node.reissueAsset(alice, assetId, 100 * TOKEN, true, ISSUE_FEE);
// Burning some coins
txId = node.burnAsset(alice, assetId, 20 * TOKEN, ISSUE_FEE); | Added alias creation to NodeExample.java | wavesplatform_WavesJ | train | java |
fbd9b3f302c1fb59338a3fda54140bc56173c383 | diff --git a/montblanc/impl/biro/v3/CompositeBiroSolver.py b/montblanc/impl/biro/v3/CompositeBiroSolver.py
index <HASH>..<HASH> 100644
--- a/montblanc/impl/biro/v3/CompositeBiroSolver.py
+++ b/montblanc/impl/biro/v3/CompositeBiroSolver.py
@@ -163,7 +163,7 @@ class CompositeBiroSolver(BaseSolver):
if ntime < self.vtime: self.vtime = ntime
# Configure the number of solvers used
- self.nsolvers = kwargs.get('nsolvers', 2)
+ self.nsolvers = kwargs.get('nsolvers', 4)
self.time_begin = np.arange(self.nsolvers)*self.vtime//self.nsolvers
self.time_end = np.arange(1,self.nsolvers+1)*self.vtime//self.nsolvers
self.time_diff = self.time_end - self.time_begin | Change the default number of solvers (and by implication CUDA streams) from 2 to 4. This is the point at which further asynchronous overlap benefits become negligible, but our current overlap is sufficient at 2 in any case. | ska-sa_montblanc | train | py |
f758961da593d21b123db7f44f2e25ad0aef9189 | diff --git a/tests/kif_test.py b/tests/kif_test.py
index <HASH>..<HASH> 100644
--- a/tests/kif_test.py
+++ b/tests/kif_test.py
@@ -413,20 +413,20 @@ TEST_KIF_81DOJO_RESULT = {
}
class ParserTest(unittest.TestCase):
- def parse_str_test(self):
+ def test_parse_str(self):
result = KIF.Parser.parse_str(TEST_KIF_STR)
self.assertEqual(result[0], TEST_KIF_RESULT)
- def parse_str_with_time_test(self):
+ def test_parse_str_with_time(self):
result = KIF.Parser.parse_str(TEST_KIF_STR_WITH_TIME)
self.assertEqual(result[0], TEST_KIF_WITH_TIME_RESULT)
- def parse_str_81dojo_test(self):
+ def test_parse_str_81dojo(self):
result = KIF.Parser.parse_str(TEST_KIF_81DOJO)
print(result[0])
self.assertEqual(result[0], TEST_KIF_81DOJO_RESULT)
- def parse_file_test(self):
+ def test_parse_file(self):
try:
tempdir = tempfile.mkdtemp() | fixed: set test_ at start of testing function name to work with unittest | gunyarakun_python-shogi | train | py |
91141f5c01ee74998f08f4ef0d6422c4c5eaa147 | diff --git a/build.py b/build.py
index <HASH>..<HASH> 100755
--- a/build.py
+++ b/build.py
@@ -76,7 +76,7 @@ def report_sizes(t):
t.info(' compressed: %d bytes', len(stringio.getvalue()))
-virtual('all', 'build-all', 'build', 'examples')
+virtual('all', 'build-all', 'build', 'examples', 'precommit')
virtual('precommit', 'lint', 'build-all', 'test', 'build', 'build-examples', 'doc') | Build precommit target by default so precommit dependencies get cleaned by default | openlayers_openlayers | train | py |
0049edad4108efcd8fb758e20da35f2690828268 | diff --git a/src/control/Checkout.php b/src/control/Checkout.php
index <HASH>..<HASH> 100755
--- a/src/control/Checkout.php
+++ b/src/control/Checkout.php
@@ -32,6 +32,7 @@ use SilverStripe\Omnipay\Service\ServiceFactory;
use SilverStripe\CMS\Controllers\ContentController;
use SilverCommerce\ShoppingCart\ShoppingCartFactory;
use SilverCommerce\Checkout\Forms\CustomerDetailsForm;
+use SilverCommerce\ShoppingCart\Model\ShoppingCart;
/**
* Controller used to render the checkout process
@@ -308,7 +309,6 @@ class Checkout extends Controller
// If we have turned off login, or member logged in
$login_form = null;
$customer_form = $this->CustomerForm();
- $request = $this->getRequest();
$config = SiteConfig::current_site_config();
$member = Security::getCurrentUser();
@@ -356,7 +356,7 @@ class Checkout extends Controller
$estimate = $this->getEstimate();
$cart_estimate = ShoppingCartFactory::create()->getCurrent();
- if (!$estimate || ($cart_estimate->ID != $estimate->ID)) {
+ if (!$estimate || (is_a($estimate, ShoppingCart::class) && ($cart_estimate->ID != $estimate->ID))) {
$this->setEstimate($cart_estimate);
}
} | Ensure we only merge shopping carts on login (not other estimates) | silvercommerce_checkout | train | php |
4aa6b2a73c712188fd4acb73bf965a12d58a69ed | diff --git a/i3pystatus/core/command.py b/i3pystatus/core/command.py
index <HASH>..<HASH> 100644
--- a/i3pystatus/core/command.py
+++ b/i3pystatus/core/command.py
@@ -7,11 +7,21 @@ CommandResult = namedtuple("Result", ['rc', 'out', 'err'])
def run_through_shell(command, enable_shell=False):
"""
- Retrieves output of command
- Returns tuple success (boolean)/ stdout(string) / stderr (string)
+ Retrieve output of a command.
+ Returns a named tuple with three elements:
- Don't use this function with programs that outputs lots of data since the output is saved
- in one variable
+ * ``rc`` (integer) Return code of command.
+ * ``out`` (string) Everything that was printed to stdout.
+ * ``err`` (string) Everything that was printed to stderr.
+
+ Don't use this function with programs that outputs lots of data since the
+ output is saved in one variable.
+
+ :param command: A string or a list of strings containing the name and
+ arguments of the program.
+ :param enable_shell: If set ot `True` users default shell will be invoked
+ and given ``command`` to execute. The ``command`` should obviously be a
+ string since shell does all the parsing.
"""
if not enable_shell and not isinstance(command, list): | Docs: Updated docstring of `run_through_shell`. | enkore_i3pystatus | train | py |
15bf56a889ae05d4fd8e09421477687fd48ab43b | diff --git a/Example/src/ScrollableViewExample.js b/Example/src/ScrollableViewExample.js
index <HASH>..<HASH> 100644
--- a/Example/src/ScrollableViewExample.js
+++ b/Example/src/ScrollableViewExample.js
@@ -58,7 +58,9 @@ function ScrollableView({ children }) {
const handler = useAnimatedGestureHandler({
onStart: (evt, ctx) => {
- ctx.startY = translateY.value;
+ const currentY = translateY.value;
+ ctx.startY = currentY;
+ translateY.value = currentY; // for stop animation
},
onActive: (evt, ctx) => { | Fix scroll animation in Example (#<I>)
## Description
The list in scroll Example app is inertness, and when list is moved and someone taps on screen and doesn't move by finger it calls only onStart() event from GestureHandler, and this sets the actual position but the list is still moving. If in the next step someone moves their finger then the list jumps to this position and starts animation of scroll from this position like in issue:
Fixes <URL> | kmagiera_react-native-reanimated | train | js |
15bf94069cf48727c25fc3625c8a83bc33c95ca0 | diff --git a/torchtext/data.py b/torchtext/data.py
index <HASH>..<HASH> 100644
--- a/torchtext/data.py
+++ b/torchtext/data.py
@@ -230,10 +230,9 @@ class Field(object):
if self.sequential:
arr = arr.contiguous()
else:
- with torch.cuda.device(device):
- arr = arr.cuda()
- if self.include_lengths:
- lengths = lengths.cuda()
+ arr = arr.cuda(device)
+ if self.include_lengths:
+ lengths = lengths.cuda(device)
if self.include_lengths:
return Variable(arr, volatile=not train), lengths
return Variable(arr, volatile=not train) | fix numericalize with device=None | pytorch_text | 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.