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
|
---|---|---|---|---|---|
402502dbc9b459dc8a5ff52a977e3021a2edbeda | diff --git a/geomdl/Abstract.py b/geomdl/Abstract.py
index <HASH>..<HASH> 100644
--- a/geomdl/Abstract.py
+++ b/geomdl/Abstract.py
@@ -747,7 +747,7 @@ class Surface(object):
if self._bounding_box is None or len(self._bounding_box) == 0:
self._eval_bbox()
- return self._bounding_box
+ return tuple(self._bounding_box)
def _eval_bbox(self):
""" Evaluates bounding box of the surface. """
@@ -767,7 +767,7 @@ class Surface(object):
if arr[0] > arr[1]:
bbmax[i] = arr[0]
- self._bounding_box = (tuple(bbmin), tuple(bbmax))
+ self._bounding_box = [tuple(bbmin), tuple(bbmax)]
# Runs visualization component to render the surface
def render(self, **kwargs): | Fix bounding box return type for the Surface class | orbingol_NURBS-Python | train | py |
074907e79f9128f68261795bf9dd12d854e9ca5d | diff --git a/MAVProxy/modules/lib/mp_util.py b/MAVProxy/modules/lib/mp_util.py
index <HASH>..<HASH> 100644
--- a/MAVProxy/modules/lib/mp_util.py
+++ b/MAVProxy/modules/lib/mp_util.py
@@ -5,6 +5,7 @@
import gzip
import math
import os
+import io
import sys
import platform
import warnings
@@ -272,7 +273,8 @@ def download_files(files):
continue
if url.endswith(".gz") and not file.endswith(".gz"):
# decompress it...
- data = gzip.decompress(data)
+ with gzip.GzipFile(fileobj=io.BytesIO(data)) as gz:
+ data = gz.read()
try:
open(file, mode='wb').write(data)
except Exception as e: | mp_util: fixed param download in py2
py2 gzip doesn't have decompress() | ArduPilot_MAVProxy | train | py |
11f1ea64cb6c3a0337b38d4cd42a82ab6075670c | diff --git a/lib/bmc-daemon-lib/conf.rb b/lib/bmc-daemon-lib/conf.rb
index <HASH>..<HASH> 100644
--- a/lib/bmc-daemon-lib/conf.rb
+++ b/lib/bmc-daemon-lib/conf.rb
@@ -236,7 +236,7 @@ module BmcDaemonLib
end
# Notify startup
- Rollbar.info("#{@app_name} #{@app_ver} [#{@host}]")
+ Rollbar.info("[#{@app_ver}] #{@host}")
end
def self.log origin, message | conf: rollbar: slight change on announcement message | bmedici_bmc-daemon-lib | train | rb |
982e552763168bc9ac1d0706d70ae2648a225d8b | diff --git a/implicit/recommender_base.py b/implicit/recommender_base.py
index <HASH>..<HASH> 100644
--- a/implicit/recommender_base.py
+++ b/implicit/recommender_base.py
@@ -43,6 +43,9 @@ class RecommenderBase(object):
calculate the best items for this user.
N : int, optional
The number of results to return
+ filter_already_liked_items: bool, optional
+ When true, don't return items present in the training set that were rated
+ by the specificed user.
filter_items : sequence of ints, optional
List of extra item ids to filter out from the output
recalculate_user : bool, optional | Doc update - filter_already_liked_items
Adding filter_already_liked_items to docstring. | benfred_implicit | train | py |
4bb44b38493bdbb56f57ac36e60fd02277139cea | diff --git a/Command/TrustedformCommand.php b/Command/TrustedformCommand.php
index <HASH>..<HASH> 100644
--- a/Command/TrustedformCommand.php
+++ b/Command/TrustedformCommand.php
@@ -75,12 +75,14 @@ class TrustedformCommand extends ModeratedCommand
if (!$this->checkRunStatus($input, $output, $this->getName().$threadId)) {
$this->output->writeln('Already Running.');
+ $this->completeRun();
return 0;
}
if ($threadId > $maxThreads) {
$this->output->writeln('--thread-id cannot be larger than --max-thread');
+ $this->completeRun();
return 1;
}
define('MAUTIC_PLUGIN_ENHANCER_CLI', true);
@@ -93,12 +95,14 @@ class TrustedformCommand extends ModeratedCommand
if ($model->claimCertificates($threadId, $maxThreads, $batchLimit, $attemptLimit, $output)) {
$output->writeln('Finished claiming certificates.');
+ $this->completeRun();
return 0;
}
} catch (\Exception $e) {
$output->writeln('Trustedform certificate claiming failure '.$e->getMessage());
}
+ $this->completeRun();
return 1;
}
} | [ENG-<I>] Add run completion to moderated command. | TheDMSGroup_mautic-enhancer | train | php |
daacea89167c66790932dbfd0afb012936e883a1 | diff --git a/slick.grid.js b/slick.grid.js
index <HASH>..<HASH> 100644
--- a/slick.grid.js
+++ b/slick.grid.js
@@ -514,8 +514,11 @@ if (typeof Slick === "undefined") {
lastResizable = i;
}
});
+ if (firstResizable === undefined) {
+ return;
+ }
columnElements.each(function(i,e) {
- if ((firstResizable !== undefined && i < firstResizable) || (options.forceFitColumns && i >= lastResizable)) { return; }
+ if (i < firstResizable || (options.forceFitColumns && i >= lastResizable)) { return; }
$col = $(e);
$("<div class='slick-resizable-handle' />")
.appendTo(e)
@@ -772,7 +775,7 @@ if (typeof Slick === "undefined") {
function trigger(evt, args, e) {
e = e || new Slick.EventData();
- args = args || args;
+ args = args || {};
args.grid = self;
return evt.notify(args, e, self);
} | Fixed columns appearing as resizable when "resizable" is false for all of them.
Fixed arguments defaults in event triggering in the grid. | coatue-oss_slickgrid2 | train | js |
4652446efee458d8b6287935cd7fdb28ccc480ed | diff --git a/vendor/Krystal/Application/Component/CsrfProtector.php b/vendor/Krystal/Application/Component/CsrfProtector.php
index <HASH>..<HASH> 100644
--- a/vendor/Krystal/Application/Component/CsrfProtector.php
+++ b/vendor/Krystal/Application/Component/CsrfProtector.php
@@ -23,10 +23,14 @@ final class CsrfProtector implements ComponentInterface
public function getInstance(DependencyInjectionContainerInterface $container, array $config, InputInterface $input)
{
$sessionBag = $container->get('sessionBag');
+ $view = $container->get('view');
$component = new Component($sessionBag);
$component->prepare();
+ // Append global $csrfToken variable to all templates
+ $view->addVariable('csrfToken', $component->getToken());
+
return $component;
} | Forced to append $csrfToken automatically | krystal-framework_krystal.framework | train | php |
f303739444d63d421fd9f68f74840167edbf8d61 | diff --git a/ipcalc.py b/ipcalc.py
index <HASH>..<HASH> 100644
--- a/ipcalc.py
+++ b/ipcalc.py
@@ -363,6 +363,18 @@ class IP(object):
def __eq__(self, other):
return int(self) == int(IP(other))
+ def __add__(self, offset):
+ """Add numeric offset to the IP."""
+ if not isinstance(offset, six.integer_types):
+ return ValueError('Value is not numeric')
+ return self.__class__(self.ip + offset, mask=self.mask, version=self.v)
+
+ def __sub__(self, offset):
+ """Substract numeric offset from the IP."""
+ if not isinstance(offset, six.integer_types):
+ return ValueError('Value is not numeric')
+ return self.__class__(self.ip - offset, mask=self.mask, version=self.v)
+
def size(self):
"""Return network size."""
return 1 | Implemented __add__ and __sub__ as suggested by @bensonrodney
Close #<I> | tehmaze_ipcalc | train | py |
3cc630798b630f66eafe940a9eee7521f1bd9a6e | diff --git a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php
+++ b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php
@@ -181,6 +181,10 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
$id = $this->em->getUnitOfWork()->getEntityIdentifier($entity);
}
+ if ($this->class->isVersioned) {
+ $this->assignDefaultVersionValue($entity, $id);
+ }
+
// Execute inserts on subtables.
// The order doesn't matter because all child tables link to the root table via FK.
foreach ($subTableStmts as $tableName => $stmt) {
@@ -212,10 +216,6 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister
$stmt->closeCursor();
}
- if ($this->class->isVersioned) {
- $this->assignDefaultVersionValue($entity, $id);
- }
-
$this->queuedInserts = array();
return $postInsertIds; | Fix DDC-<I>.
Credit goes to Jack van Galen for fixing this issue.
Fix for JoinedSubclassPersister, multiple inserts with versioning throws
an optimistic locking exception. | doctrine_orm | train | php |
eeba07cda24c0e85198dd52a071991377f695b61 | diff --git a/guava/src/com/google/common/io/BaseEncoding.java b/guava/src/com/google/common/io/BaseEncoding.java
index <HASH>..<HASH> 100644
--- a/guava/src/com/google/common/io/BaseEncoding.java
+++ b/guava/src/com/google/common/io/BaseEncoding.java
@@ -181,7 +181,7 @@ public abstract class BaseEncoding {
*/
@GwtIncompatible("Writer,OutputStream")
public final OutputSupplier<OutputStream> encodingStream(
- final OutputSupplier<Writer> writerSupplier) {
+ final OutputSupplier<? extends Writer> writerSupplier) {
checkNotNull(writerSupplier);
return new OutputSupplier<OutputStream>() {
@Override
@@ -254,7 +254,7 @@ public abstract class BaseEncoding {
*/
@GwtIncompatible("Reader,InputStream")
public final InputSupplier<InputStream> decodingStream(
- final InputSupplier<Reader> readerSupplier) {
+ final InputSupplier<? extends Reader> readerSupplier) {
checkNotNull(readerSupplier);
return new InputSupplier<InputStream>() {
@Override | Guava issue <I>: fix generics for BaseEncoding streaming encoding/decoding
-------------
Created by MOE: <URL> | google_guava | train | java |
96f3c241ca7ea60c637812db69e92b54bd7c8deb | diff --git a/safe/utilities/file_downloader.py b/safe/utilities/file_downloader.py
index <HASH>..<HASH> 100644
--- a/safe/utilities/file_downloader.py
+++ b/safe/utilities/file_downloader.py
@@ -130,8 +130,12 @@ class FileDownloader(object):
QCoreApplication.processEvents()
result = self.reply.error()
- http_code = int(self.reply.attribute(
- QNetworkRequest.HttpStatusCodeAttribute))
+ try:
+ http_code = int(self.reply.attribute(
+ QNetworkRequest.HttpStatusCodeAttribute))
+ except TypeError:
+ # If the user cancels the request, the HTTP response will be None.
+ http_code = None
self.reply.abort()
self.reply.deleteLater() | fix if the request is cancelled, the http response is none | inasafe_inasafe | train | py |
6c95e0d58ff5683ee5be30491a3fa5f99b2b5d08 | diff --git a/src/definitions.js b/src/definitions.js
index <HASH>..<HASH> 100644
--- a/src/definitions.js
+++ b/src/definitions.js
@@ -4,14 +4,15 @@
import {Map} from 'immutable';
export type NormalizeState = {
- entities: Object|Map<any,any>,
- result: Object|Map<any,any>,
+ entities: Object|Map<any, any>,
+ result: Object,
schemas: Object
+};
type DenormalizeState = {
- entities: Object|Map<any,any>,
- result: Object|Map<any,any>
+ entities: Object|Map<any, any>,
+ result: Object|Map<any, any>
};
export type SelectOptions = { | Collect the EntitySchemas used when normalizing.
They are merged into state.
This lets the entity selectors select a child item out of state that wasn't
defined in the root schema.
Some state keys were renamed:
_schema is now _baseSchema
_schemas is added
Some flow type fixes were also required for this:
* Add DenormalizeState alongside NormalizeState
* Fix some call signatures in tests | blueflag_enty | train | js |
77244a4baeedc399c36a4e2475a8cf7f1392baa6 | diff --git a/berserker_resolver/__init__.py b/berserker_resolver/__init__.py
index <HASH>..<HASH> 100644
--- a/berserker_resolver/__init__.py
+++ b/berserker_resolver/__init__.py
@@ -1,4 +1,4 @@
from berserker_resolver.resolver import ThreadResolver as Resolver
-from berserker_resolver.extra import tries_detect
+from berserker_resolver.extra import detect_tries
-__all__ = ['Resolver', 'tries_detect',]
+__all__ = ['Resolver', 'detect_tries',]
diff --git a/berserker_resolver/extra.py b/berserker_resolver/extra.py
index <HASH>..<HASH> 100644
--- a/berserker_resolver/extra.py
+++ b/berserker_resolver/extra.py
@@ -1,6 +1,6 @@
from berserker_resolver import Resolver
-def tries_detect(domain='youtube.com', cycles=100, **kwargs):
+def detect_tries(domain='youtube.com', cycles=100, **kwargs):
tries = 0
max_length = 0 | func rename (cosmetics) | DmitryFillo_berserker_resolver | train | py,py |
50cfbd6e1b9fc9da14ae76dcd63e77e70c3e23ec | diff --git a/src/com/vmware/vim25/mo/samples/QueryEvent.java b/src/com/vmware/vim25/mo/samples/QueryEvent.java
index <HASH>..<HASH> 100644
--- a/src/com/vmware/vim25/mo/samples/QueryEvent.java
+++ b/src/com/vmware/vim25/mo/samples/QueryEvent.java
@@ -81,7 +81,7 @@ public class QueryEvent
EventHistoryCollector history = _eventManager
.createCollectorForEvents(eventFilter);
- Event[] events = history.getLastPage();
+ Event[] events = history.getLatestPage();
System.out.println("Events In the latestPage are : ");
for (int i = 0; i < events.length; i++) | refactored with a fixed method name | yavijava_yavijava | train | java |
a46cad45e576a67c5ceb0adb27490f2af4dbae12 | diff --git a/progressbar.js b/progressbar.js
index <HASH>..<HASH> 100644
--- a/progressbar.js
+++ b/progressbar.js
@@ -10,10 +10,15 @@
}
}(this, function() {
+ var oldTweenable = this.Tweenable;
+
// The next line will be replaced with minified version of shifty library
- // in a build step
+ // in a build step. Don't expose Tweenable to global scope
// #include shifty
+ var Tweenable = this.Tweenable;
+ this.Tweenable = oldTweenable;
+
var EASING_ALIASES = {
easeIn: 'easeInCubic',
easeOut: 'easeOutCubic', | Prevent exposing Tweenable to global scope | kimmobrunfeldt_progressbar.js | train | js |
ae89bc2d88cf0ae6ddb5e3b388b10d2646c13245 | diff --git a/src/components/grid/Column.js b/src/components/grid/Column.js
index <HASH>..<HASH> 100644
--- a/src/components/grid/Column.js
+++ b/src/components/grid/Column.js
@@ -47,7 +47,7 @@ const Column = React.createClass({
},
_getScreenWidth () {
- const width = document.documentElement.clientWidth || document.body.clientWidth;
+ const width = window.innerWidth;
let screenWidth = 'Small';
if (width >= this.props.breakpointLarge) { | change to window.innerWidth for column | mxenabled_mx-react-components | train | js |
616d48f3c7e1491cb237c929ee0d6a57a56330d5 | diff --git a/src/components/selects/mixins/generators.js b/src/components/selects/mixins/generators.js
index <HASH>..<HASH> 100644
--- a/src/components/selects/mixins/generators.js
+++ b/src/components/selects/mixins/generators.js
@@ -91,7 +91,7 @@ export default {
})
if (!children.length) {
- children.push(this.genTile(this.noDataText))
+ children.push(this.genTile(this.noDataText, true))
}
return this.$createElement('v-card', [
@@ -110,10 +110,10 @@ export default {
props: item
})
},
- genTile (item) {
+ genTile (item, disabled) {
const active = this.selectedItems.indexOf(item) !== -1
const data = {
- nativeOn: { click: () => this.selectItem(item) },
+ nativeOn: { click: () => this.selectItem(disabled ? '' : item) },
props: {
avatar: item === Object(item) && 'avatar' in item,
ripple: true, | Added disabled items option (#<I>)
* Added disabled items option
The function genTile now has an optional boolean variable for disabled items. I changed the noDataText item to be disabled. This prevents someone from clicking "No Data Available" and it returning that as the selected item. Now it merely returns an empty string.
* Update generators.js
* Corrected mistake | vuetifyjs_vuetify | train | js |
9429a9d93ab46ce9f890f2eb39a4133072944c56 | diff --git a/standalone/src/main/java/org/jboss/as/console/client/domain/groups/deployment/DeploymentStep1.java b/standalone/src/main/java/org/jboss/as/console/client/domain/groups/deployment/DeploymentStep1.java
index <HASH>..<HASH> 100644
--- a/standalone/src/main/java/org/jboss/as/console/client/domain/groups/deployment/DeploymentStep1.java
+++ b/standalone/src/main/java/org/jboss/as/console/client/domain/groups/deployment/DeploymentStep1.java
@@ -123,7 +123,7 @@ public class DeploymentStep1 {
wizard.onUploadComplete(upload.getFilename(), hash);
} catch (Exception e) {
- Log.error("Failed to decode response", e);
+ Log.error("Failed to decode response: "+html, e);
}
} | increase logging verbosity for deployment errors | hal_core | train | java |
9319cefb151a6c113c36a893c78da67b8e362ba4 | diff --git a/h2o-py/tests/testdir_generic_model/pyunit_generic_model_mojo_glm.py b/h2o-py/tests/testdir_generic_model/pyunit_generic_model_mojo_glm.py
index <HASH>..<HASH> 100644
--- a/h2o-py/tests/testdir_generic_model/pyunit_generic_model_mojo_glm.py
+++ b/h2o-py/tests/testdir_generic_model/pyunit_generic_model_mojo_glm.py
@@ -14,7 +14,7 @@ def test(x, y, output_test, strip_part, algo_name, generic_algo_name, family):
print(glm)
with Capturing() as original_output:
glm.show()
- original_model_filename = "/home/pavel/mojo_glm_test.zip"
+ original_model_filename = tempfile.mkdtemp()
original_model_filename = glm.download_mojo(original_model_filename)
model = H2OGenericEstimator.from_file(original_model_filename) | Removed local test filepath in GLM test and replaced with a temp file | h2oai_h2o-3 | train | py |
9a14830750dbb2afd17f9881f6d950b9e78259fe | diff --git a/src/core/Application.php b/src/core/Application.php
index <HASH>..<HASH> 100644
--- a/src/core/Application.php
+++ b/src/core/Application.php
@@ -128,18 +128,10 @@ class Application extends ServiceLocator
$this->registerRoutes();
$this->bootstrapped = true;
} catch (\Exception $e) {
- if ($this->environment === 'test') {
- throw $e;
- }
-
$this->lastError = $e;
$this->get('log')
->emergency($e);
} catch (\Throwable $e) {
- if ($this->environment === 'test') {
- throw $e;
- }
-
$this->lastError = $e;
$this->get('log')
->emergency($e);
@@ -402,10 +394,6 @@ class Application extends ServiceLocator
$response->status($e->statusCode);
$response->data = $this->exceptionToArray($e);
} else {
- if ($this->environment === 'test') {
- throw $e;
- }
-
$response->status(500);
$response->data = $this->exceptionToArray($e);
} | Do not throw exceptions on test environment | bixuehujin_blink | train | php |
b6ab25cf5d2934bd8f5d53ae3aabfe154b6e26d9 | diff --git a/spring-hateoas-ext/src/main/java/de/escalon/hypermedia/action/Input.java b/spring-hateoas-ext/src/main/java/de/escalon/hypermedia/action/Input.java
index <HASH>..<HASH> 100644
--- a/spring-hateoas-ext/src/main/java/de/escalon/hypermedia/action/Input.java
+++ b/spring-hateoas-ext/src/main/java/de/escalon/hypermedia/action/Input.java
@@ -60,7 +60,7 @@ public @interface Input {
int step() default 0;
/**
- * Parameter is not editable, refers to single values as well as properties of a bean parameter.
+ * Entire parameter is not editable, refers both to single values and to all properties of a bean parameter.
* @return
*/
boolean editable() default true;
@@ -124,7 +124,7 @@ public @interface Input {
* If included attributes are present, the assumption is that all other attributes should be considered ignored
* inputs.
*
- * @return property paths which should be ignored
+ * @return property paths which should be expected
*/
String[] include() default {}; | Adjusted javadoc of @Input | dschulten_hydra-java | train | java |
ab94646da6e984d50da22d2f63488515941192ca | diff --git a/lib/neo4j/transaction.rb b/lib/neo4j/transaction.rb
index <HASH>..<HASH> 100644
--- a/lib/neo4j/transaction.rb
+++ b/lib/neo4j/transaction.rb
@@ -29,15 +29,17 @@ module Neo4j
end
def root
- stack.first
+ initialized_stack.first
+ end
+
+ def initialized_stack
+ self.stack ||= []
end
end
def initialize(_options = {})
- (self.stack ||= []) << self
-
+ self.class.initialized_stack << self
@root = stack.first
- return unless root?
@driver_session = ActiveBase.current_driver.driver.session(Neo4j::Driver::AccessMode::WRITE)
@driver_tx = @driver_session.begin_transaction
rescue StandardError => e
diff --git a/lib/neo4j/version.rb b/lib/neo4j/version.rb
index <HASH>..<HASH> 100644
--- a/lib/neo4j/version.rb
+++ b/lib/neo4j/version.rb
@@ -1,3 +1,3 @@
module Neo4j
- VERSION = '10.0.0-alpha.4'
+ VERSION = '10.0.0-alpha.5'
end | bug with uninitialized transaction stack | neo4jrb_neo4j | train | rb,rb |
9f99ef6c24f4e939eedfe24a6457f6352eb1bf36 | diff --git a/lib/p5.serialport.js b/lib/p5.serialport.js
index <HASH>..<HASH> 100644
--- a/lib/p5.serialport.js
+++ b/lib/p5.serialport.js
@@ -386,7 +386,6 @@
data: toWrite
});
};
- };
/**
* Returns a number between 0 and 255 for the next byte that's waiting in the buffer. | Removed stray }; | vanevery_p5.serialport | train | js |
5b544d81aa01d1c2f72c7c9df60ccc0ea8eb07b4 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -63,8 +63,14 @@ setup(
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
- "License :: OSI Approved :: Apache License 2.0",
+ "License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
+ "Programming Language :: Python :: 2",
+ "Programming Language :: Python :: 2.7",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.4",
+ "Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: 3.6",
"Topic :: Database",
"Topic :: Database :: Database Engines/Servers",
"Operating System :: OS Independent" | Fix PyPI classifiers (#<I>)
* Add PyPI classifiers for supported python versions
* Fix PyPI classifiers for Apache License | vertica_vertica-python | train | py |
54b0629bdacd5a1cb4385a0dd5910cee81fd8746 | diff --git a/test/component-library/src/utils/f7-components-router.js b/test/component-library/src/utils/f7-components-router.js
index <HASH>..<HASH> 100644
--- a/test/component-library/src/utils/f7-components-router.js
+++ b/test/component-library/src/utils/f7-components-router.js
@@ -40,11 +40,11 @@ export default {
pageData.el = pageEl;
let pageEvents;
if (component.on) {
- const pageVue = routerComponent.$children[routerComponent.$children.length - 1];
- if (pageVue && pageVue.$el === pageEl) {
+ const componentInstance = routerComponent.$children[routerComponent.$children.length - 1];
+ if (componentInstance && componentInstance.$el === pageEl) {
pageEvents = Utils.extend({}, component.on);
Object.keys(pageEvents).forEach((pageEvent) => {
- pageEvents[pageEvent] = pageEvents[pageEvent].bind(pageVue);
+ pageEvents[pageEvent] = pageEvents[pageEvent].bind(componentInstance);
});
}
} | Test lib, rename componentInstance | phenomejs_phenome | train | js |
f954253b1affa2ab313afa3b7e5b364b43af6201 | diff --git a/cihai/datasets/unihan.py b/cihai/datasets/unihan.py
index <HASH>..<HASH> 100644
--- a/cihai/datasets/unihan.py
+++ b/cihai/datasets/unihan.py
@@ -174,7 +174,7 @@ class Unihan(CihaiDatabase):
for table in tables:
table = Table(table, self.metadata)
- response[table.fullname] = [r for r in select([
+ response[table.fullname] = [dict(r) for r in select([
table.c.char, table.c.field, table.c.value
]).where(or_(
table.c.char == request,
diff --git a/cihai/testsuite/test_unihan.py b/cihai/testsuite/test_unihan.py
index <HASH>..<HASH> 100644
--- a/cihai/testsuite/test_unihan.py
+++ b/cihai/testsuite/test_unihan.py
@@ -166,10 +166,12 @@ class UnihanMiddleware(CihaiTestCase, UnihanTestCase):
def test_get(self):
c = Cihai()
c.use(Unihan)
- ni = c.get('你')
- print(c.get('好'))
+ results = c.get('你')
- self.assertTrue(ni)
+ self.assertTrue(results) # returns something
+ self.assertIsInstance(results, dict)
+ from pprint import pprint
+ pprint(results)
class UnihanReadings(UnihanTestCase): | wip for unihan. more coming soon. | cihai_cihai | train | py,py |
f30c7cf34a0f9abd02ec8898136d1ad51debd21d | diff --git a/drivers/storage/gcepd/storage/gce_storage.go b/drivers/storage/gcepd/storage/gce_storage.go
index <HASH>..<HASH> 100644
--- a/drivers/storage/gcepd/storage/gce_storage.go
+++ b/drivers/storage/gcepd/storage/gce_storage.go
@@ -300,7 +300,7 @@ func (d *driver) Volumes(
return vols, nil
}
-// VolumeInspect inspects a single volume.
+// VolumeInspect inspects a single volume by ID.
func (d *driver) VolumeInspect(
ctx types.Context,
volumeID string,
@@ -335,6 +335,20 @@ func (d *driver) VolumeInspect(
return vols[0], nil
}
+// VolumeInspectByName inspects a single volume by name.
+func (d *driver) VolumeInspectByName(
+ ctx types.Context,
+ volumeName string,
+ opts *types.VolumeInspectOpts) (*types.Volume, error) {
+
+ // For GCE, name and ID are the same
+ return d.VolumeInspect(
+ ctx,
+ volumeName,
+ opts,
+ )
+}
+
// VolumeCreate creates a new volume.
func (d *driver) VolumeCreate(
ctx types.Context, | Add gcepd support for VolumeInspectByName | thecodeteam_libstorage | train | go |
edc6721b4bafbdab3bdb25d96838919ecd88fa31 | diff --git a/montblanc/impl/rime/tensorflow/RimeSolver.py b/montblanc/impl/rime/tensorflow/RimeSolver.py
index <HASH>..<HASH> 100644
--- a/montblanc/impl/rime/tensorflow/RimeSolver.py
+++ b/montblanc/impl/rime/tensorflow/RimeSolver.py
@@ -402,6 +402,8 @@ class RimeSolver(MontblancTensorflowSolver):
yield (feed_f, compute_f, consume_f)
+ chunks_fed += 1
+
montblanc.log.info("Done feeding {n} chunks.".format(n=chunks_fed))
def _feed_actual(self, *args): | Re-add missing chunks_fed increment | ska-sa_montblanc | train | py |
f14ec6c68ee00670d258073c7e7b5b7b93a77849 | diff --git a/pysnmp/smi/mibs/SNMPv2-TC.py b/pysnmp/smi/mibs/SNMPv2-TC.py
index <HASH>..<HASH> 100644
--- a/pysnmp/smi/mibs/SNMPv2-TC.py
+++ b/pysnmp/smi/mibs/SNMPv2-TC.py
@@ -267,7 +267,7 @@ class TextualConvention:
else:
return base.prettyIn(self, value)
- outputValue = octets.ints2octs()
+ outputValue = octets.str2octs('')
runningValue = value
displayHint = self.displayHint
while runningValue and displayHint: | fix to TextualConvention initializer | etingof_pysnmp | train | py |
2f11947eeef87b21c46bd9eb97e377effcd36983 | diff --git a/lib/mediawiki/butt.rb b/lib/mediawiki/butt.rb
index <HASH>..<HASH> 100644
--- a/lib/mediawiki/butt.rb
+++ b/lib/mediawiki/butt.rb
@@ -134,23 +134,19 @@ module MediaWiki
# @since 0.3.0 as is_user_bot?
# @since 0.4.1 as user_bot?
def user_bot?
- begin
- post({ action: 'query', assert: 'bot' })
- true
- rescue MediaWiki::Butt::NotBotError
- false
- end
+ post({ action: 'query', assert: 'bot' })
+ true
+ rescue MediaWiki::Butt::NotBotError
+ false
end
# Checks whether this instance is logged in.
# @return [Boolean] true if logged in, false if not.
def logged_in?
- begin
- post({ action: 'query', assert: 'user' })
- true
- rescue MediaWiki::Butt::NotLoggedInError
- false
- end
+ post({ action: 'query', assert: 'user' })
+ true
+ rescue MediaWiki::Butt::NotLoggedInError
+ false
end
protected | :shirt: Clean up a couple of redundant begin blocks | FTB-Gamepedia_MediaWiki-Butt-Ruby | train | rb |
a4f5fb1b63d6b0f06ea4cb4287f91a78a88ccf15 | diff --git a/lib/magic_lamp/defaults_manager.rb b/lib/magic_lamp/defaults_manager.rb
index <HASH>..<HASH> 100644
--- a/lib/magic_lamp/defaults_manager.rb
+++ b/lib/magic_lamp/defaults_manager.rb
@@ -26,5 +26,10 @@ module MagicLamp
merged_defaults_hash.merge!(defaults)
end
end
+
+ def define(new_defaults, &block)
+ new_manager = self.class.new(configuration, new_defaults, self)
+ block.call(new_manager)
+ end
end
end
diff --git a/spec/lib/defaults_manager_spec.rb b/spec/lib/defaults_manager_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/defaults_manager_spec.rb
+++ b/spec/lib/defaults_manager_spec.rb
@@ -91,4 +91,20 @@ describe MagicLamp::DefaultsManager do
expect(actual).to eq(expected_defaults)
end
end
+
+ describe "#define" do
+ let(:new_defaults) { { very_new: :defaults } }
+
+ it "creates a new defaults manager, passes it to the block" do
+ suspect = nil
+ subject.define(new_defaults) do |block_suspect|
+ suspect = block_suspect
+ end
+ expect(suspect).to be_a(MagicLamp::DefaultsManager)
+ expect(suspect).to_not eq(subject)
+ expect(suspect.defaults).to eq(new_defaults)
+ expect(suspect.configuration).to eq(subject.configuration)
+ expect(suspect.parent).to eq(subject)
+ end
+ end
end | added DefaultsManager#define | crismali_magic_lamp | train | rb,rb |
ffed9e0b10ca163fb9e55dce06625ba87fc5b3c4 | diff --git a/sktensor/pyutils.py b/sktensor/pyutils.py
index <HASH>..<HASH> 100644
--- a/sktensor/pyutils.py
+++ b/sktensor/pyutils.py
@@ -44,3 +44,19 @@ def func_attr(f, attr):
return getattr(f, '__%s__' % attr)
else:
raise ValueError('Object %s has no attr' % (str(f), attr))
+
+
+def from_to_without(frm, to, without, step=1, skip=1, reverse=False, separate=False):
+ """
+ Helper function to create ranges with missing entries
+ """
+ if reverse:
+ frm, to = (to - 1), (frm - 1)
+ step *= -1
+ skip *= -1
+ a = list(range(frm, without, step))
+ b = list(range(without + skip, to, step))
+ if separate:
+ return a, b
+ else:
+ return a + b | add helper function to create from-to-without ranges | mnick_scikit-tensor | train | py |
9a6be9ba2fe6f349fe51b527b1d3bf995a83f5ff | diff --git a/docs/source/generate_configs.py b/docs/source/generate_configs.py
index <HASH>..<HASH> 100755
--- a/docs/source/generate_configs.py
+++ b/docs/source/generate_configs.py
@@ -30,7 +30,7 @@ def rewrite_entries(config, path, sec=None, sort=False):
comments = [sec.inline_comments[entry]] + sec.comments[entry]
for c in comments:
if c:
- description += ' '*4 + re.sub('^\s*#\s*', '', c) + '\n'
+ description += ' '*4 + re.sub('^\s*#', '', c) + '\n'
if etype == 'option':
description += '\n :type: option, one of %s\n' % eargs
else: | docs: verbatim indenting in generate_configs script
this fixes an issue with indenting not being correctly
copied from comments of specfiles | pazz_alot | train | py |
0cb570b2e01fdcbf4b62c2ab3a3ae46b948d951f | diff --git a/wdb/breakpoint.py b/wdb/breakpoint.py
index <HASH>..<HASH> 100644
--- a/wdb/breakpoint.py
+++ b/wdb/breakpoint.py
@@ -76,6 +76,9 @@ class LineBreakpoint(Breakpoint):
return super(LineBreakpoint, self).__eq__(
other) and self.line == other.line
+ def __hash__(self):
+ return super(LineBreakpoint, self).__hash__()
+
class ConditionalBreakpoint(LineBreakpoint):
"""Breakpoint that breaks if condition is True at line in file"""
@@ -99,6 +102,9 @@ class ConditionalBreakpoint(LineBreakpoint):
return super(ConditionalBreakpoint, self).__eq__(
other) and self.condition == other.condition
+ def __hash__(self):
+ return super(LineBreakpoint, self).__hash__()
+
class FunctionBreakpoint(Breakpoint):
"""Breakpoint that breaks if in file in function"""
@@ -120,3 +126,6 @@ class FunctionBreakpoint(Breakpoint):
def __eq__(self, other):
return super(FunctionBreakpoint, self).__eq__(
other) and self.function == other.function
+
+ def __hash__(self):
+ return super(LineBreakpoint, self).__hash__() | Fix breakpoints in python 3 | Kozea_wdb | train | py |
5f384b692747935e7e08729839ca237531d74cad | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@
# should have been distributed with this file.
from setuptools import setup, find_packages
-import os
+import os, re
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
@@ -15,14 +15,7 @@ with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
-def get_version():
- import re
- with open('README.rst','r') as f:
- text = f.read()
- version = re.search(':Version: ([\.?\d]*)',text).group(1)
- return version
-
-VERSION = get_version()
+VERSION = re.search(':Version: ([\.?\d]*)',README).group(1)
setup(
name = "condorpy", | Fixed code to get VERSION in setup.py | tethysplatform_condorpy | train | py |
75809a70bac2290286b9fb3ccd3343f3068ce5ba | diff --git a/spyder/plugins/tests/test_variableexplorer.py b/spyder/plugins/tests/test_variableexplorer.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/tests/test_variableexplorer.py
+++ b/spyder/plugins/tests/test_variableexplorer.py
@@ -19,7 +19,7 @@ def test_get_settings(monkeypatch):
if option == 'dataframe_format': return '3d'
monkeypatch.setattr(VariableExplorer, 'CONF_SECTION', 'sect')
- monkeypatch.setattr('spyder.plugins.variableexplorer.REMOTE_SETTINGS',
+ monkeypatch.setattr('spyder.plugins.variableexplorer.plugin.REMOTE_SETTINGS',
['remote1', 'remote2'])
monkeypatch.setattr(VariableExplorer, 'get_option', mock_get_option) | Fix broken reference to variable explorer plugin. | spyder-ide_spyder | train | py |
c0e5936dd5290c70f4cc8d033cb6c0be13124e1b | diff --git a/Listener/UserPreferencesListener.php b/Listener/UserPreferencesListener.php
index <HASH>..<HASH> 100644
--- a/Listener/UserPreferencesListener.php
+++ b/Listener/UserPreferencesListener.php
@@ -11,6 +11,7 @@
namespace Orkestra\Bundle\ApplicationBundle\Listener;
+use Orkestra\Bundle\ApplicationBundle\Model\UserInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\Event;
@@ -39,7 +40,7 @@ class UserPreferencesListener
if (!empty($token)) {
$user = $token->getUser();
- if ($user instanceof User && ($preferences = $user->getPreferences())) {
+ if ($user instanceof UserInterface && ($preferences = $user->getPreferences())) {
DateTime::setUserTimezone(new \DateTimeZone($preferences->getTimezone()));
$timeFormat = $preferences->getTimeFormat() ? ' ' . $preferences->getTimeFormat() : '';
DateTime::setDefaultFormat($preferences->getDateFormat() . $timeFormat); | UserPreferencesListener now expects a UserInterface instead of an implementation | orkestra_OrkestraApplicationBundle | train | php |
cff8eaab3b224ff1a74fbe5bf36ea59d172a6c7a | diff --git a/src/animation/Animator.js b/src/animation/Animator.js
index <HASH>..<HASH> 100644
--- a/src/animation/Animator.js
+++ b/src/animation/Animator.js
@@ -217,6 +217,11 @@ define(function (require) {
return 'rgba(' + rgba.join(',') + ')';
}
+ function getArrayDim(keyframes) {
+ var lastValue = keyframes[keyframes.length - 1].value;
+ return isArrayLike(lastValue && lastValue[0]) ? 2 : 1;
+ }
+
function createTrackClip (animator, easing, oneTrackDone, keyframes, propName) {
var getter = animator._getter;
var setter = animator._setter;
@@ -233,11 +238,8 @@ define(function (require) {
var isValueString = false;
// For vertices morphing
- var arrDim = (
- isValueArray
- && isArrayLike(firstVal[0])
- )
- ? 2 : 1;
+ var arrDim = isValueArray ? getArrayDim(keyframes) : 0;
+
var trackMaxTime;
// Sort keyframe as ascending
keyframes.sort(function(a, b) { | Fix bug when animating to empty array. | ecomfe_zrender | train | js |
c566ffa43daaef67e682a6f6a230ad5e51437985 | diff --git a/spec/resource_spec.rb b/spec/resource_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/resource_spec.rb
+++ b/spec/resource_spec.rb
@@ -10,6 +10,18 @@ describe GoCardless::Resource do
props.each { |k,v| expect(resource.send(k)).to eq(v) }
end
+ describe "#inspect" do
+ let(:test_resource) do
+ Class.new(GoCardless::Resource) { reference_reader :foo_id }
+ end
+
+ it "shows text" do
+ resource = test_resource.new
+ resource.instance_variable_set(:@foo_id, 123)
+ expect(resource.inspect).to match(/#<#<Class:[a-z0-9]+> foo_id=123>/)
+ end
+ end
+
describe "#date_writer" do
let(:test_resource) do
Class.new(GoCardless::Resource) { date_writer :created_at, :modified_at } | Adds spec for #inspect
Does a simple regex against string given from inspect | gocardless_gocardless-legacy-ruby | train | rb |
48126822da6a80891f15e33db93d649c02ce2f95 | diff --git a/src/main/java/org/dasein/cloud/azure/platform/AzureSqlDatabaseSupport.java b/src/main/java/org/dasein/cloud/azure/platform/AzureSqlDatabaseSupport.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/dasein/cloud/azure/platform/AzureSqlDatabaseSupport.java
+++ b/src/main/java/org/dasein/cloud/azure/platform/AzureSqlDatabaseSupport.java
@@ -45,7 +45,7 @@ public class AzureSqlDatabaseSupport implements RelationalDatabaseSupport {
IpUtils.IpRange ipRange = new IpUtils.IpRange(ruleParts.get(0), ruleParts.get(1));
ServerServiceResourceModel firewallRule = new ServerServiceResourceModel();
- firewallRule.setName(String.format("%s_%s", database.getName(), ipRange.getLow().toDotted()));
+ firewallRule.setName(String.format("%s_%s", database.getName(), new Date().getTime()));
firewallRule.setStartIpAddress(ipRange.getLow().toDotted());
firewallRule.setEndIpAddress(ipRange.getHigh().toDotted()); | Changed the rule name to use current timestamp instead of start IP address | dasein-cloud_dasein-cloud-azure | train | java |
4481eac3fcb503ef9bc70d9efbb87081f774b872 | diff --git a/lib/shelly/version.rb b/lib/shelly/version.rb
index <HASH>..<HASH> 100644
--- a/lib/shelly/version.rb
+++ b/lib/shelly/version.rb
@@ -1,3 +1,3 @@
module Shelly
- VERSION = "0.1.33"
+ VERSION = "0.1.34.pre"
end | Bumped version number to <I>.pre | Ragnarson_shelly | train | rb |
d73419bfa56c3ff8a8070fe94bb970288a55a454 | diff --git a/code/test_png.py b/code/test_png.py
index <HASH>..<HASH> 100644
--- a/code/test_png.py
+++ b/code/test_png.py
@@ -22,6 +22,7 @@ except ImportError:
from StringIO import StringIO as BytesIO
import itertools
import struct
+import sys
# http://www.python.org/doc/2.4.4/lib/module-unittest.html
import unittest
import zlib | import sys so that the warnings about skipping the numpy tests
are seen. | drj11_pypng | train | py |
df91d77b1d17022cb555df81329703656ff78135 | diff --git a/models/css_file.php b/models/css_file.php
index <HASH>..<HASH> 100644
--- a/models/css_file.php
+++ b/models/css_file.php
@@ -47,7 +47,7 @@ class CssFile extends AssetCompressor {
if ($filename == $file) {
return $path . $file;
}
- if (strpos($filename, DS) !== false && file_exists($path . $filename)) {
+ if (strpos($filename, '/') !== false && file_exists($path . str_replace('/', DS, $filename))) {
return $path . $filename;
}
}
diff --git a/models/js_file.php b/models/js_file.php
index <HASH>..<HASH> 100644
--- a/models/js_file.php
+++ b/models/js_file.php
@@ -51,7 +51,7 @@ class JsFile extends AssetCompressor {
if ($filename == $file) {
return $path . $file;
}
- if (strpos($filename, DS) !== false && file_exists($path . $filename)) {
+ if (strpos($filename, '/') !== false && file_exists($path . str_replace('/', DS, $filename))) {
return $path . $filename;
}
} | [FIX] fix for issue #<I> - finding files in subfolders on Windows | markstory_asset_compress | train | php,php |
eda49e08ee19645c467fa2cb16c09200e9dfcb55 | diff --git a/tasks/image.js b/tasks/image.js
index <HASH>..<HASH> 100644
--- a/tasks/image.js
+++ b/tasks/image.js
@@ -16,6 +16,13 @@ module.exports = function (grunt) {
});
async.forEach(this.files, function (file, next) {
+ var basename = path.basename(file.dest);
+ var dir = file.dest.replace(basename, '');
+
+ if (!fs.existsSync(dir)) {
+ fs.mkdirSync(dir);
+ }
+
var optimizer = new Optimizer({
src: file.src[0],
dest: file.dest, | mkdir if dest does not exist | 1000ch_grunt-image | train | js |
cb038cb1d4da2c9dc1c734b8b9add24b32ed9709 | diff --git a/src/main/java/com/thinkaurelius/faunus/formats/titan/FaunusTitanGraph.java b/src/main/java/com/thinkaurelius/faunus/formats/titan/FaunusTitanGraph.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/thinkaurelius/faunus/formats/titan/FaunusTitanGraph.java
+++ b/src/main/java/com/thinkaurelius/faunus/formats/titan/FaunusTitanGraph.java
@@ -39,7 +39,7 @@ public class FaunusTitanGraph extends StandardTitanGraph {
for (final Entry data : entries) {
try {
final FaunusVertexLoader.RelationFactory factory = loader.getFactory();
- super.edgeSerializer.readRelation(factory, data, tx);
+ super.edgeSerializer.readRelation(tx.getExistingVertex(factory.getVertexID()), data);
factory.build();
} catch (Exception e) {
// TODO: log exception | updated Faunus with change in Titans EdgeSerializers API. | thinkaurelius_faunus | train | java |
0ddada8ce69bb0718bccebf3aa49a09c8e1e3f80 | diff --git a/lib/webworker/WebWorkerMainTemplatePlugin.js b/lib/webworker/WebWorkerMainTemplatePlugin.js
index <HASH>..<HASH> 100644
--- a/lib/webworker/WebWorkerMainTemplatePlugin.js
+++ b/lib/webworker/WebWorkerMainTemplatePlugin.js
@@ -45,6 +45,9 @@ class WebWorkerMainTemplatePlugin {
"if(!installedChunks[chunkId]) {",
Template.indent([
"importScripts(" +
+ `"` +
+ mainTemplate.getPublicPath({ hash }) +
+ `" + ` +
mainTemplate.getAssetPath(JSON.stringify(chunkFilename), {
hash: `" + ${mainTemplate.renderCurrentHashCode(hash)} + "`,
hashWithLength: length => | fix: add missing public path in importScripts | webpack_webpack | train | js |
07073f551ba44ece0d35598ca6890a24d0f93b94 | diff --git a/war/src/main/js/widgets/config/tabbar.js b/war/src/main/js/widgets/config/tabbar.js
index <HASH>..<HASH> 100644
--- a/war/src/main/js/widgets/config/tabbar.js
+++ b/war/src/main/js/widgets/config/tabbar.js
@@ -10,8 +10,8 @@ exports.addPageTabs = function(configSelector, onEachConfigTable, options) {
var $ = jQD.getJQuery();
$(function() {
- behaviorShim.specify(".dd-handle", 'config-drag-start', 1000, function() {
- page.fixDragEvent();
+ behaviorShim.specify(".dd-handle", 'config-drag-start', 1000, function(el) {
+ page.fixDragEvent(el);
});
// We need to wait until after radioBlock.js Behaviour.js rules | Applying @kzantow fix for the draggable sections regression
Thanks @kzantow and sorry for missing this!! | jenkinsci_jenkins | train | js |
ae72f9846bc907c91acb40466a200cc061da0ec2 | diff --git a/ui/src/components/drawer/QDrawer.js b/ui/src/components/drawer/QDrawer.js
index <HASH>..<HASH> 100644
--- a/ui/src/components/drawer/QDrawer.js
+++ b/ui/src/components/drawer/QDrawer.js
@@ -672,7 +672,9 @@ export default Vue.extend({
class: this.classes,
style: this.style,
on: this.onNativeEvents,
- directives: this.contentCloseDirective
+ directives: this.belowBreakpoint === true
+ ? this.contentCloseDirective
+ : void 0
}, content)
) | fix(QDrawer): put content directives under flag | quasarframework_quasar | train | js |
0a65df5412d006fbe7cc097a5693084c1bcc02f2 | diff --git a/lib/less/parser.js b/lib/less/parser.js
index <HASH>..<HASH> 100644
--- a/lib/less/parser.js
+++ b/lib/less/parser.js
@@ -691,7 +691,7 @@ less.Parser = function Parser(env) {
var value, c = input.charCodeAt(i);
if ((c > 57 || c < 45) || c === 47) return;
- if (value = $(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn|dpi|dpcm|dppx|rem|vw|vh|vm|vmin|ch)?/)) {
+ if (value = $(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn|dpi|dpcm|dppx|rem|vw|vh|vmin|vm|ch)?/)) {
return new(tree.Dimension)(value[1], value[2]);
}
}, | Derp, set vmin before vm | less_less.js | train | js |
381947cf7f4068127e8b4805aed247b6998e2c6d | diff --git a/lib/vaulted_billing/gateways/ipcommerce.rb b/lib/vaulted_billing/gateways/ipcommerce.rb
index <HASH>..<HASH> 100644
--- a/lib/vaulted_billing/gateways/ipcommerce.rb
+++ b/lib/vaulted_billing/gateways/ipcommerce.rb
@@ -59,8 +59,10 @@ module VaultedBilling
end
def renew!
+ response = http.get
+ raise(UnavailableKeyError, 'Unable to renew service keys.') unless response.success?
@expires_at = Time.now + 30.minutes
- @key = http.get.body.try(:[], 1...-1)
+ @key = response.body.try(:[], 1...-1)
end
private
diff --git a/lib/vaulted_billing/http.rb b/lib/vaulted_billing/http.rb
index <HASH>..<HASH> 100644
--- a/lib/vaulted_billing/http.rb
+++ b/lib/vaulted_billing/http.rb
@@ -1,4 +1,5 @@
require 'uri'
+require 'net/http'
module VaultedBilling
class HTTP | Updated error catching for session tokens. | envylabs_vaulted_billing | train | rb,rb |
b966716bb410a0aa739325f3ee2dd0a38ce20650 | diff --git a/src/db/src/Entity/Mysql/Schema.php b/src/db/src/Entity/Mysql/Schema.php
index <HASH>..<HASH> 100644
--- a/src/db/src/Entity/Mysql/Schema.php
+++ b/src/db/src/Entity/Mysql/Schema.php
@@ -32,7 +32,7 @@ class Schema extends \Swoft\Db\Entity\Schema
'datetime' => 'Types::DATETIME',
'float' => 'Types::FLOAT',
'number' => 'Types::NUMBER',
- 'decimal' => 'Types::NUMBER',
+ 'decimal' => 'Types::FLOAT',
'bool' => 'Types::BOOLEAN',
'tinyint' => 'Types::INT',
];
@@ -48,7 +48,7 @@ class Schema extends \Swoft\Db\Entity\Schema
'datetime' => self::TYPE_STRING,
'float' => self::TYPE_FLOAT,
'number' => self::TYPE_INT,
- 'decimal' => self::TYPE_INT,
+ 'decimal' => self::TYPE_FLOAT,
'bool' => self::TYPE_BOOL,
'tinyint' => self::TYPE_INT
]; | change decimal type to FLOAT | swoft-cloud_swoft-http-message | train | php |
c48f4d7eaa08688abae92655b19d15edeb86b79b | diff --git a/gromacs/analysis/plugins/__init__.py b/gromacs/analysis/plugins/__init__.py
index <HASH>..<HASH> 100644
--- a/gromacs/analysis/plugins/__init__.py
+++ b/gromacs/analysis/plugins/__init__.py
@@ -144,7 +144,6 @@ __plugin_classes__ = {p: M.__dict__[p] for p,M in _modules.items()}
# 3. add to the name space (bind classes to names)
globals().update(__plugin_classes__)
-del p, M
del _modules | fixed a NameError in plugins/__init__
After a QC code fix, the variables p and M were not leaking any more so
they do not need to be delete. | Becksteinlab_GromacsWrapper | train | py |
7f58fcde84f8e2511b0942f40249c901dce325f9 | diff --git a/closure/goog/ui/container.js b/closure/goog/ui/container.js
index <HASH>..<HASH> 100644
--- a/closure/goog/ui/container.js
+++ b/closure/goog/ui/container.js
@@ -364,7 +364,6 @@ goog.ui.Container.prototype.enterDocument = function() {
}
}, this);
- // Detect right-to-left direction.
var elem = this.getElement();
// Call the renderer's initializeDom method to initialize the container's DOM. | Removed old comment that is no longer valid.
R=eae
DELTA=1 (0 added, 1 deleted, 0 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=<I>
git-svn-id: <URL> | google_closure-library | train | js |
1a2824e5ef7547efdeb4f1ca24192c275809917b | diff --git a/lib/robot.js b/lib/robot.js
index <HASH>..<HASH> 100644
--- a/lib/robot.js
+++ b/lib/robot.js
@@ -26,6 +26,7 @@ function Robot(name, serial, secret, token) {
this.spotWidth = null;
this.spotHeight = null;
this.spotRepeat = null;
+ this.cleaningBoundaryId = null;
}
Robot.prototype.getState = function getState(callback) {
@@ -71,6 +72,7 @@ Robot.prototype.getState = function getState(callback) {
this.spotWidth = result.cleaning.spotWidth;
this.spotHeight = result.cleaning.spotHeight;
this.spotRepeat = result.cleaning.modifier == 2 ? true : false;
+ this.cleaningBoundaryId = result.cleaning.boundaryId;
callback(error, result);
}
}
@@ -371,7 +373,7 @@ Robot.prototype.startCleaningBoundary = function startSpotCleaning(eco, extraCar
* @param {getPersistentMapsCallback} callback - A callback called on receiving the maps or an error
*/
Robot.prototype.getPersistentMaps = function getPersistentMaps(callback) {
- robotRequest(robot, 'beehive', 'GET', '/persistent_maps', null, callback);
+ robotRequest(this, 'beehive', 'GET', '/persistent_maps', null, callback);
}
/** | fix typo and add boundary id in status | Pmant_node-botvac | train | js |
86acc672862bfd5999314a62bc2a9aac620fa3c5 | diff --git a/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestCatalog.java b/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestCatalog.java
index <HASH>..<HASH> 100644
--- a/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestCatalog.java
+++ b/profiles/killbill/src/test/java/org/killbill/billing/jaxrs/TestCatalog.java
@@ -106,7 +106,7 @@ public class TestCatalog extends TestJaxrsBase {
Assert.assertEquals(catalogsJson.get(0).getName(), "Firearms");
Assert.assertEquals(catalogsJson.get(0).getEffectiveDate(), Date.valueOf("2011-01-01"));
Assert.assertEquals(catalogsJson.get(0).getCurrencies().size(), 3);
- Assert.assertEquals(catalogsJson.get(0).getProducts().size(), 12);
+ Assert.assertEquals(catalogsJson.get(0).getProducts().size(), 13);
Assert.assertEquals(catalogsJson.get(0).getPriceLists().size(), 7);
for (final Product productJson : catalogsJson.get(0).getProducts()) { | server: fix test failure after catalog change | killbill_killbill | train | java |
20902d664c3916c4305887cb99666d31dffb7bf4 | diff --git a/ui/src/store/configureStore.js b/ui/src/store/configureStore.js
index <HASH>..<HASH> 100644
--- a/ui/src/store/configureStore.js
+++ b/ui/src/store/configureStore.js
@@ -12,12 +12,12 @@ import dashboardUI from 'src/dashboards/reducers/ui'
import persistStateEnhancer from './persistStateEnhancer'
const rootReducer = combineReducers({
- routing: routerReducer,
...sharedReducers,
...dataExplorerReducers,
admin: adminReducer,
rules: rulesReducer,
dashboardUI,
+ routing: routerReducer,
})
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose | Move routing reducer last in redux store | influxdata_influxdb | train | js |
aeae35ec5ef59bea3121273b580454e2fa7365da | diff --git a/lib/wsoc/specs.rb b/lib/wsoc/specs.rb
index <HASH>..<HASH> 100644
--- a/lib/wsoc/specs.rb
+++ b/lib/wsoc/specs.rb
@@ -31,20 +31,19 @@ module WSOC
end
def Specs.map(host,port=nil)
+ url = URI::HTTP.build(:host => host, :port => port)
+
Specs.all.map do |spec|
- link = URI::HTTP.build(
- :host => host,
- :port => port,
- :path => spec[:link]
- ).to_s
-
- url = URI::HTTP.build(
- :host => host,
- :port => port,
- :path => spec[:url]
- ).to_s
-
- spec.merge(:link => link, :url => url)
+ source = url.clone
+ source.path = spec[:source]
+
+ dest = source.merge(URI.encode(spec[:dest]))
+
+ if dest.path
+ dest.path = URI.expand_path(dest.path)
+ end
+
+ spec.merge(:source => source.to_s, :dest => dest.to_s)
end
end
end | Changed Specs to store the source -> dest path pairs.
* Specs.map will now map the source, dest paths to their absolute URI
forms. | postmodern_wsoc | train | rb |
423cd03ccabbf2d400d0e0c7ec5dcad86c0e8872 | diff --git a/api/functions/ticker.js b/api/functions/ticker.js
index <HASH>..<HASH> 100644
--- a/api/functions/ticker.js
+++ b/api/functions/ticker.js
@@ -35,7 +35,7 @@ function tickerGenerator() {
.then(() => phase4(ticker))
.then(() => {
return {
- 'v1/ticker.json': JSON.stringify(ticker, null, 2)
+ 'v1/ticker.json': JSON.stringify(ticker)
};
}) | Use unindented JSON for ticker | stellarterm_stellarterm | train | js |
3b916445cefaebab0de1e2df56e46adad5429fc7 | diff --git a/src/Charcoal/Property/ObjectProperty.php b/src/Charcoal/Property/ObjectProperty.php
index <HASH>..<HASH> 100644
--- a/src/Charcoal/Property/ObjectProperty.php
+++ b/src/Charcoal/Property/ObjectProperty.php
@@ -179,11 +179,6 @@ class ObjectProperty extends AbstractProperty implements SelectablePropertyInter
$loader = $this->collectionLoader;
$loader->setModel($proto);
- /** @todo Remove this condition in favor of end-developer defining this condition in property definition. */
- if ($proto->hasProperty('active')) {
- $loader->addFilter('active', true);
- }
-
return $loader;
} | Do not force active on object property's collection loader. | locomotivemtl_charcoal-property | train | php |
b2ffdbeb0607f6b47e53d0373fe4b1acf09e92d9 | diff --git a/commands/info.js b/commands/info.js
index <HASH>..<HASH> 100644
--- a/commands/info.js
+++ b/commands/info.js
@@ -45,8 +45,8 @@ function formatInfo (cluster) {
})
}
- // we hide __consumer_offsets; don't count it
- const topicCount = Math.max(cluster.cluster.topics.length - 1, 0)
+ // we hide __consumer_offsets in topic listing; don't count it
+ const topicCount = cluster.cluster.topics.filter((topic) => topic !== '__consumer_offsets').length
lines.push({
name: 'Topics',
values: [`${topicCount} ${humanize.pluralize(topicCount, 'topic')}, see heroku kafka:topics`] | Explicitly ignore __consumer_offsets, don't just adjust total count
The previous approach could lead to under-counting if
__consumer_offsets is not returned from the API for whatever reason. | heroku_heroku-kafka-jsplugin | train | js |
4ff377852c0219ade2366afd6e5c6a89a5e4f4b2 | diff --git a/src/SectionField/Api/Controller/RestInfoController.php b/src/SectionField/Api/Controller/RestInfoController.php
index <HASH>..<HASH> 100644
--- a/src/SectionField/Api/Controller/RestInfoController.php
+++ b/src/SectionField/Api/Controller/RestInfoController.php
@@ -162,7 +162,12 @@ class RestInfoController extends RestController implements RestControllerInterfa
} else {
$method = 'get' . ucfirst($this->handleToPropertyName($fieldHandle, $fieldProperties));
}
- $value = (string) $entry->$method();
+ $data = $entry->$method();
+ if ($data instanceof \DateTime) {
+ $value = $data->format('Y-m-d H:i:s');
+ } else {
+ $value = (string) $data;
+ }
} catch (\Exception $exception) {
//
} | Make sure the rest info controller field mapping is handling datetime objects properly | dionsnoeijen_sexy-field-api | train | php |
cc337ff318fb23093b91cb4873316023bc4ced57 | diff --git a/Query/Builder.php b/Query/Builder.php
index <HASH>..<HASH> 100755
--- a/Query/Builder.php
+++ b/Query/Builder.php
@@ -1410,6 +1410,16 @@ class Builder
*/
public function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id')
{
+
+ // avoid duplicate orders
+ if ($this->orders !== null) {
+ foreach ($this->orders as $key => $order) {
+ if ($order['column'] == $column) {
+ unset($this->orders[$key]);
+ }
+ }
+ }
+
return $this->where($column, '>', $lastId)
->orderBy($column, 'asc')
->take($perPage); | Avoid chunkById to duplicate orders clause with the same column | illuminate_database | train | php |
d234b8ddba41a17928520f5a70a017bc1d7d8372 | diff --git a/contrib/multiple_databases_repository_sample_app/payments/lib/payments/application_record.rb b/contrib/multiple_databases_repository_sample_app/payments/lib/payments/application_record.rb
index <HASH>..<HASH> 100644
--- a/contrib/multiple_databases_repository_sample_app/payments/lib/payments/application_record.rb
+++ b/contrib/multiple_databases_repository_sample_app/payments/lib/payments/application_record.rb
@@ -1,3 +1,5 @@
+require 'active_record'
+
module Payments
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true | Missing require
Needed to run test in scope of the single BC | RailsEventStore_rails_event_store | train | rb |
7e1c8b1593294303ecce5c078aaf62f89b444bf4 | diff --git a/test/test_helper.py b/test/test_helper.py
index <HASH>..<HASH> 100644
--- a/test/test_helper.py
+++ b/test/test_helper.py
@@ -12,6 +12,7 @@ import time
import traceback
import unittest
from six import with_metaclass
+import psutil
ENV_VAR_LONG_RUNNING_TESTS_ENABLE = "ENABLE_LONG_RUNNING_TESTS"
XVFB_DEFAULT_DISPLAY = ":42"
@@ -155,12 +156,15 @@ class TestHelper(object):
@staticmethod
def _terminateByUsingPid(process):
starterPid = process.pid
- if subprocess.call("kill -INT %d" % starterPid, shell=True) == 0:
- try:
- Poller(5).check(SubprocessTerminated(process, "<no name>"))
- return
- except Exception:
- pass
+# if subprocess.call("kill -INT %d" % starterPid, shell=True) == 0:
+# try:
+# Poller(5).check(SubprocessTerminated(process, "<no name>"))
+# return
+# except Exception:
+# pass
+ p = psutil.Process(starterPid)
+ p.kill()
+ p.wait(timeout=10)
@staticmethod
def dumpFileToStdout(filePath): | killing integration test with psutil | lbusoni_plico | train | py |
313f93c8c4ec073158317473dfbfb2aff29b1d65 | diff --git a/guava-tests/benchmark/com/google/common/base/StopwatchBenchmark.java b/guava-tests/benchmark/com/google/common/base/StopwatchBenchmark.java
index <HASH>..<HASH> 100644
--- a/guava-tests/benchmark/com/google/common/base/StopwatchBenchmark.java
+++ b/guava-tests/benchmark/com/google/common/base/StopwatchBenchmark.java
@@ -35,7 +35,7 @@ public class StopwatchBenchmark extends SimpleBenchmark {
for (int i = 0; i < reps; i++) {
Stopwatch s = new Stopwatch().start();
// here is where you would do something
- total += s.elapsedTime(TimeUnit.NANOSECONDS);
+ total += s.elapsed(TimeUnit.NANOSECONDS);
}
return total;
} | Fix calls to deprecated Stopwatch.elapsedTime(TimeUnit) by inlining that method's implementation ("elapsed(TimeUnit)").
-------------
Created by MOE: <URL> | google_guava | train | java |
08ed201a26490f9fdca4b35f4039188519ca4ee1 | diff --git a/header.js b/header.js
index <HASH>..<HASH> 100644
--- a/header.js
+++ b/header.js
@@ -84,7 +84,7 @@ BlockHeader.prototype.canonicalDifficulty = function (parentBlock) {
}
}
- var exp = new BN(this.number).divn(100000).sub(new BN(2))
+ var exp = new BN(this.number).divn(100000).subn(2)
if (!exp.isNeg()) {
dif.iadd(new BN(2).pow(exp))
} | Use BN.subn for speed | ethereumjs_ethereumjs-block | train | js |
6407c508ef9a7926edc4110fae24b87d7b382367 | diff --git a/src/Elasticsearch/Framework/Indexing/EntityMapper.php b/src/Elasticsearch/Framework/Indexing/EntityMapper.php
index <HASH>..<HASH> 100644
--- a/src/Elasticsearch/Framework/Indexing/EntityMapper.php
+++ b/src/Elasticsearch/Framework/Indexing/EntityMapper.php
@@ -130,7 +130,7 @@ class EntityMapper
case $field instanceof LongTextField:
case $field instanceof LongTextWithHtmlField:
- return ['type' => 'text'];
+ return $this->createLongTextField();
case $field instanceof TranslatedField:
$reference = EntityDefinitionQueryHelper::getTranslatedField($definition, $field);
@@ -142,8 +142,9 @@ class EntityMapper
case $field instanceof DateField:
return self::DATE_FIELD;
- case $field instanceof PasswordField:
case $field instanceof StringField:
+ return $this->createStringField();
+ case $field instanceof PasswordField:
case $field instanceof FkField:
case $field instanceof IdField:
case $field instanceof VersionField:
@@ -188,4 +189,14 @@ class EntityMapper
return $properties;
}
+
+ protected function createStringField(): array
+ {
+ return self::KEYWORD_FIELD;
+ }
+
+ protected function createLongTextField(): array
+ {
+ return ['type' => 'text'];
+ }
} | NTR - extract fields for better custom analyzer support | shopware_platform | train | php |
70f88f766af3826d3d793401316716f9c61f8d62 | diff --git a/src/kit/app/SurfaceManager.js b/src/kit/app/SurfaceManager.js
index <HASH>..<HASH> 100644
--- a/src/kit/app/SurfaceManager.js
+++ b/src/kit/app/SurfaceManager.js
@@ -7,7 +7,7 @@ export default class SurfaceManager {
this.editorState = editorState
this.surfaces = new Map()
- editorState.addObserver(['selection', 'document'], this._onSelectionOrDocumentChange, this, { stage: 'post-render' })
+ editorState.addObserver(['selection', 'document'], this._onSelectionOrDocumentChange, this, { stage: 'pre-position' })
editorState.addObserver(['selection', 'document'], this._scrollSelectionIntoView, this, { stage: 'finalize' })
} | Recover selection in the pre-position stage.
Note: the DOM selection is needed for positioning overlays. | substance_texture | train | js |
4fb31b0fc8ac55b828a6a780c60443a1b3bdf90c | diff --git a/src/Enhavo/Bundle/AppBundle/Form/Type/ListType.php b/src/Enhavo/Bundle/AppBundle/Form/Type/ListType.php
index <HASH>..<HASH> 100644
--- a/src/Enhavo/Bundle/AppBundle/Form/Type/ListType.php
+++ b/src/Enhavo/Bundle/AppBundle/Form/Type/ListType.php
@@ -120,7 +120,7 @@ class ListType extends AbstractType
));
$resolver->setNormalizer('prototype_name', function(Options $options, $value) {
- return '__' . $options['type'] . '__';
+ return '__' . uniqid() . '__';
});
}
}
\ No newline at end of file | Fixed form errors with nested lists | enhavo_enhavo | train | php |
cb607ee4b78f58799cf5dacd34e0bcbafe999feb | diff --git a/genson/schema/generators/scalar.py b/genson/schema/generators/scalar.py
index <HASH>..<HASH> 100644
--- a/genson/schema/generators/scalar.py
+++ b/genson/schema/generators/scalar.py
@@ -50,7 +50,7 @@ class Number(SchemaGenerator):
"""
if sys.version_info < (3,):
JS_TYPES = ('integer', 'number', 'integer')
- PYTHON_TYPES = (int, float, long)
+ PYTHON_TYPES = (int, float, long) # noqa
else:
JS_TYPES = ('integer', 'number')
PYTHON_TYPES = (int, float)
diff --git a/test/test_gen_single.py b/test/test_gen_single.py
index <HASH>..<HASH> 100644
--- a/test/test_gen_single.py
+++ b/test/test_gen_single.py
@@ -16,7 +16,7 @@ class TestBasicTypes(base.SchemaNodeTestCase):
@base.only_for_python_version('<3')
def test_long(self):
- self.add_object(long(1))
+ self.add_object(long(1)) # noqa
self.assertResult({"type": "integer"})
def test_number(self): | fix lint issues with 'long' | wolverdude_GenSON | train | py,py |
55c31594f029abb0443558d83f365daba36986cb | diff --git a/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/Score.java b/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/Score.java
index <HASH>..<HASH> 100644
--- a/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/Score.java
+++ b/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/Score.java
@@ -9,6 +9,8 @@ public class Score {
private String source;
private String description;
+ public Score() {}
+
public Score(Double score, String source) {
this.score = score;
this.source = source; | feature/<I>.x: empty constructor created at Score.java | opencb_biodata | train | java |
c7da98a0d84ea31a3c4b960d53e64fec9fd5d10a | diff --git a/scout/server/blueprints/cases/controllers.py b/scout/server/blueprints/cases/controllers.py
index <HASH>..<HASH> 100644
--- a/scout/server/blueprints/cases/controllers.py
+++ b/scout/server/blueprints/cases/controllers.py
@@ -242,6 +242,7 @@ def get_sanger_unevaluated(store, institute_id):
# for each object where key==case and value==[variant_id with Sanger ordered]
for item in sanger_ordered_by_case:
case_id = item['_id'] #it's actually a case display_name and not a case _id that is saved in the event_ collection
+ print("####### CASE ID IS -------------->"+str(case_id))
case_obj = store.case(case_id=case_id)
case_display_name = case_obj.get('display_name')
#print("case object is:"+str(case_obj)) | printing a loine for debugging | Clinical-Genomics_scout | train | py |
1fc01fcd1f276c13d7714224914afdc8b2a17e27 | diff --git a/src/Symfony/Component/Translation/Loader/ResourceBundleLoader.php b/src/Symfony/Component/Translation/Loader/ResourceBundleLoader.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Translation/Loader/ResourceBundleLoader.php
+++ b/src/Symfony/Component/Translation/Loader/ResourceBundleLoader.php
@@ -30,7 +30,7 @@ class ResourceBundleLoader implements LoaderInterface
$rb = new \ResourceBundle($locale, $resource);
if (!$rb) {
- throw new \RuntimeException("cannot load this resource : $rb");
+ throw new \RuntimeException("cannot load this resource : $resource");
} elseif (intl_is_failure($rb->getErrorCode())) {
throw new \RuntimeException($rb->getErrorMessage(), $rb->getErrorCode());
} | [Translation] typo in ResourceBundleLoader | symfony_symfony | train | php |
49d9a13522aef8ca7c21ba0a9a247bdb07af06de | diff --git a/lib/Stage.js b/lib/Stage.js
index <HASH>..<HASH> 100644
--- a/lib/Stage.js
+++ b/lib/Stage.js
@@ -104,7 +104,7 @@ module.exports = function(S) {
}
static validateStage(stageName) {
- return /^[a-zA-Z\d]+$/.test(stageName);
+ return /^[a-zA-Z0-9]+$/.test(stageName);
}
}
diff --git a/lib/actions/StageCreate.js b/lib/actions/StageCreate.js
index <HASH>..<HASH> 100644
--- a/lib/actions/StageCreate.js
+++ b/lib/actions/StageCreate.js
@@ -120,7 +120,7 @@ usage: serverless stage create`,
description: 'Enter a new stage name for this project: '.yellow,
default: 'dev',
required: true,
- message: 'Stage must be letters and numbers only',
+ message: 'Stage must be letters only',
conform: function(stage) {
return S.classes.Stage.validateStage(stage);
} | StageCreate: allow for numbers in stage name | serverless_serverless | train | js,js |
cec5bf36c6e45603cbf06d378d71507a65d76d5f | diff --git a/ella/ellaexports/views.py b/ella/ellaexports/views.py
index <HASH>..<HASH> 100644
--- a/ella/ellaexports/views.py
+++ b/ella/ellaexports/views.py
@@ -3,6 +3,7 @@ from datetime import datetime
from django.http import Http404
from django.conf import settings
from django.template.defaultfilters import slugify
+from django.template import RequestContext
from django.utils.translation import ugettext as _
from ella.core.models import Listing, Category, Placement
@@ -117,6 +118,14 @@ class MrssExport(EllaCoreView):
})
return context
+ def render(self, request, context, template):
+ return render_to_response(
+ template,
+ context,
+ context_instance=RequestContext(request),
+ content_type='application/xml'
+ )
+
#def __call__(self, *args, **kwargs):
# super(MrssExport, self).__call__(*args, **kwargs) | Content-type header changed to application/xml in ellaexports.views | ella_ella | train | py |
98811e421ad50f7b38c87662dffd01810058d7b4 | diff --git a/imdct_test.go b/imdct_test.go
index <HASH>..<HASH> 100644
--- a/imdct_test.go
+++ b/imdct_test.go
@@ -23,6 +23,7 @@ func imdctSlow(in []float32) []float32 {
}
func TestIMDCT(t *testing.T) {
+ //rand.Seed(0)
const blocksize = 256
data := make([]float32, blocksize/2)
for i := range data {
@@ -37,7 +38,7 @@ func TestIMDCT(t *testing.T) {
imdct(&lookup, data, result)
for i := range result {
- if !equalRel(result[i], reference[i], 1.002) {
+ if !equalAbs(result[i], reference[i], 1.002) {
t.Errorf("different values at index %d (%g != %g)", i, result[i], reference[i])
break
}
@@ -70,3 +71,7 @@ func BenchmarkIMDCT(b *testing.B) {
func equalRel(a, b, tolerance float32) bool {
return (a > b && a/b < tolerance) || b/a < tolerance
}
+
+func equalAbs(a, b, tolerance float32) bool {
+ return a-b < tolerance && b-a < tolerance
+} | Fix imdct test
This test was apparently only passing because of the specific random values generated.
I've decided to look at the absolute error instead of relative, because the relative error seems to vary a lot more.
The threshold happens to be the same.
fixes #8 | jfreymuth_vorbis | train | go |
4549233f4cbee80ee5327a31f2e45bb3dd06c9c0 | diff --git a/server.go b/server.go
index <HASH>..<HASH> 100644
--- a/server.go
+++ b/server.go
@@ -254,6 +254,8 @@ func (s *server) serve() {
if msg.to != All { // if it's not suppose to send to all connections (including itself)
if msg.to == NotMe && msg.from == connID { // if broadcast to other connections except this
continue //here we do the opossite of previous block, just skip this connection when it's suppose to send the message to all connections except the sender
+ } else if msg.to != connID { //it's not suppose to send to every one but to the one we'd like to
+ continue
}
}
select { | issue fix. when msg.to or room is not exist, it would broadcast the native message | kataras_go-websocket | train | go |
a7b560d95094234b3e4a2a23ccadad266566c54e | diff --git a/testing/listener.go b/testing/listener.go
index <HASH>..<HASH> 100644
--- a/testing/listener.go
+++ b/testing/listener.go
@@ -161,8 +161,11 @@ func (tl *TestListener) forward() {
if c, ok := tl.historyInterest[workflow]; ok {
tl.testAdapter.Logf("TestListener: yes historyInterest for workflow %s", workflow)
for i := len(do.DecisionTask.Events) - 1; i >= 0; i-- {
- tl.testAdapter.Logf("TestListener: yes historyInterest for workflow %s %s", workflow, *do.DecisionTask.Events[i].EventType)
- c <- do.DecisionTask.Events[i]
+ event := do.DecisionTask.Events[i]
+ if *event.EventID > *do.DecisionTask.PreviousStartedEventID {
+ tl.testAdapter.Logf("TestListener: yes historyInterest for workflow %s %s", workflow, *do.DecisionTask.Events[i].EventType)
+ c <- do.DecisionTask.Events[i]
+ }
}
} else {
tl.testAdapter.Logf("TestListener: no historyInterest for workflow %s", workflow) | only send events after prevStarted | sclasen_swfsm | train | go |
307b36fc913c7340aff460b8ceb7425e3c7304d0 | diff --git a/flask_jwt_extended/utils.py b/flask_jwt_extended/utils.py
index <HASH>..<HASH> 100644
--- a/flask_jwt_extended/utils.py
+++ b/flask_jwt_extended/utils.py
@@ -455,4 +455,19 @@ def unset_jwt_cookies(response):
secure=get_cookie_secure(),
httponly=True,
path=get_access_cookie_path())
+
+ if get_cookie_csrf_protect():
+ response.set_cookie(get_refresh_csrf_cookie_name(),
+ value='',
+ expires=0,
+ secure=get_cookie_secure(),
+ httponly=False,
+ path='/')
+ response.set_cookie(get_access_csrf_cookie_name(),
+ value='',
+ expires=0,
+ secure=get_cookie_secure(),
+ httponly=False,
+ path='/')
+
return response | unset_jwt_cookies now removes csrf tokesn too
Practically, there isn't any security concerns by leaving them set. We
don't do any verification on these cookies when they are sent to a
protected endpoint, and if we generated new tokens the values in those
cookies would be updated. This is just to make sure we are cleaning up
after ourselfs (refs #<I>) | vimalloc_flask-jwt-extended | train | py |
5399218f05bfd488952166a26c61be064f99f874 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -23,5 +23,13 @@ setup(
# packages=['simpycity','test'],
include_package_data=True,
zip_safe=False,
+ classifiers=[
+ "Development Status :: 4 - Beta",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
+ "Operating System :: MacOS X",
+ "Operating System :: Unix",
+ "Topic :: Software Development :: Databases",
+ ],
) | Adding the classifiers information to the setup.py. | commandprompt_Simpycity | train | py |
89fa96e268a43723fa3ba9063f2f0e3ca77f53a2 | diff --git a/gandi/cli/commands/vm.py b/gandi/cli/commands/vm.py
index <HASH>..<HASH> 100644
--- a/gandi/cli/commands/vm.py
+++ b/gandi/cli/commands/vm.py
@@ -141,11 +141,12 @@ def delete(gandi, background, force, resource):
output_keys = ['id', 'type', 'step']
- iaas_list = [ vm['hostname'] for vm in gandi.iaas.list() ]
+ iaas_list = gandi.iaas.list()
+ iaas_namelist = [ vm['hostname'] for vm in iaas_list ]
for item in resource:
- if item not in iaas_list:
+ if item not in iaas_namelist:
print 'Sorry virtual machine %s does not exist' % item
- print 'Please use one of the following: %s', iaas_list
+ print 'Please use one of the following: %s', iaas_namelist
return
if not force:
@@ -158,7 +159,8 @@ def delete(gandi, background, force, resource):
stop_opers = []
for item in resource:
- vm = gandi.iaas.info(item)
+ vm = next((vm for (index, vm) in enumerate(iaas_list)
+ if vm['hostname'] == item), None)
if vm['state'] == 'running':
oper = gandi.iaas.stop(item, background)
if not background: | vm: remove info on each item since we alreay have the info in list | Gandi_gandi.cli | train | py |
fae56b8a63fd4af18a8ef39af860692e33039f60 | diff --git a/src/main/java/com/coreoz/wisp/Scheduler.java b/src/main/java/com/coreoz/wisp/Scheduler.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/coreoz/wisp/Scheduler.java
+++ b/src/main/java/com/coreoz/wisp/Scheduler.java
@@ -109,8 +109,8 @@ public final class Scheduler {
this.cancelHandles = new ConcurrentHashMap<>();
Executors.newCachedThreadPool(new WispThreadFactory());
this.threadPoolExecutor = new ScalingThreadPoolExecutor(
- config.getMinThreads(),
// +1 is to include the job launcher thread
+ config.getMinThreads() + 1,
config.getMaxThreads() + 1,
config.getThreadsKeepAliveTime().toMillis(),
TimeUnit.MILLISECONDS, | Min threads should take account of the scheduler thread | Coreoz_Wisp | train | java |
6ec64704e2e4ce97d3e8177d96061fe577c96565 | diff --git a/upup/pkg/fi/cloudup/awstasks/launchconfiguration.go b/upup/pkg/fi/cloudup/awstasks/launchconfiguration.go
index <HASH>..<HASH> 100644
--- a/upup/pkg/fi/cloudup/awstasks/launchconfiguration.go
+++ b/upup/pkg/fi/cloudup/awstasks/launchconfiguration.go
@@ -50,7 +50,7 @@ type LaunchConfiguration struct {
// RootVolumeType is the type of the EBS root volume to use (e.g. gp2)
RootVolumeType *string
// RootVolumeOptimization enables EBS optimization for an instance
- RootVolumeOptimization *bool `json:"rootVolumeOptimization,omitempty"`
+ RootVolumeOptimization *bool
// SpotPrice is set to the spot-price bid if this is a spot pricing request
SpotPrice string | Remove unnecessary json tag on field | kubernetes_kops | train | go |
417bce32329bdd93cfcd4ac282d14e43a2314fab | diff --git a/example/examplesite/settings/base.py b/example/examplesite/settings/base.py
index <HASH>..<HASH> 100644
--- a/example/examplesite/settings/base.py
+++ b/example/examplesite/settings/base.py
@@ -158,3 +158,4 @@ WAGTAIL_SITE_NAME = "examplesite"
BASE_URL = 'http://example.com'
GOOGLE_MAPS_V3_APIKEY = get_env('GOOGLE_MAPS_V3_APIKEY')
+GEO_WIDGET_ZOOM = 15 | Add zoom level to example to test setting | Frojd_wagtail-geo-widget | train | py |
562e025e48be8c4d51af2682bae7d9fcbe63df2b | diff --git a/generators/app/index.js b/generators/app/index.js
index <HASH>..<HASH> 100644
--- a/generators/app/index.js
+++ b/generators/app/index.js
@@ -40,7 +40,7 @@ module.exports = fountain.Base.extend({
if (this.options.js === 'typescript') {
Object.assign(pkg.devDependencies, {
- 'ts-loader': '^0.7.2'
+ 'ts-loader': '^0.8.2'
});
}
diff --git a/test/app/index.js b/test/app/index.js
index <HASH>..<HASH> 100644
--- a/test/app/index.js
+++ b/test/app/index.js
@@ -59,7 +59,7 @@ test('Configuring package.json with angular1/babel/css', t => {
test('Configuring package.json with angular2/typescript/css', t => {
const expected = _.merge({}, pkg, {
devDependencies: {
- 'ts-loader': '^0.7.2',
+ 'ts-loader': '^0.8.2',
'html-loader': '^0.4.3'
}
}); | Upgrade ts-loader to <I>
Fix : on files changes, the webpack watcher serve the version n-1.
Now : when we change a file, webpack outputs the current version of the code | FountainJS_generator-fountain-webpack | train | js,js |
8b486dc38f208c7bd1864366aa50b4d50cdd1e2f | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -134,6 +134,13 @@ module.exports = function (token) {
self.callApi(path, params, 'POST', callback);
};
+ /** datapoints: Array of Objects containing the same keys as for `createDatapoint`
+ */
+ this.createDatapoints = function (slug, datapoints, callback) {
+ var path = '/users/me/goals/'+slug+'/datapoints/create_all.json';
+ self.callApi(path, {datapoints: JSON.stringify(datapoints)}, 'POST', callback);
+ };
+
/** params = {
* value: {type: Number, required: true},
* timestamp: {type: Number, default: now}, | Add "Create multiple datapoints" endpoint | malcolmocean_beeminderjs | train | js |
abf9861b8141f8a7d8d8996382ede09ca9a0cc3d | diff --git a/furious/tests/test_processors.py b/furious/tests/test_processors.py
index <HASH>..<HASH> 100644
--- a/furious/tests/test_processors.py
+++ b/furious/tests/test_processors.py
@@ -233,8 +233,11 @@ class TestRunJob(unittest.TestCase):
self.assertFalse(mock_success.called)
self.assertFalse(mock_error.called)
+ @patch('logging.error', autospec=True)
+ @patch('logging.info', autospec=True)
+ @patch('furious.async.Async.start', autospec=True)
@patch('__builtin__.dir')
- def test_Abort(self, dir_mock):
+ def test_Abort(self, dir_mock, mock_start, log_info, log_error):
"""Ensures that when Abort is raised, the Async immediately stops."""
from furious.async import Abort
from furious.async import Async
@@ -255,6 +258,9 @@ class TestRunJob(unittest.TestCase):
self.assertFalse(mock_success.called)
self.assertFalse(mock_error.called)
+ self.assertFalse(mock_start.called)
+ self.assertTrue(log_info.called)
+ self.assertFalse(log_error.called)
def _fake_async_returning_target(async_to_return): | In test_Abort, add checks on logging and start
In the test_Abort test, I added a check to ensure that Async.start() is
not called. Also, I added checks on logging.info() and logging.error()
to ensure that info is called and error is not. | Workiva_furious | train | py |
b33910cd3b116c0746f8e1290f7ee9188d9a7b19 | diff --git a/keyring/backends/_OS_X_API.py b/keyring/backends/_OS_X_API.py
index <HASH>..<HASH> 100644
--- a/keyring/backends/_OS_X_API.py
+++ b/keyring/backends/_OS_X_API.py
@@ -20,12 +20,29 @@ SecKeychainOpen.argtypes = (
)
SecKeychainOpen.restype = OS_status
+class Error(Exception):
+ @classmethod
+ def raise_for_status(cls, status, msg):
+ if status == 0:
+ return
+ raise cls(status, msg)
+
+
+class NotFound(Error):
+ @classmethod
+ def raise_for_status(cls, status, msg):
+ if status == error.item_not_found:
+ raise cls(status, msg)
+ Error.raise_for_status(status, msg)
+
+
@contextlib.contextmanager
def open(name):
ref = sec_keychain_ref()
- res = SecKeychainOpen(name.encode('utf-8'), ref)
- if res:
- raise OSError("Unable to open keychain {name}".format(**locals()))
+ name = name.encode('utf-8') if name is not None else name
+ status = SecKeychainOpen(name, ref)
+ msg = "Error opening keyring {name}".format(**locals())
+ Error.raise_for_status(status, msg)
try:
yield ref
finally: | Create Error and NotFound for capturing exceptions | jaraco_keyring | train | py |
eb4c51a9d9d7efdcf3802a409e24632bafcd8d74 | diff --git a/examples/shapes/js/entities/entities.js b/examples/shapes/js/entities/entities.js
index <HASH>..<HASH> 100644
--- a/examples/shapes/js/entities/entities.js
+++ b/examples/shapes/js/entities/entities.js
@@ -3,6 +3,8 @@ game.ShapeObject = me.Entity.extend({
* constructor
*/
init: function (x, y, settings) {
+ // ensure we do not create a default shape
+ settings.shapes = [];
// call the super constructor
this._super(me.Entity, 'init', [x, y, settings]);
this.hover = false; | fixed the "shapes" example | melonjs_melonJS | train | js |
5751faa9ae33a789f0365d22ae7544d9e01f5f02 | diff --git a/src/Builder.php b/src/Builder.php
index <HASH>..<HASH> 100644
--- a/src/Builder.php
+++ b/src/Builder.php
@@ -43,11 +43,11 @@ class Builder
*/
public static function forge($app_dir, $var_dir, $debug = true, $data = [])
{
- $data = [
+ $data = array_merge([
self::APP_DIR => $app_dir,
self::VAR_DIR => $var_dir,
self::DEBUG => $debug,
- ] + $data;
+ ], $data);
return new self($data);
} | fix code just to silence IDE's warning. | TuumPHP_Builder | train | php |
1b753386f464ed3a4388df396a979514e714de1a | diff --git a/src/Col.js b/src/Col.js
index <HASH>..<HASH> 100644
--- a/src/Col.js
+++ b/src/Col.js
@@ -67,7 +67,7 @@ class Col extends React.Component {
} = this.props;
const classes = {};
- const elementProps = _.cloneDeep(props);
+ const elementProps = _.clone(props);
function getPropValue(key) {
const value = elementProps[key]; | Bugfix: change cloneDeep to clone | rsuite_rsuite | train | js |
62dc9c55f626771b0eb115cd139f655527eabb85 | diff --git a/src/attributes/uniqueattribute.js b/src/attributes/uniqueattribute.js
index <HASH>..<HASH> 100644
--- a/src/attributes/uniqueattribute.js
+++ b/src/attributes/uniqueattribute.js
@@ -16,6 +16,7 @@
*
* @class gpf.attributes.UniqueAttribute
* @extends gpf.attributes.Attribute
+ * @gpf:attribute-restriction attribute,class,unique
* @since 0.2.8
*/
var _gpfAttributesUniqueAttribute = _gpfDefine({ | Document attribute restrictions (#<I>) | ArnaudBuchholz_gpf-js | train | js |
a00233648fbab731a3a701b97c87c7832c2c7d07 | diff --git a/command/server.go b/command/server.go
index <HASH>..<HASH> 100644
--- a/command/server.go
+++ b/command/server.go
@@ -609,6 +609,9 @@ func (c *ServerCommand) Run(args []string) int {
}
// Attempt to detect the redirect address, if possible
+ if coreConfig.RedirectAddr == "" {
+ c.logger.Warn("no `api_addr` value specified in config or in VAULT_API_ADDR; falling back to detection if possible, but this value should be manually set")
+ }
var detect physical.RedirectDetect
if coreConfig.HAPhysical != nil && coreConfig.HAPhysical.HAEnabled() {
detect, ok = coreConfig.HAPhysical.(physical.RedirectDetect) | Warn when users don't configure api_addr (#<I>)
Fixes some sources of user strife | hashicorp_vault | train | go |
c51c551f3453de6cf0db2677deba2cbeb81f93fa | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@ setuptools.setup(
url='https://github.com/kennknowles/python-jsonpath-rw',
license='Apache 2.0',
long_description=io.open('README.rst', encoding='utf-8').read(),
- packages = ['jsonpath_rw'],
+ packages = ['jsonpath_rw', 'jsonpath_rw.bin'],
entry_points = {
'console_scripts': ['jsonpath.py = jsonpath_rw.bin.jsonpath:entry_point'],
}, | Fix setup.py so that it will include jsonpath_rw/bin subdirectory into the distribution. | kennknowles_python-jsonpath-rw | train | py |
b7532c3a3484dc03501e3d004c525f62996fc06b | diff --git a/src/controllers/DefaultController.php b/src/controllers/DefaultController.php
index <HASH>..<HASH> 100644
--- a/src/controllers/DefaultController.php
+++ b/src/controllers/DefaultController.php
@@ -162,6 +162,23 @@ class DefaultController extends Controller
}
}
+ /**
+ * Post Processing on Section Entry Types
+ * This is to loop over all entry types in a section and remove entry types that do not match one that was meant to be created.
+ * ex. A section was created for Employees but there is only entry types defined for Board Members & Management
+ */
+ if (isset($jsonObj['sections']) && is_array($jsonObj['sections']) && isset($jsonObj['entryTypes']) && is_array($jsonObj['entryTypes'])) {
+ forEach ($successfulSections as $sectionHandle) {
+ $section = Craft::$app->sections->getSectionByHandle($sectionHandle);
+ $entryTypes = $section->getEntryTypes();
+ foreach ($entryTypes as $entryType) {
+ if (array_search($section->handle. ':' . $entryType->handle, $addedEntryTypes) === false) {
+ Craft::$app->sections->deleteEntryType($entryType);
+ }
+ }
+ }
+ }
+
if ($noErrors) {
unlink($backup);
} else { | Remove any entry types that were not generated by architect. Explanation in code comments. | Pennebaker_craft-architect | train | php |
bcf49996320f46ce7c12cbb5511eeb966a653dcd | diff --git a/src/combyne.js b/src/combyne.js
index <HASH>..<HASH> 100644
--- a/src/combyne.js
+++ b/src/combyne.js
@@ -393,7 +393,7 @@ var render = function() {
stack.reverse();
// Ensure these required properties cannot be overwritten
- context = { i: i, length: iLen, original: array };
+ context = { i: i+1, length: iLen, original: array };
context[name.index || "."] = array[i];
if (typeof array[i] === "object") { | made i 1-based instead of 0 for better usability | tbranyen_combyne | train | js |
a6123966375aa0d04fc769f6394336a233fa4dc4 | diff --git a/lib/prey/utils/managed_cache.js b/lib/prey/utils/managed_cache.js
index <HASH>..<HASH> 100644
--- a/lib/prey/utils/managed_cache.js
+++ b/lib/prey/utils/managed_cache.js
@@ -77,6 +77,10 @@ var ManagedCache = function() {
});
};
+ this.exists = function(id) {
+ return (self.store[id]) ? true : false;
+ };
+
/*
Add cache management functions for id. Don't generate an initial value.
Emit 'cache_new' on the addition of a generator. | check for the existence of a cache key | prey_prey-node-client | train | js |
0ad2b2581c4b6d2e4350b0c5f32f4f49be5b20a9 | diff --git a/test/integration/start_stop_delete_test.go b/test/integration/start_stop_delete_test.go
index <HASH>..<HASH> 100644
--- a/test/integration/start_stop_delete_test.go
+++ b/test/integration/start_stop_delete_test.go
@@ -94,7 +94,7 @@ func TestStartStop(t *testing.T) {
waitFlag = "--wait=apiserver,system_pods,default_sa"
}
- startArgs := append([]string{"start", "-p", profile, "--memory=2200", "--alsologtostderr", "-v=3", waitFlag}, tc.args...)
+ startArgs := append([]string{"start", "-p", profile, "--memory=2200", "--alsologtostderr", waitFlag}, tc.args...)
startArgs = append(startArgs, StartArgs()...)
startArgs = append(startArgs, fmt.Sprintf("--kubernetes-version=%s", tc.version)) | Less verbosity for start_stop | kubernetes_minikube | train | go |
aaf643692c8ed30e09702c8118a27aed91debc4f | diff --git a/v1/brokers/amqp/amqp.go b/v1/brokers/amqp/amqp.go
index <HASH>..<HASH> 100644
--- a/v1/brokers/amqp/amqp.go
+++ b/v1/brokers/amqp/amqp.go
@@ -229,6 +229,7 @@ func (b *Broker) Publish(ctx context.Context, signature *tasks.Signature) error
Headers: amqp.Table(signature.Headers),
ContentType: "application/json",
Body: msg,
+ Priority: signature.Priority,
DeliveryMode: amqp.Persistent,
},
); err != nil {
diff --git a/v1/tasks/signature.go b/v1/tasks/signature.go
index <HASH>..<HASH> 100644
--- a/v1/tasks/signature.go
+++ b/v1/tasks/signature.go
@@ -51,6 +51,7 @@ type Signature struct {
GroupTaskCount int
Args []Arg
Headers Headers
+ Priority uint8
Immutable bool
RetryCount int
RetryTimeout int | Add priority field to tasks.Signature | RichardKnop_machinery | train | go,go |
c276b98795aa869710146e78091f2d76e28c3022 | diff --git a/gridsome/lib/server/middlewares/graphql.js b/gridsome/lib/server/middlewares/graphql.js
index <HASH>..<HASH> 100644
--- a/gridsome/lib/server/middlewares/graphql.js
+++ b/gridsome/lib/server/middlewares/graphql.js
@@ -9,6 +9,11 @@ const {
module.exports = ({ store }) => {
return async function (req, res, next) {
const { query, variables, ...body } = await getGraphQLParams(req)
+
+ if (!query || !variables) {
+ return next()
+ }
+
const pageQuery = processPageQuery({ query })
if (variables.path) { | fix(graphql): don’t process non graphql requests (#<I>) | gridsome_gridsome | train | js |
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.