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 |
|---|---|---|---|---|---|
84ba60da6bf9914b58cd11db85c15f4f985a22ac | diff --git a/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/CliOptionsParser.java b/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/CliOptionsParser.java
index <HASH>..<HASH> 100644
--- a/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/CliOptionsParser.java
+++ b/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/CliOptionsParser.java
@@ -378,8 +378,11 @@ public class CliOptionsParser {
required = false, arity = 0)
public boolean benchmark;
- @Parameter(names = {"--reference-fasta"}, description = "To use only with the --benchmark flag. Full path to a "
- + " fasta file containing the reference genome.",
+ @Parameter(names = {"--reference-fasta"}, description = "Enables left-alignment normalisation: set this parameter"
+ + " to the full path to a fasta (not fasta.gz!) file containing the reference sequence if you want to enable"
+ + " lef-alignment during the normalisation process. If not set (default), left-alignment step will be skipped"
+ + " during normalisation. **NOTE**: this parameter is mandatory if the --benchmark flag is enabled (in "
+ + " this case fasta.gz files are allowed)",
required = false, arity = 1)
public String referenceFasta; | feature-va-left-align: implementation of left align normalisation in VA CLI started | opencb_cellbase | train | java |
848ad84f140d53599bb0da037716cd83b1ea0b8a | diff --git a/brigade/plugins/tasks/networking/netmiko_run.py b/brigade/plugins/tasks/networking/netmiko_run.py
index <HASH>..<HASH> 100644
--- a/brigade/plugins/tasks/networking/netmiko_run.py
+++ b/brigade/plugins/tasks/networking/netmiko_run.py
@@ -32,9 +32,10 @@ def netmiko_run(task, method, ip=None, host=None, username=None, password=None,
* result (``dict``): dictionary with the result of the getter
"""
parameters = {
- "ip": ip or host or task.ip,
+ "ip": ip or host or task.host.host,
"username": username or task.host.username,
"password": password or task.host.password,
+ "port": task.host.network_api_port,
}
parameters.update(netmiko_dict or {})
device_type = device_type or task.host.nos | added port and correct way of getting the ip of the host | nornir-automation_nornir | train | py |
463635bb83905c0e11274a675948435bd9a97582 | diff --git a/lib/App.php b/lib/App.php
index <HASH>..<HASH> 100644
--- a/lib/App.php
+++ b/lib/App.php
@@ -74,11 +74,12 @@ class App extends Base
protected $controllerInstances = array();
/**
- * An array contains the pre-defined controller classes
+ * An array that stores predefined controller class,
+ * the key is controller name and value is controller class name
*
* @var array
*/
- protected $controllerClasses = array();
+ protected $controllerMap = array();
/**
* Startup an MVC application
@@ -179,7 +180,7 @@ class App extends Base
protected function handleNotFound(array $notFound)
{
- $notFound += array('classes' => array(), 'actions' => array())
+ $notFound += array('classes' => array(), 'actions' => array());
// All controllers and actions were not found, prepare exception message
$message = 'The page you requested was not found';
@@ -346,8 +347,8 @@ class App extends Base
$classes[] = $class;
// Add class from pre-defined classes
- if (isset($this->controllerClasses[$controller])) {
- $classes[] = $this->controllerClasses[$controller];
+ if (isset($this->controllerMap[$controller])) {
+ $classes[] = $this->controllerMap[$controller];
}
return $classes; | renamed controllerClasses to controllerMap | twinh_wei | train | php |
71fca36db2b7ca0d21213ef61577bc2d5dada359 | diff --git a/conversejs/utils.py b/conversejs/utils.py
index <HASH>..<HASH> 100644
--- a/conversejs/utils.py
+++ b/conversejs/utils.py
@@ -41,6 +41,8 @@ def get_conversejs_context(context, xmpp_login=False):
bosh = BOSHClient(xmpp_account.jid, xmpp_account.password,
context['CONVERSEJS_BOSH_SERVICE_URL'])
jid, sid, rid = bosh.get_credentials()
+ bosh.close_connection()
+
context.update({'jid': jid, 'sid': sid, 'rid': rid})
return context | Closing bosh connection after getting credentials | TracyWebTech_django-conversejs | train | py |
ed95d5608e5272f554fe2f412e54e082eca43057 | diff --git a/lib/unfluff.js b/lib/unfluff.js
index <HASH>..<HASH> 100644
--- a/lib/unfluff.js
+++ b/lib/unfluff.js
@@ -59,7 +59,7 @@ void function () {
publisher: function () {
var doc;
doc = getParsedDoc.call(this, html);
- return null != this.publisher ? this.publisher : this.publisher = extractor.publisher(doc);
+ return null != this.publisher_ ? this.publisher_ : this.publisher_ = extractor.publisher(doc);
},
favicon: function () {
var doc; | Forgot to add compiled unfluff.js! | ageitgey_node-unfluff | train | js |
52e1a22f8d2089ba2fa1c7238972c977d65633a2 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -14,7 +14,7 @@ function resizeListener(e) {
})
}
-var exports = function exports(element, fn) {
+var _exports = function exports(element, fn) {
var window = this
var document = window.document
var isIE
@@ -67,7 +67,7 @@ var exports = function exports(element, fn) {
element.__resizeListeners__.push(fn)
}
-module.exports = typeof window === 'undefined' ? exports : exports.bind(window)
+module.exports = typeof window === 'undefined' ? _exports : _exports.bind(window)
module.exports.unbind = function (element, fn) {
var attachEvent = document.attachEvent | Rename exports to _exports | KyleAMathews_element-resize-event | train | js |
173b2b3f6eb1807f43edb12c00f043d9c045955c | diff --git a/lib/hci-socket/hci.js b/lib/hci-socket/hci.js
index <HASH>..<HASH> 100644
--- a/lib/hci-socket/hci.js
+++ b/lib/hci-socket/hci.js
@@ -70,8 +70,11 @@ var STATUS_MAPPER = require('./hci-status');
var Hci = function() {
this._socket = new BluetoothHciSocket();
this._isDevUp = null;
+ this._state = null;
this._handleBuffers = {};
+
+ this.on('stateChange', this.onStateChange.bind(this));
};
util.inherits(Hci, events.EventEmitter);
@@ -479,7 +482,7 @@ Hci.prototype.processCmdCompleteEvent = function(cmd, status, result) {
if (hciVer < 0x06) {
this.emit('stateChange', 'unsupported');
- } else {
+ } else if (this._state !== 'poweredOn') {
this.setAdvertiseEnable(false);
this.setAdvertisingParameters();
}
@@ -562,4 +565,8 @@ Hci.prototype.processLeConnUpdateComplete = function(status, data) {
this.emit('leConnUpdateComplete', status, handle, interval, latency, supervisionTimeout);
};
+Hci.prototype.onStateChange = function(state) {
+ this._state = state;
+};
+
module.exports = Hci; | - don't reset advertising state on read local version response if state is powered on | noble_bleno | train | js |
95d7b3f7ca1e1441d3b5763c9bf58decca9dfeaa | diff --git a/MAPKIT/mapkit/RasterConverter.py b/MAPKIT/mapkit/RasterConverter.py
index <HASH>..<HASH> 100644
--- a/MAPKIT/mapkit/RasterConverter.py
+++ b/MAPKIT/mapkit/RasterConverter.py
@@ -294,7 +294,12 @@ class RasterConverter(object):
# Zip KML wrapper file and png together with extension kmz
-
+ def getAsKmlTimeSeries(self):
+ '''
+ Get a set of rasters as a kml time series
+ '''
+
+
def setColorRamp(self, colorRamp=None):
'''
Set the color ramp of the raster converter instance | Added definition for time series method. | CI-WATER_mapkit | train | py |
c64c803a6dff16f07696c55775bb5ffd1d4b4dd4 | diff --git a/lib/Server.js b/lib/Server.js
index <HASH>..<HASH> 100644
--- a/lib/Server.js
+++ b/lib/Server.js
@@ -256,11 +256,11 @@ function Server(compiler, options) {
var defaultFeatures = ["setup", "headers", "middleware"];
if(options.proxy)
defaultFeatures.push("proxy");
- if(options.historyApiFallback)
- defaultFeatures.push("historyApiFallback", "middleware");
defaultFeatures.push("magicHtml");
if(options.contentBase !== false)
defaultFeatures.push("contentBase");
+ if(options.historyApiFallback)
+ defaultFeatures.push("historyApiFallback", "middleware");
// compress is placed last and uses unshift so that it will be the first middleware used
if(options.compress)
defaultFeatures.unshift("compress"); | Fix historyApiFallback for nested paths #<I> (#<I>) | webpack_webpack-dev-server | train | js |
7a98dbc2d187e3fe32bcb5936290533408c48c85 | diff --git a/salt/states/file.py b/salt/states/file.py
index <HASH>..<HASH> 100644
--- a/salt/states/file.py
+++ b/salt/states/file.py
@@ -26,6 +26,22 @@ which makes use of the jinja templating system would look like this:
custom_var: "default value"
other_var: 123
+The ``source`` parameter can be specified as a list. IF this is done, then the
+first file to be matched will be the one that is used. This allows you to have
+a default file on which to fall back if the desired file does not exist on the
+salt fileserver. Here's an example:
+
+.. code-block:: yaml
+ /etc/foo.conf
+ file.managed:
+ - source:
+ - salt://foo.conf.{{ grains['fqdn'] }}
+ - salt://foo.conf.fallback
+ - user: foo
+ - group: users
+ - mode: 644
+
+
Directories can be managed via the ``directory`` function. This function can
create and enforce the permissions on a directory. A directory statement will
look like this: | Add info on specifying a list of file sources
I was surprised to not find this described at all in the docs. It's an
awesome feature, I think. | saltstack_salt | train | py |
dd2cd6b860927b2a89110e2967dcee8838896fbd | diff --git a/src/JMS/Serializer/Twig/SerializerExtension.php b/src/JMS/Serializer/Twig/SerializerExtension.php
index <HASH>..<HASH> 100644
--- a/src/JMS/Serializer/Twig/SerializerExtension.php
+++ b/src/JMS/Serializer/Twig/SerializerExtension.php
@@ -43,28 +43,18 @@ class SerializerExtension extends \Twig_Extension
public function getFilters()
{
return array(
- 'serialize' => new \Twig_Filter_Method($this, 'serialize'),
+ new \Twig_SimpleFilter('serialize', array($this, 'serialize')),
);
}
public function getFunctions()
{
return array(
- 'serialization_context' => new \Twig_Function_Method($this, 'createContext'),
+ new \Twig_SimpleFunction('serialization_context', '\JMS\Serializer\SerializationContext::createContext'),
);
}
/**
- * Creates the serialization context
- *
- * @return SerializationContext
- */
- public function createContext()
- {
- return SerializationContext::create();
- }
-
- /**
* @param object $object
* @param string $type
* @param SerializationContext $context | Switch the Twig integration to use non-deprecated APIs | alekitto_serializer | train | php |
7624330d45e3e6b357ed6a903fa1e20ecbaeb04a | diff --git a/src/core/i18n/index.js b/src/core/i18n/index.js
index <HASH>..<HASH> 100644
--- a/src/core/i18n/index.js
+++ b/src/core/i18n/index.js
@@ -11,6 +11,11 @@ class Dict {
return r.replace(`{${k}}`, v);
}, this.dict.getIn(keyPath, ""));
}
+
+ // TODO: this is a bad name because it's meant to be used in groups
+ raw(keyPath) {
+ return this.dict.getIn(keyPath, Map()).toJS();
+ }
}
let dicts = Map();
diff --git a/src/core/i18n/t.js b/src/core/i18n/t.js
index <HASH>..<HASH> 100644
--- a/src/core/i18n/t.js
+++ b/src/core/i18n/t.js
@@ -1,6 +1,10 @@
import React from 'react';
export default function(dict, keyPath, params = {}) {
+ if (params.__raw) {
+ return dict.raw(keyPath);
+ }
+
const html = dict.get(keyPath, params);
if (!html) {
return null; | Allow to get a group of translations | auth0_lock | train | js,js |
a2bb2d70afdaf6a016c60d62a1ddea6d4a442c61 | diff --git a/airflow/contrib/hooks/gcp_dataflow_hook.py b/airflow/contrib/hooks/gcp_dataflow_hook.py
index <HASH>..<HASH> 100644
--- a/airflow/contrib/hooks/gcp_dataflow_hook.py
+++ b/airflow/contrib/hooks/gcp_dataflow_hook.py
@@ -65,6 +65,9 @@ class _DataflowJob(LoggingMixin):
if 'currentState' in self._job:
if 'JOB_STATE_DONE' == self._job['currentState']:
return True
+ elif 'JOB_STATE_RUNNING' == self._job['currentState'] and \
+ 'JOB_TYPE_STREAMING' == self._job['type']:
+ return True
elif 'JOB_STATE_FAILED' == self._job['currentState']:
raise Exception("Google Cloud Dataflow job {} has failed.".format(
self._job['name'])) | [AIRFLOW-<I>] Update DataflowHook waitfordone for Streaming type job[]
AIRFLOW-<I> Update DataflowHook waitfordone for
Streaming type job
fix flake8
Closes #<I> from ivanwirawan/AIRFLOW-<I> | apache_airflow | train | py |
05fc0a1220c2d7cd02f48e0247989100bf674ef6 | diff --git a/code/controllers/FrontEndWorkflowController.php b/code/controllers/FrontEndWorkflowController.php
index <HASH>..<HASH> 100644
--- a/code/controllers/FrontEndWorkflowController.php
+++ b/code/controllers/FrontEndWorkflowController.php
@@ -73,6 +73,7 @@ abstract class FrontEndWorkflowController extends Controller {
* @return Form
*/
public function Form(){
+
$svc = singleton('WorkflowService');
$active = $svc->getWorkflowFor($this->getContextObject());
@@ -90,10 +91,11 @@ abstract class FrontEndWorkflowController extends Controller {
// set any requirements spcific to this contextobject
$active->setFrontendFormRequirements();
- // @todo - are these required?
- $this->extend('updateFrontendActions', $wfActions);
- $this->extend('updateFrontendFields', $wfFields);
- $this->extend('updateFrontendValidator', $wfValidator);
+ // hooks for decorators
+ $this->extend('updateFrontEndWorkflowFields', $wfActions);
+ $this->extend('updateFrontEndWorkflowActions', $wfFields);
+ $this->extend('updateFrontEndRequiredFields', $wfValidator);
+ $this->extend('updateFrontendFormRequirements');
$form = new FrontendWorkflowForm($this, 'Form', $wfFields, $wfActions, $wfValidator); | tidied up form hooks | symbiote_silverstripe-advancedworkflow | train | php |
089ab5269a54090023c1780a93c94d94962f47b7 | diff --git a/src/js/core/wrappedselection.js b/src/js/core/wrappedselection.js
index <HASH>..<HASH> 100644
--- a/src/js/core/wrappedselection.js
+++ b/src/js/core/wrappedselection.js
@@ -611,7 +611,8 @@ rangy.createModule("WrappedSelection", function(api, module) {
selProto.refresh = function(checkForChanges) {
var oldRanges = checkForChanges ? this._ranges.slice(0) : null;
- var wasBackward = this.isBackward();
+ var oldAnchorNode = this.anchorNode, oldAnchorOffset = this.anchorOffset;
+
refreshSelection(this);
if (checkForChanges) {
// Check the range count first
@@ -621,9 +622,10 @@ rangy.createModule("WrappedSelection", function(api, module) {
return true;
}
- // Now check the direction
- if (this.isBackward() != wasBackward) {
- log.debug("Selection.refresh: Selection backward was " + wasBackward + ", is now " + this.isBackward());
+ // Now check the direction. Checking the anchor position is the same is enough since we're checking all the
+ // ranges after this
+ if (this.anchorNode != oldAnchorNode || this.anchorOffset != oldAnchorOffset) {
+ log.debug("Selection.refresh: anchor different, so selection has changed");
return true;
} | Fix for exception thrown by selection.refresh(). See issue <I>. | timdown_rangy | train | js |
7c265229a4dcf9da558448c19a9fcf9a12b08145 | diff --git a/src/sassdoc.js b/src/sassdoc.js
index <HASH>..<HASH> 100644
--- a/src/sassdoc.js
+++ b/src/sassdoc.js
@@ -70,7 +70,5 @@ export function refresh(dest, config) {
export var documentize = sassdoc;
// Re-export, expose API.
-export { default as Logger } from './logger';
-export { default as config } from './cfg';
-export { default as Converter } from './converter';
-export { default as Parser } from './parser';
+export { Logger, Converter, Parser };
+export { default as cfg } from './cfg'; | Refactor API re-export
- No way to export all of cfg, might be enough for plugins | SassDoc_sassdoc | train | js |
3e6ef745ec0ca238895423820765fcdda7cdcd7a | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,7 @@ setup(
maintainer='Lars Butler',
maintainer_email='lars.butler@gmail.com',
url='https://github.com/larsbutler/geomet',
- description='GeoMet',
+ description='GeoJSON <-> WKT/WKB conversion utilities',
long_description=__doc__,
platforms=['any'],
packages=find_packages(exclude=['geomet.tests', 'geomet.tests.*']), | setup:
Added a better package description to setup.py. | geomet_geomet | train | py |
85ef78d40a3475c228f2a74c7d452284cfa96671 | diff --git a/faq-bundle/tests/EventListener/InsertTagsListenerTest.php b/faq-bundle/tests/EventListener/InsertTagsListenerTest.php
index <HASH>..<HASH> 100644
--- a/faq-bundle/tests/EventListener/InsertTagsListenerTest.php
+++ b/faq-bundle/tests/EventListener/InsertTagsListenerTest.php
@@ -81,9 +81,9 @@ class InsertTagsListenerTest extends \PHPUnit_Framework_TestCase
}
/**
- * Tests that the listener returns an empty string if there is no URL.
+ * Tests that the listener returns an empty string if there is no category model.
*/
- public function testReturnEmptyStringIfNoUrl()
+ public function testReturnEmptyStringIfNoCategoryModel()
{
$listener = new InsertTagsListener($this->mockContaoFramework(false, true)); | [Faq] Rename a test method. | contao_contao | train | php |
04d06e287c73d2d51f2299aa96b951e236e27389 | diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -14,6 +14,5 @@ RSpec.configure do |config|
config.before(:each) do
Panda.instance_variable_set("@connection", nil)
Panda.instance_variable_set("@cloud", nil)
- Time.now.stub!(:utc).and_return(mock("time", :iso8601 => "2009-11-04T17:54:11+00:00"))
end
end | Unnecessary time freeze removed in the specs
TimeCop is already taking care of that in the panda_spec | pandastream_panda_gem | train | rb |
9997f188d983ebb36ce5517b1d96763cc18bf7b1 | diff --git a/bugwarrior/services/github.py b/bugwarrior/services/github.py
index <HASH>..<HASH> 100644
--- a/bugwarrior/services/github.py
+++ b/bugwarrior/services/github.py
@@ -28,7 +28,7 @@ class GithubClient(ServiceClient):
return user_repos + public_repos
def get_involved_issues(self, username):
- tmpl = "https://api.github.com/search/issues?q=involves%3A{username}&per_page=100"
+ tmpl = "https://api.github.com/search/issues?q=involves%3A{username}%20state%3Aopen&per_page=100"
url = tmpl.format(username=username)
return self._getter(url, subkey='items') | Only query for open github PRs (#<I>)
Previously, setting `involved_issues = True` would pull in PRs that were in any
state, including merged PRs. This patch amends the involved issues query to
only search for open PRs. | ralphbean_bugwarrior | train | py |
07d097dc39b82fa601ccf79741160d908352ca69 | diff --git a/tests.go b/tests.go
index <HASH>..<HASH> 100644
--- a/tests.go
+++ b/tests.go
@@ -221,6 +221,12 @@ func (t *TestSuite) AssertEqual(expected, actual interface{}) {
}
}
+func (t *TestSuite) AssertNotEqual(expected, actual interface{}) {
+ if Equal(expected, actual) {
+ panic(fmt.Errorf("(expected) %v == %v (actual)", expected, actual))
+ }
+}
+
func (t *TestSuite) Assert(exp bool) {
t.Assertf(exp, "Assertion failed")
}
@@ -238,6 +244,13 @@ func (t *TestSuite) AssertContains(s string) {
}
}
+// Assert that the response does not contain the given string.
+func (t *TestSuite) AssertNotContains(s string) {
+ if bytes.Contains(t.ResponseBody, []byte(s)) {
+ panic(fmt.Errorf("Assertion failed. Expected response not to contain %s", s))
+ }
+}
+
// Assert that the response matches the given regular expression.BUG
func (t *TestSuite) AssertContainsRegex(regex string) {
r := regexp.MustCompile(regex) | AssertNotEqual and AssertNotContains have been added | revel_revel | train | go |
a720d465487e0048bc27c846efa010c749b77b5e | diff --git a/h5p-default-storage.class.php b/h5p-default-storage.class.php
index <HASH>..<HASH> 100644
--- a/h5p-default-storage.class.php
+++ b/h5p-default-storage.class.php
@@ -408,7 +408,7 @@ class H5PDefaultStorage implements \H5PFileStorage {
*
* @throws Exception Unable to copy the file
*/
- private static function copyFileTree($source, $destination) {
+ public static function copyFileTree($source, $destination) {
if (!self::dirReady($destination)) {
throw new \Exception('unabletocopy');
}
@@ -482,4 +482,13 @@ class H5PDefaultStorage implements \H5PFileStorage {
return TRUE;
}
+
+ /**
+ * Easy helper function for retrieving the editor path
+ *
+ * @return null|string Path to editor files
+ */
+ public function getEditorPath() {
+ return $this->alteditorpath;
+ }
} | Make it easier to send files to the editor
HFP-<I> | h5p_h5p-php-library | train | php |
791959080cee277abc727c09238a43e611edbb55 | diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py
index <HASH>..<HASH> 100644
--- a/salt/modules/yumpkg.py
+++ b/salt/modules/yumpkg.py
@@ -1910,7 +1910,7 @@ def download(*packages):
to_purge = []
for pkg in packages:
to_purge.extend([os.path.join(CACHE_DIR, x)
- for x in os.listdir(CACHE_DIR)
+ for x in cached_pkgs
if x.startswith('{0}-'.format(pkg))])
for purge_target in set(to_purge):
log.debug('Removing cached package {0}'.format(purge_target)) | Don't run os.listdir in every loop iteration
Use the cached_pkgs variable instead so you only run it once. | saltstack_salt | train | py |
1b1114e8767f4f0de1180447eec4d375a386bf68 | diff --git a/input_mask/__init__.py b/input_mask/__init__.py
index <HASH>..<HASH> 100644
--- a/input_mask/__init__.py
+++ b/input_mask/__init__.py
@@ -1 +1 @@
-__version__ = '2.0.0b2'
+__version__ = '2.0.0b3'
diff --git a/input_mask/static/input_mask/js/text_input_mask.js b/input_mask/static/input_mask/js/text_input_mask.js
index <HASH>..<HASH> 100644
--- a/input_mask/static/input_mask/js/text_input_mask.js
+++ b/input_mask/static/input_mask/js/text_input_mask.js
@@ -33,7 +33,11 @@
opts = input.attr('data-money-mask').replace(/"/g, '"'),
opts = JSON.parse(opts);
- input.maskMoney(opts).maskMoney('mask');
+ input.maskMoney(opts);
+
+ if (opts.allowZero) {
+ input.maskMoney('mask');
+ }
}
}); | Do not display 0 when allowZero is false | caioariede_django-input-mask | train | py,js |
1bec3e76c57bf4748a4eaf53aee560331d416b79 | diff --git a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/conf/ConfigurationService.java b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/conf/ConfigurationService.java
index <HASH>..<HASH> 100644
--- a/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/conf/ConfigurationService.java
+++ b/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/conf/ConfigurationService.java
@@ -130,6 +130,15 @@ public class ConfigurationService {
}
+ // Clear cached YAML if it no longer exists
+ else if (cachedConfigurations != null) {
+ long oldLastModified = lastModified.get();
+ if (lastModified.compareAndSet(oldLastModified, 0)) {
+ logger.debug("Clearing cached LDAP configuration from \"{}\" (file no longer exists).", ldapServers);
+ cachedConfigurations = null;
+ }
+ }
+
// Use guacamole.properties if not using YAML
if (cachedConfigurations == null) {
logger.debug("Reading LDAP configuration from guacamole.properties..."); | GUACAMOLE-<I>: Clear out cached ldap-servers.yml if it is deleted. | glyptodon_guacamole-client | train | java |
b903db32aff38a74394247c3b649e1cdf7fd4e0c | diff --git a/announce/views.py b/announce/views.py
index <HASH>..<HASH> 100644
--- a/announce/views.py
+++ b/announce/views.py
@@ -41,5 +41,9 @@ def announce(request):
return HttpResponse(app.get_response())
- logger.debug("---------------------------------------")
- return HttpResponseBadRequest()
+ elif request.method != 'POST':
+ return HttpResponseBadRequest('Did not receive an HTTP POST.')
+ elif not check_token_safe(request.POST['token']):
+ return HttpResponseBadRequest('Received an invalid token.')
+ else:
+ HttpResponseBadRequest('Not sure how to handle this request.') | more explicit HTTP <I> responses | praekeltfoundation_bellman | train | py |
b80b62c346adfb05f28286f335e814d47f8252d5 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -15,6 +15,7 @@ setup(
author = 'Paul-Emmanuel Raoul',
author_email = 'skyper@skyplabs.net',
url = 'https://github.com/SkypLabs/python4yahdlc',
+ download_url = 'https://github.com/SkypLabs/python4yahdlc/archive/v1.0.0.zip',
ext_modules = [yahdlc],
test_suite = 'test',
) | add download url in 'setup.py' file | SkypLabs_python4yahdlc | train | py |
d520a87a48d32a284aed5332606409224d51d12a | diff --git a/lib/runner.js b/lib/runner.js
index <HASH>..<HASH> 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -398,6 +398,7 @@ Runner.prototype.run = function(fn){
function uncaught(err){
var runnable = self.currentRunnable;
debug('uncaught exception');
+ if (runnable.failed) return;
runnable.clearTimeout();
err.uncaught = true;
self.fail(runnable, err); | Fixed double reporting of uncaught exceptions after timeout. Closes #<I>
if its already failed stop reporting it | mochajs_mocha | train | js |
34066ad177da6ac5cff5860183c43ed9e6c98aae | diff --git a/components/badge/badge.js b/components/badge/badge.js
index <HASH>..<HASH> 100644
--- a/components/badge/badge.js
+++ b/components/badge/badge.js
@@ -5,7 +5,7 @@ import './badge.scss';
/**
* @name Badge
- * @category Forms
+ * @category Components
* @constructor
* @description Provides simple component for badges
* @extends {RingComponent} | RG-<I> change "Badge" component category to "Components" because it is not form-specific
Former-commit-id: <I>a<I>e<I>b<I>d<I>c<I>c<I>d<I>c0 | JetBrains_ring-ui | train | js |
d9ee08301a66bc8ef73a8b71d5e2153cc65f958b | diff --git a/dataviews/sheetviews.py b/dataviews/sheetviews.py
index <HASH>..<HASH> 100644
--- a/dataviews/sheetviews.py
+++ b/dataviews/sheetviews.py
@@ -7,7 +7,7 @@ from dataviews import Stack, DataHistogram, DataStack, find_minmax
from ndmapping import NdMapping, Dimension
from options import options
from sheetcoords import SheetCoordinateSystem, Slice
-from views import View, Overlay, Annotation, Layout, GridLayout
+from views import View, Overlay, Annotation, GridLayout
class SheetLayer(View): | Removed unused Layout import in dataviews/sheetviews.py | pyviz_holoviews | train | py |
e88b7f750d58e67fcc3a71646d38392563c88e6f | diff --git a/hep/rules/bd9xx.py b/hep/rules/bd9xx.py
index <HASH>..<HASH> 100644
--- a/hep/rules/bd9xx.py
+++ b/hep/rules/bd9xx.py
@@ -41,6 +41,24 @@ from ...utils import force_single_element, get_recid_from_ref, get_record_ref
RE_VALID_PUBNOTE = re.compile(".*,.*,.*(,.*)?")
+@hep.over('record_affiliations', '^902..')
+@utils.for_each_value
+def record_affiliations(self, key, value):
+ record = get_record_ref(value.get('z'), 'institutions')
+
+ return {
+ 'curated_relation': record is not None,
+ 'record': record,
+ 'value': value.get('a'),
+ }
+
+
+@hep2marc.over('902', '^record_affiliations$')
+@utils.for_each_value
+def record_affiliations2marc(self, key, value):
+ return {'a': value.get('value')}
+
+
@hep.over('document_type', '^980..')
def document_type(self, key, value):
publication_types = [ | global: bump inspire-schemas to version ~<I> | inspirehep_inspire-dojson | train | py |
583063b47c2495ebcd4d87c9234faf5e3838dec5 | diff --git a/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/CodecFactory.java b/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/CodecFactory.java
index <HASH>..<HASH> 100644
--- a/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/CodecFactory.java
+++ b/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/CodecFactory.java
@@ -227,7 +227,13 @@ public class CodecFactory implements CompressionCodecFactory {
}
try {
- Class<?> codecClass = Class.forName(codecClassName);
+ Class<?> codecClass;
+ try {
+ codecClass = Class.forName(codecClassName);
+ } catch (ClassNotFoundException e) {
+ // Try to load the class using the job classloader
+ codecClass = configuration.getClassLoader().loadClass(codecClassName);
+ }
codec = (CompressionCodec) ReflectionUtils.newInstance(codecClass, configuration);
CODEC_BY_NAME.put(codecClassName, codec);
return codec; | PARQUET-<I>: Use job ClassLoader to load CompressionCodec class (#<I>)
The MR job might be having a different ClassLoader then
the defining ClassLoader of the CodecFactory class.
A CompressionCodec class that is not loadable via the
CodecFactory ClassLoader might be loadable through the
job ClassLoader. | apache_parquet-mr | train | java |
8aba6a61848c818771cd37a1206a1e4ab592be9d | diff --git a/petl/io/numpy.py b/petl/io/numpy.py
index <HASH>..<HASH> 100644
--- a/petl/io/numpy.py
+++ b/petl/io/numpy.py
@@ -32,7 +32,7 @@ def toarray(table, dtype=None, count=-1, sample=1000):
>>> a = etl.toarray(table)
>>> a
array([('apples', 1, 2.5), ('oranges', 3, 4.4), ('pears', 7, 0.1)],
- dtype=[('foo', '<U7'), ('bar', '<i8'), ('baz', '<f8')])
+ dtype=(numpy.record, [('foo', '<U7'), ('bar', '<i8'), ('baz', '<f8')]))
>>> # the dtype can be specified as a string
... a = etl.toarray(table, dtype='a4, i2, f4')
>>> a | fix doctests for numpy upgrade | petl-developers_petl | train | py |
676ff681548e1e0d02d0a3cb6335b91b4c896a8a | diff --git a/structr-ui/src/main/resources/structr/js/init.js b/structr-ui/src/main/resources/structr/js/init.js
index <HASH>..<HASH> 100644
--- a/structr-ui/src/main/resources/structr/js/init.js
+++ b/structr-ui/src/main/resources/structr/js/init.js
@@ -1683,6 +1683,7 @@ var Structr = {
var appendToElement = config.appendToElement || element;
var text = config.text || 'No text supplied!';
var toggleElementCss = config.css || {};
+ var elementCss = config.elementCss || {};
var customToggleIcon = config.customToggleIcon || _Icons.information_icon;
var insertAfter = config.insertAfter || false;
var offsetX = config.offsetX || 0;
@@ -1696,6 +1697,7 @@ var Structr = {
}
toggleElement.css(toggleElementCss);
+ appendToElement.css(elementCss);
var helpElement = $('<span class="context-help-text">' + text + '</span>'); | Feature: Enables user to apply css to element to which an info text is appended | structr_structr | train | js |
3f7e47747f2948a49ba2e6e79e187da2fa04ff94 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,6 +1,6 @@
var fs = require('fs')
-function EveryPaaS(options) {
+function EveryPaaS() {
this.DOTCLOUD = "dotcloud"
this.HEROKU = "heroku"
this.NODEJITSU = "nodejitsu" | EveryPaaS constructor does not take an options object. | niallo_everypaas | train | js |
6609ee8b12c600d2a8d4b69358c6ffe8c541a440 | diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py
index <HASH>..<HASH> 100644
--- a/pylint/checkers/typecheck.py
+++ b/pylint/checkers/typecheck.py
@@ -114,7 +114,14 @@ def _determine_callable(callable_obj):
from_object = new and new.parent.scope().name == 'object'
from_builtins = new and new.root().name == BUILTINS
- if not new or from_object or from_builtins:
+
+ # TODO(cpopa): In an ideal world, we shouldn't do this.
+ # In astroid, some builtins are considered to be imports from
+ # the builtin module. There's issue #96 which should fix this, then
+ # this check could be removed. This is temporary.
+ py2_from_builtins = isinstance(new, astroid.From) and new.modname == BUILTINS
+
+ if not new or from_object or from_builtins or py2_from_builtins:
try:
# Use the last definition of __init__.
callable_obj = callable_obj.local_attr('__init__')[-1] | Add temporary fix for the builtins check in _determine_callable_obj. | PyCQA_pylint | train | py |
f216e8ad3c3d7d6371f4653ec5d6513b8e77a428 | diff --git a/lib/gcli/types/node.js b/lib/gcli/types/node.js
index <HASH>..<HASH> 100644
--- a/lib/gcli/types/node.js
+++ b/lib/gcli/types/node.js
@@ -56,7 +56,9 @@ exports.getWindowHolder = function() {
* NodeListType to allow terminal to tell us which nodes should be highlighted
*/
function onEnter(assignment) {
- assignment.highlighter = new Highlighter(windowHolder.window.document);
+ // TODO: GCLI doesn't support passing a context to notifications of cursor
+ // position, so onEnter/onLeave/onChange are disabled below until we fix this
+ assignment.highlighter = new Highlighter(context.environment.window.document);
assignment.highlighter.nodelist = assignment.conversion.matches;
}
@@ -141,9 +143,9 @@ exports.items = [
return Promise.resolve(reply);
},
- onEnter: onEnter,
- onLeave: onLeave,
- onChange: onChange
+ // onEnter: onEnter,
+ // onLeave: onLeave,
+ // onChange: onChange
},
{
// The 'nodelist' type is a CSS expression that refers to a node list
@@ -217,8 +219,8 @@ exports.items = [
return Promise.resolve(reply);
},
- onEnter: onEnter,
- onLeave: onLeave,
- onChange: onChange
+ // onEnter: onEnter,
+ // onLeave: onLeave,
+ // onChange: onChange
}
]; | runat-<I>: Remove onEnter/onLeave/onChange notification
The idea was that we could highlight nodes when command line cursor was
'inside' the relevant argument. But it's not working for several
reasons:
* It needs remoting (and this could be a perf issue)
* We've not hooked it up to the new multiple node highlighter
* The requirement to have context.environment.window hooked up is making
things worse
So I'm disabling it here. | joewalker_gcli | train | js |
4d51daaae98c2fc9fe9a3f63f1fb0f1dc00585b9 | diff --git a/bookstore/handlers.py b/bookstore/handlers.py
index <HASH>..<HASH> 100644
--- a/bookstore/handlers.py
+++ b/bookstore/handlers.py
@@ -69,7 +69,7 @@ class BookstorePublishHandler(APIHandler):
self.log.info("Processing published write of %s", path)
await client.put_object(Bucket=self.bookstore_settings.s3_bucket,
Key=file_key,
- Body=json.dumps(content).encode('utf-8'))
+ Body=json.dumps(content))
self.log.info("Done with published write of %s", path)
# Likely implementation: | undo bytes encoding for put_object | nteract_bookstore | train | py |
c6b2d54b2add21c6efd2e71583cd9e5eb0977a34 | diff --git a/lib/support/cli.js b/lib/support/cli.js
index <HASH>..<HASH> 100644
--- a/lib/support/cli.js
+++ b/lib/support/cli.js
@@ -592,6 +592,12 @@ module.exports.parseCommandLine = function parseCommandLine() {
describe:
'How long time to wait (in seconds) if the androidBatteryTemperatureWaitTimeInSeconds is not met before the next try'
})
+ .option('androidVerifyNetwork', {
+ type: 'boolean',
+ default: false,
+ describe:
+ 'Before a test start, verify that the device has a Internet connection by pinging 8.8.8.8 (or a configurable domain with --androidPingAddress)'
+ })
/** Process start time. Android-only for now. */
.option('processStartTime', {
type: 'boolean', | Verify internet connection before you start a test. (#<I>) | sitespeedio_browsertime | train | js |
92e8b4c462e0a667fa631858fbce8dc281cd98d4 | diff --git a/lib/podio/models/conversation.rb b/lib/podio/models/conversation.rb
index <HASH>..<HASH> 100644
--- a/lib/podio/models/conversation.rb
+++ b/lib/podio/models/conversation.rb
@@ -121,6 +121,19 @@ class Podio::Conversation < ActivePodio::Base
Podio.connection.delete("/conversation/#{conversation_id}/read").status
end
+ # @see https://developers.podio.com/doc/conversations/star-conversation-35106944
+ def star(conversation_id)
+ response = Podio.connection.post do |req|
+ req.url "/conversation/#{conversation_id}/star"
+ end
+ response.status
+ end
+
+ # @see https://developers.podio.com/doc/conversations/unstar-conversation-35106990
+ def unstar(conversation_id)
+ Podio.connection.delete("/conversation/#{conversation_id}/star").status
+ end
+
def get_omega_auth_tokens
response = Podio.connection.post do |req|
req.url '/conversation/omega/access_token' | Starring and unstaring conversations support. | podio_podio-rb | train | rb |
a9c3c148b0c1f2ac604c380c9d3dde74a4560aed | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,13 +1,20 @@
#!/usr/bin/env python
+setup_args = {}
+
try:
from setuptools import setup
from setuptools.extension import Extension
+ setup_args.update(install_requires=[
+ 'Cython >= 0.11',
+ 'numpy >= 1.5.1',
+ #'scipy >= 0.6',
+ ])
except ImportEror:
from distutils.core import setup
from distutils.extension import Extension
-setup_args = dict(
+setup_args.update(
name='biofrills',
version='0.0.0-dev',
description='Bio scripts, parsers and utilities', | setup.py: added dependencies for easy_install | etal_biofrills | train | py |
39a9bdf954427605e9f3167595d6ff07b96bc2fd | diff --git a/explauto/interest_model/random.py b/explauto/interest_model/random.py
index <HASH>..<HASH> 100644
--- a/explauto/interest_model/random.py
+++ b/explauto/interest_model/random.py
@@ -141,15 +141,9 @@ class MiscRandomInterest(RandomInterest):
interest_models = {'random': (RandomInterest, {'default': {}}),
- 'miscRandom_local': (MiscRandomInterest, {'default':
+ 'misc_random': (MiscRandomInterest, {'default':
{'competence_measure': competence_dist,
'win_size': 100,
'competence_mode': 'knn',
'k': 100,
- 'progress_mode': 'local'}}),
- 'miscRandom_global': (MiscRandomInterest, {'default':
- {'competence_measure': competence_dist,
- 'win_size': 100,
- 'competence_mode': 'knn',
- 'k': 100,
- 'progress_mode': 'global'}})}
+ 'progress_mode': 'local'}})} | simplified default config of miscRandom interest model | flowersteam_explauto | train | py |
1dd125919ecaa24c33cbedb79d39f3628d5b2c8e | diff --git a/test.py b/test.py
index <HASH>..<HASH> 100644
--- a/test.py
+++ b/test.py
@@ -585,8 +585,8 @@ for i in xrange(42):
""")
out = []
- for line in python(py.name, _for=True): out.append(line)
- self.assertTrue(len(out) == 42)
+ for line in python(py.name, _for=True): out.append(int(line.strip()))
+ self.assertTrue(len(out) == 42 and sum(out) == 861)
def test_nonblocking_for(self): | being a little more specific with test_for_generator | amoffat_sh | train | py |
42123df22b65dbbe47f9e5ca793861d29f21a23d | diff --git a/TYPO3.Flow/Classes/Package/Manager.php b/TYPO3.Flow/Classes/Package/Manager.php
index <HASH>..<HASH> 100644
--- a/TYPO3.Flow/Classes/Package/Manager.php
+++ b/TYPO3.Flow/Classes/Package/Manager.php
@@ -377,6 +377,9 @@ class Manager implements \F3\FLOW3\Package\ManagerInterface {
$childFilename = $childFileInfo->getFilename();
if ($childFilename[0] !== '.' && $childFilename !== 'FLOW3') {
$packagePath = \F3\FLOW3\Utility\Files::getUnixStylePath($childFileInfo->getPathName()) . '/';
+ if (isset($this->packages[$childFilename])) {
+ throw new \F3\FLOW3\Package\Exception\DuplicatePackage('Detected a duplicate package, remove either "' . $this->packages[$childFilename]->getPackagePath() . '" or "' . $packagePath . '".', 1253716811);
+ }
$this->packages[$childFilename] = $this->objectFactory->create('F3\FLOW3\Package\Package', $childFilename, $packagePath);
}
} | [+FEATURE] FLOW3 (Package): Duplicate packages are now detected and an exception is thrown, resolves #<I>.
Original-Commit-Hash: c7b7b5db<I>c<I>da<I>fba0d<I>a4f5b | neos_flow-development-collection | train | php |
7a9a53a32d37876f3bba120798e8ac990ddc397f | diff --git a/libkbfs/kbfs_ops.go b/libkbfs/kbfs_ops.go
index <HASH>..<HASH> 100644
--- a/libkbfs/kbfs_ops.go
+++ b/libkbfs/kbfs_ops.go
@@ -261,13 +261,17 @@ func (fs *KBFSOpsStandard) execReadInChannel(
func (fs *KBFSOpsStandard) GetRootMD(dir DirId) (md *RootMetadata, err error) {
// don't check read permissions here -- anyone should be able to read
// the MD to determine whether there's a public subdir or not
+ var exists bool
fs.execReadInChannel(dir, func(rtype reqType) error {
md, err = fs.getMDInChannel(Path{TopDir: dir}, rtype)
+ // Type defaults to File, so if it was set to Dir then MD already exists
+ if err == nil && md.data.Dir.Type == Dir {
+ exists = true
+ }
return err
})
- // Type defaults to File, so if it was set to Dir then MD already exists
- if err != nil || md.data.Dir.Type == Dir {
+ if err != nil || exists {
return
} | kbfs_ops: fix data race found by 'go test -race'
Don't inspect the MD outside of the scheduler. | keybase_client | train | go |
daa01494034a1dfa69ac4bdc848b9e6e91546676 | diff --git a/beets/mediafile.py b/beets/mediafile.py
index <HASH>..<HASH> 100644
--- a/beets/mediafile.py
+++ b/beets/mediafile.py
@@ -398,8 +398,9 @@ class StorageStyle(object):
self.float_places = float_places
# Convert suffix to correct string type.
- if self.suffix and self.as_type is unicode:
- self.suffix = self.as_type(self.suffix)
+ if self.suffix and self.as_type is unicode \
+ and not isinstance(self.suffix, unicode):
+ self.suffix = self.suffix.decode('utf8')
# Getter. | Fix bytes/str with unicode-nazi
Further cleaning will require setting unicode_literals on plugins
Original: beetbox/beets@<I>c | beetbox_mediafile | train | py |
69cf82e8b23dcdd0c83f1fd353b6175c551fbdb3 | diff --git a/src/raven.js b/src/raven.js
index <HASH>..<HASH> 100644
--- a/src/raven.js
+++ b/src/raven.js
@@ -1272,8 +1272,12 @@ Raven.prototype = {
// borrowed from: https://github.com/angular/angular.js/pull/13945/files
var chrome = _window.chrome;
var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
- var hasPushState = !isChromePackagedApp && _window.history && history.pushState;
- if (autoBreadcrumbs.location && hasPushState) {
+ var hasPushAndReplaceState =
+ !isChromePackagedApp &&
+ _window.history &&
+ history.pushState &&
+ history.replaceState;
+ if (autoBreadcrumbs.location && hasPushAndReplaceState) {
// TODO: remove onpopstate handler on uninstall()
var oldOnPopState = _window.onpopstate;
_window.onpopstate = function() {
@@ -1302,6 +1306,7 @@ Raven.prototype = {
};
fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);
+ fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);
}
if (autoBreadcrumbs.console && 'console' in _window && console.log) { | Check for replaceState and fill it | getsentry_sentry-javascript | train | js |
382dfe2138c1ad39734d142a6f0b88010d8f3721 | diff --git a/src/subscription/mapAsyncIterator.js b/src/subscription/mapAsyncIterator.js
index <HASH>..<HASH> 100644
--- a/src/subscription/mapAsyncIterator.js
+++ b/src/subscription/mapAsyncIterator.js
@@ -24,10 +24,16 @@ export function mapAsyncIterator<T, U>(
};
}
- function mapResult(result: IteratorResult<T, void>) {
- return result.done
- ? result
- : asyncMapValue(result.value, callback).then(iteratorResult, abruptClose);
+ async function mapResult(result: IteratorResult<T, void>) {
+ if (result.done) {
+ return result;
+ }
+
+ try {
+ return { value: await callback(result.value), done: false };
+ } catch (callbackError) {
+ return abruptClose(callbackError);
+ }
}
function mapReject(error: mixed) {
@@ -60,14 +66,3 @@ export function mapAsyncIterator<T, U>(
},
}: $FlowFixMe);
}
-
-function asyncMapValue<T, U>(
- value: T,
- callback: (T) => PromiseOrValue<U>,
-): Promise<U> {
- return new Promise((resolve) => resolve(callback(value)));
-}
-
-function iteratorResult<T>(value: T): IteratorResult<T, void> {
- return { value, done: false };
-} | mapAsyncIterator: simplify mapResult (#<I>) | graphql_graphql-js | train | js |
88043f1a7743a00caec06c7ef6a9c507e03edf6e | diff --git a/lib/rnes/ppu_bus.rb b/lib/rnes/ppu_bus.rb
index <HASH>..<HASH> 100644
--- a/lib/rnes/ppu_bus.rb
+++ b/lib/rnes/ppu_bus.rb
@@ -28,9 +28,9 @@ module Rnes
when 0x3F00..0x3F1F
@video_ram.read(address - 0x2000)
when 0x3F20..0x3FFF
- read(address - 0x20) # mirror to 0x3F00..0x3F1F
+ read(address - 0x20)
when 0x4000..0xFFFF
- read(address - 0x4000) # mirror to 0x0000..0x3FFF
+ read(address - 0x4000)
else
raise ::Rnes::Errors::InvalidPpuBusAddressError, address
end | Remove verbose comment from PPU bus | r7kamura_rnes | train | rb |
cf0b219c65b02103ef3d3d78a15c7f5b364173ad | diff --git a/components.js b/components.js
index <HASH>..<HASH> 100644
--- a/components.js
+++ b/components.js
@@ -1 +1,2 @@
-exports.EasyFormsComponent = require('./lib/easy-forms.component').EasyFormsComponent;
\ No newline at end of file
+exports.EasyFormsComponent = require('./lib/easy-forms.component').EasyFormsComponent;
+exports.EasyFormData = require('./lib/data.interface').EasyFormData;
\ No newline at end of file | fix: added EasyFormData interface to d.ts | flauc_angular2-easy-forms | train | js |
bff5c69dd3f0615cc8044164245a0b464a250acf | diff --git a/speech/google/cloud/speech/transcript.py b/speech/google/cloud/speech/transcript.py
index <HASH>..<HASH> 100644
--- a/speech/google/cloud/speech/transcript.py
+++ b/speech/google/cloud/speech/transcript.py
@@ -38,7 +38,7 @@ class Transcript(object):
:rtype: :class:`Transcript`
:returns: Instance of ``Transcript``.
"""
- return cls(transcript['transcript'], transcript['confidence'])
+ return cls(transcript.get('transcript'), transcript.get('confidence'))
@classmethod
def from_pb(cls, transcript):
diff --git a/speech/unit_tests/test_transcript.py b/speech/unit_tests/test_transcript.py
index <HASH>..<HASH> 100644
--- a/speech/unit_tests/test_transcript.py
+++ b/speech/unit_tests/test_transcript.py
@@ -31,3 +31,12 @@ class TestTranscript(unittest.TestCase):
self.assertEqual('how old is the Brooklyn Bridge',
transcript.transcript)
self.assertEqual(0.98267895, transcript.confidence)
+
+ def test_from_api_repr_with_no_confidence(self):
+ data = {
+ 'transcript': 'testing 1 2 3'
+ }
+
+ transcript = self._getTargetClass().from_api_repr(data)
+ self.assertEqual(transcript.transcript, data['transcript'])
+ self.assertIsNone(transcript.confidence) | Fixes issue when max_alternatives is more than 1 and confidence is missing. | googleapis_google-cloud-python | train | py,py |
a5496ec23cba75318f2094d63265a432ede4823c | diff --git a/jcvi/formats/genbank.py b/jcvi/formats/genbank.py
index <HASH>..<HASH> 100644
--- a/jcvi/formats/genbank.py
+++ b/jcvi/formats/genbank.py
@@ -49,11 +49,6 @@ class MultiGenBank(BaseFile):
for f in rf:
self.print_gffline(gff_fw, f, seqid)
nfeats += 1
-
- for sf in f.sub_features:
- self.print_gffline(gff_fw, sf, seqid, parent=f)
- nfeats += 1
-
nrecs += 1
logging.debug( | Remove .sub_features extraction as no longer needed (thanks @chen1i6c<I>, #<I>) (#<I>) | tanghaibao_jcvi | train | py |
c844c7b34c4840e0fb0bfa39f5e8872432844590 | diff --git a/lesscpy/lessc/scope.py b/lesscpy/lessc/scope.py
index <HASH>..<HASH> 100644
--- a/lesscpy/lessc/scope.py
+++ b/lesscpy/lessc/scope.py
@@ -90,6 +90,8 @@ class Scope(list):
"""
if isinstance(name, tuple):
name = name[0]
+ if name.startswith('@{'):
+ name = '@' + name[2:-1]
i = len(self)
while i >= 0:
i -= 1
@@ -176,6 +178,11 @@ class Scope(list):
if var is False:
raise SyntaxError('Unknown variable %s' % name)
name = '@' + utility.destring(var.value[0])
+ if name.startswith('@{'):
+ var = self.variables('@' + name[2:-1])
+ if var is False:
+ raise SyntaxError('Unknown escaped variable %s' % name)
+ name = var.name
var = self.variables(name)
if var is False:
raise SyntaxError('Unknown variable %s' % name) | Support swapping "@{...}" type variables
These only occur in interpolated strings (~'...' or ~"..."). | lesscpy_lesscpy | train | py |
bc4c1c6f28e5e137352bb233a557d433dca0119f | diff --git a/src/model.js b/src/model.js
index <HASH>..<HASH> 100644
--- a/src/model.js
+++ b/src/model.js
@@ -3,8 +3,9 @@
module.exports = function (ConvexModel, Firebase, $q, convexConfig) {
ConvexModel.prototype.$ref = function () {
+ var pathOverride = this.$firebase && this.$firebase.path;
return new Firebase(convexConfig.firebase)
- .child(this.$firebase.path.call(this));
+ .child(pathOverride ? this.$firebase.path.call(this) : this.$path(this.id));
};
function toPromise (ref) {
diff --git a/test/model.js b/test/model.js
index <HASH>..<HASH> 100644
--- a/test/model.js
+++ b/test/model.js
@@ -20,7 +20,17 @@ module.exports = function () {
describe('#$ref', function () {
- it('can generate a new Firebase reference', function () {
+ it('can generate a reference using $path', function () {
+ model.$path = function () {
+ return '/user/ben';
+ };
+ expect(model.$ref().currentPath).to.equal('Mock://user/ben');
+ });
+
+ it('can generate a reference using a firebase path override', function () {
+ model.$path = function () {
+ return '$path';
+ };
model.$firebase = {
path: function () {
return '/user/ben'; | Use $path as the default and then fall back to $firebase#path | bendrucker_convex-firebase | train | js,js |
9a566ef073e77388585480ec4a152ca28417ec53 | 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
@@ -410,6 +410,8 @@ module Aruba
# @param [true,false] expect_presence
# Should the given paths be present (true) or absent (false)
def check_file_presence(paths, expect_presence = true)
+ stop_processes!
+
warn('The use of "check_file_presence" is deprecated. Use "expect().to be_existing_file or expect(all_paths).to match_path_pattern() instead" ')
Array(paths).each do |path| | Fixed expand_path for check_presence | cucumber_aruba | train | rb |
14b6053200367c12cb8868652c0ea6c2a8a20ed6 | diff --git a/app/medication/edit/controller.js b/app/medication/edit/controller.js
index <HASH>..<HASH> 100644
--- a/app/medication/edit/controller.js
+++ b/app/medication/edit/controller.js
@@ -82,6 +82,7 @@ export default AbstractEditController.extend(InventorySelection, PatientId, Pati
},
_addNewPatient: function() {
+ this.displayAlert('Please Wait','Creating new patient...Please wait..');
this._getNewPatientId().then(function(friendlyId) {
var patientTypeAhead = this.get('patientTypeAhead'),
nameParts = patientTypeAhead.split(' '), | Added alert when creating new patient from medication
Added alert for slow connections | HospitalRun_hospitalrun-frontend | train | js |
d88bbb05dea57adbe15bcb7d3e09ae4917e77a65 | diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -2,6 +2,7 @@
$:.push(File.expand_path("../../lib", __FILE__))
+require "fileutils"
require "fakeweb"
require "uri"
require "ryodo"
@@ -22,7 +23,7 @@ end
RYODO_SPEC_ROOT = File.expand_path("..", __FILE__)
RYODO_TMP_ROOT = File.expand_path("../../tmp/spec", __FILE__)
-Dir.mkdir RYODO_TMP_ROOT unless File.exists?(RYODO_TMP_ROOT)
+FileUtils.mkdir_p RYODO_TMP_ROOT unless File.exists?(RYODO_TMP_ROOT)
FakeWeb.register_uri(:get,
Ryodo::PUBLIC_SUFFIX_DATA_URI, | Fix tmp/spec folder issue while test run | asaaki_ryodo | train | rb |
010c3a530cd1a59305081610e26ea4061a1eb82e | diff --git a/lib/async.js b/lib/async.js
index <HASH>..<HASH> 100644
--- a/lib/async.js
+++ b/lib/async.js
@@ -375,7 +375,7 @@
}, true);
};
if (ready()) {
- task[task.length - 1](taskCallback);
+ task[task.length - 1](taskCallback, results);
}
else {
var listener = function () { | Fix bug in auto. Results wern't being passed to functions that were immediately ready to run. | caolan_async | train | js |
d3b35607784c691b6fa6d2f3cbe781bdfbfb1e7d | diff --git a/publish/index.js b/publish/index.js
index <HASH>..<HASH> 100644
--- a/publish/index.js
+++ b/publish/index.js
@@ -151,7 +151,7 @@ let package = require("../package.json");
// Add & Commit files to Git
const gitCommitPackageSub = ora("Committing files to Git").start();
- await git.commit(`Bumping version to ${results.version} for ${workspacePackage} package`, subPackageFiles.map((file) => path.join(__dirname, "..", file)));
+ await git.commit(`Bumping version to ${results.version} for ${workspacePackage} package`, [...subPackageFiles, ...packageFiles].map((file) => path.join(__dirname, "..", file)));
gitCommitPackageSub.succeed("Committed files to Git");
} | Trying to fix what is included in publish commit | dynamoosejs_dynamoose | train | js |
542cc42538d8f75f58442f0d4b45a0dcbda5ad4b | diff --git a/framework/core/js/src/forum/compat.js b/framework/core/js/src/forum/compat.js
index <HASH>..<HASH> 100644
--- a/framework/core/js/src/forum/compat.js
+++ b/framework/core/js/src/forum/compat.js
@@ -72,6 +72,7 @@ import DiscussionPageResolver from './resolvers/DiscussionPageResolver';
import BasicEditorDriver from '../common/utils/BasicEditorDriver';
import routes from './routes';
import ForumApplication from './ForumApplication';
+import isSafariMobile from './utils/isSafariMobile';
export default Object.assign(compat, {
'utils/PostControls': PostControls,
@@ -83,6 +84,7 @@ export default Object.assign(compat, {
'utils/UserControls': UserControls,
'utils/Pane': Pane,
'utils/BasicEditorDriver': BasicEditorDriver,
+ 'utils/isSafariMobile': isSafariMobile,
'states/ComposerState': ComposerState,
'states/DiscussionListState': DiscussionListState,
'states/GlobalSearchState': GlobalSearchState, | feat: export `utils/isSafariMobile` (#<I>) | flarum_core | train | js |
bdecf85fb5a0df9d11bffc948bd213921125e0de | diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/helper.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/helper.js
index <HASH>..<HASH> 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/helper.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/helper.js
@@ -26,12 +26,9 @@ const DriverRemoteConnection = require('../lib/driver/driver-remote-connection')
exports.getConnection = function getConnection(traversalSource) {
return new DriverRemoteConnection('ws://localhost:45940/gremlin', { traversalSource: traversalSource });
-<<<<<<< HEAD
-=======
};
exports.getSecureConnectionWithAuthenticator = function getConnection(traversalSource) {
const authenticator = new SaslAuthenticator({ username: 'stephen', password: 'password' });
- return new DriverRemoteConnection('wss://localhost:45941/gremlin', { traversalSource: traversalSource, authenticator: authenticator, rejectUnauthorized: false });
->>>>>>> 65de11c3c8... Submit can accept an existing requestId.
+ return new DriverRemoteConnection('ws://localhost:45941/gremlin', { traversalSource: traversalSource, authenticator: authenticator, rejectUnauthorized: false });
};
\ No newline at end of file | Switched from TLS sockets to normal socket on connection to gremlin secure server. | apache_tinkerpop | train | js |
0c692422545363473640939bcb307a22e34e0176 | diff --git a/sqlalchemyutils.py b/sqlalchemyutils.py
index <HASH>..<HASH> 100644
--- a/sqlalchemyutils.py
+++ b/sqlalchemyutils.py
@@ -28,6 +28,7 @@ from sqlalchemy.orm import class_mapper, properties
from sqlalchemy.types import TypeDecorator, TEXT, LargeBinary
from sqlalchemy.sql.expression import FunctionElement
from invenio.intbitset import intbitset
+from invenio.errorlib import register_exception
from invenio.dbquery import serialize_via_marshal, deserialize_via_marshal
from invenio.hashutils import md5
@@ -249,7 +250,10 @@ class PasswordComparator(Comparator):
def autocommit_on_checkin(dbapi_con, con_record):
"""Calls autocommit on raw mysql connection for fixing bug in MySQL 5.5"""
- dbapi_con.autocommit(True)
+ try:
+ dbapi_con.autocommit(True)
+ except:
+ register_exception()
## Possibly register globally.
#event.listen(Pool, 'checkin', autocommit_on_checkin) | SQLAlchemy: fix for MySQL gone exception handling
* Addresses problem with unclear exception when MySQL is down.
(closes #<I>) | inveniosoftware-attic_invenio-utils | train | py |
04ecccae4ee4f387cbb8de2f8b3ca859d2730136 | diff --git a/server.py b/server.py
index <HASH>..<HASH> 100644
--- a/server.py
+++ b/server.py
@@ -7,24 +7,22 @@ class GNTPServer(SocketServer.TCPServer):
class GNTPHandler(SocketServer.StreamRequestHandler):
def read(self):
- bufferSleep = 0.01
bufferLength = 2048
- time.sleep(bufferSleep) #Let the buffer fill up a bit (hack)
buffer = ''
while(1):
data = self.request.recv(bufferLength)
if self.server.growl_debug:
print 'Reading',len(data)
buffer = buffer + data
- if len(data) < bufferLength: break
- time.sleep(bufferSleep) #Let the buffer fill up a bit (hack)
+ if len(data) < bufferLength and buffer.endswith('\r\n\r\n'):
+ break
if self.server.growl_debug:
print '<Reading>\n',buffer,'\n</Reading>'
return buffer
def write(self,msg):
if self.server.growl_debug:
print '<Writing>\n',msg,'\n</Writing>'
- self.request.send(msg)
+ self.request.sendall(msg)
def handle(self):
reload(gntp)
self.data = self.read() | Slightly better checks for the end of message. | kfdm_gntp | train | py |
c4106ed9e129a5d8f520b718416c1b4e0ce99825 | diff --git a/jave-core/src/main/java/ws/schild/jave/MultimediaObject.java b/jave-core/src/main/java/ws/schild/jave/MultimediaObject.java
index <HASH>..<HASH> 100644
--- a/jave-core/src/main/java/ws/schild/jave/MultimediaObject.java
+++ b/jave-core/src/main/java/ws/schild/jave/MultimediaObject.java
@@ -223,7 +223,8 @@ public class MultimediaObject {
Pattern p3 = Pattern.compile(
"^\\s*Stream #\\S+: ((?:Audio)|(?:Video)|(?:Data)): (.*)\\s*$",
Pattern.CASE_INSENSITIVE);
- Pattern p4 = Pattern.compile(
+ @SuppressWarnings("unused")
+ Pattern p4 = Pattern.compile(
"^\\s*Metadata:",
Pattern.CASE_INSENSITIVE);
MultimediaInfo info = null; | Keeping this around since it might be needed in the future. | a-schild_jave2 | train | java |
dd8437333e98f4a4fd36557f07e54558bdb1e0a9 | diff --git a/ConfigurationUrlParser.php b/ConfigurationUrlParser.php
index <HASH>..<HASH> 100644
--- a/ConfigurationUrlParser.php
+++ b/ConfigurationUrlParser.php
@@ -124,6 +124,8 @@ class ConfigurationUrlParser
*
* @param string $url
* @return array
+ *
+ * @throws \InvalidArgumentException
*/
protected function parseUrl($url)
{
diff --git a/Testing/Fakes/QueueFake.php b/Testing/Fakes/QueueFake.php
index <HASH>..<HASH> 100644
--- a/Testing/Fakes/QueueFake.php
+++ b/Testing/Fakes/QueueFake.php
@@ -367,6 +367,8 @@ class QueueFake extends QueueManager implements Queue
* @param string $method
* @param array $parameters
* @return mixed
+ *
+ * @throws \BadMethodCallException
*/
public function __call($method, $parameters)
{ | add missing docblocks (#<I>) | illuminate_support | train | php,php |
42af41c1677a3c5ced623635d16f959940f6e9dc | diff --git a/lib/codeme/config.rb b/lib/codeme/config.rb
index <HASH>..<HASH> 100644
--- a/lib/codeme/config.rb
+++ b/lib/codeme/config.rb
@@ -6,6 +6,7 @@ module Codeme
attr_accessor :default_config
def method_missing(name, *args, &block)
+ p name
(@instance ||= self.new).send(name, *args, &block)
end
@@ -13,6 +14,10 @@ module Codeme
self.default_config ||= {}
self.default_config[name.to_sym] = default
end
+
+ def [](name)
+ send(name.to_sym)
+ end
end
def initialize
diff --git a/spec/codeme/config_spec.rb b/spec/codeme/config_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/codeme/config_spec.rb
+++ b/spec/codeme/config_spec.rb
@@ -43,9 +43,19 @@ RSpec.describe Codeme::Config do
end
it "support class level instance" do
- Codeme::Config.register(:apple)
- expect(subject.accept?(:apple)).to be true
- Codeme::Config.reset_default!
+ klass = Class.new(Codeme::Config) do
+ register :apple, true
+ end
+ expect(klass.new.accept?(:apple)).to be true
+ end
+
+ it "support class level accessor" do
+ klass = Class.new(Codeme::Config) do
+ register :shared, true
+ end
+ expect(klass[:shared]).to be true
+ klass[:shared] = false
+ expect(klass[:shared]).to be false
end
end | Add class level accessor for Config | tamashii-io_tamashii-common | train | rb,rb |
38db64d3c2aef2700a9fb1de0e15992c49852d37 | diff --git a/test/Base/BaseTestCase.php b/test/Base/BaseTestCase.php
index <HASH>..<HASH> 100644
--- a/test/Base/BaseTestCase.php
+++ b/test/Base/BaseTestCase.php
@@ -2,7 +2,7 @@
namespace RcmTest\Base;
-require_once __DIR__ . '/Zf2TestCase.php';
+require_once __DIR__ . '/ZF2TestCase.php';
use Rcm\Entity\Country;
use Rcm\Entity\Language; | PROD-<I> Use commas for decimals in euro and other countries - add unit tests | reliv_Rcm | train | php |
1d91cad559b8a5a0d9141a2bd934d5bf5c62e036 | diff --git a/src/MetaModels/DcGeneral/Events/Table/FilterSetting/DrawSetting.php b/src/MetaModels/DcGeneral/Events/Table/FilterSetting/DrawSetting.php
index <HASH>..<HASH> 100644
--- a/src/MetaModels/DcGeneral/Events/Table/FilterSetting/DrawSetting.php
+++ b/src/MetaModels/DcGeneral/Events/Table/FilterSetting/DrawSetting.php
@@ -212,10 +212,6 @@ class DrawSetting
sprintf('%s[%s][%s]', $event::NAME, $environment->getDataDefinition()->getName(), $type),
$event
);
- $environment->getEventDispatcher()->dispatch(
- sprintf('%s[%s]', $event::NAME, $environment->getDataDefinition()->getName()),
- $event
- );
if (!$event->isPropagationStopped()) {
// Handle with default drawing if no one wants to handle. | Fix endless recursion in drawing filter settings. | MetaModels_core | train | php |
414d0c3b2e80168fde2e339504ac09c6dd394fa7 | diff --git a/src/Orders/OrdersStatus.php b/src/Orders/OrdersStatus.php
index <HASH>..<HASH> 100644
--- a/src/Orders/OrdersStatus.php
+++ b/src/Orders/OrdersStatus.php
@@ -32,4 +32,28 @@ class OrdersStatus {
return $result;
}
+ /**
+ * [RO] Confirma o comanda existenta (https://github.com/celdotro/marketplace/wiki/Confirmare-comanda)
+ * [EN] Confirms an existing order (https://github.com/celdotro/marketplace/wiki/Confirm-order)
+ * @param $cmd
+ * @return mixed
+ * @throws \Exception
+ */
+ public function confirmOrder($cmd){
+ // Sanity check
+ if(!isset($cmd) || !is_int($cmd)) throw new \Exception('Specificati comanda');
+
+ // Set method and action
+ $method = 'orders';
+ $action = 'confirmOrder';
+
+ // Set data
+ $data = array('order' => $cmd);
+
+ // Send request and retrieve response
+ $result = Dispatcher::send($method, $action, $data);
+
+ return $result;
+ }
+
}
\ No newline at end of file | Added method for order confirmation
modified: src/Orders/OrdersStatus.php | celdotro_marketplace | train | php |
a4fc2e79db4cbf167e315834dc3298f9f9d1fe21 | diff --git a/programs/demag_gui.py b/programs/demag_gui.py
index <HASH>..<HASH> 100755
--- a/programs/demag_gui.py
+++ b/programs/demag_gui.py
@@ -5025,8 +5025,10 @@ class Demag_GUI(wx.Frame):
mb = self.GetMenuBar()
am = mb.GetMenu(2)
submenu_toggle_mean_display = wx.Menu()
- lines = ["m_%s_toggle_mean = submenu_toggle_mean_display.AppendCheckItem(-1, '&%s', '%s'); self.Bind(wx.EVT_MENU, self.on_menu_toggle_mean, m_%s_toggle_mean)"%(f.replace(' ',''),f.replace(' ',''),f.replace(' ',''),f.replace(' ','')) for f in self.all_fits_list]
+ f_name = f.replace(' ','').replace('-','_')
+ lines = ["m_%s_toggle_mean = submenu_toggle_mean_display.AppendCheckItem(-1, '&%s', '%s'); self.Bind(wx.EVT_MENU, self.on_menu_toggle_mean, m_%s_toggle_mean)"%(f_name,f_name,f_name,f_name) for f in self.all_fits_list]
+ pdb.set_trace()
for line in lines: exec(line)
am.DeleteItem(am.GetMenuItems()[3]) | fixed error with dashed fit names crashing GUI | PmagPy_PmagPy | train | py |
50c09efa634a3d961e087560eecc2bd71d9360cc | diff --git a/test/airbrake_tasks_test.rb b/test/airbrake_tasks_test.rb
index <HASH>..<HASH> 100644
--- a/test/airbrake_tasks_test.rb
+++ b/test/airbrake_tasks_test.rb
@@ -92,12 +92,6 @@ class AirbrakeTasksTest < Test::Unit::TestCase
end
end
- before_should "use the :api_key param if it's passed in." do
- @options[:api_key] = "value"
- @post.expects(:set_form_data).
- with(has_entries("api_key" => "value"))
- end
-
before_should "puts the response body on success" do
AirbrakeTasks.expects(:puts).with("body")
@http_proxy.expects(:request).with(any_parameters).returns(successful_response('body'))
@@ -125,7 +119,7 @@ class AirbrakeTasksTest < Test::Unit::TestCase
context "in a configured project with custom host" do
setup do
- Airbrake.configure do |config|
+ Airbrake.configure do |config|
config.api_key = "1234123412341234"
config.host = "custom.host"
end | Remove test that checks availability of passing api_key opt | airbrake_airbrake | train | rb |
0e4c58d18d67b93da3f29bfa25cc942f2cae5f7a | diff --git a/state/settings.go b/state/settings.go
index <HASH>..<HASH> 100644
--- a/state/settings.go
+++ b/state/settings.go
@@ -243,7 +243,7 @@ func (c *Settings) Read() error {
// readSettingsDoc reads the settings with the given
// key. It returns the settings and the current rxnRevno.
func readSettingsDoc(st *State, key string) (map[string]interface{}, int64, error) {
- settings, closer := st.getCollection(settingsC)
+ settings, closer := st.getRawCollection(settingsC)
defer closer()
config := map[string]interface{}{} | state: use a raw collection when load settings
This is required to allow loading of settings before the env UUID
migration for settings. Without this change upgrades to <I> fail. | juju_juju | train | go |
2053bde9fac91697a5270746126cf92346cc517e | diff --git a/src/generator/custom/CustomGenerator.js b/src/generator/custom/CustomGenerator.js
index <HASH>..<HASH> 100644
--- a/src/generator/custom/CustomGenerator.js
+++ b/src/generator/custom/CustomGenerator.js
@@ -49,7 +49,7 @@ module.exports = function(PluginResolver) {
// TODO: this should be in the HtmlWriterFile, but i dont want to create
// one every time
var ECT = require("ect");
- this.renderer = ECT({ root : this.settings.templateDir });
+ this.renderer = ECT({ root : generatorSettings.templateDir });
};
// Extend from the base generator | fix(generator): Fix reference in customGenerator | hrajchert_mddoc | train | js |
afd50019f28e08e55d71a9e1062ece706f728b63 | diff --git a/test/flatten.js b/test/flatten.js
index <HASH>..<HASH> 100644
--- a/test/flatten.js
+++ b/test/flatten.js
@@ -53,4 +53,20 @@ test('flatten stream of streams', function (t) {
})
+test.only('flatten stream of broken streams', function (t) {
+ var _err = new Error('I am broken');
+ pull(
+ pull.values([
+ pull.Source(function read(abort, cb) {
+ cb(_err)
+ })
+ ]),
+ pull.flatten(),
+ pull.onEnd(function (err) {
+ t.equal(err, _err)
+ t.end()
+ })
+ )
+
+}) | Add failing test for flattening stream of broken streams | pull-stream_pull-stream | train | js |
ad9cd8c4ca0a148fc607df1b63ba801c7ed0a03f | diff --git a/pmml-model/src/main/java/org/dmg/pmml/Cell.java b/pmml-model/src/main/java/org/dmg/pmml/Cell.java
index <HASH>..<HASH> 100644
--- a/pmml-model/src/main/java/org/dmg/pmml/Cell.java
+++ b/pmml-model/src/main/java/org/dmg/pmml/Cell.java
@@ -20,7 +20,7 @@ import org.jpmml.model.annotations.Property;
)
@XmlTransient
abstract
-public class Cell extends PMMLObject implements HasValue<Cell> {
+public class Cell extends PMMLObject {
@XmlValue
@XmlValueExtension
@@ -37,12 +37,10 @@ public class Cell extends PMMLObject implements HasValue<Cell> {
abstract
public QName getName();
- @Override
public String getValue(){
return this.value;
}
- @Override
public Cell setValue(@Property("value") String value){
this.value = value; | Removed Cell from HasValue class hierarchy | jpmml_jpmml-model | train | java |
2ec65239e0e8e8c734b300ed10e0f974c5e766dd | diff --git a/audioread/gstdec.py b/audioread/gstdec.py
index <HASH>..<HASH> 100644
--- a/audioread/gstdec.py
+++ b/audioread/gstdec.py
@@ -228,7 +228,7 @@ class GstAudioFile(object):
self.ready_sem.acquire()
if self.read_exc:
# An error occurred before the stream became ready.
- self.close()
+ self.close(True)
raise self.read_exc
self.running = True
@@ -324,8 +324,8 @@ class GstAudioFile(object):
return self
# Cleanup.
- def close(self):
- if self.running:
+ def close(self, force=False):
+ if self.running or force:
self.running = False
# Stop reading the file. | clean up gst properly when an error occurs | beetbox_audioread | train | py |
d9a32fde61dce5449380177f46b2ebe6d949544c | diff --git a/anyconfig/globals.py b/anyconfig/globals.py
index <HASH>..<HASH> 100644
--- a/anyconfig/globals.py
+++ b/anyconfig/globals.py
@@ -2,6 +2,8 @@
# Copyright (C) 2013 Satoru SATOH <ssato @ redhat.com>
# License: MIT
#
+"""anyconfig globals.
+"""
import logging
@@ -11,22 +13,22 @@ VERSION = "0.0.3.10"
_LOGGING_FORMAT = "%(asctime)s %(name)s: [%(levelname)s] %(message)s"
-def getLogger(name="anyconfig", format=_LOGGING_FORMAT,
- level=logging.WARNING, **kwargs):
+def get_logger(name="anyconfig", log_format=_LOGGING_FORMAT,
+ level=logging.WARNING):
"""
Initialize custom logger.
"""
- logging.basicConfig(level=level, format=format)
+ logging.basicConfig(level=level, format=log_format)
logger = logging.getLogger(name)
handler = logging.StreamHandler()
handler.setLevel(level)
- handler.setFormatter(logging.Formatter(format))
- logger.addHandler()
+ handler.setFormatter(logging.Formatter(log_format))
+ logger.addHandler(handler)
return logger
-LOGGER = getLogger()
+LOGGER = get_logger()
# vim:sw=4:ts=4:et: | fix some pylint errors and warnings | ssato_python-anyconfig | train | py |
43a833dec24f4e0a7dc1d8494a5ad1b44113db15 | diff --git a/dvc/version.py b/dvc/version.py
index <HASH>..<HASH> 100644
--- a/dvc/version.py
+++ b/dvc/version.py
@@ -7,7 +7,7 @@ import os
import subprocess
-_BASE_VERSION = "0.35.7"
+_BASE_VERSION = "0.40.0"
def _generate_version(base_version): | dvc: bump to <I> | iterative_dvc | train | py |
f66211060c37dd6c2b4112cc9c5f8e12d7fa380b | diff --git a/src/org/jgroups/blocks/RequestCorrelator.java b/src/org/jgroups/blocks/RequestCorrelator.java
index <HASH>..<HASH> 100644
--- a/src/org/jgroups/blocks/RequestCorrelator.java
+++ b/src/org/jgroups/blocks/RequestCorrelator.java
@@ -1,4 +1,4 @@
-// $Id: RequestCorrelator.java,v 1.58 2010/01/18 14:32:37 belaban Exp $
+// $Id: RequestCorrelator.java,v 1.59 2010/01/27 09:21:34 belaban Exp $
package org.jgroups.blocks;
@@ -607,6 +607,9 @@ public class RequestCorrelator {
rsp=req.makeReply();
rsp.setFlag(Message.OOB);
rsp.setFlag(Message.DONT_BUNDLE);
+ if(req.isFlagSet(Message.NO_FC))
+ rsp.setFlag(Message.NO_FC);
+
if(rsp_buf instanceof Buffer)
rsp.setBuffer((Buffer)rsp_buf);
else if (rsp_buf instanceof byte[]) | if NO_FC was set in the request, it is also set in the response (<URL>) | belaban_JGroups | train | java |
41f57ef0d435f37a42680fe55ed71a460440d6eb | diff --git a/digitalocean/Image.py b/digitalocean/Image.py
index <HASH>..<HASH> 100644
--- a/digitalocean/Image.py
+++ b/digitalocean/Image.py
@@ -41,3 +41,6 @@ class Image(BaseAPI):
type="PUT",
params={"name": new_name}
)
+
+ def __str__(self):
+ return "%s %s %s" % (self.id, self.name, self.distribution)
\ No newline at end of file | The domain should return the ID, the distribution name and the name when used as string. | koalalorenzo_python-digitalocean | train | py |
62a1f6bce4edbd27b06ef0edb03c1284bebd258f | diff --git a/redish/proxy.py b/redish/proxy.py
index <HASH>..<HASH> 100644
--- a/redish/proxy.py
+++ b/redish/proxy.py
@@ -33,15 +33,18 @@ class Proxy(Redis):
return TYPE_MAP[typ](key, self)
def __setitem__(self, key, value):
- if isinstance(value, (int, basestring):
-
+ if isinstance(value, (int, basestring)):
+ self.set(key, value)
+ return
+ pline = self.pipeline()
if self.exists(key):
- self.delete(key)
+ pline = pline.delete(key)
if isinstance(value, list):
for item in value:
- self.lpush(key, item)
+ pline = pline.rpush(key, item)
elif isinstance(value, set):
for item in value:
- self.sadd(key, item)
+ pline = pline.sadd(key, item)
elif isinstance(value, dict):
- self.hmset(key, value)
+ pline = pline.hmset(key, value)
+ pline.execute() | Finish that line on checking for ints and strings, implement __setitem__ as pipeline. | ask_redish | train | py |
dc38940d7e537f97f56e9b6cc4ee28ff9f61c9f6 | diff --git a/extensions/roc-package-webpack-dev/src/actions/build.js b/extensions/roc-package-webpack-dev/src/actions/build.js
index <HASH>..<HASH> 100644
--- a/extensions/roc-package-webpack-dev/src/actions/build.js
+++ b/extensions/roc-package-webpack-dev/src/actions/build.js
@@ -108,7 +108,7 @@ export default ({ context: { verbose, config: { settings } } }) => (targets) =>
const validTargets = targets.filter((target) => webpackTargets.some((webpackTarget) => webpackTarget === target));
if (validTargets.length === 0) {
- return Promise.resolve();
+ return () => Promise.resolve();
}
log.small.log(`Starting the builder using "${settings.build.mode}" as the mode.\n`); | Fixed a problem when no targets where valid | rocjs_extensions | train | js |
f370472d515aa204eac9e6c8c51b462bc4cf09db | diff --git a/rabbithole.go b/rabbithole.go
index <HASH>..<HASH> 100644
--- a/rabbithole.go
+++ b/rabbithole.go
@@ -206,11 +206,11 @@ type ConnectionInfo struct {
ClientProperties Properties `json:"client_properties"`
- RecvOct int `json:"recv_oct"`
- SendOct int `json:"send_oct"`
- RecvCount int `json:"recv_cnt"`
- SendCount int `json:"send_cnt"`
- SendPendi int `json:"send_pend"`
+ RecvOct uint64 `json:"recv_oct"`
+ SendOct uint64 `json:"send_oct"`
+ RecvCount uint64 `json:"recv_cnt"`
+ SendCount uint64 `json:"send_cnt"`
+ SendPendi uint64 `json:"send_pend"`
RecvOctDetails RateDetails `json:"recv_oct_details"`
SendOctDetails RateDetails `json:"send_oct_details"`
} | Use uint<I> for values that can be really large | michaelklishin_rabbit-hole | train | go |
e41b2e806d1c71349856f45b5de5e79693617fba | diff --git a/lib/devices/gateway/sensor_ht.js b/lib/devices/gateway/sensor_ht.js
index <HASH>..<HASH> 100644
--- a/lib/devices/gateway/sensor_ht.js
+++ b/lib/devices/gateway/sensor_ht.js
@@ -3,8 +3,9 @@
const SubDevice = require('./subdevice');
const { Temperature, Humidity } = require('../capabilities/sensor');
+const Voltage = require('./voltage');
-module.exports = class SensorHT extends SubDevice.with(Temperature, Humidity) {
+module.exports = class SensorHT extends SubDevice.with(Temperature, Humidity, Voltage) {
constructor(parent, info) {
super(parent, info); | Add battery state to Temperature Sensor
These work the same as the body sensors, so we can simply import
the existing capability. | aholstenson_miio | train | js |
b37ea094adec4448ce29274b215f0e58e0f9536f | diff --git a/lib/poolparty/helpers/provisioners/slave.rb b/lib/poolparty/helpers/provisioners/slave.rb
index <HASH>..<HASH> 100644
--- a/lib/poolparty/helpers/provisioners/slave.rb
+++ b/lib/poolparty/helpers/provisioners/slave.rb
@@ -33,6 +33,7 @@ module PoolParty
def run_once_and_clean
<<-EOS
+rm -rf /etc/puppet/ssl
. /etc/profile && /usr/sbin/puppetd --onetime --no-daemonize --logdest syslog --server master #{unix_hide_string}
rm -rf /etc/puppet/ssl
EOS | Updated removal of the certs before prerun on the slaves | auser_poolparty | train | rb |
4aff055798901b95997b340c9cba044a11046c3d | diff --git a/src/statements/returnStatement.js b/src/statements/returnStatement.js
index <HASH>..<HASH> 100644
--- a/src/statements/returnStatement.js
+++ b/src/statements/returnStatement.js
@@ -2,7 +2,7 @@ import traverser from "../traverser";
// http://esprima.readthedocs.io/en/latest/syntax-tree-format.html#return-statement
export const ReturnStatement = ({ argument }) => {
- const value = traverser(argument) || "nil";
+ const value = traverser(argument);
- return `return ${value}`;
-};
\ No newline at end of file
+ return value ? `return ${value}` : "do return end";
+}; | Add support for return with no argument
Fixes #8 | AgronKabashi_jspicl | train | js |
eb392027c074d2c812902edb049fcf561ccb6a3e | diff --git a/IDBStore.js b/IDBStore.js
index <HASH>..<HASH> 100644
--- a/IDBStore.js
+++ b/IDBStore.js
@@ -17,7 +17,6 @@
var IDBStore;
var defaults = {
- dbName: 'IDB',
storeName: 'Store',
dbVersion: 1,
keyPath: 'id',
@@ -37,6 +36,8 @@
mixin(this, defaults);
mixin(this, kwArgs);
+ this.dbName = 'IDBWrapper-' + this.storeName;
+
onStoreReady && (this.onStoreReady = onStoreReady);
this.idb = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB; | Don't allow setting of dbName
This removes the ability to have multiple stores in one db. | jensarps_IDBWrapper | train | js |
1c805bfad15eeb8ea9fff1ecf4242c31158b87f0 | diff --git a/wafer/static/js/edit_schedule.js b/wafer/static/js/edit_schedule.js
index <HASH>..<HASH> 100644
--- a/wafer/static/js/edit_schedule.js
+++ b/wafer/static/js/edit_schedule.js
@@ -127,7 +127,7 @@
e.target.classList.remove('success');
e.target.classList.remove('info');
- var typeClass = scheduleItemType === 'talk' ? 'success' : 'info';
+ var typeClass = scheduleItemType === 'talk' ? 'table-success' : 'table-info';
e.target.classList.add(typeClass);
var ajaxData = {
@@ -170,8 +170,8 @@
scheduleItemCell.removeAttribute('id');
scheduleItemCell.classList.remove('draggable');
- scheduleItemCell.classList.remove('info');
- scheduleItemCell.classList.remove('success');
+ scheduleItemCell.classList.remove('table-info');
+ scheduleItemCell.classList.remove('table-success');
scheduleItemCell.removeAttribute('data-scheduleitem-id');
scheduleItemCell.removeAttribute('data-talk-id');
scheduleItemCell.removeAttribute('data-page-id'); | schedule editor: fix coloring newly scheduled/deleted items
This fixes a problem where:
- newly-allocated items (i.e. ones that were just dropped in the
schedule) don't get colored as the others, but are colored after one
refreshes the page.
- newly deleted items are removed, but the cell where they were is still
colored as filled cells. | CTPUG_wafer | train | js |
fa145c1c2b80ee221e06c380eef331017e97ea9c | diff --git a/niworkflows/viz/utils.py b/niworkflows/viz/utils.py
index <HASH>..<HASH> 100644
--- a/niworkflows/viz/utils.py
+++ b/niworkflows/viz/utils.py
@@ -367,7 +367,7 @@ def plot_registration(
display.add_contours(white, colors="b", **kwargs)
display.add_contours(pial, colors="r", **kwargs)
elif contour is not None:
- display.add_contours(contour, colors="b", levels=[0.5], linewidths=0.5)
+ display.add_contours(contour, colors="r", levels=[0.5], linewidths=0.5)
svg = extract_svg(display, compress=compress)
display.close() | FIX: Improve mask contour visibility | poldracklab_niworkflows | train | py |
60b94b505af2c5ce8eb85183f32ec41535036154 | diff --git a/src/Engine.php b/src/Engine.php
index <HASH>..<HASH> 100644
--- a/src/Engine.php
+++ b/src/Engine.php
@@ -197,6 +197,9 @@ class Engine implements EngineInterface, TemplateAware, FinderAware
*/
public function render($template, array $data = [])
{
+ if (is_file($template)) {
+ return $this->renderTemplate($template, $data);
+ }
$path = $this->find($template);
if ($path) {
return $this->doRender($path, $data); | Allow Engine::render() to accept template full path
See #<I> | FoilPHP_Foil | train | php |
7eeaf0727788d2018e318c1f9540dd254ad0ad58 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -576,6 +576,8 @@ async function activate() {
// TODO: Show the list of commits that would be added. Should be disabled by default.
// git log master..develop --oneline
+ if ( !fs.existsSync( '.gitignore' ) )
+ logger.warn( '.gitignore file missing, it is suggested to create it before committing unwanted files.' );
if ( !fs.existsSync( 'CHANGELOG.md' ) )
logger.warn( 'CHANGELOG.md file missing, it is suggested to create it before a public release.' );
if ( !fs.existsSync( 'README.md' ) ) | Added warnings on .gitignore files missing from the repository | Zelgadis87_npm-versionator | train | js |
5e3d57966b95a0f5e4fa12028cc4b86b4b2a38e9 | diff --git a/pywb/static/wombat.js b/pywb/static/wombat.js
index <HASH>..<HASH> 100644
--- a/pywb/static/wombat.js
+++ b/pywb/static/wombat.js
@@ -1039,7 +1039,10 @@ var wombat_internal = function($wbwindow) {
return n1 + rewrite_url(n2) + n3;
}
- return value.replace(STYLE_REGEX, style_replacer);
+
+ value = value.replace(STYLE_REGEX, style_replacer);
+ value = value.replace('WB_wombat_', '');
+ return value;
}
//============================================ | rewrite: ensure WB_wombat_ removed from and style strings | webrecorder_pywb | train | js |
66f2fa043b9e19e1f3759417b48d516da2509f2e | diff --git a/pkg/build/builder/util.go b/pkg/build/builder/util.go
index <HASH>..<HASH> 100644
--- a/pkg/build/builder/util.go
+++ b/pkg/build/builder/util.go
@@ -10,15 +10,19 @@ import (
stiapi "github.com/openshift/source-to-image/pkg/api"
)
+var (
+ // procCGroupPattern is a regular expression that parses the entries in /proc/self/cgroup
+ procCGroupPattern = regexp.MustCompile(`\d+:([a-z_,]+):/.*/(docker-|)([a-z0-9]+).*`)
+)
+
// readNetClsCGroup parses /proc/self/cgroup in order to determine the container id that can be used
// the network namespace that this process is running on.
func readNetClsCGroup(reader io.Reader) string {
cgroups := make(map[string]string)
- re := regexp.MustCompile(`\d+:([a-z_,]+):/.*/(docker-|)([a-z0-9]+).*`)
scanner := bufio.NewScanner(reader)
for scanner.Scan() {
- if match := re.FindStringSubmatch(scanner.Text()); match != nil {
+ if match := procCGroupPattern.FindStringSubmatch(scanner.Text()); match != nil {
list := strings.Split(match[1], ",")
containerId := match[3]
if len(list) > 0 { | Move the cgroup regex to package level.
Address code review comment: coding convention calls for regex
patterns to be defined as package level vars. | openshift_origin | train | go |
83386d2eeb9c8eeecd29ee9a88e037e3fb662793 | diff --git a/WellCommerceNewsBundle.php b/WellCommerceNewsBundle.php
index <HASH>..<HASH> 100644
--- a/WellCommerceNewsBundle.php
+++ b/WellCommerceNewsBundle.php
@@ -12,7 +12,9 @@
namespace WellCommerce\Bundle\NewsBundle;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
+use WellCommerce\Bundle\NewsBundle\DependencyInjection\Compiler;
/**
* Class WellCommerceNewsBundle
@@ -21,5 +23,10 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
*/
class WellCommerceNewsBundle extends Bundle
{
-
+ public function build(ContainerBuilder $container)
+ {
+ parent::build($container);
+ $container->addCompilerPass(new Compiler\AutoRegisterServicesPass());
+ $container->addCompilerPass(new Compiler\MappingCompilerPass());
+ }
} | Added compiler passes to all bundles
(cherry picked from commit <I>ebd<I>a7aa0b9c6be3c<I>f<I>a7ce<I>bc<I>f) | WellCommerce_WishlistBundle | train | php |
80c51ff7b06426bbe52bab35b96b630667e25a75 | diff --git a/src/DB/Entity/LazyLoading/Implementation.php b/src/DB/Entity/LazyLoading/Implementation.php
index <HASH>..<HASH> 100644
--- a/src/DB/Entity/LazyLoading/Implementation.php
+++ b/src/DB/Entity/LazyLoading/Implementation.php
@@ -25,22 +25,21 @@ trait Implementation
*/
public static function lazyload($values)
{
+ $class = get_called_class();
+
if (is_scalar($values)) {
- if (!$this instanceof Identifiable) {
- $class = get_called_class();
+ if (!is_a($class, Identifiable::class)) {
throw new Exception("Unable to lazy load a scalar value for $class: Identity property not defined");
}
$prop = static::getIdProperty();
if (is_array($prop)) {
- $class = get_called_class();
throw new Exception("Unable to lazy load a scalar value for $class: Class has a complex identity");
}
$values = [$prop => $values];
}
- $class = get_called_class();
$reflection = new \ReflectionClass($class);
$entity = $reflection->newInstanceWithoutConstructor(); | LazyLoading implementation: don't use is static method | jasny_db | train | php |
023e35b52b7d4cf4e9058422a8f2173d17a1c075 | diff --git a/src/dolo/misc/yamlfile.py b/src/dolo/misc/yamlfile.py
index <HASH>..<HASH> 100644
--- a/src/dolo/misc/yamlfile.py
+++ b/src/dolo/misc/yamlfile.py
@@ -22,7 +22,8 @@ Imports the content of a modfile into the current interpreter scope
# check
if 'controls' in declarations:
variables_groups = OrderedDict()
- for vtype in ['states','controls','expectations','auxiliary']:
+ known_types = ['states','controls','expectations','auxiliary','auxiliary_2']
+ for vtype in known_types:
if vtype in declarations:
variables_groups[vtype] = [Variable(vn,0) for vn in declarations[vtype]]
variables_ordering = sum(variables_groups.values(),[]) | yamlfile recognize auxiliary_2 as a new category (temporary ?) | EconForge_dolo | train | py |
e400f3f13bbfaa231b6d4d9dcd6d7fc9c5d28741 | diff --git a/javalite-templator/src/main/java/org/javalite/templator/MergeToken.java b/javalite-templator/src/main/java/org/javalite/templator/MergeToken.java
index <HASH>..<HASH> 100644
--- a/javalite-templator/src/main/java/org/javalite/templator/MergeToken.java
+++ b/javalite-templator/src/main/java/org/javalite/templator/MergeToken.java
@@ -49,8 +49,6 @@ class MergeToken extends TemplateToken {
String[] parts = Util.split(mergeSpec, '.');
this.objectName = parts[0];
this.propertyName = parts[1];
- } else {
- throw new ParseException("Failed to parse: " + mergeSpec);
}
} | #<I> Implement a built-in function mechanism for MergeTag - fixed broken tests | javalite_activejdbc | train | java |
392269a8eb4b691e64cd3ba8ff13c36dc2a754f0 | diff --git a/plugins/provisioners/shell/provisioner.rb b/plugins/provisioners/shell/provisioner.rb
index <HASH>..<HASH> 100644
--- a/plugins/provisioners/shell/provisioner.rb
+++ b/plugins/provisioners/shell/provisioner.rb
@@ -96,12 +96,10 @@ module VagrantPlugins
exec_path.gsub!('/', '\\')
exec_path = "c:#{exec_path}" if exec_path.start_with?("\\")
- command = <<-EOH
- $old = Get-ExecutionPolicy;
- Set-ExecutionPolicy Unrestricted -force;
- #{exec_path}#{args};
- Set-ExecutionPolicy $old -force
- EOH
+ # For PowerShell scripts bypass the execution policy
+ command = "#{exec_path}#{args}"
+ command = "powershell -executionpolicy bypass -file #{command}" if
+ File.extname(exec_path).downcase == '.ps1'
if config.path
@machine.ui.detail(I18n.t("vagrant.provisioners.shell.running",
@@ -112,7 +110,7 @@ module VagrantPlugins
end
# Execute it with sudo
- comm.sudo(command) do |type, data|
+ comm.sudo(command, elevated: config.privileged) do |type, data|
handle_comm(type, data)
end
end | Default the WinRM shell provisioner to privileged (elevated) | hashicorp_vagrant | train | rb |
aa8a019c80bd604f1c40370636fab34a964f155d | diff --git a/public/lib/main.js b/public/lib/main.js
index <HASH>..<HASH> 100644
--- a/public/lib/main.js
+++ b/public/lib/main.js
@@ -1,12 +1,18 @@
(function() {
"use strict";
+ function requestPermission() {
+ (new Notify('NodeBB')).requestPermission();
+ }
+
jQuery('document').ready(function() {
require(['notify'], function(Notify) {
var logo = $('.forum-logo').attr('src');
+ requestPermission();
+
jQuery('#notif_dropdown').on('click', function() {
- (new Notify('NodeBB')).requestPermission();
+ requestPermission();
});
socket.on('event:new_notification', function(data) { | request permission on page load as well (will not work in Chrome) | psychobunny_nodebb-plugin-desktop-notifications | train | js |
6a62fe399b68ab9e3625ef5e7900394f389adc3a | diff --git a/params/version.go b/params/version.go
index <HASH>..<HASH> 100644
--- a/params/version.go
+++ b/params/version.go
@@ -21,10 +21,10 @@ import (
)
const (
- VersionMajor = 1 // Major version component of the current release
- VersionMinor = 9 // Minor version component of the current release
- VersionPatch = 11 // Patch version component of the current release
- VersionMeta = "unstable" // Version metadata to append to the version string
+ VersionMajor = 1 // Major version component of the current release
+ VersionMinor = 9 // Minor version component of the current release
+ VersionPatch = 11 // Patch version component of the current release
+ VersionMeta = "stable" // Version metadata to append to the version string
)
// Version holds the textual version string. | params: release Geth <I> stable | ethereum_go-ethereum | train | go |
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.